## Introduction

The heart of a lock-in amplifier is a phase-sensitive detector which includes a signal mixer and a low-pass filter. In this post, we focus on the time response of the low-pass filters implemented in Zurich Instruments lock-in amplifiers including MFLI, HF2LI and UHFLI. The temporal response of a filter contains its impulse and step responses; the former is the response of the filter to a Dirac delta function  as an input and the latter is the filter response to the Heaviside step function . First, the mathematical response of a low-pass filter of order $$n$$ used in Zurich Instruments Lock-in Amplifiers is derived from its Laplace transform . Then, the actual response of the filters is measured using the Software Trigger (now called DAQ) module of the LabOne user interface. Finally, the analytical result is compared with the experimental measurement to evaluate the accuracy of the proposed time-domain response.

## Analytical Response

Consider a first-order low-pass filter (LPF) with time constant $$t_c = \omega_c^{-1}$$. The filter’s transfer function is simply expressed as follows .

$H(s) = \frac{\omega_c}{\omega_c+s}$

The impulse response of the filter is derived by taking the inverse Laplace transform of its transfer function given by,

$h(t) = \omega_c e^{-\omega_c t}u(t)$

where $$u(t)$$ is the Heaviside step function. The step response of a filter is calculated via the following integral.

$a(t) = \int_{-\infty}^t{h(\tau)d\tau}$

Using the above expression for the first-order LPF the step response is obtained as follows.

$a(t) = (1-e^{-\omega_c t})u(t)$

Higher-order filters are implemented in ZI lock-in amplifiers via cascading first-order filters so that the transfer function of an $$n$$th-order LPF is given by

$H(s) = \frac{\omega_c^n}{(\omega_c+s)^n}$

Taking the inverse Laplace transform of the above transfer function using the Laplace transform table  results in the following impulse response for a low-pass filter of order $$n$$.

$h(t) = \frac{(\omega_c t)^{n-1}}{(n-1)!}\omega_c e^{-\omega_c t}u(t)$

Finally, the step response of a low-pass filter of order $$n$$ is derived via integrating the above impulse response as follows.

$a(t) = \bigg(1-e^{-\omega_c t}\sum_{k=0}^{n-1}{\frac{(\omega_c t)^k}{k!}}\bigg)u(t)$

This expression describes the step response of demodulator filters of all Zurich Instruments platforms with different orders from $$n=1$$ to $$n=8$$. Fig. 1 plots the impulse response of the LPF of different orders with an arbitrary time constant of 1 ms. It clearly shows that the higher the filter order is, the slower the filter response will be. Fig. 1. Impulse response of the low-pass filter of different orders from 1 to 8 with a time constant of 1 ms.

Furthermore, the step response of such filters can be drawn using the last expression above. The MATLAB code for plotting the filter impulse and step responses for each filter order is available here. The core of the code is the iterative calculation of the step response as follows.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%% Iterative calculation of step response

term = 1; LastTerm = 1; if order>1 for n = 2:order LastTerm = LastTerm.*tau/(n-1); term = term + LastTerm; end end StepResponse = 1 - exp(-tau).*term; 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 

Fig. 2 depicts such a step response for different filter orders from 1 to 8. Fig. 2. Step response of the low-pass filter of different orders from 1 to 8.

## Measuring by Software Trigger (DAQ)

In the toolbox of LabOne user interface, there is a tool called Software Trigger (DAQ Module) which can be utilized for measuring time-domain transient states. In this case, the step response of demodulator filters is measured as transient states of a system. First, we set the software trigger parameters as shown in Fig. 3 to be able to measure the filter response so that the final values of demodulator filters is 100 mV. The threshold level is set to 20 mV and the measurement time span is 22 ms (from -4 to 16 ms) to cover a range of about 22 time-constants (the filter time constant is set to 981.1 μs ≈ 1 ms). To perform the measurement we need to connect Signal Input 1 to Signal Output 1 via a BNC cable and set the filter order and then turn Amp 1 on and off to acquire the transient stat. Fig. 3 also depicts the transient response of the demodulator filter for different orders from 1 to 8. Fig. 3. The screen shot of LabOne user interface showing the device and Software Trigger settings as well as the measured step response of the demodulator filter with orders 1 to 8.

The comparison between the analytical response given by the last expression above and the measured one obtained from a UHFLI using the Software Trigger tool demonstrates perfect agreement between theory and experiment. Fig. 4 shows the measured and analytical step response of the demodulator filter with different orders from 1 to 8 proving a flawless match between the practical implementation of the device and its theoretical expectations. Fig. 4. Comparison between the experimental measurement and the analytical response of the demodulator filter for orders from 1 to 8.

It is worth mentioning that the experimental data have been processed before plotting to shift the start time to zero and to normalize the 0.1-V amplitude to unity.

## Conclusion

In this blog post, the time-domain response of demodulator filters used in Zurich Instruments devices has been presented in an analytical forms; it includes both impulse and step responses. Furthermore, the analytical step response has been evaluated by comparing with the experimental one measured by the Software Trigger (DAQ) module of LabOne user interface. It turns out that the formulas are in perfect agreement with the real response of instruments. The proposed analytical responses can be used in simulating the behavior of experimental setups in which Zurich Instruments products are involved.

## References

1. Wikipedia: “Dirac delta function.”
2. Wikipedia: “Heaviside step function.”
3. Wikipedia: “Laplace transform.”
4. Wikipedia: “Low-pass filter.”