Linear Simulation Tool Problem
3 ビュー (過去 30 日間)
古いコメントを表示
Hello,
I am trying to produce graphs showing me how my state-space model responds to a sine function.
Unfortunately when using the Linear Simulation Tool, importing the system G and trying a linear analysis with time t = [0:0.1:10] and signal u=sin(t).
The program tells me "None of the systems have a complete set of inputs." Is there a way to solve this?
Regards,
Maxence
Here is my code:
% A, B, C, D Matrices %
A = [0 0 0 1 0 0 0 0 0 0 0 0;
0 0 0 0 1 0 0 0 0 0 0 0;
0 0 0 0 0 1 0 0 0 0 0 0;
0 0 0 -0.0855 0 0 0 -9.81 0 0 0 0;
0 0 0 0 -0.0855 0 9.81 0 0 0 0 0;
0 0 0 0 0 0 0 0 0 0 0 0;
0 0 0 0 0 0 0 0 0 1 0 0;
0 0 0 0 0 0 0 0 0 0 1 0;
0 0 0 0 0 0 0 0 0 0 0 1;
0 0 0 0 0.7415 0 0 0 0 0 0 0;
0 0 0 0.7415 0 0 0 0 0 0 0 0;
0 0 0 0 0 0 0 0 0 0 0 0];
B = [0 0 0 0;
0 0 0 0;
0 0 0 0;
0 0 0 0;
0 0 0 0;
-0.01435 -0.01435 -0.01435 -0.01435;
0 0 0 0;
0 0 0 0;
0 0 0 0;
0 -124.4 0 124.4;
124.4 0 -124.4 0;
-0.01999 0.01999 -0.01999 0.01999];
C = [1 0 0 0 0 0 0 0 0 0 0 0;
0 1 0 0 0 0 0 0 0 0 0 0;
0 0 1 0 0 0 0 0 0 0 0 0;
0 0 0 0 0 0 0 0 1 0 0 0];
D = 0;
G = ss(A, B, C, D);
I = tf(G);
0 件のコメント
採用された回答
Star Strider
2019 年 3 月 17 日
This works for me:
t = 0:0.1:10;
u = ones(size(B,2),1)*sin(t);
y = lsim(G, u', t);
figure
plot(t, u, '--')
hold on
plot(t, y)
hold off
grid
Experiment to get the result you want.
4 件のコメント
Star Strider
2019 年 3 月 29 日
I have not done anything with Simulink in a long time, so I cannot help you with it.
If possible, do everything in state space. It is much easier. I have no idea how you are supposed to approach this problem, however pole placement, state feedback, and such in state space is preferable. With respect to the tf and ss2tf functions, tf accepts numerator and denominator polynomials to produce a system object defined initially by a transfer function. The ss2tf function converts a state space model to a transfer function model. You can find good descriptions of that process in all good modern control textbooks. (I prefer state space for many reasons, some of which I mentioned here. I do not remember much about classical control.)
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Dynamic System Models についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!