Foundations to Frontier
Tests
A. Mathematical Foundations › A10 Signal Processing

The Sampling Theorem (Nyquist) and Aliasing

Every digital sensor samples a continuous world. The sampling theorem says when nothing is lost: a signal band-limited below B can be rebuilt exactly from samples taken faster than 2B, using sinc interpolation. This topic covers that reconstruction, what goes wrong below the Nyquist rate (aliasing, and why no software can undo it), anti-alias filter design, zero-order-hold reconstruction in DACs, and quantization noise with the 6.02N + 1.76 dB rule. In the research exercise you design the front end of a vibration-monitoring ADC: an anti-alias filter to stop a 3.2 kHz pump harmonic folding into the band, and oversampling with decimation to gain 9 dB of resolution.

Level 0: Foundation

★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.

Snapshots of a moving world

In films, car wheels sometimes seem to spin backwards. The camera takes snapshots too slowly to follow the fast-turning spokes, so it gets fooled into seeing a slower, backwards motion. Every digital sensor faces the same danger. Sample fast enough (more than twice the fastest wiggle) and you lose nothing. Sample too slowly and fast motion disguises itself as slow motion. That’s aliasing.

Sample, then rebuild: when does it work?
reconstruction:
010203040fs/2
Nyquist frequency 10.0 Hz · tone 2 at 7 Hz is inside the band · max reconstruction error 0.014
Sampling copies the spectrum around every multiple of fs (grey images). If all content lies below fs/2 (green band), the ideal sinc interpolator keeps only the original copy and rebuilds the signal exactly. Above fs/2, an image lands inside the band and is indistinguishable from a real low-frequency tone. The staircase (hold) rebuild is what a plain DAC outputs; it needs a smoothing filter afterwards.
Why engineers care

IMUs, accelerometers, cameras, ADCs on spacecraft buses and audio all sample. An aliased vibration can look like a real low-frequency signal and fool a controller or a fault detector, and nothing done after sampling can separate it out. The protection must be designed into the hardware: anti-alias filters and adequate sample rates.

📝 Quick check (Level 0)
0/3 answered
  1. 1. Backward-spinning wheels in films are caused by…
  2. 2. To capture a signal faithfully, sample faster than…
  3. 3. Can software remove aliasing after sampling?

Level 1: Beginner

★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.

The sampling theorem

If x(t)x(t) has no content above BB Hz and fs>2Bf_s > 2B, then

x(t)=∑nx(nT)sinc⁡(fst−n),T=1/fsx(t) = \sum_nx(nT)\operatorname{sinc}\big(f_st - n\big),\qquad T = 1/f_s

(Whittaker, Kotelnikov, Nyquist, Shannon). fs/2f_s/2 is the Nyquist frequency and 2B2B the Nyquist rate.

Aliasing

Sampling makes the spectrum periodic with period fsf_s. A tone at f>fs/2f > f_s/2 appears at ∣f−kfs∣\lvert f - kf_s\rvert for the nearest integer k. For example, 3.2 kHz sampled at 1 kHz appears at 200 Hz.

Quantization

An N-bit ADC adds roughly uniform error with step Δ\Delta, which has variance Δ2/12\Delta^2/12. For a full-scale sine, SNR≈6.02N+1.76\mathrm{SNR}\approx6.02N + 1.76 dB.

📝 Quick check (Level 1)
0/3 answered
  1. 1. Nyquist rate for a signal band-limited to 20 kHz:
  2. 2. 3.2 kHz sampled at 1 kHz aliases to…
  3. 3. Ideal SNR of a 16-bit ADC:

Level 2: Intermediate

★★★☆☆ Intermediate⏱ 40 minUndergraduate students and practising engineers.

Anti-alias filters

Before the ADC, an analog low-pass must attenuate everything above fs/2f_s/2 below the noise floor. An n-th order Butterworth falls at 20n20n dB/decade (6n6n dB/octave): ∣H∣=1/1+(f/fc)2n\lvert H\rvert = 1/\sqrt{1 + (f/f_c)^{2n}}. Real filters need a transition band, so systems sample at 2.5–10× the signal bandwidth.

Reconstruction

The ideal sinc interpolator is non-causal and infinitely long. Practical DACs output a zero-order hold staircase, whose spectrum is shaped by sinc⁡(f/fs)\operatorname{sinc}(f/f_s) and contains images. A reconstruction (smoothing) filter removes them.

Oversampling and decimation

Sample at L×L\times the required rate. Quantization noise is spread over LL times more bandwidth. A digital low-pass then removes the out-of-band part before decimating by LL. The gain is 10log⁡10L10\log_{10}L dB (half a bit per doubling), and the analog anti-alias filter can be gentle. Sigma-delta ADCs push this further with noise shaping.

🐍 Exercise 1: reconstruction and quantization
Reconstruct a two-tone signal from samples by sinc interpolation above and below the Nyquist rate, compare with zero-order hold, and verify the 6.02N + 1.76 dB quantization rule at 8, 12 and 16 bits.
📝 Quick check (Level 2)
0/3 answered
  1. 1. A 4th-order Butterworth rolls off at…
  2. 2. Oversampling by 4 with ideal decimation gains…
  3. 3. A DAC's staircase output contains…

Level 3: Advanced

★★★★☆ Advanced⏱ 40 minGraduate level, with full derivations and proofs.

Why sinc interpolation works

Sampling multiplies by an impulse train, whose spectrum is an impulse train at multiples of fsf_s. So the sampled spectrum is fs∑kX(f−kfs)f_s\sum_kX(f - kf_s). If XX vanishes outside (−fs/2,fs/2)(-f_s/2, f_s/2), the copies don’t overlap. An ideal low-pass of that width keeps exactly XX, and in time that filter’s impulse response is the sinc. ∎

Quantization SNR

The error is uniform on (−Δ/2,Δ/2)(-\Delta/2, \Delta/2) with variance Δ2/12\Delta^2/12. Full scale ±A with Δ=2A/2N\Delta = 2A/2^N, and sine power A2/2A^2/2, give SNR=A2/2A2/(3⋅4N)=1.5⋅4N\mathrm{SNR} = \frac{A^2/2}{A^2/(3\cdot4^N)} = 1.5\cdot4^N, i.e. 6.02N+1.766.02N + 1.76 dB. ∎

Oversampling gain

White quantization noise of total power Δ2/12\Delta^2/12 spread over [0,Lfs/2][0, Lf_s/2]: only a fraction 1/L1/L lies in the signal band after filtering. ∎ Dither keeps the error white for small or slowly varying signals.

Exercise 3.1: Butterworth attenuation needed

A 12-bit system needs out-of-band tones below −74 dB. At 3 octaves above the cutoff, a 4th-order filter gives about −72 dB, just short. A 5th-order filter (−90 dB) or a higher sample rate fixes it.

📝 Quick check (Level 3)
0/3 answered
  1. 1. Sampling in time corresponds in frequency to…
  2. 2. Uniform quantization error variance:
  3. 3. Each doubling of the oversampling ratio (no noise shaping) gains…

Level 4: Expert

★★★★★ Expert⏱ 35 minResearchers: original papers and open problems.

Front end for a vibration monitor

A machine-health accelerometer needs 0–400 Hz at 1 kHz. A coolant pump produces a strong 3.2 kHz harmonic. Unfiltered, it aliases to 200 Hz, right in the band, where it would be indistinguishable from a real bearing fault. A 4th-order Butterworth anti-alias filter at 400 Hz attenuates it by 72 dB (8th order: 144 dB). Alternatively, sample at 8 kHz with a gentler analog filter, then low-pass and decimate digitally. That yields about 9 dB (1.5 bits) less in-band quantization noise from the same 10-bit ADC. That’s the design logic of modern IMU and accelerometer front ends.

🐍 Exercise 2 (research): anti-alias and oversampling design
Find where an out-of-band 3.2 kHz disturbance aliases at fs = 1 kHz and compute Butterworth attenuation for two filter orders. Then quantize a test signal at 10 bits directly and with 8× oversampling + digital filtering + decimation, and measure the in-band noise gain.

Sampling in AI, robotics and aerospace

  • Inertial sensors: MEMS IMUs use sigma-delta ADCs with internal decimation filters, and configurable output data rate and bandwidth.
  • Vibration and health monitoring: anti-alias design for spacecraft structures and rotating machinery.
  • Cameras: rolling-shutter and temporal aliasing of propellers; optical anti-alias filters before Bayer sensors.
  • Learning: CNN downsampling aliases unless blurred first (anti-aliased CNNs; Zhang, 2019).

References

  1. C. Shannon (1949). “Communication in the presence of noise.” Proc. IRE, 37(1).
  2. H. Nyquist (1928). “Certain topics in telegraph transmission theory.” Trans. AIEE, 47.
  3. W. Kester (ed.) (2005). The Data Conversion Handbook. Analog Devices / Newnes.
  4. R. Schreier, G. Temes (2005). Understanding Delta-Sigma Data Converters. Wiley-IEEE.
  5. A. Oppenheim, R. Schafer (2010). Discrete-Time Signal Processing, 3rd ed. Pearson. Ch. 4.
  6. R. Zhang (2019). “Making convolutional networks shift-invariant again.” ICML.
  7. M. Unser (2000). “Sampling: 50 years after Shannon.” Proceedings of the IEEE, 88(4).