A practical walkthrough of implementing IIR digital filters on an STM32 microcontroller using the bilinear (Tustin) transform. Covers discretization basics, derivation of the bilinear transform from the Z and S domains, frequency pre-warping, and a step-by-step RC low-pass filter example. The implementation is demonstrated in C code on an STM32H7-based guitar effects unit, with real-time variable cutoff frequency control via a potentiometer. Frequency domain performance is compared against the simpler backward Euler (backward difference) method using Bode plots and a hardware audio analyzer, showing the bilinear transform achieves a much better match to the analog prototype.
•23m watch time
24 Impressions