Electrical engineering · also Mathematics, Control systemsLevel 4 · Systems Engineer
Digital filters and frequency response
A digital filter is a short calculation run on every new sample. A moving average adds the last M samples and divides by M; a first-order IIR filter mixes a fraction alpha of the new input with the rest of its previous output. Both are low-pass filters: slow changes pass, fast wiggles shrink. Their frequency response gives the gain at every frequency, and it explains the trade-off engineers always face, because stronger smoothing also means more lag. Subtracting a low-pass output from the input gives a high-pass filter, which blocks steady offsets and keeps fast changes.
Why it mattersA drone's flight controller filters its gyro readings every millisecond, and too much lag in that filter can make it wobble.