[scilab-Users] Converting from continuous to discrete time tranfer function.
steven hallacy
sahallacy at hotmail.com
Thu Aug 2 03:11:28 CEST 2012
Thanks.
Date: Wed, 1 Aug 2012 14:59:35 +0200
From: vogt at centre-cired.fr
To: users at lists.scilab.org
Subject: Re: [scilab-Users] Converting from continuous to discrete time tranfer function.
On 25/07/2012 00:16, steven hallacy
wrote:
Hello,
With Scilab, I know of two ways of converting from a continuous
time transfer function (e.g. 1/s) to a discrete time transfer
funtion:
1st way:
s=poly(0,'s')
ss2tf(cls2dls(tf2ss(syslin('c',1/s)),0.1))
This way requires a lot of typing.
2nd Way:
s=poly(0,'s');z=poly(0,'z');
sl=syslin('c',1/s);
sl2=horner(sl,(2/0.1)*(z-1)/(z+1))
This way requires me to remember the tustin approximation.
Does matlab have anything like Matlab's c2d function?
Stephen
Hi
Did you try defining it yourself?
function y=c2d(x,p)
if argn(2)<2
p=0.1
end
y=
ss2tf(cls2dls(tf2ss(syslin('c',x)),p))
endfunction
s=poly(0,'s')
c2d(1/s)
you can do similar stuff each time you use something that requires
lots of typing
BR
AVS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20120801/6ebbe4c0/attachment.htm>
More information about the users
mailing list