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:
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
Convert z-domain tf to the cascaded biquad filters:
[sos] = tf2sos (numd, dend);`
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!