How do you reconcile Scipy.signal's IIR design with CMSIS-DISP's API? Scipy.signal outputs in one of 3 forms:
- Numerator/denominator
- Pole Zero
- Second-Order-Sections.
CMSIS requires an array of length a multiple of five. Each 5 values are coefficients b0, b1, b2, a1, and a2 for a filter state: "Coefficients b0, b1 and b2 multiply the input signal x[n] and are referred to as the feedforward coefficients. Coefficients a1 and a2 multiply the output signal y[n] and are referred to as the feedback coefficients. Pay careful attention to the sign of the feedback coefficients. Some design tools use the difference equation"
Scipy's formats seem incompatible: Numerator/Denominator uses "b" and "a" terminology, but returns 2 arrays: A numerator array of lengh 6, and denominator array of len 6. SOS format also returns arrays of length 6.
This is in contrast to FIR, where there's a 1-to-1 mapping. Ie both use an array of coefficients corresponding to a convolution kernel. IIR seems more diverse by comparison.