seegongsik
CR · Non-sinusoidal

Harmonic Synthesis and Fourier

The signals that reach a circuit are not always clean sinusoids. There are digital pulses that turn square corners and waveforms that rise and fall like saw teeth. Even so, knowing how to handle sinusoids is enough for circuit analysis, because any periodic waveform can be broken into a sum of sinusoids. In this unit you build a square wave by adding sines one at a time and learn the principle behind that synthesis.

Stack sines one by one into a square wave

The thick line is the sum of the sines added so far, and the faint dashed line is the square wave it should come to resemble. On the first button there is only the fundamental, so the thick line is a plain round sine. Each button to the right adds higher odd harmonics in turn; compare how closely the sum follows the flat top and steep edges of the dashed line.

Each button sets the highest harmonic order to include.
Odd harmonics included
n = 1 (≤ 1)
Still a round sine

Only integer-multiple frequencies qualify

To build a waveform of period T out of sines, every sine you add must also return to its starting shape every T. The only sines that do are those whose frequency is an integer multiple of the fundamental frequency, so the building blocks are frequencies 2, 3 or 4 times it, and so on. The sine at the fundamental frequency is called the fundamental and its integer multiples are the harmonics; pick the amplitude and phase of each harmonic correctly and the sum traces the shape you want. The calculation that tells you which amplitudes a given waveform needs is the Fourier series.

A square wave contains only odd harmonics

Shift a square wave by half a period and you get the same shape turned upside down. For a waveform like this the even harmonics all have amplitude 0, leaving only the odd ones, and the amplitude of the n-th harmonic shrinks as 1/n. So a square wave is written as sin(ωt) + (1/3)sin(3ωt) + (1/5)sin(5ωt) + …. The higher the order, the less it adds, yet these small terms are what make the edges steep. Even at high orders the plot keeps a small horn just beside each edge: adding terms makes the horn narrower but no lower. This is the Gibbs phenomenon.

Sinusoidal analysis extends to every periodic signal

This is where impedance and frequency response pay off. If you know how a linear circuit changes the size and phase of a sine at each frequency, you can split any input into harmonics, pass each one through, and add them back up to get the output. Feed a square wave into a filter that cuts high frequencies and its high harmonics shrink, rounding the edges; the shape you see when you lower the order in the plot looks much like that result. Handle one sine properly and, in effect, you can handle every periodic signal.

Observef = Σ an sin(nωt)
A periodic wave is a sum of sinusoids.
Choosesquare: n = ?
A square wave has only odd harmonics.
Fill inan ∝ ?
The n-th harmonic's amplitude falls as 1/n.
On your ownfn = n · ?
Harmonic frequencies are integer multiples of the fundamental.

Back to the first screen

On the first button the thick line was a round sine; as odd harmonics were added one by one its top flattened, its edges steepened, and it closed in on the dashed square wave. The harmonics shrank as 1/n, yet every one of those small terms was needed to raise the edges. Because even a complicated-looking waveform is in the end a sum of sines, every tool for solving a circuit with one sine carries over to an arbitrary periodic signal.

The Fourier series writes a periodic waveform as a sum of the fundamental and its integer-multiple harmonics (sines and cosines). A square wave is a sum of odd harmonics only, with the n-th amplitude falling as 1/n: f = (4/π)(sin ωt + ⅓ sin 3ωt + ⅕ sin 5ωt + …). The more terms you add, the closer the sum gets to the square wave, and this is how sinusoidal analysis extends to every periodic signal.