Ajout boucle For pour LQR
This commit is contained in:
parent
49af696bd5
commit
bb91f9195c
1 changed files with 30 additions and 6 deletions
36
BE.m
36
BE.m
|
@ -51,17 +51,41 @@ Zu_BF = tf(sysZuBF)
|
||||||
figure
|
figure
|
||||||
bode(Zs_BF, Zu_BF);
|
bode(Zs_BF, Zu_BF);
|
||||||
|
|
||||||
%commande obtenue par u=-Gx, C=-G
|
|
||||||
C=-G;
|
|
||||||
commande=ss(Abf, E, C, 0)
|
|
||||||
|
|
||||||
%Réponse indicielle
|
%Réponse indicielle
|
||||||
figure
|
figure
|
||||||
step(0.08*sysZsBF)
|
step(0.08*sysZsBF)
|
||||||
title("Réponse indicielle pous Zsbf")
|
title("Réponse indicielle pous ZsBF")
|
||||||
figure
|
figure
|
||||||
step(0.08*sysZuBF)
|
step(0.08*sysZuBF)
|
||||||
title("Réponse indicielle pour Zubf")
|
title("Réponse indicielle pour ZuBF")
|
||||||
|
|
||||||
|
% Variation de Q
|
||||||
|
figure
|
||||||
|
for i = [1:100]
|
||||||
|
[G, K, lambda]=lqr(A,B,i*Q,R);
|
||||||
|
Abf=A-B*G;
|
||||||
|
|
||||||
|
sysZsBF = ss(Abf, E, C_st, 0);
|
||||||
|
Zs_BF = tf(sysZsBF)
|
||||||
|
|
||||||
|
|
||||||
|
step(0.08*sysZsBF)
|
||||||
|
|
||||||
|
hold on
|
||||||
|
end
|
||||||
|
|
||||||
|
figure
|
||||||
|
for i= [1:100]
|
||||||
|
[G, K, lambda]=lqr(A,B,i*Q,R);
|
||||||
|
Abf=A-B*G;
|
||||||
|
sysZuBF = ss(Abf, E, C_ut, 0);
|
||||||
|
Zu_BF = tf(sysZuBF)
|
||||||
|
|
||||||
|
step(0.08*sysZuBF)
|
||||||
|
|
||||||
|
hold on
|
||||||
|
end
|
||||||
|
|
||||||
|
%commande obtenue par u=-Gx, C=-G
|
||||||
|
C=-G;
|
||||||
|
commande=ss(Abf, E, C, 0)
|
||||||
|
|
Loading…
Reference in a new issue