The total harmonic distortion (THD or THDi) is a measurement of the harmonic distortion present in a signal; THD is defined as the ratio of the sum of the powers of all harmonic components to the power of the fundamental frequency. Distortion factor, a closely related term, is sometimes used as a synonym for THD.
In audio systems, equipment with lower distortion—such as loudspeakers, amplifiers, and microphones—reproduces an audio recording more accurately.
In radio communications, devices with lower THD tend to produce less unintentional interference with other electronic devices. Harmonic distortion can potentially widen the frequency spectrum of the output emissions from a device by adding signals at multiples of the input frequency. For this reason, devices with high THD are less suitable in applications such as spectrum sharing and spectrum sensing.
In power systems, lower THD implies lower peak currents, less heating, lower electromagnetic emissions, and less core loss in motors. THD is a key metric for the stability and quality of the U.S. electrical grid. The Institute of Electrical and Electronics Engineers (IEEE) Standard 519-2022 covers the recommended practice and requirements for harmonic control in electric power systems.
In an ideal system with an input and an output, such as an audio amplifier, the transfer function is linear and time-invariant. When a sinusoidal signal of frequency ω passes through a nonideal, nonlinear device, additional content is added at integer multiples nω (harmonics) of the original frequency. THD is a measure of this additional signal content that is absent from the input signal.
When the main performance criterion is the "purity" of the original sine wave—in other words, the contribution of the original frequency with respect to its harmonics—THD is most commonly defined as the ratio of the root mean square (RMS) amplitude of a set of higher harmonic frequencies to the RMS amplitude of the first harmonic (the fundamental frequency)
where Vn is the RMS value of the nth harmonic voltage, and V1 is the RMS value of the fundamental component.
In practice, THDF (where "F" stands for "fundamental") is commonly used in audio distortion specifications (as percentage THD); however, THD is not a standardized specification, and results across manufacturers are difficult to compare. Because individual harmonic amplitudes are measured, manufacturers need to disclose several values—the test signal frequency range, the level and gain conditions, and the number of measurements taken—for any results to be meaningful. It is possible to measure the full 20 Hz–20 kHz audio range using a sweep (though distortion for a fundamental frequency higher than 10 kHz is inaudible).
Measurements for calculating THD are taken at the output of a given device under specified conditions. THD is usually expressed as a percentage or in decibels (dB) relative to the fundamental as distortion attenuation.
A variant definition uses the fundamental plus harmonics as the reference:
The two definitions can be distinguished as THDF and THDR (where "R" stands for "root mean square"). THDR cannot exceed 100%. At low distortion levels, the difference between the two calculation methods is negligible. For example, a signal with a THDF of 10% has a very similar THDR of 9.95%. However, at higher distortion levels, the discrepancy becomes large. For example, a signal with a THDF of 266% has a THDR of 94%. As another example, a pure square wave with infinite harmonics has a THDF of 48.3% and a THDR of 43.5%.
Some use the term distortion factor as a synonym for THDR, while others use this term as a synonym for THDF.
In addition, the International Electrotechnical Commission (IEC) defines the term total harmonic factor as the "ratio of the RMS value of the harmonic content of an alternating quantity to the RMS value of the quantity", using a different equation.
THD + N refers to total harmonic distortion plus noise. This measurement is much more common and more comparable across devices. THD + N is usually measured by first inputting a sine wave, then notch-filtering the output, and finally comparing the ratio between the output signal with and without this sine wave:
Like THD, this measurement is a ratio of RMS amplitudes; it can be measured as THDF (with bandpassed or calculated fundamental as the denominator) or, more commonly, as THDR (with total distorted signal as the denominator).
A meaningful measurement must include its bandwidth. This measurement includes effects from ground-loop power-line hum, high-frequency interference, and intermodulation distortion between these tones and the fundamental, in addition to harmonic distortion. For psychoacoustic measurements, a weighting curve is applied—such as A-weighting or ITU-R BS.468 noise weighting—which is intended to accentuate frequencies that are most audible to the human ear, giving a more accurate measurement. A-weighting is only a rough estimate of the frequency sensitivity of human hearing, because it does not take into account the nonlinear behavior of the ear. The loudness model proposed by the scientist Eberhard Zwicker, described in the German standard DIN 45631 and the international standard ISO 532-1, accounts for these effects.
For a given input frequency and amplitude, THD + N is the reciprocal of the signal-to-noise and distortion ratio (SINAD), provided that both measurements are taken over the same bandwidth.
The distortion of a waveform relative to a pure sine wave can be measured in one of two ways: using a THD analyzer to separate the output wave into its constituent harmonics, and then noting the amplitude of each harmonic relative to the fundamental; or canceling out the fundamental using a notch filter and then measuring the remaining signal, which is the total aggregate harmonic distortion plus noise.
A sine wave generator with very low inherent distortion can be used as the input to amplification equipment, whose distortion at different frequencies and signal levels can then be measured by examining the output waveform.
Dedicated electronic equipment exists both to generate sine waves and to measure distortion; however, a general-purpose digital computer with a sound card and suitable software can also perform harmonic analysis. In addition, software can generate sine waves, although their inherent distortion may be too high for measuring very low-distortion amplifiers.
For many purposes, different types of harmonics are not equivalent. For instance, crossover distortion at a given THD is much more audible than clipping distortion at the same THD, because the harmonics produced by crossover distortion are nearly as strong at higher-frequency harmonics—such as 10 to 20 times the fundamental—as they are at lower-frequency harmonics, such as 3 or 5 times the fundamental. Those harmonics appearing far in frequency from a fundamental (a desired signal) are less easily masked by that fundamental. In contrast, at the onset of clipping, harmonics first appear at low-order frequencies and then gradually start to occupy higher-frequency harmonics. Therefore, a single THD number is inadequate to specify audibility and must be interpreted with care. In a listening study in 2003, Geddes and Lee found no significant relationship between listeners' ratings of distorted audio and measurements of this audio's THD or intermodulation distortion. Measuring THD at different output levels can reveal the source of the distortion: clipping, which decreases with a decreasing output level; or crossover, which stays constant with varying output levels and is thus a greater percentage of the sound produced at low volumes.
THD weights all harmonics equally, even though research has found that lower-order harmonics are harder to hear than higher-order ones at the same level. In addition, even-order harmonics are said to be generally harder to hear than odd-order ones.[better source needed] A number of methods have been developed to estimate the actual audibility of THD, and they are used to quantify crossover distortion or loudspeaker rub and buzz. These methods include high-order harmonic distortion (HOHD) or higher harmonic distortion (HHD), which measures only the 10th and higher harmonics, as well as metrics that apply psychoacoustic loudness curves to the residual signal.
For many standard signals, the THD criterion may be calculated analytically in closed form. For example, a pure square wave has a THDF equal to
The sawtooth signal possesses a
The pure symmetrical triangle wave has a
For the rectangular pulse train with the duty cycle μ (sometimes called the cyclic ratio), THDF has the form
and it reaches its minimum (≈0.483) when the signal is symmetrical (μ = 0.5)—that is, a pure square wave. Appropriate filtering of these signals may drastically reduce the resulting THD. For example, the pure square wave filtered by the Butterworth low-pass filter of the second order (with the cutoff frequency set equal to the fundamental frequency) has a THDF of 5.3%; by contrast, the same signal filtered by the fourth-order filter has a THDF of 0.6%. However, analytic computation of THDF for complicated waveforms and filters is often difficult, and the resulting expressions can be lengthy. For example, the closed-form expression for the THDF of the sawtooth wave filtered by the first-order Butterworth low-pass filter is simply
in comparison, the closed-form expression for the same signal filtered by the second-order Butterworth filter is given by the rather cumbersome formula
The closed-form expression for the THDF of the pulse train filtered by the pth-order Butterworth low-pass filter is even more complicated:
where μ is the duty cycle, 0 < μ < 1, and
{{cite journal}}: CS1 maint: periodical has ISBN (link)It has been shown that THDF is a much better measure of harmonics content. Employment of THDR in measurements may yield high errors in significant quantities such as power factor and distortion factor
This is the ratio, usually expressed in percent, of the summation of the root mean square (RMS) voltage values for all harmonics present in the output of an audio system, as compared to the RMS voltage at the output for a pure sinewave test signal that is applied to the input of the audio system.
This number indicates the RMS voltage equivalent of total harmonic distortion power, as a percentage of the total output RMS voltage.
Two equations exist to calculate the THD…
In the opinion of some, [THDF] exaggerates the harmonic problem. … [THDR] is used by the Canadian Standards Association and the IEC.
%THD-F … ratio of the harmonic components … to the voltage … of the fundamental alone. … %THD-R … ratio of the harmonic components … to the total voltage … including the fundamental and all harmonics.
[Crossover distortion] may barely register on a distortion meter, so the figures looked excellent. Unfortunately … listeners could hear the distortion - it was plainly audible, and sounded dreadful.
High-Order Harmonic Distortion (HOHD…) – A classic method for rub & buzz detection, HOHD uses the THD (Total Harmonic Distortion) ratio but only of harmonics above the 10th, 10-35, 20-200, etc., which is a simple way to account for frequency masking effects. … Rub & Buzz Loudness … Applies a psycho-acoustic loudness model to the residual signal to calculate the perceived level of the rub and buzz ...
HHD (higher harmonic distortion for harmonics from the 10th up to at most the 50th)