Designing total-harmonic-distortion (THD) measurement into a system usually involves a notch filter and a broadband ac measurement. The problem with this technique is that it measures both THD and noise. DSP-based test equipment can calculate just the THD, but this isn't practical for most portable equipment.
However, system designers can add THD measurement capability by using a bank of band-pass filters set at the harmonics of the fundamental, along with a notch filter. This approach doesn't require a microcontroller.
Figure 1 shows a circuit that measures THD directly, without noise. The MSHN1 is a switched-capacitor high-pass/notch filter that features three settings for the notch filter (narrow, wide, and deep). The MSFS5 is a switched-capacitor low-pass/ band-pass filter.
The output of the MSHN1 before the bank of MSFS5s provides the THD + noise signal needed for measurement. By setting the filter to a one-sixth-octave filter and generating clocks at 100 times the harmonic frequencies, the summed outputs supply a THD output that can be measured directly. Because three of the filter clocks are at divide-by-three, divide-by-five, and divide-by-six, the clock generator is more complex than a simple 74HC4040 binary divider. The 74HC163N, 74HC390, and 74HC393 generate the clocks for the third-and fifth-harmonic filters.
The TI TLC081 op amp sums the six band-pass filter outputs to generate the single summed signal. Figure 2 illustrates the op-amp output.
Depending on the complexity of the THD meter, the TLC081's output connects either to the analog input of the display controller, or to an LM3914 linear dot/bar display driver for a simple 10-segment THD display of the input waveform.