Having troubles with symbols in creating statespace model

3 visualizaciones (últimos 30 días)
Joseph
Joseph el 1 de Dic. de 2014
Respondida: Star Strider el 1 de Dic. de 2014
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)

Respuestas (1)

Star Strider
Star Strider el 1 de Dic. de 2014
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..

Categorías

Más información sobre Symbolic Math Toolbox en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by