N. Lawrence Ricker
Professor Emeritus, Chemical Engineering
University of Washington
Seattle, WA 98195-1750
Updated TE Code
New Simulink models of two decentralized control strategies
MATLAB 7.x Codes
Basic (original) TEC Code
Rivera Group's MATLAB Simulation
Optimal steady states
Simplified TE process
Using the original TE code in MATLAB
A new version of the c code has been developed to allow the use of variable-step integration methods in MATLAB/Simulink and other simulation codes.† The use of such methods with Downs and Vogelís original Fortran code (or the c translation provided in Basic TEC Code) leads to inconsistent results.† The updated code has been tested with MATLAB/Simulink 2014b.
The updated code also has the following new features:
∑ Documentation of most internal variables.† This violates Downs and Vogelís intent to keep model details secret, but a careful reading of their original code allows one to decipher it.† As more than 20 years have elapsed since the problemís release, it no longer seems necessary to keep the details obscure.
∑ Additional disturbances and measurements.† These may be of use but are optional.
Note that disturbance switches (IDV values) must be supplied as model input signals, not parameters.††
For more details, download the following archive, and see its README.TXT file.† The archive contains a draft paper submitted to ADCHEM 2015 that explains the rationale for the updated model and other technical details.† The archive also contains several demonstrations of open-loop and closed-loop operation with variable-step-size integration.† These may be compared to similar demonstrations using the original code.temexd_mod.zip
As of 2 December 2002, two new Simulink models have been added to the temex archive (see below). For more details, download the archive, and see its README.TXT file. Additional changes made on 24 February 2005.
Two of the key interface routines were revised in December, 1998, to operate under MATLAB 5.2 or greater in Simulink 2 or greater. Click the links below to download the corresponding Zip archive. See the README file therein for details on installation and use.† The following comments supersede the instructions in the README file.
NOTE: these files were updated 23 February 2002 and tested successfully in MATLAB 6.1 (Release 12).
NOTE: the temex archive was updated 2 December 2002, and is compatible with MATLAB 6.5 (Release 13). It was tested on 24 Feb 2005 and seemed to work with MATLAB 7.04 (Release 14).
NOTE:† the temex archive was updated on 2 February 2005.† The Simulink models for the Multi-loop strategies now require Simulink version 6.2 or higher.
Clicking HERE will download zip archive called tecode.zip. Use Win Zip or equivalent to extract a directory called tecode containing the following files, all in ASCII format:
Marty Braun, working with Prof. Daniel Rivera (ASU, Chem Engr) converted Down and Vogel's code from Fortran to MATLAB. This allows you to work in the convenient Simulink environment without having to compile a MEX file. You can also modify the MATLAB code so as to make the simulation more amenable to your specific research goals.
Here is a link to their site, where you can download the code:
The disadvantages of this approach are:
Clicking HERE will download a zip archive called tables.zip. Use Win Zip or equivalent to extract the following 3 files, which are in tab-delimited text (ASCII) format. It should be possible to read them into a spreadsheet program or text editor. They contain both text (row labels and units) and numerical data, so you may need to re-format before reading into Matlab, etc. The files give operating conditions at 6 different steady state operating conditions described in the paper Optimal Steady state Operation of the Tennessee Eastman Challenge Process, N. L. Ricker, Computers & Chemical Engineering, Vol. 19, No. 9, pp. 949-959(1995).
To verify a steady state I suggest that you call subroutine tefunc (part of teprob.f) to calculate the derivatives for the given states and manipulated variables. All derivatives should be less than 1.e-3. You can also use the te_mex function in Matlab.
The following zip archives contain Matlab and Fortran code described in the papers Nonlinear Model Predictive Control of the Tennessee Eastman Challenge Process, Computers & Chemical Engineering, Vol. 19, No. 9, pp. 961-981(1995), and Nonlinear Modeling and State Estimation for the Tennessee Eastman Challenge Process, ibid, pp. 983-1005(1995). Click on the link to download the archive. Use Win Zip or equivalent to expand it.
NOTE: Since 2002, some researchers have had trouble getting this software to work. This appears to be caused by changes in MATLAB. I have been unable to correct this problem. If you encounter problems with instability, etc., and are able to correct them, please let me know.
The following directory contains Matlab and Fortran code described in the paper MPC of a continuous, nonlinear, two-phase reactor, N. L. Ricker, J. Process Control, vol. 3, 109-123(1993). Click on the link to download the archive. Use Win Zip or equivalent to expand it.
See Simulink code available in the temex archive.
The following zip archives document the performance of the decentralized
control strategy described in Decentralized control of the
idv1.zip Step in A/C feed
ratio in stream 4
idv2.zip Step in B composition in stream 4
idv3.zip Step in D feed temperature (stream 3)
idv4.zip Step in reactor cooling water inlet temperature
idv5.zip Step in condenser cooling water inlet temperature
idv6.zip Sudden loss of A feed (stream 1). This is a tough one!
idv7.zip Stream 4 header pressure loss. (step change)
idv8.zip Random variations in A,B,C compositions in stream 4 (another tough one).
idv9.zip Random variations in D feed temperature
idv10.zip Random variations in C feed temperature
idv11.zip Random variations in reactor cooling water inlet temperature
idv12.zip Random variations in condenser cooling water inlet temperature
idv13.zip Slow drift in reaction kinetics (also difficult)
idv14.zip Reactor cooling water valve sticking
idv15.zip Condenser cooling water valve sticking
Click HERE to see a text file describing the data format of the above archives. You can save this for future reference.
Click HERE to see a text file containing additional
suggestions on using the Basic (original) TE code with MATLAB.
NOTE: The information has not been updated since the release of MATLAB 5. You may need to change
some aspects to make it work in the latest version of MATLAB.