Lab 02 — Signal Processing
The Fourier Transform — Measure, Then Frequencies
Measure almost anything and you get a waveform — a signal in time. The Fourier transform is the linear map X = F·x that moves that measurement into a different basis: frequency. It unmixes a signal that arrived as a sum back into “how much of each frequency is in it.” Green on top is the measured waveform; gold below is its transform (the spectrum). Pick the mic and it really measures your voice or whistle and transforms it live.
Pick a source: a pure tone is one peak, a chord is three, a square wave is a comb of odd harmonics, noise is flat. “🎤 Mic” is a real measurement (needs browser permission).
State—
X = F x
The discrete Fourier transform is just left-multiplication by a matrix F — a linear change of basis that swaps your measured signal x into “frequency.” Each row k of F is one frequency; the component X_k is that row’s inner product (correlation) with the signal. Color is the sign of cosine (gold = +, green = −). The row of the strongest current frequency lights up.
This flow is a workhorse of real instrumentation — a mic measures sound pressure to get pitch or a voiceprint; FTIR infrared spectroscopy measures an interferogram and Fourier-transforms it into a spectrum; NMR measures a decaying nuclear signal (the FID), MRI measures spatial frequencies (k-space) and transforms back to an image; X-ray crystallography measures diffraction to recover electron density. JPEG and MP3 compression are the same idea — decompose into frequencies and discard the small contributions.