Fourier series synthesis
Circles spinning on circles trace the sharp corners of a square wave.
Any periodic signal can be decomposed into a series of sine waves whose frequencies are integer multiples of the fundamental. Each harmonic can be pictured as a circle rotating at constant speed; stack the circles one on top of another, and the height of the final tip is the synthesized signal. The more harmonics, the closer the result is to the target waveform. At the jumps of a square or sawtooth wave, however, there is always a spike: no matter how many harmonics are added it never disappears, and its height instead approaches about 9% of the jump. This is the Gibbs phenomenon.
Square wave vs. sum of first 5 harmonics
More harmonics come closer to the target; the spike at the jump never vanishes, approaching 9% of the jump height.
Think about it
A square wave is synthesized from 5 harmonics and from 20 harmonics. Which has the larger overshoot at the jump?
They are almost the same, both about 9% of the jump height. With more harmonics the overshoot spike becomes narrower and moves closer to the jump, but its height does not decrease; this is the Gibbs phenomenon. The mean-square error, on the other hand, keeps decreasing as the number of harmonics grows.
Model assumptionsOdd waveforms of amplitude 1 · sine terms only · the radii of the circles on the left equal the harmonic amplitudes
Data log
Set the parameters and click “Record data”. Record several rows with different parameters to plot their relationship and fit a straight line; pause and record at different times to study how a reading changes with time.