Signal Processing Basics
This chapter provides insights about several lockin amplifier principles not necessarily linked to a specific instrument from Zurich Instruments. Since the appearance of the first valvebased lockin amplifiers in the 1930s the physics have not changed, but the implementation and the performance have evolved greatly. Many good lockin amplifier primers have appeared in the past decades, and some of them appear outdated now because they were written with analog instruments in mind. This section does not aim to replace any existing primer, but to complete them with a preferred emphasis on digital lockin amplifiers. The first subsection describes the principles of lockin amplification, followed by the description of the function of discretetime filters. After, we discuss the definition of the full range sensitivity, a specification parameter particularly important for analog lockin amplifiers but with somewhat reduced importance for digital instruments. In the following, we describe the function and use of sinc filtering in particular for lowfrequency lockin measurements. The last section is dedicated to the zoom FFT feature. Innovative in the context of lockin amplifiers, zoom FFT offers a fast and highresolution spectral analysis around the lockin operation frequency.
Principles of Lockin Detection
Lockin demodulation is a technique to measure the amplitude \(A_s\) and the phase \(\theta\) of a periodic signal with the frequency \(\omega_s = 2\pi f_s\) by comparing the signal to a reference signal. This technique is also called phasesensitive detection. By averaging over time the signaltonoise ratio (SNR) of a signal can be increased by orders of magnitude, allowing very small signals to be detected with a high accuracy making the lockin amplifier a tool often used for signal recovery. For both signal recovery and phasesensitive detection, the signal of interest is isolated with narrow bandpass filtering therefore reducing the impact of noise in the measured signal.
Figure 1 shows a basic measurement setup: a reference \(V_r\) signal is fed to the device under test. This reference signal is modified by the generally nonlinear device with attenuation, amplification, phase shifting, and distortion, resulting in a signal \(V_s = A_s cos(\omega_s t + \theta_s)\) plus harmonic components.
For practical reasons, most lockin amplifiers implement the bandpass filter with a mixer and a lowpass filter (depicted in Figure 2): the mixer shifts the signal of interest into the baseband, ideally to DC, and the lowpass filter cuts all unwanted higher frequencies.
The input signal \(V_s(t)\) is multiplied by the reference signal \(V_r(t) = \sqrt{2}e^{i\omega_r t}\) , where \(\omega_r = 2\pi f_r\) is the demodulation frequency and i is the imaginary unit. This is the complex representation of a sine and cosine signal (phase shift 90°) forming the components of a quadrature demodulator, capable of measuring both the amplitude and the phase of the signal of interest. In principle it is possible to multiply the signal of interest with any frequency, resulting in a heterodyne operation. However the objective of the lockin amplifier is to shift the signal as close as possible to DC, therefore the frequency of the reference and the signal is chosen similar. In literature this is called homodyne detection, synchrodyne detection, or zeroIF direct conversion.
The result of the multiplication is the signal
It consists of a slow component with frequency \(\omega_s  \omega_r\) and a fast component with frequency \(\omega_s + \omega_r\).
The demodulated signal is then lowpass filtered with an infinite impulse response (IIR) RC filter, indicated by the symbol \(\langle \cdot \rangle\). The frequency response of the filter \(F(\omega)\) will let pass the low frequencies \(F(\omega_s  \omega_r)\) while considerably attenuating the higher frequencies \(F(\omega_s + \omega_r)\). Another way to consider the lowpass filter is an averager.
The result after the lowpass filter is the demodulated signal \(X+iY\), where X is the real and Y is the imaginary part of a signal depicted on the complex plane. These components are also called inphase and quadrature components. The transformation of X and Y into the amplitude R and phase \(\theta\) information of \(V_s(t)\) can be performed with trigonometric operations.
It is interesting to note that the value of the measured signal corresponds to the RMS value of the signal, which is equivalent to \(R = A_s/\sqrt{2}\).
Most lockin amplifiers output the values (X,Y) and (R, \(\theta\) ) encoded in a range of –10 V to +10 V of the auxiliary output signals.
Lockin Amplifier Applications
Lockin amplifiers are employed in a large variety of applications. In some cases the objective is measuring a signal with good signaltonoise ratio, and then that signal could be measured even with large filter settings. In this context the word phase sensitive detection is appropriate. In other applications, the signal is very weak and overwhelmed by noise, which forces to measure with very narrow filters. In this context the lockin amplifier is employed for signal recovery. Also, in another context, a signal modulated on a very high frequency (GHz or THz) that cannot be measured with standard approaches, is mixed to a lower frequency that fits into the measurement band of the lockin amplifier.
One example for measuring a small, stationary or slowly varying signal which is completely buried in the 1/f noise, the power line noise, and slow drifts. For this purpose a weak signal is modulated to a higher frequency, away from these sources of noise. Such signal can be efficiently mixed back and measured in the baseband using a lockin amplifier. In Figure 3 this process is depicted. Many optical applications perform the upmixing with a chopper, an electrooptical modulator, or an acoustooptical modulator. The advantage of this procedure is that the desired signal is measured in a spectral region with comparatively little noise. This is more efficient than just lowpass filtering the DC signal.
Signal Bandwidth
The signal bandwidth (BW) theoretically corresponds to the highest frequency components of interest in a signal. In practical signals, the bandwidth is usually quantified by the cutoff frequency. It is the frequency at which the transfer function of a system shows 3 dB attenuation relative to DC (BW = f_{cutoff} = f_{3dB}); that is, the signal power at f_{3dB} is half the power at DC. The bandwidth, equivalent to cutoff frequency, is used in the context of dynamic behavior of a signals or separation of different signals. This is for instance the case for fastchanging amplitudes or phase values like in a PLL or in imaging applications, or when signals closely spaced in frequency need to be separated.
The noise equivalent power bandwidth (NEPBW) is also a useful figure, and it is distinct from the signal bandwidth. This unit is typically used for noise measurements: in this case one is interested in the total amount of power that passes through a lowpass filter, equivalent to the area under the solid curve in Figure 4. For practical reasons, one defines an ideal brickwall filter that lets pass the same amount of power under the assumption that the noise has a flat (white) spectral density. This brickwall filter has transmission 1 from DC to f_{NEPBW}. The orange and blue areas in Figure 4 then are exactly equal in a linear scale.
It is possible to establish a simple relation between the f_{cutoff} and the f_{NEPBW} that only depends on the slope (or rolloff) of the filter. As the filter slope actually depends on the time constant (TC) defined for the filter, it is possible to establish the relation also to the time constant. It is intuitive to understand that for higher filter orders, the f_{cutoff} is closer to the f_{NEPBW} than for smaller orders.
The time constant is a parameter used to interpret the filter response in the time domain, and relates to the time it takes to reach a defined percentage of the final value. The time constant of a lowpass filter relates to the bandwidth according to the formula
where FO is said factor that depends on the filter slope. This factor, along with other useful conversion factors between different filter parameters, can be read from the following table.
filter order  filter rolloff  FO  f_{cutoff}  f_{NEPBW}  f_{NEPBW} / f_{cutoff} 

1^{st} 
6 dB/oct 
1.0000 
0.1592 / TC 
0.2500 / TC 
1.5708 
2^{nd} 
12 dB/oct 
0.6436 
0.1024 / TC 
0.1250 / TC 
1.2203 
3^{rd} 
18 dB/oct 
0.5098 
0.0811 / TC 
0.0937 / TC 
1.1554 
4^{th} 
24 dB/oct 
0.4350 
0.0692 / TC 
0.0781 / TC 
1.1285 
5^{th} 
30 dB/oct 
0.3856 
0.0614 / TC 
0.0684 / TC 
1.1138 
6^{th} 
36 dB/oct 
0.3499 
0.0557 / TC 
0.0615 / TC 
1.1046 
7^{th} 
42 dB/oct 
0.3226 
0.0513 / TC 
0.0564 / TC 
1.0983 
8^{th} 
48 dB/oct 
0.3008 
0.0479 / TC 
0.0524 / TC 
1.0937 
DiscreteTime Filters
DiscreteTime RC Filter
There are many options how to implement digital lowpass filters. One common filter type is the exponential running average filter. Its characteristics are very close to those of an analog resistorcapacitor RC filter, which is why this filter is sometimes called a discretetime RC filter. The exponential running average filter has the time constant \(TC = \tau_N\) as its only adjustable parameter. It operates on an input signal \(X_{in}\lbrack n, \rbrack\) defined at discrete times \(n T_s , (n+1)T_s , (n+2)T_s\), etc., spaced at the sampling time \(T_s\) . Its output \(X_{out}\lbrack n,T_s\rbrack\) can be calculated using the following recursive formula,
The response of that filter in the frequency domain is well approximated by the formula
The exponential filter is a firstorder filter. Higherorder filters can easily be implemented by cascading several filters. For instance the 4^{th} order filter is implemented by chaining 4 filters with the same time constant \(TC = \tau_n\) one after the other so that the output of one filter stage is the input of the next one. The transfer function of such a cascaded filter is simply the product of the transfer functions of the individual filter stages. For an nth order filter, we therefore have
The attenuation and phase shift of the filters can be obtained from this formula. Namely, the filter attenuation is given by the absolute value squared \(H_n(\omega)^2\). The filter transmission phase is given by the complex argument \(arg\lbrack H_n(\omega)\rbrack\).
Filter Settling Time
The lowpass filters after the demodulator cause a delay to measured signals depending on the filter order and time constant \(TC = \tau_n\). After a change in the signal, it will therefore take some time before the lockin output reaches the correct measurement value. This is depicted in Figure 5 where the response of cascaded filters to a step input signal this is shown.
More quantitative information on the settling time can be obtained from Table 2. In this table, you find settling times in units of the filter time constant \(\tau_n\) for all filter orders available with the MFLI Lockin Amplifier. The values tell the time you need to wait for the filtered demodulator signal to reach 5%, 95% and 99% of the final value. This can help in making a quantitatively correct choice of filter parameters for example in a measurement involving a parameter sweep.
filter order  Setting time to  

1^{st} 
0.025 · TC 
3.0 · TC 
4.6 · TC 
2^{nd} 
0.36 · TC 
4.7 · TC 
6.6 · TC 
3^{rd} 
0.82 · TC 
6.3 · TC 
8.4 · TC 
4^{th} 
1.4 · TC 
7.8 · TC 
10 · TC 
5^{th} 
2.0 · TC 
9.2 · TC 
12 · TC 
6^{th} 
2.6 · TC 
11 · TC 
12 · TC 
7^{th} 
3.3 · TC 
12 · TC 
15 · TC 
8^{th} 
4.0 · TC 
13 · TC 
16 · TC 
Full Range Sensitivity
The sensitivity of the lockin amplifier is the RMS value of an input sine that is demodulated and results in a full scale analog output. Traditionally the X, Y, or R components are mapped onto the 10 V full scale analog output. In such a case, the overall gain from input to output of the lockin amplifier is composed of the input and output amplifier stages. Many lockin amplifiers specify a sensitivity between 1 nV and 1 V. In other words the instrument permits an input signal between 1 nV and 1 V to be amplified to the 10 V full range output.
In analog lockin amplifiers the sensitivity is simple to understand. It is the sum of the analog amplification stages between in the input and the output of the instrument: in particular the input amplifier and the output amplifier.
In digital lockin amplifiers the sensitivity less straightforward to understand. Analogtodigital converters (ADC) operate with a fixed input range (e.g. 1 V) and thus require a variablegain amplifier to amplify the input signal to the range given by the ADC. This variablegain amplifier must be in the analog domain and its capability determines the minimum input range of the instrument. A practical analog input amplifier provides a factor 1000 amplification, thus 1 V divided by 1000 is the minimum input range of the instrument.
The input range is the maximum signal amplitude that is permitted for a given range setting. The signal is internally amplified with the suited factor, e.g. (1 mV)·1000 to result in a full swing signal at the ADC. For signals larger than the range, the ADC saturates and the signal is distorted – the measurement result becomes useless. Thus the signal should never exceed the range setting.
But the input range is not the same as the sensitivity. In digital lockin amplifiers the sensitivity is only determined by the output amplifier, which is an entirely digital signal processing unit which performs a numerical multiplication of the demodulator output with the scaling factor. The digital output of this unit is then fed to the output digitaltoanalog converter (DAC) with a fixed range of 10 V. It is this scaling factor that can be retrofitted to specify a sensitivity as known from the analog lockin amplifiers. A large scaling factor, and thus a high sensitivity, comes at a relatively small expense for digital amplification.
One interesting aspect of digital lockin amplifiers is the connection between input resolution and sensitivity. As the ADC operates with a finite resolution, for instance 14 bits, the minimum signal that can be detected and digitized is for instance 1 mV divided by the resolution of the ADC. With 14 bits the minimum level that can be digitized would be 122 nV. How is it possible to reach 1 nV sensitivity without using a 21 bit analogtodigital converter? In a world without noise it is not possible. Inversely, thanks to noise and current digital technology it is possible to achieve a sensitivity even below 1 nV.
Most sources of broadband noise, including the input amplifier, can be considered as Gaussian noise sources. Gaussian noise is equally distributed in a signal, and thus generates equally distributed disturbances. The noise itself can be filtered by the lockin amplifier down to a level where it does not impact the measurement. Still, in the interplay with the signal, the noise does have an effect on the measurement. The input of the ADC is the sum of the noise and the signal amplitude. Every now and then, the signal amplitude on top of the large noise will be able to toggle the least significant bits even for very small signals, as low as 1 nV and below. The resulting digital signal has a component at the signal frequency and can be detected by the lockin amplifier.
There is a similar example from biology. Rod cells in the human eye permit humans to see in very low light conditions. The sensitivity of rod cells in the human eye is as low as a single photon. This sensitivity is achieved in low light conditions by a sort of precharging of the cell to be sensitive to the single photon that triggers the cell to fire an impulse. In a condition with more surround light, rod cells are less sensitive and need more photons to fire.
To summarize, in digital lockin amplifiers the full range sensitivity is only determined by the scaling factor capability of the digital output amplifier. As the scaling can be arbitrary big, 1 nV minimum full range sensitivity is achievable without a problem. Further, digital lockin amplifiers exploit the input noise to heavily increase the sensitivity without impacting the accuracy of the measurement.
Sinc Filtering
As explained in Principles of Lockin Detection, the demodulated signal in an ideal lockin amplifier has a signal component at DC and a spurious component at twice the demodulation frequency. The components at twice the demodulation frequency (called the 2ω component) is effectively removed by regular lowpass filtering. By selecting filters with small bandwidth and faster rolloffs, the 2ω component can easily be attenuated by 100 dB or more. The problem arises at low demodulation frequencies, because this forces the user to select long integration times (e.g. >60 ms for a demodulation frequency of 20 Hz) in order to achieve the same level of 2ω attenuation.
In practice, the lockin amplifier will modulate DC offsets and nonlinearities at the signal input with the demodulation frequency, resulting in a signal at the demodulation frequency (called ω component). This component is also effectively removed by the regular lowpass filters at frequencies higher than 1 kHz.
At low demodulation frequencies, and especially for applications with demodulation frequencies close to the filter bandwidth, the ω and 2ω components can affect the measurement result. Sinc filtering allows for strong attenuation of the ω and 2ω components. Technically the sinc filter is a comb filter with notches at integer multiples of the demodulation frequency (ω, 2ω, 3ω, etc.). It removes the ω component with a suppression factor of around 80 dB. The amount of 2ω component that gets removed depends on the input signal. It can vary from entirely (e.g. 80 dB) to slightly (e.g. 5 dB). This variation is not due to the sinc filter performance but depends on the bandwidth of the input signal.
Input signal  Demodulation result before lowpass filter  Result 

Signal at ω 
DC component 
Amplitude and phase information (wanted signal) 
2ω component 
Unwanted component (can additionally be attenuated by sinc filter) 

DC offset 
ω component 
Unwanted component (can additionally be attenuated by sinc filter) 
We can observe the effect of the sinc filter by using the Spectrum Analyzer Tool of the MFLI Lockin Amplifier. As an example, consider a 30 Hz signal with an amplitude of 0.1 V that demodulated using a filter bandwidth of 100 Hz and a filter order 8. In addition 0.1 V offset is added to the signal so that we get a significant ω component.
Figure 8 shows a spectrum with the sinc filter disabled, whereas for Figure 9 the sinc filter is enabled. The comparison of the two clearly shows how the sinc options dampens both the ω and 2ω components by about 100 dB.
In order to put the notches of the digital filter to ω and 2ω, the sampling rate of the filter would have to be precisely adjusted to the signal frequency. As this is technically not feasible, the generated signal frequency is adjusted instead by a very small amount. 
Zoom FFT
The concept of zoom FFT allows the user to analyze the spectrum of the input signal around a particular frequency by zooming in on a narrow frequency portion of the spectrum. This is done by performing a Fourier transform of the demodulated inphase and quadrature (X and Y) components or more precisely, on the complex quantity X+iY, where i is the imaginary unit. In the LabOne user interface, this functionality is available in the Spectrum tab.
In normal FFT, the sampling rate determines the frequency span and the total acquisition time determines the frequency resolution. Having a large span and a fine resolution at the same time then requires long acquisition times at high sample rates. This means that a lot of data needs to be acquired, stored, and processed, only to retain a small portion of the spectrum and discard most of it in the end. In zoom FFT, the lockin demodulation is used to downshift the signal frequency, thereby allowing one to use both a much lower sampling rate and sample number to achieve the same frequency resolution. Typically, to achieve a 1 Hz frequency resolution at 1 MHz, FFT would require to collect and process approximately 10^{6} points, while zoom FFT only processes 10^{3} points. (Of course the high rate sampling is done by the lockin during the demodulation stage, so the zoom FFT still needs to implicitly rely on a fast ADC.)
In order to illustrate why this is so and what benefits this measurement tool brings to the user, it is useful to remind that at the end of the demodulation of the input signal \(V_s(t)=A_s cod(\omega_s t+\tau)\), the output signal is \(X+iY=F(\omega_s\omega_r)(A_s/\sqrt{2})e^{i\lbrack (\omega_s\omega_r)t 1\tau\rbrack}\) where F(ω) is the frequency response of the filters.
Since the demodulated signal has only one component at frequency ω_{s}–ω_{r}, its power spectrum (Fourier transform modulus squared) has a peak of height \((A_s^2/2)\cdotF(\omega_r\omega_s^2)\) at ω_{s}–ω_{r}: this tells us the spectral power distribution of the input signal at frequencies close to ω_{r} within the demodulation bandwidth set by the filters F(ω).
Note that:

the ability of distinguish between positive and negative frequencies works only if the Fourier transform is done on X+iY. Had we taken X for instance, the positive and negative frequencies of its power spectrum would be equal. The symmetry relation G(–ω)=G*(ω) holds for the Fourier transform G(ω) of a real function g(t) and two identical peaks would appear at ±ω_{s}–ω_{r}.

one can extract the amplitude of the input signal by diving the power spectrum by F(ω)^{2}, the operation being limited by the numerical precision. This is implemented in LabOne and is activated by the Filter Compensation button: with the Filter Compensation enabled, the background noise appears white; without it, the effect of the filter rolloff becomes apparent.
The case of an input signal containing a single frequency component can be generalized to the case of multiple frequencies. In that case the power spectrum would display all the frequency components weighted by the filter transfer function, or normalized if the Filter Compensation is enabled.
When dealing with discretetime signal processing, one has to be careful about aliasing which occurs when the signal frequencies higher than the sampling rate ω are not sufficiently suppressed. Remember that ω is the user settable readout rate, not the 60 MSa/s sampling rate of the MFLI input. Since the discretetime Fourier transform extends between –ω/2 and +ω/2, the user has to make sure that at ±ω/2 the filters provide the desired attenuation: this can be done either by increasing the sampling rate or resolving to measure a smaller frequency spectrum (i.e. with a smaller filter bandwidth).
Similarly to the continuous case, in which the acquisition time determines the maximum frequency resolution (\(2 \pi/T\) if T is the acquisition time), the resolution of the zoom FFT can be increased by increasing the number of recorded data points. If N data points are collected at a sampling rate ω, the discrete Fourier transform has a frequency resolution of ω/N.