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...

 

untitled.JPG

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

 

untitled3.JPG

Here is the output from the filter design tool... According to the mathworks site ( http://www.mathworks.com/help/signal/ref/tf2sos.html) from left to right is b0, b1, b2, 1, a1, a2

 

untitled2.JPG

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

 

Sigma_plot_1.jpg

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...

 

Thanks,

-Andrew

Outcomes