Professional Documents
Culture Documents
Department of Automatic and System Engineering, University of Seville Escuela, Superior de Ingenieros, Camino de los Descubrimientos, s/n, 41092 Seville, Spain
INOCSA S.L.Ingeniera, Spain
a r t i c l e
i n f o
Article history:
Received 23 July 2010
Received in revised form
30 November 2010
Accepted 23 December 2010
Available online 12 February 2011
Keywords:
Irrigation canals
Risk management
Control
Model predictive control
Water treatment
a b s t r a c t
This paper presents a hierarchical distributed model predictive control approach applied to irrigation
canal planning from the point of view of risk mitigation. Two levels in optimization are presented. At
the lower level, a distributed model predictive controller optimizes the operation by manipulating ows
and gate openings in order to follow the water level set-points. The higher level implements a risk
management strategy based on the execution of mitigation actions if risk occurrences are expected. Risk
factors such as unexpected changes in demand, failures in operation or maintenance costs are considered
in the optimization. Decision variables are mitigation actions which reduce risk impacts that may affect
the system. This work shows how model predictive control can be used as a decision tool which takes
into account different types of risks affecting the operation of irrigation canals.
2011 Elsevier Ltd. All rights reserved.
1. Introduction
Water canal system management involves operating pumps,
valves and gates to satisfy user demands and minimize costs. The
main objective of irrigation canals (IC) is to supply water to farmers
according to a specic schedule. A set of constraints imposed by the
physical system and by management policy has to be considered.
IC operation may be affected by many important factors. Operations can be interrupted for several reason such as scheduled
maintenance, response to warnings, subsystem failure or accidents.
Furthermore, variability in demand, changing weather and raw
water conditions are parameters that should be considered for the
optimal operation and maintenance of the plant. Several studies
have been carried out to take into consideration the inuence of
uncertain factors in the performance of water systems such as [21],
[26] or [30] where climate change, drought or demand uctuations
have been analysed.
Uncertain factors not previously considered in the planning
may affect IC operation. These uncertainties originate from various
causes: political (changes in politics can change water strategy),
operational (water level reference varies from that forecast, adjacent land becomes water logged, etc.), nancial, maintenance tasks
(failure in reach or devices due to wear and tear, seepage loss, sensor theft) or ecological. Most of the factors mentioned are sources
of risks that can affect IC performance and should, therefore, be
taken into account. Quantifying these risks and incorporating them
into mathematical planning and operation models may result in
improved water system policies.
Risk management (RM) in plant operation is a discipline that
is giving rise to great interest amongst researchers and industrial
sectors [4,27]. The objective of RM in engineering systems is to
establish risk-based policies to obtain better trade offs in safety
and productivity. This technique begins at the conceptual design
phase and continues through out the execution and commissioning of the system. In recent years, risk has been intensively studied
in water resource engineering, and many signicant achievements
have been made. In Ref. [31] a risk analysis is developed where
parameters such as reliability, resilience and vulnerability are evaluated. In Ref. [2] an identication of different risks in water systems
is provided and in Ref. [3] a guideline is presented for mitigating
risks. An optimization of the operation of a desalination plant is
carried out by risk mitigation in Ref. [28]. It can be concluded that
risk in water systems may decrease if risk mitigation actions are
adopted beforehand.
From the point of view of IC control, many contributions can be
found in the literature. The introduction of automatic control has
been increasingly promoted when technical and socio-economic
circumstances make it possible [6,19]. There are applications ranging from classical approaches such as PI controllers [17] to model
788
2gu(t)
(2)
Cost of mitigation
Higher level
MPC
Mitigation actions
Lower level
DMPC
Flow head and gate openings
PLANT
789
a = 1, . . . , p.
(3)
U2
U1
R1
A1
R2
...
Un
...
...
Rm
Ap-1
Ap
790
p
p
a=1
(4)
a=1
(5)
uM ,t
q
N
k=1 c=1
(6)
m
RErc (u, t + k)
(7)
r=1
Note that risks can appear modifying the estimated cost. Therefore, term RErc (u, t + k) models the effect of risk Rr on parameter
Zc (risk exposure); m denotes the total number of risks and N the
prediction horizon. In the case of internal risks, Y int,c , risks associated to maintenance and operation will be included; in the case of
Y ext,c , risks associated to demand, nancial and market issues will
be included.
The output of the problem will strongly depend on the weights
of the different terms. Additional terms can be added to the index
function in order to incorporate other operating objectives. For
example, the control effort can be added, if required. Thus, Eq. (5)
may be expanded:
minJ = 1 Jint (uM , t) + 2 Jext (uM , t) + 3 J3 (uM , t)
uM ,t
(8)
where
J3 =
N
uM (t + k 1)
(9)
k=1
The decision about run the higher controller off line or on line,
will depend on when was executed. If it is run before IC is operating, may be considered as a planning tool where all the data are
xi (t + 1) = Ai xi (t) +
Bij uj (t)
(10)
j ni
Rqi
where xi
with i = 1, . . ., Mx are the states of each subsystem,
and uj Rrj with j = 1, . . ., Mu are the different inputs. The set of
indices ni indicates the set of inputs uj which affect state xi and the
set of indices mj indicates the set of states xi affected by input uj .
Note that Eq. (10) has the same structure as (1). We consider the
following linear constraints in the states and the inputs
xi i ,
uj uj ,
i = 1, . . . , Mx
j = 1, . . . , Mu
(11)
where i and uj are closed polyhedra that contain the origin in their
interior dened by the following set of linear inequalities
xi i Hxi xi bxi , i = 1, . . . , Mx
uj uj Huj uj buj , j = 1, . . . , Mu
791
value for the decision control vector Ud (t) is set to the value of
the shifted input trajectories, that is, Ud (t) = Us (t).
Step 2: Agents try to submit their proposals randomly. To this
end, each agent asks the neighbors affected if they are free to
evaluate a proposal (each agent can only evaluate one proposal
at any given time). If all the agents acknowledge the petition, the
algorithm continues, if not, the agent waits a random time before
trying again. We will use the superscript p to refer to the agent
granted permission to make a proposal.
Step 3: In order to generate its proposal, agent p minimizes Jp
solving the following optimization problem:
p
{Uj (t)}
j nprop
arg
min
{Uj }
j nprop
Jp (xp , {Uj }j n )
s.t.
xp (k + 1) = Ap xp (k) +
(12)
Bpj uj (k)
(15)
j np
xp (0) = xi (t)
xp (k) p , k = 0, . . . N
uj (k) uj , k = 0, . . . N 1,
Uj = Ujd (t), j
/ nprop
j np
N1
(13)
k=0
where Uj ={uj (k)} is the future trajectory of input j, N is the prediction horizon, Li ( ) with i Mx is the stage cost function dened
as
T
uTj Sij uj
(14)
j ni
with Qi > 0, Sij > 0. Note that term h i (t) stands for the agent i reference.
We use notation xi (k) to denote state i, k-steps in the future,
obtained from the initial state xi applying the input trajectories
dened by {Uj }j n . Note that each of the local cost functions only
i
depends on the trajectories of its state and the inputs that affect it.
At the end of the negotiation rounds, the agents decide a set of
input trajectories denoted as Ud . The rst input of these trajectories
is applied, the rest of the trajectories are not discarded, however,
they are used instead to generate the initial proposal for the next
sampling round which is given by the shifted future input trajectories Us of all the inputs. The last input of each of these trajectories
is obtained simply by repeating the penultimate value.
We next dene the proposed distributed MPC scheme:
Initialization: A feasible initial set of input trajectories Ud ( 1) has
to be computed. Even if the calculation of Ud ( 1) is beyond the
scope of this work, it can be computed either by a centralized
supervisor or in a distributed manner by agents. Anyhow, note
that nding a feasible solution has a lower computational burden
than nding the optimal solution of the optimization problem.
Step 1: Each agent p measures its current state xp (t). The agents
communicate in order to obtain Us (t) from Ud (t 1). The initial
Uj (t) stands for the value of the trajectory of input j of the proposal of agent p. From the centralized point of view, the proposal
at time step t of agent p is dened as
(16)
where operation
p
atives to {Uj (t)}
j np
stands for the update of the components relin Ud (t) and leaving the rest unmodied.
j ni
j ni
(17)
This difference Ji (t) is sent back to agent p. If the proposal does
not satisfy the constraints of the corresponding local optimization
problem, an innite cost increment is assigned. This implies that
unfeasible proposals will never be chosen.
Step 5: Once agent p receives the local cost increments from
each neighbor, it can evaluate the impact of their proposal Jp (t),
which is given by the following expression
J p (t) =
i
j nprop
Ji (t)
(18)
mj
Mx
i=1
j ni
(19)
792
1. Higher level.
Main target: to minimize cost due to internal and external
risks.
To minimize costs, the objective function described in Eq. (5)
has been used with values in = [1 1], that is, internal and
external risks will be optimized. To calculate the predicted
output, Eqs. (6) and (7) are used.
There is a 365 day study period (1 year) and a 1 day sampling
time.
Prediction horizon, N = 5 days.
Manipulated variables: mitigation actions, uM .
2. Lower level
Main target: to control water management in canals in order
to guarantee ow demanded by users. For this purpose, it is
necessary to maintain the level of the canal over the off-take
gate when ow is requested.
Controlled variables: upstream levels at the gates, hi .
Manipulated variables: ow at the head of the canal and the
position of the gates
Constraints:
(a) Maximum and minimum levels to guarantee that off-take
points are submerged.
(b) The total amount of water at the head over a determined
time period is limited.
(c) Maximum and minimum gates opening.
The study period is 1440 min (1 day) and the sampling time
1 min. This period corresponds to what happens during the
day 150 of the higher controller period.
The control horizon is set to Nc = 5 for all the agents. The prediction horizon for the agent i is equal to the control horizon
plus the delay i of the reach, that is, Np (i) = Nc + i .
793
Table 1
Data of Cartagena-La Pedrera irrigation canal.
Code
Type
Gate
Off-take
Off-take
Off-take
Off-take
Off-take
Off-take
P/G
Description
km
G
G
G
P
Initial Gate
Off-take 5 Fuensanta and Estafeta
Off-take 5 Palacete
Off-take 6 Santo Domingo
Gate Canal Pedrera
Off-take 7 Campo Salinas
Off-take 8 San Miguel
Gate Canada
La Estacada
0.000
0.200
1.170
2.540
2.840
4.485
5.970
6.550
8.050
9.390
9.590
10.480
12.630
12.780
14.433
14.579
16.540
17.444
P
G
G
G
P
G
P
G
G
P
G
G
G
Dynamic model is based on Eqs. (1) and (2). Note that Eq. (1)
is linear, but Eq. (2) is not. Thus, it has to be linearized so that
the system model can be expressed in the form of Eq. (10). For
simplicity, we have assumed that the terms hup (t) and hdn (t)
of Eq. (2) are constants whose value is estimated.
4.3. Risks identication
A number of potential risks can be encountered when the IC is
operating. Table 2 shows the risks that have been considered in this
example. Some have been provided by the INOCSA technical staff.
Initial impacts (II) are expressed on the parameters Z ={Z1 , Z2 }, with
Z1 being the cost (euros/day) and Z2 the variation on reference level
in reaches (m).
Risk R1 is stated as Inadequate fresh water quality. If this risk
occurs, an impact of 2000 euros/day is incurred; the probability is
constant over time: 0.1. R2 is associated with failure at gates. The
probability of this risk depends on the canal operation: the wear
and tear of the gate increases the likelihood of deterioration. Thus,
a function 1 that depends on the control variables that operate
the gates (u) and the time, has been included. As the use of the
gates and the time of operation is increasing, the value returned
by 1 will be greater. R3 depends on the water level and on the
0.000
0.770
3.740
4.260
5.260
6.440
6.680
Table 2
Risk description (case study).
Rr
Description
Impacts
Pr (t)
Internal risks
Operation and Maintenance
Inadequate fresh water quality.
R1
Failure in gates due to wear and tear
R2
Seepage losses
R3
II11 = 2000/II12 = 0
II21 = 400/II22 = 0
II31 = 10/II32 = 0
0.1
0.1 + 1 (u, t)
0.1 + 2 (hi , t)
External risks
Politics and Weather
R4
R5
R6
R7
R8
P4 (t)
P5 (t)
P6 (t)
0.01
0.01
794
Probability of R4 (P4(t))
1
0.9
0.8
Probability
0.7
0.6
0.5
0.4
0.3
0.2
0.1
30
60
90
120
150
180
210
240
270
300
330
360
Days
Fig. 4. Random probability of R4 according N (0.5,0.3) over time.
that model the reduction of impacts and cost of execution, respectively. The fourth column is the period of validity of the action
(D = Daily, W = Weekly, B = Biyearly, Y = Yearly). That means if an
action is executed, it not will be reassessed until past the time of
validity. For example, an insurance contract may be executed every
180 days (if estimated) and a water analysis may be undertaken
every week.
Some functions f and g depend proportionally on the impacts.
For example, f11 = 0.7II1 uM1 means that the execution of this action
reduces the impact by 70%. Mitigation actions are carried out
depending on the setting of the execution frequency. The risk-based
structure with links between risks and actions is shown in Fig. 5.
Values from terms RAra in Eq. (4) are obtained from this gure.
Some example are: RA11 = 1, RA12 = 1, RA13 = 0 or RA45 = 1; that is,
risk R1 is mitigated by actions A1 and A2 and A4 is mitigated by
A5 . A5 states the modication of water level reference as a consequence of A4 or A5 . Note that this actions assumes the increasing
of water level, II26 and reduces the cost. A6 models an insurance
contract. The value of uM6 means the cost of the contract and f16
the insurance coverage.
4.5. Results and discussion
As a consequence of boolean variables, the problem is set as a
mixed integer quadratic problem. Results have been obtained using
the commercial solver Cplex [13].
Higher controller. Terms Jint and Jext in Eq. (5) have been dened
as:
2
5
Jint (uM , t) =
(Y int,c (t + k|t)) ,
(20)
k=1 c=1
Jext (uM , t) =
2
5
(Y ext,c (t + k|t)) ,
(21)
k=1 c=1
where
Y ext,1 =
8
REr1 (u, t + k)
(22)
REr2 (u, t + k)
(23)
r=1
Y ext,2 =
8
r=1
For risks R4 and R5 , the rainfall forecast for the city of Murcia
and the discharge from farmers have been considered during 2009.
Fig. 6 shows the rainfall forecast in the top panel; the initial level is
represented by a dotted green line. This level is modied by R2 and
R3 , giving rise to an actual level reference shown by the solid red
line (this is because action A6 is executed). Note that in the summer
season the level is increased as farmers may demand more water
as a result of drought.
Table 3
Mitigation actions description (case study).
Aa
Description
PV
A1
A2
A3
A4
A5
A6
W
B
W
Y
D
B
795
Irrigation canal
External risks
(Politic and weather)
Internal risks
(opearation and maintenance)
R2
R1
A1
A2
R3
R6
R7
A5
A4
A3
R5
R4
R8
A6
mm
30
20
10
30
60
90
120
150
180
210
240
270
300
330
360
Initial reference
Reference + risks
3.4
3.3
3.2
3.1
3
2.9
2.8
30
60
90
120
150
180
Days
210
240
270
300
330
360
Fig. 6. Top panel: rainfall forecast in Murcia. Lower panel: level reference in one reach by considering risks R2 , R3 and action A6 .
796
x 10
15
Risks Mitigation
No mitigation
Euros
10
30
60
90
120
150
180
210
240
270
300
330
360
270
300
330
360
x 10
2
Euros
1.5
1
0.5
0
0
30
60
90
120
150
180
Days
210
240
Several simulations have been performed for the DMPC controller for a one-day period. In these simulations, all the reaches
begin with a water level of 3.0 m and there is a change of reference
for all the reaches to 3.40 m at time k = 0. This change is originated
at the higher control level as a function of the risk mitigation policy.
In particular, the change of reference corresponds to the day 150 in
A1
MITIGATION ACTIONS
A2
1
0.5
0
A3
1
0.5
A4
A5
0.4
0.2
0
A6
4000
2000
0
30
60
90
120
150
180
210
240
270
Time (days)
Fig. 8. Mitigation actions to be undertaken to reduce risks impacts.
300
330
360
levels (meters)
3.4
3.3
h1
3.2
h2
h
3.1
h4
2.9
h6
2.8
h7
2.7
2.6
2.5
0
200
400
600
800
1000
1200
1400
k (minutes)
Fig. 9. Levels in reaches for day 150 for the nominal case.
797
which the agents can measure the disturbances. In this case the
response is better than in Fig. 10 although slower than the one
shown in Fig. 9. Finally, in Fig. 12 we show a comparison between
the absolute effects of the disturbance (hd3 ) and the manipulated
variable (hu3 ) in the level of the reach 3, expressed in meters per
minute. In other words, hd3 is the absolute value in the variation
of water level due to farmers and hu3 represents how the manipulated variable tries to correct the deviation of the water level with
respect to its reference.
Note that even if the effect of the disturbance is a decrement of
the water level, it has been depicted with a positive sign, so that
its magnitude can be compared with the effect of the manipulated
variable in a simpler way. Likewise, note that we have modelled the
disturbances as a train of steps of one hour length with a random
amplitude.
It should be noted that these results have been obtained with
an average number of 5 communications per agent and sampling
time; in other words, each agent makes up to 5 proposals a minute
in order to get a cooperative solution with the rest of the agents.
Note that, given the random component of the distributed MPC
algorithm, it is not possible to make a deterministic comparison
with a centralized MPC in order to evaluate its loss of performance. For this reason, we have performed different simulations in
order to determine the average of the loss of performance. We per-
3.5
3.4
3.3
levels (meters)
3.2
3.1
3
h1
h2
h3
h4
h5
h6
h7
2.9
2.8
2.7
2.6
2.5
200
400
600
800
1000
1200
1400
k (minutes)
Fig. 10. Water levels in the case of non measurable noise.
3.5
3.4
3.3
levels (meters)
3.2
3.1
3
h1
h2
h3
h4
h5
h6
h7
2.9
2.8
2.7
2.6
2.5
200
400
600
800
1000
k (minutes)
Fig. 11. Water levels in the case of measurable noise.
1200
1400
798
1.5
x 10
hd3
hu3
0.5
200
400
600
800
1000
1200
1400
k (minutes)
Fig. 12. Absolute changes in the level of reach 3 due to its manipulated variable (U3 ) and the farmers activity (D3 ).
799
[28] A. Zafra-Cabeza, M.A. Ridao, E.F. Camacho, A mixed integer quadratic programming formulation of risk management for reverse osmosis plants, Dessalination
268 (2011) 4654.
[29] A. Zafra-Cabeza, M.A. Ridao, E.F. Camacho, K.G. Kempf, D.E. Rivera, Managing
risk in semiconductor manufacturing: a stochastic predictive control approach,
Control Engineering Practice 15 (8) (2007) 969984.
[30] Y. Zhou, R.S.J. Tol, Economic analysis of domestic, industrial and agricultural
water demands in China, Water Supply 5 (6) (2005) 8593.
[31] X. Zongxue, K. Jinno, A. Kawamura, S. Takesaki, K. Ito, Performance risk analysis
for fukuoka water supply system, Water Resources Management 12 (1998)
1330.