-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMode_2_Init.m
41 lines (33 loc) · 1.21 KB
/
Mode_2_Init.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
% Base case initialization
u0=[63.053, 53.98, 24.644, 61.302, 22.21, 40.064, 38.10, 46.534, 47.446, 41.106, 18.114, 50];
for i=1:12;
iChar=int2str(i);
eval(['xmv',iChar,'_0=u0(',iChar,');']);
end
Fp_0=100;
r1_0=0.251/Fp_0;
r2_0=3664/Fp_0;
r3_0=4509/Fp_0;
r4_0=9.35/Fp_0;
r5_0=0.337/Fp_0;
r6_0=25.16/Fp_0;
r7_0=22.95/Fp_0;
Eadj_0=0;
SP17_0=80.1;
% Note: The values of xmv_0 and r_0 specified above get overridden
% by the initial conditions specified in the xInitial variable,
% loaded in the following statement. The above statements are
% only needed when starting from a new condition where xInitial
% doesn't apply.
load Mode2xInitial
% TS_base is the sampling
% period of most discrete PI controllers used in the simulation.
Ts_base=0.0005;
% TS_save is the sampling period for saving results. The following
% variables are saved at the end of a run:
% tout - the elapsed time (hrs), length N.
% simout - the TE plant outputs, N by 41 matrix
% OpCost - the instantaneous operating cost, $/hr, length N
% xmv - the TE plant manipulated variables, N by 12 matrix
% idv - the TE plant disturbances, N by 20 matrix
Ts_save=0.01;