Signal Sampling & Nyquist Theorem
Set a signal frequency and sampling rate to see whether the signal is faithfully captured or aliased.
Nyquist-Shannon Theorem 🖖
Sampling works only when the sample rate captures the fastest oscillation content. If f_s < 2 f_signal, different continuous frequencies produce identical samples, so reconstruction locks onto a false lower alias frequency.
At least two dots per wave 🖖
To pin down a wave you have to catch it both rising and falling — at least two samples in every cycle. With fewer, those same dots could belong to many different waves, and the digital copy guesses wrong. CD audio uses 44,100 samples per second because human hearing tops out near 20 kHz, and 2 × 20 kHz leaves comfortable margin.
Why wheels spin backward on film 🖖
The wagon-wheel effect is Nyquist in the visible world. A movie camera samples motion at 24 frames per second; if a spoked wheel turns slightly less than one spoke-gap between frames, each shot lands just short of the last, so the eye reads the wheel as rotating slowly backward. Same maths as audio aliasing — the frame rate is the sample rate, and fast rotation folds into a false slow one.
Example problems
- Safe (no alias) - Safe: fₛ=12 > 2×5=10 Hz, no aliasing
- Aliased - Aliased: fₛ=7 < 2×5, false frequency appears
- Critical Nyquist - Critical: fₛ=2f exactly, borderline case
- CD Audio - CD audio: 44.1 kHz, 16-bit, well above Nyquist for 1 kHz