Testing A Constrained MPC Controller in A Process Control Laboratory
Testing A Constrained MPC Controller in A Process Control Laboratory
Testing a
constrained MPC controller
in a Process Control Laboratory
M
University of Waterloo • Waterloo, ON, N2L 3G1, Canada
odel predictive control (MPC) is a widely used related to the experiments are covered, e.g., topics on system
control methodology in the chemical industry for identification, discrete control, and, more specifically, model
the control of multivariable processes under con- predictive control. The presentation of MPC theory is done
straints. Although the implementation of predictive control- during four one-hour tutorial sessions and it includes a discus-
lers in chemical plants has been traditionally subcontracted
to specialized companies, there is a need for the process
Luis A. Ricardez-Sandoval is an assistant
professor in the Chemical Engineering De-
control engineer to understand the algorithm for the purposes partment at the University of Waterloo. He
of maintenance and tuning and there is an increasing trend received his B.Sc. degree from the Instituto
Tecnologico de Orizaba in Orizaba, Mexico.
for in-house implementation of these controllers by process He obtained his M.Sc. degree from the Insti-
control engineers with limited control experience. Thus, tuto Tecnologico de Celaya in Celaya, Mexico,
and his Ph.D. degree from the University
there is a great incentive to familiarize chemical engineering of Waterloo. His current research interests
graduates with this control methodology. Predictive control include multiscale modeling of chemical
Figure 3. HDI
interface in the
LabView/MATLAB
program. The
graphic displays
show the DPHE
response to a step
change in the wa-
ter valve from 90-
40% of opening.
Vol. 44, No. 2, Spring 2010 129
4. Experimental procedure changes in the inlet water temperature. Likewise, they can
Due to the length of the tests, the MPC experiment is notice the interactions occurring in the process. Based on the
divided into two three-hour laboratory sessions: a first part exponential nature of the step responses, the students conclude
that involves models’ identification and the second part that that the process can be approximated by a set of First Order
involves closed-loop control tests. For safety, the students and plus Time delay (FODPT) models. These models are used by
the lab instructor are required to wear protective glasses and the constrained MPC algorithm[9-10] in the second lab session
insulated gloves during the lab sessions. The electrical equip- to calculate the moves in the oil and water valves (inputs)
ment and the fluids are properly contained so as to prevent that will drive the oil and the water temperatures toward a
any contact between them. user-defined set point.
4.1 Laboratory Session 1: System Identification 4.2 Laboratory Session 2: Control Testing
The goal in the first lab session is to obtain process data for To commence the MPC closed-loop control testing, the
the identification of dynamic models of the DPHE process. DPHE is brought to an initial steady state. Students con-
The oil and water flow rates at the inlet are used to control struct their own set point tracking and disturbance rejection
the oil and water temperatures at the outlet. Thus, four trans- experiments to validate their system identification and to gain
fer function models that describe the dynamics between the intuition into the effect of different tuning parameters values
water and oil valve and the oil and water temperature must be such as weights and prediction horizons as defined in Eq. (1).
identified for this process. To identify each of these models, Based on the results obtained from this session and discussion
the students design a series of tests based on step changes with the lab instructor regarding the closed-loop performance
on the input variables following a two-factorial design. The of the system, the students elaborate the final lab report for
procedure to perform the step tests is available online.[8] The this experiment. Details on the experimental procedure to
graphical display in Figure 3 shows a snapshot of the evolu- perform this test are available online.[8]
tions of oil and water temperature following a step change
in the water valve from 90% to 40% of opening. From these 5. Typical results and discussion:
graphs, the students are able to observe the effect of distur- Experiences gained by the students
bances that may affect the process during the step tests, e.g., Figure 4 shows one of the set point tracking tests performed
in the second ses-
sion of the lab.
As shown, both
the water and the
oil temperature
smoothly track
the set point sig-
nals. The water
and the oil valves
are manipulated
by the MPC al-
gorithm to reach
the reference sig-
nals. The water
valve, however,
reached an input
limit (60% of
Figure 4.
Closed-loop
performance in
the DPHE: Con-
strained MPC
test for a set
point change in
both the oil and
water tempera-
ture.
130 Chemical Engineering Education
valve opening) for a period of time and then returned back In the event that one or both manipulated variables reach
to its feasible operating condition specified by the students. and remain at constraints, offsets will occur in the controlled
This result shows that the implemented constrained MPC variables. The instructor explains to students that the offsets in
algorithm works properly but it also demonstrates that the the two controlled variables can be altered, one vs. the other,
performance is limited by the presence of process constraints. by properly selecting the output weight matrix to be different
Similarly, the controller performance-to-disturbance rejection from the identity matrix.
is tested by closing for 350 seconds the steam valve that sup- Upon completion of this laboratory, the students gain a
plies steam into the process. Figure 5 shows the case where number of practical and insightful experiences that can be
this disturbance test is performed in open loop and closed categorized as experiential, analytical, and design oriented.
loop. The performance is judged by comparing the sum of
square errors for the water and oil showing a 35% and 65% Experiential: Students gain experience in multivariable
improvement for water and oil, respectively, obtained with control of a typical chemical process, i.e., a heat exchanger.
the closed loop system as compared to open loop operation. This experiment evolved from a previous implementation
that ran for several years and used an
unconstrained MPC algorithm coded in
a rudimentary DOS-based BASIC envi-
ronment. To ensure that the new imple-
mentation will enhance the students’
learning experience, an undergraduate
student that is also one of the coauthors
of this publication participated in the
development of this project. Clearly, the
key advantage of the new implementa-
tion is the ability to enforce constraints.
In addition, in the earlier implementa-
tion, the graphical interface and the
recording capabilities were very limited
and the students could only manipulate
the valve’s set points in the identifica-
tion test and the temperature set points
in the closed-loop. With the new Lab-
View/MATLAB implementation, the
students use a graphical interface that
shows the complete process response to
a particular change, they can manipu-
late the MPC tuning parameters during
the control testing session, and they can
record up to 3.5 hours of process data.
Many of these software and HMI im-
provements were introduced following
the suggestions of the coauthor that had
experienced the lab as a student.
In particular, the DPHE experi-
ment allows the student to learn about
nonlinear processes, the techniques
frequently used for model identification
and the performance of model-based
control algorithms that are typically
implemented in the industry for multi-
Figure 6. Closed-loop
performance in the
DPHE: Unconstrained
MPC test for a set point
change in both the oil
and water temperature.
132 Chemical Engineering Education
parameter gains to zero and testing a set point change in both in the closed-loop performance. The students also learn that
outputs. Since this test generally results in closed-loop insta- constraints significantly affect the closed-loop process per-
bility the students conclude that accounting for interaction is formance and that care must be given to the selection of the
of utmost importance corroborating the need for a centralized operating point in a process. They also learn to appreciate that
multivariable MPC control strategy. data analysis and relatively accurate models are essential in
Design-oriented: From the results obtained in Session 1, the the development of a model-based control strategy. In sum-
students realize that the process is highly nonlinear (see Table mary, the DPHE experiment represents an educational and
1). Therefore, the students must be careful when defining the practical tool that shows the challenges usually involved in
nominal operating condition for the process in the second part the industrial deployment of MPC strategies to multivariable
of the lab. That is, if they select an operating region for which processes with high degree of interaction and in the presence
the process model parameters do not accurately represent the of constraints. The University of Waterloo operates a large
process and the proposed set point changes to be tested are co-operative program where students spend at least one term
close to the process operating limits, then MPC will perform per year in industry. Many of the students that have been ex-
poorly resulting in input saturation and outputs far away posed to MPC applications in their co-operative terms have
from their corresponding set-point values. Thus, operability expressed that the current experiment have offered them a
considerations must be addressed when estimating the pro- unique opportunity to experience and understand the design
cess model parameters and the MPC tuning parameters. On and implementation of this advanced controller.
the other hand, the students can also analyze the trade-offs
when either considering or ignoring constraints in the input ACKNOWLEDGMENTS
variables. Figures 4 and 6 shows the process response to a The authors would like to acknowledge the Waterloo En-
set point change when the MPC algorithm takes into account gineering Endowment Fund (WEEF) and the Department of
input constraints (Figure 4) and when it does not (Figure 6). As Chemical Engineering at the University of Waterloo for their
shown in these figures, the oil temperature requires a longer financial support.
time to reach the reference signal when the input’s constraints
in the MPC algorithm are active (Figure 4). Therefore, the REFERENCES
students learn from this test that process limitations can dras- 1. Seborg, D.E., T.F. Edgar, and D.A. Mellichamp, Process Dynamics
tically affect the system’s closed-loop performance and that and Control, 2nd Ed., John Wiley & Sons, USA (2004)
process design considerations, such as process constraints, 2. Marlin, T.E., Process Control: Designing Processes and Control Sys-
have a direct impact on the controllability of the process. tems for Dynamic Performance, 2nd Ed., McGraw Hill, USA (2000)
3. Bequette, W., Process Control: Modeling, Design and Simulation,
The learning outcomes presented in this section were assessed Prentice Hall, New Jersey, USA (2003)
based on both the discussions between the laboratory assistant 4. Joseph, B., C. Ying, and D. Srinivasagupta, “A Laboratory to Supple-
and the students and from the final laboratory report. ment Courses in Process Control,” Chem. Eng. Ed., 36(1) 20 (2002)
5. Long, C.E., C.E. Holland, and E.P. Gatzke, “Experimental Air-Pressure
Tank Systems,” Chem. Eng. Ed., 40(1) 24 (2006)
6. Concluding remarks 6. Rusli, E., S. Ang, and R. Braatz, “A Quadruple Tank Process Control
Experiment,” Chem. Eng. Ed., 38(3) 171 (2004)
This paper presented an implementation of a linear con- 7. Gatzke, E.P., E.S. Meadows, and F.J. Doyle III, “Model Based Con-
strained MPC in a process control laboratory at the Univer- trol of a Four-Tank System,” Computers and Chem. Eng., 24, 1503
sity of Waterloo. Upon completion of this experiment, the (2000)
fourth-year chemical engineering students are expected to 8. <http://www.eng.uwaterloo.ca/~hbudman/>, accessed May 14, 2009
9. Bemporad, A., M. Morari, and N.L. Ricker, Model Predictive Control
appreciate the capabilities of MPC over conventional feed- Toolbox(TM) 3, The Mathworks, Natick, USA (2009)
back controllers. From the experiment, the students conclude 10. Maciejowski, J.M., Predictive Control with Constraints, Prentice Hall,
that a decentralized strategy for highly interactive processes Great Britain (2002)
such as the DPHE cannot provide a satisfactory performance 11. Ricker, N.L., “Using MATLAB/Simulink for Data Adquisition and
Control,” Chem. Eng. Ed., 35, 286 (2001)
as it was demonstrated in the lab and that an MPC control- 12. <http://www.therminol.com/pages/products/55.asp> accessed Mar. 10,
ler is more suitable for this task. Likewise, they conclude 2009
that the selection of the MPC parameters plays a key role 13. <http://www.ni.com/labview/> accessed March 10, 2009 p