Computing Library › Real Time Systems
Real Time Systems

Sampling and the Nyquist Limit

The Nyquist-Shannon theorem sets the minimum sampling rate to represent a signal without loss; violating it corrupts data irreversibly.

Turning Continuous into Discrete

Sampling records a continuous signal at discrete instants, usually uniformly spaced. The sampling rate, in samples per second, determines what information survives. The central question of sampling theory is how fast you must sample to lose nothing about the signal you care about.

The Nyquist-Shannon Theorem

Kronos motion — confinement time

The sampling theorem states that a signal containing no frequencies above B can be reconstructed exactly from samples taken at a rate greater than 2B. That threshold, 2B, is the Nyquist rate; half the sampling rate is the Nyquist frequency. Any frequency content above the Nyquist frequency cannot be represented correctly and instead corrupts the samples through aliasing.

Why Twice

A sinusoid needs at least two samples per cycle to capture both its frequency and phase; a single sample per cycle is ambiguous. Sampling below twice the highest frequency folds that high-frequency content down to lower apparent frequencies, and the fold is irreversible: once aliased, the true signal cannot be recovered from the samples. This is why the anti-alias filter must act before the sampler, not after.

Rate in Practice

Sampling for Control Versus Analysis

Signal analysis chooses a rate to capture a frequency band of interest. Control chooses a rate primarily to observe the plant fast enough to act, which usually implies rates far above the Nyquist minimum for the bandwidth being controlled. In both cases, respecting the Nyquist limit is a precondition: no amount of clever processing recovers information that was aliased away at the moment of sampling.