🌊 Waves & Oscillations  ·  7 April 2026

Signal Recovery with the Fast Fourier Transform

Every sound you hear, every photo you take, every WiFi packet your phone receives — all of it arrives mixed with noise. The Fast Fourier Transform (FFT) is the tool the world uses to clean it up.

What is frequency?

Pluck a guitar string and it vibrates back and forth. The tighter the string, the faster it vibrates. That speed of vibration is its frequency, measured in cycles per second — hertz (Hz).

Musical notes are just frequencies with names. The A above middle C — the note orchestras tune to — vibrates at exactly 440 Hz. The A one octave higher vibrates at 880 Hz (twice as fast). Every key on a piano is a specific frequency.

NoteFrequency
A3220 Hz
A4 (concert A)440 Hz
A5880 Hz
C4 (middle C)262 Hz

Why noise looks different from signal

Here is the key insight that makes FFT denoising possible.

When you plot the spectrum of a pure tone — how much energy is at each frequency — it shows up as a single sharp spike. But random noise spreads its energy evenly across every frequency at once, creating a flat floor.

Think of it this way: a tuning fork rings at one precise pitch. A room full of people all talking at the same time produces noise at every pitch simultaneously. In the frequency spectrum, the tuning fork is a needle; the crowd is a carpet.

Signal → sharp spike. Noise → flat carpet. That difference is everything.

The four-step recipe

  1. Record the noisy signal
  2. Transform it — run the FFT to get a frequency spectrum showing energy at each frequency
  3. Filter — set a threshold and zero out every frequency below it (noise); keep only the peaks (signal)
  4. Recover — run the inverse FFT to turn the filtered spectrum back into a clean signal

The reason this works so fast in practice is that the FFT uses a clever divide-and-conquer algorithm (see the Advanced Learning section below) that is roughly 400 times faster than the naive approach.


Try It: Tone Explorer

Pick musical notes for each of the three slots, add noise, then raise the threshold until the power spectrum shows clean peaks and the recovered signal matches the original. Hit the audio buttons to hear the difference with your ears.

Loading chart...
Loading chart...
Loading chart...
Loading chart...

Signal Components

Note 1A4 — 440 Hz
1
Note 2E4 — 330 Hz
0.70
Note 3— off —

Noise & Filter

1.50
50
Detected Peaks
330 Hz
440 Hz

Audio Preview

Things to try:

  • Two notes — pick A3 and A4. Two distinct peaks appear at 220 Hz and 440 Hz.
  • Crank the noise to 3.0 — the waveform becomes unrecognisable. But the frequency peaks still stand out. Raise the threshold to recover the signal.
  • C major chord — pick C4, E4, G4. The FFT separates all three frequencies cleanly.
  • Toggle a note off by clicking it again — watch its peak disappear from the spectrum instantly.

Morse Code Through Static

Before digital radio, operators sent messages as bursts of a single carrier tone — long bursts for dashes, short bursts for dots. Atmospheric noise made the signal nearly inaudible.

Watch what the FFT does to it. The threshold line sweeps upward, zeroing out every frequency except the narrow spike at the carrier. The static melts away. The Morse pattern emerges.

The message is SOS (· · · — — — · · ·). The noise is 2.5 times stronger than the signal — yet the FFT recovers it cleanly.


Real-World Applications

  • Audio engineering — noise reduction in recordings, de-hissing old vinyl, and auto-tune all decompose sound into frequencies and manipulate them individually.

  • MRI scanning — an MRI scanner measures hydrogen atoms resonating at specific radio frequencies. The raw scanner data is a frequency spectrum. The image you see is literally the inverse FFT of what the scanner recorded.

  • WiFi and 5G — modern wireless standards (OFDM) split data across thousands of narrow frequency channels simultaneously. The FFT modulates and demodulates all of them in one step.

  • Gravitational wave detection — LIGO measures mirror movements smaller than a proton. The gravitational wave signal from a black hole merger lasts less than a second and is buried under seismic noise. FFT-based matched filtering extracts it.

  • Crystallography — shine X-rays through a crystal and the diffraction pattern you get is literally the Fourier transform of the crystal's atom positions. Invert it to see the molecular structure — including the double helix of DNA.


Advanced Learning

The intuition above is enough to use the FFT effectively. This section has the mathematics.

Fourier's original insight (1807)

Joseph Fourier proved that any periodic function can be written as a sum of sines and cosines. The continuous Fourier transform maps a time-domain function f(t)f(t) to its frequency-domain representation f^(ξ)\hat{f}(\xi):

f^(ξ)=f(t)e2πiξtdt\hat{f}(\xi) = \int_{-\infty}^{\infty} f(t)\, e^{-2\pi i \xi t}\, dt

Geometrically, this integral wraps the signal around a circle at frequency ξ\xi and measures how much the wrapped signal clusters to one side. A pure tone at ξ\xi produces a large result. Anything else cancels to near zero.

The Discrete Fourier Transform

Real instruments sample signals at discrete time intervals. Given NN samples at sampling rate fsf_s, the Discrete Fourier Transform (DFT) is:

X[k]=n=0N1x[n]e2πikn/NX[k] = \sum_{n=0}^{N-1} x[n]\, e^{-2\pi i kn/N}

Each output X[k]X[k] gives the amplitude and phase at frequency fk=kfs/Nf_k = k \cdot f_s / N. The Nyquist theorem says frequencies above fs/2f_s/2 cannot be represented — they fold back into lower frequencies (aliasing). Audio CDs are sampled at 44,100 Hz to capture up to 22,050 Hz, just above the limit of human hearing.

The naive DFT requires O(N2)O(N^2) operations — for N=106N = 10^6 samples, that is 101210^{12} multiplications. Impractical for real-time work.

The Fast Fourier Transform (Cooley–Tukey, 1965)

The key idea is divide and conquer. Split the NN-point DFT into two (N/2)(N/2)-point DFTs — one over even-indexed samples, one over odd-indexed samples — and combine with twiddle factors:

X[k]=E[k]+e2πik/NO[k]X[k] = E[k] + e^{-2\pi i k/N}\, O[k]

where E[k]E[k] and O[k]O[k] are the DFTs of the even and odd sub-sequences respectively. Apply this recursively until you reach trivial 2-point transforms. Total work: O(NlogN)O(N \log N).

For N=2,048N = 2{,}048: the naive DFT needs \approx4.2 million multiplications. The FFT needs \approx11,000 — a 380× speedup.

Power spectrum and threshold filtering

The power at each frequency bin is:

P[k]=X[k]2NP[k] = \frac{|X[k]|^2}{N}

Structured signals concentrate power at a few bins; random noise distributes it uniformly (Parseval's theorem guarantees total power is conserved between domains).

Threshold filtering keeps bins where P[k]τP[k] \geq \tau and zeros the rest before inverting. More sophisticated approaches adapt τ\tau locally — Wiener filtering minimises mean-squared error per bin; wavelet denoising applies similar ideas in a time-frequency basis that captures transients better than the pure FFT.


Further Reading

Books

  • The Scientist and Engineer's Guide to Digital Signal Processing — Steven W. Smith. Free at dspguide.com. Extremely accessible, starts from first principles.

  • Numerical Recipes — Press, Teukolsky, Vetterling & Flannery. Chapter 12 covers FFT theory and practical implementation in detail.

  • Introduction to Signal Processing — Sophocles J. Orfanidis. Free PDF at ece.rutgers.edu/~orfanidi/intro2sp. Rigorous and comprehensive.

Foundational papers

  • Cooley, J.W. & Tukey, J.W. "An Algorithm for the Machine Calculation of Complex Fourier Series." Mathematics of Computation, 19(90), pp. 297–301, 1965. The original FFT paper.

  • Shannon, C.E. "Communication in the Presence of Noise." Proceedings of the IRE, 37(1), pp. 10–21, 1949. Foundation of sampling theory and the Nyquist theorem.

Online

  • 3Blue1Brown — "But what is the Fourier Transform? A visual introduction." (YouTube). The best visual intuition for the transform available anywhere.

  • 3Blue1Brown — "But what is the Fourier Series? From heat flow to drawing with circles." (YouTube). Builds the continuous case from scratch with animations.

  • Reducible — "The Fast Fourier Transform (FFT) Explained." (YouTube). Clear step-by-step walkthrough of the Cooley–Tukey algorithm.

  • NumPy FFT documentation at numpy.org — for hands-on experimentation in Python.

Explore more simulations

Every concept on PhysicStuff has an interactive visualisation — no login, no setup required.