Harmonic Component Calculator

Decomposes a periodic waveform (square, triangle, sawtooth, or half/full-wave rectified sine) into its harmonic components using the closed-form Fourier series for each waveform type. Enter the amplitude, fundamental frequency and number of harmonics to compute per-harmonic frequency, amplitude, RMS value and attenuation relative to the fundamental, plus a spectrum plot and a time-domain reconstruction from the summed harmonics.

Harmonic (n) Frequency [Hz] Amplitude [V] RMS [V] Attenuation [dB]

Calculated Formulas (\(A_n\))

Square Wave: $$ A_n = \frac{4 U_m}{n \pi} \quad \text{(odd } n \text{ only)} $$
Triangle Wave: $$ A_n = \frac{8 U_m}{n^2 \pi^2} \quad \text{(odd } n \text{ only)} $$
Sawtooth Wave: $$ A_n = \frac{2 U_m}{n \pi} \quad \text{(all } n \text{)} $$
Half-Wave Rectified Sine:
For \(n=1\): $$ A_1 = \frac{U_m}{2} $$ For even \(n\): $$ A_n = \left| \frac{2 U_m}{\pi(1-n^2)} \right| $$ (Odd \(n > 1\) are zero)
Full-Wave Rectified Sine:
For even \(n\): $$ A_n = \left| \frac{4 U_m}{\pi(1-n^2)} \right| $$ (Odd \(n\) are zero)
Note: The fundamental frequency of the rectified signal is \(2f\) (period is halved). Therefore, the 1st harmonic (\(f\)) of the source is empty, and the "main" component is at \(2f\) (2nd harmonic).