School/□ Systems Engineer/Week 20
Stopping aliases before they start
Every audio interface and many sensor boards put a filter in front of the ADC. If the ADC is digital, why does it need an analog guard?
About 30 min · 3 goals · Checked by automated tests
1.Why should I care?
Once a high frequency has folded onto a low one, the damage is permanent. The only safe place to stop it is in the analog world, with a filter placed before the sampler. Designing that filter is a classic trade-off between parts cost, sharpness and how much of the wanted band you lose.
- ◇ Explain why aliasing must be prevented before sampling.
- ◇ Compute the cut-off frequency of an RC low-pass filter, fc = 1/(2πRC).
- ◇ Compare anti-aliasing strategies: analog filters, oversampling and choosing the sample rate.
Safety: Simulation only. If you later build an RC filter for real, use a low-voltage battery or a lab supply under supervision; never connect to mains.
2.Predict
A first-order RC low-pass has its cut-off at 1 kHz. Roughly how much does it reduce the amplitude of a 10 kHz signal?
Guess first. Being wrong here is how the surprise works.
3.Discover
In the Electronics Studio, build a resistor-capacitor low-pass (R in series, C to ground) and probe the capacitor voltage. Compute fc = 1/(2πRC), then try test frequencies at fc/10, fc and 10·fc and compare the output amplitude with 1/√(1 + (f/fc)²).
Can't use the interactive? Read a description instead
In the electronics activity, an RC low-pass with fc about 1 kHz passes a 100 Hz test signal almost unchanged (gain 0.995), passes 1 kHz at 0.707, and reduces 10 kHz to about 0.1.
4.Checkpoint: guided practice
Check what you just discovered before going on. Hints appear after a wrong answer.
Practice 1
An RC low-pass has R = 1.6 kΩ and C = 100 nF. What is fc = 1/(2πRC), in Hz (nearest 5 Hz)?
Practice 2
Why can't a digital filter after the ADC remove aliases?
5.Understand
Filter first, sample second
An anti-aliasing filter is a low-pass filter before the ADC that shrinks everything above fs/2 enough that its aliases are buried below the noise floor. Digital filtering after sampling cannot help: by then the alias sits at an allowed frequency and looks exactly like real signal.
The RC low-pass
A resistor in series and a capacitor to ground form the simplest low-pass. Its cut-off fc = 1/(2πRC) is where the output falls to 1/√2 (−3 dB). Above fc the gain falls roughly as fc/f: −20 dB per decade. With R = 1.6 kΩ and C = 100 nF, fc ≈ 995 Hz.
Oversample, then decimate
Real filters roll off gradually. A common trick: sample much faster than needed (oversample), so a gentle analog filter suffices, then use a sharp digital low-pass and keep every Mth sample (decimation). Delta-sigma audio ADCs work this way internally.
Explain it another way
It is a bouncer at the door: unwanted high frequencies are turned away before they can sneak in wearing a low-frequency disguise.
Gain of a first-order RC low-pass: |H(f)| = 1/√(1 + (f/fc)²), phase −arctan(f/fc). An nth-order filter falls at about 20n dB per decade.
fc = 1/(2πRC). For a 12-bit system (≈74 dB SNR) to bury a full-scale tone at 10·fc with a first-order filter you only get 20 dB: far short. A 4th-order filter gives about 80 dB at 10·fc.
Electrocardiogram front ends low-pass the electrode signal before the ADC so that mains interference and muscle noise cannot alias into the heartbeat band.
Worked example 1
Choose C for an RC anti-aliasing filter with R = 10 kΩ and fc ≈ 160 Hz.
C = 1/(2π·R·fc) = 1/(2π × 10⁴ × 160) ≈ 99.5 nF, so a standard 100 nF part.
Common mix-ups
- The cut-off frequency is where the filter blocks everything.
✓ At fc the gain is still 0.707. A first-order filter only reaches one tenth at ten times fc.
6.Practice on your own
Practice, not a test. Wrong answers get a hint and another try.
Practice 3
A first-order RC low-pass has fc = 2 kHz. Using |H| = 1/√(1 + (f/fc)²), what is its gain at 20 kHz (3 decimal places)?
Practice 4
Why does oversampling make the analog anti-aliasing filter easier to design?
Practice 5 · a fresh version every time
A 1210 Hz sinusoid is sampled at fs = 1000 Hz. At what frequency (between 0 and fs/2) does it appear in the samples, in hertz?
7.Apply it
Design an anti-aliasing filter for a 1 kHz-sampled vibration sensor whose useful band is 0–200 Hz. Pick R and C, compute the attenuation at 500 Hz and 800 Hz (which aliases to 200 Hz), and say whether first order is enough.
8.Reflect
Concepts: Sampling rate and aliasing · Noise and filtering