I have an impulse response ir that I need to approximate with an iir because of realtime requirements. For stability I want to break down the 10th order IIR generated with Steiglitz-Mcbride to biquads / second-order sections. However, I can't use tf2sos with the complex transfer function that stmcb() generates like the following:

[b,a] = stmcb(ir,10,10);
[sos,g] = tf2sos(real(b),real(a));

When I compare bode plots of




I find that the contour is preserved but there is a large difference in magnitude and phase. Am I missing some scaling factor or limitation? Thanks for any help.

  • $\begingroup$ I don't understand why a and b are complex-valued. They shouldn't be I guess. Is ir complex-valued? Could you post the coefficients a and b, and maybe link to the desired ir? $\endgroup$ – Matt L. Apr 3 '15 at 16:12
  • $\begingroup$ Could it be that your function generates pole/zero locations instead of coefficients? Those would be expected to be complex-valued. Digital filters with complex coefficients are somewhat rare (although they are used in some applications). I've never seen an IIR filter implemented with complex coefficients. $\endgroup$ – Jason R Apr 3 '15 at 16:17
  • $\begingroup$ @JasonR: That's a good idea, but according to this it shouldn't be the case. $\endgroup$ – Matt L. Apr 3 '15 at 16:26
  • $\begingroup$ @MattL.: Thanks for the correction. I wasn't aware that the function was a standard one in MATLAB. Sorry for the confusion. $\endgroup$ – Jason R Apr 3 '15 at 16:31
  • $\begingroup$ The IR is in fact complex. Taking the real portion shifts the phase by 360 degrees. The bode plot magnitude of the complex IR. I can't post b,a, and the IR but I can tell you they are complex. The phase requirements are critical for this application. $\endgroup$ – panthyon Apr 3 '15 at 17:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.