How to Measure Allan Variance with Zurich Instruments Lock-in Amplifiers

August 28, 2023 by Avishek Chowdhury

Introduction

Measurement of any physical parameter is subjected to noise due to random fluctuations of the measured quantity and variations of physical quantities coupled with it. Such fluctuations result in the drift of the measured quantity and therefore limit the accuracy of the measurement. To understand how such noises affect the measurement, a detailed investigation of different sources of noises must be done to mitigate their magnitudes. In the usual standard deviation measurement of statistical data, the influence of several noise sources is hindered and it fails to give an overall understanding of the noise model of the system. In contrast, the Allan variance measure of a data set gives a much clearer understanding by measuring variation on multiple time scales. The important variables to consider are usually the variance of fluctuations of the parameter under investigation, the averaging time, the sampling rate, and the total acquisition time. The Allan variance method has been initially applied extensively to the measurement of atomic clock stability [1, 2] and yet has been extended to characterize the stabilities of sensors in classical [3, 4, 5] as well as quantum regimes [6]. In this blog post, we focus on measurement of Allan Variance of frequency fluctuations.

Allan variance

The Allan variance measurement has been historically developed to be applied to atomic clocks or resonators to study their stability but can be potentially extended to any noise signal amplitude analysis to study complex noise behaviors. IEEE standard definition of physical quantities for Fundamental frequency and Metrology defines it as ”two-sample variance", \(\sigma_y(\tau)^2 \). Sometimes noted also as Allan deviation, while reporting the parameter \(\sigma_y(\tau)\). Unlike a standard deviation measurement, done between a mean of a sample data and all data points; this technique is focused on the variation of the data from measurement to measurement.

Allan variance, \(\sigma_y(\tau)^2\) for a statistical measurement can be calculated by the following equation [1, 4]:

\(\sigma_y^{2}\left(\tau\right)=\frac{1}{2\left(N-2\right)\tau^2} \sum_{n=1}^{N-2} (y_{n+2}-2y_{n+1}+y_n)^2\)

In this formula, "\(N\)" represents the total number of samples in the measurement. The symbol "\(\tau\)” represents the sampling time, and "\(y_n\)" represents the n-th data sample from the data set. These data samples could be the frequency of the resonator or the absolute phase of the resonator divided by the frequency set by the demodulator.

Overlapping Allan variance

To calculate the overlapping Allan variance, a certain number of overlapped series are measured from the original series. The overlapping estimator is known for providing better performance than the non-overlapping estimator for large data sets, and can be calculated using the following expression:

\(\sigma_y^{2}\left( m\tau\right )=\frac{1}{2(m\tau)^2(N-2m)}\sum_{n=1}^{N-2m}\left(y_{n+2m}-2y_{n+m}+y_n\right)\)

Here, \(m\) represents the total number of samples in each cluster. Maintaining a constant sampling time \(\tau \), the Allan variation \(\sigma^2_y(\tau) \) is computed for a varying \(m\). A log-log plot of \(\sigma^2_y(\tau)\) vs. \(m\tau\) gives the Allan variance measurements for different integration times. This blog post considers the overlapped Allan variance as the preferred measurement due to its superior performance, as previously mentioned.

Noise contributions

The Allan variance is a method for measuring the variance of an estimator over different integration times. It provides insight into the various noise sources that affect the measurement. Unlike regular standard deviation measurements, the Allan variance analysis can identify different sources of noise. Gaussian and random noises are typical noise sources that affect measurements. Fast fluctuations generate random noise, while slow drifts occur over longer timescales, causing increased deviation for higher integration times. The Allan variance plot directly shows the magnitude of noise as a function of integration time on a log-log scale, making it easy to identify various noises and drifts in different regimes. In the following sections, we will discuss several noise sources and their implications [5].

  • Quantization noise: Typically results from digital signal processing of an analog data set. This happens noticeably at very low integration times when the time scales are in the order of the sampling time, \(\tau\). In this region, Allan variance changes as \(\tau^{-2}\).

  • Gaussian noise: This noise is inherent to the measured thermal signal, along with the thermal noise generated in all the electronic components of the involved circuits. Such noise is typically associated with the slope \(\tau^{-1}\) in Allan variance measurements.

  • Flicker noise: This is typically a type of electronic noise that occurs in almost all kinds of electronic devices. It is sometimes also referred to as \(1/f\) noise. On the Allan variance plot, it can be identified with a slope of \(0\).

  • Brownian noise or Random walk: These noises occur from short time changes and are therefore coined as Brownian noise. Such noises are characterized by a region varying as \(\tau^1\) in Allan variance plots.

  • Steady drift: As the name suggests, these noises occur usually for longer measurement times related to slow changes in the measured value. Changes could be related to slow temperature drifts in systems. This noise varies as \(\tau^2\) in a typical Allan Variance plot.

Allan Deviation measurement with ZI lock-in.

Figure 1: Allan Deviation measurement with ZI lock-in.

Measurement strategies

In this blog post, we discuss Allan variance measurement of a resonator with a resonance frequency of 1.84 MHz and a Q-factor of 17,000. The resonator is connected between the signal output and input of the HF2LI lock-in Amplifier, as shown in Fig. 1. With this set-up, the Allan variance can be measured in both open loop and closed loop configurations. The transmitted signal is demodulated with a fixed bandwidth of 1 kHz with a fixed measurement time of 300 secs.

Open loop measurement

In this setup, the sensor's resonance phase is monitored by observing the instantaneous frequency of the resonator. Fluctuations in the resonator frequency are tracked by observing the phase lag while keeping the drive frequency constant. When setting the measurement settling time, the resonator's characteristic time, which is determined by its losses, must be taken into account. This is called the open loop configuration because there is no control of the resonance for the resonator. In regions where the frequency shift is greater than the natural linewidth of the resonator, the sensor's performance suffers from steady drifts. Additionally, because the demodulator frequency of the lock-in is fixed by the drive frequency in this configuration, the oscillator's phase must be probed to determine the Allan variance.

The sensor's performance is shown in Fig. 2, where the overlapping Allan variance (Eq. 2) is calculated for different integration times. By analyzing the slope of the variance (see Fig. 2), we can identify different noise regions discussed in the previous section. To enhance the sensor's performance for longer integration times, it's recommended to operate it in closed-loop regimes [2]. The implementation and effects of closed-loop configurations are explained in the next section.

Plot of Allan variance as a function of integration time in open-loop configuration. The solid red line indicates the measurement while the dotted lines indicate various noise contributions.

Figure 2: Plot of Allan variance as a function of integration time in open-loop configuration. The solid red line indicates the measurement while the dotted lines indicate various noise contributions.

Closed loop measurement

In this setup, a PLL is used to monitor and adjust the frequency of the oscillator. By tracking the phase of the resonator and adjusting the drive frequency accordingly, the resonance frequency can be maintained at a constant value. The PLL bandwidth limits the ability to track fluctuations up to a certain timescale. Zurich Instruments provides PLL controllers as upgrade options for the lock-ins, which can be used for this purpose. As long as the phase remains locked to the resonator, the PLL can keep up with fluctuations within its bandwidth. For more information on operating a phase lock loop, please refer to the whitepapers on PID Controllers and phased locked loops.

Phase locked loop

Figure 3: Schematic of a phase locked loop. The phase of the incoming signal is first detected which is then fed onto a PID controller. The output of the PID controls an oscillator whose frequency is then corrected accordingly.

The closed-loop measurement technique is certainly helpful in correcting drifts and thereby helps improve performance in longer time scales. However it is important to keep in mind the role of the PLL bandwidth; If the bandwidth is too high, it can lead to bad noise performance due to higher frequency fluctuations. On the other hand, if the bandwidth is too low, the PLL won't be able to efficiently track the frequency fluctuations. To compare closed loop and open loop performance for different locking bandwidths, we measure the closed-loop performance of the quartz resonator with the following configurations:

  • Open loop measurement (red line).

  • Closed loop measurement with a PLL bandwidth of 200 Hz (green line).

  • Closed loop measurement with a PLL bandwidth of 20 Hz (blue line).

Closed loop Allan Variance

Figure 4: Allan variance as a function of integration time for open loop (red), PLL implemented with a bandwidth of \(200\) Hz (green), \(20\) Hz (blue).

To improve the performance, we now implement a PLL to lock the resonator with varying bandwidth and the results are shown in Fig. 4. First a PLL bandwidth higher than the natural linewidth, \(\Gamma\) = 100 Hz of the resonator is implemented. A locking bandwidth of 200 Hz allows the oscillator to drift more than its natural linewidth, which negatively affects short measurement but enables better tracking of slower drifts for higher integration times (green line). A PLL bandwidth lower than the linewidth of the resonator at 20 Hz (blue line) puts a stricter restriction on the resonator, resulting in improved noise performance by an order of magnitude compared to open loop configuration (red line). However, a narrower locking bandwidth can result in a slower PLL response and difficulty following fluctuations of the resonator. This should be taken into account while designing the PLL bandwidth for any resonator.

Find the Allan variance of your system

Find the Python notebook here for measuring Allan variance of your system. This file works with any of the ZI lock-in amplifiers by polling to a particular demodulator node. Currently, it is set to the first demodulator where it drives and measures the response from any resonator. In the second section, it polls the data from this demodulator node for a specific time which can be fixed by the parameter “time_meas”. During the poll process, the files are dumped in temporary files and are imported again in a single file to perform the measurement of Allan variance. The Allan variance is finally measured on the phase of the measured data instead of the frequency as the latter is fixed by the demodulator itself. The frequency can be used in the closed-loop method where the PLL tries to follow the resonator fluctuation. Finally, overlapping Allan variance is calculated using the Allantools library and the results are plotted in a log-log plot. Check this success story by Dr. Tomás Manzaneque García who successfully used the UHF lock-in amplifier to implement PLL and measure Allan variance of his mass sensor.

Important notes

  • High stability of the clock of the lock-in amplifier is highly desired. Having equal timestamps for discrete measurements is critical for the precise computation of Allan variance.

  • All of the ZI lock-ins have PLL as an upgrade option with the possibility to set the PID parameters automatically. Thereby making it easier to implement in your set-up without spending a long time optimizing parameters.

Conclusion

By conducting an Allan variance analysis, we can gain a deep understanding of the various sources of noise present in a system and how they affect performance over time. In this example, we use a quartz resonator for the analysis, but this technique can be applied to any experimental setup where a close analysis of noise sources is desired. In the second section, we compare the performance of the resonator in both open and closed-loop configurations. Generally, the closed loop configuration shows better noise performance, but at the cost of slower response times. Therefore, depending on the desired application and the need for fast sensor response, the open-loop configuration should be used. While the closed-loop technique remains as the ideal choice if a highly precise measurement of drifts is needed.

References

  1. David W. Allan. Should the classical variance be used as a basic measure in standard metrology? IEEE Transactions on Instrumentation and Measurement, IM-36, Issues: 2, June 1987.

  2. David W. Allan. Statistics of Atomic Frequency Standards. Proceedings of IEEE, vol. 54, no. 2, February 1966.

  3. Pedram Sadeghi et al. Frequency fluctuations in nanomechanical silicon nitride string resonators. Physical Review B 102, 214106 (2020).

  4. Tomas Manzaneque et al. Method to Determine the Closed-Loop Precision of Resonant Sensors From Open-Loop Measurements. IEEE Sensors Journal, Vol. 20, No. 23, December 1, 2020.

  5. D V Land et al. The use of the Allan deviation for the measurement of the noise and drift performance of microwave radiometers. Meas. Sci. Technol. 18 (2007) 1917-1928.

  6. Lorenzo Dania et al. Ultra-high quality factor of a levitated nanomechanical oscillator. arXiv:2304.02408v1 [quant-ph] 5 Apr 2023.

Acknowledgments

I would like to extend my sincere gratitude to my colleagues Kivanç Esat and Heidi Potts, for their valuable insights and feedbacks on this blog post.