SlideShare uma empresa Scribd logo
1 de 33
Modelling	
  &	
  Control	
  of	
  Drinking	
  Water	
  Networks	
  
Pantelis	
  Sopasakis,	
  IMTL	
  	
  
The	
  Closed	
  Loop	
  
	
  
Energy	
  Price	
  
Water	
  Demand	
  
DWN	
  
Model	
  Predic?ve	
  
Controller(s)	
  
(running	
  on	
  GPUs+CPUs)	
  
Online	
  
Measurements	
  
Flow	
  
Pressure	
  
Quality	
  
Forecast	
  
Module	
  
Historical	
  Data	
  
Data	
  Valida?on	
  
Module	
  
Validated	
  
Measurements	
  
The	
  Closed	
  Loop	
  
1.	
  Time-­‐series	
  
Stochas4c	
  Models	
  
2.	
  Hydraulic	
  Model	
  of	
  
the	
  DWN	
  
3.	
  Pressure	
  
Constraints	
  
4.	
  Model	
  Predic4ve	
  
Controllers	
  
	
  
Energy	
  Price	
  
Water	
  Demand	
  
DWN	
  
Model	
  Predic?ve	
  
Controller(s)	
  
(running	
  on	
  GPUs+CPUs)	
  
Online	
  
Measurements	
  
Flow	
  
Pressure	
  
Quality	
  
Forecast	
  
Module	
  
Historical	
  Data	
  
Data	
  Valida?on	
  
Module	
  
Validated	
  
Measurements	
  
Requirements	
  
Requirements	
  of	
  WP2:	
  
Involved	
  Partners:	
  IMTL,	
  IRI,	
  AASI,	
  SGAB,	
  WBL	
  
•  Construct	
  models	
  for	
  MPC	
  (Model	
  Predic?ve	
  
Control),	
  based	
  on	
  mass-­‐balance	
  equa?ons	
  
accompanied	
  by	
  constraints,	
  
•  Define	
  risk-­‐sensi?ve	
  cost	
  func?ons	
  to	
  be	
  
op?mised,	
  
•  Devise	
  stochas?c	
  models	
  for	
  the	
  water	
  demand,	
  
•  Develop	
  stochas?c	
  models	
  for	
  the	
  energy	
  prices	
  
in	
  the	
  day-­‐ahead	
  market.	
  
Implementa4on:	
  
•  Prototype	
  applica?on	
  in	
  MATLAB/Simulink,	
  
•  Control-­‐Oriented	
  models	
  available	
  in	
  MATLAB.	
  
Control-­‐Oriented	
  Modelling	
  
The	
  mass-­‐balance	
  equa?ons	
  of	
  the	
  water	
  
network	
  yield	
  an	
  Linear	
  Time-­‐Invariant	
  
dynamical	
  model	
  in	
  the	
  following	
  form:	
  	
  
Disturbance	
  Model	
  (Stochas?c):	
  
Note:	
  The	
  uncertainty	
  is	
  considered	
  to	
  be	
  
bounded	
  and	
  possibly	
  discrete.	
  
The	
  demand	
  requirements	
  can	
  be	
  cast	
  as	
  
equality	
  constraints:	
  
The	
  state	
  and	
  input	
  variables	
  are	
  bounded	
  in	
  
convex	
  sets	
  (usually	
  boxes):	
  
xk 2 X, 8k 2 N
uk 2 U, 8k 2 N
Alterna?vely,	
  we	
  may	
  impose	
  
bounds	
  on	
  the	
  probability	
  of	
  
cosntraints’	
  viola?on,	
  e.g.,	
  	
  
xk+1 = Axk + Buk + Gddk
yk = xk
Euk + Eddk = 0
dk|k = dk
dk+i+1|k = ˆdk+i|k + ✏k+i|k
✏k ⇠ Ek
prob(xk 2 X) ✓x,
8k 2 N
J.	
  M.	
  Grosso,	
  C.	
  Ocampo-­‐Matrínez	
  and	
  V.	
  Puig	
  (2013),	
  Learning-­‐based	
  tuning	
  of	
  supervisory	
  model	
  predic4ve	
  control	
  for	
  drinking,	
  
Engineering	
  Applica?ons	
  of	
  Ar?ficial	
  Intelligence,	
  In	
  Print.	
  
Demand	
  Forecas?ng	
  
Ini4al	
  Observa4ons:	
  
•  Non-­‐sta4onarity:	
  Apparently	
  
seasonally	
  governed	
  paNern,	
  
•  ACF	
  (AutoCorrela?on	
  Func?on):	
  
Rather	
  high	
  MA	
  content	
  
•  PACF	
  (Par?al	
  ACF):	
  High	
  AR	
  content	
  
Demand	
  Forecas?ng	
  
Ini4al	
  Observa4ons:	
  
•  Non-­‐sta?onarity:	
  Apparently	
  
seasonally	
  governed	
  pacern,	
  
•  ACF	
  (AutoCorrela4on	
  Func4on):	
  
Rather	
  high	
  MA	
  content	
  
•  PACF	
  (Par?al	
  ACF):	
  High	
  AR	
  content	
  
Demand	
  Forecas?ng	
  
Ini4al	
  Observa4ons:	
  
•  Non-­‐sta?onarity:	
  Apparently	
  
seasonally	
  governed	
  pacern,	
  
•  ACF	
  (AutoCorrela?on	
  Func?on):	
  
Rather	
  high	
  MA	
  content	
  
•  PACF	
  (Par4al	
  ACF):	
  High	
  AR	
  content	
  
Demand	
  Forecas?ng	
  
Ini4al	
  Observa4ons:	
  
•  Non-­‐sta?onarity:	
  Apparently	
  
seasonally	
  governed	
  pacern,	
  
•  ACF:	
  Rather	
  high	
  MA	
  content	
  
•  PACF:	
  High	
  AR	
  content	
  
Numerical	
  
Experiments	
  
SARIMA(
AR
z }| {
{1 : 4, 6 : 9},
I
z}|{
1 ,
MA
z }| {
{1 : 13, 15, 17};
s
z}|{
168 )⇥
SAR({168, 336})
SARIMA(
AR
z }| {
{1 : 4, 6 : 9},
I
z}|{
1 ,
MA
z }| {
{1 : 13, 15, 17};
s
z}|{
168 )⇥
SAR({168, 336})
About	
  this	
  model:	
  
-­‐  Exhibits	
  the	
  lowest	
  pMSE*	
  (0.1049)	
  and	
  pRMSE	
  
(0.3239)	
  amongst	
  other	
  tested	
  models	
  
-­‐  Combines	
  simplicity	
  with	
  predic?ve	
  power:	
  the	
  
lowest	
  AIC	
  (Akaike	
  Informa?on	
  Criterion)	
  value	
  
(-­‐8.50)	
  and	
  SC	
  (-­‐8.45)	
  
-­‐  It	
  is	
  inver?ble	
  
-­‐  Its	
  residuals	
  pass	
  the	
  Ljung-­‐Box	
  test	
  for	
  
uncorrelated	
  residuals	
  with	
  p-­‐value	
  0.29.	
  
-­‐  Its	
  parameters	
  were	
  determined	
  with	
  high	
  
sta?s?cal	
  certainty.	
  
	
  
However:	
  
-­‐  It	
  fails	
  to	
  pass	
  the	
  Kolmogorov-­‐Smirnov	
  test	
  for	
  
normality.	
  
* pMSE : Prediction Mean Square Error
Demand	
  Forecas?ng	
  
d
(!)
k =
(
d
(!)
k 1
! , ! 6= 0,
log (dk) , ! = 0,
d
(!)
k = lk 1 + bk 1 +
PX
i=1
s
(i)
k mi
+ hk,
lk = lk 1 + bk 1 + ↵dhk,
bk = bk 1 + dhk,
s
(i)
k = s
(i)
k mi
+ d,ihk,
hk =
pX
i=1
'ihk i +
qX
i=1
✓i"k i + "k.
B	
  	
  A	
  	
  T	
  	
  S	
  
Box-­‐Cox	
  
Transforma?on	
  
Trend	
  
ARMA	
  
Errors	
  
Seasonal	
  
Mul4seasonal	
  
decomposi4on	
  of	
  the	
  
4me	
  series.	
  
J.	
  M.	
  Grosso,	
  C.	
  Ocampo-­‐Matrínez	
  and	
  V.	
  Puig	
  (2013),	
  Learning-­‐based	
  tuning	
  of	
  supervisory	
  model	
  predic4ve	
  control	
  for	
  drinking,	
  
Engineering	
  Applica?ons	
  of	
  Ar?ficial	
  Intelligence,	
  In	
  Print.	
  
Demand	
  Forecas?ng	
  
d
(!)
k =
(
d
(!)
k 1
! , ! 6= 0,
log (dk) , ! = 0,
d
(!)
k = lk 1 + bk 1 +
PX
i=1
s
(i)
k mi
+ hk,
lk = lk 1 + bk 1 + ↵dhk,
bk = bk 1 + dhk,
s
(i)
k = s
(i)
k mi
+ d,ihk,
hk =
pX
i=1
'ihk i +
qX
i=1
✓i"k i + "k.
B	
  	
  A	
  	
  T	
  	
  S	
  
Box-­‐Cox	
  
Transforma?on	
  
Trend	
  
ARMA	
  
Errors	
  
Seasonal	
  
Distribu4on	
  of	
  the	
  	
  
residuals	
  
A.M.	
  De	
  Livera,	
  R.J.	
  Hyndman,	
  and	
  R.D.	
  Snyder	
  (2011),	
  Forecas4ng	
  4me	
  series	
  with	
  complex	
  seasonal	
  paNerns	
  using	
  exponen4al	
  
smoothing,	
  Journal	
  of	
  the	
  American	
  Sta?s?cal	
  Associa?on,	
  106(496),	
  1513–1527.	
  	
  
Model	
  Predic?ve	
  Control	
  
•  Op?mal	
  Control	
  Strategy	
  
•  Sa?sfac?on	
  of	
  state	
  and	
  input	
  constraints	
  
•  Perfectly	
  fit	
  for	
  real-­‐life	
  applica?ons:	
  Works	
  with	
  
inaccurate	
  models	
  &	
  in	
  presense	
  of	
  disturbances.	
  
J.	
  B.	
  Rawlings	
  and	
  D.	
  Q.	
  Mayne	
  (2009),	
  Model	
  predic4ve	
  control:	
  theory	
  and	
  design,	
  Nob	
  Hil	
  Publishing.	
  
Cost	
  Func?ons	
  
Goal:	
  Introduce	
  cost	
  funcPons	
  so	
  as	
  to:	
  
	
  
o  Minimise	
  the	
  total	
  energy	
  consump?on	
  
o  Minimise	
  varia?ons	
  of	
  the	
  control	
  signal	
  (A	
  motor	
  consumes	
  6	
  to	
  
8	
  ?mes	
  its	
  nominal	
  opera?ng	
  current	
  on	
  startup)	
  
o  Op?mise	
  the	
  performance	
  of	
  the	
  water	
  network	
  
o  (Try	
  to)	
  Stay	
  over	
  minimum	
  safety	
  volume.	
  
JHu,Hp (xk, uk, k) =
Electricity
z }| {X
i2N[0,Hu]
`w
(uk+i|k, k) +
Smooth Operation
z }| {X
i2N[0,Hu 1]
` ( uk+i|k)
+
X
i2N[0,Hp 1]
`S
(sk+i|k)
| {z }
Safety Storage
Cost	
  Func?ons	
  
`w
(uk, ↵k) , k↵kukk1
`s
(xk) = k[xs
xk]+k2
Wx
Goal:	
  Introduce	
  cost	
  funcPons	
  so	
  as	
  to:	
  
	
  
o  Minimise	
  the	
  total	
  energy	
  consump?on	
  
o  Minimise	
  varia?ons	
  of	
  the	
  control	
  signal	
  (A	
  motor	
  consumes	
  6	
  to	
  
8	
  ?mes	
  its	
  nominal	
  opera?ng	
  current	
  on	
  startup)	
  
o  Op?mise	
  the	
  performance	
  of	
  the	
  water	
  network	
  
o  (Try	
  to)	
  Stay	
  over	
  minimum	
  safety	
  volume.	
  
` ( uk) , k ukk2
Wu
The	
  MPC	
  Problem	
  
P†
Hp,Hu
(xk, dk, k) :
J?
Hu,Hp
(xk, dk, k) = min
uk,⌅k
JHu,Hp
(xk, uk, ⌅k, uk, k)
subject to:
xmin
 xk+i|k  xmax
, 8i 2 N[1,Hp 1]
umin
 uk+i|k  umax
, 8i 2 N[0,Hu]
xk+i+1|k = Axk+i|k + Buk+i|k + Gd
ˆdk+i|k, 8i 2 N[0,Hp 1]
Euk+i|k + Ed
ˆdk+i|k = 0, 8i 2 N[0,Hu]
uk+j|k = uk+Hu|k, 8j 2 N[Hu+1,Hp 1]
⇠k+i|k xmax
xk+i|k, 8i 2 N[0,Hp]
⇠k+i|k 0, 8i 2 N[0,Hp]
ˆdk|k = dk
xk|k = xk
Given	
  the	
  current	
  (measured)	
  state	
  of	
  the	
  system,	
  the	
  current	
  demand	
  and	
  a	
  
sequence	
  of	
  predicted	
  demands,	
  solve	
  the	
  following	
  op?misa?on	
  problem:	
  
Constraints	
  
Op?misa?on	
  Problem	
  
C.	
  Ocampo-­‐Matrínez,	
  V.	
  Puig,	
  G.	
  Cembrano,	
  R.	
  Creus	
  and	
  M.	
  Milnoves	
  (2009),	
  Improving	
  water	
  management	
  efficiency	
  by	
  using	
  
op4miza4on-­‐based	
  control	
  strategies:	
  The	
  Barcelona	
  Case	
  Study,	
  Water	
  Sci	
  &	
  Tech:	
  Water	
  Supply,	
  9(5),	
  565-­‐575.	
  
The	
  MPC	
  Problem	
  
Given	
  the	
  current	
  (measured)	
  state	
  of	
  the	
  system,	
  the	
  current	
  demand	
  and	
  a	
  
sequence	
  of	
  predicted	
  demands,	
  solve	
  the	
  following	
  op?misa?on	
  problem:	
  
This	
  can	
  be	
  formulated	
  as	
  a	
  
Constrained	
  QP	
  problem:	
  
J?
Hu,Hp
(xk, dk, k) = min
y
V (y)
subject to:
Gy = (dk)
Fy  (xk, dk)
yl  y  yh
from	
  which	
  the	
  control	
  acPon	
  
is	
  calculated	
  and	
  applied	
  to	
  
the	
  system.	
  
C.	
  Ocampo-­‐Matrínez,	
  V.	
  Puig,	
  G.	
  Cembrano,	
  R.	
  Creus	
  and	
  M.	
  Milnoves	
  (2009),	
  Improving	
  water	
  management	
  efficiency	
  by	
  using	
  
op4miza4on-­‐based	
  control	
  strategies:	
  The	
  Barcelona	
  Case	
  Study,	
  Water	
  Sci	
  &	
  Tech:	
  Water	
  Supply,	
  9(5),	
  565-­‐575.	
  
The	
  MPC	
  Problem	
  
System	
  Size:	
  
63	
  states	
  
114	
  inputs	
  
88	
  disturbances	
  
Computa4onal	
  Time:	
  
Formula?on:	
  2.21	
  s	
  
Update:	
  0.055	
  s	
  
Solu?on:	
  1.85	
  s	
  
Closed-­‐Loop	
  Simula?ons	
  in	
  15	
  LOC!	
  
Op4misa4on	
  Problem	
  Size:	
  	
  
~4.2k	
  decision	
  variables	
  
~4.5k	
  affine	
  inequali?es	
  
~1.5	
  bound	
  constraints	
  
~400	
  equality	
  constraints	
  
E.	
  Caini,	
  V.	
  Puig	
  and	
  G.	
  Cembrano	
  (2009),	
  Development	
  of	
  a	
  simula4on	
  environment	
  for	
  Water	
  Drinking	
  Networks:	
  Applica4on	
  to	
  the	
  Valida4on	
  
of	
  a	
  Centralized	
  MPC	
  Controller	
  for	
  the	
  Barcelona	
  Case	
  Study,	
  Technical	
  Report,	
  IRI-­‐TR-­‐09-­‐03,	
  UPC/IRI.	
  
Closed-­‐loop	
  Simula?ons	
  
The	
  predic4on	
  error	
  affects	
  
the	
  shape	
  of	
  the	
  closed-­‐loop	
  
trajectories…	
  
MPC	
  with	
  a	
  perfect	
  predictor	
  
Closed-­‐loop	
  Simula?ons	
  
MPC	
  Control	
  Ac4ons	
  using	
  a	
  Seasonal	
  
ARIMA	
  predictor.	
  
MPC	
  with	
  a	
  perfect	
  predictor	
  
Closed-­‐loop	
  Simula?ons	
  
€579.1
€593.4
MPC	
  with	
  a	
  perfect	
  predictor	
   MPC:	
  demand	
  forecas4ng	
  with	
  an	
  ARIMA	
  model	
  
Closed-­‐loop	
  Simula?ons	
  
PMSEHp,k =
Hp
X
i=0
( ˆdk+i|k dk+i)2
Inaccurate	
  Predic?ons	
  
Open	
  Issues	
  
•  Formula?on	
  of	
  Control	
  problems	
  for	
  other	
  objec?ves	
  (leak	
  isola?on,	
  quality	
  
control)	
  
•  Demand	
  Forecas?ng:	
  Exogenous	
  T.S.	
  Analysis	
  (JM).	
  
•  Numerical	
  Issues:	
  The	
  Hessian	
  appears	
  to	
  be	
  near-­‐singular	
  	
  
Becer	
  precondi?oning	
  is	
  necessary	
  
•  Other	
  formula?ons	
  of	
  the	
  QP	
  to	
  be	
  examined	
  
•  The	
  MPC	
  control	
  law	
  should	
  be	
  recursively	
  feasible	
  
•  Formula?on	
  of	
  a	
  robust	
  control	
  problem	
  
•  Incorpora?on	
  of	
  nonlinear	
  pressure	
  constraints	
  
•  Experiment	
  with	
  Fast	
  MPC	
  methods	
  
•  Design	
  &	
  Establishment	
  of	
  an	
  API	
  
Hessian’s sparsity
pattern
Risk-­‐Sensi?ve	
  Cost	
  Func?ons	
  
J(xk, uk, ⌅k, uk, k) =
(E + cD) {J(xk, uk, ⌅k, uk, k)}
Mean-­‐Risk	
  Cost	
  Func?on	
  
DJ = V @R↵(J)
= inf
t
{prob(J  t) 1 ↵}
for	
  instance:	
  
J?
(xk, dk, k) = min
uk,⌅k
J(xk, uk, ⌅k, uk, k)
subject to:
prob(xmin
 xk+i|k  xmax
) ✓x, 8i 2 N[1,Hp 1]
etc.
where:	
  
Chance	
  Constraints	
  
Measure	
  of	
  Dispersion	
  
Acknowledgements	
  
•  Juan	
  Manuel	
  Grosso	
  Pérez,	
  UPC	
  
•  Ajay	
  Kumar	
  Sampathirao,	
  IMTL	
  
•  Carlos	
  Ocampo-­‐Marqnez,	
  UPC	
  
•  Vicenç	
  Puig,	
  UPC	
  
Thank you for your attention!
Appendix	
  
•  Invariance	
  and	
  Feasibility	
  Analysis	
  
•  Fast	
  computa?on	
  of	
  the	
  op?mal	
  solu?on	
  
•  Addi?onal	
  Diagrams	
  
Feasibility	
  Analysis	
  
dk+1|k = ˆdk+1|k + ✏k
ARIMA	
  es?mate:	
   ˆdk+1|k =
LX
i=0
↵idk i|k ) pk+1|k = Kpk + M✏k
Bounded	
  Error	
  
pk =
2
6
6
6
4
dk
dk 1
...
dk L
3
7
7
7
5 K =
2
6
6
6
6
6
4
↵0 ↵1 · · · ↵L 1 ↵L
1 0 · · · 0 0
0 1 · · · 0 0
...
...
...
0 0 · · · 1 0
3
7
7
7
7
7
5

xk+i+1|k
pk+i+1|k
| {z }
#k+i+1|k
=

A ¯Gd
0 K
| {z }

xk+i|k
pk+i|k
| {z }
#k+i|k
+

B
0
| {z }
⌦
uk+i|k +

0
M
| {z }
R
✏k+i|k
RewriPng	
  the	
  ARIMA	
  model	
  
in	
  state	
  space	
  form…	
  
Feasibility	
  Analysis	
  
#k+i+1|k = #k+i|k + ⌦uk+i|k + R✏k+i|k
✏k+i|k 2 E ⇢⇢ R
S
X ⇥ Rnd(L+1)
( # + ⌦u) RE
#
S ✓ Pre(S)
For	
   the	
   set	
   S	
   to	
   be	
   robustly	
   control	
  
invariant,	
  the	
  following	
  has	
  to	
  hold	
  true:	
  
But	
  we	
  should	
  keep	
  in	
  mind	
  that	
  p	
  is	
  the	
  
uncontrollable	
  part	
  of	
  the	
  system,	
  i.e.,	
  :	
  
p+
= Kp + M✏
Dimension:	
  ~70.000	
  
So	
   in	
   order	
   to	
   find	
   such	
   as	
   a	
   (nonempty)	
  
set	
  S,	
  it	
  is	
  necessary	
  that	
  the	
  trajectory	
  of	
  
p	
  is	
  bounded	
  for	
  all	
  ε.	
  
*	
  The	
  feasibility	
  analysis	
  with	
  the	
  
assumpPon	
  that	
  the	
  predictor	
  is	
  
accurate	
  is	
  easier.	
  
Feasibility	
  Analysis	
  
Expanding	
  predic4on	
  error:	
  
Impossible	
  to	
  guarantee	
  recursive	
  
feasibility!	
  But,	
  we	
  know	
  that	
  the	
  
disturbance	
  is	
  bounded!	
  
	
  
d 2 D = {d|Cd  g}
Thus,	
  the	
  predic?on	
  error	
  has	
  to	
  be	
  
bounded	
  as	
  follows:	
  
✏ 2 E(p) =
⇢
✏
CM✏  g CKp
|✏|  ✏max , (✏, p) 2 gph(E)
We	
  then	
  need	
  to	
  determine	
  a	
  set	
  S	
  so	
  that:	
  
2
4
x
p
✏
3
5 2 S )
2
4
x+
p+
✏
3
5 2 S, 8(✏, p) 2 gph(E)
J?
Hu,Hp
(xk, dk, k) = min
uk,⌅k
JHu,Hp
(xk, uk, ⌅k, uk, k)
subject to:
Box Constraints:
⇢
xmin
 xk+i|k  xmax
, 8i 2 N[1,Hp 1]
umin
 uk+i|k  umax
, 8i 2 N[0,Hu]
xk+i+1|k = Ixk+i|k + Buk+i|k + Gd
ˆdk+i|k, 8i 2 N[0,Hp 1]
Euk+i|k + Ed
ˆdk+i|k = 0, 8i 2 N[0,Hu]
uk+j|k = uk+Hu|k, 8j 2 N[Hu+1,Hp 1]
⇠k+i|k xmax
xk+i|k, 8i 2 N[0,Hp]
⇠k+i|k 0, 8i 2 N[0,Hp]
Fast	
  Solu?on	
  Methods	
  
There	
  are	
  certain	
  characteris?cs	
  of	
  the	
  op?misa?on	
  problem	
  that	
  can	
  be	
  exploited	
  
to	
  accelerate	
  the	
  computa?on	
  of	
  the	
  op?mal	
  solu?on:	
  
E	
  and	
  Ed	
  are	
  	
  
very	
  sparse	
  
P.	
  Patrinos,	
  P.	
  Sopasakis	
  and	
  .	
  Sarimveis	
  (2011),	
  A	
  global	
  piecewise	
  smooth	
  Newton	
  method	
  for	
  fast	
  large-­‐scale	
  model	
  predic4ve	
  control,	
  
Automa?ca	
  47,	
  2016-­‐2022.	
  
Simula?ons	
  
Topology	
  of	
  Barcelona’s	
  DWN	
  

Mais conteúdo relacionado

Destaque

Destaque (20)

Just Another QSAR Project under OpenTox
Just Another QSAR Project under OpenToxJust Another QSAR Project under OpenTox
Just Another QSAR Project under OpenTox
 
Water demand forecasting for the optimal operation of large-scale water networks
Water demand forecasting for the optimal operation of large-scale water networksWater demand forecasting for the optimal operation of large-scale water networks
Water demand forecasting for the optimal operation of large-scale water networks
 
Drinking Water Networks: Challenges and opportunites
Drinking Water Networks: Challenges and opportunitesDrinking Water Networks: Challenges and opportunites
Drinking Water Networks: Challenges and opportunites
 
HMPC for Upper Stage Attitude Control
HMPC for Upper Stage Attitude ControlHMPC for Upper Stage Attitude Control
HMPC for Upper Stage Attitude Control
 
Fast parallelizable scenario-based stochastic optimization
Fast parallelizable scenario-based stochastic optimizationFast parallelizable scenario-based stochastic optimization
Fast parallelizable scenario-based stochastic optimization
 
Sloshing-aware MPC for upper stage attitude control
Sloshing-aware MPC for upper stage attitude controlSloshing-aware MPC for upper stage attitude control
Sloshing-aware MPC for upper stage attitude control
 
Set convergence
Set convergenceSet convergence
Set convergence
 
EFFINET - Initial Presentation
EFFINET - Initial PresentationEFFINET - Initial Presentation
EFFINET - Initial Presentation
 
Accelerated reconstruction of a compressively sampled data stream
Accelerated reconstruction of a compressively sampled data streamAccelerated reconstruction of a compressively sampled data stream
Accelerated reconstruction of a compressively sampled data stream
 
OpenTox API: Lessons learnt, limitations and challenges
OpenTox API: Lessons learnt, limitations and challengesOpenTox API: Lessons learnt, limitations and challenges
OpenTox API: Lessons learnt, limitations and challenges
 
Physiologically Based Modelling and Predictive Control
Physiologically Based Modelling and Predictive ControlPhysiologically Based Modelling and Predictive Control
Physiologically Based Modelling and Predictive Control
 
Polytopes inside polytopes
Polytopes inside polytopesPolytopes inside polytopes
Polytopes inside polytopes
 
OpenTox API introductory presentation
OpenTox API introductory presentationOpenTox API introductory presentation
OpenTox API introductory presentation
 
Frobenious theorem
Frobenious theoremFrobenious theorem
Frobenious theorem
 
ToxOtis: A Java Interface to the OpenTox Predictive Toxicology Network
ToxOtis: A Java Interface to the OpenTox Predictive Toxicology NetworkToxOtis: A Java Interface to the OpenTox Predictive Toxicology Network
ToxOtis: A Java Interface to the OpenTox Predictive Toxicology Network
 
Distributed solution of stochastic optimal control problem on GPUs
Distributed solution of stochastic optimal control problem on GPUsDistributed solution of stochastic optimal control problem on GPUs
Distributed solution of stochastic optimal control problem on GPUs
 
Amiodarone administration
Amiodarone administrationAmiodarone administration
Amiodarone administration
 
Controlled administration of Amiodarone using a Fractional-Order Controller
Controlled administration of Amiodarone using a Fractional-Order ControllerControlled administration of Amiodarone using a Fractional-Order Controller
Controlled administration of Amiodarone using a Fractional-Order Controller
 
Smart Systems for Urban Water Demand Management
Smart Systems for Urban Water Demand ManagementSmart Systems for Urban Water Demand Management
Smart Systems for Urban Water Demand Management
 
Robust model predictive control for discrete-time fractional-order systems
Robust model predictive control for discrete-time fractional-order systemsRobust model predictive control for discrete-time fractional-order systems
Robust model predictive control for discrete-time fractional-order systems
 

Semelhante a Modelling & Control of Drinkable Water Networks

Using Qualitative Knowledge in Numerical Learning
Using Qualitative Knowledge in Numerical LearningUsing Qualitative Knowledge in Numerical Learning
Using Qualitative Knowledge in Numerical Learning
butest
 
[February 2017 - Ph.D. Final Dissertation] Enabling Power-awareness For Multi...
[February 2017 - Ph.D. Final Dissertation] Enabling Power-awareness For Multi...[February 2017 - Ph.D. Final Dissertation] Enabling Power-awareness For Multi...
[February 2017 - Ph.D. Final Dissertation] Enabling Power-awareness For Multi...
Matteo Ferroni
 

Semelhante a Modelling & Control of Drinkable Water Networks (20)

Universal approximators for Direct Policy Search in multi-purpose water reser...
Universal approximators for Direct Policy Search in multi-purpose water reser...Universal approximators for Direct Policy Search in multi-purpose water reser...
Universal approximators for Direct Policy Search in multi-purpose water reser...
 
WEI_ZHENGTAI_SPC
WEI_ZHENGTAI_SPCWEI_ZHENGTAI_SPC
WEI_ZHENGTAI_SPC
 
1789 1800
1789 18001789 1800
1789 1800
 
ALEA:Fine-grain Energy Profiling with Basic Block sampling
ALEA:Fine-grain Energy Profiling with Basic Block samplingALEA:Fine-grain Energy Profiling with Basic Block sampling
ALEA:Fine-grain Energy Profiling with Basic Block sampling
 
State estimation and Mean-Field Control with application to demand dispatch
State estimation and Mean-Field Control with application to demand dispatchState estimation and Mean-Field Control with application to demand dispatch
State estimation and Mean-Field Control with application to demand dispatch
 
MUMS: Transition & SPUQ Workshop - Gradient-Free Construction of Active Subsp...
MUMS: Transition & SPUQ Workshop - Gradient-Free Construction of Active Subsp...MUMS: Transition & SPUQ Workshop - Gradient-Free Construction of Active Subsp...
MUMS: Transition & SPUQ Workshop - Gradient-Free Construction of Active Subsp...
 
Dual-time Modeling and Forecasting in Consumer Banking (2016)
Dual-time Modeling and Forecasting in Consumer Banking (2016)Dual-time Modeling and Forecasting in Consumer Banking (2016)
Dual-time Modeling and Forecasting in Consumer Banking (2016)
 
Hyperparameter optimization with approximate gradient
Hyperparameter optimization with approximate gradientHyperparameter optimization with approximate gradient
Hyperparameter optimization with approximate gradient
 
Using Qualitative Knowledge in Numerical Learning
Using Qualitative Knowledge in Numerical LearningUsing Qualitative Knowledge in Numerical Learning
Using Qualitative Knowledge in Numerical Learning
 
I010216876
I010216876I010216876
I010216876
 
Ydstie
YdstieYdstie
Ydstie
 
[February 2017 - Ph.D. Final Dissertation] Enabling Power-awareness For Multi...
[February 2017 - Ph.D. Final Dissertation] Enabling Power-awareness For Multi...[February 2017 - Ph.D. Final Dissertation] Enabling Power-awareness For Multi...
[February 2017 - Ph.D. Final Dissertation] Enabling Power-awareness For Multi...
 
Vu_HPSC2012_02.pptx
Vu_HPSC2012_02.pptxVu_HPSC2012_02.pptx
Vu_HPSC2012_02.pptx
 
A walk through the intersection between machine learning and mechanistic mode...
A walk through the intersection between machine learning and mechanistic mode...A walk through the intersection between machine learning and mechanistic mode...
A walk through the intersection between machine learning and mechanistic mode...
 
ECONOMIC LOAD DISPATCH USING PARTICLE SWARM OPTIMIZATION
ECONOMIC LOAD DISPATCH USING PARTICLE SWARM OPTIMIZATIONECONOMIC LOAD DISPATCH USING PARTICLE SWARM OPTIMIZATION
ECONOMIC LOAD DISPATCH USING PARTICLE SWARM OPTIMIZATION
 
Parallel methods to solve stochastic optimal control: control of drinking wat...
Parallel methods to solve stochastic optimal control: control of drinking wat...Parallel methods to solve stochastic optimal control: control of drinking wat...
Parallel methods to solve stochastic optimal control: control of drinking wat...
 
UPPAAL SMC: Statistical Model Checking for Stochastic Hybrid Systems af Mariu...
UPPAAL SMC: Statistical Model Checking for Stochastic Hybrid Systems af Mariu...UPPAAL SMC: Statistical Model Checking for Stochastic Hybrid Systems af Mariu...
UPPAAL SMC: Statistical Model Checking for Stochastic Hybrid Systems af Mariu...
 
An Optimal Design Of Multivariate Control Charts In The Presence Of Multiple ...
An Optimal Design Of Multivariate Control Charts In The Presence Of Multiple ...An Optimal Design Of Multivariate Control Charts In The Presence Of Multiple ...
An Optimal Design Of Multivariate Control Charts In The Presence Of Multiple ...
 
Towards Dynamic Consistency Checking in Goal-directed Predicate Answer Set Pr...
Towards Dynamic Consistency Checking in Goal-directed Predicate Answer Set Pr...Towards Dynamic Consistency Checking in Goal-directed Predicate Answer Set Pr...
Towards Dynamic Consistency Checking in Goal-directed Predicate Answer Set Pr...
 
Reduced-cost ensemble Kalman filter for front-tracking problems
Reduced-cost ensemble Kalman filter for front-tracking problemsReduced-cost ensemble Kalman filter for front-tracking problems
Reduced-cost ensemble Kalman filter for front-tracking problems
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Último (20)

Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 

Modelling & Control of Drinkable Water Networks

  • 1. Modelling  &  Control  of  Drinking  Water  Networks   Pantelis  Sopasakis,  IMTL    
  • 2. The  Closed  Loop     Energy  Price   Water  Demand   DWN   Model  Predic?ve   Controller(s)   (running  on  GPUs+CPUs)   Online   Measurements   Flow   Pressure   Quality   Forecast   Module   Historical  Data   Data  Valida?on   Module   Validated   Measurements  
  • 3. The  Closed  Loop   1.  Time-­‐series   Stochas4c  Models   2.  Hydraulic  Model  of   the  DWN   3.  Pressure   Constraints   4.  Model  Predic4ve   Controllers     Energy  Price   Water  Demand   DWN   Model  Predic?ve   Controller(s)   (running  on  GPUs+CPUs)   Online   Measurements   Flow   Pressure   Quality   Forecast   Module   Historical  Data   Data  Valida?on   Module   Validated   Measurements  
  • 4. Requirements   Requirements  of  WP2:   Involved  Partners:  IMTL,  IRI,  AASI,  SGAB,  WBL   •  Construct  models  for  MPC  (Model  Predic?ve   Control),  based  on  mass-­‐balance  equa?ons   accompanied  by  constraints,   •  Define  risk-­‐sensi?ve  cost  func?ons  to  be   op?mised,   •  Devise  stochas?c  models  for  the  water  demand,   •  Develop  stochas?c  models  for  the  energy  prices   in  the  day-­‐ahead  market.   Implementa4on:   •  Prototype  applica?on  in  MATLAB/Simulink,   •  Control-­‐Oriented  models  available  in  MATLAB.  
  • 5. Control-­‐Oriented  Modelling   The  mass-­‐balance  equa?ons  of  the  water   network  yield  an  Linear  Time-­‐Invariant   dynamical  model  in  the  following  form:     Disturbance  Model  (Stochas?c):   Note:  The  uncertainty  is  considered  to  be   bounded  and  possibly  discrete.   The  demand  requirements  can  be  cast  as   equality  constraints:   The  state  and  input  variables  are  bounded  in   convex  sets  (usually  boxes):   xk 2 X, 8k 2 N uk 2 U, 8k 2 N Alterna?vely,  we  may  impose   bounds  on  the  probability  of   cosntraints’  viola?on,  e.g.,     xk+1 = Axk + Buk + Gddk yk = xk Euk + Eddk = 0 dk|k = dk dk+i+1|k = ˆdk+i|k + ✏k+i|k ✏k ⇠ Ek prob(xk 2 X) ✓x, 8k 2 N J.  M.  Grosso,  C.  Ocampo-­‐Matrínez  and  V.  Puig  (2013),  Learning-­‐based  tuning  of  supervisory  model  predic4ve  control  for  drinking,   Engineering  Applica?ons  of  Ar?ficial  Intelligence,  In  Print.  
  • 6. Demand  Forecas?ng   Ini4al  Observa4ons:   •  Non-­‐sta4onarity:  Apparently   seasonally  governed  paNern,   •  ACF  (AutoCorrela?on  Func?on):   Rather  high  MA  content   •  PACF  (Par?al  ACF):  High  AR  content  
  • 7. Demand  Forecas?ng   Ini4al  Observa4ons:   •  Non-­‐sta?onarity:  Apparently   seasonally  governed  pacern,   •  ACF  (AutoCorrela4on  Func4on):   Rather  high  MA  content   •  PACF  (Par?al  ACF):  High  AR  content  
  • 8. Demand  Forecas?ng   Ini4al  Observa4ons:   •  Non-­‐sta?onarity:  Apparently   seasonally  governed  pacern,   •  ACF  (AutoCorrela?on  Func?on):   Rather  high  MA  content   •  PACF  (Par4al  ACF):  High  AR  content  
  • 9. Demand  Forecas?ng   Ini4al  Observa4ons:   •  Non-­‐sta?onarity:  Apparently   seasonally  governed  pacern,   •  ACF:  Rather  high  MA  content   •  PACF:  High  AR  content   Numerical   Experiments   SARIMA( AR z }| { {1 : 4, 6 : 9}, I z}|{ 1 , MA z }| { {1 : 13, 15, 17}; s z}|{ 168 )⇥ SAR({168, 336})
  • 10. SARIMA( AR z }| { {1 : 4, 6 : 9}, I z}|{ 1 , MA z }| { {1 : 13, 15, 17}; s z}|{ 168 )⇥ SAR({168, 336}) About  this  model:   -­‐  Exhibits  the  lowest  pMSE*  (0.1049)  and  pRMSE   (0.3239)  amongst  other  tested  models   -­‐  Combines  simplicity  with  predic?ve  power:  the   lowest  AIC  (Akaike  Informa?on  Criterion)  value   (-­‐8.50)  and  SC  (-­‐8.45)   -­‐  It  is  inver?ble   -­‐  Its  residuals  pass  the  Ljung-­‐Box  test  for   uncorrelated  residuals  with  p-­‐value  0.29.   -­‐  Its  parameters  were  determined  with  high   sta?s?cal  certainty.     However:   -­‐  It  fails  to  pass  the  Kolmogorov-­‐Smirnov  test  for   normality.   * pMSE : Prediction Mean Square Error
  • 11. Demand  Forecas?ng   d (!) k = ( d (!) k 1 ! , ! 6= 0, log (dk) , ! = 0, d (!) k = lk 1 + bk 1 + PX i=1 s (i) k mi + hk, lk = lk 1 + bk 1 + ↵dhk, bk = bk 1 + dhk, s (i) k = s (i) k mi + d,ihk, hk = pX i=1 'ihk i + qX i=1 ✓i"k i + "k. B    A    T    S   Box-­‐Cox   Transforma?on   Trend   ARMA   Errors   Seasonal   Mul4seasonal   decomposi4on  of  the   4me  series.   J.  M.  Grosso,  C.  Ocampo-­‐Matrínez  and  V.  Puig  (2013),  Learning-­‐based  tuning  of  supervisory  model  predic4ve  control  for  drinking,   Engineering  Applica?ons  of  Ar?ficial  Intelligence,  In  Print.  
  • 12. Demand  Forecas?ng   d (!) k = ( d (!) k 1 ! , ! 6= 0, log (dk) , ! = 0, d (!) k = lk 1 + bk 1 + PX i=1 s (i) k mi + hk, lk = lk 1 + bk 1 + ↵dhk, bk = bk 1 + dhk, s (i) k = s (i) k mi + d,ihk, hk = pX i=1 'ihk i + qX i=1 ✓i"k i + "k. B    A    T    S   Box-­‐Cox   Transforma?on   Trend   ARMA   Errors   Seasonal   Distribu4on  of  the     residuals   A.M.  De  Livera,  R.J.  Hyndman,  and  R.D.  Snyder  (2011),  Forecas4ng  4me  series  with  complex  seasonal  paNerns  using  exponen4al   smoothing,  Journal  of  the  American  Sta?s?cal  Associa?on,  106(496),  1513–1527.    
  • 13. Model  Predic?ve  Control   •  Op?mal  Control  Strategy   •  Sa?sfac?on  of  state  and  input  constraints   •  Perfectly  fit  for  real-­‐life  applica?ons:  Works  with   inaccurate  models  &  in  presense  of  disturbances.   J.  B.  Rawlings  and  D.  Q.  Mayne  (2009),  Model  predic4ve  control:  theory  and  design,  Nob  Hil  Publishing.  
  • 14. Cost  Func?ons   Goal:  Introduce  cost  funcPons  so  as  to:     o  Minimise  the  total  energy  consump?on   o  Minimise  varia?ons  of  the  control  signal  (A  motor  consumes  6  to   8  ?mes  its  nominal  opera?ng  current  on  startup)   o  Op?mise  the  performance  of  the  water  network   o  (Try  to)  Stay  over  minimum  safety  volume.   JHu,Hp (xk, uk, k) = Electricity z }| {X i2N[0,Hu] `w (uk+i|k, k) + Smooth Operation z }| {X i2N[0,Hu 1] ` ( uk+i|k) + X i2N[0,Hp 1] `S (sk+i|k) | {z } Safety Storage
  • 15. Cost  Func?ons   `w (uk, ↵k) , k↵kukk1 `s (xk) = k[xs xk]+k2 Wx Goal:  Introduce  cost  funcPons  so  as  to:     o  Minimise  the  total  energy  consump?on   o  Minimise  varia?ons  of  the  control  signal  (A  motor  consumes  6  to   8  ?mes  its  nominal  opera?ng  current  on  startup)   o  Op?mise  the  performance  of  the  water  network   o  (Try  to)  Stay  over  minimum  safety  volume.   ` ( uk) , k ukk2 Wu
  • 16. The  MPC  Problem   P† Hp,Hu (xk, dk, k) : J? Hu,Hp (xk, dk, k) = min uk,⌅k JHu,Hp (xk, uk, ⌅k, uk, k) subject to: xmin  xk+i|k  xmax , 8i 2 N[1,Hp 1] umin  uk+i|k  umax , 8i 2 N[0,Hu] xk+i+1|k = Axk+i|k + Buk+i|k + Gd ˆdk+i|k, 8i 2 N[0,Hp 1] Euk+i|k + Ed ˆdk+i|k = 0, 8i 2 N[0,Hu] uk+j|k = uk+Hu|k, 8j 2 N[Hu+1,Hp 1] ⇠k+i|k xmax xk+i|k, 8i 2 N[0,Hp] ⇠k+i|k 0, 8i 2 N[0,Hp] ˆdk|k = dk xk|k = xk Given  the  current  (measured)  state  of  the  system,  the  current  demand  and  a   sequence  of  predicted  demands,  solve  the  following  op?misa?on  problem:   Constraints   Op?misa?on  Problem   C.  Ocampo-­‐Matrínez,  V.  Puig,  G.  Cembrano,  R.  Creus  and  M.  Milnoves  (2009),  Improving  water  management  efficiency  by  using   op4miza4on-­‐based  control  strategies:  The  Barcelona  Case  Study,  Water  Sci  &  Tech:  Water  Supply,  9(5),  565-­‐575.  
  • 17. The  MPC  Problem   Given  the  current  (measured)  state  of  the  system,  the  current  demand  and  a   sequence  of  predicted  demands,  solve  the  following  op?misa?on  problem:   This  can  be  formulated  as  a   Constrained  QP  problem:   J? Hu,Hp (xk, dk, k) = min y V (y) subject to: Gy = (dk) Fy  (xk, dk) yl  y  yh from  which  the  control  acPon   is  calculated  and  applied  to   the  system.   C.  Ocampo-­‐Matrínez,  V.  Puig,  G.  Cembrano,  R.  Creus  and  M.  Milnoves  (2009),  Improving  water  management  efficiency  by  using   op4miza4on-­‐based  control  strategies:  The  Barcelona  Case  Study,  Water  Sci  &  Tech:  Water  Supply,  9(5),  565-­‐575.  
  • 18. The  MPC  Problem   System  Size:   63  states   114  inputs   88  disturbances   Computa4onal  Time:   Formula?on:  2.21  s   Update:  0.055  s   Solu?on:  1.85  s   Closed-­‐Loop  Simula?ons  in  15  LOC!   Op4misa4on  Problem  Size:     ~4.2k  decision  variables   ~4.5k  affine  inequali?es   ~1.5  bound  constraints   ~400  equality  constraints   E.  Caini,  V.  Puig  and  G.  Cembrano  (2009),  Development  of  a  simula4on  environment  for  Water  Drinking  Networks:  Applica4on  to  the  Valida4on   of  a  Centralized  MPC  Controller  for  the  Barcelona  Case  Study,  Technical  Report,  IRI-­‐TR-­‐09-­‐03,  UPC/IRI.  
  • 19. Closed-­‐loop  Simula?ons   The  predic4on  error  affects   the  shape  of  the  closed-­‐loop   trajectories…   MPC  with  a  perfect  predictor  
  • 20. Closed-­‐loop  Simula?ons   MPC  Control  Ac4ons  using  a  Seasonal   ARIMA  predictor.   MPC  with  a  perfect  predictor  
  • 21. Closed-­‐loop  Simula?ons   €579.1 €593.4 MPC  with  a  perfect  predictor   MPC:  demand  forecas4ng  with  an  ARIMA  model  
  • 22. Closed-­‐loop  Simula?ons   PMSEHp,k = Hp X i=0 ( ˆdk+i|k dk+i)2 Inaccurate  Predic?ons  
  • 23. Open  Issues   •  Formula?on  of  Control  problems  for  other  objec?ves  (leak  isola?on,  quality   control)   •  Demand  Forecas?ng:  Exogenous  T.S.  Analysis  (JM).   •  Numerical  Issues:  The  Hessian  appears  to  be  near-­‐singular     Becer  precondi?oning  is  necessary   •  Other  formula?ons  of  the  QP  to  be  examined   •  The  MPC  control  law  should  be  recursively  feasible   •  Formula?on  of  a  robust  control  problem   •  Incorpora?on  of  nonlinear  pressure  constraints   •  Experiment  with  Fast  MPC  methods   •  Design  &  Establishment  of  an  API   Hessian’s sparsity pattern
  • 24. Risk-­‐Sensi?ve  Cost  Func?ons   J(xk, uk, ⌅k, uk, k) = (E + cD) {J(xk, uk, ⌅k, uk, k)} Mean-­‐Risk  Cost  Func?on   DJ = V @R↵(J) = inf t {prob(J  t) 1 ↵} for  instance:   J? (xk, dk, k) = min uk,⌅k J(xk, uk, ⌅k, uk, k) subject to: prob(xmin  xk+i|k  xmax ) ✓x, 8i 2 N[1,Hp 1] etc. where:   Chance  Constraints   Measure  of  Dispersion  
  • 25. Acknowledgements   •  Juan  Manuel  Grosso  Pérez,  UPC   •  Ajay  Kumar  Sampathirao,  IMTL   •  Carlos  Ocampo-­‐Marqnez,  UPC   •  Vicenç  Puig,  UPC  
  • 26. Thank you for your attention!
  • 27. Appendix   •  Invariance  and  Feasibility  Analysis   •  Fast  computa?on  of  the  op?mal  solu?on   •  Addi?onal  Diagrams  
  • 28. Feasibility  Analysis   dk+1|k = ˆdk+1|k + ✏k ARIMA  es?mate:   ˆdk+1|k = LX i=0 ↵idk i|k ) pk+1|k = Kpk + M✏k Bounded  Error   pk = 2 6 6 6 4 dk dk 1 ... dk L 3 7 7 7 5 K = 2 6 6 6 6 6 4 ↵0 ↵1 · · · ↵L 1 ↵L 1 0 · · · 0 0 0 1 · · · 0 0 ... ... ... 0 0 · · · 1 0 3 7 7 7 7 7 5  xk+i+1|k pk+i+1|k | {z } #k+i+1|k =  A ¯Gd 0 K | {z }  xk+i|k pk+i|k | {z } #k+i|k +  B 0 | {z } ⌦ uk+i|k +  0 M | {z } R ✏k+i|k RewriPng  the  ARIMA  model   in  state  space  form…  
  • 29. Feasibility  Analysis   #k+i+1|k = #k+i|k + ⌦uk+i|k + R✏k+i|k ✏k+i|k 2 E ⇢⇢ R S X ⇥ Rnd(L+1) ( # + ⌦u) RE # S ✓ Pre(S) For   the   set   S   to   be   robustly   control   invariant,  the  following  has  to  hold  true:   But  we  should  keep  in  mind  that  p  is  the   uncontrollable  part  of  the  system,  i.e.,  :   p+ = Kp + M✏ Dimension:  ~70.000   So   in   order   to   find   such   as   a   (nonempty)   set  S,  it  is  necessary  that  the  trajectory  of   p  is  bounded  for  all  ε.   *  The  feasibility  analysis  with  the   assumpPon  that  the  predictor  is   accurate  is  easier.  
  • 30. Feasibility  Analysis   Expanding  predic4on  error:   Impossible  to  guarantee  recursive   feasibility!  But,  we  know  that  the   disturbance  is  bounded!     d 2 D = {d|Cd  g} Thus,  the  predic?on  error  has  to  be   bounded  as  follows:   ✏ 2 E(p) = ⇢ ✏ CM✏  g CKp |✏|  ✏max , (✏, p) 2 gph(E) We  then  need  to  determine  a  set  S  so  that:   2 4 x p ✏ 3 5 2 S ) 2 4 x+ p+ ✏ 3 5 2 S, 8(✏, p) 2 gph(E)
  • 31. J? Hu,Hp (xk, dk, k) = min uk,⌅k JHu,Hp (xk, uk, ⌅k, uk, k) subject to: Box Constraints: ⇢ xmin  xk+i|k  xmax , 8i 2 N[1,Hp 1] umin  uk+i|k  umax , 8i 2 N[0,Hu] xk+i+1|k = Ixk+i|k + Buk+i|k + Gd ˆdk+i|k, 8i 2 N[0,Hp 1] Euk+i|k + Ed ˆdk+i|k = 0, 8i 2 N[0,Hu] uk+j|k = uk+Hu|k, 8j 2 N[Hu+1,Hp 1] ⇠k+i|k xmax xk+i|k, 8i 2 N[0,Hp] ⇠k+i|k 0, 8i 2 N[0,Hp] Fast  Solu?on  Methods   There  are  certain  characteris?cs  of  the  op?misa?on  problem  that  can  be  exploited   to  accelerate  the  computa?on  of  the  op?mal  solu?on:   E  and  Ed  are     very  sparse   P.  Patrinos,  P.  Sopasakis  and  .  Sarimveis  (2011),  A  global  piecewise  smooth  Newton  method  for  fast  large-­‐scale  model  predic4ve  control,   Automa?ca  47,  2016-­‐2022.