Lite / Engineering Complex Systems / Week 20
Predicting the impostor
A 900 Hz whistle is recorded at 1 kHz. Play it back and you hear a low hum instead. Exactly what pitch, and why?
Why should I care?
When a sensor reading shows an oscillation nobody can explain, the first question an experienced engineer asks is: could this be an alias? Being able to compute the exact impostor frequency lets you test that hypothesis in seconds.
- Derive the alias formula f_alias = |f − k·fs| with k the integer nearest f/fs.
- Predict the apparent frequency of any undersampled sinusoid.
- Explain the backwards-wheel effect as a negative alias.
Predict
A 70 Hz sinusoid is sampled at 100 Hz. At what frequency does it appear?
- 70 Hz
- 30 Hz
- 170 Hz
- 35 Hz
Guess first, then reveal
Nyquist is 50 Hz, so 70 Hz folds back: |70 − 1 × 100| = 30 Hz. In the sampler, set f = 7 Hz and fs = 10 Hz to see the same fold at one tenth the scale.
Discover
Fix fs = 10 Hz. Step f through 3, 7, 13 and 17 Hz and write down the alias each time. What pattern do you see? Predict f = 23 Hz before you try it.
What the interactive shows (text version)
With fs = 10 Hz in the sampler: 3 Hz shows as 3 Hz, 7 Hz as 3 Hz, 13 Hz as 3 Hz and 17 Hz as 3 Hz, because each is 3 Hz away from a multiple of 10 Hz. 23 Hz also shows as 3 Hz.
Understand
Folding
Picture the frequency axis folded like a paper fan at every multiple of fs/2. Any frequency lands somewhere in the first panel, 0 to fs/2. That landing place is the alias. With fs = 100 Hz: 30, 70, 130 and 170 Hz all land on 30 Hz.
Negative aliases and backwards wheels
A film camera at 24 frames/s filming a wheel turning 23 times per second sees it advance 23/24 of a turn per frame: indistinguishable from going back 1/24 of a turn. f − fs = −1 Hz: the wheel seems to turn backwards once per second. For a rotation the sign matters; for a cosine on a graph it does not.
Using the formula as a detective
If a log shows a mystery 30 Hz wobble and you sample at 100 Hz, candidates are 30, 70, 130, 170 Hz… Check the machine for anything at those frequencies, like a motor at 4200 rpm (70 Hz). If you find one, you have caught an alias, and the fix is filtering before sampling or sampling faster.
Explain it another way
Intuitive
Frequencies above Nyquist bounce off a wall at fs/2 and come back down, like a ball bouncing between the floor (0) and a ceiling (fs/2).
Technical
The DTFT of a sampled signal is periodic in f with period fs. A real signal's spectrum is also symmetric about 0, so everything maps into 0…fs/2.
Mathematical
f_alias = |f − k·fs|, k = round(f/fs). Example: f = 1730 Hz, fs = 500 Hz: k = round(3.46) = 3, f_alias = |1730 − 1500| = 230 Hz ≤ 250 Hz.
Applied
Digital radio receivers use aliasing on purpose ('undersampling'): a 70 MHz signal sampled at 50 MHz lands at 20 MHz, so a slower, cheaper ADC can still capture it, provided a band-pass filter removes everything else.
Derivation: The exact alias formula
Samples of x(t) = cos(2πft) are x[n] = cos(2π·(f/fs)·n).
Adding a whole number of cycles per sample changes nothing: cos(2π(f − k·fs)n/fs) = cos(2πfn/fs − 2πkn) = x[n] for every integer k.
Cosine is even, so a negative frequency gives the same samples as its magnitude: cos(−θ) = cos θ.
Choose k = round(f/fs) so that f − k·fs lies between −fs/2 and +fs/2.
Therefore f_alias = |f − round(f/fs)·fs|, always between 0 and fs/2. (For sine waves the sign of f − k·fs also flips the phase: that is the 'backwards' wheel.)
Worked example 1
A 4200 rpm fan is sampled by a 100 Hz sensor. What vibration frequency appears in the data?
4200 rpm = 70 Hz. k = round(70/100) = 1, f_alias = |70 − 100| = 30 Hz.
Common mix-ups
The alias is always fs − f.
✓ Only when f is between fs/2 and fs. In general subtract the nearest whole multiple of fs.Software can tell an alias from a real low frequency afterwards.
✓ The samples are identical. Only knowledge from outside (a filter, a faster sensor) can tell them apart.
Practice
Practice, not a test. Answers are checked on our server; a wrong answer gets a hint and another try. Nothing is saved.
Apply it
Your rover's 50 Hz IMU log shows a 6 Hz wobble, but the wheels spin at about 44 Hz. Is the wobble plausibly an alias of the wheels? Show the calculation and propose two fixes.
Reflect
Describe a situation where an alias could cause a real engineering mistake, not just a strange graph.
Write your answer on paper or in your own notes. Lite never stores what you write.