Your Equation

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

Solve for
%
V
0.001100
V
01
V
01
V
01
V
01
  • 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.

Total harmonic distortion (%) current value 5 %
V1Fundamental RMS amplitudeKey driver
0.055,000
V3Third harmonic RMS
3100
V2Second harmonic RMS
4100
V4Fourth harmonic RMS
100
V5Fifth harmonic RMS
100
  • 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

VariableTypical rangeLowest resultHighest resultSwing (%)Local stepChange in result
V1 Fundamental RMS amplitude0.001 to 100 V0.055,0005,000+10%−9.09 %
V3 Third harmonic RMS0 to 1 V310097.04+10%+6.51 %
V2 Second harmonic RMS0 to 1 V4100.196.08+10%+3.71 %
V4 Fourth harmonic RMS0 to 1 V5100.195.12+10%0 %
V5 Fifth harmonic RMS0 to 1 V5100.195.12+10%0 %

Sweep of Third harmonic RMS

Third harmonic RMS (V)Total harmonic distortion (%)
03
0.12512.85
0.2525.18
0.37537.62
0.550.09
0.62562.57
0.7575.06
0.87587.55
1100

Sweep one variable

Total harmonic distortion (%)Hover, touch, or use the arrow keys on the chart
020406080100 00.20.40.60.81 Third harmonic RMS (V) now 5

Variables and how each one contributes

THD

Total harmonic distortion

Result · %

What the equation gives you. Everything else feeds it.

V1

Fundamental RMS amplitude

V · typical 0.001 to 100

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 %.

V2

Second harmonic RMS

V · typical 0 to 1

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 %.

V3

Third harmonic RMS

V · typical 0 to 1

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 %.

V4

Fourth harmonic RMS

V · typical 0 to 1

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 %.

V5

Fifth harmonic RMS

V · typical 0 to 1

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

  1. Sum of squares: 0.03² + 0.04² + 0² + 0² = 0.0025 V².
  2. Root: √0.0025 = 0.05 V.
  3. 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

Related formulas

Practise this formula