0% found this document useful (0 votes)
36 views

Testing A Constrained MPC Controller in A Process Control Laboratory

Uploaded by

Shanelle
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views

Testing A Constrained MPC Controller in A Process Control Laboratory

Uploaded by

Shanelle
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

ChE laboratory

Testing a
constrained MPC controller
in a Process Control Laboratory

Luis A. Ricardez-Sandoval, Wesley Blankespoor, and Hector M. Budman

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

theoretical concepts are presented in different undergradu-


processes, design and control of dynamic
systems, systems
ate control textbooks.[1-3] Also, although there are published identification, and robust control.
experiments of multivariable controllers in undergraduate Wesley Blankespoor is an automation
engineer in training at Brock Solutions in
control laboratories,[4-6] undergraduate-level experiments of Kitchener, Ontario. He received a B.S. in
constrained predictive controllers based on linear models are environmental science at Calvin College in
1996, and his B.A.Sc. in chemical engineer-
less common.[7] ing at the University of Waterloo in 2008. His

The experimental system discussed in this work is used in


interest in the chemical industry began with
his work as a master electrician in Ontario
a process control laboratory course offered as a fourth-year prior to 2004. His current work focuses on
elective in the chemical engineering undergraduate program projects in the agricultural feed industry.

at the University of Waterloo. The experiment involves the ap-


Hector M. Budman is a professor of chemical
engineering at the University of Waterloo On-
plication of a constrained model predictive control algorithm tario, Canada. He received his B.Sc, M.A.Sc.,
for the control of a double pipe heat exchanger (DPHE). The and Ph.D. degrees in mechanical engineering
at the Technion, Israel Institute of Technology,
elective laboratory course is composed of two main experi- Haifa, Israel. His main areas of research are
ments: multivariable control of the DPHE described in the modeling, control, and optimization of chemi-
cal processes. He has conducted both theo-
current paper and single variable temperature control in a retical and experimental work in a number
stirred tank heater. Each of these experiments is conducted of chemical engineering application areas

in two three-hour sessions. In addition, the course includes a


such as chemical and biochemical reactors
and manufacturing processes in the pulp and
weekly one-hour tutorial lecture in which theoretical concepts paper, mineral processing, and pharmaceutical industries.

© Copyright ChE Division of ASEE 2010

Vol. 44, No. 2, Spring 2010 127


sion of the output prediction equations, the analytical solution be programmed in MATLAB, e.g., nonlinear or adaptive
of the unconstrained case using least squares, the effect of predictive controllers. An additional consideration favoring
tuning parameters such as weights, control, and prediction the use of a LabView-based interface is that previous experi-
horizons, and a brief discussion about constrained optimiza- ences with the MATLAB real time interface toolbox exposed
tion. Since it is challenging to deliver all the necessary theory limitations in controlling the sampling interval[11] whereas in
of MPC in the tutorial hours, the students are provided with LabView the sampling interval could be accurately controlled.
a clear and concise 10-page manual containing both theory Furthermore, the University of Waterloo has a license agree-
and the experimental procedure[8] and they are referred to the ment with National Instruments that naturally motivated the
material in the tutorial of the MPC toolbox in MATLAB[9] use of this software/hardware combination.
and to lecturer notes. The paper is organized as follows: Section 2 describes the
The experiment presented in this paper was tailored to chemical process and the hardware used in the experiment.
illustrate several particular features of constrained MPC Section 3 presents an overview of the LabView/MATLAB
vis-à-vis other control methodologies such as decentralized hybrid program created by the authors to interface with the
control. First, the experiment is used to illustrate system process. Section 4 presents the experimental procedure used to
identification, the concept of interaction in multivariable perform the on-line testing of the constrained MPC controller.
systems, and how this interaction varies with changes in Section 5 presents the experimental results and the experience
operating condition due to the system’s nonlinearity. Then, gained by the students following the experiment. Concluding
the experiment is used to demonstrate how the constrained remarks are presented in Section 6.
optimization of the predictive controller can be used to ef-
fectively regulate the system at operating conditions where 2. Experimental equipment
the interaction is very significant. Although one could claim The double pipe heat exchanger (DPHE) consists of six
that a nonlinear simulation of the system could be used to sections of concentric tubing set out as shown in Figure 1.
illustrate the capabilities of MPC, the implementation of Each section of the pipe is made of steel of approximately
the controller to a real system offers the unique opportunity 122 in long. A heat transfer oil fluid, Therminol 55,[12] flows
to observe challenges that may be encountered in industrial through the center tube (1 1⁄2 in) in all six sections. In the first
practice. For example, the fact that different process models three sections, saturated steam is supplied to the outer tubes (3
are obtained on different sessions suggests the occurrence in) to heat the oil. In the latter three sections, tap water flows
of time-varying conditions, nonlinearity, valve stiction, and counter-currently to cool the oil. The cooled oil then flows to
measurement noise. Furthermore, the fact that the students a 0.3 m3 storage/surge tank from which it is recycled to the
test the MPC on a real system adds significant credibility to first section of the heat exchanger using a centrifugal pump.
the theoretical concepts. The constrained MPC optimization Four type-T thermocouples are located in the process unit to
problem is given as follows:[9-10] measure the inlet and outlet temperature of the oil and the
at each sampling interval k: tap water, respectively. Similarly, stainless steel vane-type
p m flow meters are installed on the DPHE to measure the inlet
min
∆u
∑ Γ (y (k + i k)− r (k + i k))
i
2
(
+∑ Λ j∆u k + j k ) 2
(1) oil and water flow rates. The oil flow is controlled using
t=1 j=1
a ball valve whereas the water flow rate is controlled by
subject to
processs constraints

Where y is the outputs prediction vector at interval k, r is


the set point vector at interval k, and Δu is the vector of
the manipulated variables at interval k. The matrices Γi
and Λj represent the output and input weighting matrices
for the MPC algorithm and p and m are the prediction and
control horizon, respectively.
Another important feature of the experiment is that the
controller has been implemented by interfacing a stan-
dard MATLAB MPC function through a LabView-based
interface. This configuration offers the possibility in the
future to easily change the constrained predictive control-
ler based on linear models by other controllers that can

Figure 1. Double pipe heat exchanger apparatus.


128 Chemical Engineering Education
a gate valve. The pressure of saturated steam is controlled
using a manually operated globe valve and is measured by
a local pressure gauge. All sections of the heat exchanger
are insulated to prevent heat loss and for safety. Figure 2
presents a snapshot of the process. The hardware configura-
tion used to interface the process with a PC was based on
National Instruments interface devices.[13]

3. LabView and MATLAB—


A hybrid software interface
The role of the software interface in the process labora-
tory is to bridge process signals, human-machine interfacing
(HMI), and the management of external data. LabView’s
wire and block programming[13] facilitated the use of visually
informative dynamic plots, dials, and data entry for use as
an HMI tool. The implementation of the MPC calculations
in the LabView environment was expected to be laborious,
however. Thus, it was decided that MATLAB(TM) along with
its MPC add-on toolbox[9] is a more suitable computational
environment for performing the MPC calculations. The new
key feature in LabView software is the use of a MATLAB
Script Node block that allows for wiring of variables to
and from the LabView programming environment into an
m-script text-based command line format of MATLAB.
Details regarding the state-space based constrained MPC al-
gorithm implemented in this work can be found in Bemporad,
Figure 2. DPHE process. et al.,[9] and Maciejowski.[10] Figure 3 shows the graphical
HMI developed for
this experiment. As
shown, it displays
four x-y plots, mode
selection switches,
signal parameters,
MPC parameters, and
an MIMO Laplace
transfer matrix pro-
cess-model format. A
copy of the LabView
code developed by
the authors is avail-
able upon request
from <laricard@
uwaterloo.ca>.

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 5. DPHE response to a distur-


bance in the steam: a) oil response
and b) water response.
Vol. 44, No. 2, Spring 2010 131
MPC theory found it somewhat challenging to study this
Table 1
RGA Analysis for the DPHE theory on their own. This was partially addressed by mak-
at Different Operating Points ing available, at the early stages of the lab, the theoretical
MPC principles in the manual pages and in the tutorial of the
Open-loop Tests λ11
toolbox. Future planned improvements in this course include
Step tests 1 and 5 0.4827
the development of questionnaires that must be answered
Step tests 2 and 8 1.3006 during the lab experiment. Also, to further address the lack
Step tests 3 and 7 1.2603 of theoretical background, the lecturer of the course is plan-
Step tests 4 and 6 0.4724 ning to deliver the fundamentals of the MPC theory at the
beginning of the term.
variable control. The real-time operation of a physical system
Analytical: Students gain experience about data set analysis.
also allows for the development of intuition into background
The students find the dynamic model parameters by using
noise and system disturbances inherent in a real system. The
nonlinear optimization where they minimize the sum of the
challenges posed by noise and disturbances become evident
square errors between the data collected in the first session and
when the student attempts to fit the collected noisy data at
the model predictions. Addressing noise in the process data,
different valve positions to a linear FOPDT MIMO plant
solving the nonlinear optimization problem and obtaining
model. Moreover, Session 2 also shows that processes like
meaningful process model parameters for each test are just
the DPHE are challenging to control because they are highly
a few of the challenges confronted by the student following
nonlinear and show a high degree of variable interaction. This
the process model identification session.
system’s nonlinearity and interactions are evident in Table 1,
which shows the RGA analysis estimated using the identified During the second session of the lab, the students test the
FOPDT around different operating conditions. As shown in controller performance using different MPC tuning param-
this table, the first element of the RGA matrix (λ11) ranges eters. For example, they observe that increasing the weights
from 0.48 to 1.3 depending on the selected operating point, on the movements of the manipulated variables produces a
whereas for an ideally linear system the RGA should remain sluggish response with a large settling time.
constant for all operating points. In view of these systems’ To verify the importance of interaction, the students are
characteristics, one of the key challenges is to obtain process instructed to implement a decentralized control strategy using
models that mimic the true process behavior and to select con- the MPC algorithm by setting the off-diagonal process model
troller tuning parameters
based on the identified
dynamic behavior.
Another experience-
based observation is that
due to the open-loop time
constants being relatively
large (10-15 minutes), the
students found that the
identification experiments
were somewhat lengthy.
The waiting time was
used for discussions about
identification and control
issues. Moreover, the stu-
dents that performed the
lab at the beginning of
the term and that were not
previously exposed to the

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

Vol. 44, No. 2, Spring 2010 133

You might also like