-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathifac_pid_mfile.m
80 lines (62 loc) · 1.35 KB
/
ifac_pid_mfile.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
% gr_data.gr2.t=t_sim
% gr_data.gr2.y=y_sim
% gr_data.gr2.tu=t_akc
% gr_data.gr2.u=y1_akc
t = gr_data.gr2.t;
y1 = gr_data.gr1.y;
y2 = gr_data.gr2.y;
y3 = gr_data.gr3.y;
y4 = gr_data.gr4.y;
y5 = gr_data.gr5.y;
y6 = gr_data.gr6.y;
u1 = gr_data.gr1.u;
u2 = gr_data.gr2.u;
u3 = gr_data.gr3.u;
u4 = gr_data.gr4.u;
u5 = gr_data.gr5.u;
u6 = gr_data.gr6.u;
% Y_analyt
%
figure
hold on
plot(t,y1,'b--','linewidth',2)
plot(t,y2,'r-.','linewidth',2)
plot(t,y3,'color',[0 0.5 0],'linewidth',2)
ax = axis;
axis([0 20 ax(3) ax(4)])
plot([t(1),t(end)],[1 1],'k:','linewidth',2)
plot([t(1),t(end)],[1*0.95 1*0.95],'k:','linewidth',2)
plot([t(1),t(end)],[1*1.05 1*1.05],'k:','linewidth',2)
% Y_exper
%
hold off
figure
hold on
plot(t,y4,'b--','linewidth',2)
plot(t,y5,'r-.','linewidth',2)
plot(t,y6,'color',[0 0.5 0],'linewidth',2)
ax = axis;
axis([0 20 ax(3) ax(4)])
plot([t(1),t(end)],[1 1],'k:','linewidth',2)
plot([t(1),t(end)],[1*0.95 1*0.95],'k:','linewidth',2)
plot([t(1),t(end)],[1*1.05 1*1.05],'k:','linewidth',2)
% U_analyt
%
hold off
figure
hold on
plot(t,u1,'b--','linewidth',2)
plot(t,u2,'r-.','linewidth',2)
plot(t,u3,'color',[0 0.5 0],'linewidth',2)
ax = axis;
axis([0 20 ax(3) ax(4)])
% U_exper
%
hold off
figure
hold on
plot(t,u4,'b--','linewidth',2)
plot(t,u5,'r-.','linewidth',2)
plot(t,u6,'color',[0 0.5 0],'linewidth',2)
ax = axis;
axis([0 20 ax(3) ax(4)])