signal processing

Aliasing in sampling

When the sampling rate falls below twice the signal frequency — the Nyquist rate — the resulting samples are indistinguishable from those of a different, lower-frequency wave. This page demonstrates that effect directly.

3 Hz
10 Hz
time domain
0s
1s
Nyquist frequency 5 Hz
No aliasing — signal is reconstructed correctly
True signal Samples Perceived signal

The Nyquist condition

For a signal band-limited to a maximum frequency f_max, exact reconstruction from its samples requires a sampling rate f_s > 2·f_max. Half the sampling rate, f_s / 2, is the Nyquist frequency: the highest frequency that can be represented without ambiguity.

A component above the Nyquist frequency does not disappear — it reappears at a lower, folded frequency. For a signal frequency f sampled at f_s:

r = f mod f_s
f_alias = rif r ≤ f_s / 2
f_alias = f_s − rotherwise

Where it shows up

What it forces the hardware to do

Aliasing is not a rounding error to be cleaned up later. Once two frequencies land on the same samples, nothing downstream can tell them apart, so the fix has to sit in front of the converter — in hardware. That one constraint shapes most of an analog front end.

  1. The anti-aliasing filter is analog, and it comes first

    No amount of DSP separates a folded frequency from a real one, so the filter has to remove it before the sampler ever sees it. That means a physical low-pass on the board — op-amps, resistors, capacitors — costing area, power, and some phase distortion near the band edge. It is also why a 100 Hz control loop still needs one: an ADC’s input bandwidth is usually far wider than its sample rate, so 20 kHz motor PWM noise reaches the sampler and folds straight into the band you are trying to regulate.

  2. The filter picks the sample rate, not Nyquist

    Nyquist allows 40 kHz for 20 kHz audio; CDs use 44.1 kHz. That extra 4.1 kHz of rate buys 2.05 kHz of transition band, because a real filter cannot fall from passband to stopband instantly. Raise the sample rate and the analog filter gets gentler and cheaper; lower it and the filter gets steep, expensive, and phase-ugly — or you alias. Every converter datasheet is a point chosen on that trade.

  3. Oversampling moves the hard part into the digital domain

    Sigma-delta converters sample at megahertz rates so the analog anti-aliasing filter can be a single resistor and capacitor. The steep filtering then happens digitally, before decimating back down to the output rate, where it is exact, repeatable, and costs only gates. Trading analog precision for digital filtering is the default in modern audio and instrumentation front ends.

  4. Sometimes the fold is the feature

    Bandpass sampling aliases on purpose: a 70 MHz IF sampled at 25 MSPS lands at 5 MHz, already down at baseband. Direct-RF receivers and software-defined radios use this to delete an entire mixer stage. The anti-aliasing filter becomes a band-pass admitting exactly one band, so only the wanted signal folds — and the ADC’s input bandwidth, not its sample rate, becomes the spec that matters.