Nyquist Sampling Theorem

See how sample rate controls aliasing, reconstruction, and sensor data quality

animation
signal-processing
sampling
nyquist
aliasing
fundamentals
beginner
Animation Signal sampling Aliasing detector

Nyquist Sampling Theorem

Watch a continuous signal become ADC samples. When the sample rate is too low, the same dots can fit a slower false wave, so the digital system sees an alias instead of the original signal.

Aliasing risk current sampling condition
0.69x Nyquist actual rate / minimum rate
7.0 Hz alias what the samples can appear to show
What
A visual sampler for seeing original signals, sample dots, reconstructed waves, and frequency folding.
Why
IoT sensors only store samples. Bad sampling can create data that looks precise but describes the wrong signal.
Try First
Use the default aliasing case, press Play, then switch to Safe sample and compare the dots.
Notice
The original blue wave can be fast, while the red reconstructed wave looks slower.

Controls

Signal Inputs

Sampling and Reconstruction

The sample dots are the only information the digital system receives.

Aliasing risk
Learning Support

Samples are evidence

The ADC does not keep the smooth analog wave. It keeps individual points. If those points are too sparse, multiple waves can explain the same evidence.

Nyquist is a minimum

The theoretical minimum is twice the highest signal frequency. Real systems normally add guard margin because filters, phase, and sensor uncertainty are not ideal.

Aliasing is permanent

Once a high frequency folds into a low false frequency during sampling, ordinary digital processing cannot know which one was real.

Filter before sampling

An anti-alias filter must be analog and before the ADC. It removes frequencies above the Nyquist frequency before they can fold into the sample data.

Quick Reference

Nyquist frequency

f_nyquist = sample_rate / 2

This is the highest signal frequency that can be represented without aliasing in the ideal model.

Minimum sample rate

sample_rate >= 2 x f_signal_max

Use this as the teaching minimum, then add practical margin for real sensors and filters.

Alias frequency

f_alias = abs(f - round(f / fs) x fs)

Fold the result into the 0 to fs/2 band. Example: 18 Hz at 25 samples/s appears as 7 Hz.

Borderline case

sample_rate = 2 x f_signal

This touches the mathematical boundary. Phase and real-world imperfections make it a poor design target.

Temperature sensors

slow signal -> low sample rate is usually fine

Slow environmental signals often need only modest sampling, but the sensor bandwidth still matters.

Vibration sensors

fast signal -> high sample rate

A 1 kHz vibration feature needs at least 2 k samples/s, often more with guard margin.

Power trade-off

more samples -> more energy and data

Sampling faster can improve fidelity, but it may increase ADC energy, processing, storage, and radio traffic.

Anti-alias filter

low-pass before ADC

The filter limits incoming analog bandwidth so the ADC never sees frequencies it cannot represent.