THE CONTINUOUS STIRRED TANK HEATER SIMULATION

by N.F. Thornhill, Imperial College London, Sachin C. Patwardhan, IIT Bombay, and Sirish L Shah, University of Alberta.


Introduction

This web site disseminates a first principles simulation of a continuous stirred tank heater (CSTH) pilot plant at the University of Alberta. The model has heat and mass balance, and a very realistic feature is that instrument, actuator and process non-linearities have been carefully measured. Models in Simulink, supporting Matlab files are available together with experimental noise and disturbance sequences.

A full description is given in:

Thornhill, N.F., Patwardhan, S.C., and Shah, S.L., 2008, A continuous stirred tank heater simulation model with applications, Journal of Process Control, 18, 347360.

Please kindly cite the paper in your work as appropriate. Thank you.

 


Continuous stirred tank heater basic model with closed loop control

The CSTH basic model is a self contained Simulink model under closed loop control that runs to a steady state from a non-steady initial condition.

 

Download link:

Simulink model for the stirred Tank Heater: (right click and select Save Target As)

  CSTHMaster.mdl

 

Instructions for use:

Step 1:  Download the CSTHMaster.mdl and place it in a suitable folder (e.g. c:\Matlab\CSTH)

Step 2:  Start Matlab and select the chosen folder (e.g. c:\Matlab\CSTH) as the current directory

Step 3:  Type CSTHMaster at the Matlab prompt

Step 4:  Press the Start Simulation command button in Simulink (it is a right-pointing arrow head).

Step 5:  Double click on the Scope symbols (level/mA, flow/mA, temp/mA) to see the results.

 

The results at two standard operating conditions are as follows:

operating condition

Standard operating condition 1

level sp/mA = 12; temp sp/mA = 10.5;

HW valve/mA = 0

Standard operating condition 2

level sp/mA = 12; temp sp/mA = 10.5;

HW valve/mA = 5.5 mA

CW PID OP/mA

12.955

7.7043

temp/ PID OP/mA

12.568

6.0532

level/cm

20.475

20.475

CW flow/(cu.m/sec)

9.0376 10-5

3.8226 10-5

temp/degC

42.517

42.517

level/mA

12.00

12.00

flow/mA

11.892

7.330

temp/mA

10.5

10.5

 


Continuous stirred tank heater with closed loop control and disturbances

The CSTH model with disturbances is a self contained hybrid Simulink model under closed loop control with disturbances present. The disturbances are real data sequences measured experimentally from the pilot plant. The simulation is initialized at its operating point by first running a Matlab initialization code.

 

Download links:

Simulink models for the Stirred Tank Heater with disturbances: (right click and select Save Target As)

    Standard operating point 1:  CSTHDisturbedStdOp1.mdl

    Standard operating point 2:  CSTHDisturbedStdOp2.mdl

Matlab initialization code for the Stirred Tank Heater with disturbances: (right click and select Save Target As)

    Initialization of standard operating point 1:  InitializeCSTHDisturbedStdOp1.m

    Initialization of standard operating point 2:  InitializeCSTHDisturbedStdOp2.m

Data files for 2000 seconds of noise and disturbances: (right click and select Save Target As)

    Level disturbance:  LevelDisturbance.mat

    CW flow disturbance:  CWFlowDisturbance.mat

    Temperature measurement noise:  TemperatureNoise.mat

 

Instructions for use of CSTHDisturbedStdOp1.mdl

Step 1:  Download CSTHDisturbedStdOp1.mdl and place it in a suitable folder (e.g. c:\Matlab\CSTH);

Step 2:  Download InitializeCSTHDisturbedStdOp1.m and place it in the same folder;

Step 3:  Download the three disturbance data files and place them in the same folder;

Step 4:  Start Matlab and select the chosen folder (e.g. c:\Matlab\CSTH) as the current directory

Step 5:  Type InitializeCSTHDisturbedStdOp1 at the Matlab prompt

Step 6:  Type CSTHDisturbedStdOp1 at the Matlab prompt

Step 7:  Press the Start Simulation command button in Simulink (it is a right-pointing arrow head).

Step 8:  Double click on the Scope symbols (level/mA, flow/mA, temp/mA) to see the results.

 

Instructions for use of CSTHDisturbedStdOp2.mdl

Step 1:  Download CSTHDisturbedStdOp2.mdl and place it in a suitable folder (e.g. c:\Matlab\CSTH);

Step 2:  Download InitializeCSTHDisturbedStdOp2.m and place it in the same folder;

Step 3: to Step 8:  As above.

 


Help and Support

Model errors and suggestions for improvements: n.thornhill@imperial.ac.uk

Known issues that are being worked on are:

issue

solution

The temperature dynamics do not work correctly when the tank is empty

It is best to avoid running the simulation with the tank empty.

The CSTHDisturbedStdOp1 model deviates from the steady state when simulated for more than 2000s.

The initialization code does not put the simulations to the correct steady state

The reason is that the data files only go up to 2000s. Simulink extrapolates beyond 2000 seconds using the final two data points for linear extrapolation.

Please read the comments inside the InitializeCSTHDisturbedStdOp m-files. They explain that the ordering of the states can change if you edit the model, or if the Matlab release changes.

 

Simulink queries: The on-line help in Simulink is useful or talk the Mathworks. Some common error messages generated by the models and their solutions are listed below:

errors and warnings

solution

Error evaluating parameter 'InitialInput'. Undefined function or variable 'CWValveIC'

This and similar errors can arise when running the CSTHDisturbedStdOp1 and CSTHDisturbedStdOps models. The solution is to run the Initialization code at the Matlab prompt (Step 5).

Warning: Initializing the model 'CSTHDisturbedStdOp1' with the initial state

specified in array format is not recommended.

This warning can be suppressed by first calling the model by typing CSTHDisturbedStdOp1 at the Matlab prompt and then typing the following command at the Matlab prompt: set_param('CSTHDisturbedStdOp1', 'InitInArrayFormatMsg', 'None')

 


Three-tank simulation from IIT Bombay

The three-tank model is a self-contained Simulink open-loop model which runs at a steady state. The measurements have added noise. Details may be found in:

Thornhill, N.F., Patwardhan, S.C., and Shah, S.L., 2007, A continuous stirred tank heater simulation model with applications, Journal of Process Control, 18, 347-360.

 

Download link:

Simulink model for the stirred Tank Heater: (right click and select Save Target As...)

    ThreeTankModelIITBombay.mdl


CSTH description in Automation ML

A model for the CSTH system in Automation ML is described in the paper below:

Arroyo, E., Schulze, D., Christiansen, L., Fay, A., and Thornhill, N.F., Derivation of diagnostic models based on formalized process knowledge, submitted for IFAC World Congress, August 24-29, 2014, Cape Town, South Africa.

 

Download link:

Automation ML model for the stirred Tank Heater: (right click and select Save Target As...)

    CSTH_xSDG.aml

 


Updated: December 2006

          May 2013, November 2013

Home page