I'm having trouble dealing with the tf2ss function. I am not able to
get the same results for the same transfer function in Scilab as I do
in Matlab. Would appreciate if anyone can help me or spot any mistakes
I have made.
MATLAB code
% for transfer function (2s+1)/(s^2 +4s +4)
[A,B,C,D]= tf2ss([0 2 1], [1 4 4])
A=[-4 -4; 1 0] B=[1;0] C=[2 1] D=0
SCILAB
num=poly([1 2 0], 's', 'c');
den =poly([4 4 1],'s','c');
H=num/den;
tf2ss(H)
A=[-4.4 -1.8; 3.2 0.4] B=[-1.55; 0.77] C=[-1.29 -0] D=0
Once again thanks
You should be able to plug both realizations into a syslin and get the
same thing out with ss2tf.
--
Tim Wescott
Wescott Design Services
http://www.wescottdesign.com
Probably. I can't give you a good reference on deriving the ideal
state-space representation of a transfer function -- first because it
varies depending on what you're trying to do, and second because I don't
know one myself.