Lock-in Amplifier or Boxcar Averager? Choosing the Right Measurement Tool for Periodic Signals - Q&A

November 21, 2023 by Gustavo Ciardi

This blog post answers the many appreciated questions asked by the audience during the webinar "Lock-in Amplifier or Boxcar Averager? Choosing the Right Measurement Tool for Periodic Signals”. The event was recorded, and the video is available here.

The webinar covered the following topics:

  • Lock-in amplifier working principles and measurement optimization
  • Boxcar averager working principles
  • Application examples
  • A live demo showcasing simultaneous lock-in amplification and boxcar averaging measurement on a pulsed signal

Working principles of lock-in amplifiers and boxcar averagers

For a detailed discussion and rigorous mathematical treatment of the lock-in amplifier and boxcar averager working principles, have a look at our Principles of lock-in detection and Principles of Boxcar averaging white papers or contact us directly.

Questions

In STM measurements, the base electronic noise is similar in amplitude to the signal. In this case, is it better to use lock-in method or boxcar?

The answer to this question depends on the type of signal you expect from your STM measurement. For sinusoidal or high-duty cycle signals, lock-in amplification is generally the method of choice. For low-duty cycle signals, boxcar averaging becomes an attractive approach as well.

In the case of complex signals, the choice might not be obvious. Nonetheless, a lock-in measurement is always a good starting point, as well as in case of low-duty cycle signals, because the experiment can be set up quickly and easily.

Ultimately, the best way to settle on a measurement strategy is a one-to-one comparison between a lock-in amplifier and a boxcar averager: this is possible on the Zurich Instruments UHFLI Lock-in Amplifier with the UHF-BOX Boxcar Averager option.

What is the difference between boxcar averaging and the signal averaging feature available on most oscilloscopes? Are lock-in and boxcar techniques always better than simply averaging multiple samples?

Boxcar averaging and the signal averaging feature on oscilloscopes serve similar purposes in terms of reducing noise in a signal, but they operate in different ways.
If your starting signal is large enough and repetitive, simple signal averaging (where multiple acquisitions of the same signal are overlaid, and the average is calculated point by point) can undoubtedly be a good strategy.

However, if the signal is tiny and buried in the noise, changes rapidly between acquisitions, or you are interested only in certain frequency components, it would be very complicated to extract the information just by averaging. In these cases, lock-in amplification and/or boxcar averaging would instead result in superior performances in terms of signal quality.

So, in the end, the choice between boxcar averaging, lock-in detection, or signal averaging on oscilloscopes depends on the specific characteristics of the signal and the nature of the noise present. For large and repetitive signals, simple averaging may suffice, but for more complex scenarios, lock-in and boxcar techniques offer additional advantages in terms of precision and adaptability to different signal conditions.

What if the short pulsed signal one wants to measure with a boxcar averager is bipolar?

The polarity of the signal does not influence the performances of the boxcar averager per sé.

Operating the boxcar averager on a positive or negative voltage signal would simply lead to an integrated value with a plus or minus sign, respectively. Then, depending on the aim of your measurement, you can set the boxcar gate and baseline according to the specific feature of the signal you’re interested in.

For example, if the aim is to measure the sum of the positive and negative contributions of a signal, one could set the boxcar gate on the positive pulse and the baseline on the negative one. Then, since the boxcar calculates the difference between the boxcar gate and the baseline, the output is proportional to the sum of the two contributions. A similar scenario is discussed in this blog post.

Is boxcar averaging equivalent to signal multiplication by -1(baseline) and +1 (pulse) and their subtraction?

One can indeed think about the boxcar gate as signal integration within the boxcar window with a plus sign in front and the boxcar baseline with a minus sign. Then, the output is calculated as the sum of the two integrated signals: gate + (- baseline).

Please note that the baseline subtraction is optional, and in case of no boxcar baseline present, the output is simply the integrated value of the boxcar gate.

In the lock-in current input config, can I know the size of the feedback resistor used in the TIA?

I assume you are asking about the current Input of our MFLI Lock-in Amplifier. All the relevant specifications of the current Input, including trans-impedance gain, input impedance, and others, are listed in this table.

Is it possible to capture more than 1 harmonic using a lock-in amplifier?

Absolutely. Thanks to the multiple demodulators in our instruments, you can measure as many harmonics as there are demodulators available.

The MFLI is equipped with 4 demodulators (provided the MD option is installed), and thus up to four harmonics can be measured simultaneously. The HF2LI and UHFLI have 6 and 8 demodulators respectively, so they can measure up to 6 and 8 harmonics simultaneously.

Can I find the baseline in a Raman spectrogram (amplitude vs wavenumber) using a LI amplifier?

This question needs a small caveat.

Generally, lock-in amplifiers are only used in combination with spectral integrating detectors (e.g., photodiodes, PMTs) and not with spectrally resolving detectors (e.g., spectrometry, CCD cameras). For the latter, one would need a dedicated lock-in amplifier for every single detecting element of the detector, making the realization very unpractical.

Back to the question - if you are measuring your Raman spectrum in the frequency domain (e.g., using a spectrometer) then you would not be using a lock-in amplifier in the first place.

In contrast, if you are instead measuring your Raman spectrum in the time domain and then applying a Fourier Transform to obtain the spectral response, then you could, in principle, use a lock-in amplifier to analyze the signal from your detector and therefore also have an idea of the background of your measurement.

Can a moving average filter be used with a digitized lock-in amplifier?

The same exact implementation of the moving average filter on the boxcar averager cannot be used for the lock-in amplifier, as the operations they perform on a signal are different.

However, in the latter, the averaging functionality is provided by the low-pass filter and its settings, more precisely its time constant. Essentially, one can think about the time constant of the low-pass filter as the averaging time before the measurement result is output. The longer the time constant (and in turn the smaller the filter bandwidth), the longer the signal is averaged, thereby rejecting more noise at the expense of measurement speed.

This is also the reason why averaging and low-pass filtering can be considered equivalent operations.

What is the best method (boxCar or lock-in) to distinguish an instantaneous signal (Raman) vs a longer live signal (fluorescence)?

It's not straightforward to give a definitive answer.

The best measurement approach depends on the characteristic of your signal coming out from the detector, which in turn depends on the characteristic of the excitation light and the response of your sample.

As explained in the webinar, if the signal is almost sinusoidal or high-duty cycle (for example, if the detector bandwidth is smaller than the repetition rate of the excitation laser), then lock-in is generally the best approach. If, instead, the signal is a very low-duty cycle, then boxcar averaging would be the preferred approach.

For application-specific cases, this again depends on how your raw signal looks. Sometimes, long-lived signals like a fluorescent lifetime might be reconstructed from low-duty cycle single measurement points, making boxcar averaging more favorable to lock-in amplification.

May I ask if there is other noise that may appear apart from the laser source e.g., WIFI, some other signals in the instrument/other instruments nearby? 

Various sources of noise, such as electromagnetic interference from Wi-Fi and other devices, power supply fluctuations, environmental factors, and crosstalk can, in principle, impact your measurements. Grounding issues, amplifier and detector noise, optical artifacts, and environmental electromagnetic fields are also considerations. Mitigating noise involves good experimental practices, including proper shielding, grounding, and isolation techniques.

However, in most cases, these types of noise sources have well-defined frequency components, as the 50-60 Hz of the power supply or the radio/mobile contributions at 100s of MHz. Also, for this very reason, lock-in amplifiers are a great tool to isolate your measurement from external factors as they measure at a single frequency only: choosing the right modulation frequency away from these unwanted frequency components can help obtain better measurements limiting the impact of external noise contributions.

May I ask why you selected the two areas (flat part & pulse part) on the software? And what does the computer do on the 2 areas? If we do the boxcar averaging and lock-in amplification at the same time, would there be any influences on each other or additional noise?

The two areas I selected on the software are the boxcar gate (around the pulse) and the boxcar baseline (where no signal is present) respectively.

When the baseline subtraction is enabled, the output of the boxcar averager is calculated as the integrated value within the boxcar gate minus the integrated value within the boxcar baseline. In this way, one can suppress DC or slowly varying components from the boxcar measurement output.

Alternatively, if, for example, the aim is to calculate the difference between two consecutive pulses, one would set the boxcar gate around the first pulse and the boxcar baseline around the second pulse, thereby having on the output the direct difference between the two.

Regarding the potential additional noise when performing the two measurements simultaneously: since the instrument is fully digital and both lock-in amplification and boxcar averaging are essentially performed at a numerical level, there is absolutely no interference between the two measurements. The only noise that matters is, in fact, the one on the signal itself and possibly the quantization noise of the analog-to-digital conversion stage. However, given the variable input ranges of our lock-in amplifiers, the latter is rarely something to worry about.

If there is noise having similar frequency as the signal, would the boxcar averager be better? Or does it depend?

This is a very important question. In fact, in a situation where the noise was exactly synchronous with the signal of interest (i.e., noise and signal having the same frequency) a lock-in amplifier - that measures at a single frequency, the fundamental - would pick up both, potentially lowering the quality of the measurement.

The boxcar averager, on the other hand, extends the detection bandwidth to multiple harmonics of the fundamental, the exact number depending on the width of the gate, the repetition rate of the signal, and the number of measured harmonics by the instrument. This means that, supposing the noise contribution is synchronous only with the fundamental, the higher harmonics would be noise-free, and therefore contribute positively to the overall signal-to-noise ratio. Thus, for this specific scenario, boxcar averaging would be the method of choice.