Skip to content
Tactiverge

Control systems

Sampling and aliasing

Also called: Nyquist · sample rate · aliasing · Nyquist frequency · anti-aliasing

Definition

Sampling measures a signal at regular intervals. Any frequency above half the sample rate, the Nyquist frequency, is indistinguishable from a lower 'alias' frequency.

Picture it

Film a spinning wheel and it can appear to turn slowly or backwards: the camera samples too slowly. Sample at least twice the highest frequency present, in practice several times, and filter out higher frequencies before sampling.

The maths

f_Nyquist = f_s / 2
alias frequency = |f − round(f / f_s) × f_s|
SI units used in this entry
QuantityUnitSymbol
frequencyhertzHz

Worked example

A vibration at 9 Hz is sampled at 10 Hz. What frequency appears in the data? What is the Nyquist frequency?

  1. f_Nyquist = 10 / 2 = 5 Hz
  2. Alias = |9 − 1 × 10| = 1 Hz

AnswerIt appears as 1 Hz; the Nyquist frequency is 5 Hz.

✓ The 2 numbers in this answer are recomputed from scratch by an automated test.

wagon-wheel effect

Sampling and aliasing

Blue: true signal. Dots: samples. Dashed orange: the wave the samples suggest.
Nyquist frequency fs/2 = 5 Hz. The 9 Hz signal is above it, so it appears as 1 Hz.

Ideal instantaneous sampling of a pure sine. Real systems add an analogue low-pass (anti-aliasing) filter before the ADC.

Common misconceptions

  • Misconception: Sampling at exactly twice the frequency is not enough in practice; phase can make the signal vanish.
  • Misconception: Digital filtering after sampling cannot remove an alias; it must be filtered out before.