Control Systems · signals

Sampling & Aliasing

Sample a wave too slowly and a phantom appears. See exactly when.
Nyquist: fₛ > 2f
—

Signal & sampler

Hz

What the sampler sees

—
true signal samples taken what you'd reconstruct

Frequency domain

where the energy actually lands
Nyquist frequency true frequency & mirror images what lands in the visible band
Readings
The fold, drawn

Every frequency a sampler can report, and the ones it confuses

your signal is marked

—

How it works

Why too-slow sampling lies

s2f

The Nyquist criterion

To capture a frequency f you must sample faster than 2f. Half the sample rate is the Nyquist frequency, the ceiling on what you can record faithfully.

Aliasing

A frequency above Nyquist folds back below it as |f − fs·round(f/fs)|: a tone that was never in the original.

The wagon wheel

Film at 24 frames a second cannot keep up with a fast wheel, so it appears to slow, stop or spin backwards. Same maths, different sampler.

Filter before sampling

An analogue low-pass filter removes everything above Nyquist before the converter, so nothing is left to fold down.

Worked example. Sample a 900 Hz tone at 1,000 Hz: the Nyquist frequency is only 500 Hz, so it folds down to |900 − 1000| = 100 Hz, and you would record and play back a 100 Hz hum the original never contained. At 8 kHz, 7 kHz and 9 kHz both come out as 1 kHz, and so does 15 kHz; once sampled there is nothing left in the data to say which was real, or whether a genuine 1 kHz tone was there all along. That is why the filter goes before the converter: afterwards the information is gone rather than merely corrupted. The first bar is on a 900 Hz scale, the rest on 9 kHz.
Field notes

The Nyquist rule and its ghosts

44.1 kHz

How real systems avoid it

An anti-aliasing filter, an analogue low-pass before the sampler. CD audio samples at 44.1 kHz to cover hearing up to about 20 kHz with margin for the filter. Real converters run 2.5× to 10× the signal bandwidth: twice the highest frequency is a floor, not a design target, and assumes a perfect brick-wall filter and infinite record length.

Exactly at fs/2

Two samples per cycle: in theory the limit; in practice phase luck means you can catch the peaks or the zero-crossings, so it is unreliable. Stay comfortably below.

Does a higher sample rate always help?

Up to a point: it raises Nyquist so more of your signal fits under it. Beyond covering your highest real frequency plus filter margin, extra rate just makes bigger files without capturing anything new.

Why the spectrum shows three lines

The true frequency has mirror images at fs − f, fs + f and beyond: sampling does not destroy that energy, it copies it to every one of those positions. Only the copy that lands below Nyquist survives as something you can reconstruct; the rest are shown faded.

Questions

What people ask

What's the fold formula?

The apparent frequency is |f − fₛ·round(f/fₛ)| — the signal reflects ("folds") off multiples of the sampling rate and off the Nyquist frequency, landing somewhere between 0 and fₛ/2.

How do real systems avoid it?

With an anti-aliasing filter: an analogue low-pass filter before the sampler that removes anything above the Nyquist frequency, so nothing is left to fold down. CD audio samples at 44.1 kHz to cover hearing up to ~20 kHz with margin for the filter.

What happens exactly at f = fₛ/2?

You're right at the edge — two samples per cycle. In theory it's the limit; in practice phase luck means you can catch the peaks or the zero-crossings, so it's unreliable. Stay comfortably below fₛ/2.

Does a higher sample rate always help?

Up to a point — it raises the Nyquist frequency so more of your signal fits under it. But beyond covering your highest real frequency (plus filter margin), extra rate just makes bigger files without capturing anything new.

Why does the spectrum view show three lines instead of one?

The true frequency has mirror images at fs − f, fs + f, and beyond — sampling doesn’t destroy that energy, it copies it to every one of those positions. Only the copy that lands below the Nyquist frequency survives as something you can actually hear or reconstruct; the rest are shown faded because they never make it into the sampled signal.

A teaching model. Single sine wave, ideal instantaneous sampling. Real systems mix many frequencies and use anti-alias filters before the sampler. Audio playback and the spectrum view are illustrative aids, not a literal DAC simulation.

The other axis: how finely you record it

—

—

The fold

Where the fake frequency actually lands

Sampling too slowly does not lose the signal, it moves it. Anything above half the sample rate folds back down and reappears somewhere below it, as a perfectly convincing tone that was never there.

Real signalAppears at
1 kHz1 kHzunchanged
3 kHz3 kHzunchanged
3.9 kHz3.9 kHzunchanged
4 kHz4 kHzunchanged
5 kHz3 kHzfolded down
6 kHz2 kHzfolded down
7 kHz1 kHzfolded down
9 kHz1 kHzfolded down
15 kHz1 kHzfolded down

Sampled at 8 kHz, 7 kHz and 9 kHz both come out as 1 kHz — and so does 15 kHz. Once sampled there is nothing left in the data to say which of them was real, or whether a genuine 1 kHz tone was there all along. That is why the anti-alias filter goes before the converter: afterwards the information is gone rather than merely corrupted, and no amount of processing recovers it.

Twice the highest frequency is a floor, not a design target. It assumes a perfect brick-wall filter and infinite record length. Real converters run 2.5× to 10× the signal bandwidth to leave a filter something to work with.

Version history · site-wide passes only

This page has changed in 194 archived releases, but each of those was a site-wide pass, so none is attributable to this tool on its own and none is listed here. That is not a claim that the tool never changed — a release that reworked many pages at once may well have altered this one too. The changelog has them.

Rules of thumb are approximations, offered to get you to the right order of magnitude fast. Check anything load-bearing against its source or the exact tool. Privacy · Terms

© 2026 Rules of Thumb · Runs entirely in your browser