Ajout boucle For pour LQR

This commit is contained in:
Beranger Quintana Y Arciosana 2021-05-25 09:39:05 +02:00
parent 49af696bd5
commit bb91f9195c

36
BE.m
View file

@ -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)