Linear Simulation Tool Problem
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Maxence Luneau
am 17 Mär. 2019
Kommentiert: Star Strider
am 29 Mär. 2019
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 Kommentare
Akzeptierte Antwort
Star Strider
am 17 Mär. 2019
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 Kommentare
Star Strider
am 29 Mär. 2019
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.)
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Dynamic System Models finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!