Smart Systems for Urban Water Demand
Management
Pantelis Sopasakis
joint work with A.K. Sampathirao, P. Patrinos & A. Bemporad.
IMT Institute for Advanced Studies Lucca
Monte Verit´a, Switzerland, 22-25 Aug 2016
Today’s talk
We will learn how to:
model water networks
identify control objectives
make decisions under uncertainty
formulate MPC problems
devise algorithms to solve them
parallelise them on GPUs
1 / 89
Introduction
Control
Algorithm
s
Sim
ulations
W
hattomodel
Literatureoverview
Control-orientedmodels
ForecastingTheMPC
concept
W
orst-caseMPC
StochasticMPCScenario-basedMPCProximaloperator
Convexconjugate
Duality
APG
algorithm
DW
N
SMPC
problems
Parallelisation
KPIs
Simulationresults
Conclusions
Modoller’s todos
Modelling
and Control
of DWNs
PHYSICALPHYSICAL
mass balances
pressure drops
chlorine balances
2 / 89
Modoller’s todos
Modelling
and Control
of DWNs
PHYSICALPHYSICAL
TIME SERIESTIME SERIES
mass balances
pressure drops
chlorine balances
seasonal ARIMA
BATS models
neural networks
SVM and other ML
3 / 89
Modoller’s todos
Modelling
and Control
of DWNs
PHYSICALPHYSICAL
TIME SERIESTIME SERIES
UNCERTAINTYUNCERTAINTY
mass balances
pressure drops
chlorine balances
seasonal ARIMA
BATS models
neural networks
SVM and other ML
parametric PDFs
scenario trees
4 / 89
Modoller’s todos
Modelling
and Control
of DWNs
PHYSICALPHYSICAL
TIME SERIESTIME SERIES
UNCERTAINTYUNCERTAINTY
CONSTRAINTSCONSTRAINTS
mass balances
pressure drops
chlorine balances
seasonal ARIMA
BATS models
neural networks
SVM and other ML
parametric PDFs
scenario trees
tanks
pumps
pressure drops
5 / 89
Modoller’s todos
Modelling
and Control
of DWNs
PHYSICALPHYSICAL
TIME SERIESTIME SERIES
UNCERTAINTYUNCERTAINTY
CONSTRAINTSCONSTRAINTSOBJECTIVESOBJECTIVES
mass balances
pressure drops
chlorine balances
seasonal ARIMA
BATS models
neural networks
SVM and other ML
parametric PDFs
scenario trees
tanks
pumps
pressure drops
energy consumption
operating cost
smoothness of actuation
safety storage
`
6 / 89
Control of water networks
Controller
Drinking Water
Network
Water demand
Electricity prices
Measurements
Actuation
7 / 89
Taxonomy of control methodologies
Open Loop Closed Loop
Certainty
Equivalent
Worst case Stochastic Risk-averse
Control of DWNs
● No feedback
● Assumes perfect knowledge
● No contingency plan
● Requires human intervention Model Predictive
Control
Creasy 1998; Yu et al., 1994; Zessler and Shamir, 1989
8 / 89
Taxonomy of control methodologies
Open Loop Closed Loop
Certainty
Equivalent
Worst case Stochastic Risk-averse
Control of DWNs
● Feedback compensates
for modelling errors
Model Predictive
Control
Creasy 1998; Yu et al., 1994; Zessler and Shamir, 1989
9 / 89
Taxonomy of control methodologies
Open Loop Closed Loop
Model Predictive
Control
Certainty
Equivalent
Worst case Stochastic Risk-averse
Control of DWNs
● Suitable for MIMO
● Control under uncertainty
● Goal-driven
● Requires simple model
Creasy 1998; Yu et al., 1994; Zessler and Shamir, 1989
10 / 89
Taxonomy of control methodologies
Open Loop Closed Loop
Certainty
Equivalent
Worst case Stochastic Risk-averse
Control of DWNs
● Model assumed accurate
● Constraints may be violated
● Suboptimal (we can do better)
Model Predictive
Control
Sampathirao et al., 2014; Bakker et al., 2013; Leirens et al., 2010; Ocampo et al., 2009.
11 / 89
Taxonomy of control methodologies
Open Loop Closed Loop
Certainty
Equivalent
Worst case Stochastic Risk-averse
Control of DWNs
● Pessimistic and conservative
● Leads to small domain of attraction
Model Predictive
Control
Ocampo et al., 2009 and 2010.
12 / 89
Taxonomy of control methodologies
Open Loop Closed Loop
Certainty
Equivalent
Worst case Stochastic Risk-averse
Control of DWNs
● Makes use of probabilistic info
● Less conservative, more realistic
Model Predictive
Control
Sampathirao et al., 2014; Goryashko and Nemirovski, 2014; Tran and Brdys, 2009, Watkins and McKinney, 1997
13 / 89
Taxonomy of control methodologies
Open Loop Closed Loop
Certainty
Equivalent
Worst case Stochastic Risk-averse
Control of DWNs
● Beyond the state of art
● Uncertainty in uncertainty
Model Predictive
Control
Sampathirao et al., 2016
14 / 89
Objectives
To MODEL (water demands, hydraulics, uncertainty, etc), pose a
stochastic predictive CONTROL problem (define objectives, constraints)
and devise algorithms to SOLVE it numerically.
15 / 89
Introduction
Control
Algorithm
s
Sim
ulations
W
hattomodel
Literatureoverview
Control-orientedmodels
ForecastingTheMPC
concept
W
orst-caseMPC
StochasticMPCScenario-basedMPCProximaloperator
Convexconjugate
Duality
APG
algorithm
DW
N
SMPC
problems
Parallelisation
KPIs
Simulationresults
Conclusions
MPC
Control-oriented models
T1
T2
D1
T3
D2
16 / 89
Control-oriented models
T1
T2
D1
T3
D2
Actuation
17 / 89
Control-oriented models
T1
T2
D1
T3
D2
Uncertainty
18 / 89
Control-oriented models
T1
T2
D1
T3
D2
States
19 / 89
Control-oriented models
T1
T2
D1
T3
D2
Algebraic
Conditions
20 / 89
Our case study
DWN of Barcelona: 63 tanks, 114 pumping stations and valves, 88 demand nodes & 17 pipe intersection nodes.
21 / 89
Control-oriented models
Simple mass balance equation (in discrete time)
xk+1 = Axk + Buk + Gddk,
0 = Euk + Eddk,
xk: tank volumes, uk: flows (controlled by pumping), dk: demands —
along with the constraints
xmin ≤ xk ≤ xmax,
umin ≤ uk ≤ umax.
Sampathirao, Sopasakis et al., 2016, 2014; Wang et al., 2014; Ocampo et al., 2010; Ocampo et al., 2009.
22 / 89
Control-oriented models
	
  
20 40 60 80 100 120
2
3
4
5
6
7
x 10
4 d100CFE
time (h)
m3
20 40 60 80 100 120
200
300
400
500
d114SCL
time (h)
m3
20 40 60 80 100 120
1000
2000
3000
4000
d115CAST
time (h)
m3
20 40 60 80 100 120
0.5
1
1.5
x 10
4 d130BAR
time (h)
m3
20 40 60 80 100 120
500
1000
1500
2000
2500
3000
d132CMF
time (h)
m3
20 40 60 80 100 120
400
600
800
1000
d135VIL
time (h)
m3
20 40 60 80 100 120
200
400
600
800
1000
d176BARsud
time (h)
m3
20 40 60 80 100 120
500
1000
1500
2000
2500
3000
d450BEG
time (h)
m3
20 40 60 80 100 120
1000
2000
3000
d80GAVi80CAS85
time (h)
m3
Simulator
Real data
Upper limit
Safety level
Source: EFFINET, deliverable report D2.1
23 / 89
Demand forecasting
Demand prediction concept:
dk+j( j) = ˆdk+j|k + j
where
1. dk+j: actual demand at time k + j
2. ˆdk+j|k: prediction of dk+j using info up to time k
3. j: j-step-ahead prediction error
and ˆdk+j|k is a function of observable quantities up to time k.
Sampathirao, Sopasakis et al., 2016.
24 / 89
Demand forecasting
Common approaches:
1. Neglect the error: ( 0, 1, . . . , N ) (0, 0, . . . , 0)
25 / 89
Demand forecasting
Common approaches:
1. Neglect the error: ( 0, 1, . . . , N ) (0, 0, . . . , 0)
2. Error bounds: ( 0, 1, . . . , N ) ∈ E, e.g., j ∈ [ min
j , max
j ]
25 / 89
Demand forecasting
Common approaches:
1. Neglect the error: ( 0, 1, . . . , N ) (0, 0, . . . , 0)
2. Error bounds: ( 0, 1, . . . , N ) ∈ E, e.g., j ∈ [ min
j , max
j ]
3. Independent normal distributions: j ∼ N(mj, σ2
j )
25 / 89
Demand forecasting
Common approaches:
1. Neglect the error: ( 0, 1, . . . , N ) (0, 0, . . . , 0)
2. Error bounds: ( 0, 1, . . . , N ) ∈ E, e.g., j ∈ [ min
j , max
j ]
3. Independent normal distributions: j ∼ N(mj, σ2
j )
4. ( 0, 1, . . . , N ) is random and admits finitely many values
25 / 89
Error bounds
0 20 40 60 80 100 120 140 160 180 200
0
0.01
0.02
0.03
0.04
0.05
0.06
0.07
Time [h]
WaterDemandFlow[m
3
/h]
Forecasting of Water Demand
FuturePast
26 / 89
Continuous independent errors
27 / 89
Predicted scenarios
Time [hr]
4370 4380 4390 4400 4410 4420 4430
Waterdemand[m
3
/s]
0.01
0.015
0.02
0.025
0.03
0.035
0.04
0.045
0.05
28 / 89
Control objectives
Stage costs:
1. Economic cost: w(uk, k) = Wα(α1 + α2,k) uk
We define ∆uk = uk − uk−1
Sampathirao et al., 2014; Cong Cong et al., 2014
29 / 89
Control objectives
Stage costs:
1. Economic cost: w(uk, k) = Wα(α1 + α2,k) uk
2. Smooth operation cost: ∆(∆uk) = ∆ukWu∆uk
We define ∆uk = uk − uk−1
Sampathirao et al., 2014; Cong Cong et al., 2014
29 / 89
Control objectives
Stage costs:
1. Economic cost: w(uk, k) = Wα(α1 + α2,k) uk
2. Smooth operation cost: ∆(∆uk) = ∆ukWu∆uk
3. Safe operation cost: S(xk) = Wx [xs − xk]+
We define ∆uk = uk − uk−1
Sampathirao et al., 2014; Cong Cong et al., 2014
29 / 89
Control objectives
Stage costs:
1. Economic cost: w(uk, k) = Wα(α1 + α2,k) uk
2. Smooth operation cost: ∆(∆uk) = ∆ukWu∆uk
3. Safe operation cost: S(xk) = Wx [xs − xk]+
4. Total cost: = w + ∆ + S.
We define ∆uk = uk − uk−1
Sampathirao et al., 2014; Cong Cong et al., 2014
29 / 89
Model Predictive Control
Rawlings and Mayne, 2009
30 / 89
Model Predictive Control
Rawlings and Mayne, 2009
31 / 89
Model Predictive Control
Rawlings and Mayne, 2009
32 / 89
Model Predictive Control
Rawlings and Mayne, 2009
33 / 89
Model Predictive Control
Rawlings and Mayne, 2009
34 / 89
Model Predictive Control
Problem formulation
minimise
π=({uk+j|k}j,{xk+j|k}j)
V (π) :=
N−1
j=0
(xk+j|k, uk+j|k, uk+j−1|k, k),
subject to
xk+j+1|k = Axk+j|k + Buk+j|k + Gd
ˆdk+j|k dynamics
Euk+j|k + Ed
ˆdk+j|k = 0 algebraic
xmin ≤ xk+j|k ≤ xmax vol. constr.
umin ≤ uk+j|k ≤ umax flow constr.
xk|k = xk, uk−1|k = uk−1 initial cond.
35 / 89
Worst-case MPC
Rawlings and Mayne, 2009
36 / 89
Worst-case MPC
Problem formulation
minimise
π=({uk+j|k}j,{xk+j|k}j)
max
dk+j|k
V (π),
subject to
dk+j = ˆdk+j|k + j predictions
j ∈ Ej err. bounds
xk+j+1|k = Axk+j|k + Buk+j|k + Gddk+j dynamics
Euk+j|k + Eddk+j = 0 algebraic
xmin ≤ xk+j|k ≤ xmax vol. constr.
umin ≤ uk+j|k ≤ umax flow constr.
xk|k = xk, uk−1|k = uk−1 initial cond.
Here uk+j|k is a function of j – not a fixed value!
37 / 89
Worst-case MPC
Attention! We are looking for control laws (functions) uk+j|k. We may
parametrise (why?) these functions as
uk+j|k = Kjej + bj,
and solve for Kj and bj.
There exist other parametrisations as well.
38 / 89
Worst-case MPC (tube-based)
Safe region
Rawlings and Mayne, 2009
39 / 89
Worst-case MPC (tube-based)
Problem formulation
minimise
π=({uk+j|k}j,{xk+j|k}j)
V (π),
subject to
xk+j+1|k = Axk+j|k + Buk+j|k + Gd
ˆdk+j|k dynamics
Euk+j|k + Ed
ˆdk+j|k = 0 algebraic
xk+j|k ∈ X S volume constr.
umin ≤ uk+j|k ≤ umax flow constr.
xk|k = xk, uk−1|k = uk−1 initial cond.
* the constraint Euk+j|k + Eddk+j|k = 0 (certainty-equivalent) will not be satisfied for all j
40 / 89
Stochastic MPC
41 / 89
Stochastic MPC
42 / 89
Stochastic MPC
43 / 89
Stochastic MPC
44 / 89
Stochastic MPC
45 / 89
Stochastic MPC
46 / 89
Stochastic MPC
47 / 89
Stochastic MPC
48 / 89
Stochastic MPC
Problem formulation
minimise
π=({uk+j|k}j,{xk+j|k}j)
EV (π),
subject to
xk+j+1|k = Axk+j|k + Buk+j|k + Gd
ˆdk+j|k( j) dynamics
Euk+j|k + Eddk+j( j) = 0 alg. cond.
xmin ≤ xk+j|k ≤ xmax vol. constr.
umin ≤ uk+j|k ≤ umax flow constr.
xk|k = xk, uk−1|k = uk−1 initial cond.
again, we’re looking for control laws uk+j|k( j ).
49 / 89
Scenario trees
50 / 89
Scenario trees
Demand forecasting:
di
k+j = ˆdk+j|k + i
j
51 / 89
Scenario trees
Input-disturbance coupling:
Eui
k+j|k + Eddi
k+j = 0
52 / 89
Scenario trees
System dynamics:
xi
k+j+1|k=f(x
anc(j+1,i)
k+j|k , ui
k+j|k, di
k+j|k)
53 / 89
Scenario-based stochastic MPC
Problem formulation:
minimise
π=({uk+ji|k}i,j,{xk+ji|k}i,j)
EV (π)
N−1
j=0
µ(j)
i=1
pi
j
i
j,
subject to
xi
k+j+1|k=f(x
anc(j+1,i)
k+j|k , ui
k+j|k, di
k+j|k) dynamics
Eui
k+j|k + Ed
ˆdi
k+j|k = 0 algebraic
xmin ≤ xi
k+j|k ≤ xmax volume constr.
umin ≤ ui
k+j|k ≤ umax flow constr.
x1
k|k = xk, u1
k−1|k = uk−1 initial cond.
54 / 89
Stochastic MPC (chance constraints)
Grosso et al., 2014.
55 / 89
Introduction
Control
Algorithm
s
Sim
ulations
W
hattomodel
Literatureoverview
Control-orientedmodels
ForecastingTheMPC
concept
W
orst-caseMPC
StochasticMPCScenario-basedMPCProximaloperator
Convexconjugate
Duality
APG
algorithm
DW
N
SMPC
problems
Parallelisation
KPIs
Simulationresults
Conclusions
theory
The proximal operator
Let g : IRn
→ IR ∪ {+∞} be a proper, closed function and γ > 0. Define
proxγg(v) = arg min
z
g(z) + 1
2γ z − v 2
If this is easy to compute we call g prox-friendly.
Parikh and Boyd, 2014; Combettes and Pesquet, 2010.
56 / 89
The proximal operator
Example 1. Take
g(x) = δ(x | C) =
0, if x ∈ C
+∞, otherwise
Then, proxγg(v) = proj(v | C).
Parikh and Boyd, 2014; Combettes and Pesquet, 2010.
57 / 89
The proximal operator
Example 2. Take
g(x) = d(x | C) = inf
y∈C
y − x
Then,
proxλg(v) =
v + proj(v|C)−v
d(v|C) , if d(v | C) > λ
proj(v | C), otherwise
Parikh and Boyd, 2014; Combettes and Pesquet, 2010.
58 / 89
The proximal operator
Key Property. Suppose g is given as
g(x) =
κ
i=1
gi(xi),
Parikh and Boyd, 2014; Combettes and Pesquet, 2010.
59 / 89
The proximal operator
Key Property. Suppose g is given as
g(x) =
κ
i=1
gi(xi),
then
(proxλg(v))i = proxλgi
(vi).
Parikh and Boyd, 2014; Combettes and Pesquet, 2010.
59 / 89
Convex Conjugate
Let f : IR → IR ∪ {+∞} be convex, proper and closed. We define its
convex conjugate as
f∗
(y) = sup
x
x y − f(x) .
If f is strongly convex, then f∗
is continuously diff/ble (Rockaffelar and Wets, 2009; Prop. 12.60).
60 / 89
Convex Conjugate
Let f : IR → IR ∪ {+∞} be convex, proper and closed. We define its
convex conjugate as
f∗
(y) = sup
x
x y − f(x) .
When f∗ is differentiable, then
f∗
(y) = arg min
z
{x y + f(z)}.
If f is strongly convex, then f∗
is continuously diff/ble (Rockaffelar and Wets, 2009; Prop. 12.60).
60 / 89
Convex Conjugate
Let f : IR → IR ∪ {+∞} be convex, proper and closed. We define its
convex conjugate as
f∗
(y) = sup
x
x y − f(x) .
When f∗ is differentiable, then
f∗
(y) = arg min
z
{x y + f(z)}.
If f is prox-friendly, then
proxλf (v) + λproxλ−1f∗ (λ−1
v) = v.
If f is strongly convex, then f∗
is continuously diff/ble (Rockaffelar and Wets, 2009; Prop. 12.60).
60 / 89
Forward-Backward Splitting
The forward-backward splitting is the representation of an optimisation
problem as follows
minimise
z
f(z) + g(z),
where
f, g: closed, convex
f: diff/ble with Lipschitz gradient
g: prox-friendly
FB Splittings are not unique.
61 / 89
Forward-Backward Splitting
Example 1. 1-regularized least squares:
minimise
z
1
2 Az − b 2
+ z 1.
62 / 89
Forward-Backward Splitting
Example 2. Box-constrained QP
minimise
z
1
2z Qz + q z + δ(z | C),
where C = {z : zmin ≤ z ≤ zmax}.
63 / 89
Forward-Backward Splitting
Example 3. Constrained QP
minimise
z
1
2z Qz + q z + δ(Hz | C).
but, g(z) := δ(Hz | C) is not prox-friendly!
64 / 89
Dual optimisation problem
If g(z) is prox-friendly, but g(Hz) is not we may formulate the dual
optimisation problem
Fenchel duality generalises Lagrangian duality (Rockafellar, 1972).
65 / 89
Dual optimisation problem
If g(z) is prox-friendly, but g(Hz) is not we may formulate the dual
optimisation problem
Under certain conditions these two problems have the same minimum and
z = f∗
(−H y ).
Fenchel duality generalises Lagrangian duality (Rockafellar, 1972).
65 / 89
Proximal gradient algorithm
The proximal gradient method for solving
minimise
z
f(z) + g(z)
where f is differentiable with L-Lipschitz gradient runs
zν+1
= proxγg(zν
− γ f(zν
)),
with γ ∈ (0, L−1).
66 / 89
Dual proximal gradient algorithm
The proximal gradient method applied to the dual
minimise
z
f∗
(−H y) + g∗
(y)
where f∗ is differentiable with L-Lipschitz gradient is
yν+1
= proxγg∗ (yν
+ γH f∗
(−H yν
))
If f is L−1
-strongly convex, then f∗
has L-Lipschitz gradient.
67 / 89
Dual proximal gradient algorithm
The dual proximal gradient method
yν+1
= proxγg∗ (yν
+ γH f∗
(−H yν
))
can be written as
zν
= f∗
(−H yν
)
tν
= proxλ−1g(λ−1
yν
+ Hzν
)
yν+1
= yν
+ λ(Hzν
− tν
).
68 / 89
Dual proximal gradient algorithm
Nesterov’s accelerated proximal gradient method converges as O(1/k2)
instead of O(1/k):
wν
= yν
+ θν(θ−1
ν−1 − 1)(yν
− yν−1
)
zν
= f∗
(−H wν
)
tν
= proxλ−1g(λ−1
wν
+ Hzν
)
yν+1
= wν
+ λ(Hzν
− tν
)
θν+1 = 1
2( θ4
ν + 4θ2
ν − θ2
ν)
with θ0 = θ−1 = 1 and y0 = y−1 = 0 (Nesterov, 1983).
69 / 89
The DWN control problem
P : minimise
π=({uk+ji|k}i,j,{xk+ji|k}i,j)
EV (π)
N−1
j=0
µ(j)
i=1
pi
j
i
j,
subject to
xi
k+j+1|k=f(x
anc(j+1,i)
k+j|k , ui
k+j|k, di
k+j|k) dynamics
Eui
k+j|k + Ed
ˆdi
k+j|k = 0 algebraic
xmin ≤ xi
k+j|k ≤ xmax volume constr.
umin ≤ ui
k+j|k ≤ umax flow constr.
x1
k|k = xk, u1
k−1|k = uk−1 initial cond.
We will write this problem as: minimisezf(z) + g(Hz).
70 / 89
The DWN control problem
Let z = {xi
j, ui
j} and define
f(z) =
N−1
j=0
µ(j)
i=1
pi
j( w
(ui
j) + ∆
(∆ui
j)) + δ(ui
j|Φ1(di
j))
+ δ(xi
j+1, ui
j, x
anc(j+1,i)
j |Φ2(di
j)),
where
Φ1(d) = {u : Eu + Edd = 0}
and
Φ2(d) = {(x+
, x, u) : x+
= Ax + Bu + Gdd}
Sampathirao et al., 2016.
71 / 89
The DWN control problem
In other words:
f(z) = smooth cost + dynamics + alg equations
and
g(z) = all the rest
= nonsmooth cost + constraints
=
N−1
j=0
µ(j)
i=1
S
(xi
j) + δ(xi
j | X) + δ(ui
j | U),
but this g is not prox-friendly (it is not separable!).
Sampathirao et al., 2016.
72 / 89
The DWN control problem
We create a copy of {xi
j}j,i which we denote by χi
j and introduce
t = ({xi
j}j,i, {χi
j}j,i, {ui
j}j,i)
with xi
j = χi
j. Then
g(t) =
N−1
j=0
µ(j)
i=1
S
(xi
j) + δ(χi
j | X) + δ(ui
j | U)
is prox-friendly.
It is t = Hz.
73 / 89
Dual gradient computation
To compute the dual gradient we use
f∗
(y) = arg min
z
{x y + f(z)}
= arg min
z:dynamics
Eui
j+Eddi
j=0
{x y +
j,i
quadratic(zi
j)}
This is an equality-constrained quadratic problem which can be solved
very efficiently using dynamic programming.
74 / 89
Dual gradient computation
MV
75 / 89
Dual gradient computation
MV + Sum MV + Sum MV + Sum
76 / 89
Dual gradient computation
MV
77 / 89
Dual gradient computation
MV + Sum MV + Sum
78 / 89
Introduction
Control
Algorithms
Sim
ulations
W
hattomodel
Literatureoverview
Control-orientedmodels
ForecastingTheMPC
concept
W
orst-caseMPC
StochasticMPCScenario-basedMPCProximaloperator
Convexconjugate
Duality
APG
algorithm
DW
N
SMPC
problems
Parallelisation
KPIs
Simulationresults
Conclusions
Control scheme
79 / 89
KPIs
80 / 89
KPIs
81 / 89
KPIs
82 / 89
KPIs
83 / 89
it is fast
# scenarios
100 200 300 400 500
Runtime(s)
0
200
400
600
800
1000
1200
Gurobi
APG (500 iterations)
0 100 200 300 400 500
Runtimeslope
0
2
4
84 / 89
it is efficient
Number of scenarios
50 100 150 200 250 300
KPIE
/1000
1.55
1.6
1.65
1.7
1.75
1.8
KPIS
/1000
1
2
3
4
5
6KPI
E
KPIS
85 / 89
Closed-loop simulations
20 40 60 80 100 120 140 160
Controlaction[%]
0
0.2
0.4
0.6
0.8
Time [hr]
20 40 60 80 100 120 140 160
WaterCost[e.u.]
60
70
80
90
86 / 89
Introduction
Control
Algorithms
Simulations
W
hattomodel
Literatureoverview
Control-orientedmodels
ForecastingTheMPC
concept
W
orst-caseMPC
StochasticMPCScenario-basedMPCProximaloperator
Convexconjugate
Duality
APG
algorithm
DW
N
SMPC
problems
Parallelisation
KPIs
Simulationresults
Conclusions
Open problems
Nonlinear
Problem: introduce nonlinear pressure drop equations
87 / 89
Open problems
Nonlinear
Risk-averse
Challenge: the distribution of future errors is not exactly known
87 / 89
Open problems
Nonlinear
Risk-averse
Distributed
Problems: spatial decomposition, communication constraints
87 / 89
Open problems
Nonlinear
Risk-averse
Distributed
Robust Economic MPC
Questions: performance guarantees, recursive feasibility
87 / 89
Open problems
Nonlinear
Risk-averse
Distributed
Robust Economic MPC
Faster Algorithms
Ongoing work: quasi-Newtonian LBFGS-type algorithms
87 / 89
Thank you for your attention!
References (i)
1. A. Sampathirao, P. Sopasakis, A. Bemporad, and P. Patrinos, “Fast parallelizable scenario-based stochastic
optimization,” EUCCO 2016, Leuven, Belgium, 2016.
2. A. Sampathirao, P. Sopasakis, A. Bemporad, and P. Patrinos, “GPU-accelerated stochastic predictive control of drinking
water networks,” IEEE CST (submitted, provisionally accepted), 2016 (on arXiv).
3. A. Sampathirao, J. Grosso, P. Sopasakis, C. Ocampo-Martinez, A. Bemporad, and V. Puig, “Water demand forecasting
for the optimal operation of large-scale drinking water networks: The Barcelona case study,” 19th IFAC World Congress,
pp. 10457–10462, 2014.
4. A. Sampathirao, P. Sopasakis, A. Bemporad, and P. Patrinos, “Distributed solution of stochastic optimal control
problems on GPUs, 54th IEEE Conf. Decision and Control, (Osaka, Japan), Dec 2015.
5. A. Sampathirao, P. Sopasakis, A. Bemporad, and P. Patrinos, “Proximal Quasi-Newton Methods for Scenario-based
Stochastic Optimal Control,” IFAC 2017 (submitted).
6. M. Bakker, J. H. G. Vreeburg, L. J. Palmen, V. Sperber, G. Bakker, and L. C. Rietveld, “Better water quality and higher
energy efficiency by using model predictive flow control at water supply systems,” J Wat Supply: Research &
Technology – Aqua, 62(1), pp. 1–13, 2013.
7. S. Leirens, C. Zamora, R. Negenborn, and B. De Schutter, “Coordination in urban water supply networks using
distributed model predictive control,” ACC 2010, (Baltimore, USA), pp. 3957–3962, 2010.
8. C. Ocampo-Martinez, V. Puig, G. Cembrano, R. Creus, and M. Minoves, “Improving water management efficiency by
using optimization-based control strategies: the barcelona case study,” Water Science and Technology: Water Supply,
9(5), pp. 565–575, 2009.
9. C. Ocampo-Martinez, V. Fambrini, D. Barcelli, and V. Puig, “Model predictive control of drinking water networks: A
hierarchical and decentralized approach,” ACC 2010, (Baltimore, USA), pp. 3951–3956, 2010.
10. A. Goryashko and A. Nemirovski, “Robust energy cost optimization of water distribution system with uncertain
demand,” Automation and Remote Control 75(10), pp. 1754–1769, 2014.
11. U. Zessler and U. Shamir, “Optimal operation of water distribution systems,” J Wat Resour Plan & Mngmt, 115(6), pp.
735–752, 1989.
88 / 89
References (ii)
12. G. Yu, R. Powell, and M. Sterling, “Optimized pump scheduling in water distribution systems,” J Optim Theory & Appl,
83(3), pp. 463–488, 1994.
13. V. Tran and M. Brdys, “Optimizing control by robustly feasible model predictive control and application to drinking
water distribution systems,” Artificial Neural Networks – ICANN 2009, vol. 5769 of Lecture Notes in Computer Science,
pp. 823–834, Springer, 2009.
14. J. Watkins, D. and D. McKinney, “Finding robust solutions to water resources problems,” J Wat Res Plan & Mngmt
123(1), pp. 49–58, 1997.
15. S. Cong Cong, S. Puig, and G. Cembrano, “Combining CSP and MPC for the operational control of water networks:
Application to the Richmond case study,” 19th IFAC World Congress, (Cape Town), pp. 6246–6251, 2014.
16. J. Grosso, C. Ocampo-Mart nez, V. Puig, and B. Joseph, “Chance-constrained model predictive control for drinking
water networks,” Journal of Process Control 24(5), pp. 504–516, 2014
17. P.L. Combettes and J.-C. Pesquet. “Proximal splitting methods in signal processing,” Technical report, 2010. URL
http://arxiv.org/abs/0912.3522v4.
18. N. Parikh and S. Boyd, “Proximal algorithms,” Found. Trends Optim 1, pp. 127–239, 2014.
19. R. Rockafellar and J. Wets, “Variational analysis,” Berlin: Springer-Verlag, 3rd ed., 2009.
20. R. Rockafellar, “Convex analysis,” Princeton university press, 1972.
21. Yu. Nesterov, “A method of solving a convex programming problem with convergence rate O(1/k2
),” Soviet
Mathematics Doklady 72(2), pp. 372–376, 1983.
89 / 89

Smart Systems for Urban Water Demand Management

  • 1.
    Smart Systems forUrban Water Demand Management Pantelis Sopasakis joint work with A.K. Sampathirao, P. Patrinos & A. Bemporad. IMT Institute for Advanced Studies Lucca Monte Verit´a, Switzerland, 22-25 Aug 2016
  • 2.
    Today’s talk We willlearn how to: model water networks identify control objectives make decisions under uncertainty formulate MPC problems devise algorithms to solve them parallelise them on GPUs 1 / 89
  • 3.
  • 4.
    Modoller’s todos Modelling and Control ofDWNs PHYSICALPHYSICAL mass balances pressure drops chlorine balances 2 / 89
  • 5.
    Modoller’s todos Modelling and Control ofDWNs PHYSICALPHYSICAL TIME SERIESTIME SERIES mass balances pressure drops chlorine balances seasonal ARIMA BATS models neural networks SVM and other ML 3 / 89
  • 6.
    Modoller’s todos Modelling and Control ofDWNs PHYSICALPHYSICAL TIME SERIESTIME SERIES UNCERTAINTYUNCERTAINTY mass balances pressure drops chlorine balances seasonal ARIMA BATS models neural networks SVM and other ML parametric PDFs scenario trees 4 / 89
  • 7.
    Modoller’s todos Modelling and Control ofDWNs PHYSICALPHYSICAL TIME SERIESTIME SERIES UNCERTAINTYUNCERTAINTY CONSTRAINTSCONSTRAINTS mass balances pressure drops chlorine balances seasonal ARIMA BATS models neural networks SVM and other ML parametric PDFs scenario trees tanks pumps pressure drops 5 / 89
  • 8.
    Modoller’s todos Modelling and Control ofDWNs PHYSICALPHYSICAL TIME SERIESTIME SERIES UNCERTAINTYUNCERTAINTY CONSTRAINTSCONSTRAINTSOBJECTIVESOBJECTIVES mass balances pressure drops chlorine balances seasonal ARIMA BATS models neural networks SVM and other ML parametric PDFs scenario trees tanks pumps pressure drops energy consumption operating cost smoothness of actuation safety storage ` 6 / 89
  • 9.
    Control of waternetworks Controller Drinking Water Network Water demand Electricity prices Measurements Actuation 7 / 89
  • 10.
    Taxonomy of controlmethodologies Open Loop Closed Loop Certainty Equivalent Worst case Stochastic Risk-averse Control of DWNs ● No feedback ● Assumes perfect knowledge ● No contingency plan ● Requires human intervention Model Predictive Control Creasy 1998; Yu et al., 1994; Zessler and Shamir, 1989 8 / 89
  • 11.
    Taxonomy of controlmethodologies Open Loop Closed Loop Certainty Equivalent Worst case Stochastic Risk-averse Control of DWNs ● Feedback compensates for modelling errors Model Predictive Control Creasy 1998; Yu et al., 1994; Zessler and Shamir, 1989 9 / 89
  • 12.
    Taxonomy of controlmethodologies Open Loop Closed Loop Model Predictive Control Certainty Equivalent Worst case Stochastic Risk-averse Control of DWNs ● Suitable for MIMO ● Control under uncertainty ● Goal-driven ● Requires simple model Creasy 1998; Yu et al., 1994; Zessler and Shamir, 1989 10 / 89
  • 13.
    Taxonomy of controlmethodologies Open Loop Closed Loop Certainty Equivalent Worst case Stochastic Risk-averse Control of DWNs ● Model assumed accurate ● Constraints may be violated ● Suboptimal (we can do better) Model Predictive Control Sampathirao et al., 2014; Bakker et al., 2013; Leirens et al., 2010; Ocampo et al., 2009. 11 / 89
  • 14.
    Taxonomy of controlmethodologies Open Loop Closed Loop Certainty Equivalent Worst case Stochastic Risk-averse Control of DWNs ● Pessimistic and conservative ● Leads to small domain of attraction Model Predictive Control Ocampo et al., 2009 and 2010. 12 / 89
  • 15.
    Taxonomy of controlmethodologies Open Loop Closed Loop Certainty Equivalent Worst case Stochastic Risk-averse Control of DWNs ● Makes use of probabilistic info ● Less conservative, more realistic Model Predictive Control Sampathirao et al., 2014; Goryashko and Nemirovski, 2014; Tran and Brdys, 2009, Watkins and McKinney, 1997 13 / 89
  • 16.
    Taxonomy of controlmethodologies Open Loop Closed Loop Certainty Equivalent Worst case Stochastic Risk-averse Control of DWNs ● Beyond the state of art ● Uncertainty in uncertainty Model Predictive Control Sampathirao et al., 2016 14 / 89
  • 17.
    Objectives To MODEL (waterdemands, hydraulics, uncertainty, etc), pose a stochastic predictive CONTROL problem (define objectives, constraints) and devise algorithms to SOLVE it numerically. 15 / 89
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
    Our case study DWNof Barcelona: 63 tanks, 114 pumping stations and valves, 88 demand nodes & 17 pipe intersection nodes. 21 / 89
  • 25.
    Control-oriented models Simple massbalance equation (in discrete time) xk+1 = Axk + Buk + Gddk, 0 = Euk + Eddk, xk: tank volumes, uk: flows (controlled by pumping), dk: demands — along with the constraints xmin ≤ xk ≤ xmax, umin ≤ uk ≤ umax. Sampathirao, Sopasakis et al., 2016, 2014; Wang et al., 2014; Ocampo et al., 2010; Ocampo et al., 2009. 22 / 89
  • 26.
    Control-oriented models   2040 60 80 100 120 2 3 4 5 6 7 x 10 4 d100CFE time (h) m3 20 40 60 80 100 120 200 300 400 500 d114SCL time (h) m3 20 40 60 80 100 120 1000 2000 3000 4000 d115CAST time (h) m3 20 40 60 80 100 120 0.5 1 1.5 x 10 4 d130BAR time (h) m3 20 40 60 80 100 120 500 1000 1500 2000 2500 3000 d132CMF time (h) m3 20 40 60 80 100 120 400 600 800 1000 d135VIL time (h) m3 20 40 60 80 100 120 200 400 600 800 1000 d176BARsud time (h) m3 20 40 60 80 100 120 500 1000 1500 2000 2500 3000 d450BEG time (h) m3 20 40 60 80 100 120 1000 2000 3000 d80GAVi80CAS85 time (h) m3 Simulator Real data Upper limit Safety level Source: EFFINET, deliverable report D2.1 23 / 89
  • 27.
    Demand forecasting Demand predictionconcept: dk+j( j) = ˆdk+j|k + j where 1. dk+j: actual demand at time k + j 2. ˆdk+j|k: prediction of dk+j using info up to time k 3. j: j-step-ahead prediction error and ˆdk+j|k is a function of observable quantities up to time k. Sampathirao, Sopasakis et al., 2016. 24 / 89
  • 28.
    Demand forecasting Common approaches: 1.Neglect the error: ( 0, 1, . . . , N ) (0, 0, . . . , 0) 25 / 89
  • 29.
    Demand forecasting Common approaches: 1.Neglect the error: ( 0, 1, . . . , N ) (0, 0, . . . , 0) 2. Error bounds: ( 0, 1, . . . , N ) ∈ E, e.g., j ∈ [ min j , max j ] 25 / 89
  • 30.
    Demand forecasting Common approaches: 1.Neglect the error: ( 0, 1, . . . , N ) (0, 0, . . . , 0) 2. Error bounds: ( 0, 1, . . . , N ) ∈ E, e.g., j ∈ [ min j , max j ] 3. Independent normal distributions: j ∼ N(mj, σ2 j ) 25 / 89
  • 31.
    Demand forecasting Common approaches: 1.Neglect the error: ( 0, 1, . . . , N ) (0, 0, . . . , 0) 2. Error bounds: ( 0, 1, . . . , N ) ∈ E, e.g., j ∈ [ min j , max j ] 3. Independent normal distributions: j ∼ N(mj, σ2 j ) 4. ( 0, 1, . . . , N ) is random and admits finitely many values 25 / 89
  • 32.
    Error bounds 0 2040 60 80 100 120 140 160 180 200 0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 Time [h] WaterDemandFlow[m 3 /h] Forecasting of Water Demand FuturePast 26 / 89
  • 33.
  • 34.
    Predicted scenarios Time [hr] 43704380 4390 4400 4410 4420 4430 Waterdemand[m 3 /s] 0.01 0.015 0.02 0.025 0.03 0.035 0.04 0.045 0.05 28 / 89
  • 35.
    Control objectives Stage costs: 1.Economic cost: w(uk, k) = Wα(α1 + α2,k) uk We define ∆uk = uk − uk−1 Sampathirao et al., 2014; Cong Cong et al., 2014 29 / 89
  • 36.
    Control objectives Stage costs: 1.Economic cost: w(uk, k) = Wα(α1 + α2,k) uk 2. Smooth operation cost: ∆(∆uk) = ∆ukWu∆uk We define ∆uk = uk − uk−1 Sampathirao et al., 2014; Cong Cong et al., 2014 29 / 89
  • 37.
    Control objectives Stage costs: 1.Economic cost: w(uk, k) = Wα(α1 + α2,k) uk 2. Smooth operation cost: ∆(∆uk) = ∆ukWu∆uk 3. Safe operation cost: S(xk) = Wx [xs − xk]+ We define ∆uk = uk − uk−1 Sampathirao et al., 2014; Cong Cong et al., 2014 29 / 89
  • 38.
    Control objectives Stage costs: 1.Economic cost: w(uk, k) = Wα(α1 + α2,k) uk 2. Smooth operation cost: ∆(∆uk) = ∆ukWu∆uk 3. Safe operation cost: S(xk) = Wx [xs − xk]+ 4. Total cost: = w + ∆ + S. We define ∆uk = uk − uk−1 Sampathirao et al., 2014; Cong Cong et al., 2014 29 / 89
  • 39.
    Model Predictive Control Rawlingsand Mayne, 2009 30 / 89
  • 40.
    Model Predictive Control Rawlingsand Mayne, 2009 31 / 89
  • 41.
    Model Predictive Control Rawlingsand Mayne, 2009 32 / 89
  • 42.
    Model Predictive Control Rawlingsand Mayne, 2009 33 / 89
  • 43.
    Model Predictive Control Rawlingsand Mayne, 2009 34 / 89
  • 44.
    Model Predictive Control Problemformulation minimise π=({uk+j|k}j,{xk+j|k}j) V (π) := N−1 j=0 (xk+j|k, uk+j|k, uk+j−1|k, k), subject to xk+j+1|k = Axk+j|k + Buk+j|k + Gd ˆdk+j|k dynamics Euk+j|k + Ed ˆdk+j|k = 0 algebraic xmin ≤ xk+j|k ≤ xmax vol. constr. umin ≤ uk+j|k ≤ umax flow constr. xk|k = xk, uk−1|k = uk−1 initial cond. 35 / 89
  • 45.
    Worst-case MPC Rawlings andMayne, 2009 36 / 89
  • 46.
    Worst-case MPC Problem formulation minimise π=({uk+j|k}j,{xk+j|k}j) max dk+j|k V(π), subject to dk+j = ˆdk+j|k + j predictions j ∈ Ej err. bounds xk+j+1|k = Axk+j|k + Buk+j|k + Gddk+j dynamics Euk+j|k + Eddk+j = 0 algebraic xmin ≤ xk+j|k ≤ xmax vol. constr. umin ≤ uk+j|k ≤ umax flow constr. xk|k = xk, uk−1|k = uk−1 initial cond. Here uk+j|k is a function of j – not a fixed value! 37 / 89
  • 47.
    Worst-case MPC Attention! Weare looking for control laws (functions) uk+j|k. We may parametrise (why?) these functions as uk+j|k = Kjej + bj, and solve for Kj and bj. There exist other parametrisations as well. 38 / 89
  • 48.
    Worst-case MPC (tube-based) Saferegion Rawlings and Mayne, 2009 39 / 89
  • 49.
    Worst-case MPC (tube-based) Problemformulation minimise π=({uk+j|k}j,{xk+j|k}j) V (π), subject to xk+j+1|k = Axk+j|k + Buk+j|k + Gd ˆdk+j|k dynamics Euk+j|k + Ed ˆdk+j|k = 0 algebraic xk+j|k ∈ X S volume constr. umin ≤ uk+j|k ≤ umax flow constr. xk|k = xk, uk−1|k = uk−1 initial cond. * the constraint Euk+j|k + Eddk+j|k = 0 (certainty-equivalent) will not be satisfied for all j 40 / 89
  • 50.
  • 51.
  • 52.
  • 53.
  • 54.
  • 55.
  • 56.
  • 57.
  • 58.
    Stochastic MPC Problem formulation minimise π=({uk+j|k}j,{xk+j|k}j) EV(π), subject to xk+j+1|k = Axk+j|k + Buk+j|k + Gd ˆdk+j|k( j) dynamics Euk+j|k + Eddk+j( j) = 0 alg. cond. xmin ≤ xk+j|k ≤ xmax vol. constr. umin ≤ uk+j|k ≤ umax flow constr. xk|k = xk, uk−1|k = uk−1 initial cond. again, we’re looking for control laws uk+j|k( j ). 49 / 89
  • 59.
  • 60.
  • 61.
  • 62.
  • 63.
    Scenario-based stochastic MPC Problemformulation: minimise π=({uk+ji|k}i,j,{xk+ji|k}i,j) EV (π) N−1 j=0 µ(j) i=1 pi j i j, subject to xi k+j+1|k=f(x anc(j+1,i) k+j|k , ui k+j|k, di k+j|k) dynamics Eui k+j|k + Ed ˆdi k+j|k = 0 algebraic xmin ≤ xi k+j|k ≤ xmax volume constr. umin ≤ ui k+j|k ≤ umax flow constr. x1 k|k = xk, u1 k−1|k = uk−1 initial cond. 54 / 89
  • 64.
    Stochastic MPC (chanceconstraints) Grosso et al., 2014. 55 / 89
  • 65.
  • 66.
    The proximal operator Letg : IRn → IR ∪ {+∞} be a proper, closed function and γ > 0. Define proxγg(v) = arg min z g(z) + 1 2γ z − v 2 If this is easy to compute we call g prox-friendly. Parikh and Boyd, 2014; Combettes and Pesquet, 2010. 56 / 89
  • 67.
    The proximal operator Example1. Take g(x) = δ(x | C) = 0, if x ∈ C +∞, otherwise Then, proxγg(v) = proj(v | C). Parikh and Boyd, 2014; Combettes and Pesquet, 2010. 57 / 89
  • 68.
    The proximal operator Example2. Take g(x) = d(x | C) = inf y∈C y − x Then, proxλg(v) = v + proj(v|C)−v d(v|C) , if d(v | C) > λ proj(v | C), otherwise Parikh and Boyd, 2014; Combettes and Pesquet, 2010. 58 / 89
  • 69.
    The proximal operator KeyProperty. Suppose g is given as g(x) = κ i=1 gi(xi), Parikh and Boyd, 2014; Combettes and Pesquet, 2010. 59 / 89
  • 70.
    The proximal operator KeyProperty. Suppose g is given as g(x) = κ i=1 gi(xi), then (proxλg(v))i = proxλgi (vi). Parikh and Boyd, 2014; Combettes and Pesquet, 2010. 59 / 89
  • 71.
    Convex Conjugate Let f: IR → IR ∪ {+∞} be convex, proper and closed. We define its convex conjugate as f∗ (y) = sup x x y − f(x) . If f is strongly convex, then f∗ is continuously diff/ble (Rockaffelar and Wets, 2009; Prop. 12.60). 60 / 89
  • 72.
    Convex Conjugate Let f: IR → IR ∪ {+∞} be convex, proper and closed. We define its convex conjugate as f∗ (y) = sup x x y − f(x) . When f∗ is differentiable, then f∗ (y) = arg min z {x y + f(z)}. If f is strongly convex, then f∗ is continuously diff/ble (Rockaffelar and Wets, 2009; Prop. 12.60). 60 / 89
  • 73.
    Convex Conjugate Let f: IR → IR ∪ {+∞} be convex, proper and closed. We define its convex conjugate as f∗ (y) = sup x x y − f(x) . When f∗ is differentiable, then f∗ (y) = arg min z {x y + f(z)}. If f is prox-friendly, then proxλf (v) + λproxλ−1f∗ (λ−1 v) = v. If f is strongly convex, then f∗ is continuously diff/ble (Rockaffelar and Wets, 2009; Prop. 12.60). 60 / 89
  • 74.
    Forward-Backward Splitting The forward-backwardsplitting is the representation of an optimisation problem as follows minimise z f(z) + g(z), where f, g: closed, convex f: diff/ble with Lipschitz gradient g: prox-friendly FB Splittings are not unique. 61 / 89
  • 75.
    Forward-Backward Splitting Example 1.1-regularized least squares: minimise z 1 2 Az − b 2 + z 1. 62 / 89
  • 76.
    Forward-Backward Splitting Example 2.Box-constrained QP minimise z 1 2z Qz + q z + δ(z | C), where C = {z : zmin ≤ z ≤ zmax}. 63 / 89
  • 77.
    Forward-Backward Splitting Example 3.Constrained QP minimise z 1 2z Qz + q z + δ(Hz | C). but, g(z) := δ(Hz | C) is not prox-friendly! 64 / 89
  • 78.
    Dual optimisation problem Ifg(z) is prox-friendly, but g(Hz) is not we may formulate the dual optimisation problem Fenchel duality generalises Lagrangian duality (Rockafellar, 1972). 65 / 89
  • 79.
    Dual optimisation problem Ifg(z) is prox-friendly, but g(Hz) is not we may formulate the dual optimisation problem Under certain conditions these two problems have the same minimum and z = f∗ (−H y ). Fenchel duality generalises Lagrangian duality (Rockafellar, 1972). 65 / 89
  • 80.
    Proximal gradient algorithm Theproximal gradient method for solving minimise z f(z) + g(z) where f is differentiable with L-Lipschitz gradient runs zν+1 = proxγg(zν − γ f(zν )), with γ ∈ (0, L−1). 66 / 89
  • 81.
    Dual proximal gradientalgorithm The proximal gradient method applied to the dual minimise z f∗ (−H y) + g∗ (y) where f∗ is differentiable with L-Lipschitz gradient is yν+1 = proxγg∗ (yν + γH f∗ (−H yν )) If f is L−1 -strongly convex, then f∗ has L-Lipschitz gradient. 67 / 89
  • 82.
    Dual proximal gradientalgorithm The dual proximal gradient method yν+1 = proxγg∗ (yν + γH f∗ (−H yν )) can be written as zν = f∗ (−H yν ) tν = proxλ−1g(λ−1 yν + Hzν ) yν+1 = yν + λ(Hzν − tν ). 68 / 89
  • 83.
    Dual proximal gradientalgorithm Nesterov’s accelerated proximal gradient method converges as O(1/k2) instead of O(1/k): wν = yν + θν(θ−1 ν−1 − 1)(yν − yν−1 ) zν = f∗ (−H wν ) tν = proxλ−1g(λ−1 wν + Hzν ) yν+1 = wν + λ(Hzν − tν ) θν+1 = 1 2( θ4 ν + 4θ2 ν − θ2 ν) with θ0 = θ−1 = 1 and y0 = y−1 = 0 (Nesterov, 1983). 69 / 89
  • 84.
    The DWN controlproblem P : minimise π=({uk+ji|k}i,j,{xk+ji|k}i,j) EV (π) N−1 j=0 µ(j) i=1 pi j i j, subject to xi k+j+1|k=f(x anc(j+1,i) k+j|k , ui k+j|k, di k+j|k) dynamics Eui k+j|k + Ed ˆdi k+j|k = 0 algebraic xmin ≤ xi k+j|k ≤ xmax volume constr. umin ≤ ui k+j|k ≤ umax flow constr. x1 k|k = xk, u1 k−1|k = uk−1 initial cond. We will write this problem as: minimisezf(z) + g(Hz). 70 / 89
  • 85.
    The DWN controlproblem Let z = {xi j, ui j} and define f(z) = N−1 j=0 µ(j) i=1 pi j( w (ui j) + ∆ (∆ui j)) + δ(ui j|Φ1(di j)) + δ(xi j+1, ui j, x anc(j+1,i) j |Φ2(di j)), where Φ1(d) = {u : Eu + Edd = 0} and Φ2(d) = {(x+ , x, u) : x+ = Ax + Bu + Gdd} Sampathirao et al., 2016. 71 / 89
  • 86.
    The DWN controlproblem In other words: f(z) = smooth cost + dynamics + alg equations and g(z) = all the rest = nonsmooth cost + constraints = N−1 j=0 µ(j) i=1 S (xi j) + δ(xi j | X) + δ(ui j | U), but this g is not prox-friendly (it is not separable!). Sampathirao et al., 2016. 72 / 89
  • 87.
    The DWN controlproblem We create a copy of {xi j}j,i which we denote by χi j and introduce t = ({xi j}j,i, {χi j}j,i, {ui j}j,i) with xi j = χi j. Then g(t) = N−1 j=0 µ(j) i=1 S (xi j) + δ(χi j | X) + δ(ui j | U) is prox-friendly. It is t = Hz. 73 / 89
  • 88.
    Dual gradient computation Tocompute the dual gradient we use f∗ (y) = arg min z {x y + f(z)} = arg min z:dynamics Eui j+Eddi j=0 {x y + j,i quadratic(zi j)} This is an equality-constrained quadratic problem which can be solved very efficiently using dynamic programming. 74 / 89
  • 89.
  • 90.
    Dual gradient computation MV+ Sum MV + Sum MV + Sum 76 / 89
  • 91.
  • 92.
    Dual gradient computation MV+ Sum MV + Sum 78 / 89
  • 93.
  • 94.
  • 95.
  • 96.
  • 97.
  • 98.
  • 99.
    it is fast #scenarios 100 200 300 400 500 Runtime(s) 0 200 400 600 800 1000 1200 Gurobi APG (500 iterations) 0 100 200 300 400 500 Runtimeslope 0 2 4 84 / 89
  • 100.
    it is efficient Numberof scenarios 50 100 150 200 250 300 KPIE /1000 1.55 1.6 1.65 1.7 1.75 1.8 KPIS /1000 1 2 3 4 5 6KPI E KPIS 85 / 89
  • 101.
    Closed-loop simulations 20 4060 80 100 120 140 160 Controlaction[%] 0 0.2 0.4 0.6 0.8 Time [hr] 20 40 60 80 100 120 140 160 WaterCost[e.u.] 60 70 80 90 86 / 89
  • 102.
  • 103.
    Open problems Nonlinear Problem: introducenonlinear pressure drop equations 87 / 89
  • 104.
    Open problems Nonlinear Risk-averse Challenge: thedistribution of future errors is not exactly known 87 / 89
  • 105.
    Open problems Nonlinear Risk-averse Distributed Problems: spatialdecomposition, communication constraints 87 / 89
  • 106.
    Open problems Nonlinear Risk-averse Distributed Robust EconomicMPC Questions: performance guarantees, recursive feasibility 87 / 89
  • 107.
    Open problems Nonlinear Risk-averse Distributed Robust EconomicMPC Faster Algorithms Ongoing work: quasi-Newtonian LBFGS-type algorithms 87 / 89
  • 108.
    Thank you foryour attention!
  • 109.
    References (i) 1. A.Sampathirao, P. Sopasakis, A. Bemporad, and P. Patrinos, “Fast parallelizable scenario-based stochastic optimization,” EUCCO 2016, Leuven, Belgium, 2016. 2. A. Sampathirao, P. Sopasakis, A. Bemporad, and P. Patrinos, “GPU-accelerated stochastic predictive control of drinking water networks,” IEEE CST (submitted, provisionally accepted), 2016 (on arXiv). 3. A. Sampathirao, J. Grosso, P. Sopasakis, C. Ocampo-Martinez, A. Bemporad, and V. Puig, “Water demand forecasting for the optimal operation of large-scale drinking water networks: The Barcelona case study,” 19th IFAC World Congress, pp. 10457–10462, 2014. 4. A. Sampathirao, P. Sopasakis, A. Bemporad, and P. Patrinos, “Distributed solution of stochastic optimal control problems on GPUs, 54th IEEE Conf. Decision and Control, (Osaka, Japan), Dec 2015. 5. A. Sampathirao, P. Sopasakis, A. Bemporad, and P. Patrinos, “Proximal Quasi-Newton Methods for Scenario-based Stochastic Optimal Control,” IFAC 2017 (submitted). 6. M. Bakker, J. H. G. Vreeburg, L. J. Palmen, V. Sperber, G. Bakker, and L. C. Rietveld, “Better water quality and higher energy efficiency by using model predictive flow control at water supply systems,” J Wat Supply: Research & Technology – Aqua, 62(1), pp. 1–13, 2013. 7. S. Leirens, C. Zamora, R. Negenborn, and B. De Schutter, “Coordination in urban water supply networks using distributed model predictive control,” ACC 2010, (Baltimore, USA), pp. 3957–3962, 2010. 8. C. Ocampo-Martinez, V. Puig, G. Cembrano, R. Creus, and M. Minoves, “Improving water management efficiency by using optimization-based control strategies: the barcelona case study,” Water Science and Technology: Water Supply, 9(5), pp. 565–575, 2009. 9. C. Ocampo-Martinez, V. Fambrini, D. Barcelli, and V. Puig, “Model predictive control of drinking water networks: A hierarchical and decentralized approach,” ACC 2010, (Baltimore, USA), pp. 3951–3956, 2010. 10. A. Goryashko and A. Nemirovski, “Robust energy cost optimization of water distribution system with uncertain demand,” Automation and Remote Control 75(10), pp. 1754–1769, 2014. 11. U. Zessler and U. Shamir, “Optimal operation of water distribution systems,” J Wat Resour Plan & Mngmt, 115(6), pp. 735–752, 1989. 88 / 89
  • 110.
    References (ii) 12. G.Yu, R. Powell, and M. Sterling, “Optimized pump scheduling in water distribution systems,” J Optim Theory & Appl, 83(3), pp. 463–488, 1994. 13. V. Tran and M. Brdys, “Optimizing control by robustly feasible model predictive control and application to drinking water distribution systems,” Artificial Neural Networks – ICANN 2009, vol. 5769 of Lecture Notes in Computer Science, pp. 823–834, Springer, 2009. 14. J. Watkins, D. and D. McKinney, “Finding robust solutions to water resources problems,” J Wat Res Plan & Mngmt 123(1), pp. 49–58, 1997. 15. S. Cong Cong, S. Puig, and G. Cembrano, “Combining CSP and MPC for the operational control of water networks: Application to the Richmond case study,” 19th IFAC World Congress, (Cape Town), pp. 6246–6251, 2014. 16. J. Grosso, C. Ocampo-Mart nez, V. Puig, and B. Joseph, “Chance-constrained model predictive control for drinking water networks,” Journal of Process Control 24(5), pp. 504–516, 2014 17. P.L. Combettes and J.-C. Pesquet. “Proximal splitting methods in signal processing,” Technical report, 2010. URL http://arxiv.org/abs/0912.3522v4. 18. N. Parikh and S. Boyd, “Proximal algorithms,” Found. Trends Optim 1, pp. 127–239, 2014. 19. R. Rockafellar and J. Wets, “Variational analysis,” Berlin: Springer-Verlag, 3rd ed., 2009. 20. R. Rockafellar, “Convex analysis,” Princeton university press, 1972. 21. Yu. Nesterov, “A method of solving a convex programming problem with convergence rate O(1/k2 ),” Soviet Mathematics Doklady 72(2), pp. 372–376, 1983. 89 / 89