You are on page 1of 15

Hierarchical Model Predictive Control of Integrated Quality and Quantity

in Drinking Water Distribution Systems

K. Duzinkiewicz  Mietek A. Brdys1,*,** Tao Chang*

*School of Electronic, Electrical and Computer Engineering, The University of Birmingham


Birmingham B15 2TT, UK.

** Department of Control Engineering, Faculty of Electrical Engineering and Automatic Control, Technical
University of Gdansk, ul. G.Narutowicza 11/12, 80-952 Gdansk, Poland.

Abstract
An integrated approach to control of quantity and quality in water supply and distribution systems is proposed.
The integrated control consists in optimising the operational cost, meeting a demand on water of desired quality
and maintaining the system constraints. This constrained optimising control problem is complex due to
nonlinearities, large dimension, output constraints, mixed-integer structure of the variables involved, at least two
time scales in the system dynamics and an uncertainty. A sub-optimal two-level hierarchical control structure is
proposed that allows incorporating the desired controller functions and yet making the synthesis of these
functions possible. The algorithms for implementing the functionalities are proposed and discussed. Detail
design of the lower level controller is presented and investigated. The controller performance is validated by
simulation.

Keywords: chlorine residuals, water quality control, transport delay, uncertain dynamic systems, predictive
control, bounding method, constraints

1. Introduction a number of disease-causing organisms. As the


chlorine reactions with certain organic compounds
There are two major aspects in control of drinking produce disinfectant by-products that are health
water distribution systems (DWDS): quantity and dangerous the acceptable chlorine residuals are
quality. The quantity control deals with flows and bounded above. Hence, the objective of
pressures producing pump and valve schedules. maintaining desired water quality is expressed by
Maintaining concentrations of water quality certain limits (lower and upper) on the chlorine
parameters within prescribed limits is a major residuals at the consumption points. The chlorine
objective of the quality control. In the paper, only residuals are directly controlled within the
one quality parameter is considered that is chlorine. treatment plants so that the water entering the
It is the most common disinfectant used in the DWDS has prescribed residual values and also by
DWDS. It is not expensive and effectively controls post chlorination (booster chlorination) carried out
at certain points of the system. The residuals at the
1 Corresponding Author. School of Electronic, nodes representing outputs from the treatment plant
Electrical and Computer Engineering, The and booster station are the direct control variables
University of Birmingham, Birmingham B15 2TT, for the quality control. It should be pointed out that
UK. Phone: +44(0)121 4144354. Fax: +44(0)121 chlorination is not used at all in some countries
4144291. Email:m.brdys@bham.ac.uk. (e.g., Holland). Electricity charges due to pumping

1
constitute main component of the operational cost robustness is needed to reject the prediction error
to be minimised. Various algorithms for the and its design is presented.
quantity control were proposed e.g., (Coulbeck,
Brdys, Orr & Rance, 1988ab; Brion & Mays, 1991;
Lansey & Zhong, 1990; Ormsbee & Lansey, 1994; 2. Hierarchical Control Structure
Brdys & Ulanicki, 1994; Nitivattananon, Sadowski
& Quimpo, 1996). In order to compensate the The basic control structure is illustrated in Fig.1. It
uncertainty impact a feedback was introduced in consists of two levels. The optimising controller at
Brdys & Ulanicki (1994) by applying a model the upper level operates according to a receding
predictive technology in its receding horizon form. horizon strategy. At the beginning of a 24 hours
It is well known that the hydraulics has an essential time period the DWDS quantity and quality state is
impact on the quality (Rossman, Clark & Grayman, measured and/or estimated and sent to the
1994). Recent work presented in (Ostfelt & Shamir, integrated quantity and quality optimiser. The
1993ab; Brdys, Puta, Arnold, Chen & Hopfgarten, consumer demand prediction is also sent to the
1995; Sakarya & Mays, 2000) developed proposals optimiser. Solving the integrated quantity-quality
for combining the quantity and quality issues into optimisation problem then produces the optimised
one integrated control scheme in order to cater for chlorine injection schedules at the booster and
the quantity – quality interaction. Again, the treatment work output nodes and the optimised
receding horizon control technology was proposed pump and valve schedules over next 24 hours. The
(Brdys, Puta, Arnold, Chen, & Hopfgarten,1995) in pump and valve schedules are applied to the
order to introduce real measurement data into the DWDS and maintained during so called control
integrated optimisation problems solved on-line. time horizon e.g., 2 hours (hence only 2 hours
The optimisation problems are very complex and length of the control trajectories are used). The
their solvers both implicit and explicit (Brdys, Puta, above sequence repeats at the end of the control
Arnold, Chen, & Hopfgarten, 1995; Sakarya & time horizon. Clearly, the quality constraints are
Mays, 2000) have advantages and disadvantages. satisfied for the DWDS model. Due to the model-
Although the hybrid solver (Brdys, Arnold, Puta| & reality differences they might be violated in reality.
Chen, 1999cd) turns out to be much more efficient The on-line measurements of the chlorine
the quality step needs to be quite small in order to concentrations at the monitored nodes are sent to
obtain solutions maintaining the quality constraints. the quality feedback controller at the lower level
Hence, the problem dimension largely increases and are compared against the prescribed bounds on
even for small size systems. On the other hand, due allowed chlorine concentrations. The DWDS
to the uncertainty in demands, system model hydraulic predictions are taken directly from the
parameters and measurement errors, the chlorine solution of the optimisation problem obtained at the
residual constraints may be violated, regardless of upper level. With this information and using the
how small the quality step is. This is because a quality model the chlorine prediction at the
control technology (including the predictive one) monitored nodes is possible and suitable
that can guarantee meeting the output constraint instantaneous chlorine injection values at the
under large uncertainty in the model does not exist. controlled nodes can be produced. In order to avoid
The uncertainty can be significant in our case as the large movements of the injection values the
optimising control problem needs to be considered optimised injection schedules obtained at the upper
over a horizon of typically 24 hours and the level are used to initialise the quality feedback
demand prediction over such period may be very controller. Hence, the controller produces only
inaccurate. It is proposed in this paper to introduce corrections to the optimised injection schedules
another lower control level with high frequency of that might be needed to make the schedules
sampling that generates corrections of the chlorine feasible. The corrections are performed on-line and
residuals at the controlled nodes based on the the sampling rate is selected accordingly so no
measurements of the chlorine residuals at the serious constraint violation can occur during long
monitored nodes so that the quality constraints can time interval. The feasibility is achieved at the cost
be met. Due to the very practical reasons, a of certain loss on ‘optimality’. In practise this loss
decentralised architecture of this controller is is expected to be small. The corrected injection
wanted. It is a common situation that a particular schedules are applied to the DWDS. The controller
booster station can influence several consumption is named quality feedback controller in order to
points. Hence, the interactions in the plant point out its fast operating rate. Clearly, a feedback
controlled by the lower level controller are strong is applied in the upper level controller as well but it
and vast majority of decentralised regulatory is of much slower rate. With the lower level control
control algorithms is not applicable. However, the quality time step used at the upper level can be
reasonably good interaction predictions can be larger. Hence an efficiency of the integrated quality
obtained from the solution of the upper level and quantity optimiser can be vastly improved yet
optimisation problem. The local controller maintaining good sub-optimality of the generated

2
schedules. If the chlorine concentration reference structure offers reasonable compromise between a
trajectories at the monitored nodes are prescribed loss on optimality and possibility of solving this
then the feedback quality controller performs a very difficult control problem by applying existing
standard trajectory tracking function. It becomes a control technology. We shall not further discuss the
keeping within constraints controller if the chlorine optimisation solvers needed to implement the upper
concentration is to be kept within the prescribed level controller as they can be found in the
limits only. The latter controllers are still under previously referenced literature. We shall
development by control community. The design of concentrate on the lower level quality feedback
a robust model predictive control type controller is controller design.
to be presented in section 4. The proposed control

Optimising Controller
- Upper Level
Optimised flow
Consumer demand schedules
prediction over 24 hours

Electricity
tariff
Optimised
Integrated quality and chlorine injection
quantity optimiser schedules

Operating schedules for


next 24 hours Hydraulic
Optimised Optimised Information
pump valve
schedules schedules
Chlorine
Chlorine Corrections
reference Quality Feedback
Controller 
Quantity, quality bounds
feedback
Lower-level controller
Chlorine at Chlorine
monitored nodes injection

Drinking Water Distribution System (DWDS)

Fig.1 Hierarchical two-level structure for optimising integrated quality-quantity control

3
3. Issues of Lower Level Controller Design optimised flow schedules calculated by the upper
level controller differ from the real flows due to
3.1 Model and Control Objective inevitable error in the demand prediction that is
used at the upper level. Due to the pump switching
In this paper, the selection of monitored nodes and the flows may change rapidly. In summary, the
injection nodes is taken as a priori knowledge dynamics to be handled by the quality feedback
about the DWDS. Generally, the selection of the controller is described by linear equations but with
monitored nodes is based on the system time varying delays and parameters and abrupt
observability. The monitored nodes should be the changes of both are expected. Thus, even if the
best one among the water nodes that can present delays and parameters are known precisely (the
the quality status of the DWDS and at the same demand prediction is accurate) the controller
time the measurement instrument costs and design is difficult. The time varying delays d p (t ) in
maintenances costs are considered. This topic was the Eq.1 can be eliminated if their range upper and
addressed in (Lee & Deininger, 1992; Hartmant,
lower bounds i u and il , respectively are known.
Nace, Kiene & Fotoohi, 1999; Propato, Uber &
Polycarpou, 2002). The selection of the injection First, the delay range is discretised and a
nodes is generally based on the system continuously varying delay is replaced by finite
controllability. Otherwise the control objective number of the delay values (Makoudi & Radouane,
cannot be achieved. The costs of implementation 1999). When time goes the delay values from the
should be taken into account as well. This topic finite set are activated in order to give the best
was addressed in (Subramaniam, Tryby & Uber, approximation of current delay values. The
2000; Nace, Hartmant & Villon, 2001; Propato, selection requires introducing artificial selection
Uber & Polycarpou, 2002). time varying parameters that are 0-1 valued. As a
range of approximating delay values is finite the
We shall base the quality feedback controller selection parameter changes are abrupt (Brdys,
design on the input-output dynamics between a Chang & Duzinkiewicz, 2000). The tanks in the
chlorine injection node (input) and a monitored DWDS are considered and tackled at this stage as
sensor (output). A lower level controller is assumed in (Polycarpou, Uber & Desai, 1999; Polycarpou,
at the injection nodes such that a desired chlorine Uber, Wang, Shang & Brdys, 2001; Brdys &
concentration at the nodes can be instantaneously Chang 2002b). Now the Eq.1 can then be written
achieved. This simplification of a real situation as:
where a transient associated with the set point q i = iu
changes always exists is reasonable. Let us denote y (t ) =  bi (t ) y (t − i) +  a i* (t )u (t − i) +  (t ) (2)
i =1 i = il
by u(t) a vector of the control inputs and by y(t) a
vector of the controlled outputs. The input-output
(IO) model without tanks in the network was where t  [t o , t o + Tm ] , t 0 is the initial time and
developed in (Zierolf, Polycarpou & Uber, 1998). Tm is the modelling horizon, bi (t )  R are the
For sake of simplicity of notation we shall consider
a one input-one output case. In this case, the input– parameters related to hydraulic dynamics of the
output dynamics can be written as: tanks and  (t )  R is the composite error of the
modelling and disturbance input prediction. Now,
y (t ) =  a p (t )u (t − d p (t )) (1) the abrupt changes of the parameters a i* (t ) are
pP ( t )
expected even if the parameters a i* (t ) change
where P(t ) is the set of all path from the input node slowly. The latter may happen if the initially abrupt
to the output node; a p (t ) is a decay variable that changes of flows are then dumped during travelling
through the DWDS to reach the monitored node. It
depends, among other, on the hydraulic dynamics is proposed in (Polycarpou, Uber & Desai, 1999) to
and the bulk and wall chlorine reaction rates; use the model structure described by the Eq.2 for
d p (t ) is the transport delay associated with path p the purposes of designing the controller based on
and it also depends on the hydraulic dynamics. an indirect adaptive control technology with a
recursive least squares algorithm estimating on-line
values of the unknown parameters bi (t ) and a i* (t ) .
The sampling time in the above model is 1 unit and Due to the abrupt changes of the parameter values
this assumption does not lead to a loss on the estimation is truly difficult and good tracking
generality. Notice, that there are time varying performance of the adaptive controller may not be
delays in this model due to the quantity dynamics. achievable.
The parameters are also time varying because of
the same reason. Moreover, the delay and However, the existence of the tanks in DWDS
parameter values are not exactly known as the make the model of chlorine transportation more

4
complicated because of the long residence times in parameter and modelling error trajectories are not
these tanks. An analysis shows that if the known exactly. A set bounded model of the
monitored node is connected directly to the tank by uncertainty (Milanese, Norton, Piet-Lahanier &
a long pipe or the flow at the monitored node is Walter, 1996; Brdys, 1999ab) is applied in the
mainly from the tank, then according to this model, paper. The trajectories of bi (t ) , a i (t ) and  () can
the controllability of the chlorine concentration at be bounded above and below over the time interval
the monitored node will be very weak. The
[t 0 , t 0 + Tm ] by the bounded envelopes bil (t ) ,
situation becomes even worse during the period of
flow direction changes when the tanks are biu (t ) , ail (t ) , aiu (t ) ,  l (t ) ,  u (t ) respectively. It
switching from a filling cycle to a draining cycle.
is assumed that the envelopes are known at the
The injection node has to be selected deliberately
initial time so that the following hold over the
to strengthen the controllability, or the tank
modelling horizon Tm:
chlorine concentration should be included in the
model for long-term injection management.
Alternatively, the structure of delays in the second bil (t )  bi (t )  biu (t )
part of the input-output model (2) needs to be a il (t )  a i (t )  a iu (t )
modified by introducing more delays in order to
obtain viable representation of reality. This in turn  l (t )   (t )   u (t )
may lead to a model that is not suitable for control
purposes (Brdys & Chang, 2002a). As it is not For the piecewise constant model (3) constant
difficult to measure chlorine concentrations at envelopes bounding the parameters and error can
tanks, employing the state space model rather than be defined as:
the input output one is more appropriate in the case
described above. Measuring the chlorine bi j
min
 bi j  b i j
max
(4)
concentration in the tanks and thus formulating a
j min j max
state-space model for control purposes is ai  ai j  ai
considered in paper (Brdys & Chang, 2001a). The j min j max
format of the model does not change the    j (t )  
formulation of the proposed controller. Thus, for
simplicity reason in the following formulation only where min bil (t ) = bi j
min
, bi j
max
= max biu (t )
the IO type model is applied. The state-space tS j tS j

model will be tested and the control performance j min j max


min ail (t ) = ai , ai = max aiu (t )
will be compared with the controller based on IO tS j tS j
type model in the simulation section.
 lj + min  l (t ) =  j min
, j max
=  uj + max  u (t )
tS j tS j

Let the parameters can abruptly change their values


at time instants t j  t0 , t0 + Tm  , j = 1,2,  N p and The quantities  lj and  uj compensate impact of

t N = t0 + Tm . Within the time interval [t j −1 , t j ] the slow parameter variations over the time slots on the
p
modelling error lower and upper bounds,
changes are assumed slow and also, only certain respectively. Clearly, they are equal to zero of the
parameters are active, that is their values are parameters are constant over the time slots.
nonzero. The whole model horizon Tm can be
partitioned into N p time slots, defined as: The equations of (4) and (5) define the parameter-
bounded piecewise constant model, which will be
used for the controller design:
S j =t  Z : t j −1  t  t j , j = 1,2,  , N p

q i =iu
y (t ) =  bi j y (t − i ) +  ai j u (t − i ) +  j (t ) (5)
i =1 i =il
Within the time slots, the model parameters are
treated as constant. Now the parameter piecewise for t  S j .
constant model reads:
The controller aims at keeping the plant output
q i = iu
y (t ) =  bi (t ) y (t − i) +  a i (t )u (t − i) +  (t ) (3)
j j j y p () within the output constraints described by
i =1 i = il the lower-upper limits:

where bi j (t ) = bi j , a i j (t ) = a i j , for t  S j . Only y min (t )  y p (t )  y max (t ) (6)


certain parameters are active that is they are
nonzero over certain time slots. The system

5
over the control horizon t  t 0 , t 0 + Tc  . There are controlled outputs if the paths exist from these
constraints on the control input to be satisfied: inputs to various outputs. It is important from the
control design viewpoint that in the input-output
model only the inputs interact. Vast majority of the
u min (t )  u (t )  u max (t )
(7) control literature on decentralised regulatory
| u (t ) − u (t − 1) | u max control considers situations where the interactions
are weak. This is not so however, in our case. In
As the control problem is under constraints and the order to achieve complete decomposition of the
inputs are delayed the Model Predictive Control controller into a number of independent controllers
(MPC) will be applied to design the controller. that utilise only local information it is proposed to
Hence, it is assumed that Tc  Tm . The detailed use the injection quality schedules produced at the
design is presented in section 4. upper level as the real interaction estimates. Then
the error may be considered small enough to
3.2 Decentralisation classify the interactions as weak. The error can is
rejected due to robustness of the local controller.
Decentralisation of the quality feedback controller The overall structure of the local in space quality
is wanted due to obvious practical reasons feedback controller with a predictive control
(Findeisen, Bailey, Brdys, Malinowski, Tatjewski mechanism is illustrated in Fig 2.
& Wozniak, 1980). However, the input-output
dynamics shows on possibly strong interactions.
One control input may influence a number of

Quality and Quantity Information from


Upper Level

Upper Level
Chlorine Lower Level
Flow injection
schedules schedules
Time Interaction
Partitioning Prediction
To other local
controllers
Chlorine Chlorine
injection feedback
Chlorine
reference
DWDS
bound or
trajectory Robust Model Predictive
Control

Local Quality Controller

Injection node Monitored node

Fig.2 Structure of the decentralised feedback quality controller

6
4. Quality Feedback Controller Design plant. The optimality robustness can be improved
by formulating the optimisation problem as the
In this section a method for design of centralised min-max one. This however is not further pursued
lower level controller is proposed. Due to delays in the paper as solving constrained minmax
and constraints a model predictive control (MPC) problem would greatly increase the computational
technology is used. The existing MPC is extended burden even for linear-quadratic problem at hand.
in order to handle the output constraints under The feasibility problem however, needs to be
uncertain input-output model. addressed. Minimisation of the performance index
given by (8) over the constraints described by (6)
4.1 MPC Based on Nominal Model and Modified and (7) where the nominal model is used to replace
Constraints unknown plant mapping y p () yields the solution
that may not be feasible when applied to the plant.
The nominal model of the chlorine transportation In order to guarantee feasibility of the nominal
N() is defined by the nominal scenario of model based control generated by the MPC the
uncertainty in (4)-(5). Let us take the centre of the output constraints are modified by introducing so-
envelopes as the nominal parameter value for called safety zones. The modified output
t  S j , denoted as b̂i j , â ij and ˆ j . It is assumed constraints define a narrower set for the control
actions and this is the price to be paid for model-
without any loss of generality that ˆ j = 0 . The
reality differences. The safety zones can be viewed
optimisation problem to be solved by MPC at time as the feasibility margins that accommodate the
instant t can be formulated as: uncertainty. It will be technically preceded as
follows.
J (Uˆ ) = Uˆ T QUˆ + [ y (t + H p | t ) − y r ] 2 (8)
The output constraints over the prediction horizon

Yˆ = y (t + 1 | t )  y (t + H p | t ) 
T
described by the upper and lower limits are:
Uˆ = u (t | t )  u (t + H − 1 | t )
T

q
m
i = iu 
Y min = y min (t + 1)  y min (t + H p ) T

y (t + k | t ) =  bˆi y (t + k − i) +  aˆ i u (t + k − i)
= y )
j j
(t + 1)  y max (t + H p
T
i =1 i = il Y max max

where t + k  S j , for k = 1 H p , H m is the The limits are modified by the safety zones  l and
control sequence dimension, H p is the prediction  u as:
horizon, H m  H p , and Q is positive-definite
Ysmin = Y min +  l Ysmax = Y max −  u (9)
matrix. The first part of the index is to minimise the
total control energy and at the same time attempts
to avoid abrupt control value change. For the water  l = [ 1l   Hl ]T p
 u = [ 1u   Hu ]T p

quality control by chlorine injection, this part is to [ l  u ]  (10)


minimise the total chlorine dose applied. The 
 ={[  u ] :  il  0,  iu  0, for i = 1 H p and
l
terminal output of the finite predictive horizon is
penalised by the second part of the index, which
y min (t + i) +  il  y max (t + i) −  iu }
tends to keep the terminal output close to the
reference value y r by applying a tuning knob  .
The modified model based constraints read:
When apply the nominal model at k=1 all the past
outputs and inputs required are taken from the
measurements. When k increases the unavailable Ysmin  Yˆ  Ysmax (11)
measurements are replaced by the model responses.
The delays imply that at least i l  H m . However, The condition (10) is needed in order to make sure
that the modified constraints define nonempty set.
preferably i u  H m . Hence, sufficiently tight
The input constraints are treated as hard constraints
uncertainty bounds over delay range are needed for in the optimisation problem formulation. The
achieving the control objectives. Availability of actuator error  e will also be considered in
such bounds might be a challenging problem if the
delay range is large. implementing a control command. Hence, the input
constraints are modified in order to cater for the
Notice that the deterministic nominal model allows actuator error as:
to quickly generating control sequence that is
optimal for the selected scenario of the uncertainty. U min  Uˆ  U max (12)
However, it is suboptimal, if feasible, for the real − U max  Uˆ  U max

7
U min = u min (t ) +  e  u min (t + H m − 1) +  e  | u c (t ) − u (t ) |  e
T

U max = u max (t ) −  e  u max (t + H m − 1) −  e 


T

 
T
where y m (t ) is the plant output measurement,
U max
= u max
(t ) − 2 e  u max
(t + H m − 1) − 2 e
y p (t ) is the plant output, u c (t ) is the controller
where u c is the controller output and u is the output or the actuator input and  m and  e are the
actuator output or plant input. Finally, the MPC error bounds.
optimisation task at t reads:
The plant output prediction at t over [t + 1, t + H p ]
arg min ( J (Uˆ )) is performed based on a priori information
Uˆ ( l ,  u ) = Uˆ
contained in the past inputs and output
subject to Uˆ   s (13) measurements, future inputs, input-output model
 N (•)
 equations and uncertainty bounds. This a priori
 s =Uˆ  R H : m
c s (Uˆ , Yˆ )  0, Yˆ = Uˆ → Yˆ  information has been described in a form of
 
equalities and inequalities constraining outputs
over [t + 1, t + H p ] . Any output trajectory
where c s () is the mapping describing the modified
satisfying these constraints can be the plant
input and output constraints (12) and (11). After
response. The robust output prediction provides the
the optimisation problem has been solved, only the
intervals:
first value of Û is to be applied as the current
controller output at time instant t : Ypl = [ y lp (t + 1 | t )  y lp (t + H p | t )]T

u c (t ) = u (t | t ) Ypu = [ y up (t + 1 | t )  y up (t + H p | t )]T

At the next time instant t + 1 , the predictive over [t + 1, t + H p ] bounding the plant output
horizon moves forward and the minimisation values over [t + 1, t + H p ] . Hence,
process of solving Û is repeated. Current plant
output measurements are used as the initial y lp (t + k | t )  y p (t + k )  y up (t + k | t )
conditions to initialise plant model for the output
prediction purposes. for k = 1,  , H p

If Uˆ ( l ,  u ) is feasible for the plant then u (t | t ) Based on the set-bounded model of (4)-(5), the
is applied. The feasibility is assessed by performing constraints bounding the plant output at t + k can
at t a robust prediction of the plant response to be summarised as:
Uˆ ( l ,  u ) . If the feasibility of the proposed
m = 1,  , k
control can not be guaranteed then the safety zones j min
 l ,  u are redesigned and new control actions are  
q i =iu
generated as before. This repeats till suitable safety y p (t + m) −  bi j y p (t + m − i ) +  a i j u(t + m − i )
zones are determined. i =1 i =il

j max
4.2 Control Feasibility Assessment 
| y m (t + k − m) − y p (t + k − m) |  m , for k − m  0,
Set bounded model of uncertainty that is used in | u (t + k − m) − u (t + k − m) |  e
c

this paper enables us to calculate upper and lower


envelopes bounding real plant response to a
where t + m  S j .
specific input. Comparing these envelopes against
the bounds defining the plant output constraints
allows assessing the input feasibility. An algorithm Let P k denote the set of all y p (t + k ) satisfying
for the envelope calculation shall now be the above constraints. Hence, the k − th step robust
presented. output prediction at time instant t can be defined as:
The errors in the plant output measurements and in
executions of the control inputs (actuator error) are 
y lp (t + k | t ) = min y p (t + k )  (14)
bounded as: subject to y p (t + k )  P k

| y m (t ) − y p (t ) |  m

y up (t + k | t ) = max y p (t + k )  (15)

8
subject to y p (t + k )  P k The algorithm for iterative calculation of the safety
zone will be described in the next section. The
overall robust MPC controller is of iterative type
If the predicted plant output satisfy:
and it operates as follows:
Ypl  Y min and Ypu  Y max (16)
(i) Let [ l  u ] = 0 , solve Û using (13);
(ii) Calculate Y pl , Y pu using (14),(15) respectively;
then clearly, the assessed control sequences Û is
guaranteed to be feasible. In other words it is If (16) is satisfied go to (iv)
robustly feasible. Else go to (iii)
(iii) Redesign [ l  u ] , and calculate Û based on
4.3 Operation of Robust MPC Controller: this safety-zone design, then go to (ii)
Structure (iv) Let u c (t ) = u (t | t )
A structure of the controller is illustrated in Fig. 3.
In general, determining suitable safety zones
requires a number of iterations to be performed.

Predicted output Predicted output


envelopes envelopes
Safety Zone Robust output prediction Constraint
Generator Violation Checking

Safety
Zones Proposed chlorine Chlorine
Chlorine at
monitored node injection injection to be
blended
MPC Optimiser Control
Acceptance

Fig.3 Structure of the Robust Model Predictive Controller

4.4 Operation of Robust MPC Controller: calculate suitable safety zones a relaxation gain
Algorithm algorithm is applied in (Brdys & Chang, 2001a and
2001b). The algorithm is formulated as follows.
In the previous section a structure of robust MPC The constraint violations extend over the MPC
controller has been proposed. An implementation prediction horizon are defined as:
of this structure needs dedicated algorithms for
solving variety of problems. Firstly, calculating C ( l ,  u ) = [max (V1 ,0)  max(V2 H p ,0)]T
Uˆ ( l ,  u ) requires solving constrained linear
where
quadratic optimisation problem. A number of
efficient solvers exist to perform this task.
Secondly, performing the robust plant output

V = [V1 V2 H p ]T = (Y min − Y pl ) T (Y pu − Y max ) T 
T

prediction requires solving the nonlinear and non-


convex optimisation problems (14) and (15). An The relaxation gain algorithm is described as:
approximated solving approach is proposed by
piece-wise linearisation, with the linearisation error (i) Set x = [ l u] = 0 ;
included in the modelling error. The final problem
to be solved is a linear mixed-integer programming
(ii) Solve Û using (13), if C ( x) = 0 is satisfied
(MIP) problem (Brdys, 1999a), and it can be solved
by using a standard solver. Thirdly, in order to then go to (iv);

9
(iii)Using 5.1 Controller based on IO type Model

x ( k +1) = x ( k ) − C ( x ( k ) ) (17) As for IO type model, two booster stations are


installed at the nodes 5 and 10. The node 10 mainly
controls node 8 and the node 5 mainly controls
find new safety - zone [ l  u ] and go to (ii); node 16. There are interactions between the two
control loops. Hence it is a 2-input 2-output
(iv) Set u c (t ) = u (t | t ) . system. For the DWDS in Fig.4 a time-varying IO
type model with constant delays is obtained and
where v is the relaxation gain. extended to a MIMO form:

2 2 i = 24
The algorithm (17) used to update the safety zones yn (t ) =  bni (t ) yn (t − i) +   am, n,i (t )um (t − i) +  n (t )
is called relaxation gain algorithm. A possible i =1 n =1 i = 6
choice of the relaxation gain  was proposed in
(Brdys & Chang, 2002a) together with the where n = 1,2 , am.n.i describes an impact of the
convergence analysis.
injection input m that is delayed by i steps on the
output n. Notice that the time-varying delays
described in model (1) are replaced by 19 constant
5. Simulation Results
delays from range of 6-24, yielding 76 parameters.
As described in section 3 the whole control horizon
A benchmark drinking water distribution system
is partitioned into eight time slots generating a
was investigated. The network structure is
piece-wise constant parameter model, and only
illustrated in Fig. 4. There are 16 nodes, 27 pipes
certain parameters are active within certain time
and 3 tanks in the system. The water is pumped
slots. Fig.5 shows the envelopes bounding the
from the source (node 100 and node 200) and is
parameters a1,1, 7 over a whole horizon of 288 steps.
also supplied by the tanks (node 17,18,19). Node
16 and node 8 are selected as monitored nodes as Notice that the parameters are active, that is they
they are the most remote nodes from the source. are nonzero, only over certain time periods. The
The chlorine concentrations at these nodes are the centre values of these parameter envelopes are
two plant outputs y1 and y 2 . In order to maintain taken as the parameter values in the nominal
model. With these parameter estimation results, the
the chlorine concentration at the monitored nodes, modelling error was 4% of the plant output
two corresponding injection nodes should be
value:
selected. The chlorine concentrations at the
injection nodes are the inputs u1 and u 2 , which are
|  n (t ) | 0.04  y n (t ), n = 1,2
selected deliberately according to the type of the
model applied because of the reason described in
The measurement error and actuator error were
section 3. The chlorine concentrations at the
2.5% of the measurement value and controller
monitored nodes should be maintained within
output value respectively, and the corresponding
0.20[mg/l]-0.30[mg/l] limits. Hence,
error bounds of  m ,  e were obtained. The MPC
y max = 0.30[mg / l ] and y min = 0.20[mg / l ] . In the
described in section 4 was designed using
following presentation of the simulation results, the
relaxation gain algorithm to calculate the safety
chlorine concentration was scaled by the factor of
zones, where H m = H p = 36 ,  = 1.0 and let Q
0.25mg/l, so the upper and lower output limit
(0.2mg/l and 0.3mg/l) is converted into 0.8 and 1.2 be the unit matrix. The controller starts with zero
respectively, and the output reference is y r = 1.0 . safety zones. Its operation over a whole horizon
and the output constraint violation are illustrated in
The pump schedule, flows in the pipes and tank Fig. 6. The violation is about 5% above the output
limit around steps t=140 and t=230. The operation
levels are obtained from the upper level controller
of the controller over the same time period but with
optimising described in section 2. Using data from
EPANET simulation results generates the the modified output constrains by safety zones is
shown in Fig.8, hence achieving the feasibility. The
parameter bounds in the IO model or state-space
safety zones generated at step t=204 are illustrated
model. The same as for the quantity control a 24-
hour control horizon is considered. The sampling in Fig. 7. The relaxation gain used was  = 1.0 .
period is 5 minutes yielding totally 288 steps for
the whole control horizon. The water network was The model was obtained based on the water
implemented using EPANET2.0 (Rossman, 2000) dynamics assuming perfect water demand
in order to simulate the plant responses. prediction. In reality however, the water demand
cannot be predicted precisely. This uncertainty was
modelled by increasing the parameter bounds.

10
There is constraint violation even if the safety- prediction uncertainty. The resulting controller
zones are introduced. Performance of the controller performance is shown in Fig. 12. The simulation
with 4% increased parameter bounds is shown in results showed good controller performance. In
Fig. 9. The violation was decreased except for the particular, with the state-space model it was
last period of the horizon when the constraint possible to maintain the chlorine residuals over a
violation occurred due to the tank impact on the whole twenty-four hours time period under
monitored node, which has not been correctly uncertainty in water demand and discrimination of
modelled by the IO type model. It was hoped that continuous delays in the chlorine transportation
by applying state space model the control from the injection to monitoring nodes. This was
performance could be improved. not achievable for the same network using the
input-output model and the upper limit was
5.2 Controller based on State-space Model violated around 23.5hr after tank switching had
occurred as it is illustrated in Fig.9.
As for state space type model, two booster stations
are installed at the nodes 1 and 10. The node 1
mainly controls node 8 and the node 5 mainly 6. Conclusions
controls node 16. A unified model describing the
system during tank draining and filling periods can An integration of quality and quantity aspects is
now be formulated as (Brdys & Chang, 2001a): needed in order to satisfactorily meet operational
objectives in drinking water distribution systems.
iu TOI u Recent work in this area has developed better
y (t ) =  a i (t )u (t − i) +  TOi (t )Tc (t − i) +  y (t ) understanding of the problem and also certain
i = il i =TOI l
pieces of new decision support and control
TII u
Tc (t ) =  (t )Tc (t − 1) +  TI i (t ) y (t − i ) +  T (t ) technology have been produced. This paper
i =TII l proposes a hierarchical structure for an overall
control and discusses how existing control
where y (t ), Tc (t ) are the chlorine concentration at technologies can be used in the design. It is
apparent that although the problem is complex
the monitored nodes and tank nodes respectively,
applying existing control techniques can make a
a i (t ) is the coefficients related to injection,
significant improvement to the current practise.
TOi (t ) is related to the chlorine from the tank that The decision support and control systems for an
is zero for the filling cycle, TI i (t ) is the coefficient integrating quantity and quality in DWDS is an
related to chlorine addition to the tank that is zero emerging challenging application area that needs
truly interdisciplinary research to be performed in
over draining cycle, TOI l , TOI u , TII l , TII u are
order to develop solutions that are needed by
delay bounds,  y (t ) and  T (t ) are the modelling practitioners.
errors. The model can be extended to describe the
system in Fig. 4. The robust MPC controller for lower level water
quality control purpose has been developed for
The envelopes bounding the parameters and maintaining the chlorine concentration at the
modelling error were obtained in the same way as monitored nodes within prescribed bounds under
previous controller based on IO type model. The modelling and demand uncertainty and under
control described in section 4 was modified but the control input constraints. An uncertainty in the time
coefficients used in the controller were kept the varying parameters, measurement errors and
same. The controller was applied to the DWDS in disturbance input has been modelled by applying
Fig.4. First, perfect demand prediction was set bounded models. The safety zones have been
assumed and the model was designed. Due to delay introduced to modify the model-based output
discretisation error the safety zones were needed in constraints so that control input feasibility has been
order to obtain robustly feasible controls during robustly achieved. The safe zones have been
subsequent steps of robust MPC. Operation of the iteratively designed at each control generation time
controller over a whole horizon and the output instant based on the envelopes bounding the
constraint feasibility is illustrated in Fig. 10. Next predicted system output response. Algorithms for
the demand was increased by 10% while the generating the safety zones based on the constraint
controller was remained the same. That is the violations extend over the MPC prediction horizon
model parameter bounds were not changed. The has been derived and their convergence has been
controller performance is illustrated in Fig. 11. In analysed. An efficient simple relaxation scheme
spite of using the safety-zones the output constraint has been designed to reduce the computational
violation occurred. The relaxation gains used were burden.
 = 1.0. Finally, the parameter bounds were
increased by 4% in order to capture the demand

11
The controller has been applied to a drinking water
distribution system. The simulation results have
illustrated good performance of the controller. The
demand uncertainty has been handled by increasing
the model parameter bounds. Further research
should be concentrated on how to convert the
demand prediction uncertainty into the
modification for model parameter bound envelope.

In order to accurately describe the tank dynamics ,


the state-space model has been derived and applied
to design model predictive controller. The
simulation results have shown improving controller
performance comparing with the controller based
on IO type model. Fig.5 Parameter-bounded piecewise constant
model: Parameter Example

Acknowledgement

This work was partly supported by the Polish State


Committee for Scientific Research under grant No.
8 T11A022 16.

201 201 200


5 7

6 18
13 14
12
6 13 14 16
25
8
4 15 26

27 15

11 24
Fig.6 Controller Performance with Zero Safety
5
Zones
7 19
8 23
9 16
17 3
4

22

10
3 9 21 12

18 20

10 19 11
17
100 101 1 2
101 1 2

Fig. 4 A Drinking Water Distribution Network

Fig.7 An Example of Safety Zone Design

12
Fig.11 Control Performance with Zero Safety
Fig.8 Constraints Fulfilment After Safety Zone
Zones based on State Space Model under
Introduction
10% Demand Increase

Fig.9 Robust MPC Control Performance under


Fig.12 Robust MPC Control Performance Based on
10% Demand Increase
State-space Model under 10% Demand
Increase

References:

Brdys, M.A., Chang, T. (2002a) “Robust model


predictive control under output constraints”.
Proc. of the 15th IFAC World Congress, July
21-26, Barcelona, 2002.
Brdys, M.A., Chang, T. (2002b). “Modelling for
control of quality in drinking water distribution
systems”. 1st Annual Environmental & Water
Resources Systems Analysis (EWRSA)
Symposium, A.S.C.E. Environmental & Water
Resources Institute (EWRI) Annual
Conference, Roanoke, Virginia, May 19-22,
Fig.10 Robust MPC Control Performance Based on 2002
State Space Model with Precise Demand Brdys, M.A., Chang, T. (2001a). “Robust Model
Prediction Predictive Control of Chlorine Residuals in
Water Systems Based on State Space
Modeling” in Water Software Systems: theory
and applications VOLUME ONE (Ed. Ulanicki

13
B., Coulbeck B., Rance J.). Proc. Sixth Optimal Control Applications and Methods,
International Conference on Computing and 9(1), pp.51-61, 1988.
Control for the Water Industry, September 03- Coulbeck, B., Brdys, M.A., Orr, C., Rance, J.
05, Leicester, UK, 2001. (1988b). A Hierarchical Approach to
Brdys, M.A., Chang, T., Duzinkiewicz, K. (2001b). Optimized Control of Water Distribution
“Intelligent Model Predictive Control of Systems: Part II Lower Level Algorithm,
Chlorine Residuals in Water Distribution Journal of Optimal Control Applications and
Systems”. Proc. World Water & Methods, 9(1), pp.51-61, 1988.
Environmental Resources Congress , May 20- Findeisen, W., Bailey, F.N., Brdys, M.A.,
24, Orlando, Florida, 2001. Malinowski, K., Tatjewski, P., Wozniak, A.
Brdys, M.A., Chang, T., Duzinkiewicz, K.(2000). (1980). Control and Coordination in
“Hierarchical control of integrated quality and Hierarchical Systems. J.Wiley&Sons, London-
quantity in water distribution systems”. Proc. Chichester-New York, 1980.
of the A.S.C.E. 2000 Joint Conference on Harmant, Ph., Nace, A., Kiene, L., Fotoohi, F.
Water Resources Engineering and Water (1999). Optimal supervision of drinking water
Resources Planning and Management , distribution network. Proc. of the 26th A.S.C.E.
Minneapolis, Minnesota, July 30-August 2, Annual Water Resour. Plng. And Mgnt.
2000. Conference, Tempe, Arizona, June, 1999.
Brdys, M.A. (1999a) “Robust estimation of Lansey K., Zhong, Q. (1990). A Methodology for
variables and parameters in dynamic optimal control of pump stations. Water
networks. Proc. of the 14th IFAC World Resources Infrastructure, Proc. of 1990
Congress, Beijing, P. R. China, 5 - 9 July. A.S.C.E. Water Resour. Plng. and Mgnt
1999. Specialty Conference, pp.58-61, 1990.
Brdys, M.A., Lisiak, Z. (1999b). Robust On-line Lee, B.H., Deininger, R.A. (1992). Optimal
Monitoring of Mixing Quality in Water Supply location of monitoring stations in water
Networks. Proc. of the 26th A.S.C.E. Annual distribution system. Journal of Environmental
Water Resour. Plng. And Mgnt. Conference, Engineering, 118(1), 1992.
Tempe, Arizona, June, 1999. Makoudi, M., Radouane L. (1999). Robust
Brdys, M.A., Arnold, E., Puta, H., Chen, K. decentralized adaptive control for non-
Hopfgarten, S., (1999c). Integration of minimum phase systems with unknown and/or
quantity and quality issues in operational varying delay. Automatica, 35, 1417-1426,
control of water systems. Part I: Modelling and 1999.
integrated operational control, 1999. Milanese, M., J. Norton, H. Piet-Lahanier and E.
(submitted) Walter (Eds) (1996). Bounding Approaches to
Brdys, M.A., Arnold, E., Puta, H., Chen, K., System Identification. Penum, New York.
Hopfgarten, S. (1999d). Integration of Nace, A., Harmant, Ph. and Villon, P. (2001).
quantity and quality issues in operational “Optimization of location and chlorine dosage
control of water systems. Part II: Methods, of the booster chlorination in water distribution
solvers and case-study, 1999. (submitted) network”. Proc. World Water &
Brdys, M.A., Puta, H., Arnold, E., Chen, K., and Environmental Resources Congress , May 20-
Hopfgarten, S. (1995). Operational control of 24, Orlando, Florida, 2001.
integrated quality and quantity in water Nitivattananon V., Sadowski, E.C., Quimpo, R.G.
systems. In P.D.Roberts and J.E.Ellis, editors, (1996). Optimization of water supply system
Large Scale Systems: Theory and Applications. operation, Journal of Water Resources
IFAC/IFORS/IMACS Symposium, volume 2, Planning and Management, ASCE, 122(5),
pp.715-722, London, 1995. pp.374-384, 1996.
Brdys, M.A., Ulanicki, B. (1994). Operational Ormsbee L.E., Lansey, K.E. (1994). Optimal
Control of Water Systems: Structures, control of water supply pumping systems,
algorithms and applications. Prentice Hall, Journal of Water Resources Planning and
1994. Management, ASCE, 120(2), pp.237-252,
Brion, L.M., Mays, L.W. (1991). Methodology for 1994.
Optimal Operation of Pumping Stations in Ostfelt A., and Shamir, U. (1993a). Optimal
Water Distribution Systems, Journal of operation of multiquality networks, I: Steady
Hydraulic Engineering, 117(11), pp.1551- condition, Journal of Water Resources
1569, 1991. Planning and Management, ASCE, 119(6),
Coulbeck, B., Brdys, M.A., Orr, C., Rance, J. pp.645-662, 1993.
(1988a). A Hierarchical Approach to Ostfelt A., and Shamir, U. (1993b) Optimal
Optimized Control of Water Distribution operation of multiquality networks, II:
Systems: Part I Decomposition, Journal of Unsteady condition, Journal of Water

14
Resources Planning and Management, ASCE,
119(6), pp.663-684, 1993.
Polycarpou, M.M., J.G. Uber, Z. Wang, F. Shang,
M.A. Brdys (2001). Feedback control of water
quality. IEEE Control Systems Magazine. (in
press).
Polycarpou M.M., Uber, J.G., Desai, U. (1999).
Design of a Feedback Controller for Water
Distribution Systems Residual Maintenance,
Proc. of the 26th A.S.C.E. Annual Water
Resour. Plng. And Mgnt. Conference, Tempe,
Arizona, June, 1999.
Propato, M., Uber, J.G., Polycarpou, M.M. (2002).
Control of booster disinfection systems:
optimal location of actuators and sensors.
Proc. of I International Conference on
Technology, Automation and Control of
Wastewater and Drinking Water Systems -
TiASWiK’02, Sobieszewo –Gdansk, Poland,
19-21 June, 2002.
Rossman, L.A. (2000). EPANET 2.0 for Windows.
Water Suply and Water Resourses Division,
National Risk Management Research
Laboratory, Cincinnati, OH 45268.
Rossman, L.A., Clark, R.M., Grayman, W.M.
(1994). Modelling chlorine residuals in
drinking-water distribution systems.
J.Envir.Engrg., 120(4), pp.803-820, 1994.
Sakarya, A. Mays, L.W. (2000). ASCE. Optimal
operation of water distribution system pumps
with water quality considerations. Journal of
Water Resources Planning and Management,
126(4), pp-210-220, 2000.
Subramaniam, P., Tryby, M., and Uber, J. (2000).
Set covering models for locating booster
chlorination stations in water distribution
systems. Proc. of the 2000 Joint Conf. On
Wat.Res.Eng. and Wat.Res.Plan. and Manag.,
ASCE., Minneapolis, MN, 2000.
Zierolf, M.L., Polycarpou, M.M., Uber, J.G.
(1998). Development and auto-calibration of
an input-output model of chlorine transport in
drinking water distribution systems. IEEE
Transactions on Control Systems Technology,
6(4), pp.543-553, July 1998.

15

You might also like