Sampling and aliasing demo: see the Nyquist theorem
Move the signal frequency and the sampling rate and see exactly when the samples start lying about the frequency.
How it works
- A sampled signal can only show frequencies up to half the sampling rate: the Nyquist frequency fs / 2.
- A frequency f above fs / 2 folds back and appears as |f − k·fs| for the nearest whole k.
- That is why ADCs have an anti-aliasing filter: it removes frequencies above fs / 2 before sampling.
Try this
- Set the signal to 3 Hz and the sampling rate to 10 Hz: the samples follow the signal.
- Raise the signal to 9 Hz: the samples now trace a 1 Hz wave.
- Set the signal to exactly half the sampling rate and see why “2 × f” is not enough in practice.
Common questions
Why do car wheels in videos sometimes spin backwards?
The same thing: the camera samples the wheel 24–60 times a second, and a fast wheel aliases to a slow, or even negative, speed.
How fast should I sample in practice?
Several times the highest frequency you care about, with a filter before the ADC. Audio at 44.1 kHz covers sound up to about 20 kHz.
More simulators
- Bode plot generatorDraw the magnitude and phase of a transfer function from its gain, poles and zeros, and read the phase margin.
- Fourier series builderAdd sine waves one at a time and watch them build a square, triangle or sawtooth wave.
- AM, FM and QPSKSee what AM, FM and QPSK signals look like in time and frequency, and how noise causes bit errors.
- Smith chartPlace a load on the Smith chart, read its reflection coefficient, VSWR and return loss, and see what a length of line does to it.
- All toolsCalculators and simulators.