-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript_projet.m
59 lines (55 loc) · 1.18 KB
/
script_projet.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
% asservissement sans correcteur
sys = tf(6.5359,[1 10.784 0 0]);
H = [1];
M = feedback(sys , H);
step(M);
hold on ;
%%-----------------------------------------------%%
% asservissement avec correcteur
num = [6.5359]
denom = [1 10.784 0 0]
Gp = tf(num, denom)
H= [1]
numcor = [9.081 1.938]
denomcor = [ 0.0085 1]
Gpcor = tf(numcor , denomcor )
M = feedback(Gp*Gpcor , H )
step(M)
grid on
hold on
%--------------------------------------------------%
% Retour d'état
C = [6.563 0 0 ]
B = [0;0;1]
A=[0 1 0;
0 0 1;
0 0 -10.78]
ob = obsv(A,C)
Ct = ctrb(A,B)
a=rank(ob)
b = rank(Ct);
p=[-3.5+3.57j -3.5-3.57j -0.27 ];
k=place(A,B,p)
%-------------------------------------------------------%
% Commande RST
num = [6.5359];
denom = [1 10.784 0 0];
Gp = tf(num, denom);
Ts = 0.2;
H = c2d(Gp,Ts);
AA=[ 1 0 0 0 0 0;
-2.116 1 0 0.00549 0 0;
1.231 -2.116 1 0.01404 0.00549 0;
0.01157 1.231 -2.116 0.01906 0.01404 0.00549;
0 0.01157 1.231 0 0.001906 0.01404;
0 0 0.01157 0 0 0.001906];
pp=[0.986;
0.160;
0.0576;
0.932;
0.90006];
O=poly(pp)
X=inv(AA)*transpose(O)
R=[ X(4) X(5) X(6)]
S=[ 1 X(2) X(3)]
T=46.65*O