Library / Signal processing and digital filters / DSP-18
Signal processing and digital filters
Total harmonic distortion from measured harmonics
Total harmonic distortion in percent from the RMS amplitudes of harmonics of order 2 to 5 (set unused ones to zero) and the RMS fundamental V1.
- Ref
- DSP-18
- Rev
- v1
- Field
- Signal processing and digital filters
- Result
- THD [%]
Total harmonic distortion is the RMS sum of the harmonic amplitudes divided by the fundamental, THD = √(V₂² + V₃² + …)/V₁, here in percent. Use RMS values for all of them, leave out DC and broadband noise, and state the highest harmonic order and the bandwidth, since both change the result.
Total harmonic distortion in percent from the RMS amplitudes of harmonics of order 2 to 5 (set unused ones to zero) and the RMS fundamental V1. Exclude DC and broadband noise, and report the highest included order and the measurement bandwidth.
Calculator
- Distortion relative to the fundamental−26.02 dB
- RMS of all harmonics0.05 V
- Total RMS including the fundamental1.001 V
What drives the result
Each variable is moved across its typical range while the others stay at the values above. The longest bar is the key driver.
- The distortion is 5 % of the fundamental, −26.02 dB.
- Because harmonics add in quadrature, the largest one dominates: here it is 0.04 V of a total of 0.05 V.
Chart data as tables
Ranked variables
| Variable | Typical range | Lowest result | Highest result | Swing (%) | Local step | Change in result |
|---|---|---|---|---|---|---|
| V1 Fundamental RMS amplitude | 0.001 to 100 V | 0.05 | 5,000 | 5,000 | +10% | −9.09 % |
| V3 Third harmonic RMS | 0 to 1 V | 3 | 100 | 97.04 | +10% | +6.51 % |
| V2 Second harmonic RMS | 0 to 1 V | 4 | 100.1 | 96.08 | +10% | +3.71 % |
| V4 Fourth harmonic RMS | 0 to 1 V | 5 | 100.1 | 95.12 | +10% | 0 % |
| V5 Fifth harmonic RMS | 0 to 1 V | 5 | 100.1 | 95.12 | +10% | 0 % |
Sweep of Third harmonic RMS
| Third harmonic RMS (V) | Total harmonic distortion (%) |
|---|---|
| 0 | 3 |
| 0.125 | 12.85 |
| 0.25 | 25.18 |
| 0.375 | 37.62 |
| 0.5 | 50.09 |
| 0.625 | 62.57 |
| 0.75 | 75.06 |
| 0.875 | 87.55 |
| 1 | 100 |
Sweep one variable
Variables and how each one contributes
Total harmonic distortion
What the equation gives you. Everything else feeds it.
Fundamental RMS amplitude
The RMS amplitude of the fundamental, in V. A larger fundamental lowers the distortion percentage in inverse proportion. Raising it by 10 % (to 1.1) moves the result by −9.09 %, from 5 to 4.545 %.
Second harmonic RMS
The RMS amplitude of the second harmonic, in V. Adds to the distortion in quadrature. Raising it by 10 % (to 0.033) moves the result by +3.71 %, from 5 to 5.186 %.
Third harmonic RMS
The RMS amplitude of the third harmonic, in V. Adds to the distortion in quadrature. Raising it by 10 % (to 0.044) moves the result by +6.51 %, from 5 to 5.325 %.
Fourth harmonic RMS
The RMS amplitude of the fourth harmonic, in V. Adds to the distortion in quadrature. Raising it by 10 % (to 0) moves the result by +0 %, from 5 to 5 %.
Fifth harmonic RMS
The RMS amplitude of the fifth harmonic, in V. Adds to the distortion in quadrature. Raising it by 10 % (to 0) moves the result by +0 %, from 5 to 5 %.
Worked example with the values above
- Sum of squares: 0.03² + 0.04² + 0² + 0² = 0.0025 V².
- Root: √0.0025 = 0.05 V.
- THD = 100 × 0.05 / 1 = 5 %.
Assumptions and limits
- A stationary signal with a tone of constant amplitude and frequency, and a record that holds a whole number of cycles for the coherent formulas.
- A single, well-isolated spectral peak for interpolation, and a bandwidth that is stated.
Common mistakes
- Including noise or DC in the harmonic sum.
- Using peak amplitudes for some harmonics and RMS for others.
- Not reporting how many harmonics were included.
Statistics and uncertainty
Tone amplitude and phase from a single FFT line are accurate to a fraction of a per cent only for a coherent record; for a non-coherent tone, scalloping loss of up to 3.9 dB (rectangular window) or 1.4 dB (Hann) adds error unless it is corrected.
Where it is used
- Measuring amplitude, phase and distortion of tones in an FFT record.
- Refining a frequency estimate without a longer record.
Maths you need
- Coherent sampling: a whole number of signal cycles in the record
- Spectral peak: a local maximum in the spectrum
- Parseval’s theorem: power in the time domain equals power in the frequency domain