Experiences Using MATLAB Simulink For Dynamic Real-Time Proc
Experiences Using MATLAB Simulink For Dynamic Real-Time Proc
1. Introduction
Process simulation technology has evolved dramatically over the past 10 years with the
increasing application of object oriented programming. Many packages are available which
allow intuitive visualization of process data coupled with a user-friendly graphical interface
which allows rapid synthesis of process flowsheets using click-and-drag operations. These
packages are common in industry for both process modeling and real-time process control. A
significant challenge for instructors is to prepare students to use these tools in their
undergraduate chemical engineering curriculum.
In this paper, we describe the use of MATLAB's dynamic simulation engine, Simulink, in an
undergraduate process dynamics and control class. Using the graphical user interface (GUI)
design tool, dubbed GUIDE by MATLAB, one can create customized interfaces that allow the
students to quickly interpret data from the process as well as make modifications to the control
operations in an intuitive framework. In effect, it is possible to emulate the interface typically
found on an industrial distributed control system (DCS). Using these tools, we have introduced a
number of case studies into the undergraduate control curriculum (process control modules
(PCM)). In this paper, we concentrate on one of the new case studies: the pulp digester. A
continuous digester is one of the strategic processes of pulping operations. In terms of the
physical unit, it may be as large as 20ft in diameter and 120ft tall with capacity to hold as much
as 1/4 of the daily production in transit. The digester is a multi-phase reactor/separator
combination with a moving packed-bed where lignin is removed from wood chips. Various
complexities of the process provide a rather rich example for chemical engineering students to
exercise the combined application of principles learned in transport, reaction engineering, unit
operations, process design, process control and numerical methods.
The Process Control Modules (PCM) are a set of programs written in the
MATLAB/SIMULINK environment, for use instruction of an undergraduate course on
process dynamics and control. The modules are based on fundamental process models of
industrial unit operations (distillation column, biochemical reactor, pulp digester, heated-tube
furnace), and incorporate a realistic graphical user interface to emulate an industrial control
Page 3.277.1
environment. They were developed to allow educators to strike a proper balance between
theory and practice using a computer-based control laboratory. Such a laboratory can address
a variety of issues in process control: modeling, identification, simulation, analysis, and
design. The students can deal with realistic problems in the form of benchmark problem
modules, and this will not only reinforce the concepts presented in the lecture notes
(primarily theory) but will also make the process more interesting.
Such an approach to education will allow for fundamentals to be stressed in the lectures
while enabling the interaction with complex, practical process problems via software
modules. The software tools that we have chosen for the instructional laboratory are
MATLAB (matrix laboratory) and SIMULINK (Dynamic System Simulation Software).
They represent an interactive program for scientific and engineering calculations. MATLAB
has become a standard among academic and industrial users alike for use as both an
educational tool as well as a research utility. Other software packages for control education
include PICLES [1], and ACS [2]; however, these packages do not, in general, adequately
handle large practical-scale problems.
The primary distinction of the PCM software package is the ability to incorporate complex
dynamical process models with convenient graphical user interfaces (developed in the
MATLAB graphics language) in a way to achieve a realistic emulation of an industrial
distributed control system operator's console [3,4]. Furthermore, the entire package is based
on a commercial software platform (MATLAB) which allows individual instructors to
customize, or add to, existing modules. The flexibility of this platform allows for migration
to many PC and workstation hardware platforms, and allows for continued use of the PCM
package through upper level control elective courses by the addition of specialized
MATLAB control toolboxes.
Simulation parameters
The individual simulation modules employed in PCM consist of c-code subroutines which are
integrated to MATLAB/Simulink using a gateway subroutine. A compiled version of the code is
ultimately used (a cmex file or c-MATLAB-executable file), so there is no run-time compilation
of the unit operation code.
The integration engine suite in MATLAB is impressive. There are first through fifth order fixed
step integrators (including the traditional Euler and Runge-Kutta), as well as up to fifth order
variable-step integrators (including Adams and several stiff system integrators). While the expert
user can fine-tune the tolerances and step-sizes to suit a particular problem, the students that run
the PCM modules merely execute the settings that have been provided by the instructor. In
effect, they are running a pseudo-real-time simulation, since we never allow them to turn the
simulation off until the lab session is completed. The “pseudo” qualification denotes the fact that
the integrator will not execute a uniformly synchronized run over time, but will run somewhat
slower during the transient following large changes in the input variables, and somewhat faster
during steady-state execution. For educational purposes, these effects are inconsequential, and
Page 3.277.2
MATLAB affords nice flexibility for customization of the graphical user interface (GUI). An
example of such customization is the PCMplot utility, which allows users to load historical data
generated by the simulation, regress a low order approximate model, and validate the result.
Customizable features include pull-down menus, clickable buttons, and incorporation of standard
MATLAB plotting utilities (e.g., real-time data plotting). An illustrative example of these
features will be discussed in section 5.
The Kamyr digester is a two phase continuous tubular reactor which uses the kraft process to
convert wood chips to pulp through reaction with a heated causticizing solution known as white
liquor. The digester consists of several zones in which the flow of white liquor is either: (i) co-
current or (ii) counter-current with respect to the chip flow (see Figure 1). The Kappa# is a
measure of the residual lignin, the glue-like substance binding cellulose fibers together, in the
pulp and is a direct indicator of the pulp quality. The control objective is to minimize the
variations of the Kappa# in the presence of measured and unmeasured disturbances. Advantages
for its successful control include increasing product quality, minimizing utility usage and
reducing downstream processing.
There are several features of the continuous digester that pose challenging control problems,
thus making this an ideal exercise for classroom study:
• the main control variable, Kappa#, is sampled infrequently and there can be long time
delays associated with its measurement;
• the digester is subject to unmeasured variations in the biological feedstock
(composition, moisture, and density) and white liquor compositions;
• there are significant time delays between the manipulated variable action and their
observed effects in the primary and secondary measurements;
• the digester exhibits nonlinear behavior, particularly in the lower Kappa# range. Page 3.277.3
W F PRODUCTION RATE & KAPPA NUMBER
CHIP LEVEL CONTROL CONTROL
WET CHIPS
CHIP
BIN T
L
F
F
COOK
ZONE
L
EA F UPPER EXTRACT
DIGESTER
IMPREGNATION VESSEL
EA F
LOWER EXTRACT
MCC
ZONE
F
EMCC
&
WASH
ZONE T
F
WASH F
F
WATER
WHITE
BLOW FLOW PULP TO
LIQUOR
PRESSURE DIFFUSER
EA
F K#
The development of fundamental digester models for control studies is a non-trivial and
time-consuming task. For this reason, several digester benchmark problems (DBP) have
been developed to provide a common comparison base for continuous digester control
studies [5,6]. These DBPs are simplified process models which captures the major dynamic
characteristics of digester behavior. In the DBP employed in this study [6], the continuous
digester is modeled with two vessels, an impregnation vessel and a reaction vessel (shown in
Figure 1). The impregnation vessel is modeled as a mixing section followed by pure time
delay in which the white liquor is diluted by the wood chip moisture. The reaction vessel is
modeled with three zones; a co-current cook zone, a counter-current modified continuous
cook (mcc) zone and an extended modified continuous cook (emcc) zone. It is assumed that
there are two phases, a solid phase consisting of five components and a liquor phase
consisting of six components and that the two phase are in thermal equilibrium. The reactor
Page 3.277.4
zones are described by mass and energy balances of the following form (the interested reader
is referred to the original paper for complete details):
∂ρ Si ∂ρ
= −υ S Si + RSi i = 1,...,5
∂t ∂z
∂ρ Lj ∂ρ Lj
= µυ L + RLj j = 1,...,4
∂t ∂z
∂T υ ∂T
(1 + α ) = −υ S (1 ± α L )
∂t υ S ∂z
where the signs reflect the co-current and counter-current sections, respectively. There are
three primary zones, in which these ten equations are applied. In the implementation for
PCM, a lumped approximation of order 50/zone was used to yield a set of ordinary
differential equations of dimension 1500. This points out two of the complex features that
underly all of the unit operations employed in PCM: (i) high dynamic order, and (ii) complex
nonlinear behavior.
The previously described unit operation has been incorporated into the Process Control Modules,
and the corresponding flowsheet is given in Figure 2. The process variables of interest for this
educational implementation are a subset of the total simulation variables, and are summarized in
Table 1. From the flowsheet, the students can execute the simulation and change process
variables (e.g., introduce a load disturbance). In a closed-loop flowsheet, the students could
access and change (in real-time) the controller tuning parameters.
Using the GUI tools described earlier, a process monitor window was developed, as shown in
Figure 3. Key features of this monitor include:
• Individual real-time graphs of four key process variables
• “Pointer” button to enable readout of process variable values
• “Save” button to archive data for analysis (e.g., regression)
• A toggle switch to allow students to move between the flowsheet (simulation)
windows and the process monitor windows.
Page 3.277.5
Figure 2: Digester Flowsheet Window
Page 3.277.6
The management of these modules in a one semester course offering is accomplished by weekly
(2 hour) lab assignments which typically address one of the previously enumerated exercises.
The students can run the exercises in the University laboratory, or at home with the Student
Edition of MATLAB/Simulink.
6. Acknowledgments
The first author gratefully acknowledgements the support of the National Science Foundation
(NYI Award CTS 9257159).
7. How to Learn More About PCM and the Digester Benchmark Problem
Interested educators are referred to the Web-page for the Process Control Modules at:
http://www.che.udel.edu/pcm
8. References
[1] Cooper, D.J., “Picles: A simulator for teaching the real-world of process control”, Chem. Eng. Educ., 27, 176-,
1993.
[2] Koppel, L.B., and Sullivan, G.R., “Use of IBM’s advanced control system in undergraduate process control
education”, Chem. Eng. Educ., 20, 70-, 1986.
[3] Doyle, F.J., “Incorporation of realistic case studies in an undergraduate process control laboratory using the
Process Control Modules”, ASEE Summer School for Chem. Eng. Faculty, Snowbird, 1997.
[4] Doyle, F.J., Venkatasubramanian, V., and Kendi, T.A., “Process Control Modules: A Flexible Set of Software
Modules for an Undergraduate Process Dynamics and Control Laboratory”, Comp. Appl. Eng. Educ., 4(3), 179-190,
Page 3.277.7
1996.
[5] Kayihan, F., Gelormino, M.S., Hanczyc, E.M., Doyle III, F.J., and Arkun, Y., “A Kamyr Continuous Digester
Model for Identification and Controller Design”, IFAC World Congress, San Francisco, 37-42, 1996.
[6] Kayihan, F. Continuous Digester Benchmark Model Toolbox v1.0, IETek, 1997.
9. Biographical Information
Dr. FRANCIS J. DOYLE III is an associate professor in the Dept. of Chemical Engineering at the University
of Delaware. He received his B.S.E. from Princeton (1985), C.P.G.S. from Cambridge (1986), and Ph.D. from
Caltech (1991), all in Chemical Engineering. His research interests are in nonlinear process and biosystems
control. He is the recipient of several research awards (NSF NYI, ONR Young Investigator) as well as teaching
awards (ASEE Section Outstanding Teacher Award, Tau Beta Pi Teaching Award).
Dr. FERHAN KAYIHAN is the owner of IETek – Integrated Engineering Technologies, a systems
engineering consulting company. He is a chemical engineer with BS and PhD degrees from Robert College
(1970) in Istanbul Turkey and University of California Santa Barbara (1974), respectively. During his early
professional career he was on the faculty of Oregon State University where he received the 1981 college of
engineering “Lloyd Carter Outstanding and Inspirational Teaching Award”. Before starting IETek in 1996, he
was a research fellow at Weyerhaeuser Technology Center. He is an industrial trustee of CACHE since 1995.
Page 3.277.8