Signal Processing
Sampling, Fourier, filtering — taming noisy signals.
Prerequisites
Why it matters in robotics
Signal processing turns raw sensor streams into usable measurements. A robot has to decide how fast to sample a signal without losing information, view a noisy waveform in terms of the frequencies it contains, and filter out unwanted frequencies while keeping the ones that matter — all before IMU, audio, encoder, and range data ever reach an estimator. Clean signal processing is what keeps noise, drift, and distortion from corrupting everything downstream.
What to study
- ✓Sampling theory: the Nyquist-Shannon theorem, aliasing/frequency folding, why anti-aliasing filters go BEFORE the ADC, and how to choose a sample rate.
- ✓Frequency domain: what the DFT/FFT computes, reading a magnitude spectrum, frequency resolution vs. window length, and the time-frequency (uncertainty) trade-off.
- ✓Convolution and linear filters: how convolution implements filtering, impulse/frequency response, and the behavior of low-, high-, and band-pass filters.
- ✓Practical digital filter design and noise: FIR vs. IIR (e.g., Butterworth), phase lag/group delay vs. smoothing, SNR, and cutoff selection for real sensor signals.
Where to study
Cheatsheet
Symbols used below
Nyquist–Shannon sampling theorem
Sample above twice the signal's highest frequency (the Nyquist rate) to reconstruct it exactly. is the Nyquist frequency — the ceiling on what a given sample rate can represent without ambiguity.
Aliasing
Sampling below the Nyquist rate folds high frequencies down onto lower ones — a true frequency becomes indistinguishable from for some integer .
This is why an anti-aliasing (low-pass) filter must run before the ADC: once aliased, the corruption can't be undone by filtering afterward.
Convolution theorem
Filtering in time is convolution: .
Convolution in time is multiplication in frequency: . So a filter's effect is just shaping the spectrum by — zero it out where you want to reject, keep it near 1 where you want to pass.
Time-frequency trade-off
Frequency resolution improves with a longer observation window (), but a longer window smears out when things happened in time.
There's no free lunch: narrow the window to localize in time, and the frequency estimate gets blurrier, and vice versa.
Filter response trade-offs
A filter's cutoff sets which frequencies pass, but every real filter also adds phase lag / group delay — the more aggressive the smoothing, the more the output lags the true signal.
Choosing a cutoff is a balance between rejecting noise (SNR) and keeping the delay small enough for real-time control.
| FIR | IIR | |
|---|---|---|
| Impulse response | Finite length | Infinite (feedback-driven) |
| Stability | Always stable | Can be unstable if poles land outside the unit circle |
| Phase | Can be made exactly linear phase | Generally nonlinear phase |
| Cost for a given sharpness | More taps / more compute | Fewer coefficients (e.g. Butterworth) for the same rolloff |