©2000 - 2002 Dipl.-Ing. Tobias Jockenhövel. All rights reserved.

Introduction

[User Guide] [Introduction] [Simulink Model] [EXE for Process Optimization] [EXE for System Identification] [Initialization] [Runtime-Parameters] [On-line Wizard] [Initialization Mode 3]

1.6       Runtime parameters for on-line optimization

A number of parameters need to be set before on-line optimization can be started. This is done using the on-line submenu of the OCC options menu shown in Fig.1.

Fig. 1.5: The on-line submenu of the OCC options menu

 

1.6.1         Optimization mode

Using the on-line options submenu, the user is able to choose between three different general modes of operation for the on-line optimization (item ￿).

In mode 1 (“On-line Opt. with wait”) the optimization cycle is repeated at regular intervals (cycle times). This is the normal mode for on-line optimization. The process time during which the nth on-line cycle is started, also know as the cycle launch time, is defined as:

               tlaunch,n = tlaunch,n -1 + tcycle                                                                                   (1-2)

The “wait” in the name of this particular mode refers to the period of time between completion of a particular cycle and the start of the next. In this study, where the actual plants are only represented by Simulink models, the wait is not implemented in real-time.

Mode 2 (“On-line Opt. without wait”), on the other hand, does not require any cycle time to be specified. The on-line cycle is repeated immediately after all the necessary steps in the current cycle are completed. The launch time of the nth cycle is therefore:

               tlaunch,n = tlaunch,n -1 + tduration,n-1  ,                                                                        (1-3)

where     tduration,n-1  : real-time duration required to perform all steps in the (n-1)th cycle.

Mode 3 (“Sequential optimization”) is used primarily to generate starting guesses for large problems which would not converge easily otherwise. As with mode 1, a cycle time has to be specified by the user. Unlike modes 1 and 2, mode 3 requires neither ID nor process simulation. The results from the nth cycle are simply appended to those of the previous (n-1) cycles, which are, in turn, truncated at tlaunch,n. The absence of ID means that input files have to be prepared and saved in the model root directory to initialize the first cycle. This mode is not directly relevant for on-line optimization, but instead only makes use of the on-line capabilities of OCC to generate starting guesses for large problems. Instructions to initialization of mode 3 can be found in Section 1.8.

1.6.2         Cycle time

The user has to define the cycle time if on-line optimization mode 1 (“On-line Opt. with wait”) is chosen. The term “cycle time” refers to the constant time interval (in process time, not real-time) that elapses between two on-line cycles. The value can be set in the on-line options submenu (item k).

The recommended value of the cycle time lies between 30% and 50% of tfinal of the OPT problem. The following points should be taken into consideration:

1.            If cycle time is too small:

The on-line optimization will be repeated too often and therefore the process progresses only very slowly (in process time). Also, a new cycle might be invoked before the old one is completed. This happens when the total real-time duration required to perform ID and OBJ exceeds the cycle time.

 

2.            If cycle time is too large:

The starting guesses for the OPT problem of the new cycle might not be sufficiently good. This is because the bulk of the starting guesses for cycle n is derived from the optimization results from cycle (n-1), with the values at the last timestep being held constant over the future horizon, for which no data is available yet. Setting the cycle time too large would thus mean that the starting guesses for the future horizon could deviate from the actual solution greatly. This could lead to convergence difficulties for large optimization problems.

1.6.3         Saving results from each cycle

By checking the “Save cycle results” option in the on-line options submenu (item n), the following files that are generated during each on-line cycle will be renamed and saved in the case directory.

File generated

New filename

Description

<initials.dat>

<initials_filename*.dat>

Initial conditions for ID and OPT .EXE files

<meas.dat>

<meas_filename*.dat>

Measurements for ID .EXE file

<bounds.dat>

<bounds_filename*.dat>

Variable bounds for ID .EXE file

<svalues.dat>

<svalues_filename*.dat>

Starting guesses for ID and OPT .EXE files

<sim_ini.m>

<sim_ini*.m>

Initial conditions for Simulink simulation

<simdata.mat>

<simdata*.mat>

Results file from Simulink simulation

 

Table 1.2: Files generated during on-line optimization

This options allows the user to examine the results from each cycle more closely after the run has been completed.

On the other hand, the optimization results file <optdata.m> is converted, renamed and saved automatically as <optdata_filename*.mat> and <optdata_opt*.mat> for ID and OPT respectively. Each of these files is essential for the proper running of the on-line optimization and is also required for the various plot functions in OCC during the actual on-line run as well as playback. Unchecking the “Save cycle results” option will have no effects on these files.

1.6.4         Number of optimization cycles

The user can specify the maximum number of on-line cycles to be carried out using this option (item o). Checking “Unlimited” sets the value to 999.

1.6.5         Display ID and OPT results

Checking items p and q in the on-line options submenu allows the optimization results from ID and OPT respectively to be displayed graphically in separate figures. The user can make use of this option to examine the results more closely. This is especially useful during the ID process. Where simulation results are available from the history file <history.mat>, they will be plotted on the same axis as the corresponding variables obtained from ID. For example, variables u_gt and u_gt_sim will be plotted together. In this way, the user would be able to judge the quality of the ID process rather quickly and conveniently. An example of the plots from the ID of the economizer unit in the combined-cycle problem is shown in Fig.1.6.

Fig. 1‑6: Plot of ID results of the economizer unit

The ID results are plotted with points. The background for the four measurements, in this case variables m_steam_ab,t_ec_gas_2, t_ec_wa_1 and t_sg_gas_2, are color-coded for easy recognition. Simulation results have also been saved and plotted in solid lines for variables m_gas,t_ec_steel_1 and t_ec_steel_2.

[User Guide]
[
Introduction]
[
Simulink Model]
[
EXE for Process Optimization]
[
EXE for System Identification]
[
Initialization]
[
Runtime-Parameters]
[
On-line Wizard]
[
Initialization Mode 3]