THD Calculator: Total Harmonic Distortion (THD) Formula

thd
harmonic distortion
signal processing
formula
calculator

This THD calculator determines the Total Harmonic Distortion (THD). The THD formula employed in this calculator is detailed below. Additionally, THD conversion formulas to convert between THD (%) and THD (dB) are also used.

What is THD?

  • THD stands for Total Harmonic Distortion. It represents the ratio of the sum of harmonics to the fundamental signal component. Typically, the initial 5 to 6 harmonic components are considered for characterization.

  • In simpler terms, it’s the ratio of the RMS (Root Mean Square) value of the fundamental signal to the mean of the root-sum-square of its harmonics, including all noise components (excluding DC). In FFT (Fast Fourier Transform) analysis, the bandwidth is usually taken from DC to Fs/2 (where Fs is the sampling frequency).

  • THD can be expressed in dB, dBc, or as a percentage (%).

THD measurement plots

Figure 1: THD measurement plots

Figure 1 illustrates a fundamental signal along with six harmonic components in a frequency spectrum. The first five to six harmonic components are crucial in introducing distortion to the intended fundamental signal. These components are therefore used in THD calculation, as outlined below.

THD Calculator - 1

Inputs

Outputs

The following THD calculator #1 computes THD (Total Harmonic Distortion) based on the dBm values of the fundamental signal and six harmonic signals. Note that this calculation is approximate since noise and other distortion levels are not explicitly factored in.

Example:

  • Input: Fundamental signal (dBm) = 16.17, Harmonic #1 = -35.3 dBm, Harmonic #2 = -6.83 dBm, Harmonic #3 = -40.6 dBm, Harmonic #4 = -35.1 dBm, Harmonic #5 = -37.5 dBm, Harmonic #6 = -54 dBm
  • Output: THD in % = 7.0943, THD in dB = -22.9817

THD Formula or THD Equations

The following THD formula or THD equations are used to calculate THD (%) in this Total Harmonic Distortion calculator.

THD formula for THD calculation

After calculating THD (%) using the equation above, the following formula is used to convert THD (%) to THD (dB).

THD (%) to THD (dB) conversion

  • If harmonic signals are expressed in dBc values, and the fundamental signal is in dBm, you can calculate the dBm values for the harmonics and then use the THD calculator above.

  • For instance, if the fundamental signal (reference signal) is 15 dBm and Harmonic 1 is -42 dBc, you can calculate its dBm value as -27 dBm (i.e., -42 + 15).

  • If the fundamental and harmonics are provided in V(peak), these can be converted to V(rms) values. You can then use the THD formula above to calculate THD (%).

Battery Charging Time Calculator and Formula

Battery Charging Time Calculator and Formula

Calculate battery charging time using a simple formula based on battery capacity and charging current. Estimate the hours needed to fully charge your battery.

battery
charging
time
Loop Antenna Calculator and Formula

Loop Antenna Calculator and Formula

Calculate parameters for loop antennas using this handy calculator. Learn about loop antenna types, characteristics, and the formulas behind their design.

antenna
loop
calculator