Harmonic Distortion Calculator Formula

Understand the math behind the harmonic distortion calculator. Each variable explained with a worked example.

Formulas Used

Total Harmonic Distortion

thd = rss_harmonics / fundamental * 100

True RMS Value

rms_total = sqrt(pow(fundamental, 2) + pow(harmonic_3, 2) + pow(harmonic_5, 2) + pow(harmonic_7, 2))

Variables

VariableDescriptionDefault
fundamentalFundamental Component (V1 or I1)(V or A)230
harmonic_33rd Harmonic(V or A)15
harmonic_55th Harmonic(V or A)12
harmonic_77th Harmonic(V or A)8
rss_harmonicsDerived value= sqrt(pow(harmonic_3, 2) + pow(harmonic_5, 2) + pow(harmonic_7, 2))calculated

How It Works

Total Harmonic Distortion (THD)

THD quantifies how much the waveform deviates from a pure sinusoid.

Formula

THD = sqrt(V3^2 + V5^2 + V7^2 + ...) / V1 x 100%

where V1 is the fundamental component and V3, V5, V7 are harmonic magnitudes. IEEE 519 recommends voltage THD below 5% at the point of common coupling for general systems.

Worked Example

A 230V supply with 15V 3rd harmonic, 12V 5th, and 8V 7th.

fundamental = 230harmonic_3 = 15harmonic_5 = 12harmonic_7 = 8
  1. 01RSS harmonics = sqrt(225 + 144 + 64) = sqrt(433) = 20.81
  2. 02THD = 20.81 / 230 x 100 = 9.05%
  3. 03This exceeds the 5% IEEE 519 limit; mitigation is needed.

Frequently Asked Questions

What causes harmonics in power systems?

Non-linear loads: variable frequency drives, rectifiers, switch-mode power supplies, LED drivers, fluorescent ballasts, and arc furnaces all draw non-sinusoidal currents that inject harmonics into the system.

What problems do harmonics cause?

Overheating of transformers and cables, nuisance tripping of breakers, interference with sensitive electronics, increased losses, and resonance with capacitor banks.

How are harmonics mitigated?

Passive harmonic filters tuned to specific frequencies, active harmonic filters that inject cancelling currents, 12-pulse or 18-pulse rectifier configurations, and phase-shifting transformers are common mitigation methods.

Ready to run the numbers?

Open Harmonic Distortion Calculator