Documente Academic
Documente Profesional
Documente Cultură
Proefschrift
door
Min XU
civiel ingenieur
geboren te China
Dit proefschrift is goedgekeurd door de promotor:
Prof.dr.ir. N.C. van de Giesen
Samenstelling promotiecommissie:
All rights reserved. No part of the material protected by this copyright no-
tice may be reproduced or utilized in any form or by any means, electronic,
or mechanical, including photocopy, recording or by any information storage
and retrieval system, without written permission of the publisher.
Fresh water supply and flood protection are two central issues in water man-
agement. Society needs more and more fresh water and a safe water system
to guarantee a better life. A more severe climate will result in more droughts
and extreme storms. As a consequence, salt water intrusion will increase.
Therefore, clean and fresh water is becoming scarce. Potentially, there lies a
severe conflict between peoples demands and what nature can provide.
In practice, water systems are complex. Both water quantity and quality cri-
teria must be served. Moreover, water is normally used as a multi-functional
resource. For example, water in a reservoir is used for irrigation, power gen-
eration, flood protection and reclamation. These objectives are usually in
conflict most of the time and it is not easy for people to cope with these
contradictions.
Smart regulation of water systems is essential not only from the world-wide
water issue perspective, but also from the specific water problem aspect.
Real-time control is a powerful tool to help people with accurate regulation
of water systems. In practice, water quantity control is extensively stud-
ied, but fully integrated water quantity and quality control has hardly been
touched. Moreover, in order to deal with multi-objectives in a water system,
advanced control techniques, such as model predictive control (MPC), are
often required which require extensive computational resources. This brings
forward two research questions:
1. What is the possibility of controlling both water quantity and quality
in a water system?
2. In MPC, what is the possibility to reduce the computational burden in
order to make the control implementation possible?
In this PhD thesis, a case of polder flushing in real-time is selected for the
first research question, which includes both water quantity and quality prob-
lems.The task is to flush polluted water out of the polder with clean water
i
ii Summary
while keeping water levels close to the setpoints. Instead of manual opera-
tion which is often applied in practice, control systems were designed with
feedback control and MPC. In MPC, different types of internal models were
applied ranging from a linear reservoir model to hydrodynamic models. The
different control performance of the two controllers were compared. We con-
clude that real-time control is possible to maintain both water quantity and
quality at the same time in a one dimensional water system model. Fur-
thermore, MPC performs much better than the classic feedback control in
controlling the water quality when operational limits are very strict. In
MPC, using different internal models will also result in different control per-
formance, affecting both control effectiveness and computation time.
Being an advanced control technique, MPC is playing a more and more im-
portant role in controlling water systems. The computational burden is the
main barrier for MPC implementation. In this PhD thesis, we propose a con-
trol procedure of MPC with a model reduction technique, Proper Orthogonal
Decomposition (POD), in order to speed up the computation. POD is able
to reduce the order of states and disturbances, and speed up the matrix op-
eration in MPC. In a test case, we concluded that MPC using the reduced
model is a good trade-off between control effectiveness and computation time.
Therefore, the proposed MPC procedure is considered as a successful method
for MPC implementation.
Min Xu
August 2012 in Delft
Contents
Summary i
List of Tables vi
1 Introduction 1
1.1 Water quantity & quality management in open channels . . . 1
1.1.1 Current situation . . . . . . . . . . . . . . . . . . . . . 1
1.1.2 Modelling of open channel flow . . . . . . . . . . . . . 2
1.2 Real-time control of open channels . . . . . . . . . . . . . . . 5
1.2.1 General introduction . . . . . . . . . . . . . . . . . . . 5
1.2.2 Real-time control methods . . . . . . . . . . . . . . . . 6
1.3 Model predictive control . . . . . . . . . . . . . . . . . . . . . 10
1.4 Model reduction . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.5 Objective of the study . . . . . . . . . . . . . . . . . . . . . . 13
1.6 Outline of the thesis . . . . . . . . . . . . . . . . . . . . . . . 14
iii
iv Contents
predictive control 35
3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
3.2 Model predictive control of open channel flow . . . . . . . . . 37
3.2.1 State-space model formulation with Kalman filter . . . 37
3.2.2 Optimization Problem . . . . . . . . . . . . . . . . . . 39
3.3 Process model formulation . . . . . . . . . . . . . . . . . . . . 41
3.3.1 State-space model formulation with SV model . . . . . 41
3.3.2 State-space model formulation with RSV model . . . . 42
3.3.3 State-space model formulation with ID model . . . . . 45
3.4 Test case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
3.4.1 SV model setup . . . . . . . . . . . . . . . . . . . . . . 48
3.4.2 RSV model setup . . . . . . . . . . . . . . . . . . . . . 48
3.4.3 ID model . . . . . . . . . . . . . . . . . . . . . . . . . 48
3.4.4 MPC performance indicators . . . . . . . . . . . . . . . 49
3.5 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
3.5.1 Results of RSV model accuracy and model complexity 50
3.5.2 Results of control effectiveness and computational effi-
ciency in MPC . . . . . . . . . . . . . . . . . . . . . . 51
3.6 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Acknowledgements 143
Publications 147
vi Contents
List of Tables
4.1 Lateral flow scenario for reduced model generation (step changes
happen between 8 and 10 hours of simulation) . . . . . . . . . 71
4.2 Lateral flow scenario for reduced model verification (step changes
happen between 5 and 8 hours of the simulation) . . . . . . . 72
4.3 Lateral flow scenario for testing the reduced model perfor-
mance (step changes happen between 3 and 6 hours of the
simulation) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
4.4 Gain factors of the PI control . . . . . . . . . . . . . . . . . . 74
4.5 Weighting factors in MPC for all reaches and structures . . . . 74
C.1 Lateral flow scenario for reduced model verification (step changes
happen between 5 and 8 hours of the simulation . . . . . . . . 130
vii
viii List of Tables
List of Figures
ix
x List of Figures
C.1 Root mean square error of the reduced model on water quan-
tity and quality (extrapolated scenario) . . . . . . . . . . . . . 129
C.2 Reduced water level states (I) and concentration states (III)
projected back to the original order, and the water level dif-
ferences (II) and concentration differences (IV) between the
reduced model and the original model . . . . . . . . . . . . . . 131
C.3 Reduced water quantity disturbances (I) and quality distur-
bances (III) projected back to the original order, and the water
quantity disturbance differences (II) and water quality distur-
bance differences (IV) between the reduced model and the
original model . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
xii List of Figures
Chapter 1
Introduction
Water is a natural resource that is closely related to the life of human beings.
Important water functions are drinking water supply, water recreation, irri-
gation, etc. In terms of water use, two criteria need to be met: quantity and
quality. However, the amount of fresh water that is suitable for use is limited.
Maintaining a healthy water condition, not only in water quantity but also
in water quality, is extremely important for the existence and development
of a society.
In the past, people were paying attention to water quantity issues, typi-
cally for flood and drought protection [1] [2]. Water delivery for irrigation
is another quantity issue [3] [4]. However, due to the economic and social
development of societies, water is polluted more and more, especially in de-
veloping countries. For example, in 2009 water was polluted in the Taihu
lake, eastern China, and caused algae blooming over a long period. This
largely influenced the water supply of the region and caused a huge eco-
nomic loss. Water quality management is becoming a hot issue. Moreover,
as climate changes, severe situations, such as drought, flooding and salt water
intrusion, will occur more often [5], and clean water is getting scarce.
Ideally, water quantity and quality needs to be considered at the same time
in the operation of a water system. However, in some cases they can be
1
2 Chapter 1. Introduction
Figure 1.2: Open channel water quantity and quality using a 1D model
4 Chapter 1. Introduction
Some researchers adjusted the basic reservoir model and generated an Integrator-
Delay (ID) model [11] and an Integrator-Delay-Zero(IDZ) model [12] to ful-
fill the requirements of irrigation canal automation, where water transport
is characterized by delays in the canal reaches. The ID model splits the
canal into a uniform flow part and a back water part, which are character-
ized by the delay and storage, respectively. This model development made
great contribution to canal automation and various applications have been
conducted using this model over the last 15 years such as [13] [14]. One of
the limitations of the ID or IDZ model in model-based control is that it is
restricted to small flow fluctuations, in order to avoid nonlinear changes in
delay and storage.
Although reservoir models are widely applied, detailed depiction of flow dy-
namics requires hydrodynamic models. Therefore, these hydrodynamic mod-
els are used to simulate the real world. They need a certain scheme to dis-
cretize the mathematical equations in space and time. A commonly used
hydrodynamic model is the one dimensional Saint-Venant equations. For
water quality modelling, the one dimensional transport equation is widely
used.
In this research, the substances considered in water quality control are as-
sumed to be conservative or at least conservative during the research period.
Typical conservative substances are salinity, nitrate and phosphate, etc.
1.2. Real-time control of open channels 5
Real-time control emerged from industry and has been applied to water man-
agement since 1970s. The first real-time control applications in water man-
agement were in controlling irrigation canals, due to the requirements of
efficient water delivery [19],[20],[21],[22]. Although there has been much re-
search on reservoir operations earlier, such as [23] [24], they mainly focused
on long-term or mid-term operation which is typically at the management
level. Real-time control as considered in this research applies as short-term
operational water management, namely in the order of minutes or hours de-
pending on the system under investigation. Recently, short-term real-time
control has become popular in river operation such as flood protection.
diction model (internal model) to anticipate the future system behavior and
applies an optimization algorithm to generate optimal control actions over a
finite prediction horizon. Advantages of MPC are that it can pre-react on
future system changes based on the system prediction. This is very impor-
tant for example in flood protection to reduce the flood peak by pre-releasing
water, in order to create extra storage. Physical and operational constraints
can also be taken into account within the optimization. [30] On the other
hand, the large disadvantage of MPC is the relatively large computation time.
MPC is an online control method that performs the optimization at every
control step. MPC implements only the first control action over the predic-
tion horizon. Figure 1.4 shows the structure diagram of model predictive
control on an actual system.
Open channels are usually divided into several reaches by hydraulic struc-
tures, such as sluices, weirs and pumps. Each reach can form its own sub-
system where the structure tries to maintain that system. Based on the way
of generating control actions, controllers can be categorized into local con-
trol and centralized control. In local control, each control structure is used to
control the local state, and controllers do not communicate with each other.
Figure 1.5 illustrates the control of a drainage canal using local controllers.
8 Chapter 1. Introduction
This thesis focuses on MPC controlling combined water quantity and quality
in open channels. PI control is used for comparison and to give insight into
10 Chapter 1. Introduction
problem.
In Chapter 5, a nonlinear MPC had been studied using the full linearized
Saint-Venant model. Since the linear time-varying system is actually nonlin-
ear over the prediction horizon, a nonlinear optimization algorithm is nec-
essary to tackle the problem without applying the Forward Estimation.
In other words, the linear time-varying parameters are solved internally in
the optimization instead of externally in linear MPC. The nonlinear MPC
is considered as a benchmark for the control performance. However, the
computation time of nonlinear MPC using numerical gradients of the objec-
tive function is unacceptable. This computation time issue is not considered
in this chapter. It is suggested for future research to solve this issue by
analytically providing the gradient, which requires intensive mathematical
analysis.
In Chapter 6 the main findings and conclusions of the thesis are summarized
and the possible future research is elaborated.
16 Chapter 1. Introduction
Chapter 2
Abstract
This chapter1 presents the initial study on real-time control of combined wa-
ter quantity and quality. In open water systems, keeping both water depths
and water quality at specified values is critical for maintaining a healthy
water system. Many systems still require manual operation, at least for water
quality management. When applying real-time control, both quantity and
quality standards need to be met. In this chapter, an artificial polder flush-
ing case is studied. Model Predictive Control (MPC) is developed to control
the system. In addition to MPC, a Forward Estimation procedure is used
to acquire water quality predictions for the simplified model used in MPC
optimization. In order to illustrate the advantages of MPC, classical con-
trol [Proportional-Integral control (PI)] has been developed for comparison
in the test case. The results show that both algorithms are able to control
the polder flushing process, but MPC is more efficient in functionality and
control flexibility.
1
based on: Xu. M., van Overloop. P.J., van de Giesen. N.C. and Stelling. G.S.
Real-time control of combined surface water quantity and quality: polder flushing. Water
Science and Technology. 61(4):869-878, 2010
17
18 Chapter 2. Real-time control of combined water quantity & quality
2.1 Introduction
Quantity and quality are the main characteristics to describe a water system.
Much research has been devoted to how to optimize the water usage. For
example, in irrigation systems, various real-time control methods have been
applied to operate water systems efficiently [28], [13], [42]. For water quality,
research on real-time control has only been conducted for sewer systems or
urban waste water systems [43], [44], [45]. For water quality issues in rivers
and open canals, more attention has been paid to modeling [46], [47], to
simulate pollution transport and provide measures or strategies for reducing
pollution. As will be shown here, real-time control for water quality can also
be used to manage such systems.
Many rivers and canals have water quality problems caused by pollution.
Here, a polder system is considered. Figure 2.1 shows a schematic view of
a typical Dutch polder. It is a terrain of low-lying areas that is surrounded
by dikes. Within the low-lying areas, there lie many polder ditches that
are inter-connected through hydraulic structures, such as weirs and sluices.
Outside the polder, surrounding the low-lying areas, storage canals are situ-
ated. Those storage canals have higher elevations and provide space for the
extra water from the polder storage during wet periods. The storage canals
also supply fresh water to polders during dry periods. The polder system is
only connected to the outside through man-operated devices. Water levels
in both polder ditches and surrounding storage canals are maintained close
to given target levels by operating hydraulic structures in order to maintain
certain ground water levels in the polder, and avoid dike breaks in the stor-
age canal [48]. Water quality is an issue in a polder system, because many
nutrients from fertilizers, such as nitrate or phosphate, drain into the ditches.
In summer, surface water quality can also deteriorate due to saline seepage
and drainage water from greenhouses [48].
Many control methods are available for water quantity control, especially for
irrigation systems [28]. The present study provides a guideline for extending
control theory to water quality as well. In this polder flushing situation,
several canal reaches are controlled (multiple variable control) and multiple
objectives (water level and quality control) are formulated. Optimization
could be subject to certain constraints, such as pump capacities, limitations
on changing gate position and limitations on water level and water quality
fluctuations. Therefore, an advanced control technique, Model Predictive
Control (MPC), is considered [51]. In order to implement MPC on water
quality, a so-called Forward Estimation is required to predict the control
20 Chapter 2. Real-time control of combined water quantity & quality
variables for each reach over the prediction horizon. These predictions are
part of the inputs of a simplified model used in MPC. The Forward Esti-
mation is performed outside the MPC optimization. A schematic diagram
of the implementation procedure is shown in Figure 2.2. The innovation of
this research is the joint application of this control method on water quantity
and quality in an integrated framework.
This chapter is organized as follows: Section 2.2 introduces the water quan-
tity and quality control method, including the Forward Estimation proce-
dure and the MPC scheme. A test case is setup in section 2.3 to test the
proposed control method. In order to demonstrate the MPC control perfor-
mance, it is compared with a classical feedback control. Section 2.4 shows
the comparison results between MPC and feedback control. The advantages
and disadvantages of each control methods on combined water quantity and
quality are in section 2.5.
2.2 Method
Af Q
+ = ql (2.1)
t x
Q (Qv) Q|Q|
+ + gAf +g 2 =0 (2.2)
t x x Cz RAf
(Af c) (Qc) c
+ = (KAf ) + ql cl (2.3)
t x x x
where Af is the cross sectional area [m2 ], Q is the flow [m3 /s], ql is the
lateral inflow per unit length [m2 /s], v is the mean velocity [m/s], which
equals Q/Af , is the water depth above the reference plane [m], Cz is the
Chezy coefficient [m1/2 /s], R is the hydraulic radius [m], which equals Af /Pf
22 Chapter 2. Real-time control of combined water quantity & quality
(Pf is the wetted perimeter [m]) and g is the gravity acceleration [m/s2 ], K
is the dispersion coefficient [m2 /s], c is the average concentration [kg/m3 ], cl
is the lateral flow concentration [kg/m3 ], t is time and x is horizontal length.
[52] provides equations to calculate the longitudinal dispersion coefficient
K:
W 2v2
K = 0.011
dm us (2.4)
p
us = gRSb
where W is the mean width [m], dm is the mean water depth [m], us is the
shear velocity [m/s], and Sb is the bottom slope of the canal []. A spatial
discretization of the Equations 2.1, 2.2 and 2.3, has been developed in the
form of a staggered conservative scheme in combination with a first order
upwind approximation [53], [17]. In the staggered grid, the values of vi
at point i and ci+1/2 at point (i + 1/2) are missing (see Figure 2.4). An
upwind approximation is applied to achieve those values according to the
flow direction.
vi1/2 (Qi 0) ci (Qi+1/2 0)
vi = ci+1/2 =
vi+1/2 (Qi < 0) ci+1 (Qi+1/2 < 0)
2.2. Method 23
The integration scheme in time is based on the theta method [17]. The
equations are connected with each other, giving rise to tri-diagonal matrices.
A schematic view of the staggered 1-dimensional grid is shown in Figure
2.4. Note that the water system is simulated with the same model as the
Forward Estimation
where: x is the state vector, u is the input vector, d is the disturbance vector,
A is the state matrix, Bu is the control input matrix, Bd is the disturbance
matrix, C is the output matrix and y is the output, k is the time step
index. The equations are structured into matrices and can be solved with
for example MATLAB.
Many linear approximations have been developed for the Saint-Venant equa-
tions, especially for irrigation canals. A canal reach is divided into several
segments and a state estimator or observer is used to estimate the hydraulic
information for each segment [56], [57]. However, such approximations are
not appropriate for MPC due to the fact that MPC uses online (real-time)
optimization, and the use of many segments increases the computational
power requirements considerably. This problem is compounded if the same
linearization procedure for the water quality model is added. Therefore, a
simplified model is needed, provided it can preserve the main system charac-
teristics. [11] developed an Integrator Delay (ID) model, which is a lumped
parameter model. The ID model captures the main dynamics of water trans-
port and assumes two elements in a canal reach: uniform flow part, mainly
characterized by its delay time, and a backwater part, characterized by its
surface area. The equation description is as follows:
2.2. Method 25
de d 1
= = [Qin (t ) Qout (t)] (2.9)
dt dt As
where e is water level deviation from target level [m], which has the same
derivative as the water level when the target level is constant. Qin and Qout
are inflow and outflow [m3 /s], As is the backwater surface area [m2 ] and is
the delay time in the uniform flow part [s].
For a simplified water quality model, Tomann and Mueller [58] provide a lake
model as a completely mixed system which maintains the mass balance. This
model assumes that the outflow concentration is equal to the concentration
in the lake. If the model is applied to a long canal and the control step is
short, this assumption is invalid. Therefore, the model should be modified
to a non-mixed system with the calculation of the average concentration
of the lake and the outflow concentration. In this case, the calculation is
possible when applying the Forward Estimation. Then the water quality
mass balance can be written as:
d(V c)
= Qin (t)cin (t) Qout (t)cout (t) (2.10)
dt
Substituted with the flow mass balance, Equation 2.10 becomes:
dec dc 1
= = [Qin (t)(cin (t) c(t)) Qout (t)(cout (t) c(t))] (2.11)
dt dt V
where V is the water volume in the reach [m3 ], ec is the average concentra-
tion deviation from the target concentration [kg/m3 ], which has the same
derivative as the average concentration c when the target concentration is
constant, cin and cout are inflow and outflow concentrations [kg/m3 ].
For MPC, an objective function J is used to describe the goal of controlling
combined water quantity and quality. Both water level and concentration
need to be maintained to their target values. In addition, the control flow
needs to be adjusted as smoothly as possible. The objective function is
formulated as follows:
nr X
X n
min J = min { Wx, (ek )2 + Wx,c (ekc ek 2 k 2 k 2
c ) + Wu (Qc ) + Wu,c (ec ) }
j=1 k=1
(2.12)
26 Chapter 2. Real-time control of combined water quantity & quality
k
ec 0
subject to: Qc,min Qkc Qc,max
Qp,min Qkp Qp,max
where: n is the number of steps in the prediction horizon and nr is the total
number of canal reaches, Qc is the change of control flow (both for gate
and pump) [m3 /s], Wx, , Wx,c and Wu are the penalties for e , ec and Qc
separately. ec is a virtual variable as soft constraint [kg/m3 ] introduced to
restrict ec . The introduction of the soft constraint is due to the restriction
that water quality control should be deactivated when water is clean (below
target concentration). van Overloop [29] points out that soft constraints are
implemented as extra penalty when the state or input violates the limitation.
Wu,c is the penalty on virtual inputs. Its value is extremely small, which
k
makes the term of Wx,c ec almost equal to zero, no matter what the value
k
of ec is. Qp is the pump flow [m3 /s]. The constraints on Qc and Qp
are regarded as hard constraints (physical constraints) that can never be
violated.
Each canal reach was divided into 100 segments for spatial discretization,
thus 10 meters per segment. The pollution is assumed to be conservative
or at least conservative during the flushing period, for example, in the case
of salinity control. At each time step, the dispersion coefficient K at each
2.3. Test Case 27
discretized velocity point is estimated through Equation 2.4. The canal in-
troduces fresh water from a storage canal through Gate 1, and a pump is used
to lift water out of the system at the other end. Each reach has several pol-
luted lateral inflows. Their initial locations, flows and concentrations listed
in Tables 2.2 and 2.3. These laterals are disturbances to the system.
The total simulation time is 20 hours and the controller executes once every
4 minutes. During the simulation, the concentration of the second lateral in
the second reach is increased from 1.4 kg/m3 to 5.6 kg/m3 (a step change)
after 5 hours and keeps constant afterwards. Other lateral concentrations and
flows remain the same. This disturbance is assumed to be known in advance
or can be predicted. The selection of which lateral concentration increases is
chosen randomly. Which exact disturbance scenario is used, is assumed to
be irrelevant for the evaluation of real-time control. This case demonstrates
how real-time control corrects for water quality disturbances while water
quantity criteria are still maintained. The total system is modeled and tested
in MATLAB.
Chapter 2. Real-time control of combined water quantity & quality
The internal model and the objective function are in accordance with those in
Section 2.2.2. In the state space model, x includes the water level deviations
and concentration deviations from their setpoints as well as flows on the
delayed time steps; u includes the flow changes of each structure and the
virtual inputs ek
c ( 0) of each canal reach, which is used to switch on/off
the water quality control; d includes all the lateral flows. The
pdiscrete delay
steps in the model are estimated by the travelling time (Lc /( gAf /Wt + v))
[59], divided by the control time step and rounded upwards, where Lc is the
canal length [m], Af is the cross sectional area [m2 ], Wt is the top width
[m], g is the gravity acceleration [m/s2 ] and v is the mean velocity [m/s].
The calculation results in 2 delay steps with a 4 minutes control time step
for each reach. The MPC controller uses a 4-hour prediction horizon. When
MPC detects the lateral concentration change within the prediction horizon,
it should adjust the flow at the present control step.
There are no specific rules for tuning MPC. van Overloop [29] provides a
method for obtaining a set of starting penalties for the objective function
using MAVE estimate. Further tuning can be followed through trial-and-
error. Table 2.4 displays the penalties used in this case.
where k is a discrete time index, Qc is the required flow change for a certain
structure [m3 /s], Kp and Ki are proportional and integral gain factors, e is
water level deviation from a given target level [m].
This method can be extended to water quality control by defining e as the
water quality deviation from target value. In this polder flushing case, Gate
1 (inflow to the system) is linked to the water quality variable in the most
polluted reach. The remaining gates and the pump apply local upstream
control [28] on water levels in each reach with decouplers. The decoupler is
considered to be a feedforward control, which has the function of counteract-
ing the influence of flow interactions between neighbouring canal reaches [59],
[13]. In this case, the decoupler sends the upstream gate flow information
directly to all structures and avoids flow interactions between neighbouring
reaches. Thus, it avoids extra water level fluctuations.
Researchers have made important contributions to select proper gain factors
for PI control, for example, [60]. In simple situations, such as in this test
case, a trial-and-error method can be used. Table 2.5 displays the selected
gain factors of PI control.
2.4 Results
The simulation results of using both PI control and MPC are shown in Figures
2.7 through 2.9. In these figures, gate and pump flows, water level deviations
and average pollutant concentration deviations from their target values are
demonstrated. Figures 2.7(a) through 2.9(a) are the results of PI control
and Figures 2.7(b) through 2.9(b) are for MPC. It is clear that with a step
change in water quality, both controls can stabilize water levels and restore
water quality back to their target values. They move the system from one
steady state to another.
2.5. Conclusions and discussions 31
With PI control, Gate 1 reacts when the step change happens. This is the
moment when the water quality deteriorates. Due to the decoupling, water
level controllers take actions at the same time and decrease the water level
at the end of each pool. Figures 2.8(a) and 2.9(a) show that water levels can
be efficiently maintained with PI control, but water quality deteriorations in
reach 3 and 4 are relatively high.
When MPC is applied, it can adjust the system in advance due to the pre-
diction (a 4-hour prediction in this case). When MPC detects lateral con-
centration increases within the prediction horizon, it increases clean water
inflow and thus decreases the concentration first. Figure 2.7(b) shows this
earlier response when comparing with PI control result in Figure 2.7(a). In
this case, when the actual lateral change occurs, there is more leeway for
concentration increase. This is a significant difference from PI control where
the concentration peak is much higher. Figure 2.9(a) and 2.9(b) demonstrate
this difference. Figure 2.8(b) show that MPC can also control water levels
within a relatively safe margin.
Control effectiveness Vs
computational efficiency in
model predictive control
Abstract
35
36 Chapter 3. Control effectiveness Vs computational efficiency in MPC
3.1 Introduction
More and more attention is being paid to increase the efficiency of water
delivery and usage and decrease spilling of water. From an operational wa-
ter management point of view, proper real-time control techniques can help
achieve this goal. Most of the research and applications of diverse control
techniques on open channel flow were originally designed for irrigation sys-
tems, for example [61], [26] and [14]. Model predictive control (MPC) is one
of the most advanced control techniques, as it can deal with setting an op-
timal trade-off between water level deviations from the target level and flow
changes while taking their physical limitations (constraints) into account.
The drawback of this methodology is the heavy computational demand. With
the improvements of both hardware and software, the application of MPC
became practically possible. Advances in hardware, in terms of computer
capacities, are outside the scope of this research. Software improvements can
be achieved through faster optimization algorithms or through the reduction
of model complexity. Model reduction is the focus of this research.
MPC requires a prediction model to estimate the dynamic system behavior
over a prediction horizon. Different prediction models have different model
accuracy and complexity. In general, it can be stated that the larger the
model complexity, the higher the model accuracy. However, the model ac-
curacy and complexity influence the control effectiveness in terms of control
goal achievement in the closed-loop implementation, and computational effi-
ciency regarding the computational time in delivering an accurate solution of
the constraint optimization problem in MPC. The trade-off between model
accuracy and complexity is the central consideration of this research.
The Integrator Delay (ID) model [11] is a commonly used prediction model
for MPC in water management. The model is usually linearized around the
average flow condition and only has a small number of states depending
on the number of controlled water levels and delay steps. However, due to
the linearization, it is limited to small flow changes. In contrast with the
ID model, the Saint-Venant (SV) equations accurately calculate the system
dynamics over the full range of flow conditions, but this mathematical model
includes many states. It is extremely computationally costly when used in
MPC. Therefore, we propose a reduced Saint-Venant (RSV) model developed
in [62]. The model captures the main dynamics of the SV model, but the
number of states and disturbances is significantly reduced. Additionally, the
Model Predictive Control of Open Channel Flow. Advances in Water Resources. Volume
34(2):282-290, 2010
3.2. Model predictive control of open channel flow 37
RSV model does not have the limitation of small flow change as long as the
coherent flow structure is detected through snapshots of the full set of states
in an off-line simulation.
This chapter compares the RSV model and control performance with the SV
model and ID model. It extends previous work by Xu and van Overloop [62]
with more realistic flow conditions. In addition, the number of terms in the
disturbance vector is reduced, which further reduces the computational time.
The chapter is structured as follows: After briefly introducing MPC for open
channel flow, three different MPC prediction models are discussed with focus
on the RSV model. Then the different model and control performances are
evaluated through a test case. Finally, based on the results, the conclusion
that the RSV model is a promising means to balance the trade-off between
control effectiveness and computational efficiency is drawn.
invariant or linear time variant depending on whether the state matrix, con-
trol matrix, and disturbance matrix are fixed or change over time. A linear
model can make the controller design easier. A linear time variant state-space
formulation is shown in Equation 2.8 on page 24:
In open channel flow control, the state vector x contains the states of wa-
ter level deviation from the target level, the control input vector u is the
change of control flow, and the disturbance vector d can include physical
disturbances, e.g. rain inflow or lateral flow, and terms generated from dis-
cretization when constructing the state-space model. Since the states only
contain water level deviations, when substituting flows at time step index
k + 1 from the momentum equation into the continuity equation, all the flow
related terms at time step index k of the discretization of the Saint-Venant
equations, are constructed into the disturbance vector. Output y is the same
as the state vector x in this case and the output matrix C is an identity
matrix.
The state-space model in equation 2.8 on page 24 assumes that the complete
system states xk are known. In practice, it is not possible to measure all
states. For example, water levels in an irrigation system are measured typ-
ically only at the most upstream and downstream end of each canal reach,
which represent the first and last values in the state vector xk , while the
intermediate water levels are unmeasured. The test case in this chapter has
the same set of measurements. Therefore, a proper estimation of unmeasured
states is needed based on a limited number of measured values. The Kalman
filter [63] is a commonly used estimator. It assumes a certain initial model
error and independent white noise with a normal distribution on both mea-
surements p(wmeas ) N (0, 12 ) and the model p(wmodel ) N (0, 22 ). Because
the model states are correlated, when updating the measured model states
with the measurements, the unmeasured states can be updated as well [63].
The estimator equation is given as follows, driven by the error between mea-
k
sured output ym and corresponding model state xk . The model state xk is
replaced by the updated estimation xk :
3.2. Model predictive control of open channel flow 39
n
X n
X
min J = min{ [(xk )T Wx xk ] + [(Qkc )T Wu Qkc ]} (3.2)
U U
k=0 k=1
xk+1 = Ak xk + Buk uk + Bdk dk
subject to:
Qc,min Qkc Qc,max
When replacing the model 2.8 on page 24 with the estimated state x into the
objective function 3.2 and minimizing J with respect to the control action U
(or Qc ) over the prediction horizon, the problem becomes:
1 J
min J = min( U T HU + f U + gc ) = = HU + f (3.3)
U U 2 U
where H is the Hessian matrix and f is the Jacobian matrix. These matri-
ces are calculated as the input of the optimization algorithm: (Assume the
number of controls, e.g. the number of control gates, is nu )
T
H = 2(Bu,n Qx,n Bu,n + Ru,n ) dimension : (n nu ) (n nu )
(3.4)
f = 2((xk )T ATn + DnT Bd,n
T
)Qx,n Bu,n dimension : 1 (n nu )
Note that all the matrices except xk are over the prediction horizon labelled
by the subscript 0 n0 . The calculation of these large matrices is presented in
Appendix A, after deleting the subscript 0 r0 in the variable notation. Al-
though the appendix is formulated for the reduced model, the procedure fits
the general MPC internal model generation.
In MPC, the total control process time contains the optimization time itself,
the time to build up the input matrices of optimization (H and f ) and their
related matrices (An , Bu,n , Bd,n ), the time to call prediction models which
is determined by the model complexity and the rest of some process time
related to the matrix size. The first two time consumption are discussed
below.
First of all, from the matrices dimension in equation 3.4, it is easily veri-
fied that matrices H and f in different models have the same dimensions,
separately, as long as the number of control inputs nu and the number of
time steps over the prediction horizon are the same. Thus, H and f related
matrix operations in MPC will not influence the optimization time. The
optimization time with different models will only be affected by the search
space and the initial search point.
The time to build up the large matrices over the prediction horizon (An ,
Bu,n , Bd,n , H and f ) may differ significantly with different models. Because
building up these matrices contains a lot of matrix multiplication (see Ap-
pendix A, without subscript 0 r0 ) and the matrix size, mainly determined by
3.3. Process model formulation 41
the number of states and disturbances in this case, largely influences the ma-
trix multiplication time, it is necessary to decrease the matrix size by means
of model reduction, in order to reduce the computational time.
The SV model is usually not used as the prediction model in MPC because of
the costly computation to achieve an accurate prediction, but it is the basis of
the RSV model. The SV model presented here is used to test the model and
control performance with the RSV model. Following Stelling and Duinmeijer
[17] and Xu et al. [8] the spatial discretization of the Saint-Venant equations
uses the staggered grid scheme listed in equation 2.5 on page 22 and 2.6 on
page 22, and the integration scheme in time is based on the method, e.g.
n+ = n+1 + (1 ) n in equation 2.6 on page 22. The scheme is regarded
as fully implicit when equals 1 and fully explicit when is 0. The fully
implicit scheme normally has large wave damping especially when large time
steps are used. Accurate results can be achieved when taking as 0.55 [65].
The advection term in equation 2.6 on page 22 is calculated explicitly by
first-order upwinding.
Substituting equation 2.6 on page 22 into 2.5 on page 22 and writing them
into the state-space format considering that the control input is the change
of gate flow (Qc ), we obtain:
42 Chapter 3. Control effectiveness Vs computational efficiency in MPC
ak1,1 ak1,2
0 0 0 0 ek+1
1 ek1
ak2,2 ak2,2 k
a2,3 0 0 0 ek+1 ek2
2
... ... ...
.. ..
0 0 0
.
= I
.
l+1,l+1 k
0 0 akl1,l2 akl1,l1 akl1,l 0
k+1
el1 el1
t
0 0 0 akl,l1 akl,l
k+1 k
k x
Wt,l
el el
0 0 0 0 0 1 Qk+1
c Qkc
bk1
1 0 0 0 1 bk1 bk2
0
..
0 1 0 0 0 ..
.
. k+1
+ Qc +
.... . . . . ..
. . . . . k
bl2 bkl1
0
0 0 0 0 1
bkl1
1
0 0 0 0 0 t
Qk+1
W k x in
t,l
(3.5)
where e equals the water level from the Kalman estimator minus the tar-
get water level, Qin is the inflow of the reach, Qc is the outflow (structure
flow) of the reach, Qc is the change of outflow, t is the control time,
x is the spatial increment, l is the number of spatial discretization point,
Tw,i (k) is the top width at calculation points i at time step k, ai,j and bi
are functions of variables that change over time and are estimated by the
Forward Estimation [63]. By multiplying the inverse of the first matrix on
both sides of Equation 3.5, it gives the linear time-varying state-space model
format as Equation 2.8 on page 24. Note that the Kalman filter in Equation
3.1 is usually required to estimate the unmeasured values along the canal
reach.
In order to cope with the computational burden in MPC with the SV model, a
much simpler prediction model needs to be developed, containing less states
and disturbances. Model reduction is an important tool to reduce model
order, which can be formed as z = zr . z and zr are column vectors in
original and reduced domain separately. The key process of generating the
reduced vector is to calculate the basis function . In linear algebra, this
is formulated as an over-determination problem, which can be solved based
on the least square error between the original and projected vectors. Proper
orthogonal decomposition (POD) is a known model reduction technique, e.g.
3.3. Process model formulation 43
[37] [41] and [36]. A snapshot method is usually incorporated into POD to
capture the coherent flow structure. In addition, POD calculates an orthog-
onal matrix of the basis function: T = I. Then the reduced vector
becomes: zr = T z.
Sirovich [66] pointed out that the eigenvectors of the spatial correlation ma-
trix (kernel matrix) are a linear combination of the snapshots and formulated
the basis functions as:
M
X
i = ji zj (3.6)
j=1
1 T
CRi,j = (z zj ) (3.7)
M i
Finally, the number of the basis functions in use is selected based on the m
largest eigenvalues of the correlation matrix CR, and the combinations of i
formulates the basis function matrix with a dimension of N m.
The snapshots can be taken on both states and disturbances considering
the state-space model formulation. Therefore, the full states x(k) from the
Kalman estimator and the disturbances d(k) become a function of the re-
duced states xr (k) and reduced disturbances dr (k), respectively, with respect
to the basis function matrix 1 (N m1 ) and 2 (N m2 ):
x(k) = 1 xr (k)
(3.8)
d(k) = 2 dr (k)
Substituting Equation 3.8 into state-space model 2.8 on page 24, it be-
comes:
n
X n
X
k T k
min J = min{ [(xr ) Wx,r xr ] + [(Qkc )T Wu Qkc ]} (3.10)
Qc Qc
k=0 k=1
t kkd
ek+1 = ek + [Qin Qkc ] (3.11)
As
where e is the water level deviation from the target water level at the down-
stream end of the canal reach [m], t is the control time [s], As is the storage
area in the backwater part [m2 ], Qin is the upstream inflow [m3 /s], Qc is the
downstream control flow of a structure [m3 /s], k is the time step [], kd is
the number of delay steps [], which equals the delay time [s] divided by
the control time t and kd is always rounded up to be conservative.
The ID model requires the determination of the two pool properties: delay
time and storage area. They are pre-determined with a hydraulic model
simulation through a standard procedure, which uses a small step flow change
on the upstream side and a constant downstream flow, following [11] and [29].
A Kalman filter is not necessary for the ID model, since the downstream water
level in the model is directly measured in practice.
Due to the linearization, the ID model is inaccurate over the entire simulation
period. Figure 3.2 shows water level profiles with different flow conditions.
The two pool properties, especially the storage area in the backwater part, are
significantly different under the three flow conditions. This is a disadvantage
of the ID model.
The test canal reach has a total length of 4, 000m with a downstream gate
flow controlling the upstream water level of the gate to 3.2m (negative
value means below mean sea level). The upstream flow trajectory shown in
Figure 3.3 is considered as a known physical disturbance and used to test
the MPC controller with three models. The maximum downstream gate flow
is assumed to be 4m3 /s. Note that a virtual gate is used here, which only
forces a certain discharge instead of gate opening. It works as a pump. No
46 Chapter 3. Control effectiveness Vs computational efficiency in MPC
lateral flow was considered. The canal geometric parameters are listed in
Table 3.1.
Each of the simulations continue for 20 hours with a time step of 2 seconds.
The coefficient in time integration of the simulation model is set to 0.55, in
order to avoid strong wave damping and keep the model accurate. But the
is set to 1 for the SV and RSV model in MPC prediction model, in order
to avoid model instability with large control time step of 240 seconds.
Water level measurements are assumed only to be available at the upstream
and downstream end of the reach. For the Kalman filter design, when using
SV and RSV models, we assume that both the measurements and the model
have normal distributed white noise and the model also has a certain initial
error. In addition, the two measurements have the same white noise. The
parameters are listed in Table 3.2.
1
-1.4 means the elevation is 1.4 meter below mean sea level.
3.4. Test case 47
The three implementations of MPC have the same control setup, for example
the same weighting factors, the same control time step t of 240 seconds with
a prediction horizon of 2 hours. This gives a prediction length n of 30 steps.
The weighting factors on water level deviation from the target level (Wx )
and change of gate flow (Wu ) are selected according to the MAVE factor
that represents the Maximum Allowed Value Estimate [29]. The maximum
allowed water level deviation from the target level (assumed 10cm) and the
maximum gate flow (4m3 /s) are used as the reasonable initial guess of MAVE
factors. Because the states and control input are in units of m and m3 /s, by
taking the reciprocal of the squared MAEV factors, the objective function
can be normalized. It is allowed to make some additional tuning on the
penalties through trial-and-error. The tuned weighting factors are listed in
Table 3.3.
12
The unit of m on noise is for mean and standard deviation, and the noise variances
have a unit of m2
48 Chapter 3. Control effectiveness Vs computational efficiency in MPC
The SV model is spatially discretized into 500 calculation points with a space
step x equal to 8 meters. With the 30 prediction steps, the controller gives
15,531 (501 31) present and future states in total. In order to use the
change of flow for the control input, an extra state Qc is added to the state,
(see Equation 3.5). The optimization problem was unsolvable on a 32-bit
computer due to the memory limit. It was tractable on a 64-bit computer
with an 8 Gb internal memory. From another perspective, this shows the
heavy calculation burden of large matrix multiplication and the importance
of model reduction.
In order to generate the RSV model, the SV model was simulated with the
upstream flow trajectory Qin according to Figure 3.4, and the downstream
water level was kept to the target water level through feedback control of the
downstream gate. During the simulation, 100 independent snapshots were
taken on both states and disturbances. The state basis function was formu-
lated by the 10 eigenvectors corresponding to the 10 dominant eigenvalues of
the state correlation matrix, and the disturbance basis function used 30 cor-
responding eigenvectors of the disturbance correlation matrix. The number
of eigenvectors in use was found by trial-and-error in this research.
3.4.3 ID model
The model is linearized around the average flow condition of 3.04m3 /s. With
a 0.1m3 /s step change in upstream flow, the test system is estimated with 8
delay steps (kd ) with 240 seconds control time and 7,600m2 storage area (As ),
through the downstream water level response, according to the description
in section 3.3.3.
3.4. Test case 49
max(yt ytarget )
M AE = (3.12)
ytarget
t2
X
IAQ = (|Qc,t Qc,t1 |) |Qc,t1 Qc,t2 | (3.13)
t=t1
where: Qc,t is gate discharge at time step t, t1 and t2 are the initial and final
time step respectively.
3.5 Results
This part is intended to demonstrate the results of model accuracy and com-
plexity, control effectiveness, and computational efficiency. It shows the ad-
vantages of using the RSV model in MPC compared to the other two models.
It is assumed that the SV model is the most accurate one in describing the
open channel flow and the MPC is the most effective with the SV model
under the same control parameter setup. It is noticed that there is always
a trade-off between the MPC control effectiveness and computational effi-
ciency.
the skewed line. When the number of states remains unchanged, reducing
the order of disturbance decreases the model accuracy.
The result of the RSV model (after projecting onto the high-order model) is
presented in Figure 3.6. It shows the water level difference along the canal
reach between the RSV model and the SV model. The accuracy of the RSV
model is outstanding, with an insignificant water level difference of less than
3mm from the SV model.
Control effectiveness
In Figure 3.7, the upstream flow (Qin ) is also presented, which works as a
known physical disturbance on the canal reach. Figure 3.7 clearly shows the
downstream gate flow constraint of 4m3 /s and demonstrates the advantage
of MPC in prediction. Because of the flow limit, the gate flow increases in
advance to decrease the water level to create extra storage. For example, the
fast water level drop at about 800 minutes simulation time (the 2.4104 point
on the x-axis) in Figure 3.8 is due to the prediction of the peak flow (dashed
green line) in Figure 3.7. This is a common feature of MPC regardless of the
prediction model type.
According to Figure 3.8, the overall MPC performance with the three models
is good. The water level is controlled around the target level with a maximum
deviation of 4cm. But the controlled water level with the RSV model follows
the SV model track better and is more accurate than the ID model. Figure
3.8 obviously shows that the controlled water level in the ID model (dotted
black line) shifts towards the right, which means the overall delay steps in the
ID model are overestimated. In addition to the fixed storage area, the water
level fluctuates more in the ID model than in the other two models.
Computational efficiency
reduced significantly, since many calculations are related to these large matrix
multiplications.
As discussed in Section 3.2.2, the optimization time is only affected by the
search space and the initial search point. Figure 3.10 shows that the dif-
ference in optimization time consumption with three models is insignificant.
In addition, the optimization time is relatively short because the control
problem is very simple in this case.
3.6 Conclusions
This chapter explored the application of a model reduction technique on
model predictive control. The idea and procedure of proper orthogonal de-
composition, implemented with the snapshots method, were illustrated as an
effective way of generating a reduced model.
The reduced model RSV is very accurate in describing the flow dynamics. It
keeps the model structure of the SV model, overcomes the limitations of the
ID model, and functions properly over the entire flow range. The generated
RSV model is also efficient for large scale problems, in terms of the number
of states and disturbances.
Both implementations of MPC with the SV model and RSV model need a
Kalman filter to estimate the unmeasured states. Thus extra computational
56 Chapter 3. Control effectiveness Vs computational efficiency in MPC
Figure 3.10: Computational time in each part of total control process with
different models
time is added to the system, but it is rather limited. Compared with the MPC
using the SV model, the RSV model significantly reduces the computational
time by reducing the matrix size. Although this computational time is higher
than the ID model, it is very acceptable. Therefore, it can be concluded
that the reduced model is capable of balancing the control effectiveness and
computational efficiency in MPC, and the POD model reduction technique
is applicable to the MPC prediction model.
In addition, the flow condition used for MPC in Figure 3.3 has different ranges
and change frequencies from Figure 3.4 for generating the RSV model. This
shows that the RSV model can deal with extrapolated flow conditions, once
the coherent flow structures are determined.
While the approach is very effective, MPC with the RSV model could still
be improved by speeding up the SV model calculation. This will dramati-
cally decrease the MPC calculation time, since 97.7% of the control process
time is spent on calling the prediction model, although the absolute time
consumption is small. This may be done by optimizing the computer code
or changing to a lower level (faster) programming language.
Chapter 4
Abstract
This chapter1 studies the application of complex models in MPC to control
both water quantity and quality. However, because of the online optimiza-
tion of MPC, the computational time becomes an issue. In order to reduce
the computational time, a model reduction technique, Proper Orthogonal
Decomposition (POD), is applied to reduce the model order. The method
is tested on a Polder flushing case. The results show that POD can signifi-
cantly reduce the model order for both water quantity and quality with high
accuracy. The MPC using the reduced model performs well in controlling
combined water quantity and quality in open water channels.
4.1 Introduction
Over the last decades, many control techniques and operation rules have
been developed to manage water systems for both water quantity and qual-
ity. Most of the research concerns river and reservoir operation. For ex-
1
based on: Xu. M., van Overloop. P.J. and van de Giesen. N.C. Model reduction on
model predictive control of combined water quantity and quality. Environmental Modelling
& Software. 2012. (Accepted)
57
58 Chapter 4. Reduced models in MPC controlling water quantity & quality
ample, Kerachian and Karamouz [68], Dhar and Datta [69], Shirangi et al.
[70] and Chaves and Kojiri [71] used a Genetic Algorithm (GA) together
with water quality simulation models either physically-based or data-driven
Neural Network (NN) model, to manage the water quality in river-reservoirs;
Mujumdar and Saxena [72] and Chaves et al. [73] applied Stochastic Dy-
namic Programming (SDP) to regulate both water quantity and quality in
rivers and reservoirs under uncertainty. These control techniques are nor-
mally based on mid-term or long-term operation (daily to monthly). One of
the intrinsic reasons is that water quality processes are generally character-
ized by longer time scales compared to water quantity, therefore, it is often
difficult to account for water quality when designing a short-term (real-time)
controller.
Over the last decades, also many real-time control methods have been de-
veloped for short-term water system operation (minutes to hourly) over the
last decades. However, most of the research in this field concern operation of
irrigation and drainage canals and rivers, for example [13], [74], [26], [14] and
[75]. In these applications, only water quantity is maintained by controlling
water levels. In general, water quality is managed through manual operation,
for example Dutch polder canals are usually manually operated every couple
of days, depending on the system under investigation, in order to flush out
the pollution. One of the reasons that combined water quantity and qual-
ity management in real-time has not taken off in the past is related to the
unavailability of real-time water quality measurements. Real-time control
requires continuous measurement within each control step. The traditional
laboratory measurement of water quality is not feasible and affordable in
real-time application. However, real-time water quality control will receive
more attention with the development of real-time water quality measurement
[49].
According to the authors knowledge, Xu et al. [8] were first to use MPC to
control combined water quantity and quality. They applied simple reservoir
models in MPC to maintain water levels and average solute concentrations
in a drainage canal. That research showed the possibility of controlling com-
bined water quantity and quality with MPC. However, that research had two
drawbacks. First, the internal model for water quality was a reservoir model
that assumed complete mixing. Therefore, only the average concentration in
the canal reaches could be considered. Second, the research scenario was very
simple with water quality change at only one lateral while all the lateral dis-
charges remained unchanged. These two issues of [8] were the main trigger
for this research. For water quality control in a canal system, more com-
plex and physics-based models are required to capture the main dynamics.
Subsequently, the control targets can be located at the places where water
quality needs to be controlled. In addition, it is of importance to analyze
the control behavior under more realistic scenarios, for example, with both
water quantity and quality changes in all laterals.
MPC solves control problems online, which means that it generates opti-
mal solutions over a finite prediction horizon of which only the first one is
implemented in closed loop. Optimization in MPC requires major compu-
tational resources. This requirement restricts the real-time implementation
of MPC using models that are accurate but complex. Xu et al. [78] applied
a model reduction technique, Proper Orthogonal Decomposition (POD), for
the Saint-Venant equations to reduce model order. POD was used to balance
control effectiveness with computation time. The research by Xu et al. [78]
was conducted for water quantity control on a single canal reach without
lateral flows. The method looks promising for controlling combined water
quantity and quality using complex models with more realistic scenarios in
MPC. The control process includes two steps that are illustrated in Figure
4.1.
Figure 4.1: Work flow of MPC controlling a water system using model re-
duction technique
In this section, we describe the combined open water quantity and qual-
ity model and the use of Proper Orthogonal Decomposition to reduce the
model. The reduced model will be implemented in Model Predictive Control
to reduce computation time.
The open water quantity and quality model can be described by the Saint-
Venant equations and the general transport equation [89] [58] as in equa-
tions 2.1 on page 21, 2.2 on page 21 and 2.3 on page 21:
62 Chapter 4. Reduced models in MPC controlling water quantity & quality
The discretization of equations 2.1 on page 21, 2.2 on page 21 and 2.3 on
page 21 are extensively described in [8] and the discretized version can be
structured as a linear time-varying state-space model which is commonly
used in model-based control techniques, such as [90] [91]. Appendix A pro-
vides a detailed description of the discretization and the state-space model
formulation. From a control perspective, the general format of the linear
time-varying state-space model can be seen in 2.8 on page 24:
Using the state-space model formulation, the combined water quantity and
quality equations for a canal reach with upstream and downstream hydraulic
structures can be written as:
ek+1
a1,1 a1,2 0 0 | 0 0 0 0
,i,1
k+1
a2,2 a2,2 a2,3 0 | 0 0 0 0 e ,i,2
..
... ...
.
0 0 | 0 0 0 0
k+1
0 0 al,l1 al,l | 0 0 0 0 e,i,l
+
k+1
0 0 0 0 | b1,1 b1,2 0 0 ec,i,1
0 0 0 0 | b2,1 b2,2 b2,3 0 ek+1
c,i,2
... ... ..
|
0
0 0 0 0 0 .
0 0 0 0 | 0 0 bl,l1 bl,l k+1
ec,i,l
c1,1 0
ek,i,1 0 0 dk,i,1
ek .. .. dk,i,2
,i,2 . .
.
.. ..
0 0
.
ek,i,l 0 cl,1
k
d,i,l
Qk+1
c,1
= I2l,2l + + I2l,2l
Qk+1
d1,1 0
ekc,i,1 c,2 dkc,i,1
ek 0 0
dkc,i,2
c,i,2
.. .. .. ..
. . .
.
k
ec,i,l
0 0 dkc,i,l
0 dl,1
(4.1)
where i represents the ith canal reach, l is the total number of discrete points
of each reach. For example, ek,i,l and ekc,i,l are the water level and concen-
tration deviations from their targets at lth discrete point of ith reach at time
step k. Qkc,1 and Qkc,1 are the upstream and downstream flows, controlled by
the structures, at the reach at time step k. a, b, c and d are the time-varying
4.2. Model reduction on combined open water quantity and quality model 63
coefficients, d and dc are the water quantity and quality disturbances, respec-
tively. Comparing the notations in equation 4.1 with the general state-space
model notation, it is noticed that: xki = [ek,i,1 , , ek,i,l , ekc,i,1 , , ekc,i,l ]T and
dki = [dk,i,1 , , dk,i,l , dkc,i,1 , , dkc,i,l ]T , however, the control input is the con-
trol flow, and we use uQ for differentiation. Thus, ukQ,i = [Qk+1 k+1 T
c,1 , Qc,2 ] .
Equation 4.1 is used to generate the reduced model and the complete model
constraints will be formulated in Section 4.3.2 where the control input vector
uses the change of control flow.
are known a-priori. They are
The time-varying coefficients (a, b, c and d)
velocity, water level or concentration related, which change at every time
step. The calculation of the time-varying coefficients is referred to Forward
Estimation, which executes the Saint-Venant and transport model over the
prediction. The Forward Estimation uses the optimal control information
over the prediction horizon from the previous control step. This can also be
considered as model approximation.
The disturbances (d and dc ) include physical and virtual disturbances, the
latter being necessary to numerically formulate the control problem. Physical
disturbances can be uncontrolled lateral discharges and pollution concentra-
tions in this test case. Virtual disturbances are the terms emerging from
the discretization of the Saint-Venant equations and the transport equation.
All calculations of the coefficients and variables are formulated in Appendix
A. Multiplying the inverse of the first matrix on both sides of Equation 4.1
results in a linear time-varying state-space model. Note that considering a
linear time-varying (non-linear) model as a linear model has significant ad-
vantages in optimization problems, due to convexity when combined with a
quadratic objective function.
Model reduction can be either data driven, building a model by fitting the
data through a machine learning process, or model driven, using a mathe-
matical model, to calculate the reduced model [34]. Recently, Castelletti et
al. [93] [94] applied data-driven dynamic emulation modeling for the optimal
management of environmental systems. Proper Orthogonal Decomposition
(POD) is one of the most popular and widely applied model driven reduction
techniques to reduce the model order by calculating basis functions. POD
can be applied not only to linear models, but also to nonlinear models, e.g.
[38], [39]. The calculation of the basis functions is the key process of POD.
Liang et al. [40] provides an extensive explanation of three POD meth-
ods: Karhunen-Loeve Decomposition (KLD), Singular Value Decomposition
(SVD), and Principal Component Analysis (PCA), and proves the equiva-
lence of these three methods. This chapter applies POD with a snapshot
method to generate the reduced state-space model for both water quantity
and quality.
The snapshot approach has already been applied by several researchers, such
as [37], [41] and [36]. The approach takes snapshots of an off-line simula-
tion model and forms a two-point spatial correlation (kernel) matrix. Each
snapshot is a column vector containing states, which are the water level and
concentrations deviations from their targets, in a combined water quantity
and quality model. Siade et al. [34] provides a method to select the optimal
snapshot set for a groundwater model. In our research, we try to take as
many snapshots as possible from the off-line simulation, in order to cover a
wide flow range. For example the range between 1 per 1000 year drought flow
and 1 per 1000 year flooding flow. Then the normal scenarios falling in this
range can rely on the reduced model generated by such a scenario. The time
step of the off-line simulation uses the control time step which is relatively
large, in the range of 2 minutes to 1 hour for real-time operation. The full
model is executed only once for generating the reduced model. Taking more
snapshots will not significantly increase the computation time.
Sirovich [66] pointed out that the basis functions are formed by taking the
most dominant eigenvectors of the kernel matrix, which are a linear combi-
nation of the snapshots:
M
X
i = ji zj (4.2)
j=1
1 T
CRi,j = (z zj ) (4.3)
M i
Finally, the number of the basis functions in use is selected based on the m
dominant eigenvalues of the correlation matrix CR, and the combinations of
i forms the basis function matrix with a dimension of N m. Xu et al.
[78] analyzes the relationship between the reduced model accuracy and the
number of reduced states which were selected through trial-and-error.
Furthermore, snapshots can be taken of disturbances as well, when consid-
ering the disturbances as a vector. The same procedure as for the state
reduction can be used. Therefore, the original states xk and disturbances
dk become a function of the reduced states xkr and reduced disturbances
dkr , respectively, with respect to the basis function matrix 1 (N m1 ) and
2 (N m2 ):
xk = 1 xkr
(4.4)
dk = 2 dkr
The basis functions are formulated in such a way that the original vector and
the projected vector have the least square error [36]. When equation 4.4 is
substituted into the state-space model 2.8 on page 24, we obtain:
xk+1
r = Akr xkr + Bu,r
k
uk + Bd,r
k
dkr (4.5)
In the combined water quantity and quality control of open channel problems,
the most general goal is to keep both the water level and the concentration
66 Chapter 4. Reduced models in MPC controlling water quantity & quality
at the end of a canal to reach at their target values, with as few control flow
changes as possible. A quadratic objective function is normally formulated
in MPC in order to deal with both positive and negative deviations of the
variables [29]. An advantage of using a quadratic optimization formulation
with a linear model is the guarantee of a convex optimization problem and,
thus, a definite global optimum [31].
Besides these common goals, extra limitations are added to the objective.
First, when the water is clean, water quality control should be turned off;
Second, when the water level lies outside the maximum and minimum allowed
water level limits, water quantity control dominates and the only objective
then becomes bringing the water level back to the water level limit. These
two additional goals are achieved by adding soft constraints to the objective
function [29]. We first provide the minimization of the objective function in
equation 4.6 and then describe the soft constraints in detail later on.
nr X
X n1
J =P min { [(ek+j+1 T k+j+1
,i,l ) We,i e,i,l
ns n1
Qk+1
P
s=1 j=0 c,s i=1 j=0
(k+j+1) T (k+j+1)
+ (ek+j+1
,i,l e,i ) We,i,l e,i (ek+j+1
,i,l e,i )
(k+j+1) T (k+j+1)
+ (ek+j+1
c,i,l ec,i ) Wec,i (ek+j+1
c,i,l ec,i )
(k+j+1) T (k+j+1)
+ (e,i ) We,i e,i
(k+j+1) T (k+j+1)
+ (ec,i ) Wec,i ec,i ]
nr X
X n1
+ [(Qk+j T k+j
c,s ) WQc,s Qc,s ]}
i=1 j=0
(4.6)
k+j
+ Bdk+j dk+j
k+j+1
x = Ak+j xk+j + Buk+j uQ
e,i,min e(k+j+1) e,i,max
j = 0, , n 1
subject to:
e(k+j+1) 0 i = 1, , nr
k+j
Qc,s,min Qc,s Qc,s,min s = 1, , ns
Wec,i as their weighting factors, respectively, e,i,l e,i and ec,i,l ec,i are
the virtual states introduced as soft constraints, with We,i,l e,i and Wec,i as
their weighting factors, Qc,s is the change of control flow at sth structure
having a weighting factor of WQc,s . e,i,min and e,i,max are the minimum and
maximum allowed water level deviations of the ith reach, respectively, Qc,s,min
and Qc,s,min are the sth minimum and maximum allowed control flows. In the
model equality constraints over the prediction horizon, xk = [xk1 , , xknr ],
ukQ = [Qk+1 k+1 k k k
c,1 , , Qc,ns ] and d = [d1 , , dnr ]. Here the disturbance vector d
is supposed to be known or can be calculated from a prediction model.
The first limitation on water quality control is solved by introducing the vir-
tual variable ec,i over the prediction horizon. When the value of the water
quality parameter in a canal reach is higher than the target value, namely
ec,i,l > 0, the virtual variable should be set to zero to keep the water quality
control goal in the objective function. When ec,i,l 0, the water quality
control goal should be switched off, which is realized by setting ec,i = ec,i,l .
Therefore, the virtual variable changes within the prediction horizon accord-
ing to the water quality condition and the inequality constraint ec,i 0. The
change of the virtual variable ec,i is implemented by adding an extra term
(k+j+1) T (k+j+1)
(ec,i ) Wec,i ec,i to the objective function and setting its weighting
factor Wec,i to a value that is near zero, 1.0 1020 in this case. In such a
way, ec,i can be given any value in the optimization. This does not affect the
value of the added term itself but does influence the water quality control of
ec,i,l ec,i .
The second limitation of the upper and lower water level bounds is solved in
the same way as the water quality control by adding an extra term (ek+j+1
,i,l
(k+j+1) k+j+1 (k+j+1)
e,i )T We,i,l e,i (e,i,l e,i ) to the objective function. The only
difference is that the term (e,i,l ) We,i ek+j+1
k+j+1 T
,i,l for water quantity control
always remains active over the control horizon. The virtual variable e,i
is constrained between the bounds. The weighting factor on the virtual
variable e,i is also set to 1.0 1020 in order to allow the change of the
virtual variable. However, the weighting factor We,i,l e,i on the virtual state
(k+j+1)
ek+j+1
,i,l e,i is set to a large value, 1.0 1010 in this case, to avoid the
water level exceeding the maximum and minimum allowed limits. When the
water level stays within the bounds, the virtual state is always zero and does
not influence the control goal. When the water level exceeds the bounds, the
virtual state dominates the other control goals because of the large weighting
factor, bringing the water levels back within the bounds.
68 Chapter 4. Reduced models in MPC controlling water quantity & quality
Because the model used in MPC is the reduced model, the variables in the
original objective should be adapted to the reduced states. Therefore, the ob-
jective function is changed by substituting the reduced function of Equation
4.4 into the objective function:
nr X
X n1
J = Pn min { [(ek+j+1 T T k+j+1
,r,i,l ) (1 We,i 1 )e,r,i,l
s
P n1 k+1
s=1 j=0 Qc,s i=1 j=0
(k+j+1) T (k+j+1)
+ (ek+j+1
,i,l e,i ) We,i,l e,i (ek+j+1
,i,l e,i )
(k+j+1) T (k+j+1)
+ (ek+j+1
c,i,l ec,i ) Wec,i (ek+j+1
c,i,l ec,i )
(k+j+1) T (k+j+1) (k+j+1) T (k+j+1)
+ (e,i ) We,i e,i + (ec,i ) Wec,i ec,i ]
nr X
X n1
+ [(Qk+j T k+j
c,s ) WQc,s Qc,s ]}
i=1 j=0
(4.7)
k+j+1
where e,r,i,l is the reduced water level deviation from the target at the end
of the i reach at j th prediction step of control time step k.
th
xrk+j+1 Ak+j B k+j
0 0 x k+j
r u,r r
k+j+1 k+j
uQ 0 1 0 0 u Q
= k+j
(k+j+1) k+j
ek+j+1 k+j k+j
e,i A,i,l 1 Bu,,i,l 0 0 e,i,l e,i
,i,l
k+j k+j
ek+j+1
c,i,l
(k+j+1)
ec,i Ac,i,l 1 Bu,c,i,l 0 0 ek+j k+j
c,i,l ec,i
k+j k+j
Bu,r 0 0
B
uk+j+1
Q
d,r
1 0 0 e(k+j) + k+j0
+ dk+j
k+j r
Bu,,i,l 1 0 ,i
(k+j) Bd,,i,l 2
k+j
Bu,c,i,l 0 1 ec,i k+j
Bd,c,i,l 2
(4.8)
k+j+1
where uQ is the vector of change of control flows: uk+j+1
Q = [Qk+j+1
c,1 , ,
k+j+1 T k
Qc,ns ] . Therefore, the control input vector u in equation 2.8 on page 24
becomes [(uk+1 T k k T
Q ) e,i e,i ] .
Table 4.1: Lateral flow scenario for reduced model generation (step changes happen between 8 and 10 hours of
simulation)
Lateral 1 Lateral 2 Lateral 3
Reach Discharge Concentration Discharge Concentration Discharge Concentration
(m3 /s) (kg/m3 ) (m3 /s) (kg/m3 ) (m3 /s) (kg/m3 )
1 0.02 to 0.08 1.0 to 1.6 0.03 to 0.09 1.2 to 1.8 No third lateral
2 0.02 to 0.08 1.2 to 1.8 0.03 to 0.09 1.4 to 2.0 No third lateral
3 0.04 to 0.10 0.9 to 1.5 0.02 to 0.08 1.5 to 2.1 0.03 to 0.09 1.8 to 2.4
4 0.02 to 0.08 1.5 to 2.1 0.04 to 0.10 1.0 to 1.6 No third lateral
71
Chapter 4. Reduced models in MPC controlling water quantity & quality
Table 4.2: Lateral flow scenario for reduced model verification (step changes happen between 5 and 8 hours of the
simulation)
Lateral 1 Lateral 2 Lateral 3
Reach Discharge Concentration Discharge Concentration Discharge Concentration
(m3 /s) (kg/m3 ) (m3 /s) (kg/m3 ) (m3 /s) (kg/m3 )
1 0.02 to 0.07 1.0 to 1.5 0.03 to 0.08 1.2 to 1.7 No third lateral
2 0.02 to 0.07 1.2 to 1.7 0.03 to 0.08 1.4 to 1.9 No third lateral
3 0.04 to 0.09 0.9 to 1.4 0.02 to 0.07 1.5 to 2.0 0.03 to 0.08 1.8 to 2.8
4 0.02 to 0.07 1.5 to 2.0 0.04 to 0.09 1.0 to 1.5 No third lateral
72
4.4. Test case
Table 4.3: Lateral flow scenario for testing the reduced model performance (step changes happen between 3 and 6
hours of the simulation)
Lateral 1 Lateral 2 Lateral 3
Reach Discharge Concentration Discharge Concentration Discharge Concentration
(m3 /s) (kg/m3 ) (m3 /s) (kg/m3 ) (m3 /s) (kg/m3 )
1 0.02 to 0.06 1.0 to 1.4 0.03 to 0.07 1.2 to 1.6 No third lateral
2 0.02 to 0.06 1.2 to 1.6 0.03 to 0.07 1.4 to 1.8 No third lateral
3 0.04 to 0.08 0.9 to 1.3 0.02 to 0.06 1.5 to 1.9 0.03 to 0.07 1.8 to 2.2
4 0.02 to 0.06 1.5 to 1.9 0.04 to 0.09 1.0 to 1.4 No third lateral
73
74 Chapter 4. Reduced models in MPC controlling water quantity & quality
Table 4.5: Weighting factors in MPC for all reaches and structures
1 2 3 4 5
1 1 1 1
We,i (0.2)2 (0.2)2 (0.2)2 (0.2)2
1 1 1 1
We,i,l e,i (1.0105 )2 (1.0105 )2 (1.0105 )2 (1.010 5 )2
1 1 1 1 1
Wec,i (A) (1.01010 )2 (1.01010 )2 (1.01010 )2 (1.01010 )2
2 1 1 1 1
Wec,i (B) (0.2)2 (0.2)2 (0.2)2 (0.2)2
1 1 1 1
We,i (1.01010 )2 (1.01010 )2 (1.01010 )2 (1.01010 )2
1 1 1 1
Wec,i (1.01010 )2 (1.01010 )2 (1.01010 )2 (1.01010 )2
1 1 1 1 1
WQc,s (0.02)2 (0.02)2 (0.02)2 (0.02)2 (0.02)2
The different control methods are tested in closed loop on the model of the
polder system that acts as real-world. In this off-line setting, it is possible
to simulate the Model Predictive Controller that uses the full model, but the
simulation time is much larger than real-time.
4.5 Results
This section presents the reduced model accuracy for both water quantity
and quality models, and the results of MPC control performance using the
reduced model. In order to demonstrate these two criteria, the reduced model
is compared with the full model. MPC using the reduced model is compared
with the MPC using the full model. All the model and control parameters
are set the same in the comparisons.
1
the values are used in water quantity control (A)
2
the values are used in combined water quantity and quality control (B)
4.5. Results 75
The reduced model is validated with a different lateral scenario and the per-
formance can be analyzed by projecting the reduced model states and distur-
bances back to the original order as illustrated in Figures 4.2 and 4.3.
Figure 4.2 (I and III) shows that the downstream water levels in all reaches
are well controlled at their targets with feedback control. The concentration
in the last reach is around the target while the concentrations in upstream
reaches are always below the targets because of the flushing. Figure 4.2
(II and IV) also demonstrates that water levels and concentrations between
the reduced model and the original model have a maximum difference in
the order of only 103 m and 102 kg/m3 , respectively. This means that the
reduced model is representative for the original model and can capture the
relevant system dynamics well. The same results occur in the disturbance
vector for both water quantity and quality, which has a maximum difference
in the order of 102 , as shown in Figure 4.3 (II and IV). However, each reach
has a different model error.
Another way to demonstrate model accuracy is to use the Root Mean Square
Error (RMSE), which describes the spread of the reduced model to the orig-
inal model. Figure 4.4 illustrates the RMSE of both water levels and con-
centrations. The results show a high accuracy of the reduced model on both
water quantity and quality, and they are consistent with the model compar-
isons in Figures 4.2 and 4.3.
The reduced model can approximate the full dynamic model with a validation
scenario according to the results in 5.1. It is expected that MPC will have a
good control performance using this reduced model. Figures 4.5 to 4.8 show
the closed-loop MPC performance for both Experiment A and Experiment
B in comparison with MPC using the full model. All the figures indicate the
advantage of anticipation in MPC using the prediction.
Figure 4.2: Reduced water level states (I) and concentration states (III)
projected back to the original order, and the water level differences (II) and
concentration differences (IV) between the reduced model and the original
model
4.5. Results 77
Figure 4.3: Reduced water quantity disturbances (I) and quality disturbances
(III) projected back to the original order, and the water quantity disturbance
differences (II) and water quality disturbance differences (IV) between the
reduced model and the original model.
78 Chapter 4. Reduced models in MPC controlling water quantity & quality
Figure 4.4: Root mean square error of the reduced model on water quantity
and quality (interpolated scenario)
trations using both reduced and full models. The controlled water levels in
Figure 4.5 (I and III) show a decrease in all reaches before 180 minutes. This
is because of the prediction of the increase of lateral discharges, thus pre-
releasing occurs. The phenomenon is a result of the control flows in Figure
4.6, where the flows of downstream structures increase to release more water,
while the flows of upstream structures decrease to introduce less water. In
this way, extra space is created in the canal for the coming high flow.
Because each canal reach has a different model error, the influence on the
control performance is expected to be different. This difference is clearly
illustrated in Figure 4.5, where the water level deviations in (I) are widely
spread among the four reaches comparing to (III). However, the water levels
are well maintained and the steady-state condition is reached.
Figure 4.5: Controlled water levels (I) and uncontrolled concentrations (II)
using the reduced model; controlled water levels (III) and uncontrolled con-
centrations (IV) using the full model (Experiment A)
However, this action will deteriorate the water quality and the water quality
control requires pumping out more polluted water and introducing clean wa-
ter. Therefore, the water level drops after rising to a certain level when the
water quality control dominates. When water quantity dominates again, the
controller tries to raise the water levels. This rotation of control dominance
causes the water level fluctuations. After 360 minutes, when lateral flows are
turned back to the original values, the control flows are still relatively high
as shown in Figure 4.8 and the water levels have a large drop due to the
gradual change of the control flows. This is the same phenomenon as found
in the results of water quality control. In the end, the system returns back
to the targets.
In Figure 4.8 (I), the control flows show a similar pattern as the water quan-
tity control in Figure 4.6 (I), but with larger magnitudes during the period
of lateral flow change. That is because of the added water quality control,
80 Chapter 4. Reduced models in MPC controlling water quantity & quality
Figure 4.6: Control flows (I) using the reduced model and (II) using the full
model (Experiment A)
When comparing the MPC results using two different models, we notice that
the control flows using the reduced model are smaller compared to those
using the full model in Figure 4.8, which indicates an underestimation of the
states in the reduced model. The high discharges of the full model result in a
faster flushing as shown in Figure 4.7 (II and IV). Moreover, the water level
deviations spread even more widely in Figure 4.7 (I) because of the added
water quality control, but they are still well controlled.
In Figure 4.8, it can be noticed that flow conditions at the end of the con-
trol experiments are different. The controlled discharges when using the full
model are larger than the initial steady state conditions and the concentra-
tion in the last reach is below the target value, which leads to over-flushing.
However, from a control perspective, the problem is solved properly by MPC
using both models. Figure 4.9 shows the objective function values of both
4.6. Discussions 81
Figure 4.7: Controlled water levels (I) and concentrations (II) using the
reduced model; controlled water levels (III) and concentrations (IV) using
the full model (Experiment B)
controllers. After 600 minutes, both objectives return to zero and the opti-
mization problem is solved. The reason of this over-flushing is due to the
switch-off of the water quality control when water is clean, while discharge
is still too high.
4.6 Discussions
Water quantity and quality are the two major objectives in this research.
They are formulated in a single objective function by assigning different
weighting factors to each objective. However, conflicts may easily exist
among the objectives. For example in Experiment B, water quantity con-
trol tries to decrease the control flow of the first gate because the lateral
inflows will raise the water level. However, from a water quality control
82 Chapter 4. Reduced models in MPC controlling water quantity & quality
Figure 4.8: Control flows (I) using the reduced model and (II) using the full
model (Experiment B)
point of view, more clean water needs to be introduced into the system,
because more polluted lateral inflows will deteriorate the water quality sit-
uation. Thus, the first gate flow should increase. The relative importance
of water quantity and quality control in the objective function decides the
increase or decrease of the control flows.
It can be noticed that the magnitudes of scenarios used for model verifica-
tion in Table 4.2 and MPC test in Table 4.3 are lower than the ones used
for reduced model generation in Table 3. This is intended to let the model
reduction scenario cover the entire flow range in the MPC test. In this case,
the snapshots taken in the off-line simulation of model reduction capture
the main flow dynamics. Appendix B illustrates a situation where the step
change of lateral flows is higher than the one used for the reduced model
generation. The results show that the difference between the reduced and
original model is around 10 times larger for both state and disturbance vec-
tors, when the same number of reduced states and disturbances are used.
This is due to the flow dynamics that are not captured in the snapshots.
Therefore, it is strongly recommended that the model reduction scenario
covers the flow and concentration ranges as widely as possible.
Figure 4.9: Objective function value of MPC using reduced and full models
This chapter studies combined water quantity and quality control and pro-
vides a model reduction technique to implement complex high order models
in Model Predictive Control. The research demonstrates that the extension
of MPC to control both water quantity and quality control using complex
models is possible.
According to the comparison between the two experiments, water quantity
84 Chapter 4. Reduced models in MPC controlling water quantity & quality
and quality control may conflict. However, the optimization in MPC can deal
with the conflicts and finds the optimal solutions for all objectives. Thanks
to the prediction of the flow dynamics in MPC, the water system can respond
to the known water quantity and quality disturbances in advance and create
extra space for the upcoming problems.
Proper Orthogonal Decomposition is an efficient model reduction method
to reduce the model order for both water quantity and quality. From a
state-space model perspective, the number of states and disturbances can be
significantly reduced while maintaining high accuracy. Because the reduced
model can capture the main flow structure, it can be used as the prediction
model in MPC to reduce the computational time. With model reduction,
MPC could be run in real-time, whereas this was not possible with the full
model.
According to the discussion above, some future research can be performed.
1) The computation of Pareto fronts can be useful, in order to assess the
trade-off between water quantity and quality objectives. 2) In reality, there
are significant uncertainties in both data (lateral scenarios) and prediction
models used. It is worth to incorporate uncertainty analysis of real-world
applications and the adoption of robust MPC. 3) From an organization point
of view, it could be also interesting to split the optimization in two agents,
responsible for either water quantity or water quality management at different
locations. Instead solving the central problem at once, the two agents need
to collaborate in a distributed model predictive control configuration to come
to a global optimum.
Chapter 5
Abstract
85
86 Chapter 5. Model assessment in model predictive control
5.1 Introduction
Over the last decade, model predictive control (MPC) of open channel flow
has been a subject of extensive study [95],[96],[29],[97],[98],[99]. MPC is a
model-based control technique that uses an optimization algorithm to gen-
erate optimal control actions. Advantages of MPC are that it predicts the
future system dynamics, therefore being able to take into account future
known disturbances. It can also deal with constraints within the optimiza-
tion. Based on the type of model used in the optimization, MPC approaches
can be categorized as linear or nonlinear. The focus of MPC in open channel
water management is mainly on efficient water delivery in irrigation systems,
and river operations for flood or drought prevention. A common feature of
the existing research is that, typically, linear models are used for predicting
the system dynamics, such as the reservoir model and the classical Integrator
Delay (ID) model in [95],[96],[29],[97],[98]. Under certain assumptions, these
linear models can approximate the nonlinear system dynamics well. The
MPC optimization problems when using such linear models are easy and fast
to solve. Moreover, guaranteed global optimal solutions can be found.
A nonlinear model can normally include more system dynamics than a linear
one. This extra information in the nonlinear model may increase the control
accuracy in MPC. However, due to the use of such a nonlinear model, the
optimization problem can become non-convex and hard to solve. Indeed,
this is the case when using the Saint-Venant equations. Theoretically, a
guarantee for finding the global optimum for nonlinear optimization can not
often be given [32]. Since the optimal action needs to be taken within a
prescribed time period in real-time control, computational time is important
in achieving the optimum. Unfortunately, such a nonlinear MPC scheme can
be very time consuming, e.g., due to the CPU-intensive model executions for
the numerical calculation of gradients of a Lagrangian function with respect
to the control variables, especially in the areas where these gradients are flat.
This computational complexity in MPC using such a nonlinear model was
also stated by Barjas Blanco in [99]. Therefore, they used a series of reservoir
models instead.
1
based on: Xu. M., Negenborn. R.R., van Overloop. P.J. and van de Giesen. N.C. De
Saint-Venant equations-based model predictive control of open channel flow. Advances in
Water Resources. Volume 49:37-45, 2012.
5.1. Introduction 87
the lack of information at the last prediction step. Therefore, another goal
of this work is to investigate the significance of this influence.
This Chapter is organized as follows. Section 5.2 describes the main compo-
nents of MPC, including the open channel flow modeling and the optimization
problem formulation. It summarizes the QP-based MPC scheme using the
linearized Saint-Venant model and introduces the SQP-based MPC scheme.
Section 5.3 introduces the test case used to compare the control performance
between the two MPC schemes. A detailed demonstration of the results is
given in Section 5.4 and conclusions and future research are given in Section
5.5.
In order to control the open channel flow with MPC, the dynamics of the
system need to be properly defined in the internal model of the controller.
Open channel flow dynamics is usually described by the Saint-Venant equa-
tions, which contain the mass and momentum conservations [89] shown in
Equations 2.1 on page 21 and 2.2 on page 21
According to Stelling and Duinmeijer [17], the Saint-Venant equations can be
spatially discretized with staggered grids. A semi-implicit scheme is applied
to the time integration, where the advection term in the momentum equation
is explicitly discretized by a first-order upwind method. The friction term is
linearized by using |Q| explicitly. All other terms are implicit. In this way,
5.2. Model predictive control of open channel flow 89
n1
X n1
X
k k k+j+1 T k+j+1
min J(X , U ) = min { (x ) Wx x + (uk+j )T Wu uk+j }
X k ,U k X k ,U k
j=0 j=0
(5.1)
hi (X k , U k ) = 0 i = 1, , me
subject to:
ri (X k , U k ) 0 i = 1, , mi
In open channel flow system, typically the state xk+j+1 = k+j+1 t is the
water level deviation from the target level (t ) and the control input uk+j =
Qk+j
c Qck+j1 is the change of structure flow, where Qc is the controlled
structure flow. The downstream water level of a canal reach is assumed
controlled, and Wx only penalizes the controlled water level deviation. The
equality constraints reflect the dynamics of the system, e.g. the Saint-Venant
equations in this case. The structure flow Qc is restricted typically between
the minimum and maximum flows of Qc,min and Qc,max as the inequality
constraints, namely Qc,min Qk+j c Qc,max . Note that both equality and
inequality constraints are over the prediction horizon n.
According to the type of model constraints, the obtained optimization prob-
lem can be solved with different solvers. For example, if the model constraints
are linear, Quadratic Programming (QP) can be use. If the model constraints
are nonlinear, Sequential Quadratic Programming (SQP) can be used. In this
chapter, Equation 2.8 on page 24 is a linear time-varying system with proper
discretization. It is a linear approximation of partial differential equations
at each time step with time-varying parameters. However, the equation is
actually nonlinear over a finite horizon, which exactly needs to be considered
in MPC as the internal model. In the following sections, we discuss two
methods to estimate the time-varying parameters in MPC.
When the model Equation 2.8 on page 24 over a prediction horizon is sub-
stituted into the objective function 5.1 with calculated Ak , Buk and Bdk , the
optimization problem can be written as:
1
min J(U k ) = min[ (U k )T H k U k + (f k )T U k + gc ] (5.2)
Uk Uk 2
Because the constrained model is linear with pre-determined and fixed time
varying parameters of Ak , Buk and Bdk , the Hessian and the Jacobian can be
analytically calculated with one model run over the prediction horizon [29].
Therefore, there is no need for extra model executions for the gradient com-
paring to numerical calculation, which saves a large amount of computational
time, especially when iterations are used within the optimization. But the
MPC procedure does need (niter + 1) 2n model executions for the Forward
Estimation to estimate the time varying parameters and for the calculation
of the Hessian and Jacobian, where niter is the number of iterations between
the Forward Estimation and Quadratic Programming. The optimiza-
tion problem of Equation 5.2 is a typical quadratic programming problem,
which is in our case solved by the standard MATLAB function quadprog
[103].
me
X mi
X
L(X k , U k , k , Mk ) = J(X k , U k ) + ki hi (X k , U k ) + Mki ri (X k , U k )
i=1 i=1
(5.3)
where L is the Lagrangian function, ki = [k+1
i , , k+n
i ] and Mki = [k+1
i ,
k+n
, i ] are the Lagrange multipliers.
The QP sub-problems at control step k are formulated according to Equation
5.4 by taking the second order Taylor expansion of the Lagrangian function.
The solutions of the QP sub-problems S are used to formulate the next
iteration until the objective function values converge.
1
min L(X k , U k , k , Mk ) = min[ (S k )T HL,p
k
S k +(fL,p
k T k k
) S +gL,p ] (5.4)
k k k
X ,U , ,M k S k 2
hi (Xp , Up ) + 5X hi (Xp , Up )s1 + 5U hi (Xp , Up )s2 = 0, i = 1, , me
subject to:
ri (Xp , Up ) + 5X ri (Xp , Up )s1 + 5U ri (Xp , Up )s2 0, i = 1, , mi
k
where HL,p is the Hessian matrix of the Lagrangian function at (Xpk , Upk ),
k
fL,p is the Jacobian matrix of the Lagrangian function at (Xpk , Upk ), gL,p is
94 Chapter 5. Model assessment in model predictive control
For the Hessian matrix, Quasi-Newton method is used to calculate the Hes-
sian approximation. The BroydenFletcherGoldfarbShanno (BFGS) method
is one of the most popular algorithms to update the Hessian approximation
based on the Jacobian matrix [107]. Therefore, there is no need for extra
model executions to calculate the Hessian matrix of the Lagrangian func-
tion.
In total, n(2n + 1) model runs are required for each of the iterations in the
nonlinear optimization with the forward difference method.
time step of 2 seconds. The gate is operated every 4 minutes using the optimal
control action. The reach is discretized in 500 segments, resulting in 500 wa-
ter level states. A Kalman filter is implemented to estimate the unmeasured
water levels and velocities as the initial condition of the model constraints
based on the measured water levels at the upstream and downstream side of
the reach (details of the Kalman filter are in [78]). The optimization problem
in this case is only subject to the Saint-Venant equations and there is only
one structure in control. Therefore, the number of equality constraints (me )
and the number of inequality constraints (mi ) both equal to 1.
5.4 Results
Figure 5.5: Evolution of the predicted water levels and discharges of QP-
based MPC over 30 iterations at the first control step
5.4. Results 99
controllers can control the water levels very close to the target, and the sys-
tem behavior using these two controllers is very similar. The water level
oscillations that are visible in Figure 5.8 are realistic and caused by the dis-
crete steps that the controller takes every 4 minutes, while the flow dynamics
is simulated using a 2 second time interval. The maximum control flow of
4m3 /s is reached several times during the whole simulation as shown in Fig-
ure 5.9.
The performance of the controlled water levels and discharges can also be in-
dicated through quantitative performance indicators, such as the Maximum
Absolute Error (MAE) indicating the percentage of maximum water level
deviation from the target and the Integrated Absolute Discharge Change
(IAQ) calculated by the integral of the absolute flow changes over the simu-
lation minus the absolute flow difference of the first and last simulation steps
[67]. IAQ reflects the tear and wear of the gate over the whole simulation.
The comparison of the two MPC schemes using these indicators is shown in
Table 5.1. As can be seen, the differences in control performance between
the schemes are small. Due to the higher model accuracy, SQP-based MPC
has slightly lower values for the MAE and IAQ indicators, which indicates
slightly better performance.
5.4. Results 101
Figure 5.8: Controlled water levels in SQP-based MPC and QP-based MPC
without iterations
From Table 5.2, it follows that 99.37% of the total computational time in
SQP-based MPC is used to generate the control actions, while 99.9% of the
control actions calculation time is spent on the model executions within the
optimization. This illustrates the importance for reducing the total number
of model executions and speeding up the model computations. It is noted
that the control time and the model calls in control do not include the
time of Kalman filtering.
Moreover, there exist large computational time differences between the two
MPC executions. Since the actual control time step is 4 minutes, the table
5.4. Results 103
Table 5.3: Number of model executions per control step in linear and non-
linear MPC
QP-based MPC SQP-based MPC
No iteration niter iterations -
Number of
model executions 2n (niter + 1) 2n n(2n + 1) niter
per control step
It should be noticed that the model execution in QP-based MPC only occurs
in the Forward Estimation and preparation of Hessian and Jacobian matri-
ces buildup over the prediction horizon. Therefore, the number of executions
increases linearly with the number of iterations between the Forward Esti-
mation and Quadratic Programming. Because the Hessian and Jacobian
matrices are pre-calculated, there is no need to execute the model within the
QP optimization, although QP iteratively solves the optimization problem.
Figure 5.10 shows the number of iterations used in the SQP in SQP-based
MPC. There are niter = 45.86 iterations per control step on average, and
every iteration requires n(2n + 1) model calls to calculate the Hessian ap-
proximation and the Jacobian matrices. For that reason, the computational
difference between the two MPC schemes is significant.
104 Chapter 5. Model assessment in model predictive control
In this Chapter, a comparison has been made between QP-based and SQP-
based MPC schemes for control of open channel flow that can be described by
1-dimensional Saint-Venant equations. Two experiments were conducted for
testing the behaviors of controllers and their influence on the water systems.
Both MPC schemes presented in this chapter can control the water system
very well. Due to the integrated calculation of the time-varying parameters
of the Saint-Venant equations, a more accurate prediction model is achieved
in SQP-based MPC. Furthermore, SQP-based MPC achieves slightly better
control performance regarding the minimization of the objective function.
SQP-based MPC is more computationally expensive. The QP-based MPC
using the linearized Saint-Venant equations was tested in a single canal reach
in this research. However, in general, as the complexity of the problem
increases, the computational time will increase accordingly when the same
model accuracy (spatial discretization) is reached.
mation dies out quickly as the simulation proceeds and the control results
converge fast over the iterations. As a benchmark for control performance,
the results of SQP-based MPC show that the procedure of QP-based MPC
with the Forward Estimation is an effective and efficient way to deal with
nonlinearity of the model constraints.
This chapter also provides an interesting finding that model executions take
99.9% of the control time in the optimization of SQP-based MPC. This sug-
gests a working direction for SQP-based MPC in the future regarding reduc-
ing the total number of model executions and speeding up the model calcula-
tions, for example, the adjoint method. In addition, switching all the calcu-
lations to low level programming will also decrease the computational time
significantly, since the matrix inverse in the model calculation takes much
time. Because of the non-convexity of the optimization, there is no guaran-
tee of global optimum in nonlinear optimization. Once the computational
burden of SQP-based MPC optimization is conquered, a multi-start method,
a number of SQP-based MPC executions with multiple initial values, can be
implemented to increase the chance of reaching the global optimum.
More practically, another future research direction regarding MPC is to an-
alyze the influence of future uncertainty on the proposed QP-based MPC
procedure. For example, what is predicted in the previous step does not hap-
pen or what is not predicted in the previous step does happen, etc. Unlike
the theoretical work in this Chapter, which assumes perfect predictions, real
world implementations have to deal with these changing predictions.
106 Chapter 5. Model assessment in model predictive control
Chapter 6
In this thesis, real-time control of combined surface water quantity and qual-
ity was studied. As a test case, a polder system was considered where, due
to deteriorating water quality, the canals need to be flushed. Both feed-
back control and model predictive control (MPC) were designed to control
the flushing procedure. The thesis focuses on the implementation of MPC,
because of its advantage of prediction and constraint handling which leads
to better operation. Model Predictive Control proved to be a much larger
challenge due to the heavy computation, which can be a barrier for real-time
implementation. The control performance of MPC using different simplified
internal models was analyzed and a model reduction method to balance the
control effectiveness and the computation time in MPC was proposed. The
main research questions as stated in the introduction were answered and the
main findings and future research are summarized in this chapter.
6.1 Conclusions
1. In this thesis, both simple and complex models applied in MPC were
studied controlling both in water quantity and quality. For flow mod-
elling, commonly the Integrator Delay model suffices. For polders and
irrigation canals, the flow changes are small over the prediction hori-
zon which allows for such a linear model. An accurate model is needed
for river operation, because river discharges vary significantly. There-
fore, the Saint-Venant model is required to achieve sufficient accuracy.
107
108 Chapter 6. Conclusions and future research
1. In this thesis, all the measurements for water quantity and quality
variables are assumed to be measurable at a prescribed control inter-
val. Water quantity variables, such as water levels or flows, can be
easily measured and many implementations of these measurements are
available. However, water quality measurements in real-time are much
more difficult in practical implementation, especially for certain sub-
stances, e.g. nitrate, PH. This difficulty needs to be taken into account
for real-time control of water quantity. A focus towards real-time mea-
surements of water quality variables is recommended.
2. The research in this thesis is based on deterministic MPC and all the
study cases assume perfect predictions for MPC. However, this is usu-
ally not valid in reality and uncertainty needs to be considered, for
example in the input data and the prediction model itself. Ensemble
predictions such as [109] [110] are required to cope with the uncertainty,
and the combination of MPC with uncertain predictions needs further
research.
Controller structure
1. For the polder flushing case, applying a water network instead of a canal
will make the test more challenging. It will be difficult for feedback
control to control both water quantity and quality. MPC, using the
network model, will still be able to find sensible control solutions.
Optimization issues
Computation methods
Figure 6.1: Schematic view of MPC controlling both surface water quantity
and quality using reduced models
112 Chapter 6. Conclusions and future research
Bibliography
[1] Ward. D.R. Water Wars: Drought, Flood, Folly and the Politics of
Thirst. Riverhead Hardcover, first edition, 2002.
[2] Zhang. Q. and Gao. G. The spatial and temporal features of drought
and flood disasters in the past 50 years and monitoring and warning
services in China. Science & Technology Review, 7, 2004.
[3] Coward. E.W. Irrigation and agricultural development in Asia: Per-
spectives from the social sciencest. Cornell Univ Pr, 1980.
[4] Rao. NH, Sarma. PBS, and Chander. S. Irrigation scheduling under a
limited water supply. Agricultural Water Management, 15(2):165175,
1988.
[5] Sperna Weiland. F. Hydrological Impacts on Climite Change. Utrecht
Studies in Earth Sciences, 2011.
[6] Warmer. H. and van Dokkum. R. Water pollution control in the Nether-
lands. Policy and Practice. RIZA report, 2002.
[7] Xu. M., van Overloop. P.J., and van de Giesen. N.C. Model selection
for salt water intrusion in delta areas. In 25th ICID European Regional
Conference, pages Paper II17, May. 2011.
[8] Xu. M., van Overloop. P.J., van de Giesen. N.C., and Stelling. G.S.
Real-time control of combined surface water quantity and quality:
polder flushing. Water Science and Technology, 61(4):869878, 2010.
[9] Fontane. D. G., Labadie. J. W., and Loftis. B. Optimal control of reser-
voir discharge quality through selective withdrawal. Water Resources
Research, 17(6):15941602, 1981.
[10] Cembrano. G., Quevedo. J., Salamero. M., Puig. V., Figueras. J., and
Marti. J. Optimal control of urban drainage systems. A cases tudy.
Control Engineering Practice, 12(1):19, 2004.
113
114 Bibliography
[13] Schuurmans. J., Hof. A., Dijkstra. S., Bosgra. O.H., and Brouwer. R.
Simple water level controller for irrigation and drainage canals. Journal
of Irrigation and Drainage Engineering, 125(4):189195, 1999.
[15] Courant.R., Friedrichs. K., and Lew. H. On the partial difference equa-
tions of mathematical physics. IBM Journal of Research and Develop-
ment, 11(2):215234, 1967.
[18] van der Vegt. JJW and De Boom. WC. Numerical simulation of flow
around circular cylinders at high reynolds numbers. In Behaviour of
offshore structures: proceedings of the 4th International Conference on
Behaviour of Offshore Structures (BOSS85), pages 227238, Jul. 1985.
[19] Dewey. H.G. and Madsen. W.R. Flow control and transients in the
California aqueduct. Journal of Irrigation and Drainage Engineering
Division, 120(HY3), 1976.
[20] Bodely. W.E. and Wylie. E.B. Control of transients in series channels
with gates. Journal of Hydraulics Division, 104(HY10), 1978.
[22] Buyalski. C.P. Automatic upstream control system for canals. In 8th
Technical Conference, U.S. Commission on Irrigation, Drainage, and
Flood Control, Phoenix, Arizona, Sept. 1979.
[23] Stedinger. J.R., Sule. B.F., and Loucks. D.P. Stochastic dynamic
programming models for reservoir operation optimization. Water Re-
sources Research, 20(11):14991505, 1984.
[24] Chang. L.C. and Chang. F.J. Intelligent control for modelling of
real-time reservoir operation. Hydrological Processes, 15(9):16211634,
2001.
[25] Burt. C.M., Mills. R.S., Khalsa. R.D., and Ruiz. VC. Improved
Proportional-Integral (PI) logic for canal automation. Journal of Irri-
gation and Drainage Engineering, 124(1):5357, 1998.
[26] Litrico. X. and Fromion. V. Design of structured multivariable con-
trollers for irrigation canals. In 44th IEEE Conference on Decision
and Control, the European Control Conference, pages 18811886, Dec.
2005.
[27] van Overloop. P.J., Schuurmans. J., Brouwer. R., and Burt. C.M.
Multiple-model optimization of proportional integral controllers on
canals. Journal of Irrigation and Drainage Engineering, 131(2):190
196, 2005.
[28] Malaterre. P.O., Rogers. D.C., and Schuurmans. J. Classification of
canal control algorithms. Journal of Irrigation and Drainage Engi-
neering, 124(1):310, 1998.
[29] van Overloop. P.J. Model Predictive Control on Open Water Systems.
IOS Press, 2006.
[30] Garcia. C.E., Prett. D.M., and Morari. M. Model predictive control:
theory and practice a survey. Automatica, 25(3):335348, 1989.
[31] Leigh. J.R. Control Theory. The Institution of Electrical Engineers,
second edition, 2004.
[32] Camacho. E. and Bordons. C. Nonlinear model predictive control: an
introductory review. Assessment and Future Directions of Nonlinear
Model Predictive Control, 358(1):116, 2007.
[33] Holmes. P., Lumley. J.L., and Berkooz. G. Turbulence, Coherent Struc-
tures, Dynamical Systems and Symmetry. Cambridge University Press,
1998.
116 Bibliography
[34] Siade. A.J., Putti. M., and Yeh. W.W.G. Snapshot selection for ground-
water model reduction using proper orthogonal decomposition. Water
Resources Research, 46(8):W08539, 2010.
[35] Winton. C., Pettway. J., Kelley. C., Howington. S., and Eslinger. O.J.
Application of Proper Orthogonal Decomposition (POD) to inverse
problems in saturated groundwater flow. Advances in Water Resources,
34(12):15191526, 2011.
[36] Ha. D.M., Tkalich. P., and Chan. E.S. Tsunami forecasting using
proper orthogonal decomposition method. Journal of Geophysical
Research-Oceans, 113(C6):C06019, 2008.
[37] Ravindran. S.S. A reduced-order approach for optimal control of flu-
ids using proper orthogonal decomposition. International Journal for
Numerical Methods in Fluids, 34(5):425448, 2000.
[38] Hinze. M. and Volkwein. S. Proper orthogonal decomposition surrogate
models for nonlinear dynamical systems: error estimates and subopti-
mal control. Dimension Reduction of Large-Scale Systems, 45(1):261
306, 2005.
[39] Chen. G., Li. Y., and Yan. G. A nonlinear pod reduced order model
for limit cycle oscillation prediction. SCIENCE CHINA Physics, Me-
chanics & Astronomy, 53(7):13251332, 2010.
[40] Liang. Y.C., Lee. H.P., Lim. S.P., Lin. W.Z., Lee. K.H., and Wu. C.G.
Proper orthogonal decomposition and its applications - part i: theory.
Journal of Sound and Vibration, 252(3):527544, 2002.
[41] Ha. D.M., Lim. K.M., Khoo. B.C., and Willcox. K. Real-time opti-
mization using proper orthogonal decomposition: Free surface shape
prediction due to underwater bubble dynamics. Computers & Fluids,
36(3).
[42] Litrico. X. and Fromion. V. H control of an irrigation canal pool with
a mixed control politics. In Control Systems Technology, IEEE Trans-
actions on, pages 99111, Jan. 2006.
[43] Breur. K.J., van Leeuwen. P., and Dellaert. N.P. Deriving discharge
strategies to reduce cso in urban drainage systems. Water Science and
Technology, 36(8):259263, 1997.
[44] Petruck. A., Cassar. A., and Dettmar. J. Advanced real time control of
a combined sewer system. Water Science and Technology, 37(1):319
326, 1997.
Bibliography 117
[45] Vanrolleghem. P.A., Benedetti. L., and Meirlaen. J. Modelling and real-
time control of the integrated urban wastewater system. Environmental
Modelling & Software, 20(4):427442, 2005.
[46] Cox. B.A. A review of currently available in-stream water quality mod-
els and their applicability for simulating dissolved oxygen in lowland
rivers. Science of the Total Environment, 314:335377, 2003.
[47] Elshorbagy. A. and Ormsbee. L. Object-oriented modeling approach
to surface water quality management. Journal of Environmental Engi-
neering, 21(5):689698, 2006.
[48] Lobbrecht. A.H., Sinke. M.D., and Bouma. S.B. Dynamic control of
the Delfland polders and storage basin, the Netherlands. Water Science
and Technology, 39(4):269279, 1999.
[49] Glasgow. H.B., Burkholder. J.A.M., Reed. R.E., Lewitus. A.J., and
Kleinman. J.E. Real-time remote monitoring of water quality: a review
of current applications, and advancements in sensor, telemetry, and
computing technologies. Journal of Experimental Marine Biology and
Ecology, 300(1-2):409448, 2004.
[50] Johnson. K.S. and Coletti. L.J. In situ ultraviolet spectrophotometry
for high resolution and long-term monitoring of nitrate, bromide and
bisulfide in the ocean. Deep-Sea Research Part I, 49(7):12911305,
2002.
[51] Camacho. E.F. and Bordons. C. Model Predictive Control. Springer,
second edition, 2004.
[52] Fischer. H.B. Mixing in Inland and Coastal Waters. Academic Press,
second edition, 1979.
[53] Versteeg. H.K. and Malalasekera. W. An Introduction to Computa-
tional Fluid Dynamics: The Finite Volume Method. Longman Scientific
& Technical, 1995.
[54] Bolea. Y., Puig. V., and Blesa. J. Gain-scheduled Smith proportional-
integral derivative controllers for linear parameter varying first-order
plus time-varying delay systems. Control Theory & Applications, IET,
5(18):21422155, 2011.
[55] Tornil-Sin. S., Ocampo-Martinez. C., Puig. V., and Escobet. T. Ro-
bust fault detection of non-linear systems using set-membership state
estimation based on constraint satisfaction. Engineering Applications
of Artificial Intelligence, 25(1):110, 2012.
118 Bibliography
[56] Reddy. J.M., Dia. A., and Oussou. A. Design of control algorithm
for operation of irrigation canals. Journal of Irrigation and Drainage
Engineering, 118(6):852867, 1992.
[57] Durdu. O.F. Control of transient flow in irrigation canals using Lya-
punov fuzzy filter-based Gaussian regulator. International Journal for
Numerical Methods in Fluids, 50(4):491509, 2005.
[58] Thomann. R.V. and Mueller. J.A. Principles of Surface Water Quality
Modeling and Control. Harper & Row, Publishers, 1987.
[60] Ziegler. J.G. and Nichols. N.B. Optimum settings for automatic con-
trollers. Journal of Dynamic Systems, Measurement, and Control,
132(3):115220, 1993.
[62] Xu. M. and van Overloop. P.J. On the application of model reduction
in model predictive control of open channel flow. In 9th International
Conference on Hydroinformatics, pages 21692177, Sept. 2010.
[65] WL|Delft Hydraulic. Sobek User Guide and Technical Reference Man-
ual. 2004.
[67] A.J Clemmens, Kacerek. T.F., Grawitz. B., and Schuurmans. W. Test
cases for canal control algorithms. Journal of Irrigation and Drainage
Engineering, 124(1):2330, 1998.
[80] Razavi. S., Tolson. B.A., and Burn. D.H. Numerical assessment of
metamodelling strategies in computationally intensive optimization.
Environmental Modelling & Software, 34:6786, 2012.
[81] Castelletti. A., Galellib. S., Restellia. M., and Soncini-Sessaa. R. A
general framework for dynamic emulation modelling in environmental
problems. Environmental Modelling & Software, 34:518, 2012.
[82] Ratto. M. and Pagano. A. Using recursive algorithms for the efficient
identification of smoothing spline ANOVA models. Advances in Statis-
tical Analysis, 94:367388, 2010.
[83] Borgonovo. E., Castaings. W., and Tarantola. S. Model emulation and
moment-independent sensitivity analysis: An application to environ-
mental modelling. Environmental Modelling & Software, 34:105115,
2012.
[84] Pannocchia. G., Rawlings. J.B., and Wright. S.J. Partial enumeration
MPC: Robust stability results and application to an unstable CSTR.
Journal of Process Control, 21:14591466, 2011.
[85] Marruedo. D.L., Alamo. T., and Camacho. E.F. Input-to-state stable
MPC for constrained discrete-time nonlinear systems with bounded ad-
ditive uncertainties. In 41st IEEE Conference on Decision and Control,
pages 46194624, Las Vega, Nevada, USA, Dec. 2002.
[86] Pannocchia. G., Rawlings. J.B., and Wright. S.J. Conditions under
which suboptimal nonlinear MPC is inherently robust. System & Con-
trol Letters, 60:747755, 2011.
[87] Pannocchia. G., Rawlings. J.B., and Wright. S.J. Inherently robust
suboptimal nonlinear MPC: theory and application. In 50th IEEE
Conference on Decision and Control and European Control Conference
(CDC-ECC), pages 33983403, Orlando, FL, USA, Dec. 2011.
[88] Pannocchia. G., Rawlings. J.B., and Wright. S.J. Is suboptimal non-
linear MPC inherently robust? In 18th IFAC World Congress, pages
79817986, Milano, Italy, Aug.-Sept. 2011.
[89] Chow. V.T. Open-Channel Hydraulics. McGraw-Hill, Inc., New York,
1959.
[90] Lee. J.H., Lee. K.S., and Kim. W.C. Model-based iterative learning
control with a quadratic criterion for time-varying linear systems. Au-
tomatica, 35(5):641657, 2000.
Bibliography 121
[91] Falcone. P., Borrelli. F., Tseng. H.E., Asgari. J., and Hrovat. D. Lin-
ear time-varying model predictive control and its application to active
steering systems: Stability analysis and experimental validation. In-
ternational Journal of Robust and Nonlinear Control, 18(8):862875,
2008.
[94] Castelletti. A., Galellib. S., Restellia. M., and Soncini-Sessaa. R. Data-
driven dynamic emulation modelling for the optimal management of
environmental systems. Environmental Modelling & Software, 34:30
43, 2012.
[96] Willems. P., Blanco. T.B., Chiang. P.K., Cauwenberghs. K., Berla-
mont. J., and De Moor. B. Evaluation of river flood regulation by
means of model predictive control. In 4th International Symposium
on Flood Defence: Managing Flood Risk, Reliability and Vulnerability,
pages 80.180.8, May. 2008.
[97] Rodellar. J., Gomez. M., and Bonet. L. Control method for on-demand
operation of open channel flow. Journal of Irrigation and Drainage
Engineering, 119(2):225241, 1993.
[98] Negenborn. R.R., van Overloop. P.J., Keviczky. T., and De Schutter.
B. Distributed model predictive control of irrigation canals. Networks
and Heterogeneous Media, 4(2):359380, 2009.
[99] Barjas Blanco. T., Willems. P., Chiang. P.K., Haverbeke. N., Berla-
mont. J., and De Moor. B. Flood regulation using nonlinear model
predictive control. Control Engineering Practice, 18(10):11471157,
2010.
122 Bibliography
[100] Ding. Y. and Wang. S.S.Y. Optimal control of open-channel flow us-
ing adjoint sensitivity analysis. Journal of Hydraulic Engineeringl,
132(11):12151228, 2006.
[101] Schwanenberg. D., Verhoeven. G., and Raso. L. Nonlinear model pre-
dictive of water resources systems in operational flood forecasting. In
9th International Conference on Hydroinformatics, pages 20142021,
Tianjin, China, Sept. 2010.
[102] Schittkowski. K. NLPQL: A FORTRAN subroutine solving constrained
nonlinear programming problems. Annals of Operations Research,
5(1):485500, 1986.
[103] Gill. P.E., Murray. W., and Wright. M.H. Practical Optimization. Aca-
demic Press, 1981.
[104] Han. S.P. A globally convergent method for nonlinear programming.
Journal of Optimization Theory and Applications, 22(3):297309, 1977.
[105] Powell. M.J.D. The convergence of variable metric methods for nonlin-
early constrained optimization calculations. Nonlinear Programming,
pages 2763, 1978.
[106] Powell. M.J.D. A fast algorithm for nonlinearly constrained optimiza-
tion calculations. Numerical Analysis, pages 144157, 1978.
[107] Bonnans. J.F., Gilbert. J.C., Lemarechal. C., and Sagastizbal. C.A.
Numerical Optimization: Theoretical and Practical Aspects. Springer-
Verlag New York, 2006.
[108] Sun. W. and Yuan. Y. Optimization Theory and Methods: Nonlinear
Programming. Springer, 2006.
[109] Raso. L., van de Giesen. N., Stive. P., Schwanenberg. D., and van
Overloop. P.J. Tree structure generation from ensemble forecasts for
real time control. Hydrological Processes, 2012. doi:10.1002/hyp.9473.
[110] Pianosi. F. and Raso. L. Dynamic modelling of predictive uncer-
tainty by regression on absolute errors. Water Resources Research,
48(W03516), 2012.
Appendix A
Note: the subscript r represents that the variables are in reduced-order do-
main. When deleting the subscript r, they become the original variables in
the unreduced model.
The reduced-order time variant state-space model is described as follows:
When the model is written over the prediction horizon, the overall state-space
model formulation becomes, following van Overloop [14]:
xr (k) u(k) dr (k)
xr (k + 1) u(k + 1) dr (k + 1)
= Ar,n xr (k) + Bur,n + Bdr,n
.. .. ..
. . .
xr (k + n) u(k + n 1) dr (k + n 1)
yr (k) yr (k)
yr (k + 1) yr (k + 1)
= Cr,n
.. ..
. .
yr (k + n) yr (k + n)
(A.2)
123
124 Appendix A. Time-varying state-space model over prediction horizon
The prediction matrices of Ar,n , Bu,r,n , Bd,r,n and Cr,n are also time-varying
and given as:
I
Ar (k)
Ar,n =
Ar (k + 1)Ar (k)
..
.
Ar (k + n 1)Ar (k + n 2) Ar (k)
0 0 0
Bu,r (k) 0 0
Ar (k+1)Bu,r (k) Bu,r (k+1) 0
Bu,r,n =
.. .. ..
. . . 0
Ar (k+n1)Ar (k+1)Bu,r (k) Ar (k+n2)Ar (k+1)Bu,r (k+1) Bu,r (k+n1)
0 0 0
Bd,r (k) 0 0
Ar (k+1)Bd,r (k) Bd,r (k+1) 0
Bd,r,n =
.. .. ...
. . 0
Ar (k+n1)Ar (k+1)Bd,r (k) Ar (k+n2)Ar (k+1)Bd,r (k+1) Bd,r (k+n1)
Cr 0 0
0 Cr 0
Cr,n =
0 0 ...
0
0 0 Cr
Appendix B
The one dimensional water quantity and quality model is generally described
by the Saint-Venant equations and the transport equation:
A Q
+ = ql (B.1)
t x
Q Qv Q|Q|
+ + gA +g 2 =0 (B.2)
t x x Cz RA
Ac Qc c
+ = (KA ) + ql cl (B.3)
t x x x
According to Stelling and Duinmeijer [17] and Xu et al. [8], the equations for
both water quantity and quality can be spatially discretized with staggered
grids. A semi-implicit scheme is applied to the time integration for the Saint-
Venant equations, where the advection term in the momentum equation is
explicitly discretized by first-order upwinding. The friction term is linearized
by setting |Q| to explicit. The remaining terms use the implicit scheme. The
time integration for the transport model is fully implicit. The water quantity
and quality equations are solved through a tri-diagonal format:
125
126 Appendix B. Combined water quantity and quality state-space model formulation
ek+1
a1,1 a1,2 0 0 | 0 0 0 0
,i,1
k+1
a2,2 a2,2 a2,3 0 | 0 0 0 0 e ,i,2
..
... ...
.
0 0 | 0 0 0 0
k+1
0 0 al,l1 al,l | 0 0 0 0 e,i,l
+
0 0 0 0 | b1,1 b1,2 0 0 ek+1
c,i,1
k+1
0 0 0 0 | b2,1 b2,2 b2,3 0 e
c,i,2
... ... ..
|
0
0 0 0 0 0 .
0 0 0 0 | 0 0 bl,l1 bl,l k+1
ec,i,l
c1,1 0
ek,i,1 0 0 dk,i,1
ek .. .. dk,i,2
,i,2 . .
.. ..
.
0 0
.
ek,i,l 0 cl,1
k
d,i,l
Qk+1
c,1
= I2l,2l + + I2l,2l
Qk+1
d1,1 0
ekc,i,1 c,2 dkc,i,1
ek 0 0
dkc,i,2
c,i,2
.. .. .. ..
. . .
.
ek c,i,l
0 0 k
dc,i,l
0 dl,1
(B.4)
t k
ai,i1 = xW k Ai1 f ui1/2
t,i
t k
ai,i = 1 + k (Ai1 f ui1/2
xWt,i
+ Aki f ui+1/2 )
t k
ai,i+1 = xW k Ai f ui+1/2
t,i
k+1 k+1
t Ki1 Ai1/2
bi,i1 = xA k x
i
t Kik+1 Ak+1
i+1/2
bi,i+1 = xA k( x
)
i
t
ci,1 = k ,i
xWt,i
=1
t
ci,2 = k ,i
xWt,i
=l
127
di,1 = t
xAki
(ck+1
in cki ), i = 1
di,2 = t
xAki
(ck+1
l ckl ), i = l
t k k
d,i = k (Ai rui+1/2
xWt,i
+ ql,i ), i = 1
t k
d,i = k (Ai1 rui1/2
xWt,i
Aki rui+1/2 + ql,i
k
), i = 2, 3, . . . , l 1
t k k
d,i = k (Ai1 rui1/2
xWt,i
+ ql,i ), i = l
k+1 k+1
t Kin Ai
dc,i = k
xAi
[ x
(ck+1 k k k k+1 k k+1 k+1
in c ) + ql,i (cl,i ci ) + Qi+1/2 ci Qi+1/2 ci+1/2 ], i =1
dc,i = t
[q k (ck
xAki l,i l,i
cki ) Qk+1 k k+1 k+1
i1/2 ci + Qi1/2 ci1/2 ], i = l
(
ci (Qk+1
i+1/2 0)
where ci+1/2 =
ci+1 (Qk+1
i+1/2 < 0)
where c is the concentration target value, Kin and cin are the dispersion
coefficient and concentration of the incoming water. Note that cin uses the
outflow concentration of the upstream reach if the reach in concern is not
the first one. All the variables at time step k + 1 in the above matrices are
calculated through a Forward Estimation procedure.
gt
f ui+1/2 = k
|vi+1/2 |
x(1 + g Cz2 R
)
Qki+1 vi+1
k Qk v k Qki+1 Qki
Ak 1 ( x
i i k
+ vi+1/2 x
) k
+ vi+1/2
i+1/2
rui+1/2 = k
|vi+1/2 |
1+g Cz2 R
Qki+1/2 +Qki1/2 Aki+1 +Aki vi1/2 (Qki 0)
where: Qki = , Aki+1/2 = , vi =
2 2 vi+1/2 (Qki < 0)
128 Appendix B. Combined water quantity and quality state-space model formulation
Appendix C
In section 4.4, the reduced model is verified using the interpolated scenario
of lateral flows and it achieves good model accuracy. However, it is also
important to verify the model according scenario extrapolation. Table C.1
provides the verification scenario and Figures C.1, C.2 and C.3 show the
reduced model accuracy using the extrapolated scenario.
Figure C.1: Root mean square error of the reduced model on water quantity
and quality (extrapolated scenario)
129
130 Appendix C. Reduced model verification using extrapolated scenario of lateral flows
Table C.1: Lateral flow scenario for reduced model verification (step changes happen between 5 and 8 hours of the
simulation
Lateral 1 Lateral 2 Lateral 3
Reach Discharge Concentration Discharge Concentration Discharge Concentration
(m3 /s) (kg/m3 ) (m3 /s) (kg/m3 ) (m3 /s) (kg/m3 )
1 0.02 to 0.10 1.0 to 1.8 0.03 to 0.11 1.2 to 2.0 No third lateral
2 0.02 to 0.10 1.2 to 2.0 0.03 to 0.11 1.4 to 2.2 No third lateral
3 0.04 to 0.12 0.9 to 1.7 0.02 to 0.10 1.5 to 2.3 0.03 to 0.11 1.8 to 2.6
4 0.02 to 0.10 1.5 to 2.3 0.04 to 0.12 1.0 to 1.8 No third lateral
131
Figure C.2: Reduced water level states (I) and concentration states (III)
projected back to the original order, and the water level differences (II) and
concentration differences (IV) between the reduced model and the original
model
132 Appendix C. Reduced model verification using extrapolated scenario of lateral flows
Figure C.3: Reduced water quantity disturbances (I) and quality distur-
bances (III) projected back to the original order, and the water quantity
disturbance differences (II) and water quality disturbance differences (IV)
between the reduced model and the original model
Appendix D
Linearization of hydraulic
structures
It is noticed that in all the cases, we used pump flows to represent hydraulic
structures for simplicity. However, in many canals with gravity flows, weirs
and gates are often used, while pumps are only used to lift water out of the
system. Although weirs and gates are not used in this study, it is important
to mention the possibility of applying these hydraulic structures to our case
study.
In general, weirs and gates can both create free flow and submerged flow,
depending on the upstream and downstream water levels of the structure
and the structure settings. These flow conditions can be described by the
following equations [65] (assuming positive flow, namely upstream water level
is higher than downstream water level. For negative flow, the same approach
follows):
r
2 2 3
Free weir flow: Qk = Cg Wg g(hku hcr ) 2
3 3 (D.1)
3 3
when hku hg < dg k & hku hg > (hkd hkg )
2 2
q
Submerged weir flow: Qk = Ce Cg Wg (hkd hkg ) 2g(hku hkd )
3 3 (D.2)
when hku hg < dg k & hku hg (hkd hkg )
2 2
133
134 Appendix D. Linearization of hydraulic structures
q
Free gate flow: Qk = Cg Wg g (hkg hcr ) 2g(hku hcr + g (hkg hcr ))
3
when hku hg dg k & hkd hcr + dg k )
2
(D.3)
q
k
Submerged gate flow: Q = Cg Wg g (hkg hcr ) 2g(hku hkd )
3 (D.4)
when hku hg dg k & hkd > hcr + dg k )
2
k+1 k
gCg Wg g (hkg hcr )
Q =Q +q (hk+1
u hku )
k k
2g(hu (hcr + g (hg hcr )))
q
+ Cg Wg g ( 2g(hku (hcr + g (hkg hcr ))) (D.7)
Ce Cg Wg (hkd hkg )
q )(hk+1
g hkg )
k 2 k
2g(hu (hcr + g (hg hcr )))
137
138 List of symbols
Finalizing PhD work is not an easy task. It needs complete support from
both academic side and the family side. I am sincerely appreciated for all
the help I had during my PhD progress.
I thank Dr. Peter-Jules van Overloop. It sounds weird to call such a good
friend like this. Although it needs to be formal, Id rather use PJ here. I
am very appreciated for all the careful supervisions you gave. I enjoyed the
moments discussing scientific research with you. You inspired me by some
of your crazy ideas and the way working towards them, although I am not
completely agree with you sometimes. Meanwhile, you are also an excellent
friend for sharing life experience. Thank you for bringing me to different
Dutch occasions, getting to know your families and friends, and introducing
the real Dutch life. I still remember the night with your band playing at a
bar in your hometown Bergen op Zoom till 3am. It was great fun.
I thank Prof. Nick van de Giesen for giving me the opportunity to continue
the PhD study. Thank you for giving me your concrete support and the
complete freedom to develop myself not only in the research but also for
social activities. Your trust pushes me to work towards the target. I am
even more appreciated for allowing me to work at Deltares without finalizing
my PhD dissertation.
I thank the committee for spending their valuable time on reading my dis-
sertation and giving comments for the improvements.
I thank Dr. Rudy Negenborn. It was a great pleasure to work with you on
an article. Your attitude and the way of thinking and performing in scientific
research gave me a deep impression. Looking forward to cooperating with
you again in the future.
Of course, I wont forget Betty Rothfusz, the kind and beautiful secretary
who helped to arrange everything during my PhD study. I thank all the
colleagues at TUDelft. It was great fun to work and play together with
143
144 Acknowledgements
you.
I thank Deltares, the company where I am working. Thank you for admitting
my expertise before I get my PhD degree and give me space to finalize my
PhD work.
Family is always important. Only with the full family support, I can finalize
the PhD research. Thank you my dear wife Bai Yuqian. As you said that
marrying with you is my most wise decision ever in my life, I agree with
you! Your love and encouragement give me the best support. Thank you
for your understanding and allowing me to work even in the weekend. More
important, thank you for giving me the best gift in my life: our son, Xu
Jiayue. Hey, little man. You are my hero. Your smile, naive, naughty and
cry drag all my tiredness away and keep me fresh. Love you forever!
I thank my father. Only when I became the father of Jiayue, I fully realized
the responsibility of being a father. Thank you for your understanding and
support.
To my mom in the heaven. Its a pity that you cant be with us to enjoy such
a moment that you were looking forward to. But I can feel your existence
and you are always with us. Somehow, I can feel you are smiling in the sky
looking at me. Please bless us!
About Author
Min Xu was born on October 29, 1981 in Suzhou China. He came to the
Netherlands in 2005 after his Bachelor at Hohai University. He studied water
management in Delft University of Technology majoring in operational water
management. During his master, he was a student assistant for half year. He
conducted an internship at Friesland water board for rainfall-runoff modeling
and damage calculation. His graduation project was together with USDA.
He spent 3 months in Arizona to model an irrigation canal and build up the
control system to balance the water mismatches in the canal. The master
project was completed in 2007.
In November 2007, Min Xu started his PhD research at Delft University of
Technology. The PhD research was an extension of his study interest in oper-
ational water management, specifically with model predictive control (MPC).
His PhD mainly focused on the application of real-time control to the com-
bined surface water quantity and quality control. Moreover, computational
accuracy and efficiency was another interest of his study. He developed a
control procedure for MPC with the reduced model to balance the control
effectiveness and computational time. Besides his PhD research topic, Min
Xu is also interested in other water management fields, such as numerical
modeling, flood protection, river or canal network control, sewer system con-
trol.
Before finishing his PhD, Min Xu received a job position at Deltares in
the unit of Inland Water System. He became an adviser and researcher
in the department of operational water management. His main focus is on
flood forecasting and real-time control. Moreover, this position also provides
a great platform to expand the knowledge of water management in other
fields.
145
146 About Author
Publications
Journal papers
1. Xu. M., van Overloop. P.J. and van de Giesen. N.C. Model reduction
on model predictive control of combined water quantity and quality.
Environmental Modelling & Software. 2012. (Accepted)
2. Xu. M., Negenborn. R.R., van Overloop. P.J. and van de Giesen.
N.C. De Saint-Venant equations-based model predictive control of open
channel flow. Advances in Water Resources. Volume 49:37-45, 2012.
3. Xu. M., van Overloop. P.J. and van de Giesen. N.C. On the study
of control effectiveness and computation efficiency of reduced Saint-
Venant model in model predictive control of open channel flow. Ad-
vances in Water Resources. Volume 34(2):282-290, 2010.
4. Xu. M., van Overloop. P.J., van de Giesen, N.C. and Stelling. G.S.
Real-time control of combined surface water quantity and quality: polder
flushing. Water Science and Technology. 61(4):869-878, 2010.
Conference papers
147
148 Publications
Abstract
1. Xu. M. and van Overloop. P.J. Model predictive control on irriga-
tion canals, application on the Central Main Canal in Arizona. EGU
Geophysical Research Abstracts. Vol. 10:EGU2008-A-00000, 2008.