seegongsik
Saved words
SC · Sampling and discrete time

Aliasing

The folding frequency fs/2 of sampling is a mirror. A true frequency above it does not look higher; it bounces off the mirror and folds down to a lower one. Raise the true frequency and watch the apparent frequency, instead of climbing, zigzag as it folds.

Frequencies folding off the mirror

The sampling rate fs is fixed; the slider raises the true signal frequency f. Above is the time axis. Once f passes the folding frequency fs/2, a slower impostor (red) runs through the same samples as the fast true signal (gold). That impostor’s frequency is what you see. Below is the folding map. As you raise f, the apparent frequency climbs to fs/2, comes back down, and climbs again, zigzagging. Keep f below fs/2 and what you see equals the truth.

true and impostor (time)
folding map: apparent vs true frequency
true frequency f6.00
Frequency and folding
f = 6.00 · fs = 8.00 · fold fs/2 = 4.00
apparent f_a = 2.00
The true frequency f is above the folding frequency fs/2. Bounced off the mirror, the apparent frequency is not f but the lower phantom f_a = |f − fs·round(f/fs)|. From the samples alone you cannot tell this phantom from the truth. Raise f further and the apparent frequency only zigzags between 0 and fs/2.
Aliased (you see a phantom)

Frequencies fold at the mirror

Once sampled, that oscillation can be explained equally well by the true sine at f, or by sines at fs−f, fs+f, 2fs−f, and infinitely many others. The samples cannot tell them apart. A person sees the lowest of them, the one that lands below fs/2. So as you raise the true frequency f from 0, the apparent frequency rises straight to fs/2, then uses fs/2 as a mirror to come back down to 0, and rises again at fs, over and over. The apparent frequency is the triangle wave |f − fs·round(f/fs)|. The folding map on the first screen is exactly this triangle wave.

Observefolding (Nyquist) frequency = fs2
The folding frequency is half the sampling rate.
Chooseapparent = true when f ?
Below fs/2, what you see is real.
Fill infor fs2 < f < fs, apparent = | f − ?
A tone near fs folds to |f − fs|.
On your owngeneral fa = | f − fs · ? |
Subtract the nearest multiple of fs for the phantom.

Folding in wheels, photos, and sound

Aliasing shows the same face anywhere there is sampling. A movie camera shoots 24 frames a second (fs=24), so spokes turning faster than that fold and seem to turn slowly or backward. A digital camera’s sensor samples light at the pixel spacing, so striped clothing or a grid finer than that folds into broad ripples — moiré. When audio is sampled at fs, sound above fs/2 folds in at the wrong pitch and makes a harsh metallic noise. All three are the same effect at the same mirror, fs/2.

The filter guarding the mirror

Because a folded phantom makes the very same samples as the truth, once sampled the two can never be pulled apart again. So it must be stopped before it folds. That is why, just before sampling, you place a low-pass filter that trims away every component above fs/2 in advance. This is the anti-aliasing filter. It clears away whatever would reflect in the mirror, in front of the mirror, removing the very frequencies that would fold in. Film does this with the motion blur that smears movement while the shutter is open, a camera with an optical low-pass filter in front of the sensor, audio with an analog filter ahead of the ADC. Sampling fast enough, or when you cannot, discarding everything above fs/2 first — these two are the only ways to stop aliasing.

Back to the first screen

Holding the sampling rate fs fixed, you raised only the true frequency f. While f was below the folding frequency fs/2 the apparent frequency matched the truth, but the moment it crossed fs/2 it bounced off the mirror and came back down. A slower impostor ran through the same samples as the fast true signal, and the samples alone could not separate them. Raise f further and the apparent frequency only traced a triangle wave between 0 and fs/2. A wheel turning backward, ripples in a photo, sound losing its pitch — all happened at this one mirror. Whether you cross above fs/2 was what split truth from illusion in what you see.

Aliasing happens with the folding frequency fs/2, half the sampling rate, as a mirror. A true frequency f above fs/2 folds, on the samples, into the lower phantom apparent frequency fa = |f − fs·round(f/fs)|. As f rises, fa is a triangle wave swinging between 0 and fs/2. Below fs/2 it is faithful (what you see is real); above, it is illusion. A wheel spinning backward, moiré, audio pitch distortion are all the same fold. A folded phantom cannot be undone after sampling, so you prevent it by trimming above fs/2 with an anti-aliasing (low-pass) filter before sampling.
On to the next unit

So far we have seen samples only as points on time. Now we need a tool that treats the sequence of those points itself as one variable. The next unit, the z-transform, is the Laplace transform of a discrete signal. Bundling a one-step delay into the symbol z⁻¹, it turns discrete signals and difference equations into algebra in z. Just as the s-plane and its poles set the response in continuous time, the z-plane and the poles on it do the same in discrete time. Only now the boundary of stability is not the imaginary axis but the unit circle — and that change is exactly the result of sampling wrapping the s-plane onto the z-plane.