Data Converters: ADC & DAC

the Nyquist-Shannon theorem

/ NY-kwist SHAN-un /

The Nyquist-Shannon theorem answers the basic worry about sampling: if I only take snapshots, am I throwing information away between them? The astonishing answer is no — provided you snapshot fast enough. The rule is simple to state: to capture a signal perfectly, you must sample at more than twice the highest frequency the signal contains. That threshold, twice the top frequency, is called the Nyquist rate; half your sample rate is called the Nyquist frequency.

Picture a sine wave. To know a wiggle is there at all, you need at least two samples per cycle — one catching it high, one catching it low. With fewer than two per cycle, the same set of dots could have been drawn by a slower wave, and you can no longer tell which one you had. So if your fastest signal is 20 kHz, you must sample above 40 kHz. Real systems leave margin: audio uses 44.1 kHz or 48 kHz to cover a 20 kHz limit, giving the anti-alias filter room to work. Sample exactly at twice (right at the edge) and you are not safe; you need strictly more.

Why this matters: this single inequality governs every analog-to-digital design. Get it right and the digital samples carry, in principle, every bit of the original — the smooth waveform can be reconstructed exactly. Get it wrong, sampling below twice the top frequency, and high frequencies fold down and masquerade as low ones (aliasing), a corruption baked permanently into the data. The theorem is also why an anti-alias filter is not optional: you must guarantee there is nothing above the Nyquist frequency BEFORE you sample.

To digitize music up to 20 kHz you must sample above 40 kHz; CD uses 44.1 kHz. To digitize a phone call carrying speech up to about 3.4 kHz, the system samples at 8 kHz — more than twice 3.4 kHz, with margin for filtering.

Sample above twice the top frequency — two dots per cycle, with margin.

The theorem assumes a perfectly band-limited signal — truly nothing above the Nyquist frequency. Real signals and noise always have some high-frequency content, which is exactly why a real anti-alias filter is mandatory rather than theoretical.

Also called
sampling theoremNyquist rate取樣定理奈奎斯特定理