Motivation Stochastic MPC based River Control River Simulations Conclusions

A Control Engineering Perspective on Efficient Management of Rivers with Uncertain In-flows

Hasan Arshad Nasir1 Collaborators: Prof. Erik Weyer2 Algo Car`e3

1School of Electrical Engineering and Computer Science, National University of Sciences and Technology

2Department of Electrical and Electronic Engineering, The University of

3Department of Information Engineering, The University of Brescia

October 13, 2018 Motivation Stochastic MPC based River Control River Simulations Conclusions

1 Motivation

2 Stochastic MPC based River Control

3 River Simulations

4 Conclusions Motivation Stochastic MPC based River Control River Simulations Conclusions Motivation - Efficient River Management

To prevent water from getting wasted. To avoid flooding. To ensure satisfaction of environmental needs.

Hume Dam, www.wikipedia.org/wiki/Hume Dam Motivation Stochastic MPC based River Control River Simulations Conclusions Motivation - Talking about Pakistan

Floods: 2010 (2, 000 died, 20 million affected) 2011 (361 died, 5.3 million affected)

upload.wikimedia.org/wikipedia/commons/thumb/5/57/ Indus˙flooding˙2010˙en.svg/2000px-Indus˙flooding˙2010˙en.svg.png Motivation Stochastic MPC based River Control River Simulations Conclusions Motivation - Talking about Australia

Australia is described as the driest continent on Earth. 1However, due to flooding, between 1852 and 2011, At least 951 people were killed, and 1326 were injured. The cost of damage reached an estimated $4.76 billion dollars.

http://www.holidayaustralia.co.uk/html/google-map.html

1http://www.australiangeographic.com.au/topics/history-culture/2012/03/floods-10-of-the-deadliest-in-australian- history/ Motivation Stochastic MPC based River Control River Simulations Conclusions Upper part of , Australia

Hume Reservoir Canal Murray River Heywoods

Yarrawonga Weir Doctors Point Hume Weir

Bandiana Peechelba Downstream YW Weir

Yarrawonga Main Channel

Ovens River Kiewa River Measuring Station Hydraulic Structure Flow Direction Motivation Stochastic MPC based River Control River Simulations Conclusions Upper part of Murray River, Australia

Identify the output, control input and disturbance variables.

Hume Reservoir Murray River Howlong Heywoods Corowa Albury Lake Mulwala

Yarrawonga Weir Doctors Point Hume Weir

Bandiana Peechelba Downstream YW Weir

Yarrawonga Main Channel

Ovens River Kiewa River Measuring Station Hydraulic Structure Flow Direction

Variable to Control/Output Control Input Uncontrolled Input/Disturbance

Water level: yLM Flows: uC = QH Flows: wU = [QB QP QDYW QYMC QMC ] Motivation Stochastic MPC based River Control River Simulations Conclusions Upper part of Murray River, Australia

Control challenges.

1. Constraints

Hume Reservoir Mulwala Canal Murray River Howlong Heywoods Corowa Albury Lake Mulwala

Yarrawonga Weir Doctors Point Hume Weir

Bandiana Peechelba Downstream YW Weir

Yarrawonga Main Channel

Ovens River Kiewa River Measuring Station Hydraulic Structure Flow Direction

Variable to Control/Output Control Input Uncontrolled Input/Disturbance

Water level: yLM Flows: uC = QH Flows: wU = [QB QP QDYW QYMC QMC ] Motivation Stochastic MPC based River Control River Simulations Conclusions Upper part of Murray River, Australia

Control challenges.

1. Constraints 2. Time Delays

Hume Reservoir Mulwala Canal Murray River Howlong Heywoods Corowa Albury Lake Mulwala

Yarrawonga Weir Doctors Point Hume Weir

Bandiana Peechelba Downstream YW Weir

Yarrawonga Main Channel

Ovens River Kiewa River Measuring Station Hydraulic Structure Flow Direction

Variable to Control/Output Control Input Uncontrolled Input/Disturbance

Water level: yLM Flows: uC = QH Flows: wU = [QB QP QDYW QYMC QMC ] Motivation Stochastic MPC based River Control River Simulations Conclusions Upper part of Murray River, Australia

Control challenges. 1. Constraints 2. Time Delays

Hume Reservoir Mulwala Canal Murray River Howlong Heywoods Corowa Albury Lake Mulwala

Yarrawonga Weir Doctors Point Hume Weir

Bandiana Peechelba Downstream YW Weir

Yarrawonga Main Channel

Ovens River Kiewa River Measuring Station Hydraulic Structure Flow Direction

Variable to Control/Output Control Input Uncontrolled Input/Disturbance

Water level: yLM Flows: uC = QH Flows: wU = [QB QP QDYW QYMC QMC ] 3. Unregulated In- and Out-flows Motivation Stochastic MPC based River Control River Simulations Conclusions A suitable control strategy for rivers with uncertain in-flows

The one that can incorporate: Constraints on water levels and flow releases. Time delays. Forecast of unregulated in- and out-flows, and the uncertainties within. 1. Constraints 2. Time Delays

Hume Reservoir Mulwala Canal Murray River Howlong Heywoods Corowa Albury Lake Mulwala

Yarrawonga Weir Doctors Point Hume Weir

Bandiana Peechelba Downstream YW Weir

Yarrawonga Main Channel

Ovens River Kiewa River Measuring Station Hydraulic Structure Flow Direction

Variable to Control/Output Control Input Uncontrolled Input/Disturbance

Water level: yLM Flows: uC = QH Flows: wU = [QB QP QDYW QYMC QMC ] 3. Unregulated In- and Out-flows Motivation Stochastic MPC based River Control River Simulations Conclusions A suitable control strategy for rivers with uncertain in-flows

Stochastic Model Predictive Control (Stochastic MPC)

1. Constraints 2. Time Delays

Hume Reservoir Mulwala Canal Murray River Howlong Heywoods Corowa Albury Lake Mulwala

Yarrawonga Weir Doctors Point Hume Weir

Bandiana Peechelba Downstream YW Weir

Yarrawonga Main Channel

Ovens River Kiewa River Measuring Station Hydraulic Structure Flow Direction

Variable to Control/Output Control Input Uncontrolled Input/Disturbance

Water level: yLM Flows: uC = QH Flows: wU = [QB QP QDYW QYMC QMC ] 3. Unregulated In- and Out-flows Motivation Stochastic MPC based River Control River Simulations Conclusions

1 Motivation

2 Stochastic MPC based River Control

3 River Simulations

4 Conclusions Motivation Stochastic MPC based River Control River Simulations Conclusions Model Predictive Control (MPC)

y Q ydes

k Time Motivation Stochastic MPC based River Control River Simulations Conclusions Model Predictive Control (MPC)

y Q ydes u yˆj+1 = f(ˆyj,Qj τ ,Qj ), j = k, .., k + M −

k k + M Time Motivation Stochastic MPC based River Control River Simulations Conclusions Model Predictive Control (MPC)

y Q ydes u y^j+1 = f(^yj;Qj−τ ;Qj ), j = k; ::; k + M k+M 2 min. Pi=k (yi − ydes) s.t. yLL ≤ y ≤ yUL QLL ≤ Q ≤ QUL

k k + M Time Motivation Stochastic MPC based River Control River Simulations Conclusions Model Predictive Control (MPC)

y Q ydes

k k + M Time Motivation Stochastic MPC based River Control River Simulations Conclusions Model Predictive Control (MPC)

y Q ydes

k + 1 Time Motivation Stochastic MPC based River Control River Simulations Conclusions Model Predictive Control (MPC)

y Q ydes

k + 1 k + M + 1 Time Motivation Stochastic MPC based River Control River Simulations Conclusions Model Predictive Control (MPC)

y Q ydes

u y^j+1 = f(^yj;Qj−τ ;Qj ), j = k + 1; ::; k + M + 1 k+M+1 2 min. Pi=k+1 (yi − ydes) s.t. yLL ≤ y ≤ yUL QLL ≤ Q ≤ QUL

k + 1 k + M + 1 Time Motivation Stochastic MPC based River Control River Simulations Conclusions Model Predictive Control (MPC)

y Q ydes

k + 1 k + M + 1 Time Motivation Stochastic MPC based River Control River Simulations Conclusions Model Predictive Control (MPC)

y Q ydes

k + 2 Time Motivation Stochastic MPC based River Control River Simulations Conclusions River control problem in an MPC set-up

The following optimisation problem is solved in a receding horizon fashion.

k+M X 2 min. (yi ydes ) Qk ,Qk+1,...,Qk+M−1 − i=k+1

u s.t. yi+1 = f (yi , Qi τ , Qi ) − u y yi (Q, Q ) y , LL ≤ ≤ HL QLL Qi 1 QHL, ≤ − ≤ i = k + 1,..., k + M. Motivation Stochastic MPC based River Control River Simulations Conclusions Water level constraints

Water level should stay within two limits.

y: water level Q: regulated inflows and outflows Qu: unregulated inflows and outflows yUL

yset y

yLL y y(Q, Qu) y LL ≤ ≤ UL Motivation Stochastic MPC based River Control River Simulations Conclusions Water level constraints

Due to uncertainties in unregulated flows (Qu), we soften the constraint as below,

y: Water level Q: regulated inflows and outflows Qu: unregulated inflows and outflows yUL

yset y

yLL P y y(Q, Qu) y 1 ǫ, { LL ≤ ≤ UL} ≥ − 2 e.g. ǫ = 10− . Motivation Stochastic MPC based River Control River Simulations Conclusions River control problem in a Stochastic MPC set-up

k+M X 2 min. (yi ydes ) Qk ,Qk+1,...,Qk+M−1 − i=k+1 u s.t. yi+1 = f (yi , Qi τ , Qi ) − u P y yi (Q, Q ) y 1 , { LL ≤ ≤ HL} ≥ − QLL Qi 1 QHL, ≤ − ≤ i = k + 1,..., k + M.

This is a Chance-Constrained optimisation Problem (CCP), and it is generally non-solvable. We employ the Scenario Approach to find an approximate solution to a CCP. Motivation Stochastic MPC based River Control River Simulations Conclusions River control problem in a Scenario-based Stochastic MPC set-up

The following optimisation problem is solved in a receding horizon fashion.

k+M X 2 min. (yi ydes ) Qk ,Qk+1,...,Qk+M−1 − i=k+1 u s.t. yi+1 = f (yi , Qi τ , Qi ) − u,(j) y yi (Q, Q ) y , LL ≤ ≤ HL QLL Qi 1 QHL, ≤ − ≤ i = k + 1, . . ., k + M, j = 1,..., N. Motivation Stochastic MPC based River Control River Simulations Conclusions River control in the context of flooding

Is the aforementioned formulation scale-able to accommodate flood mitigation? Motivation Stochastic MPC based River Control River Simulations Conclusions River control in the context of flooding

Is the aforementioned formulation scale-able to accommodate flood mitigation? Yes! Motivation Stochastic MPC based River Control River Simulations Conclusions Water level constraints (revisiting)

Water level should stay within two limits.

y: water level Q: regulated inflows and outflows Qu: unregulated inflows and outflows yUL

yset y

yLL y y(Q, Qu) y LL ≤ ≤ UL Motivation Stochastic MPC based River Control River Simulations Conclusions Water level constraints (revisiting)

Due to uncertainties in unregulated flows, we want water level to stay within two limits most of the time.

y: Water level Q: regulated inflows and outflows Qu: unregulated inflows and outflows yUL

yset y

yLL P y y(Q, Qu) y 1 ǫ, { LL ≤ ≤ UL} ≥ − 2 e.g. ǫ = 10− . Motivation Stochastic MPC based River Control River Simulations Conclusions Water level constraints incorporating flood mitigation

Water level should not cross a flood limit.

y: Water level yFL

yUL

yset y

yLL Motivation Stochastic MPC based River Control River Simulations Conclusions Water level constraints incorporating flood mitigation

Again, due to uncertainties in unregulated flows, we want water level to stay below a flood limit with a very high probability.

y: Water level yFL

yUL

yset y

yLL P w W : y y(u, w ) y 1 ǫ, { U ∈ LL ≤ U ≤ UL} ≥ − 2 e.g. ǫ = 10− , P w W : y(u, w ) y 1 ǫ , { U ∈ U ≤ FL} ≥ − f 4 e.g. ǫf = 10− . Motivation Stochastic MPC based River Control River Simulations Conclusions River control problem in a Stochastic MPC set-up

k+M X 2 min. (yi ydes ) Qk ,Qk+1,...,Qk+M−1 − i=k+1 u s.t. yi+1 = f (yi , Qi τ , Qi ) − u P yLL yi (Q, Q ) yHL 1 , { ≤ u ≤ } ≥ − P yi (Q, Q ) y 1 f , { ≤ FL} ≥ − QLL Qi 1 QHL, ≤ − ≤ i = k + 1,..., k + M.

This is a Multiple Chance-Constrained optimisation Problem (M-CCP), and it is generally non-solvable. We can employ the Scenario Approach to find an approximate solution to an M-CCP or use the computationally efficient Optimisation, Testing and Improving (OAT) Algorithm. Motivation Stochastic MPC based River Control River Simulations Conclusions Optimisation, Testing and Improving (OAT) Algorithm1 - Basic idea

1H.A. Nasir, A. Car`eand E. Weyer, “A scenario-based Stochastic MPC approach for problems with normal and rare operations with an application to rivers”, IEEE Transactions on Control Systems Technology, 2018. Motivation Stochastic MPC based River Control River Simulations Conclusions

1 Motivation

2 Stochastic MPC based River Control

3 River Simulations

4 Conclusions Motivation Stochastic MPC based River Control River Simulations Conclusions Control of the upper part of Murray River

Hume Reservoir Mulwala Canal Murray River Howlong Heywoods Corowa Albury Lake Mulwala

Yarrawonga Weir Doctors Point Hume Weir

Bandiana Peechelba Downstream YW Weir

Yarrawonga Main Channel

Ovens River Kiewa River Measuring Station Hydraulic Structure Flow Direction

Water level in Lake Mulwala should stay between 124.65 and 124.9 mAHD. The unregulated inflows from Kiewa River and Ovens River are considered as unknown and are forecasted. Motivation Stochastic MPC based River Control River Simulations Conclusions Control of the upper part of Murray River

Scenario version of the river optimisation problem,

k+M X 2 min. (yLM,i ydes ) QH,k ,QH,k+1,...,QH,k+M−1 − i=k+1 (j) (j) s.t. 124.65 y i (Q , Q ) 124.9, ≤ LM, B P ≤ 2000 QH,i 1 30, 000, ≤ − ≤ 500 QH,i QH,i 1 500, − ≤ − − ≤ i = k + 1, . . ., k + M, j = 1,..., N.

With  = 0.1, the required N 1, 395. ≥ Motivation Stochastic MPC based River Control River Simulations Conclusions Control of the upper part of Murray River

A dataset from 2006,

Controlled water level simulations in Lake Mulwala using Scheme 1

124.9

124.85

124.8

124.75 Upper limit Lower limit Water level (mAHD) Water level in Lake Mulwala (controlled) 124.7 Water level recorded Simulated water level 124.65

20 40 60 80 100 120 140 160 180 Samples (T = 8 hours) s Motivation Stochastic MPC based River Control River Simulations Conclusions Control of the upper part of Murray River

Hume Reservoir Mulwala Canal Murray River Howlong Heywoods Corowa Albury Lake Mulwala

Yarrawonga Weir Doctors Point Hume Weir

Bandiana Peechelba Downstream YW Weir

Yarrawonga Main Channel

Ovens River Kiewa River Measuring Station Hydraulic Structure Flow Direction Motivation Stochastic MPC based River Control River Simulations Conclusions Control of the upper part of Murray River

Regulated and unregulated flows,

4 x 10 Comparison of flow release from Hume reservoir

2 Controlled Flow at Heywoods Recorded flow at Heywoods 1.8

1.6 Flow (ML/Day) 1.4

20 40 60 80 100 120 140 160 180 Samples (T = 8 hours) s Unregulated inflows and releases Q 12000 B Q 10000 P Q 8000 D Q 6000 Y Q 4000 M Flow (ML/Day) 2000

0 20 40 60 80 100 120 140 160 180 Samples (T = 8 hours) Motivation Stochastic MPC based River Control River Simulations Conclusions Control of the upper part of Murray River - Flood mitigation incorporated

Scenario version of the river optimisation problem,

k+M X 2 min. (yLM,i ydes ) QH,k ,QH,k+1,...,QH,k+M−1 − i=k+1 (j) (j) s.t. 124.65 y i (Q , Q ) 124.9, ≤ LM, B P ≤ (m) (m) y i (Q , Q ) 125, LM, B P ≤ 2000 QH,i 1 30, 000, ≤ − ≤ 500 QH,i QH,i 1 1200, − ≤ − − ≤ i = k + 1,..., k + M, j = 1,..., N, m = 1,..., P. Motivation Stochastic MPC based River Control River Simulations Conclusions Control of the upper part of Murray River

Hume Reservoir Mulwala Canal Murray River Howlong Heywoods Corowa Albury Lake Mulwala

Yarrawonga Weir Doctors Point Hume Weir

Bandiana Peechelba Downstream YW Weir

Yarrawonga Main Channel

Ovens River Kiewa River Measuring Station Hydraulic Structure Flow Direction Motivation Stochastic MPC based River Control River Simulations Conclusions Control of the upper part of Murray River

A dataset from 2010

Controlled water level simulations in Lake Mulwala for 33 days

125

124.95

124.9

124.85

124.8

Water level (mAHD) 124.75 Water level in Lake Mulwala (controlled) Actual water level (recorded) 124.7

124.65

10 20 30 40 50 60 70 80 90 100 Samples (T = 8 hours) s Motivation Stochastic MPC based River Control River Simulations Conclusions Control of the upper part of Murray River

Hume Reservoir Mulwala Canal Murray River Howlong Heywoods Corowa Albury Lake Mulwala

Yarrawonga Weir Doctors Point Hume Weir

Bandiana Peechelba Downstream YW Weir

Yarrawonga Main Channel

Ovens River Kiewa River Measuring Station Hydraulic Structure Flow Direction Motivation Stochastic MPC based River Control River Simulations Conclusions Control of the upper part of Murray River

Controlled flow release from Hume.

Comparison of flow release from Hume reservoir 15000

Controlled flow at Heywoods Recorded flow at Heywoods 10000

Flow (ML/Day) 5000

0 10 20 30 40 50 60 70 80 90 100 Samples (T = 8 hours) s Motivation Stochastic MPC based River Control River Simulations Conclusions

1 Motivation

2 Stochastic MPC based River Control

3 River Simulations

4 Conclusions Motivation Stochastic MPC based River Control River Simulations Conclusions Conclusions

We formulated the river control problem, with uncertain in-flows, in a Stochastic MPC setting. The control strategy uses the scenario approach to incorporate a set of forecasts of uncertain in-flows. The control strategy is also extended to minimise flooding risks.

Hume Reservoir Mulwala Canal Murray River Howlong Heywoods Corowa Albury Lake Mulwala

Yarrawonga Weir Doctors Point Hume Weir

Bandiana Peechelba Downstream YW Weir

Yarrawonga Main Channel

Ovens River Kiewa River Measuring Station Hydraulic Structure Flow Direction Motivation Stochastic MPC based River Control River Simulations Conclusions Conclusions

We formulated the river control problem, with uncertain in-flows, in a Stochastic MPC setting. The control strategy uses the scenario approach to incorporate a set of forecasts of uncertain in-flows. The control strategy is also extended to minimise flooding risks. Questions?