AnsweredAssumed Answered

MATLAB SOS matrix to cascaded IIR blocks for higher order filters

Question asked by echoskope on Aug 14, 2013
Latest reply on Aug 19, 2013 by BrettG

I have been trying to implement a filter I designed in MATLAB using the 2nd order IIR blocks in SigmaStudio but with no luck... I found that MATLAB's filter design tool will output a filter in a matrix for use in cascaded 2nd order IIR filters... but when I put these coefficients into the IIR block and do a Stimulus/Probe the resulting plot looks like the one MATLAB produces, but it appears inverted! Am I missing something simple here like a negative sign?


Maybe some screen shots will help...



This is from MATLAB, it is kind of hard to see but the bandpass is centered at 3222 Hz and is very sharp....



Here is the output from the filter design tool... According to the mathworks site ( from left to right is b0, b1, b2, 1, a1, a2



So I plugged those values into the IIR filters in the order it gave me...



And this is the output from SigmaStudio.... The peak is around 3222 Hz which is why I think it has inverted itself somehow (the gains are way off too)...



Any suggestions would be greatly appreciated... I'm not sure where I went wrong here...