Interactive Lecture
Decomposing Periodic Signals into Sinusoidal Components
by Dr Arnaldo Delli Carri
Fourier's theorem tells you something profound about periodic signals: any periodic function, however complex its shape, can be exactly represented as a sum of simple sinusoids. A square wave, a sawtooth, the pressure fluctuation in a turbine — all are, in principle, nothing but overlaid cosines and sines at harmonically related frequencies. Formalised by Joseph Fourier in 1822 while studying heat conduction, this idea now underpins signal processing, vibration analysis, power electronics, and acoustics.
Any periodic signal is a superposition of sinusoids at integer multiples of its fundamental frequency. Each sinusoid — called a harmonic — contributes its own amplitude and phase. The Fourier series gives you the exact recipe for decomposing or rebuilding the signal from those components.
For a periodic function \(f(t)\) with period \(T\), the Fourier series is:
\[f(t) = \frac{a_0}{2} + \sum_{n=1}^{\infty}\!\left[a_n\cos\!\left(\frac{2\pi n t}{T}\right) + b_n\sin\!\left(\frac{2\pi n t}{T}\right)\right]\]
Where the Fourier coefficients are:
\[a_0 = \frac{2}{T}\int_0^T f(t)\,dt \qquad \text{(DC component — twice the mean value)}\]
\[a_n = \frac{2}{T}\int_0^T f(t)\cos\!\left(\frac{2\pi n t}{T}\right)dt\]
\[b_n = \frac{2}{T}\int_0^T f(t)\sin\!\left(\frac{2\pi n t}{T}\right)dt\]
Notation:
Each harmonic \(n\) contributes a sinusoid at frequency \(n f_0\). You can combine the cosine and sine terms into a single amplitude–phase form:
\[C_n = \sqrt{a_n^2 + b_n^2}, \qquad \phi_n = \arctan\!\left(-\frac{b_n}{a_n}\right)\]
so that \(a_n\cos(n\omega_0 t) + b_n\sin(n\omega_0 t) = C_n\cos(n\omega_0 t + \phi_n)\).
Where:
The symmetry of \(f(t)\) determines which coefficients survive:
Three waveforms appear throughout engineering. Their Fourier coefficients (all with zero mean, so \(a_0 = 0\)) are:
Square wave \([\,f(t) = \operatorname{sgn}(\sin t)\,]\) — odd harmonics only:
\[b_n = \frac{4}{n\pi},\quad n = 1, 3, 5, \ldots \qquad b_n = 0,\quad n = 2, 4, 6, \ldots\]
\[f(t) = \frac{4}{\pi}\!\left(\sin t + \frac{\sin 3t}{3} + \frac{\sin 5t}{5} + \cdots\right)\]
Sawtooth wave \([\,f(t) = 1 - t/\pi\text{ on }(0,2\pi)\,]\) — all harmonics:
\[b_n = \frac{2}{n\pi}, \quad n = 1, 2, 3, \ldots\]
\[f(t) = \frac{2}{\pi}\!\left(\sin t + \frac{\sin 2t}{2} + \frac{\sin 3t}{3} + \cdots\right)\]
Triangle wave — odd harmonics only, amplitudes fall as \(1/n^2\):
\[b_n = \frac{8\,(-1)^{(n-1)/2}}{n^2\pi^2},\quad n = 1, 3, 5, \ldots \qquad b_n = 0,\quad n = 2, 4, 6, \ldots\]
\[f(t) = \frac{8}{\pi^2}\!\left(\sin t - \frac{\sin 3t}{9} + \frac{\sin 5t}{25} - \cdots\right)\]
For smooth periodic functions the Fourier series converges uniformly — adding more harmonics makes the partial sum uniformly closer to \(f(t)\). At jump discontinuities the situation is different: the partial sum overshoots the true value by approximately 9% of the jump height, and this overshoot does not decrease as \(N \to \infty\). It narrows, but never disappears. This is the Gibbs phenomenon. The simulation below makes it visible in the square and sawtooth waves — watch the spikes at the edges as you increase \(N\).
The mean square value of a signal equals the sum of the mean square contributions of each harmonic. This is Parseval's theorem:
\[\frac{1}{T}\int_0^T \!\left[f(t)\right]^2 dt \;=\; \frac{a_0^2}{4} + \frac{1}{2}\sum_{n=1}^{\infty}\!\left(a_n^2 + b_n^2\right)\]
It lets you compute RMS values and signal power directly from the spectrum, without integrating the time-domain waveform.
Select a waveform, then drag the harmonics slider to add or remove sinusoidal components. The upper panel shows the target waveform (grey dashed) and the Fourier partial sum (gold). The lower panel shows the amplitude spectrum — each bar is one harmonic. Tick Show components to draw the individual sinusoids.
| Concept | Equation | Notes |
|---|---|---|
| Fourier series | \(\displaystyle f(t) = \frac{a_0}{2} + \sum_{n=1}^{\infty}\!\bigl[a_n\cos(n\omega_0 t) + b_n\sin(n\omega_0 t)\bigr]\) | \(\omega_0 = 2\pi/T\) |
| DC coefficient | \(\displaystyle a_0 = \frac{2}{T}\int_0^T f(t)\,dt\) | Twice the mean value |
| Cosine coefficients | \(\displaystyle a_n = \frac{2}{T}\int_0^T f(t)\cos(n\omega_0 t)\,dt\) | \(n = 1,2,3,\ldots\) |
| Sine coefficients | \(\displaystyle b_n = \frac{2}{T}\int_0^T f(t)\sin(n\omega_0 t)\,dt\) | \(n = 1,2,3,\ldots\) |
| Harmonic amplitude | \(C_n = \sqrt{a_n^2 + b_n^2}\) | Magnitude of \(n\)th harmonic |
| Parseval's theorem | \(\displaystyle \frac{1}{T}\!\int_0^T\!\!f^2\,dt = \frac{a_0^2}{4} + \frac{1}{2}\sum_{n=1}^{\infty}(a_n^2+b_n^2)\) | Mean square from spectrum |
| Square wave (odd \(n\)) | \(b_n = 4/(n\pi)\) | \(b_n = 0\) for even \(n\) |
| Sawtooth wave | \(b_n = 2/(n\pi)\) | All harmonics present |
| Triangle wave (odd \(n\)) | \(b_n = 8(-1)^{(n-1)/2}/(n^2\pi^2)\) | Amplitudes fall as \(1/n^2\) |
A square wave \(f(t)\) has period \(T = 2\pi\) and amplitude \(\pm 1\). Write down the first three non-zero Fourier coefficients \(b_n\) and hence state the partial Fourier sum \(f_5(t)\) that includes all non-zero harmonics up to and including \(n = 5\).
Show Solution
Solution:
Given: square wave, period \(T = 2\pi\), amplitude \(\pm 1\).
The square wave is an odd function with half-wave symmetry, so \(a_n = 0\) for all \(n\) and \(b_n = 0\) for even \(n\). For odd \(n\):
\[b_n = \frac{4}{n\pi}\]
The first three non-zero coefficients are:
\[b_1 = \frac{4}{\pi} \approx 1.273, \qquad b_3 = \frac{4}{3\pi} \approx 0.424, \qquad b_5 = \frac{4}{5\pi} \approx 0.255\]
The partial sum including harmonics \(n = 1, 3, 5\) is therefore:
\[f_5(t) = \frac{4}{\pi}\!\left(\sin t + \frac{\sin 3t}{3} + \frac{\sin 5t}{5}\right)\]
Answer: \(b_1 = 4/\pi \approx 1.273\), \(b_3 = 4/(3\pi) \approx 0.424\), \(b_5 = 4/(5\pi) \approx 0.255\). Partial sum: \(f_5(t) = \tfrac{4}{\pi}\!\left(\sin t + \tfrac{\sin 3t}{3} + \tfrac{\sin 5t}{5}\right)\).
A periodic voltage signal is described by: \[v(t) = 2\sin(\omega_0 t) + \sin(2\omega_0 t) \quad\text{(V)}\] Find the RMS value of \(v(t)\).
Show Solution
Solution:
Given: \(b_1 = 2\,\text{V}\), \(b_2 = 1\,\text{V}\), all other coefficients zero.
By Parseval's theorem, the mean square value is:
\[\langle v^2 \rangle = \frac{a_0^2}{4} + \frac{1}{2}\sum_{n=1}^{\infty}(a_n^2+b_n^2) = 0 + \frac{b_1^2}{2} + \frac{b_2^2}{2}\]
\[\langle v^2 \rangle = \frac{(2)^2}{2} + \frac{(1)^2}{2} = \frac{4}{2} + \frac{1}{2} = 2 + 0.5 = 2.5\;\text{V}^2\]
The RMS value is therefore:
\[V_\text{rms} = \sqrt{2.5} = \frac{\sqrt{10}}{2} \approx 1.581\;\text{V}\]
Answer: \(V_\text{rms} = \sqrt{10}/2 \approx 1.581\;\text{V}\).
A periodic sawtooth wave has amplitude \(A = 10\;\text{V}\) and period \(T = 0.02\;\text{s}\). Its Fourier coefficients are \(b_n = 2A/(n\pi)\). Find the amplitude of the 3rd harmonic and its frequency.
Show Solution
Solution:
Given: \(A = 10\;\text{V}\), \(T = 0.02\;\text{s}\), \(b_n = 2A/(n\pi)\).
Fundamental frequency:
\[f_0 = \frac{1}{T} = \frac{1}{0.02} = 50\;\text{Hz}\]
3rd harmonic frequency:
\[f_3 = 3 f_0 = 3 \times 50 = 150\;\text{Hz}\]
3rd harmonic amplitude:
\[b_3 = \frac{2A}{3\pi} = \frac{2 \times 10}{3\pi} = \frac{20}{3\pi} \approx 2.12\;\text{V}\]
Answer: The 3rd harmonic has amplitude \(b_3 = 20/(3\pi) \approx 2.12\;\text{V}\) at a frequency of 150 Hz.
A machine applies a periodic square-wave force to a structure. The force has amplitude \(F = 100\;\text{N}\) and fundamental frequency \(f_0 = 10\;\text{Hz}\). The structure has a natural frequency of 110 Hz. Determine the amplitude and frequency of the harmonic component that could excite this resonance.
Show Solution
Solution:
Given: \(F = 100\;\text{N}\), \(f_0 = 10\;\text{Hz}\), natural frequency \(f_n = 110\;\text{Hz}\).
The square wave contains only odd harmonics at frequencies \(f_0, 3f_0, 5f_0, \ldots\)
Find the harmonic number that matches \(f_n = 110\;\text{Hz}\):
\[n = \frac{f_n}{f_0} = \frac{110}{10} = 11\]
Since 11 is odd, the 11th harmonic is present. Its amplitude from the square-wave Fourier series \(\bigl(b_n = 4F/(n\pi)\bigr)\) is:
\[b_{11} = \frac{4F}{11\pi} = \frac{4 \times 100}{11\pi} = \frac{400}{11\pi} \approx 11.6\;\text{N}\]
Answer: The 11th harmonic at 110 Hz has amplitude \(\approx 11.6\;\text{N}\). Relative to the fundamental \(\bigl(b_1 = 4F/\pi \approx 127.3\;\text{N}\bigr)\) this is \(b_{11}/b_1 = 1/11 \approx 9.1\%\), and it coincides with the structure's natural frequency — a resonance risk that must be assessed.