Setting up a Digitally Tunable Resonator using the HF2LI

This article describes how to simulate a band pass filter or resonator using the HF2LI lock-in amplifier. The digitally tunable parameters make it very versatile and e.g. allow to use it for benchmarking a phase locked loop.

Hardware Requirements

To model a resonator with a Zurich Instruments HF2LI a number of options, which are listed below, need to be enabled on the base instrument.

General idea

In principle, a lock-in amplifier is nothing but a band pass filter. However, base-band data is only displayed and not upconverted again.
But with the functionality of the HF2LI, its PID controllers and some creativity, one can easily perform this piece. Please have a look at the following block diagram that explains the necessary setup.

Band Pass Filter

At this point the phase shifter at the input can be neglected. It allows to add an offset to the LPF’s phase transfer function if the filter is used to provide positive or negative feedback to a system.

There are three important parts in this diagram. The first is the quadrature input mixer that folds an input signal down to the base band (not necessarily DC) and results in an X and Y component. The second is the output mixer, which upconverts the base band signal again, resulting in the same signal at the output that is applied to the input – provided it passes the third part which is the low pass filter in between.

If the input frequency differs from the carrier (center) frequency too much, then X and Y will rotate very fast in the imaginary plane. As this rotation is restricted in frequency by the demodulator’s low pass filter, only a fraction of the input amplitude will pass through to the output. Therefore, the further away the input frequency from the chosen center, the higher the damping of the obtained band pass filter.

As the X and Y values are read and forwarded using the PID controllers which are limited to an update rate of about 75kS/s, the maximum bandwidth of the simulated BPF is restricted to about 10kHz. Any bandwidth below this maximum can be achieved by restricting the demodulation filters’ bandwidths.

Transfer function plot

Sweeping the band pass filter center frequency by setting the reference signal accordingly.

Sweeping the band pass filter Q-factor by setting the demodulator filter bandwidth accordingly.

Sweepint the band pass filter Q-factor by setting the demodulator filter order accordingly.

Filter Mathematics

The band pass filter described here is based on a cascade of first order low pass filters which have a tranfer bahavior that can be described with the following formulas:
A(f)=\frac{1}{\sqrt{(2\pi f \tau)^2+1}}
\phi(f)=\pi-ArcTan(2\pi f \tau)

The mixers shift this filter behavior up to the filter’s center frequency. Therefore,
A(f-f_c)=\frac{1}{\sqrt{(2\pi (f-f_c) \tau)^2+1}}
\phi(f-f_c)=-ArcTan(2\pi (f-f_c) \tau)
The maximum phase shift for a first order band pass filter will be
\phi_{max}=\pm 90
to either side with a zero phase shift at the center frequency.

For a higher order filter, the transfer function has to be taken to its power and the phase shift has to be multiplied.
A_n(f-f_c)=A^n(f-f_c)
\phi_n(f-f_c)=n\cdot\phi(f-f_c)

The Q-factor of a resonator can generally be determined using the derivative of its phase curve.
\frac{d\phi_{LPF}}{df}=-n\cdot \frac{2\pi\tau }{1+4 f^2 \pi ^2 \tau ^2}
As two PID controllers with a finite sampling rate of about 75 kHz are used to forward the X and Y amplitudes to the output mixer, an additional phase shift of
\frac{d\phi_{PID}}{df}=2\pi\cdot\frac{(f-f_c)}{f_{PID}} \approx \tau+83\cdot 10^{-6} \approx 5\frac{\deg}{kHz}
has to be taken into account.

Now, the Q-factor of the resulting band pass filter is defined by the phase slope at its center frequency (point of highest slope)
\frac{d\phi_{LPF}}{df}(0)=-n\cdot 2\pi \tau
finally leading to a Q-factor of
Q=-\frac{1}{2}\frac{d\phi}{df}(0)\cdot f_c=\frac{1}{2}\frac{d\phi_{LPF}+d\phi_{PID}}{df}(0)\cdot f_c= (n\cdot\pi \tau+83\cdot 10^{-6})\cdot f_c
Here, tau is the low pass filter time constant of a single stage.

Alternatively, for a first order LPF, the following well-known formula can also be applied:
Q=\frac{f_c}{B}=\frac{f_c}{2f_{3dB,LPF}}

The characteristic frequency of the filter is equivalent to the low pass filter bandwidth:
f_c=f_{3dB,LPF}

Some performance specifications

  • Frequency range of Resonance: 3mHz to 50MHz
  • Filter Bandwidth = 0.6mHz up to about 10kHz, limited by the PID update rate of about 75kS/s
  • PID update rate also results in a minimum phase slope of 5°/kHz due to delays
  • Minimal Q-Factor is about 10, physically limited due to the need of omega / two omega suppression
  • Maximal Q-Factor is about 730e9 @ 50MHz, about 15e6 at 1kHz. Limited by maximum integration time constant of 583s.

The bandwidth limitation due to the PID sampling rate can be seen in the following graph, where some distortions at half the sampling rate (Nyquist) are highlighted.

Downloads

  • The file BPF.zicfg can be used to quickly set up a band pass filter. By changing the frequency, bandwidth and order for demodulator 1, the filter characteristics can be altered.

Sources

Low pass filter mathematics PDF

Acknowledgements

I’d like to acknowledge the contribution of Dragan Lesic for the block diagram.