-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathise_iae_param.m
300 lines (269 loc) · 10.3 KB
/
ise_iae_param.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
% ISE_IAE_PARAM
%
% Vypis hodnot ukazovatelov kvality
% Vytvori vektory y_sim2B a t_simB, ktore vzniknu vybratim koncovej
% casti vektorov y_sim2 a t_sim, ktora zodpoveda poslednej ziadanej
% hodnote, aby sa kriteria kvality cas regulacie a maximalne preregulovanie
% vypocitali pre konecnu hodnotu ziadanej veliciny
%
if(zh(end) ~= zh(1))
ptv_temp = length(find(zh(end) ~= zh));
ptv_temp_t = t_sim(ptv_temp);
y_simB = y_sim(ptv_temp+1:end);
t_simB = t_sim(ptv_temp+1:end);
else
y_simB = y_sim;
t_simB = t_sim;
ptv_temp_t = 0;
end
% SETIME = cas regulacie
if(zh(end)>0)
setime = ptf_setime(t_simB,y_simB, dh(end), hh(end));
else
setime = ptf_setime(t_simB,y_simB, hh(end), dh(end));
end
% SIGM_MAX = maximalne preregulovanie
sigma_Max = ptf_maxovershot(y_simB);
% IAE = Integralne kriterium kvality - Integral(abs(e))
iae = ise_iae(end,1);
% ISE = Integralne kriterium kvality - Integral(e^2)
ise = ise_iae(end,2);
% ITAE = Integralne kriterium kvality - Integral(t*e^2)
itae = ise_iae(end,3);
% ITSE = Integralne kriterium kvality - Integral(t*e^2)
itse = ise_iae(end,4);
% ISTAE = Integralne kriterium kvality - Integral(t^2*abs(e))
istae = ise_iae(end,5);
% ISTSE = Integralne kriterium kvality - Integral(t^2*e^2)
istse = ise_iae(end,6);
% ISE_u = Integralne kriterium kvality - Integral(e^2+Q_u*u^2)
ise_u = ise_iae(end,7);
% ISE_du = Integralne kriterium kvality - Integral(e^2+Q_du*du^2)
ise_du = ise_iae(end,8);
% ISE_de = Integralne kriterium kvality - Integral(e^2+Q_de*de^2)
ise_de = ise_iae(end,9);
% DLOGER
%
dloger
% Vypis integralnych kriterii
%
% Semafor pre kvalitu regulacie:
%
semaf_zel = 0.05;
semaf_zlt = 0.20;
fig3 = figure('Color','blue',...
'Resize','off',...
'Numbertitle','off',...
'Tag','ptt_param',...
'Menubar',ptv_fig_menubar,...
'name',ptg_string(1,10,ptv_str_lang), ...
'position',[400 100 260 500]);
% Clolourful effect
ptf_cfbcg(gcf,ptv_cfbcg)
% SETIME
iae_text = uicontrol(gcf,...
'Style','text',...
'Fontsize',[12],...
'ForegroundColor','black',...
'BackgroundColor',ptf_semaph(setime,cas_simulacie, semaf_zel, semaf_zlt,ptv_cfbcg),...
'Fontweight','bold',...
'HorizontalAlignment','center',...
'Position',[30 455 130 25],...
'String',ptg_string(8,53,ptv_str_lang));
iae2 = uicontrol(gcf,...
'Style','edit',...
'ForegroundColor','black',...
'Fontsize',[11],...
'BackgroundColor',[1 1 1],...
'String',num2str(setime),...
'Position',[162 455 80 25],...
'CallBack','set(gco,''String'',num2str(setime))');
% SIGMA_MAX
iae_text = uicontrol(gcf,...
'Style','text',...
'Fontsize',[12],...
'ForegroundColor','black',...
'BackgroundColor',ptf_semaph(sigma_Max,cas_simulacie, semaf_zel, semaf_zlt,ptv_cfbcg),...
'Fontweight','bold',...
'HorizontalAlignment','center',...
'Position',[30 415 130 25],...
'String',ptg_string(8,54,ptv_str_lang));
iae2 = uicontrol(gcf,...
'Style','edit',...
'ForegroundColor','black',...
'Fontsize',[11],...
'BackgroundColor',[1 1 1],...
'String',num2str(sigma_Max),...
'Position',[162 415 80 25],...
'CallBack','set(gco,''String'',num2str(sigma_Max))');
% IAE
iae_text = uicontrol(gcf,...
'Style','text',...
'Fontsize',[12],...
'ForegroundColor','black',...
'BackgroundColor',ptf_semaph(iae,cas_simulacie, semaf_zel, semaf_zlt,ptv_cfbcg),...
'Fontweight','bold',...
'HorizontalAlignment','center',...
'Position',[30 375 80 25],...
'String',ptg_string(8,41,ptv_str_lang));
iae2 = uicontrol(gcf,...
'Style','edit',...
'ForegroundColor','black',...
'Fontsize',[11],...
'BackgroundColor',[1 1 1],...
'String',num2str(iae),...
'Position',[112 375 130 25],...
'CallBack','set(gco,''String'',num2str(iae))');
% ISE
ise_text = uicontrol(gcf,...
'Style','text',...
'Fontsize',[12],...
'ForegroundColor','black',...
'BackgroundColor',ptf_semaph(ise,cas_simulacie, semaf_zel, semaf_zlt,ptv_cfbcg),...
'Fontweight','bold',...
'HorizontalAlignment','center',...
'Position',[30 335 80 25],...
'String',ptg_string(8,42,ptv_str_lang));
ise2 = uicontrol(gcf,...
'Style','edit',...
'ForegroundColor','black',...
'Fontsize',[11],...
'BackgroundColor',[1 1 1],...
'String',num2str(ise),...
'Position',[112 335 130 25],...
'CallBack','set(gco,''String'',num2str(ise))');
% ITAE
itae_text = uicontrol(gcf,...
'Style','text',...
'Fontsize',[12],...
'ForegroundColor','black',...
'BackgroundColor',ptf_semaph(itae,cas_simulacie, semaf_zel, semaf_zlt,ptv_cfbcg),...
'Fontweight','bold',...
'HorizontalAlignment','center',...
'Position',[30 295 80 25],...
'String',ptg_string(8,55,ptv_str_lang));
itae2 = uicontrol(gcf,...
'Style','edit',...
'ForegroundColor','black',...
'Fontsize',[11],...
'BackgroundColor',[1 1 1],...
'String',num2str(itae),...
'Position',[112 295 130 25],...
'CallBack','set(gco,''String'',num2str(itae))');
% ITSE
itse_text = uicontrol(gcf,...
'Style','text',...
'Fontsize',[12],...
'ForegroundColor','black',...
'BackgroundColor',ptf_semaph(itse,cas_simulacie, semaf_zel, semaf_zlt,ptv_cfbcg),...
'Fontweight','bold',...
'HorizontalAlignment','center',...
'Position',[30 255 80 25],...
'String',ptg_string(8,43,ptv_str_lang));
itse2 = uicontrol(gcf,...
'Style','edit',...
'ForegroundColor','black',...
'Fontsize',[11],...
'BackgroundColor',[1 1 1],...
'String',num2str(itse),...
'Position',[112 255 130 25],...
'CallBack','set(gco,''String'',num2str(itse))');
% ISTAE
isetae_text = uicontrol(gcf,...
'Style','text',...
'Fontsize',[12],...
'ForegroundColor','black',...
'BackgroundColor',ptf_semaph(istae,cas_simulacie, 20*semaf_zel, 7*semaf_zlt,ptv_cfbcg),...
'Fontweight','bold',...
'HorizontalAlignment','center',...
'Position',[30 215 80 25],...
'String',ptg_string(8,56,ptv_str_lang));
istae2 = uicontrol(gcf,...
'Style','edit',...
'ForegroundColor','black',...
'Fontsize',[11],...
'BackgroundColor',[1 1 1],...
'String',num2str(istae),...
'Position',[112 215 130 25],...
'CallBack','set(gco,''String'',num2str(istae))');
% ISTSE
isetse_text = uicontrol(gcf,...
'Style','text',...
'Fontsize',[12],...
'ForegroundColor','black',...
'BackgroundColor',ptf_semaph(istse,cas_simulacie, 20*semaf_zel, 7*semaf_zlt,ptv_cfbcg),...
'Fontweight','bold',...
'HorizontalAlignment','center',...
'Position',[30 175 80 25],...
'String',ptg_string(8,57,ptv_str_lang));
istse2 = uicontrol(gcf,...
'Style','edit',...
'ForegroundColor','black',...
'Fontsize',[11],...
'BackgroundColor',[1 1 1],...
'String',num2str(istse),...
'Position',[112 175 130 25],...
'CallBack','set(gco,''String'',num2str(istse))');
% ISE_u
ise_u_text = uicontrol(gcf,...
'Style','text',...
'Fontsize',[12],...
'ForegroundColor','black',...
'BackgroundColor',ptf_semaph(ise_u,cas_simulacie, 20*semaf_zel, 7*semaf_zlt,ptv_cfbcg),...
'Fontweight','bold',...
'HorizontalAlignment','center',...
'Position',[30 135 80 25],...
'String',ptg_string(8,44,ptv_str_lang));
ise_u2 = uicontrol(gcf,...
'Style','edit',...
'ForegroundColor','black',...
'Fontsize',[11],...
'BackgroundColor',[1 1 1],...
'String',num2str(ise_u),...
'Position',[112 135 130 25],...
'CallBack','set(gco,''String'',num2str(ise_u))');
% ISE_du
ise_du_text = uicontrol(gcf,...
'Style','text',...
'Fontsize',[12],...
'ForegroundColor','black',...
'BackgroundColor',ptf_semaph(ise_du,cas_simulacie, semaf_zel, semaf_zlt,ptv_cfbcg),...
'Fontweight','bold',...
'HorizontalAlignment','center',...
'Position',[30 95 80 25],...
'String',ptg_string(8,45,ptv_str_lang));
ise_du2 = uicontrol(gcf,...
'Style','edit',...
'ForegroundColor','black',...
'Fontsize',[11],...
'BackgroundColor',[1 1 1],...
'String',num2str(ise_du),...
'Position',[112 95 130 25],...
'CallBack','set(gco,''String'',num2str(ise_du))');
% ISE_de
ise_e_text = uicontrol(gcf,...
'Style','text',...
'Fontsize',[12],...
'ForegroundColor','black',...
'BackgroundColor',ptf_semaph(ise_de,cas_simulacie, semaf_zel, semaf_zlt,ptv_cfbcg),...
'Fontweight','bold',...
'HorizontalAlignment','center',...
'Position',[30 55 80 25],...
'String',ptg_string(8,46,ptv_str_lang));
ise_de2 = uicontrol(gcf,...
'Style','edit',...
'ForegroundColor','black',...
'Fontsize',[11],...
'BackgroundColor',[1 1 1],...
'String',num2str(ise_de),...
'Position',[112 55 130 25],...
'CallBack','set(gco,''String'',num2str(ise_de))');
potvrdenie = uicontrol(gcf,...
'Style','push',...
'Position',[75 15 130 25],...
'Fontsize',[11],...
'Fontweight','bold',...
'String',ptg_string(3,2,ptv_str_lang),...
'ForegroundColor','black',...
'CallBack','close,close(findobj(''Tag'',''ptt_error'')),simul_param');
clear('ptv_temp','ptv_temp_t','semaf_zel','semaf_zlt')