Having troubles with symbols in creating statespace model

조회 수: 1 (최근 30일)
Joseph
Joseph 2014년 12월 1일
답변: Star Strider 2014년 12월 1일
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