A Quantitative SNR Comparison: Lock-in Amplifier vs. Boxcar Averager
In this blog, we investigate the details of how to quantitatively compare lock-in amplification and boxcar averaging on the same input signal, through a direct evaluation of the signal-to-noise ratio (SNR) produced by the two techniques. More specifically, we’ll demonstrate how the UHFLI 600 MHz Lock-in amplifier, combined with the LabOne control software, can provide quantitative SNR figures, making the assessment a straightforward task. The topic is also covered in this video.
For a better understanding of the two measurement techniques, you can read this blog post, where we discussed in more detail the two measurement principles and additional factors to consider in the decision-making process.
To simulate an input signal with variable characteristics, we perform a simple loop-back experiment with our UHFLI 600 MHz Lock-in Amplifier: we use the Signal Output of the instrument to generate the signal and we then loop it back to Signal Input to analyze it, as schematically depicted in Figure 1.
Thanks to the UHF-AWG Arbitrary Waveform Generator option of the UHFLI, it is possible to generate waveforms with user-defined properties. For our purpose, we’ll use the AWG to output pulse trains with a 15 mV amplitude and different duty cycles, helping us understand how the variation of certain parameters affects the measurement result.
In Figure 2, we can see the LabOne user interface, where we generate a Gaussian pulse train at about 2.1 MHz repetition rate. Using the embedded oscilloscope module of the instrument, we can observe this series of pulses with about 100 ns duration, whose period of about 467 ns matches the inverse of the 2.1 MHz repetition rate.
As a first step, let's perform a boxcar measurement using Boxcar Unit 1. The Periodic Waveform Analyzer (PWA), integrated into both UHFLI’s Boxcar units, enables an easy visualization of the individual pulses making up the pulse train.
By locking the PWA to the pulse repetition frequency, we can isolate a single period of our pulse train, i.e. a 467 ns long time span, plotted as a function of phase (0 to 360 degrees). By having only a single pulse displayed, the process of setting the boxcar gate and baseline is significantly simplified, as illustrated in Figure 3.
Then, we'll set both the boxcar gate around our signal and the baseline window where no signal is present (in this case, the first part of the period). Note that, even though only one pulse is present in the period and no differential measurements are required, it is always advisable to enable the baseline subtraction option, placing the window somewhere in the period where no signal is present, to eliminate any potential DC or slowly varying component.
The final output from Boxcar Unit 1 will thus be equal to boxcar_gate – boxcar_baseline. We arbitrarily choose 256 averaging periods (highlighted in yellow) before outputting the result, translating to an equivalent averaging bandwidth of about 3.6 kHz.
Simultaneously, we also use the 1st demodulator to perform a lock-in measurement on the same pulse train, employing the same measurement bandwidth of 3.6 kHz to ensure an apples-to-apples comparison of the SNR. Juxtaposing both boxcar averager and lock-in measurements in the Plotter (Figure 4), we observe a comparable SNR of about 60 dB, as highlighted in the Math Tab.
Interestingly, it can be noted that the lock-in amplifier measures an average signal of about 3 mV, while the boxcar averager captures a higher value of 8 mV. This is due to the contribution of the higher harmonics to the average on the boxcar measurement. However, the corresponding standard deviation is also larger, highlighting the importance of comparing the SNRs – defined, in fact, as the logarithmic ratio between the average (\(\mu\)) and the standard deviation (\(\sigma\)) -- the better metric when it comes to evaluating the quality of a measurement.
\(SNR(dB)=20\cdot\log_{10} [signal\ (\mu)/noise\ (\sigma)]\)
Next, let's drastically reduce the duty cycle by keeping the pulse duration the same but decreasing the repetition rate to around 10 kHz. On the PWA shot shown in the top panel of Figure 5, we can now see that the pulses occupy a much smaller part of the period than in the previous case.
Zooming in around the phase value where the pulse is visible (Figure 5, bottom panel), we set new boxcar and baseline windows. We keep the 256 averaging periods, translating now to an equivalent averaging bandwidth of about 18 Hz, due to the lower repetition rate.
Adjusting the lock-in measurement bandwidth accordingly on demodulator 1 and comparing the SNRs in the Plotter (seen in Figure 6) we find that, in this case, the Boxcar averager achieves a much higher SNR compared to the lock-in amplifier. As highlighted in green on the right-bottom side of Figure 6, the SNR for the boxcar is around 60 dB while for the lock-in is 20 dB. This difference of 40 dB corresponds to a factor of 100 higher SNR in favor of the boxcar against the lock-in amplifier.
Conclusion
Deciding which measurement technique is better suited for a specific signal profile can be challenging without a direct quantitative comparison. Thanks to the digital nature of the UHFLI 600 MHz Lock-in amplifier and the LabOne control software, a quantitative SNR comparison becomes straightforward, enabling you to invest in the measurement approach that maximizes the SNR and produces better results.