Harmonics series · Part 1
What is the FFT actually showing you?
The idea
Put a signal in a 3D space with three axes: time, frequency and amplitude.
- Look at it from the front and you see the waveform, the thing your sensor records.
- Pull it apart and every sine wave it is made of slides back into its own frequency lane.
- Turn to look from the side: time disappears and each sine collapses to a single height. That row of heights is the spectrum.
The spectrum isn't a different signal. It is the same function, viewed along the time axis. Nothing is added or lost, which is why you can push the sines back together and get the original shape.
The maths behind it
Any signal that repeats with period \(T\) can be written as a sum of sines and cosines at whole multiples of the base frequency \(\omega_0 = 2\pi/T\):
Each lane in the animation is one term of that sum. The height you see from the side is the amplitude of that term:
and that is exactly the number your analyser plots at \(n\times\) running speed. The FFT is just a fast way to compute those numbers from sampled data.
The signal in the video
It is the first ten terms of a sawtooth wave, chosen because every harmonic is present and they shrink steadily:
So the lanes hold sines with amplitudes \(\tfrac{2}{\pi}, \tfrac{2}{2\pi}, \tfrac{2}{3\pi}, \dots\): falling as \(1/n\). The next post explains why some shapes fill every lane and others only the odd ones.
Downloads
- fourier_3d.py · the script that renders the video (Python, NumPy, Matplotlib, ffmpeg)
- what-the-fft-shows.mp4 · the video, 1080p
Further reading
- J. Fourier (1822). Théorie analytique de la chaleur.Where the idea that any repeating function is a sum of sines comes from.
- J. W. Cooley & J. W. Tukey (1965). An algorithm for the machine calculation of complex Fourier series. Mathematics of Computation 19(90), 297–301.The paper that made the FFT practical.
- E. O. Brigham (1988). The Fast Fourier Transform and Its Applications. Prentice Hall.A readable engineering treatment of the FFT.
- R. B. Randall. Vibration-based Condition Monitoring. Wiley.How all of this is used on real machines.