Level 0: Foundation
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.Sieves for signals
A kitchen sieve lets fine flour through and keeps the lumps. A filter does the same for signals. A low-pass filter keeps slow changes and removes fast jitter. A high-pass keeps quick changes and removes slow drift. A band-pass keeps one range, like tuning a radio to one station. Every robot and spacecraft cleans its sensor signals with filters before trusting them.
Motor and propeller vibration contaminates accelerometers; gyros drift slowly; radio receivers must isolate one channel among many. The filter choice sets how much noise remains and how much delay is added. Delay matters, because a control loop fed late data can go unstable.
- 1. A low-pass filter keeps…
- 2. To remove slow drift, use a…
- 3. Filtering usually adds…
Level 1: Beginner
★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.Specifications
A filter is specified by its passband (gain ≈ 1, with allowed ripple), stopband (attenuation of at least A dB) and the transition band between them. The −3 dB point is the cutoff.
FIR vs IIR
- FIR: . Always stable. With symmetric taps it has exactly linear phase: every frequency is delayed by samples, with no shape distortion.
- IIR: . Feedback gives steep responses with few coefficients and low delay, but the phase is nonlinear, stability must be checked (poles inside the unit circle), and quantization effects matter.
Simple examples
- A moving average of N samples is a crude FIR low-pass.
- is a first-order IIR low-pass, the “exponential smoother”.
- 1. A 101-tap symmetric FIR delays every frequency by…
- 2. Which filter type can be unstable?
- 3. The cutoff frequency is usually where the gain is…
Level 2: Intermediate
★★★☆☆ Intermediate⏱ 40 minUndergraduate students and practising engineers.FIR by windowed sinc
The ideal low-pass impulse response is : infinite and non-causal. Truncate it to N taps, centre it, and multiply by a window to control the sidelobes. Hamming gives about −53 dB stopband, and the transition width is about .
- High-pass: spectral inversion, .
- Band-pass: a difference of two low-passes.
IIR by the bilinear transform
Start from an analog prototype such as the Butterworth (maximally flat, ). Map and prewarp the cutoff: . Implement as cascaded second-order sections (biquads) for numerical robustness. A 2nd-order Butterworth low-pass is
- 1. Windowing the truncated sinc mainly reduces…
- 2. Bilinear-transform prewarping ensures…
- 3. High-order IIR filters are implemented as…
Level 3: Advanced
★★★★☆ Advanced⏱ 40 minGraduate level, with full derivations and proofs.Linear phase of symmetric FIR
With , pair the terms: , i.e. a real amplitude times a linear-phase factor. The group delay . ∎
Bilinear transform maps stability
maps the left half s-plane inside the unit circle, so stable analog filters stay stable. Frequency warps as , which prewarping compensates. ∎
Complementary filtering
A low-pass and a high-pass sum to 1. Feeding the accelerometer angle through L and the integrated gyro through therefore reproduces the true angle (all-pass) while rejecting each sensor’s bad band. In discrete form: with .
Exercise 3.1: prewarped K for f_c = 10 Hz at f_s = 1 kHz
, slightly more than . Warping matters only near Nyquist.
- 1. The bilinear transform maps the left half s-plane to…
- 2. In a complementary filter, L + (1 − L) =
- 3. Group delay of a symmetric FIR is…
Level 4: Expert
★★★★★ Expert⏱ 35 minResearchers: original papers and open problems.Filtering an IMU on a drone
An accelerometer picks up 80 Hz motor vibration. A 151-tap FIR low-pass at 10 Hz (fs = 500 Hz) removes it by 81 dB but delays everything by 150 ms, far too much inside a stabilization loop. A single Butterworth biquad gives −38 dB with only about 23 ms delay at 2 Hz. For attitude, a complementary filter (τ = 0.5 s) blends the integrated gyro (good at high frequency, but drifting) with accelerometer tilt (unbiased, but noisy and vibrating). Its pitch error is about 11× smaller than the accelerometer alone and 20× smaller than the integrated gyro. That’s how most small drones and phones estimate tilt (Mahony, Hamel and Pflimlin, 2008).
Filters in AI, robotics and aerospace
- Flight controllers: biquad low-pass and notch filters on gyro and D-term paths (PX4, ArduPilot); dynamic notches track motor RPM.
- Attitude estimation: complementary and Mahony/Madgwick filters on MCUs; the Kalman filter is the optimal generalization (a10-8).
- Communications: channel selection, matched and raised-cosine pulse-shaping filters.
- Learning: 1-D convolutional layers are learned FIR filters; anti-aliasing blur before downsampling.
References
- A. Oppenheim, R. Schafer (2010). Discrete-Time Signal Processing, 3rd ed. Pearson. Ch. 7.
- S. W. Smith (1997). The Scientist and Engineer’s Guide to Digital Signal Processing. California Technical Publishing. Ch. 14–20.
- R. Lyons (2010). Understanding Digital Signal Processing, 3rd ed. Prentice Hall.
- R. Mahony, T. Hamel, J.-M. Pflimlin (2008). “Nonlinear complementary filters on the special orthogonal group.” IEEE TAC, 53(5).
- S. Madgwick, A. Harrison, R. Vaidyanathan (2011). “Estimation of IMU and MARG orientation using a gradient descent algorithm.” IEEE ICORR.
- R. Bristow-Johnson. “Cookbook formulae for audio EQ biquad filter coefficients” (Audio EQ Cookbook; W3C note, 2021).
- L. Meier et al. (2015). “PX4: a node-based multithreaded open source robotics framework for deeply embedded platforms.” ICRA.