How to Choose the Optimal Demodulator Data Transfer Rate

August 30, 2022 by Heidi Potts

In this blog post, we will look at the data transfer rate of a Zurich Instruments lock-in amplifier in more detail and provide guidelines on how to choose it wisely.

Most information in the real world is continuous, such as light intensity or sound volume. The continuous information can be represented by an analog signal which is also continuous or it can be digitized to allow further processing of the information. A digital signal consists of individual data points, which means that they are quantized both in amplitude and time. When working with digital signals, proper sampling is important to capture the relevant information. In a digital lock-in amplifier, there are two places where a signal gets sampled:

1) At the signal input, where the analog signal is digitized by an analog-to-digital converter (ADC), and

2) After the digital signal processing when the measurement results are transferred from the instrument to the host computer where they can be displayed or saved.

Choosing a good sampling rate is important in both cases.

The sampling rate of the ADC is a hardware specification, and a low-pass filter at the signal input of the instrument avoids measurement artifacts by filtering out higher frequency components before the analog signal gets digitized. The speed with which the measurement results are sampled and sent to the host computer, on the other hand, can be chosen by the user. This parameter is called data transfer rate and can be set individually for each demodulator, PID controller, boxcar averager, etc. Figure 1 shows a screenshot from the LabOne® User Interface, where the data transfer of the 8 demodulators of the UHFLI Lock-in Amplifier can be activated individually and the rate can be chosen as a number between 0.42 Sa/s to 14 MSa/s.

Data transfer rate in the LabOne User Interface

Figure 1: Screenshot of the LabOne User Interface where the data transfer rate for the UHFLI Lock-in Amplifier can be chosen individually for the 8 demodulators.

How do you choose a good value for the data transfer rate? There are two considerations:

1) The data transfer rate needs to be fast enough to capture all relevant information from the measurement result.

2) The data transfer rate should not be higher than necessary, to avoid saving large data sets which contain only very little information.

A high data transfer rate is of course crucial when you would like to measure fast-changing signals. For example in imaging applications, the information from each pixel needs to be transferred to the host computer. In other applications, the demodulated signal (Demod R) oscillates at a certain frequency fsignal, as shown in Figure 2(a). There can be multiple reasons for such an oscillation. For example, if you measure an amplitude-modulated signal at the carrier frequency with a high low-pass filter bandwidth, the resulting measurement result contains the information from the envelope - which can then be recovered by tandem demodulation (see this blog post for more information about multi-frequency signals). While in the case of an amplitude-modulated signal the oscillation of the measurement result is created on purpose, an oscillating measurement result can also indicate that the low-pass filter is not configured correctly. In particular, for low modulation frequencies such as in low-frequency transport measurements, the 2f-component from the mixing process can leak into the result if the measurement bandwidth is too large (more information about the principles of lock-in detection can be found in our whitepaper). Finally, the oscillation can be related to an external noise source that is close to the modulation frequency and is not filtered out by the low-pass filter. 

Digitization of a continuous signal

Figure 2: Illustration of different data transfer rates. (a) Oscillating signal with a frequency signal. (b)-(d) Resulting data points with a data transfer rate corresponding to 9.2 times the signal frequency, 1.1 times the signal frequency, and equal to the signal frequency.

Whether or not the oscillation of the measurement result is designed on purpose, the data transfer rate needs to be high enough to be able to observe the oscillation. In all Zurich Instruments lock-in amplifiers, the signal processing on the FPGA is very fast compared to the data transfer speed to the host computer where the result can be visualized and saved using the LabOne User Interface or the APIs. For simplicity, we can therefore assume that the measurement result is a continuous signal which is then sampled at discrete time intervals, and the individual data points are sent to the host computer. The problem of choosing the right data transfer rate is therefore similar to the problem of digitizing an analog signal, where the Nyquist criterion needs to be fulfilled, which means that the data rate needs to be at least twice as fast as the highest frequency in the information that needs to be transmitted.

Figure 2(b) shows an example where the data transfer rate fdata is 9.2 times the signal frequency fsignal. If you look at the measurement data in the LabOne User Interface or with the APIs, you will only see the orange data points, but these are sufficient to contain all relevant information, i.e. the measurement signal is properly sampled. An example of improper sampling is shown in Figure 2(c), where the sampling frequency is only 1.1 times the frequency of the oscillation. If you only see the orange data points you see a new periodicity known as aliasing: If the data transfer rate is less than twice the signal frequency, the observed frequency corresponds to images of the signal frequency at fobs = ± n * fdata ± fsignal. An even more extreme example is shown in Figure 2(d), where the sampling frequency exactly corresponds to the oscillation frequency. By looking only at the orange data points, you get the impression that the measurement is well optimized because the signal-to-noise ratio is very high, but in reality, the measurement value is just an artifact.

The LabOne User Interface offers several useful tools to check the measurement data both in the time and the frequency domain. Let's look at an amplitude-modulated signal with a carrier frequency of 100 kHz and an amplitude modulation of 1 kHz. Figure 3(a) shows the signal in the Scope tool, where the carrier frequency and the amplitude modulation can be observed. This signal is then demodulated at 100 kHz with a low-pass filter bandwidth of 20 kHz. Due to the high low-pass filter bandwidth, the information from the amplitude modulation at fsignal = 1 kHz is not filtered out. Figure 3(b) shows the measurement result in the Plotter tool when using a data transfer rate of 214 kSa/s, where the 1 kHz modulation is clearly resolved. However, if the data transfer rate is reduced to fdata = 209.3 Sa/s, as in Figure 3(c), the amplitude modulation cannot be observed correctly. Instead, we see a modulation with a frequency of approximately 46 Hz. This corresponds to an image of the signal frequency at fobs = fsignal - 5*fdata. The Spectrum tool which provides the frequency spectrum of the demodulated result also shows the 46 Hz aliased result as a predominant peak, along with some smaller peaks due to other mirror images.

Figure 3: Visualizing the measurement data in the LabOne time and frequency analysis tools. (a) Scope tool showing an amplitude-modulated signal with a carrier frequency of 100 kHz and an amplitude modulation of 1 kHz. (b) Plotter tool showing the measured amplitude when demodulating the signal with a low-pass filter bandwidth of 20 kHz and sending the data to the host computer with a data transfer rate of 214 kSa/s. (c) The same measurement data when reducing the data transfer rate to 209.3 Sa/s. (d) Spectrum tool showing the frequency spectrum of the data with a transfer rate of 209.3 Sa/s. The frequency peak at 46 Hz is due to aliasing.

The same data transfer concept also applies to the APIs. The data transfer rate can be set using the node \demod\0\rate, where 0 refers to the first demodulator. The corresponding node for each parameter can quickly be found using the Command Log functionality of the LabOne User Interface. For more information please refer to the Programming Manual.

 

In summary, here are four steps how to choose the data transfer rate:

1) Optimize the low-pass filter settings such that all relevant information is captured (e.g. the envelope of an amplitude-modulated signal) and all unwanted noise components are filtered out. More information about how to optimize the low-pass filter settings can be found in this video.

2) Choose a data transfer rate that is at least twice as high as the highest frequency in your measurement result to avoid aliasing effects. For very fast measurements the data transfer rate can be maximized by using a non-continuous data transfer approach (as described in this blog post) or by using some of the tricks described in this blog post.

3) Check that the data transfer rate is not unnecessarily high to avoid saving large data sets which carry only very little information. As a rule of thumb, a data transfer rate 7-10 times higher than the demodulator bandwidth is a good starting point.

4) Make sure that the captured measurement data contains all relevant information and no artifacts by using the Plotter and Spectrum tools to monitor the results.

Once the measurement data is transferred from the instrument to the host computer it can be analyzed or saved using the LabOne User Interface or APIs. For more information please also refer to this blog post for tips and tricks on how to acquire the data from your instrument.

 

 

Reference:

Steven W. Smith. The Scientist and Engineer's Guide to Digital Signal Processing