0
$\begingroup$

I'm trying to convert a transfer function (tf) in s-domain (num: b17*s**18 + b16*s**17 + ... + b0, den= s**20 + a18*s**19 + ... a0) to cascade of the biquad transfer functions, also in s-domain. That is my flow:

  1. Convert s-domain tf with numerator (num) and denominator (den) to the z-domain tf mit numd and dend:

    [numd dend] = bilinear(num, den, f);  // f= resonance frequency of plant
    
  2. Convert z-domain tf to the cascaded biquad filters:

    [sos] = tf2sos (numd, dend);`
    
  3. Finally Convert biquad filters from z-domain to s-domain, e.g. for the first biquad: However before running d2c I generate H:

    H = tf([0.2046 0.4251 0.2014], [1.0000 2.6487 1.7591], 1/fs) 
                                          // fs = sample frequency
    

    I get the following error: 'Subscript indices must either be real positive integers or logicals.'

What is wrong? Is there any other way which is superior to my flow?

Thanks a lot in advance!

$\endgroup$
4
  • $\begingroup$ Why would you want to convert to and from the $z$-domain? Just compute the poles and zeros of the transfer function, and split them up in complex conjugate pairs. If there are real-valued roots, take two of them together in one biquad. $\endgroup$
    – Matt L.
    Nov 10, 2015 at 12:06
  • $\begingroup$ I have to simulate the whole system (closed loop) in mixed-mode, i.e. controller in HDL (digital) and the proposed transfer function in analog model. implementing a transfer function with very high order is not practically efficient. By splitting it in different sub-tf 2en order one can have a flexible model. $\endgroup$
    – N08M11asic
    Nov 10, 2015 at 15:29
  • $\begingroup$ I understand why you want to split the transfer function into second order blocks, but the question remains why you go from $s$ to $z$ and back to $s$; that's not necessary, because you have an analog model for the transfer function, so you could do as I suggested in my previous comment. $\endgroup$
    – Matt L.
    Nov 10, 2015 at 15:34
  • $\begingroup$ jojek, thanks for your reply. Actually I generated poles/zeros (18 zeros and 20 poles akk complex). How can I distribute it in 10 transfer functions of 2en order with the real zeros/poles? $\endgroup$
    – N08M11asic
    Nov 10, 2015 at 16:04

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.