A pair of articles by Steve Hageman of AnalogHome provides an in-depth look at how a classic analog function is now implemented using DSP.
Lock-in amplifiers use a modulation or chopping technique, demodulation, and filtering to produce a low-noise signal that you can measure even when the original signal's amplitude is below that of your instrument's noise floor. As with all analog circuits, lock-in amps need hardware to perform each function. That's fine if you're making the same measurements day in and day out, but what if your measurement needs change — which we all know they do?
Enter the digital lock-in amplifier. By performing the signal processing digitally, you can alter measurements as your needs change. Think of a digital lock-in amp as a software-defined radio for measurements. You can fine-tune them in software or adapt them to suit your needs.
Design consultant and 2013 Jim Williams contributor of the year award winner Steve Hageman of AnalogHome has designed a DSP-based lock-in amp, and he shared his design methodology in a pair of articles. Part 1 describes the theory behind the lock-in amp. Here, you'll get a tutorial on the theory behind the lock-in amplifier. Hageman uses an optical example, but you can apply the concept to any electrical circuit.
Lock-in amplifiers modulate a signal, then demodulate it before applying a narrow-band filter to reduce noise.
If you're already familiar with the classic lock-in amplifier, then jump to Design a DSP lock-in amplifier, Part 2: Design methodology
. Here, Hageman explains how he designed the DSP-based lock-in amp and why he chose the components. For example, you might think he used an FPGA to perform the signal processing. Instead, Hageman used a microcontroller that has enough processing power and I/O for the job. Scroll down to the end of Part 2 for an explanation, which includes notes on choosing the other components, such as an analog-to-digital converter (ADC), the clock source for the modulator circuit, the analog front end, and the power supply.
From a software perspective, Hageman explains when and why to use over-sampling or under-sampling. "By varying the number of samples taken, sample rate, and the processing algorithms, you can achieve nearly any desired demodulation." The article then explains the pros and cons of using DSP functions such as Fast Fourier Transforms (FFTs), de-embedding, and cross-spectrum analysis to reduce the noise floor. Because these techniques are implemented in software, you can use whichever technique works best for you.
Perform cross-spectrum analysis by vector summing one complex FFT output with the complex conjugate of another identical channel. If the additive noise is uncorrelated in both analog channels, then the noise will cancel with averaging. Given enough averages, this technique can enhance the noise floor by 20 dB or more.
Using an ADC to digitize a signal and then applying DSP lets you create a flexible system for measurements or other applications. As Hageman shows, you can build a library of DSP functions and apply them as needed. The hardware becomes ubiquitous. Similar techniques have been used for years to create flexible test systems. Microcontrollers and FPGAs have made that easier.
covers test and measurement for EE Times
. Contact him at email@example.com
Related articles by Steve Hageman: