Time-Domain Response of Lock-in Filters

February 9, 2017 by Mehdi Alem

Introduction

The heart of a lock-in amplifier is a phase-sensitive detector that includes a signal mixer and a low-pass filter. In this blog post, we focus on the time response of the low-pass filters implemented in the Zurich Instruments lock-in amplifiers including the MFLI, the HF2LI and the 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 the 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 [1]:

\[ 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 [2] 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:

\[ 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\). Figure 1 depicts 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.

impulseresponse

Figure 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:

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

  %%% 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; 

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

Figure 2 depicts such a step response for different filter orders from 1 to 8.

stepresponse

Figure 2: Step response of the low-pass filter of different orders from 1 to 8.

Measurements with the Software Trigger (DAQ) Tool

In the toolbox of LabOne, a module called Software Trigger (DAQ) can be used 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 Figure 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. Figure 3 also depicts the transient response of the demodulator filter for different orders from 1 to 8.

screenshot

Figure 3: Screenshot of LabOne 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 the UHFLI using the Software Trigger tool demonstrates perfect agreement between theory and experiment. Figure 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.

comparisonexptheory

Figure 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 form; 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. It turns out that the formulas are in perfect agreement with the real response of the 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: Low-pass filter.
  2. Wikipedia: Laplace transform.