Total Harmonic Distortion Calculator Formula
Understand the math behind the total harmonic distortion calculator. Each variable explained with a worked example.
Formulas Used
THD
thd_pct = rss_harmonics / v_fundamental * 100THD
thd_db = 20 * log10(rss_harmonics / v_fundamental)RSS of Harmonics
rss_total = rss_harmonicsVariables
| Variable | Description | Default |
|---|---|---|
v_fundamental | Fundamental Amplitude(V) | 1 |
v_2nd | 2nd Harmonic(V) | 0.02 |
v_3rd | 3rd Harmonic(V) | 0.015 |
v_4th | 4th Harmonic(V) | 0.005 |
v_5th | 5th Harmonic(V) | 0.003 |
rss_harmonics | Derived value= sqrt(pow(v_2nd, 2) + pow(v_3rd, 2) + pow(v_4th, 2) + pow(v_5th, 2)) | calculated |
How It Works
What is Total Harmonic Distortion?
THD measures the ratio of harmonic content to the fundamental, indicating how much a device distorts a pure signal.
Formula
THD = sqrt(V2^2 + V3^2 + V4^2 + V5^2 + ...) / V1 x 100%
Where V1 is the fundamental and V2, V3... are harmonic amplitudes.
Quality Benchmarks
Worked Example
Fundamental at 1.0 V with harmonics at 0.02, 0.015, 0.005, 0.003 V.
v_fundamental = 1v_2nd = 0.02v_3rd = 0.015v_4th = 0.005v_5th = 0.003
- 01RSS = sqrt(0.02^2 + 0.015^2 + 0.005^2 + 0.003^2)
- 02= sqrt(0.0004 + 0.000225 + 0.000025 + 0.000009) = sqrt(0.000659)
- 03= 0.02567 V
- 04THD = 0.02567 / 1.0 x 100 = 2.567%
- 05THD dB = 20 x log10(0.02567) = -31.8 dB
Ready to run the numbers?
Open Total Harmonic Distortion Calculator