INTRODUCTION
A lockin amplifier is a widespread detection system, used to extract the amplitude and the phase (R, θ) of a periodic signal even in presence of an intense background noise. Since its invention in the 1930s, the lockin amplifier has become an indispensable tool in the fields of experimental and applied science and engineering.
A schematic description of a lockin system is shown below. The operator whishes to detect and measure a noisy input signal V_{s}(t) with a carrier frequency ν_{s}, using a reference signal V_{r}(t). By processing the input with a system of frequency mixers and lowpass (LP) filters, the amplifier rejects all the noise and retrieves the amplitude and phase of the desired signal.
An example of a reallife V_{s}(t) is the following. If the light output of a laser, switched on and off by a periodic gate signal, is conveyed to a dedicated sensor, the latter produces a proportional voltage which is sent to a lockin amplifier as input. In technical jargon, the laser is the DUT (device under test) in such a scenario.
The fundamental idea of the lockin technique is the orthogonality of sines and cosines oscillating at different frequencies. By exploiting this principle, the noise contributions are effectively removed from the signal’s spectrum. This amplifier performs two core operations:

 Downmixing
the input is multiplied by the reference signal which is either provided by an internal oscillator (homodyne detection) or by an external source (heterodyne detection).

 Demodulation
the resulting signal is filtered in an appropriate frequency bandwidth to exclude all noise and identify the carrier wave’s inphase and quadrature components (X,Y). These are finally converted in polar coordinates as (R, θ).
DOWNMIXING
The signal V_{s}(t) coming from the DUT is transmitted to the input channel of the amplifier. Let us assume it is a monochromatic wave with frequency ν_{s} and phase θ:
The reference V_{r}(t) signal can be chosen in different ways. Ideally a pure sine with a modulation frequency ν_{m} gives the highest selectivity, since it will discard all input components with ν≠ν_{m}. A common choice in real experiments is to exploit a periodic square wave from a function generator. As explained here, a square wave is the superposition of a fundamental sine and all its odd harmonics, therefore a lockin using such a reference will detect the main frequency plus its odd multiples, introducing a systematic error in the measurement. For simplicity, let us consider a monochromatic reference
The lockin splits the input signal V_{s}(t) in two channels, each connected to a frequency mixer where the reference signal is multiplied by each input copy. After the mixer M1, the resulting complex signal contains information about the inphase component (X) of the signal:
Instead the mixer M2 operates with the signal and a 90°phase shifted reference, to retrieve information on the quadrature component of the signal (Y):
In both cases, the reference signal is tuned properly in order to fulfill the matching condition:
so that the highspeed part of W(t) (rotating with frequency ν_{s}+ν_{m}) can be neglected. Therefore the downmixing consists in subtracting the reference frequency from the signal one, resulting in a final ν as close as possible to 0, i.e. a new DC value.
DEMODULATION
Once the downmixing is accomplished on both M1 and M2, hopefully with low signal loss and little channel mismatch, LP filters are used to extract the information shifted around 0 Hz.
If the frequency matching condition is not respected, then averaging (or integrating) over a time scale of few periods would give a zero value. This means that all possible noise contribution to the spectrum of the input signal will be discarded, leaving untouched the resonating wave only. This is why lockin amplification is an example of synchronous detection.
Lowpass filtering of W(t) can be expressed as such average operation:
As discussed above, the oscillation at frequency (ν_{m}+ν_{s}) gives no contribution, while the rotation with (ν_{m}ν_{s}) gives a nonzero average only for a perfect matching of the modulation and signal frequency. In this case, the result is
The inphase and quadrature components are related to this complex value by:
An appropriate conversion from cartesian coordinates to polar ones gives the amplitude R and phase θ of the filtered input signal:
The function atan2 is defined as shown here and returns an angle in [π, π]. These values are typically visible on the LED displays of the lockin amplifier and can also be handled to a computer for further processing.
LP filtering acts isolating the downmixed spectrum in a given bandwidth (BW) [ν_{BW},ν_{BW}]: a very narrow bandwidth improves the selectivity of the filter and suppresses the noise more efficiently. In the terms of Fourier analysis, this operation is described by the application of the filter’s transfer function H(ν) on the signal coming from the mixer:
The ideal transfer function works as a window, which just lets the spectral components in the bandwidth pass and cancels all the rest:
It is physically unfeasible to implement such a “brickwall filter”, so different technological solutions have been developed to mimic this H(ν). LP filters based on a resistor and a capacitor (RC) are one of the simplest method, commonly exploited in analog lockin amplifier. The picture shows a 1storder (onepole) RC filter.
The RC lowpass filter has the following transfer function:
The time constant sets the cutoff frequency at which the intensity is reduced by 50% (i.e., 3dB):
For ν<ν_{3dB}, the amplitude and the phase of the input signal undergo a very small change while passing through the filter. Instead, for higher frequencies (ν>ν_{3dB}), the filter provides an attenuation of 20dB/decade and a larger phase shift.
A steeper attenuation is obtained by creating a system of n RC filter in series, so that the attenuation increases as 20 × n dB/decade and the cutoff becomes smaller, improving the selectivity of the filter. The overall transfer function becomes:
which also produces a larger phase delay for higherorder filters. The following Bode plots show the amplitude and the phase shift associated to different lowpass RC filters with fixed 1/τ_{RC}= 100 Hz and of order n=1, 2, 3, 4.
The design of the LP module is a result of the tradeoff between stronger attenuation, smaller bandwidth and larger phase alteration, depending on the specific purpose of the instrument. A direct proportionality between the bandwidth ν_{BW} and the cutoff frequency ν_{3dB } exists, as defined by the particular filter architecture. However in our example of a monochromatic input V_{s}(t), the LP filter returns a demodulated signal extending in the spectral window [ν_{3dB},ν_{3dB}] :
Practical lockin measurement are also characterized by the settling time τ_{set} for the data acquisition, sometimes simply indicated as “time constant” on the front buttons of amplifier. It is defined as the time the lockin needs to reach a stationary response to a steplike change of the input (for example, switching from 0 to 1) and measure meaningful values of amplitude and phase. One common convention is based on the time at which the filter response reaches 90% of the input. A direct proportionality between τ_{set} and the RC time constant τ_{RC}∼ 1/(ν_{3dB}) exists, as defined by the implemented filter. For example:
 1storder LP RC filter: τ_{90%}= 2.3 τ_{RC}
 4thorder LP RC filter: τ_{90%}= 6.7 τ_{RC}
This indicates that the more the effective BW is reduced and the attenuation is increased by adding more cascaded RC filters, the longer it will take for the system to have a reliable measurement.
NOISE MANAGEMENT
As exposed above, the lockin technique is specifically designed to extract periodic signals in a noisy environment. Of course, the use of a narrow BW helps rejecting unwanted noise but it also induces longer acquisition time and therefore poor time resolution.
A variety of physical phenomena introduce noise in a measurement. Intrinsic types of noise are:
 thermal JohnsonNyquist noise: it has a flat spectrum and contributes to the socalled “white noise”
 flicker or “pink” noise: it is dominant at low frequency due to its 1/νdependance. It is often introduced by fluctuations in resistance or by vacuum tubes and semiconductors
 shot noise: it has a quantum origin, since it is due to the discrete nature of the charge carriers and may affect current measurement
Extrinsic noise may be asynchronous or instead be related to the reference signal.
 In the first case, we can think of electromagnetic interference from computers, WIFI, mobile or radio signals. Even mechanical vibrations (cooling and pumping systems, etc.) produce a temporal variation of the capacitance of the cables and alter the current flow, which is known as “microphone effect”.
 Synchronous noise may come from crosstalk between the experimental setup, the detector and the lockin amplifier, when the noise source happens to match the reference frequency ν_{m}. In this case, even a highly selective filter cannot help because the noise is resonant with the signal.
The presence of parasitic capacitance may create capacitive coupling between the setup and the lockin, while an AC current in the cables may inductively couple via a varying magnetic flux. Finally the presence of ground loops may alter the ground condition for the lockin, the detector and the other parts of the setup, which could be an issue for the measurement.
The extrinsic noise can be minimized by carefully designing the experiment and its electrical connection, while the intrinsic noise is harder to reduce. If possible, the reference frequency should be chosen in order to be in the part of the spectrum where white noise dominates, avoiding the pink noise at low frequency.
Noise can be studied by its power spectral density V_{N}(ν)^{2 }in V^{2}/Hz or its square root V_{N}(ν) in V/√Hz. The overall quality of the measurement is then expressed by the SignaltoNoise Ratio (SNR), i.e. the ratio between the useful signal power and the total noise power. Another characteristics is the Noise Equivalent Power (NEP) of the system, defined as the input signal power that results in a SNR of 1 in a 1 Hz output bandwidth. Essentially, the NEP gives the minimum detectable power per square root bandwidth for a detector, i.e. it indicates the weakest signal that can be detected.
Especially in noise measurement, the LP filter BW is often not specified in terms of ν_{3dB}, but using a quantity indicated as ν_{NEP. }This is the cutoff frequency of an ideal brickwall filter that transmits the same amount of flat noise as the filter we are setting. For cascaded RC filters, typically ν_{NEP }≥ ν_{3dB }.
By knowing the signal amplitude R, the desired SNR value, the noise spectral power density V_{N}(ν)^{2}, one can consequently compute the needed NEP cutoff with the following relation:
The corresponding filter BW and settling time can then be retrieved and set on the lockin system.
Another important figure of merit of a lockin is its dynamic reserve, which is is the ratio of the largest tolerable noise signal to the fullscale signal (expressed in dB), without causing any overload in any part of the instrument. Of course, this is a rather broad definition even because the overload risk can be reduced simply by setting a small gain at the input. Let’s consider a full scale of 3 μV and a dynamic reserve of 100 dB. Then a noise as large as 1e5* 3 μV=300 mV (100 dB larger than full scale) can be tolerated at the input without overload. An alternative definition of tolerable noise is: the noise level that does not affect the output more than a few percent of full scale, in a specific lockin.
As discussed above, the noise at the reference frequency cannot be uncoupled from the signal, so it undergoes no attenuation and the dynamic reserve at ν_{m} is 0 dB. Instead for not resonating frequencies, the dynamic reserve increase since the LP filters suppress the noise components other than the signal. Therefore the dynamic reserve is strongly related to the cutoff of the LP filter and its attenuation at rolloff.
This review of the principles at the core of the lockin amplifier ends here, even if there will be occasions to further discuss the advent of digital technology in such instrument. Of course, in a future post on this blog…
PNG, Latin modern, 12pt, 120, trasparente