Use Your Lock-in Amplifier as a Tunable Low-Pass Filter To Measure DC Signals
Lock-in amplifiers are instruments normally employed to measure periodic signals at a certain reference frequency, spanning from a few Hz or lower to a few GHz. In a nutshell, in a lock-in amplifier, the signal of interest is mixed (effectively multiplied) with the reference signal (internally generated or externally provided), and the result of this mixing is then run through a low-pass filter.
In the frequency domain, the overall transfer function of a lock-in amplifier can then be thought of as the one of a band-pass filter with arbitrarily selectable center frequency – the reference frequency - and bandwidth – the low-pass filter bandwidth.
Modern digital instruments (such as Zurich Instruments') perform all the mixing and filtering operations in the numerical domain with Digital Signal Processing (DSP) techniques. Among others, this comes with the huge advantage of being able to perform simultaneously different types of analysis on the same signal, without paying penalties in terms of signal-to-noise ratio (SNR) due to signal splitting, crosstalk, drifts, and other common analog domain drawbacks.
This means that many different “instruments” can be deployed in a single physical device: lock-in amplifier, boxcar averager, oscilloscope, spectrum analyzer, and others. Next to all these advanced tools normally used for the characterization and measurement of periodic AC signals, another feature of Zurich Instruments’ lock-in amplifiers which is sometimes overlooked is the ability to perform precise measurements of DC signals as well.
In fact, in certain applications like transport measurements and impedance analysis, the measurement of a DC voltage (or current) signal, on top of the AC component or standalone, is as of interest as the AC component. Conveniently, again owing to their digital nature, Zurich Instruments Lock-in Amplifiers can be set to precisely measure both contributions simultaneously, taking advantage of the 0 Hz frequency demodulation.
As a matter of fact, performing signal demodulation at 0 Hz can be thought of as using the lock-in amplifier as a tunable digital low-pass filter, effectively skipping the mixing stage. Given that many elements of the following analysis are reworked from our white paper Principles of Lock-in Detection, the prior read of that paper is highly recommended. There, a thorough discussion and rigorous mathematical treatment of the lock-in amplifier measurement’s foundations are laid out.
To begin with, we will look at the simple mathematics behind the procedure, before demonstrating how to easily implement these steps in the LabOne user interface.
Mathematical Background: X and Y Components at 0 Hz Frequency Demodulation.
The best way to interpret the principle of 0 Hz demodulation is by looking at the demodulation steps in the time domain. Let’s assume an input signal of the form:
\[s(t) = A \sin(\omega_s t + \theta) + s_0\]
with \(\omega_s\) the angular frequency of the signal (\(\omega_s = 2\pi f_s\) where \(f_s\) is the ordinary frequency in Hz), \(\theta\) a constant phase shift, and \(s_0\) a constant DC amplitude.
The reference signal used in the mixing stage can be expressed as (valid for all frequencies, including 0 Hz):
On the X branch: \(\sqrt{2} \sin(\omega_r t + \phi)\)
On the Y branch: \(\sqrt{2} \cos(\omega_r t + \phi)\)
Where \(\omega_r\) represents the angular frequency and \(\phi\) the adjustable phase factor of the reference signal. Now, we enforce the 0 Hz frequency condition by setting \(\omega_r = 0\). The reference signal will then become:
On the X branch: \(\sqrt{2} \sin(\phi)\)
On the Y branch: \(\sqrt{2} \cos(\phi)\)
In the general case, the signals on the X and Y branches after the mixing with the reference at 0 Hz are:
On the X branch: \(\sqrt{2} \sin(\phi) A \sin(\omega_s t + \theta) + s_0 \sqrt{2} \sin(\phi)\)
On the Y branch: \(\sqrt{2} \cos(\phi) A \sin(\omega_s t + \theta) + s_0 \sqrt{2} \cos(\phi)\)
If the demodulation phase \(\phi\) is set equal to \(0^\circ\), \(\sin(0) = 0\) and \(\cos(0) = 1\) resulting in:
On the X branch: \(0\)
On the Y branch: \(\sqrt{2} A \sin(\omega_s t + \theta) + s_0 \sqrt{2}\)
That is, the signal on the Y branch is the same as the input signal but scaled by \(\sqrt{2}\) factor. If we now set the demodulation phase \(\phi\) to \(45^\circ\), both \(\sin(45^\circ) = \frac{1}{\sqrt{2}}\) and \(\cos(45^\circ) = \frac{1}{\sqrt{2}}\). The resulting signals will be:
On X branch: \(A \sin(\omega_s t + \theta) + s_0\)
On Y branch: \(A \sin(\omega_s t + \theta) + s_0\)
One can indeed see that both resulting signals on the X and Y branches after the mixing stage correspond exactly to the input signal when the demodulation phase \(\phi\) is set to 45° and the demodulation frequency \(\omega_r = 0\).
At this point, the signals on the X and Y branches undergo the low-pass filtering stage. Here, the bandwidth of the measurement (or, equivalently, the averaging time) is defined by tuning the low-pass filter settings. As explained in great detail in the white paper, large measurement bandwidths (or short time constants) allow more frequency components to pass through the filter, resulting in faster but noisier measurements, while narrow measurement bandwidths (or long time constants) provide better noise rejection at the expense of the measurement speed due to the longer settling times.
The optimization of the measurement bandwidth is extremely dependent on the specific experimental conditions and applications. Especially for the measurement of DC components on top of AC signals, an essential condition to satisfy is that the low-pass filter bandwidth \(f_{BW}\) must be much smaller than the frequency of the signal \(f_s\).
Another important detail to note is that, in the mathematical steps above, no assumption is made on the signal type. This means that not only voltage signals (voltage inputs are present in all our lock-in amplifiers' portfolios) but also current signals (as the MFLI Lock-in Amplifier, MFIA Impedance Analyzer and HF2TA current inputs for the HF2LI Lock-in Amplifier) can benefit from the principle of 0 Hz demodulation.
LabOne Implementation of 0 Hz Demodulation
LabOne® is the proprietary software from Zurich Instruments used to control all our devices. If the aim is to measure the AC and DC components of your signal simultaneously, two distinct demodulators are needed to properly set up the measurement. For this exemplary experiment, we generate a voltage signal from the signal output of the instrument (UHFLI Lock-in Amplifier in this case, but the same applies to any other Zurich Instruments’ devices) and loop it back to the signal input. With the oscilloscope module, we can record a shot of the signal directly after digitization, showing the AC component of 200 mV at 10 MHz and a DC offset of 1.3 V, as presented in the bottom panel of Figure 1.
To extract the amplitude of the AC component, we perform a “classic” lock-in measurement at the signal frequency of 10 MHz with one demodulator (#1 in Figure 2). In this example, the reference signal for demodulator #1 is internally generated, but the same exact procedure also applies in case of an external reference - the only difference being that, in this case, an additional demodulator in ExtRef mode is needed to lock to the external frequency.
For the DC component, we use demodulator #5 with a demodulation frequency set to 0 Hz, phase at 45° and the low-pass filter bandwidth at 100 Hz, as highlighted in green in Figure 1. As specified in the previous section, the low-pass filter bandwidth condition for DC measurements is satisfied since 100 Hz << 10 MHz.
Importantly, the high-pass filter enabled by the AC toggle option on the signal input must be turned off. Otherwise, the DC component would be completely suppressed before reaching the demodulator.
With this demodulator’s configuration, we can now check the result of AC and DC measurements in the plotter tab, Figure 3. The top panel shows the measurement result from the demodulator #1. The plotted value is the amplitude \(R\) – i.e., \(R = \sqrt{X^2 + Y^2}\), whose average is around 140 mV. This amplitude corresponds to the root mean square (RMS) value of 200 mV, the amplitude of the AC component.
The bottom panel plots the quadrature component \(Y\) of the demodulator #5 with an average value of around 1.3 V, as the expected DC offset. It is worth mentioning that, as outlined in the previous section of this blog, plotting the in-phase \(X\) component would have led to the same result.
Of course, by choosing different values for the low-pass filter bandwidths of demodulators #1 and #5, one can optimize the measurement in terms of speed or noise rejection.
Another important advantage of measuring a DC component with this method is the possibility of having synchronous and aligned measurements from the different sources (e.g. the 2 different demodulators #1 and #5) even if the timestamps of the individual data points are not aligned, for example, because of the demodulator’s different data transfer rates. This is when the Data Acquisition (DAQ) module of LabOne comes into play.
Thanks to the DAQ module, resampling and alignment of data on a common and equidistant temporal grid becomes a straightforward task, sparing the user a lot of post-processing overheads. For more information about the DAQ module and its capabilities, I recommend this blog post, as well as this other one.
Needless to say, the procedure described above can be easily implemented with all Zurich Instruments Lock-in Amplifiers and on all supported LabOne APIs: Python, MATLAB, LabVIEW, C and .NET.
Conclusion
In summary, in this blog post, we have delved into the principles of 0 Hz demodulations, both looking at its mathematical foundations and its practical implementation with Zurich Instruments' Lock-in Amplifier on the LabOne user interface. It provides a simple and effective way to use the lock-in amplifier as a tunable low-pass filter to measure DC or slowly varying components.
Acknowledgments
I would like to heartily thank my colleague Mehdi Alem for his help in writing this blog, especially his guidance with the mathematical background.


