Design a DSP lock-in amplifier, Part 1: Background

-December 27, 2017

Lock-in amplifiers let you measure very small signals that would otherwise get lost in the noise of even the best available amplifiers. Originally analog circuits, lock-in amplifiers have evolved into hybrid analog/digital instruments. Using software-defined radio (SDR) techniques, you can design a reconfigurable lock-in amplifier. By implementing the amplifier's features in software, you can define your own response and use it to customize measurements of low-frequency signals.

Developed by Robert H. Dicke, lock-in amplifiers modulate a signal, AC amplify it, synchronously demodulate it, and apply a very narrow low-pass filter (LPF). This process results in a very narrow bandwidth detection and hence a very low noise floor.

I'll explain the concepts behind lock-in amplifiers and the high-level designs used to develop an SDR-based lock-in amplifier. If you're familiar with the theory of the lock-in technique and analog lock-in amplifiers, then go directly to Design a DSP lock-in amplifier, Part 2: Design methodology. If you need a backgrounder, then continue below.

Basic lock-in technique
All electrical systems experience increasing noise as the frequency approaches DC, known as 1/f noise [1]. Even though amplifier noise has been reduced nearly 1000x since the 1940s, 1/f noise is still a limiting factor in many high-performance measuring systems. The lock-in amplifier technique is an effective way to deal with excess noise.

Figure 1 shows a common experiment limited by noise. This example uses the measurement of optical absorption by illuminating a test sample with a light source. Although it's an optical example, you can apply the same technique to electrical signals.

Lock-in amplifier technique
Figure 1 A typically challenging optical measurement. High attenuation of the optical sample makes measuring the resulting light intensity difficult because of detector and amplifier noise.


The light's amplitude greatly attenuates when it passes through the optical sample, thus necessitating amplification to get a measurable signal. The signal plot in Figure 2 illustrates the signal and noise problem. This experiment will yield poor results as the resulting signal is below the detector and amplifier noise. Interfering signals are typically power line (50/60 Hz) related.

text
Figure 2 A signal and noise diagram for the measuring system of Fig. 1. The attenuated signal (red) is obscured by the detector + amplifier 1/f noise. Interfering signals are usually also present.


The Lock-In Amplifier technique (Figure 3) solves this problem. First, the light source is modulated (chopped) at some frequency high enough to move the signal out of the detector + amplifier 1/f noise region, and away from any interfering signals. At one time, a rotating mechanical light chopper might have been used, today an LED or Laser illumination source could be electrically switched on and off.

Lock-in amplifier
Figure 3 The Lock-In Amplifier solves the measurement problem of Fig. 1 using a rotating wheel chops, or modulates, the light.


The modulated light passes through the optical sample and is detected by the photo-detector. The detected AC signal is then amplified by a low noise amplifier (Figure 4). The signal is then demodulated with a synchronous demodulator operating at the same frequency as the light chopper.

a demodulator runs at the same frequency as the chopper
Figure 4 After modulating (chopping) the signal (red) is now shifted up in frequency to avoid the amplifier noise and any interfering signals (blue).


After demodulation, the original signal is again at DC. This DC signal can then be filtered with a very narrow low-pass filter (LPF). The resulting system noise bandwidth can be made very small resulting in a greatly improved signal to noise ratio (SNR).

Classical analog lock-in
The basic Lock-In amplifier consists of a reference source output that modulates the experiment's driving signal. It also drives a synchronous demodulator (Figure 5). As you'll see later, phase relationship between the signal source and the demodulator is important.

Lock-in amplifier diagram
Figure 5 The basic block diagram of a Lock-In Amplifier. The various function blocks may be: analog, digital or a combination of both.


The first synchronous demodulators were analog and were built with a switched, +1/-1 gain amplifier combination. One possible circuit is shown in Figure 6. Using the best available discrete circuits today [2] lets you use this same technique to extend from DC to better than 1 MHz modulation frequency.

text
Figure 6 The first lock-in amplifiers used a square wave synchronous demodulator similar to what is shown here. The gain is switched from +1 to -1 at the modulation frequency.


A square wave performs the demodulation function. This technique has a response at the fundamental modulation frequency and its odd harmonics. These harmonic responses are impossible to separate from the desired fundamental response and therefore can, if large enough, add to measurement errors [3].

You can use other circuit configurations for the synchronous demodulator. At higher frequencies, for example, the circuit in Figure 6 can be replaced with a diode ring mixer, which can extend the useful demodulation frequency range to several hundred megahertz.

The demodulator in Figure 6 has been available in IC form since the 1980s as the Analog Devices AD630. A more modern analog/digital crossover IC (ADA2220) is also available.

The circuit in Figure 6 is also called a Phase Sensitive Detector. For instance, if the demodulation signal and the frequency of the switching are in phase the output of the circuit will be essentially a full wave rectifier. In this case, the DC output of the LPF will be proportional to the signal's amplitude.

Conversely, if the phase of the demodulating signal is shifted 90° (or in quadrature) with respect to the input signal, the LPF's output will become sensitive to the input signal's phase.

This phase sensitive demodulation is detailed in Figure 7 and Figure 8. The input signals in are shown as sine waves as this is the easiest way to visualize the phase relationships of the various signals. The actual input signal can be of any waveform shape.

Signals are in phase
Figure 7 If the input signal (VG1) and the demodulating signal (VG2) are in phase, then the circuit in Fig. 6 acts like a full-wave rectifier and the output (VF1) is proportional to the input signal's amplitude. After low-pass filtering, the output would be a DC signal.

text
Figure 8 If the input signal (VG1) and the demodulating signal (VG2) are 90° out of phase (quadrature), then the circuit of Fig. 6 acts like a phase detector and the output (VF1) is proportional to the phase difference between the signals. In this case, the DC Level (VF1) is zero when the signals are exactly 90° out of phase.


From Figures 7 and 8, you can see that when using the classical synchronous demodulator of Figure 6, the phase relationship of the signals is critical when measuring either phase or amplitude. Wandering amplitude or phase will not give consistent readings with this type of circuit. This "Analog" lock-in amplifier technique was used by Hewlett-Packard starting in 1958 in microwave power meter and continues to be used today in the Keysight E4416A.

Continue to Design a DSP lock-in amplifier, Part 2: Design methodology.

Steve Hageman is owner of AnalogHome.

Related articles:

Loading comments...

Write a Comment

To comment please Log In

FEATURED RESOURCES