Sampling & Aliasing

Sampling turns continuous signals into numbers. Learn the Nyquist–Shannon sampling theorem, aliasing and how to calculate alias frequencies, anti-aliasing filters, reconstruction (zero-order hold, sinc interpolation), oversampling and decimation, undersampling (bandpass sampling), and quantisation.

Every digital audio recording, oscilloscope, SDR and sensor system samples signals. Sample too slowly and high frequencies masquerade as lower ones (aliasing) — an error that cannot be removed afterwards.

An analogy

Aliasing is like a film of a spinning wagon wheel that appears to rotate backwards: the camera's frame rate is too low to capture the true motion.

The sampling theorem

A band-limited signal with no content above f_max is perfectly represented by samples taken faster than 2f_max. CD audio samples at 44.1 kHz to capture 20 kHz hearing.

Aliasing

Frequencies above f_s/2 fold back into 0…f_s/2. A 30 kHz tone sampled at 44.1 kHz appears at 14.1 kHz. Anti-aliasing low-pass filters must remove such content before the ADC.

Reconstruction

DACs output a staircase (zero-order hold) with a sinc-shaped roll-off; a reconstruction filter removes images around multiples of f_s.

Oversampling and bandpass sampling

Oversampling relaxes analog filters and, with decimation filtering, improves SNR (sigma-delta converters). Bandpass (under-)sampling deliberately aliases a narrowband RF/IF signal down to baseband — used in SDR receivers.

Formulas

Worked example: Alias

Given: 30 kHz tone, f_s = 44.1 kHz

Find: Apparent frequency.

Answer: 14.1 kHz (audible, wrong)

Worked example: Oversampling gain

Given: 16× oversampling with ideal decimation

Find: SNR improvement.

Answer: +12 dB

Common mistakes

Applications

Key takeaways

Going further