Having troubles with symbols in creating statespace model

3 次查看(过去 30 天)
here is my code and error:
clc
clear
syms a L
A = [-10 0 -10/a; 0 0 1;-6/a -70/a^2 -14.4/a^2];
B = [10 ;0 ;6/a];
C = [0 0 1/a; 0 25 3];
D = [0; 0];
Ceq = charpoly(A)
sys = ss(A,B,C,D)
Error using ss (line 260)
The value of the "a" property must be a numeric array
without any Inf's or NaN's.
Error in Project_1 (line 10)
sys = ss(A,B,C,D)

回答(1 个)

Star Strider
Star Strider 2014-12-1
The Control System Toolbox wants only numeric functions, so you have to define a numeric value for ‘a’.
You can calculate the output symbolically:
y = ((C*expm(A*t)*B)+D)*u
but the output is too long to fit into the Command Window, giving a long (incomplete) symbolic expression followed by ... Output truncated. Text exceeds maximum line length of 25,000 characters for Command Window display..

类别

Help CenterFile Exchange 中查找有关 Symbolic Math Toolbox 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by