Not all Distortion is Created Equal; A Guide to THD & THD+N


A Guide to THD and THD+N
.pdf
Download PDF • 692KB

Distortion is arguably the most commonly compared specification between audio products. Consumers often use this as the first technical benchmark when purchasing a piece of equipment.


Even the name “distortion” has a bad connotation. Nobody wants distortion added to their audio, right?


This article is a discussion on what distortion (specifically THD) actually is, how it is measured, and how different amplifiers with the same distortion specification can actually sound very different.

1. Distortion

Distortion is a generic term used to describe unwanted artifacts added to an audio signal as it passes through an amplifier, preamplifier, ADC or DAC. Essentially any and every component a signal passes through (audio or other) adds some amount of distortion.


It is an inevitability of the world we live in. Nothing is perfect.


2. Thinking in Terms of Frequency

First, to understand THD we must think about audio signals in a different way.


We are all familiar with how signals look vs time. We can remember high school math functions like Sine, Cosine, and Tangent. With elapsed time, the amplitude varies positive and negative around a center point with a fixed amplitude and frequency. The X-axis is time, the Y-axis is the amplitude at any given point in time. This is known as the time domain since our perspective is relative to time.


Let’s now think of one of these signals displayed on a set of axes where the X-axis is the frequency of the signal, and the Y-axis is the amplitude. This is known as the frequency domain. Our view shows the spectral (frequency and amplitude) content of a signal.



Time Domain Signal Plot
Figure 1: Time Domain Signal Plot

We can take the signal above and now view it in the frequency domain as a spectral plot.


Frequency Domain Plot of the Signal Above
Figure 2: Frequency Domain Plot of the Signal Above

Note the Y-axis displays a vertical bar that reaches the same amplitude as before. The bar is located on the X-axis at a frequency corresponding to the frequency of the time domain signal.


Why is this useful?

Because signals are often much more complex than a simple single frequency sine wave. By using a spectral plot, we can transform a complex time domain signal and understand all the frequencies and the associated amplitude of each of those frequencies for additional analysis.


If we have a signal comprised of 2 frequencies and view the signal in the frequency domain, we can easily unravel the contents of the signal.



Two Frequency Signal
Figure 3: Two Frequency Signal


Two Frequency Signal Broken into its Components
Figure 4: Two Frequency Signal Broken into its Components

To take this one step further, any time domain wave shape can be created though the addition of many pure tone waves of varying frequency and amplitude.


This also works in reverse. The most complex of waveforms can be represented in the frequency domain as many pure tone signals of different amplitudes.


This is called the Fourier Series.

Fourier, a French mathematician, proved this theory and provided the foundation for most signal processing techniques today.


The measurement of THD uses this concept.


3. THD - Total Harmonic Distortion

For audio equipment, THD is measured by injecting a known sinusoid signal into the Device Under Test (DUT) and comparing

the output of the device to the input signal.


Since the input signal is our reference, we can think of the distortion artifacts as harmonics (or frequency multiples) of the fundamental signal in the frequency domain.


These harmonics are then aggregated and compared to the input signal. Hence, the measurement we make is the total of all resulting harmonics or Total Harmonic Distortion.


THD% Calculation
Equation 1: THD% Calculation

In Equation 1, the numerator is a power summation of the amplitudes of all the harmonics (second harmonic H2, third harmonic H3, fourth harmonic H4, etc). The denominator is the fundamental or input test signal amplitude. The fundamental is also referred to as the first harmonic but we will avoid using this terminology to prevent confusion. This gives us a ratio of the signal we care about (the fundamental) relative to all of the unwanted signals (the harmonics).


The source of these harmonics in audio equipment is due to the nonlinearities that exist in all circuit components as well as the overall circuit design and topology choices made… more on that later.


3.1 Measuring THD

Below shows the flow through of an audio device, where a sine wave fundamental signal is injected into the input of the DUT. The output is monitored by an audio analyzer which gives us the THD as a number.



THD Test Signal Chain
Figure 5: THD Test Signal Chain

If we look at the output from the DUT in the frequency domain, we may see something like the following where the DUT has added the harmonics H2, H3, H4 and H5.


Fundamental and Harmonics
Figure 6: Fundamental and Harmonics

So how does an audio analyzer actually compute THD?

The audio analyzer duplicates the signal from the DUT on two separate paths.


THD Audio Analyzer Diagram
Figure 7: THD Audio Analyzer Diagram

Using specially designed filters in each path, path 1 effectively calculates the numerator and path 2 denominator of the THD calculation in Equation 1.



Path 1: The first path uses a filtering circuit to remove the fundamental tone from the rest of the signal. This type of filter is called a notch filter. It is highly tuned to only attenuate a very narrow frequency band. The notch filter is placed at the same frequency as the fundamental, effectively removing it from the signal. This passes the remaining harmonics downstream.



Notch Filter Removes Fundamental
Figure 8: Notch Filter Removes Fundamental

Path 2: The second path does the exact opposite as the first. It is a selective filter that is highly tuned to only pass a very narrow frequency band. This is called a band pass filter. It effectively removes all frequencies other than the fundamental.


Bandpass Filter Leaves Fundamental
Figure 9: Bandpass Filter Leaves Fundamental

With each of these paths working in parallel, the output amplitudes of each path can be compared and computed into the THD of the DUT.


Note: It is worth noting here that even our fundamental source will have some amount of distortion. Again, this is unavoidable. The goal of any quality audio analyzer is to provide a fundamental test signal that has substantially lower distortion than the DUT itself. This will ensure that the DUT is being measured accurately.


A common check of any distortion measurement equipment is a loopback test where the DUT is removed and the fundamental signal source is fed directly into the analyzer.


This will determine the residual distortion of our measuring equipment.

4. THD+N - Total Harmonic Distortion Plus Noise

With a solid understanding on THD, we now must make a modification… We must account for noise.


Noise, like THD, is unavoidable. If you live on earth, then the physics of this planet dictate that all electrical signals will have noise. By considering noise of the DUT, we can reason that the signal amplitude is never truly zero between each harmonic in our spectral plots.


The noise floor of the DUT is fixed and contributes to the overall amplitude measured by audio analyzers.



Noiseless vs Noisy DUT
Figure 10: Noiseless vs Noisy DUT

In figure 10, notice how the additional of noise in the right plot sets the “floor” of our measurement. The amplitude never decays to zero. In this example, the noise masks the higher frequency H4 and H5 harmonics because their amplitude is lower than the noise floor.


Therefore THD+N is calculated with the addition of a noise term in the numerator. Noise is an additional unwanted artifact.