I need to implement a simple lead-lag filter in an STM32 device (M4 Core). I’m looking for advice on whether to write my own fixed-point code or use a CMSIS-DSP bi-quad section with two of the coefficients set to zero.
I am using the arm_biquad_cascade_df1_q31 bi-quad filter elsewhere in my code, as a 2nd order section.
I just wanted to know how others would approach this problem.
Note: lead-lag filter is G(z) = gain * (z - a) / (z - b)
y(k) = gain * u(k) - gain * a * u(k-1) + b * y(k-1)
b < a < 1