Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how to get transfer function with symbolic state space matrix?

882 views
Skip to first unread message

Lin

unread,
Sep 16, 2010, 10:07:08 PM9/16/10
to
Hi ,


I have A,B,C,D matrices at state space.And I want to get
transfer function using them with ss2tf function.But the
problem is that matrices are symbolic.So MATLAB gives an
error.My code and error are :

_________________________________________

a=sym('a'); b=sym('b');

A=sym([-a 1; -b 0])
B=sym([a ; b])
C=sym([1 0]);
D=sym([0]);

[num,den]=ss2tf(A,B,C,D)

??? The following error occurred converting from sym to
double:
Error using ==> sym.double at 25
DOUBLE cannot convert the input expression into a double
array.
If the input expression contains a symbolic variable, use
the VPA function instead.

Error in ==> ss2tf at 52
num(i,:) = poly(a-b*c(i,:)) + (d(i) - 1) * den;

>>

______________________________________________________


I want to get a symbolic transfer function including "a"
and "b" variables.But I can't achieve as you see.

I wonder if somebody can solve my problem.

Have a nice day.

Kobra Ghasemi

unread,
Oct 22, 2010, 4:53:03 AM10/22/10
to
"Lin " <alex...@gmail.com> wrote in message <i6uigc$26m$1...@fred.mathworks.com>...
Hi you could get very good information about this problem in this link:
http://www.nptel.iitm.ac.in/courses/Webcourse-contents/IIT-Delhi/Control%20system%20design%20n%20principles/module2/module2-2_middle.htm
byyy
0 new messages