Browse Source

Question 5

parent
commit
49af696bd5
1 changed files with 38 additions and 1 deletions
  1. 38
    1
      BE.m

+ 38
- 1
BE.m View File

@@ -1,6 +1,9 @@
1
+%% 
2
+% BE de commande optimale
1 3
 clc
2 4
 
3
-%% BE de commande optimale
5
+%%
6
+%Question 3 
4 7
 Ms = 1120/4;     %kg
5 8
 mu = 45;      %kg
6 9
 Ks = 20000;   %N/m
@@ -27,4 +30,38 @@ sysZu = ss(A,E,C_ut,0)
27 30
 %Modification en tf
28 31
 tf_Zu = tf(sysZu)
29 32
 
33
+%tracé de bode de nos deux sous systèmes
30 34
 bode(tf_Zs,tf_Zu)
35
+
36
+%%
37
+% Question 5
38
+% Mise en place de la commande optimale
39
+
40
+Q=[Ks^2 0 0 0; 0 Cs^2 0 0; 0 0 Kt^2 0; 0 0 0 0];
41
+R=1;
42
+
43
+[G, K, lambda]=lqr(A,B,Q,R);
44
+Abf=A-B*G;
45
+
46
+sysZsBF = ss(Abf, E, C_st, 0);
47
+Zs_BF = tf(sysZsBF)
48
+sysZuBF = ss(Abf, E, C_ut, 0);
49
+Zu_BF = tf(sysZuBF)
50
+
51
+figure
52
+bode(Zs_BF, Zu_BF);
53
+
54
+%commande obtenue par u=-Gx, C=-G
55
+C=-G;
56
+commande=ss(Abf, E, C, 0)
57
+
58
+%Réponse indicielle
59
+figure
60
+step(0.08*sysZsBF)
61
+title("Réponse indicielle pous Zsbf")
62
+figure
63
+step(0.08*sysZuBF)
64
+title("Réponse indicielle pour Zubf")
65
+
66
+
67
+

Loading…
Cancel
Save