21 Dec 2022 - tsp
Last update 21 Dec 2022
14 mins
TL;DR: A lock-in amplifier is just a homodyne where one uses the DC output. Would have saved me personally some time to get it explained with this simple sentence.
The following article is a short (overview, not in depth) summary about the topic of Lock-In amplifiers as often used in physics. Iβve written this down since I only discovered that a lock-in amplifier is basically the same as an homodyne when I had the chance to work with such a device after having had some more experience with heterodyne receivers, modulators, demodulators and detectors. To narrow down to the topic it also takes a look at the heterodyne receiver (for up- and downconverison), the superheterodyne and the homodyne which are commonly used in RF communication equipment as of today. All are based on the same concept - mixing of two different periodic RF signal. So letβs first look into the optimal mixing behavior.
This is just a quick reminder of what a mixer really does and some basic math behind multiplication of trigonometric functions.
Letβs assume oneβs simply multiplying to sine functions:
f1(t)=sin(Ο1t)f2(t)=sin(Ο2t)Using the Euler identities
sin(Οt)=12i(eiΟtβeβiΟt)cos(Οt)=12(eiΟt+eβiΟt)one can simply show how the product of f1(t) and f2(t) looks like:
f1(t)βf2(t)=sin(Ο1t)βsin(Ο2t)=(eiΟ1tβeβiΟ1t2i)β(eiΟ2tβeβiΟ2t2i)=β14(ei(Ο1+Ο2)tβei(Ο1βΟ2)tβeβi(Ο1βΟ2)t+eβi(Ο1+Ο2)t)=14((ei(Ο1+Ο2)t+eβi(Ο1+Ο2)t)β(ei(Ο1βΟ2)t+eβi(Ο1βΟ2)t))=12(cos((Ο1βΟ2)t)βcos((Ο1+Ο2)t))The second interesting identity will arise when multiplying sine and cosine functions - the same trick using the Euler functions, multiplying all terms and rearranging will be used:
sin(Ο1t)βcos(Ο2t)=12i(eiΟ1tβeβiΟ1t)β12(eiΟ2t+eβiΟ2t)=12(sin((Ο1+Ο2)t)+sin((Ο1βΟ2)t))Especially for the lock-in amplifier phases play a huge role. One can use exactly the same trick via Euler identities to see the - unsurprisingly simple - behavior of phases during the mixing process:
f1(t)=sin(Ο1t+Ο1)f2(t)=sin(Ο2t+Ο2) f1(t)βf2(t)=sin(Ο1t+Ο1)βsin(Ο2t+Ο2)=14i2(eiΟ1t+iΟ1βeβiΟ1tβiΟ1)β(eiΟ2t+iΟ2βeβiΟ2tβiΟ2)=β14(ei((Ο1+Ο2)t+Ο1+Ο2)βei((Ο1βΟ2)t+Ο1βΟ2)βeβi((Ο1βΟ2)t+Ο1βΟ2)+eβi((Ο1+Ο2t)+Ο1+Ο2))=12(cos((Ο1βΟ2)t+Ο1βΟ2)βcos((Ο1+Ο2)t+Ο1+Ο2)Also doing the same to the sine-cosine multiplication:
f1(t)=sin(Ο1t+Ο1)f2(t)=cos(Ο2t+Ο2)yields
f1(t)βf2(t)=sin(Ο1t+Ο1)βcos(Ο2t+Ο2)=14i(eiΟ1t+iΟ1βeβiΟ1tβiΟ1)(eiΟ2t+iΟ2+eβiΟ2tβiΟ2)=14i(ei((Ο1+Ο2)t+Ο1+Ο2+ei((Ο1βΟ2)t+Ο1βΟ2)βeβi((Ο1βΟ2)t+Ο1βΟ2)βeβi((Ο1+Ο2)t+Ο1+Ο2))=12(sin((Ο1+Ο2)t+Ο1+Ο2)+sin((Ο1βΟ2)t+Ο1βΟ2))In the optimal case signals are multiplied. This can be done using dual gate transistors or MosFETs as well as circuits such as Gilbert cells. Gilbert cells operate balanced - their output amplitude is a precise algebraic product of itβs two input signals. This is whatβs found in most scientific equipment. In many cases - such as radio receivers and telecommunication equipment - one can use much simpler mixing systems based on any nonlinear device like a simple diode or a transistor - often itβs even sufficient to just modulate using a rectangular wave. Itβs also possible to use simple OpAmp circuits based on diodes to multiply signals.
So first letβs look at heterodynes. The name heterodyne refers to two intermediate frequencies arising when multiplying an input signal - in the first case of an heterodyne receiver itβs assumed to be the received signal fRF - with a local oscillator fLO. Usually one uses an antenna, input bandpass filter that is usually also tuned and an pre-amplifier at high RF frequencies in front of the mixer that then performs the downconversion:
The input signal fRF=sin(ΟRFβt) is simply multiplied by the local oscillator (LO) signal fLO=sin(ΟLOβt). The two intermediate signals cos((ΟRFβΟLO)t) and cos((ΟRF+ΟLO)t) - which are called the heterodynes are then passed through a bandpass filter. This filter is usually designed to reject one of the two heterodynes so only one passes at the intermediate frequency ΟRF+ΟLO or ΟRFβΟLO
This technique is used very often in todayβs telecommunication systems. For example satellite TV operates at frequencies up to around 10GHz. Those are not directly processable by demodulators or direct analog to digital converters. Thus itβs first reduced directly at the antenna at the low noise block downconverter (LNB) to an intermediate frequency band. The intermediate frequency usually is in the range of 1.1GHz to 2GHz. Thus local oscillator frequencies in the ranges of 9.75GHz (Astra 1KR) or 10.60GHz (Astra 2A and Astra 2B) are used. For C band setups an LO of 5.150GHz is used. Depending on the mode for Ku bands the signal of fRFβfLO or for C bands the fLOβfRF heterodyne is selected by the filters afterwards. The downconverted signals are then transmitted through standard 75Ξ© coax cable (which is simply not possible with signals in the 10GHz range) to the receivers which then perform the remaining downconversion - usually again using a superheterodyne or homodyne - and demodulation stages.
The same process can be used for upconversion - in this case the intermediate signal is multiplied by the local oscillator. Then one does not use the fRFβfLO heterodyne but the fRF+fLO one. Again a bandpass filter is used after the mixer to reject one of the heterodynes.
Note that one also has to take care of leakage when designing such receivers - the LO leakage is one of the common interference sources when running such systems without proper termination - either on the LNB side or on the receiver side.
So what is the superheterodyne? This is a way to build the receiver for a fixed demodulation (intermediate) frequency while still supporting different RF frequencies. This is pretty simple and similar to the above setup. The only difference being a tuneable local oscillator and in addition usually tuneable input bandpass filter. This allows one to sweep different frequencies that are mapped to a single intermediate frequency thatβs then decoded by a demodulator after passing through a fixed frequency bandpass filter.
The next type of receiver or converter is a homodyne. The main difference to a heterodyne is that the local oscillator is set to the same frequency as the carrier frequency of the original signal and then uses the output of the mixer directly instead of having to apply additional demodulation. One could for example directly upconvert the amplitudes recorded by an microphone - and transmit them directly via an antenna. On the receiver side one just had to multiply the received signal with the carrier frequency and can directly recover the amplitudes made hearable by a speaker. Such a setup is less used for most telecommunication systems or radio since this makes stuff like automatic gain control on the intermediate side much harder. When one uses an intermediate frequency one can just perform automatic control of the amplifiers gain till one receives always the same intermediate frequency amplitude which makes life on the receiver and demodulator side much easier.
Homodynes are often used in physics - for example each interferometer can be described just as an homodyne that detects the phase of the manipulated signal with an unmanipulated reference signal. The local oscillator is once transmitted to some device under test, a splitted part of the local oscillator is simply bypassing the testing area. Then afterwards both signals - the reference as well as the influenced one - are combined in an optical mixer. Homodynes are also often used in nuclear magnetic resonance equipment, time domain thermal reflectance systems and as of today even in telecommunication equipment in the lower frequency range such as cellphones or SDR systems.
Usage of a homodyne in telecommunication is also often called direct conversion since no more demodulation is needed after the mixing step (or itβs only done on the digital side of the device - such as in an digital signal processor or an FPGA)
One term one often hears when using downconversion systems - especially homodynes or direct conversion systems where one is directly converting the voltages using analog to digital converters (ADCs) - is the notion of so called I/Q samples. Those are often not understand by beginners though being a pretty simple concept. The main problem when using a setup directly as described above would be that:
To counter that one usually does not multiply once with the local oscillator but in parallel with a 90 degree shifted local oscillator. Due to relation of sine and cosine one can also imagine that:
fLO,1=sin(ΟLOt+ΟLO)fLO,2=sin(ΟLOt+ΟLO+Ο2)=cos(ΟLOt+ΟLO)Thus one multiplies once with the sine and once with the cosine to obtain the I and Q samples - which also gives the reason for the naming of the in phase (I) and quadrature (Q) samples. The remaining downstream setup for both channels should be the same (filters, analog to digital conversion, etc.). This allows to extract phase information as well as the real amplitude of the signal independent of the phase relation between the oscillators as will be later shown.
After having received the I(t) and Q(t) signal one can simply recover the amplitude and phase at a given time:
R(t)=βI2(t)+Q2(t)Ο=arctanQ(t)I(t)So why that much of writing about Heterodynes and Homodynes in the same context as lock-in amplifiers that are usually described as phase sensitive detectors? Because they are simple homodynes:
In contrast to a normal homodyne the output of a lock-in amplifier is usually assumed to be a DC voltage. They usually add a low pass filter as well as an integrator circuit after the downconversion - that way they add phase sensitive detection:
fin=sin(Οint+Οin)flo=sin(Οreft+Οref)Now one assumes that the local oscillator frequency Οref is the same as the carrier frequency Οin:
Οin=Οreffinβflo=12(cos((ΟinβΟref)tβ0+ΟinβΟref)βcos((Οin+Οref)t+Οin+Οref))=12(cos(ΟinβΟref)βcos((Οin+Οrefβ2Οref)t+Οin+Οref))Applying a low pass filter that filters out the 2βΟref signal (ideally it would only pass DC) yields:
X(t)=12cos(ΟinβΟrefβΞΟ)X(t)=12cos(ΞΟ)In addition one again uses a 90 degree shifted second local oscillator:
Y(t)=12cos(ΞΟβΟ2)βY(t)=12sin(ΞΟ)Now one usually recovers the amplitude and the phase of the detected signal:
R=βX2+Y2ΞΟ=arctanYXAnother possible way to use such a measurement system is to maximize the desired signal in one of the channels (I/Q) in case the desired signal and some parasitics are measured with different phases.
When using lock-in amplifiers in physics one often sees the approximate derivative of a signal. This is the case when scanning particle resonances, optical absorption curves (also when performing laser locking) or when measuring for nuclear magnetic or electron spin resonances. Why is this the case? The idea is pretty simple - one does not measure the resonance directly, one sees an approximation of the derivative in case the modulation is happening along the same axis as the scanned quantity (for example for electron spin resonance or nuclear magnetic resonance while scanning the magnetic fields or excitation frequencies while adding an offset modulation field or modulation frequency respectively) or for example when modulating the current of a laser diode while also scanning itβs current. When one looks at the following graph the x axis is the scanned quantity (magnetic field, current, collision energy, etc.). The point between E1 and E2 is the currently selected scanning position, the modulation of along the same quantity oscillates between E1 and E2 - in this case assumed to be a sine wave. So one moves between the two points on the resonance curve (usually a Lorentzian in optics, particle physics or NMR/EPR or a Gaussian model like in this graph). This leads to a modulation of the measured intensity one sees on the y axis.
When one looks closely the intensity oscillates along ΞI=I(E2)βI(E1) while the scanned energy or field oscillates along ΞE=E2βE1. The lock-in amplifier only sees modulated intensity components and thus only sees ΞI after the downconversion to DC, filtering and integration. Thus it basically sees ΞIΞE. This already reminds one of the definition of a derivative:
βfβx=limΞxβ0f(x+Ξx)βf(x)ΞxIn this case one can see the approximation of the derivative of the signal with respect to the modulated quantity:
βI(E)βE=limE2βE1I(E2)βI(E1)E2βE1Thus the received intensity seen by the homodyne approximates the derivative when the difference in modulation is small with respect to the observed structure (for example modulating only a few Hz to kHz when measuring a MHz wide peak).
This article is tagged: Physics, Tutorial, Basics, How stuff works, Electronics, Measurement
Dipl.-Ing. Thomas Spielauer, Wien (webcomplains389t48957@tspi.at)
This webpage is also available via TOR at http://rh6v563nt2dnxd5h2vhhqkudmyvjaevgiv77c62xflas52d5omtkxuid.onion/