Question 5
This commit is contained in:
parent
5dd89ba8b7
commit
49af696bd5
1 changed files with 38 additions and 1 deletions
39
BE.m
39
BE.m
|
@ -1,6 +1,9 @@
|
|||
%%
|
||||
% BE de commande optimale
|
||||
clc
|
||||
|
||||
%% BE de commande optimale
|
||||
%%
|
||||
%Question 3
|
||||
Ms = 1120/4; %kg
|
||||
mu = 45; %kg
|
||||
Ks = 20000; %N/m
|
||||
|
@ -27,4 +30,38 @@ sysZu = ss(A,E,C_ut,0)
|
|||
%Modification en tf
|
||||
tf_Zu = tf(sysZu)
|
||||
|
||||
%tracé de bode de nos deux sous systèmes
|
||||
bode(tf_Zs,tf_Zu)
|
||||
|
||||
%%
|
||||
% Question 5
|
||||
% Mise en place de la commande optimale
|
||||
|
||||
Q=[Ks^2 0 0 0; 0 Cs^2 0 0; 0 0 Kt^2 0; 0 0 0 0];
|
||||
R=1;
|
||||
|
||||
[G, K, lambda]=lqr(A,B,Q,R);
|
||||
Abf=A-B*G;
|
||||
|
||||
sysZsBF = ss(Abf, E, C_st, 0);
|
||||
Zs_BF = tf(sysZsBF)
|
||||
sysZuBF = ss(Abf, E, C_ut, 0);
|
||||
Zu_BF = tf(sysZuBF)
|
||||
|
||||
figure
|
||||
bode(Zs_BF, Zu_BF);
|
||||
|
||||
%commande obtenue par u=-Gx, C=-G
|
||||
C=-G;
|
||||
commande=ss(Abf, E, C, 0)
|
||||
|
||||
%Réponse indicielle
|
||||
figure
|
||||
step(0.08*sysZsBF)
|
||||
title("Réponse indicielle pous Zsbf")
|
||||
figure
|
||||
step(0.08*sysZuBF)
|
||||
title("Réponse indicielle pour Zubf")
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue