©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.4       The .EXE file for system identification

The procedures for generating the .EXE file for ID are similar to those for OPT (Section 1.3). Except in the case of parallel ID, where the process models can be significantly reduced in size, the main difference between the .EXE files lies in the objective function.

In addition to the requirements mentioned in Sections 1.3.1 and 1.3.2, the following rules and recommendations apply.

1.4.1         Defining the measured variables

The values of certain process variables obtained from the Simulink simulation can be fed to .EXE file through the text file <meas.dat> each time ID is performed. These data serve as measurements from the plant (e.g. temperatures and pressures) and help in identifying other variables that cannot be measured directly.

Variables to be used as measurements are specified in the OCC file using the “add_measured_data” function. For example, the command

add_measured_data(t_gas_MEAS);

instructs OCC to capture the simulation data of variable t_gas_sim and include them in <meas.dat>. The extension “_MEAS” is compulsory to differentiate the measurement t_gas_MEAS from the optimization variable t_gas.

For OCC to be able to “measure” a variable it is necessary for it to be saved in the history file. This is achieved by using the “To Workspace” block in the SIMULINK model to record the variable, in this case t_gas_sim (see Section 1.2.2).

1.4.2         The ID objective function

A commonly used objective function for ID is the least-square function, defined by

                                                                                         (1-1)

where     n      : total number of measured variables
               ai      : relative weight of variable
               xid    : ID data
               xmeas: measurements

The following shows an example of how the least-square objective function can be defined in the OCC model for ID of the combined-cycle power plant. Measurements of variables t_gas,t_drum, p_drum, m_gas and m_steam are used.

add_measured_data(t_gas_MEAS);

add_measured_data(t_drum_MEAS);

add_measured_data(p_drum_MEAS);

add_measured_data(m_gas_MEAS);

add_measured_data(m_steam_MEAS);

 

add_aeq(delta_t_gas   = ((t_gas -t_gas_MEAS  )/t_gas  )^2);

add_aeq(delta_t_drum  = ((t_drum -t_drum_MEAS )/t_drum )^2);

add_aeq(delta_p_drum  = ((p_drum -p_drum_MEAS )/p_drum )^2);

add_aeq(delta_m_gas  = ((m_gas  -m_gas_MEAS  )/m_gas )^2);

add_aeq(delta_m_steam = ((m_steam-m_steam_MEAS)/m_steam)^2);

 

add_aeq(lstsqr = delta_t_gas + delta_t_drum + delta_p_drum

               + delta_m_gas + delta_m_steam);

 

objective(lstsqr,discrete);  

 

ocoma();

In this example, the algebraic variable lstsqr corresponds to Eq. (1-1) for the case where all the relative weights are set to unity. The parameter “discrete” is required to generate a objective function where values at each discrete timestep are considered. Leaving out this parameter generates a final-time objective.

1.4.3         The ID structure file

As with the .EXE file for OPT, a structure file in MATLAB syntax is generated when OCOMA is invoked to generate FORTRAN codes (see Table 1). The structure file for the combined-cycle power plant problem is shown below.

% Collocation points

time(1) = 2.5000000000;

time(2) = 12.89473684210526;

...

time(19) = 189.6052631578947;

time(20) = 200.0000000000;

 

% Measured variables

measnames={

't_gas_MEAS'

't_drum_MEAS'

'p_drum_MEAS'

'm_gas_MEAS'

'm_steam_MEAS'

};

 

% Initial conditions

initialnames={

'p_drum'

'P_st'

};

 

%State variables

varnames={

't_gas_in'

'm_steam'

...

'p_drum'

'P_st'

};

 

% Parameters

paranames={

't_sh_steel_1_IC'

't_sh_steel_2_IC'

't_sg_steel_1_IC'

't_sg_steel_2_IC'

't_ec_steel_1_IC'

't_ec_steel_2_IC'

};

 

FLEXIBOUND_MODE=0;

In this particular example, the initial conditions of the various steel temperatures t_*_steel_* have been defined as parameters to be optimized concurrently. These parameters are listed under the vector paranames and contain the extension “_IC” (for “Initial Condition”). At the same time, the number of differential variables listed under the vector initialnames has been reduced as compared to the OPT structure file (see Section 1.3.2).

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