Smart test
Synchronous detector assists precision low-level measurement
Synchronous detectors can extract small signals submerged in the noise floor for measurement of various physical quantities, such as extremely small resistance, light absorption or reflection under a bright background, or strain that exists under high noise levels.
In many systems, as the frequency approaches zero, the noise will continue to increase. For example, operational amplifiers have 1/f noise, and optical measurements are susceptible to noise caused by changes in ambient light conditions. Measurements made far away from low-frequency noise can increase the signal-to-noise ratio, so that weaker signals can be detected. For example, modulating the light source to several kilohertz can help measure reflected light that would otherwise be submerged in the noise floor. Figure 1 shows how modulation techniques can recover signals that were originally below the noise floor.
Figure 1. Using modulation to keep the signal away from noise sources
There are many ways to modulate the excitation signal. The simple way is to repeatedly open and close. This method is effective when driving LEDs, voltage sources that power strain gauge bridges, and other types of excitation. For the incandescent bulbs and other excitation sources that are not easy to switch on the spectrometer, the modulation can be achieved by using a mechanical shutter to cut off the light.
The narrowband bandpass filter can filter out all other frequencies except the target frequency, so that the original signal can be restored, but it may be difficult to design the required filters with discrete components. Another method is to consider the use of a synchronous demodulator, which can restore the modulated signal to DC while suppressing the signals that are not synchronized with the reference signal. Devices that use this technology are called lock-in amplifiers.
Figure 2 shows a simple lock-in amplifier application. A light source modulated at 1 kHz is used to illuminate the test surface. Then the photodiode measures the light reflected by the test surface, and its intensity is proportional to the degree of pollution on the surface. The reference signal and the measurement signal are both sine waves, and the frequency and phase are the same, but the amplitude is different. The reference signal for driving the photodiode has a fixed amplitude, and the amplitude of the measurement signal varies with the amount of reflected light.
Figure 2. Using a lock-in amplifier to measure surface contamination
The result of multiplying two sine waves is a signal with frequency components in the form of sum and difference frequencies. Here, the two sine waves have the same frequency, so the result is a DC signal and a signal that is twice the original frequency. The negative sign means it has a phase shift of 180°. The low-pass filter will filter out all components in the signal except the DC component.
When considering noisy input signals, the advantages of using this technique will become very obvious. Multiplication will only move the signal at the modulating frequency back to DC, and all other frequency components will move to other non-zero frequencies. Figure 3 shows a system with high noise sources of 50 Hz and 2.5 kHz. The weak target signal is modulated with a 1 kHz sine wave. The result of multiplying the input signal and the reference signal is a DC signal and other signals with frequencies of 950 Hz, 1050 Hz, 1.5 kHz, 2 kHz, and 3.5 kHz. The DC signal contains the required information, so a low-pass filter can be used to filter out other frequencies.
Figure 3. Synchronous demodulation picks up 1 kHz weak signal in the presence of 50 Hz and 2.5 kHz strong noise sources
Any noise component close to the target signal will appear at a frequency close to DC, so it is very important to select a modulation frequency that does not have a strong noise source nearby. If this is not possible, you need to use a low-pass filter with a very low cutoff frequency and a sharp response, but at the cost of a longer settling time.
Practical locking solution
It may be impractical to generate a sine wave to modulate the signal source, so some systems will switch to a square wave. Generating a square wave excitation is much simpler than generating a sine wave, and can be achieved using simple devices such as a switchable analog switch or a microcontroller pin of a MOSFET.
Figure 4 shows a simple way to implement a lock-in amplifier. A microcontroller or other device generates a square wave excitation that prompts the sensor to respond. This amplifier is a transconductance amplifier (for photodiodes) or an instrumentation amplifier (for strain gauges).
The signal used to excite the sensor is also used to control the ADG619 SPDT switch. When the excitation signal is positive, the amplifier is configured for gain +1. When the excitation signal is negative, the amplifier is configured with a gain of -1. This is mathematically equivalent to multiplying the measured signal by the reference square wave. The output RC filter will filter out any other frequency signals, so the output voltage is a DC signal, and the magnitude is equal to half of the peak-to-peak voltage of the measured square wave.
Figure 4. Lock-in amplifier using square wave excitation
Although the circuit is relatively simple, it is very important to choose the correct operational amplifier. The AC-coupled input stage can filter out most of the low-frequency input noise, but will not filter out 1/f noise and the offset error generated by an amplifier. The ADA4077-1 precision amplifier has 250 nV p-p noise from 0.1 Hz to 10 Hz and an offset drift of 0.55 μV/°C, making it ideal for this application.
A lock-in amplifier based on a square wave is relatively simple, but its noise suppression performance is not as good as that of a lock-in amplifier using a sine wave. Figure 5 shows the frequency domain representation of the square wave excitation and reference signal. The square wave is composed of the fundamental wave and the infinite sum of all odd harmonic sine waves. Multiplying two square waves of the same frequency requires each sine component of the reference signal to be multiplied by each sine component of the measurement signal. The result is a DC signal containing the energy of each harmonic of the square wave. Interfering signals appearing at odd harmonic frequencies will not be filtered out, but will be attenuated, depending on the harmonic in which they are located. Therefore, when selecting the modulation frequency, it is very important to ensure that its harmonics are not the frequencies or harmonics of any known noise source. For example, to suppress line noise, you should choose a modulation frequency of 1.0375 kHz (which will not coincide with 50 Hz or 60 Hz harmonics) instead of using 1 kHz (this is the 20th harmonic of 50 Hz).
Despite this shortcoming, the circuit is simple and low in cost. Compared with trying to make a DC measurement, using a low-noise amplifier and choosing an appropriate modulation frequency can still bring substantial improvements.
Figure 5. If the input signal (A) and the reference signal (B) are both square waves, multiplying them (C) can effectively demodulate each harmonic of the input signal.
Simple integration alternative
The circuit in Figure 4 requires an operational amplifier, a switch, and some discrete components. In addition, a microprocessor is required to provide a reference clock. An alternative is to use an integrated synchronous demodulator, as shown in Figure 6. The ADA2200 includes a buffered input, a programmable IIR filter, a multiplier, and a module that can shift the reference signal by 90°. It can easily measure or compensate for the phase shift between the reference clock and the input signal.
Figure 6. ADA2200 functional block diagram
When using the ADA2200 to implement the lock detection circuit, it is only necessary to apply a clock frequency equal to 64 times the required reference frequency, as shown in Figure 7. The default configuration of the programmable filter is a band-pass response, so there is no need to AC-couple the signal. The analog output will generate images at a speed several times the sampling rate, so an RC filter followed by a Σ-Δ ADC can be used to filter these images, and only the demodulated DC component of the signal can be measured.
Figure 7. Using the ADA2200 to implement a lock-in amplifier
Improved square wave locking circuit
Figure 8 shows an improved way of the square wave modulation circuit. The sensor uses a square wave for excitation, but the measurement signal is multiplied by a sine wave of the same frequency and phase. Now, only the signal content of the fundamental frequency will be moved to DC, and all other harmonics will be moved to non-zero frequencies. In this way, it is easy to use a low-pass filter to filter out all other components except the DC component in the measurement signal.
Figure 8. Using a sine wave as a reference signal prevents noise from demodulating to DC
Another difficulty is that if there is any phase shift between the reference signal and the measured signal, the resulting output will be smaller than when there is no phase shift. This can happen if the sensor signal conditioning circuit contains any filters that cause phase delay. In an analog lock-in amplifier, the solution to this problem is to add a phase compensation circuit in the reference signal path. This is not easy, because the circuit must be adjustable to compensate for various phase delays and will vary with temperature and component tolerances. A simpler alternative is to add a second multiplication stage, which multiplies the measured signal by a 90° phase-shifted version of the reference signal. The output signal of this second stage will be proportional to the inverted component of the input, as shown in Figure 9.
After two multiplier stages, the output of the low-pass filter is a low-frequency signal proportional to the input in-phase (I) and quadrature (Q) components. To calculate the amplitude of the input signal, simply sum the squares of the I and Q outputs. Another benefit of this architecture is that the phase between the excitation/reference signal and the input can be calculated.
Figure 9. Calculating amplitude and phase using a quadrature version of the reference signal
All the lock-in amplifiers discussed so far will generate a reference signal to excite the sensor. One improvement is to allow external signals to be used as reference signals. For example, the system in Figure 10 can use broadband incandescent lamps to test the optical properties of the surface. Such systems can measure parameters such as mirror reflectivity or surface contamination. Compared with the use of electronic modulation, it is much simpler to use a mechanical chopper disc to modulate an incandescent light source. A low-cost position sensor next to the chopper disc generates a square wave reference signal and feeds it to the lock-in amplifier. The phase-locked loop does not directly use this signal, but generates a sine wave with the same frequency and phase as the input reference signal. One point must be paid attention to when using this method, that is, the internally generated sine wave must have low distortion.
Figure 10. Using PLL to lock to external reference signal
Although the system can be implemented using discrete PLLs and multipliers, the use of FPGAs to implement the lock-in amplifier function brings multiple performance advantages. Figure 11 shows a lock-in amplifier built using FPGA, where the front end is based on the zero-drift amplifier ADA4528-1 and the 24-bit Σ-Δ ADC AD7175. This application does not require extremely high bandwidth, so the equivalent noise bandwidth of the lock-in amplifier can be set to 50 Hz. The device under test is any sensor that can be excited externally. The amplifier is configured to have a noise gain of 20 to take full advantage of the full-scale range of the ADC. Although the DC error does not affect the measurement, it is still important to minimize the offset drift and 1/f noise because they will reduce the available dynamic range, especially when the amplifier is configured for high gain.
The ADA4528-1 has an input offset error of 2.5 μV, which means that only 10 ppm of the AD7175 full-scale input range can be used when using a 2.5 V reference. The digital high-pass filter behind the ADC will filter out all DC offsets and low-frequency noise. To calculate the output noise, first calculate the voltage noise density of the AD7175. The noise specification given in the data sheet is 5.9 μV rms, and the test conditions are 50 kSPS output data rate, sinc5 + sinc1 filter and input buffer enabled. The equivalent noise bandwidth with these settings is 21.7 kHz, which results in a voltage noise density of 40 nV/√Hz.
The broadband input noise of the ADA4528 is 5.9 nV/√Hz, which appears as 118 nV/√Hz at the output, so the total noise density is 125 nV/√Hz. Since the equivalent noise bandwidth of the digital filter is only 50 Hz, the output noise is 881 nV rms. In the 2.5 V input range, this results in a system dynamic range of 126 dB. By adjusting the frequency response of the low-pass filter, we can trade bandwidth for dynamic range. For example, if the bandwidth of the filter is set to 1 Hz, the dynamic range is 143 dB, and when the bandwidth is set to 250 Hz, the dynamic range is 119 dB.
Figure 11. FPGA-based lock-in amplifier
The digital phase-locked loop generates a sine wave that is locked to the excitation signal. The excitation signal can be generated externally or internally, and does not have to be a sine wave. Any harmonic in the reference sine wave will be multiplied with the input signal, thereby demodulating the noise and other unwanted signals present in the harmonic frequency, just like multiplying two square waves. One advantage of generating the reference sine wave digitally is that extremely low distortion performance can be obtained by adjusting the digital precision.
Figure 12 shows four sine waves digitally generated using 4, 8, 16, and 32-bit precision. Obviously, the performance obtained by using 4-bit precision is not much different from the situation in Figure 5, but the situation will be improved soon after using higher precision. When 16-bit precision is used, it is difficult to generate analog signals with such low total harmonic distortion (THD). When 32-bit precision is used, THD exceeds –200 dB, which is unmatched by analog circuits. In addition, these are digitally generated signals, so they can be generated repeatedly. When the data is converted into digital and input into FPGA, it will not add any noise or drift.
After the multiplier, the low-pass filter will filter out any high-frequency components and output the in-phase and quadrature components of the signal. Since the equivalent noise bandwidth is only 50 Hz, there is no reason to transmit data at the original sampling rate of 250 kSPS. A decimation filter stage can be added to the low-pass filter to reduce the output data rate. The first step is to calculate the amplitude and phase of the input signal based on the in-phase and quadrature components.
Figure 12. Digitally generate a sine wave using different digital precisions
in conclusion
Low-frequency small signals submerged in the noise floor are very difficult to measure, but high-precision measurements can be achieved by applying modulation and lock-in amplifier technology. A simple lock-in amplifier can be an operational amplifier that switches between two gains. Although this will not bring noise performance, compared with simple DC measurement, this circuit has a simple structure and low cost, which makes it attractive. An improvement of this circuit is the use of a sine wave reference and multiplier, but this is more difficult to achieve in the analog domain. For performance, consider using a low-noise, high-resolution Σ-Δ ADC to digitize the input signal and generate a reference sine wave and all other elements in the digital domain.