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|
| Quantity | Unit | Symbol |
|---|---|---|
| frequency | hertz | Hz |
Worked example
A vibration at 9 Hz is sampled at 10 Hz. What frequency appears in the data? What is the Nyquist frequency?
- f_Nyquist = 10 / 2 = 5 Hz
- 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
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.