|
Re: [Matlab Question] Converting H(s) to H(z) using derivative approximation?
Posted:
Oct 24, 2010 3:43 AM
|
|
On 10/24/2010 12:21 AM, frodonet wrote: > Hi All, > > I been having some issue with my lab work. > > I'm supposed to do : > > Transfer function H(s): > 1 > -------------------------------------------- > s^4 + 2.613 s^3 + 3.414 s^2 + 2.613 s + 1 > > > Convert H(s) into a digital IIR filterH(z)using the derivative approximation method > for the following three cases: T=0.05, T=0.25 and T=0.5. > > The problem is, I unable to use Matlab to convert the transfer function > from s to z, when s = (1 - z^-1) / T. > > Matlab can only accept variable (z^-1) > > Not sure why, and when i see the calculation part, the maths is so rigorous....and > > I need to know whether using matlab is possible to find the coefficients of z?
You never did show what you did, so I do not understand what you mean by "I unable to use Matlab to convert the transfer function".
It always helps to show what you actually did.
Any way, I am not sure if derivative approximation method is supported, look at the options to c2d to make sure. the name might be called something else. I know bilinear is there.
To do the conversion:
EDU>> s=tf('s'); EDU>> sys=1/(s^4 + 2.613*s^3 + 3.414*s^2 + 2.613*s + 1)
Transfer function: 1 ----------------------------------------- s^4 + 2.613 s^3 + 3.414 s^2 + 2.613 s + 1
EDU>> T=0.01; EDU>> sysz=c2d(sys,T,'zoh')
Transfer function: 4.145e-010 z^3 + 4.536e-009 z^2 + 4.512e-009 z + 4.08e-010 ---------------------------------------------------------- z^4 - 3.974 z^3 + 5.922 z^2 - 3.922 z + 0.9742
also sysz=c2d(sys,T,'foh')
etc..
--Nasser
|
|