Foundations to Frontier
Tests
A. Mathematical Foundations › A8 Numerical Methods and Scientific Computing

The Fast Fourier Transform

The FFT computes the discrete Fourier transform of N samples in O(N log N) instead of O(N²) operations. It is one of the most important algorithms ever devised, behind every spectrum analyser, radar, MRI scanner, audio codec and fast convolution. You will derive the DFT and the Cooley–Tukey radix-2 recursion, prove Parseval's theorem and the convolution theorem, learn the practical issues of sampling (Nyquist and aliasing, bin resolution, spectral leakage and windowing), and analyse a reaction-wheel vibration signal to find a weak bearing tone 40 dB below the main imbalance line.

Level 0: Foundation

★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.

Hearing the notes in a chord

When a band plays a chord, your ear hears separate notes even though the air carries a single wiggly pressure wave. The Fourier transform does the same for any signal: it splits it into pure tones and tells you how loud each one is. The fast Fourier transform is a clever recipe that does this thousands of times faster than the obvious way, fast enough to run in real time on a phone or a spacecraft.

Listening to vibrations with the FFT (fs = 1 kHz, N = 512)
window:
first 128 samples0-40-80-1200100200300400500
bin spacing 1.95 Hz · tone 1 appears at 123 Hz · tone 2 at 160 Hz, -40 dB
The FFT computes all N frequency bins in O(N log N) operations. A tone that does not fall exactly on a bin leaks energy into its neighbours; with a rectangular window this leakage (sidelobes falling only about 6 dB per octave) can hide a weak tone 40 dB down. A Hann window trades a slightly wider peak for sidelobes that drop much faster. Frequencies above Nyquist (fs/2 = 500 Hz) fold back: anti-alias filters must remove them before sampling.
Why engineers care

Engineers listen for trouble in vibration spectra: a reaction wheel’s imbalance line, a failing bearing, a structural resonance near a controller’s bandwidth. Radar and sonar, software-defined radios on CubeSats, image filtering and fast convolution layers in neural networks are all FFTs under the hood.

📝 Quick check (Level 0)
0/3 answered
  1. 1. The Fourier transform describes a signal in terms of…
  2. 2. The FFT computes…
  3. 3. A vibration monitor uses the FFT to…

Level 1: Beginner

★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.

The discrete Fourier transform

Xk=∑n=0N−1xne−2πikn/N,xn=1N∑k=0N−1Xke2πikn/NX_k = \sum_{n=0}^{N-1}x_ne^{-2\pi ikn/N},\qquad x_n = \frac1N\sum_{k=0}^{N-1}X_ke^{2\pi ikn/N}

Bin kk corresponds to frequency fk=kfs/Nf_k = kf_s/N, so the resolution is Δf=fs/N\Delta f = f_s/N. For real signals, XN−k=Xk‾X_{N-k} = \overline{X_k}, so only bins up to N/2N/2 carry information.

Sampling: Nyquist and aliasing

A sampled signal can only represent frequencies up to the Nyquist frequency fs/2f_s/2. A tone at ff above it appears at ∣f−mfs∣\lvert f - mf_s\rvert (folding). That’s why anti-alias filters go before every ADC.

📝 Quick check (Level 1)
0/3 answered
  1. 1. Bin spacing with fs = 1000 Hz and N = 2000:
  2. 2. Nyquist frequency for fs = 1 kHz:
  3. 3. A 700 Hz tone sampled at 1 kHz appears at…

Level 2: Intermediate

★★★☆☆ Intermediate⏱ 40 minUndergraduate students and practising engineers.

Cooley–Tukey radix-2 FFT

Split the sum into even and odd samples:

Xk=Ek+ωNkOk,Xk+N/2=Ek−ωNkOk,ωN=e−2πi/NX_k = E_k + \omega_N^kO_k,\quad X_{k+N/2} = E_k - \omega_N^kO_k,\quad\omega_N = e^{-2\pi i/N}

Here EE and OO are DFTs of length N/2N/2. Recursing gives T(N)=2T(N/2)+O(N)=O(Nlog⁡N)T(N) = 2T(N/2) + O(N) = O(N\log N) (Cooley and Tukey, 1965; Gauss knew it around 1805). Variants exist for any N: mixed radix and Bluestein. Production FFTs (FFTW, cuFFT) choose a plan per size.

Key properties

  • Parseval: ∑∣xn∣2=1N∑∣Xk∣2\sum\lvert x_n\rvert^2 = \frac1N\sum\lvert X_k\rvert^2.
  • Convolution theorem: circular convolution ↔ pointwise product, so x⊛y=F−1(XY)x\circledast y = \mathcal F^{-1}(XY). Zero-pad to length ≥Nx+Ny−1\ge N_x + N_y - 1 for linear convolution.
  • Leakage and windows: a tone between bins smears across many bins. Windows (Hann, Blackman) taper the ends and push sidelobes down, at the cost of a wider main lobe.
🐍 Exercise 1: DFT, FFT and convolution
Implement the O(N²) DFT and a recursive radix-2 FFT and check both against NumPy. Verify Parseval and Hermitian symmetry. Implement circular convolution directly and by FFT, and use zero-padding for linear convolution.
📝 Quick check (Level 2)
0/3 answered
  1. 1. The FFT's cost is…
  2. 2. Multiplying spectra corresponds to…
  3. 3. A Hann window mainly reduces…

Level 3: Advanced

★★★★☆ Advanced⏱ 40 minGraduate level, with full derivations and proofs.

Inverse and orthogonality

∑n=0N−1e2πi(k−m)n/N=Nδkm\sum_{n=0}^{N-1}e^{2\pi i(k - m)n/N} = N\delta_{km} (a geometric series). This gives the inverse formula and shows that F/NF/\sqrt N is unitary. ∎

Parseval

With F/NF/\sqrt N unitary, ∥x∥2=∥Fx∥2/N\lVert x\rVert^2 = \lVert Fx\rVert^2/N. ∎

Convolution theorem

∑k(x⊛y)ke−2πijk/N=∑m∑kxmyk−me−2πij(k−m)/Ne−2πijm/N=XjYj\sum_k(x\circledast y)_ke^{-2\pi ijk/N} = \sum_m\sum_kx_my_{k-m}e^{-2\pi ij(k - m)/N}e^{-2\pi ijm/N} = X_jY_j, using periodic indexing. ∎

Recursion cost

T(N)=2T(N/2)+cNT(N) = 2T(N/2) + cN gives T(N)=cNlog⁡2NT(N) = cN\log_2N. In terms of complex multiplications, about N2log⁡2N\frac N2\log_2N, versus N2N^2 for the direct DFT. At N=4096N = 4096 that’s 683× fewer.

Exercise 3.1: FFT speedup at N = 2²⁰

N2/(N2log⁡2N)=2N/20=221/20≈104 858N^2/(\frac N2\log_2N) = 2N/20 = 2^{21}/20\approx104\,858.

📝 Quick check (Level 3)
0/3 answered
  1. 1. F/√N is…
  2. 2. T(N) = 2T(N/2) + cN solves to…
  3. 3. The FFT speedup at N = 1024 (N² vs (N/2) log₂ N):

Level 4: Expert

★★★★★ Expert⏱ 35 minResearchers: original papers and open problems.

Reaction-wheel vibration analysis

A reaction wheel spinning at 123.4 Hz has a strong imbalance line. A developing bearing defect adds a tone at 180 Hz that is 40 dB weaker. Sampled at 1 kHz with 2048 points (0.49 Hz resolution), the rectangular window’s leakage floor near the defect tone is around −50 dB. A Hann window drops it to about −95 dB and both peaks are found. The same data shows a trap: an unfiltered 700 Hz structural mode appears at 300 Hz in the spectrum (aliasing). Microvibration engineering for space telescopes is built on exactly this kind of spectral analysis.

🐍 Exercise 2 (research): finding a weak bearing tone
Compute windowed amplitude spectra in dB. Find the two strongest separated peaks of a wheel vibration signal, compare rectangular and Hann leakage, and demonstrate aliasing of a 700 Hz mode.

The FFT in AI, robotics and aerospace

  • Vibration and health monitoring: reaction-wheel microvibration characterization for telescopes (JWST and Hubble heritage); gearbox and bearing diagnostics on rotorcraft.
  • Radar, sonar and communications: pulse compression and range-Doppler processing; OFDM modems in SDRs on CubeSats.
  • Imaging and learning: FFT convolutions for large kernels, Fourier neural operators, and spectral methods for PDEs (a8-10).
  • Estimation and control: system identification from frequency response; IMU noise analysis via power spectral density (and the related Allan variance).

References

  1. J. Cooley, J. Tukey (1965). “An algorithm for the machine calculation of complex Fourier series.” Mathematics of Computation, 19(90).
  2. M. Heideman, D. Johnson, C. Burrus (1984). “Gauss and the history of the fast Fourier transform.” IEEE ASSP Magazine, 1(4).
  3. M. Frigo, S. G. Johnson (2005). “The design and implementation of FFTW3.” Proceedings of the IEEE, 93(2).
  4. F. Harris (1978). “On the use of windows for harmonic analysis with the discrete Fourier transform.” Proceedings of the IEEE, 66(1).
  5. A. Oppenheim, R. Schafer (2010). Discrete-Time Signal Processing, 3rd ed. Pearson.
  6. W. Briggs, V. Henson (1995). The DFT: An Owner’s Manual for the Discrete Fourier Transform. SIAM.
  7. M. P. Le (2017). Micro-disturbances in Reaction Wheels. PhD thesis, Eindhoven University of Technology.
  8. G. Strang (1994). “Wavelets.” American Scientist, 82 (on the FFT as the most important numerical algorithm of our lifetime).