I have designed a bandpass IIR butterworth filter with desired response using the MATLAB FDAtool with the configuration shown in the figure below
Since this is multistage implementation, when I export the filter object to workspace I don't get numerator and denominator of transfer function as filter parameters and instead I get sos matrix and scale values as shown below
FilterStructure: 'Direct-Form II, Second-Order Sections'
sosMatrix: [12x6 double]
ScaleValues: [13x1 double]
The problem is I have to port this design to C code for implementation in firmware and the multi-order specification looks complicated to define an input-output expression. So I tried converting this design into a single stage filter(using convert to single section option under edit), but the following is magnitude response that what I get.
Not only is the response way-off, but the system is unstable.
My questions are the following,
1) Why is FDAtool not able to produce a good single stage equivalent filter?
2) How to calculate groupdelay of the multi-stage filter?
3) Is the groupdelay of the multistage filter simply FilterOrder*Sample time as in a direct form FIR or is it more complicated for IIR and multistage filters?
4) Will the groupdelay of multi-stage filter be the same as a possible acceptable(in terms of magnitude response) single stage equivalent?
5) How important is stability of the filter?
6) Does FDAtool have an option to visualize the filter structure?(Edit>Show Filter Structure doesn't seem to work)
7) What is the tradeoff between Filter Order and Number of sections in the filter other than structural complexity?