Boost your Signal-to-Noise Ratio with Lock-in Detection

October 10, 2023 by Heidi Potts

This blog post accompanies the webinar "Boost your Signal-to-Noise Ratio with Lock-in Amplifiers". In this webinar, we learned how to use lock-in amplifiers and optimize measurement parameters to get the best signal-to-noise ratio. We discussed three common use cases: optics and photonics experiments, material characterization, and resonator characterization. Finally, we looked at more advanced techniques, such as double modulation and multi-frequency measurements. The recording is available here on our YouTube channel.

Thank you to everybody who joined the live event and participated actively by asking many interesting questions. The answers to all questions are provided in the summary of the webinar or at the end of this blog post.

Lock-in Detection - Working Principle

A lock-in amplifier performs a multiplication of its input with a reference signal and then applies an adjustable low-pass filter to the result. By choosing the frequency of the reference signal and the modulation frequency of the experiment to be equal, the signal at the frequency of interest is isolated from all other frequency components. A schematic of the technique is shown in Figure 1.

The most important measurement parameters are

  • The modulation frequency,
  • The low-pass filter bandwidth,
  • and the low-pass filter order.

In the first part of the webinar we discussed how each of these parameters affects the signal-to-noise ratio and the measurement speed. A detailed introduction to lock-in detection can be found in our whitepaper Principles of Lock-in Detection.

 

Schematic of Lock-in Detection

Figure 1: Schematic of the working principle of lock-in detection. The input signal is multiplied with the reference signal and then a low-pass filter is applied. The filter bandwidth and the filter order of the low-pass filter can be adjusted.

How to set up a Lock-in Measurement

The main steps for setting up an experiment are 

  • Choose the modulation frequency.
  • Choose a reference signal.
  • Configure the signal input channel.
  • Configure the bandwidth and the order of the low-pass filter.
  • Capture and save the results.

We discussed each of these steps for three common use cases: optics and photonics experiments, material characterization, and resonator characterization, and gave some tips and tricks on what to consider for each of the experiments. In the following section, we provide a quick summary of the content - but please refer to the recording of the webinar to get the full details.

Modulation frequency

In some applications, the modulation frequency is determined by the experimental setup, such as the repetition frequency of a pulsed laser or the resonance frequency of a resonator. In many other applications, the modulation frequency can be chosen. In this case, choosing the modulation frequency is an important decision. The key considerations are:

  • Choose a modulation frequency that is far away from any sources of noise. A schematic of a typical noise spectrum is shown in Figure 2.
  • Choose a modulation frequency that is as high as possible, where the noise is typically lower. A higher modulation frequency also allows to use a higher low-pass filter bandwidth and thus enables faster measurements.

In order to make a wise choice of the modulation frequency, it is crucial to characterize the setup.

  • Using an oscilloscope both in the time and frequency domain, e.g. using the built-in Scope tool of our instruments.
  • By characterizing the noise power spectral density, e.g. using the built-in Noise Amplitude Sweep function of the Sweeper tool of our instruments.
Qualitative noise spectrum of a typical experiment.

Figure 2. Qualitative noise spectrum of a typical experiment.

​Reference signal

There are two ways to generate a reference signal:
  • Generate the reference signal internally with the lock-in amplifier and provide it to the experiment either as a sine wave, or a TTL signal.
  • Generate the reference signal with an external device, e.g. the chopper controller, and provide it to the lock-in amplifier as a sine, rectangular, or TTL signal. The frequency is then mapped to an internal oscillator using a phase-locked loop.

Configure the input channel

Optimizing the settings of the input channel is crucial to get the best SNR. There are three main parameters

  • the input range,
  • AC/DC coupling,
  • and the input impedance.

The analog front end of a digital lock-in amplifier consists of an input range amplifier, a low-pass filter to avoid aliasing effects, and an analog-to-digital converter (ADC). For more information, please have a look at this blog post.

The input range should be chosen to get the best resolution from the ADC without risking clipping the signal. In Figure 3 a) you can see three different scenarios: In the first one, the input range is chosen very large, such that a big part of the range does not contain any signal. The second case is a good choice, where the signal amplitude is approximately half of the input range. In the third scenario, the input signal is clipped, leading to measurement artifacts. Keep in mind that the amplitude of the signal can also change during the measurement as a function of other experimental parameters, so you need to choose it such that also the highest amplitude is not clipped. It is good practice to check the OVI (overload input) flag at the bottom of the LabOne interface from time to time. If the range has been too small at any point in the past, there will be a yellow flag. If you observe this, you may want to repeat the measurement.

Figure 3 b) shows the effect of choosing AC coupling: This inserts a high-pass filter with a cut-off frequency that depends on the instrument (e.g. 1.6 Hz for the MFLI Lock-in Amplifier) which then filters out low-frequency components of the signal before the ADC. The AC coupling allows to minimization of the input range when working with signals that have a large DC offset.

Schematic of different input configurations

Figure 3: Schematic of input channel configurations. a) Three scenarios comparing the input range to the signal amplitude. b) The effect of using AC coupling.

Configure the low-pass filter

Choosing the low-pass filter settings is key to finding the best compromise between signal-to-noise ratio (SNR) and measurement speed. The two parameters are the filter bandwidth \(f_{3dB}\) and the filter order \(n\). The time-constant \(\tau\) is directly related to these parameters

\(\tau =\) \( \sqrt{2^{1/n}-1} \over 2 \pi f_{3dB}\).

While a larger time constant leads to a higher SNR by filtering out more noise components, it also leads to a delay in the time response. Therefore the time constant and the filter order need to be chosen

  • As large as possible to maximize the SNR
  • Narrow enough to capture fast changes in the signal.

For a detailed discussion of the topic, please refer to the recording of the webinar and our whitepaper Principles of Lock-in Detection.

Advanced Applications

In the last part of the webinar, we discussed multi-frequency analysis and how to recover information from amplitude- or frequency-modulated signals where the signal consists of a carrier frequency Ω and two sidebands Ω ± ω. Figure 4 shows a schematic representation of an amplitude-modulated signal both in the time and frequency domain. There are two techniques to measure such a signal:

  • Tandem demodulation: The signal is first demodulated at a carrier frequency using a large enough filter bandwidth, such that the sidebands are transmitted through the filter. The result from the first demodulation is then provided as input for a second demodulation at ω.
  • Direct sideband detection: The demodulation is directly performed at the frequencies of the sidebands Ω ± ω.

Modern lock-in amplifiers offer the capability to perform these analysis techniques in a single device. For more information about how to set up an experiment and a detailed comparison between the two techniques, please have a look at this blog post.

Schematic of an amplitude-modulated signal both in the time and frequency domain.

Figure 4: Schematic of an amplitude-modulated signal both in the time and frequency domain.

Q & A

Here is a summary of the questions asked during the webinar. Please note that some of the questions are also covered in the summary above.

Lock-in Detection Principle

1. What is the impact of the modulated signal waveform, e.g. pure sine versus square wave?

The waveform indeed makes a difference for the measurement. As we discussed in the first part of the webinar, a lock-in amplifier multiplies the input signal with a reference signal which is typically a sine wave and then applies a low-pass filter. This means that only the information that from the fundamental frequency of the modulation is captured and all other frequency components are filtered out. If your input signal is a rectangular wave, it actually consists of many frequency components: the fundamental frequency and its harmonics which are weighted differently depending on the duty cycle of the rectangular wave. In this case, it might be interesting to measure some of the harmonics in addition to the fundamental frequency (which can conveniently done with the multiple demodulators in our instruments). Alternatively, especially if the duty cycle is low, boxcar averaging is an attractive option to boost the SNR of the measurement. We provide a boxcar averager option for our UHFLI Lock-in Amplifier (more information here).

2. How much can the lock-in amplifier amplify the signal? What is the minimal voltage in a noisy environment that can be measured?

In analog amplifiers, there is a clear answer to this question, the amplification is the ratio between the maximum (analog) output value of the measured signal compared to the input signal. This is determined by some analog amplifiers. In a digital measurement instrument, the amplification is in principle infinitely high: Let’s say your signal is 1 nA, then you can just (digitally) multiply this value with a very large number and either save it or provide it as an analog output value. You can find some more information about this here. For a digital lock-in amplifier, the more important specification is therefore the dynamic reserve which specifies the minimum signal that can be measured with a relative accuracy of 1% in the presence of noise which is XX dB stronger. In case of the MFLI, the dynamic reserve is 120 dB but it is important to note that unfortunately different companies have different definitions of the dynamic reserve, in some cases the definition is a lot less strict compared to ours. Some more information is provided here.

3. How does a digital demodulator differ from an analog one?

In all modern lock-in amplifiers, the signal first passes through an analog front end and then it gets digitized and processed digitally (you can find some information in this blog post). There are several advantages: digital signal processing is less sensitive to cross-talk and drifts such as temperature fluctuations. Additionally, and you can duplicate the signal at no cost and then process it with different functions simultaneously – allowing that we can use the Scope tool and several demodulators at the same time.

For a hardware demodulator, you need an analog mixer and then an analog low-pass filter. If you want to perform several functions on the same signal you need to split it in the analog domain, by which you lose half of the power.

 

Measurement Settings

1. When would you want to do DC Coupling? Aren't you only interested in the modulated signal, which is AC by default.

In most experiments, one is only interested in the AC signal, so in general it is a good idea to use AC coupling in order to filter out DC signals and be able to minimize the input range. However, there are a few exceptions:

  • Sometimes one is interested in both the DC and the AC value of the signal. In this case, one can use DC coupling and use two demodulators simultaneously: one at the AC frequency and the second one at 0 Hz in order to get the DC value.
  • The AC coupling high-pass filter has a certain cut-off frequency (1.6 Hz for the MFLI). Sometimes one is interested in even lower frequencies – in this case one needs to use DC coupling.
  • The input noise of the MFLI is slightly lower for DC coupling compared with AC coupling (especially at low frequencies). If you are interested you can measure that following this blog post. That means that for low frequencies, you may want to use DC coupling.

2. How can I determine which time constant to use?

As discussed in the first part of the webinar, you have to find the best compromise between signal-to-noise ratio and measurement speed. A longer time constant can increase the signal-to-noise ratio but it leads to a slower response of the measurement. The best way to choose the low-pass filter settings is by monitoring the measurement of time, for example using the LabOne Plotter tool. You can then use the built-in math tools to calculate the signal-to-noise ratio from a histogram of the results, and you can observe whether the filter response is fast enough to capture changes of the signal. For example for imaging applications, the filter settings need to be adjusted as a function of the pixel dwell time, to avoid smearing the information between different pixels.

In our whitepaper Principles of Lock-in Detection you can find a table where the settling time for the filter is given as a function of filter time-constant and filter order.

3. Is there a function to determine the best input range?

The input range needs to be chosen large enough to avoid clipping of the signal but as small as possible to maximize the resolution of the measurement. It is therefore difficult to fix the input range before performing the measurement. The best approach is to first perform a few test measurements at the extreme points of the experiment and then choose the range accordingly before you start a longer measurement. In LabOne there is an auto-range function that chooses the input range automatically. However, this only considers the signal at the current point in time, which is why it is important to adjust the range for the settings for which you expect the maximum signal. When running an experiment, it is good practice to check the OVI (overload input) flag at the bottom of the LabOne interface from time to time. If the range has been too small at any point in the past, there will be a yellow flag. If you observe this, you may want to repeat the measurement.

4. What is the best way to use two lock-in amplifiers in the same experiment?

The first question is whether you need to have two lock-in amplifiers, or whether one state-of-the-art instrument would be enough. As I showed in the webinar, our instruments have multiple demodulators which can be used to measure harmonics or arbitrary frequencies of the same signal. Furthermore, it is possible to perform tandem demodulation or measure sidebands of AM/FM signals directly. This way, it is not necessary to split the analog signal and distribute it to several instruments – improving both the SNR and simplifying the setup.

If you need to use several lock-in amplifiers, for example if you need more than one or two separate physical input channels, you can synchronize several instruments. Here it is important that both the frequencies are synchronized (which can be done by clock synchronization) as well as the timestamps of the measurement results. The second one is important when studying correlations as explained in this blog post.

In our instruments, we provide the Multi-Device Synchronization protocol, which allows us to synchronize multiple instruments – both their clocks and their timestamps. 

5. What is the purpose of connecting the Auxiliary Output 1 to the Auxiliary Input 1 in some of the schematics?

The purpose of this is to add a DC voltage to the AC voltage. For a typical experiment, you want to measure the differential conductance, which is the AC current divided by the AC voltage. Additionally, you may want to apply a larger potential difference to your device, which can be done with a DC voltage (that is much larger than the AC voltage). The AC voltage is generated with the Signal Output channel of the MFLI. The DC voltage can either be generated by an external device, or it can be generated using the Auxiliary Output channels of the MFLI (in the Aux tab of LabOne, choose “Manual” and then write the value).

Adding the voltages can be done with an analog adder which is integrated in the MFLI. For this, you connect the DC voltage to the Auxiliary Input 1 and then activate “Add” in the Output section of LabOne, see screenshot below. (One could of course also add the voltages externally, but using the integrated adder simplifies the setup.) Note that adding an analog voltage is better compared to applying a digital offset voltage, because you can work with a smaller voltage range for the AC component (see blog post here).

6. Does the input impedance affect the signal-to-noise ratio?

Yes, the input impedance can affect the signal-to-thermal-noise ratio. However, in many experiments, thermal noise is smaller than other noise coming from the experiment. 

Let's have a closer look at different effects of the input impedance:

  1. The signal amplitude is reduced by the factor \(Z_{in}/(Z_{in}+Z_{exp})\), where \(Z_{exp}\) is the impedance of the signal source and \(Z_{in}\) is the input impedance of the lock-in amplifier.
  2. Minimizing signal reflections improves phase and amplitude accuracy. To minimize reflections, match the output impedance of the source, the characteristic impedance of the connecting cable (which is typically 50 Ω), and the input impedance of the lock-in. This is particularly important at higher frequencies.
  3. High input impedance settings have a significant parallel capacitance.  When the source impedance is high, this makes the signal strength depend on frequency.  The 50 Ω setting removes this dependence, at the expense of attenuation.  
  4. Thermal noise is contributed by the real part of the input impedance.    

We need to evaluate these effects on overall signal quality, not just SNR. The first three are treated above.  Below, we look into the thermal noise in more detail. 

Every resistor has thermal noise, also called Johnson-Nyquist noise. The voltage power spectral density is given by \(v_{R}^{2} = 4k_{B}RT\), where \(k_{B}\) is the Boltzmann constant, \(T\) is the temperature, and \(R\) is the real part of the impedance. For a 50 Ω resistor at room temperature, \(v_{R} = 0.9\, nV/\sqrt Hz\).  The input noise voltage of the MFLI at frequencies above 1 kHz is \(2.5\, nV/\sqrt Hz\).  Both of these values are quite small, and in many experiments, negligible.  

In a typical setup, there are several sources of noise: input noise of the instrument \(v_{in}\), the output noise of the source \(v_{out}\), and the thermal noise of the input and output impedances whose net contribution is \(v_{th}\). The total noise is given by adding the power spectral densities of the individual contributions

 \(v_{tot}^{2} = v_{in}^{2} + v_{out}^{2} + v_{th}^{2}\) .

When connecting a signal to the input channel of the lock-in amplifier, the experiment output impedance \(Z_{exp}\) is in parallel with the input impedance \(Z_{in}\) of the instrument. The equivalent impedance is therefore given by 

 \(Z_{eq} =\) \(Z_{in}Z_{exp} \over Z_{in} + Z_{exp}\).

The thermal noise is dominated by the smaller of the two impedances. If the impedance of the experiment is much larger than 50 Ω, then the equivalent impedance and the thermal noise related to it are related to the input impedance. In this case, the variance increases if you change from 50 Ω to 10 MΩ input impedance. You still win on SNR because the signal amplitude increases faster.  If the impedance of the experiment is low, e.g. a photodetector or a source with a low output impedance, then the thermal noise is dominated by that value and the choice of input impedance of the instrument does not have a significant effect.

Here are some conclusions:

  • If we consider only the thermal noise of purely resistive impedances, the SNR increases when increasing the input impedance because the signal increases more than the noise. However, this effect is often negligible because the total noise is often dominated by the noise from the experiment.
  • To minimize the effect of signal reflections, use a 50 Ω source, a cable of characteristic impedance 50 Ω, and a 50 Ω input impedance.  
  • For a higher-impedance source, to minimize the frequency dependence of the signal gain, again a 50 Ω input impedance is useful.  The downside is a significant attenuation.  
  • When measuring the noise properties of a device without driving it, use a high input impedance, because otherwise one would only be measuring the thermal noise of the 50 Ω resistor.

An easy way to check the impedance choice is to monitor the measurement result over time, e.g. using the LabOne Plotter tool. With the math tools of the Plotter, the SNR can directly be extracted. You can then perform this measurement once with 50 Ω and once with 10 MΩ input impedance and compare the SNR.

7. Can you comment on when to use the Sinc filter?

In short, the Sinc filter takes a few data points per period (of the modulation frequency) and averages them to get a single value per period. This is useful to filter out components that correspond to the modulation frequency (or its harmonics) from the demodulated signal. This makes sense if you want to use a low-pass filter bandwidth that is very similar to the modulation frequency, i.e. when you need fast measurements but cannot modulate the experiment at high frequencies. You can find some more information here.

8. How can the phase of the harmonics be adjusted?

By default, the phase of the fundamental frequency and the harmonics is set to zero. If you want to change the phase, you can do this either using the LabOne GUI or the APIs.

9. How can we be sure that we don't filter out any important information?

You can only be sure not to remove any important information if you have a good knowledge of your experiment. Filtering always means that you remove part of the information, so there is always the risk of losing information. However, in a typical lock-in experiment, you can choose the frequency range of interest by choosing the modulation frequency. Depending on your experiment, it might also be a good idea to analyze the frequency response of your device before starting the experiment, for example by doing a frequency sweep, like I showed in the part about resonator characterization. Once the experiment is running, you can also check the spectrum of your signal in order to see whether there are any contributions that frequencies not equal to the modulation frequency, e.g. there might be multiple resonances, sidebands, or you might excite higher harmonics if you have non-linearities. Checking the spectrum of the input signal can easily be done with the built-in Scope tool in our instruments. Once you have identified one or several frequencies of interest, you can then demodulate the signal at these frequencies. By this, you will filter out a large part of the information, but if you have previously analyzed the frequency response, then you know that you only filtered out unwanted information.

10. For resonator characterization, at what frequency should I start, and what parameters do I need to adjust?

If you roughly know at what frequency you expect to see the resonance, then you can directly sweep a rather small frequency window around that frequency. If you have no information about the device, then you will need to scan the entire frequency range. With our instruments, it is very easy to do this with the built-in Sweeper tool. This tool will also adjust the time constant for every frequency point automatically.

Multi-frequency analysis

1. How can we use the dual frequency mode? Can both reference frequencies provided as external frequencies?

There are different ways to configure a dual-frequency experiment:

  • You can use two external reference frequencies and acquire them using ExtRef. This is shown for the MFLI Lock-in Amplifier in the screenshot below.
  • You can use one external reference frequency and one internal reference frequency: In this case, the external frequency is acquired by ExtRef (similar to the first case) and the second frequency is generated by an internal oscillator which can then be provided as an analog signal (sine wave with the Signal Output channel) or as a TTL signal (with the Trigger Output channels).
  • You can generate two internal reference frequencies: Similar to the second case, these can be provided as sine waves or TTL signals. Note that the MFLI only has one Signal Output channel, which means that only one sine wave can be provided, the second frequency would need to be a TTL signal. Or both frequencies can be TTL signals with the two Trigger Output channels.

2. Can you give some guidelines for the choice of frequencies for a double-modulation experiment? What are the pros and cons of tandem and sideband detection?

Often, one is not completely free to choose, and at least one of the frequencies is given by the experimental configuration, such as the repetition rate of a pulsed laser, or the resonance frequency of a cantilever, or MEMS device. If you are completely free to choose, then you want to consider the same things that we discussed for choosing the modulation frequency in any experiment: You want to choose modulation frequencies that are far away from any noise sources. Typically the faster the better, because you are far away from low-frequency noise and you can measure faster – but it depends on your experiment/sample whether you can use high frequencies. When you modulate with two frequencies you also want to consider the difference between the two frequencies: If the two modulation frequencies are very close (e.g. a difference of only 10 Hz), then you need to use a very small low-pass filter bandwidth to isolate the difference between the carrier and the sidebands. This makes the measurement very slow. On the other hand, if you have a large frequency difference, you can typically not use tandem demodulation, because the filter bandwidth needs to be large enough to capture the carrier and the sidebands. In this case, direct sideband detection would be the preferred choice. Another difference is that direct sideband detection allows you to capture the information from the upper and lower sidebands separately, which might contain different information.

A detailed comparison of tandem and direct sideband detection can be found in this blog post.

 

If you have any additional questions, please don't hesitate to reach out to me.