This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Co-efficient generation

I am trying to implement IIR filter using CMSIS library in Cortex-M4. i have read so many documents and got confused about co-coefficient's..
[b,a]=butter(6,fc/(fs/2))
[sos,g]=tf2sos(b,a)

this is how i am generating the co-efficients in MATLAB.. but i don't how to use it with CMSIS arm_biquad_cascade_df2T_f32 function..

Matlab SOS matrix will be in the form

SOS = [ b01 b11 b21 1 a11 a21 b02 b12 b22 1 a12 a22 ... b0L b1L b2L 1 a1L a2L ]

but in arm_biquad_cascade_df2T_init_f64 the order is different
{b10, b11, b12, a11, a12, b20, b21, b22, a21, a22, ...}

how do i match this? what should i do after generating the SOS matrix in MATLAB?