©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.2       The Simulink model

To simulate the actual physical process during on-line optimization, the user is required to create a Simulink model of the process to be optimized. Control variables, e.g. gas turbine load and mass flow of fuel, obtained from the process optimization are fed to the Simulink model to calculate process variables, e.g. total plant load and exit gas temperature, some of which are then passed back to the optimization cycle as measurements.

Fig. 1 shows the Simulink model of the combined-cycle power plant. The various components of the plant, e.g. gas turbine and superheater, have been grouped into subsystems to eliminate screen clutter.

Fig. 1: Simulink model for combined-cycle power plant

The following sections explain the requirements that have to be fulfilled when creating the Simulink model.

1.2.1         Process constants

Models for chemical and power engineering processes are often complex and involve many process constants like the universal gas constant R, and reaction constants k. These can either be directly included in the Simulink model, or defined in MATLAB syntax in the M-file <sim_constants.m>, which is executed before the simulation is started. This file must be saved in the model root directory, e.g. C:/OCC/models/combinedcycle/, and will serve all the various cases of this model.

As the constants have to be present in the MATLAB workspace in which the Simulink model is run, it is important that <sim_constants.m> does not include any function calls. Of course, the file can also be used to call other M-files, which, in turn, would have to obey the above rule.

Constants defined in <sim_constants.m> are read by the Simulink model by using the “Constant” block and setting the “constant value” field to the name of the constant.

An example of the “Constant” block can be found in Fig. 1

1.2.2         Saving process variables from the simulation

The “To Workspace” block can be used to save any variable calculated by Simulink. It is important that variable names end with the extension “_sim”. Only such variables will be saved by OCC to the history file <history.mat>. OCC automatically saves the time vector of the simulation under the variable time_sim.

Variables to be used as measurements during the ID process must be sent to the workspace and saved to the history file.

Simulink allows its users to group signals together using the „MUX“ block. However, defining such multidimensional vectors as output to be saved in the history file is not allowed.

It is important that analogous variables have corresponding names. For example, the steel temperature is named t_steel_sim and t_steel in the Simulink and OCC models respectively. Variables defined in this manner are automatically matched to one another when OCC generates starting guesses from measurements. Also, they would be plotted together on the same axis on the on-line menu when the user chooses to view their results.

An example of the “To Workspace” block can be found in Fig. 1.

1.2.3         Initial condition for integrators

All dynamic models would involve the use of “Integrator” blocks. For differential variables where the initial condition changes with each cycle, e.g. steel temperature, the user is required to specify the name of the variable to be used as the initial condition for the integrator. One way of doing this is to set the “initial condition source” option of the integrator to “external”, and connect a “Constant” block to its input. The name of the constant to be used as initial condition must end with the extension “_ini”. The value of the initial condition is calculated automatically by OCC by interpolating the simulation results from the previous cycle. This requires the variable to be sent to the workspace during each simulation, so that it can be saved later on. The rule of adding the extension “_sim” to the variable name applies (see 1.2).

The values of the initial conditions are defined in the M-file <sim_ini.m>. This file is generated and executed automatically during every cycle of the on-line run by OCC before the simulation is started.

Fig. 1 shows the configuration of Simulink blocks required to calculate the differential variable t_steel_sim. An external source has been used for the “Integrator” block in this case for illustrative purposes. In practice, the initial condition t_steel_ini can also be entered as an internal source in the block parameters menu.

Fig. 1.3: Simulink blocks used to calculate variable t_steel_sim

 

1.2.4         Control variables

The control variables, obtained as solutions from process optimization, are fed to the Simulink model via the “From Workspace” block. Format differences in the entry requirements of this Simulink block and the optimization results found in <optdata.m> mean that the vectors for the control variables have to be transposed.

The “From Workspace” block for control variable u_gt is shown in Fig. 1-4. Both vectors time and u_gt are transposed by adding an apostrophe.

Fig. 1-4: Control variable

 

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