State Space model representation with symbolic matrices
19 ビュー (過去 30 日間)
古いコメントを表示
Hi everyone, I am trying to create state space model. The examples on Matlab website is pretty straightforward.I wanted to define my A,B,C and D matrixes with symbols, not numbers. Here is my code:
syms C R L
A = [0 1/C;-1/L -R/L]
B=[0;1/L]
C=[1 0;0 R]
D=0
A =
[ 0, 1/C]
[ -1/L, -R/L]
B =
0
1/L
C =
[ 1, 0]
[ 0, R]
D = 0
0
syms = ss(A,B,C,D)
However, I received that error:
Error using ss (line 259)
The value of the "a" property must be a numeric array without any Inf's or
NaN's.
Actually the problem isn't about the "a"; because even I change it to numerical matrixes, I receive same error for "b" and so on. Thanks for help in advance
0 件のコメント
回答 (1 件)
Star Strider
2017 年 6 月 5 日
You cannot use symbolic variables with Control System objects.
This works:
R = 1000;
L = 1E-3;
C = 1E-9;
A = [0 1/C;-1/L -R/L];
B = [0;1/L];
C = [1 0;0 R];
D = [0; 0];
sym_ss = ss(A,B,C,D);
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Symbolic Math Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!