De Demer geregeld met MPC

43
Introduc tion River modeling NMPC NMHE Set invariance Conclusion s Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010 De Demer geregeld met MPC Public Doctoral Defense Toni Barjas Blanco Jur y: A. Haegemans, chair B. De Moor, promotor J. Berlamont, co- promotor J. Suykens P. Willems B. De Schutter (TU Delft) SCD Research Division ESAT – K. U. Leuven September 8 th , 2010

description

Public Doctoral Defense. De Demer geregeld met MPC. Jury:. A. Haegemans, chair B. De Moor, promotor J. Berlamont, co-promotor J. Suykens P. Willems B. De Schutter (TU Delft) R. Negenborn (TU Delft). Toni Barjas Blanco. SCD Research Division ESAT – K. U. Leuven September 8 th , 2010. - PowerPoint PPT Presentation

Transcript of De Demer geregeld met MPC

Page 1: De Demer geregeld met MPC

Introduction River modeling NMPC NMHE Set invariance Conclusions

Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010

De Demer geregeld met MPCPublic Doctoral Defense

Toni Barjas Blanco

Jury:A. Haegemans, chair

B. De Moor, promotor

J. Berlamont, co-promotor

J. Suykens

P. Willems

B. De Schutter (TU Delft)

R. Negenborn (TU Delft)

SCD Research Division

ESAT – K. U. Leuven

September 8th, 2010

Page 2: De Demer geregeld met MPC

Introduction River modeling NMPC NMHE Set invariance Conclusions

Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010

outline Introduction River Modeling Nonlinear Model Predictive Controller Nonlinear Moving Horizon Estimator Set Invariance Conclusions and Future research

Page 3: De Demer geregeld met MPC

Introduction River modeling NMPC NMHE Set invariance Conclusions

Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010

Introduction Floodings in the Demer basin

The damage caused in the Demer basin by the most recent floodings.

Page 4: De Demer geregeld met MPC

Introduction River modeling NMPC NMHE Set invariance Conclusions

Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010

Introduction

Current: three-position controller not based on rainfall predictions no optimization

In this research: “We implement a nonlinear

model predictive controller

for flood regulation.”

Goal: reduction of floods

Proposed control scheme

Page 5: De Demer geregeld met MPC

Introduction River modeling NMPC NMHE Set invariance Conclusions

Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010

River modeling

Modeling techniques: Finite-difference models: very accurate, too complex Integrator-delay models: fast, linear System identification: not based on conservation laws

Reservoir model: Fast Nonlinear Accurate Conservation laws

Page 6: De Demer geregeld met MPC

Introduction River modeling NMPC NMHE Set invariance Conclusions

Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010

River modeling

vgl, hgl

qbg

vopw, hopw

qman

qopw

K7 A

v1, h1

E

vs, hs

qK7

qA qE

vs2, hs2

qs

vs3, hs3

D

qs2 qs3

vvg, hvg

qhopw

vs4, hs4

qs4 qhs

vhopw, hhopw

qvs qD

q2

qzbopw qzb1

qgopw

qgafw

v3, h3

qvopw

hvopw

qK18

q3 q4

vw, hw

qK19 qK30

qbgopw

qK7lg

qgl

vbg, hbg

qK7bg

qzb3

q7 Demer

Zw

arte

wat

er

Zwartebeek

Vlootgracht

Schulensmeer

Webbekom

Her

k

Get

e

Beg

ijne

beek

Vel

pe

Leu

gebe

ek

Gro

te L

eigr

acht

Hou

wer

sbee

k

q6 q5

qK31

qzb2

v4, h4

vzb, hzb

qzw

q1

vlg, hlg

qK24B

hbgopw

qK24A

vzw, hzw

qzwopw

qhs2

v2, h2

qh

qsa

Discharges (q) Water levels (h) Volumes (v)

State variables : Inputs : Gates Rainfall-runoff (disturbances)

Page 7: De Demer geregeld met MPC

Introduction River modeling NMPC NMHE Set invariance Conclusions

Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010

River modeling

Volume balance

Nonlinear H-V relation

0 in outV V q q

Conceptual model

h f V

inq outq,3inq

,1inq

,2inq,1outq

,2outq0V

Page 8: De Demer geregeld met MPC

Introduction River modeling NMPC NMHE Set invariance Conclusions

Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010

River modeling Downstream reach

Nonlinear gate equations (Infoworks)

2

2

,0

b

up down

down down

qh h a

h h

vgl, hgl

qbg

vopw, hopw

qman

qopw

K7 A

v1, h1

E

vs, hs

qK7

qA qE

vs2, hs2

qs

vs3, hs3

D

qs2 qs3

vvg, hvg

qhopw

vs4, hs4

qs4 qhs

vhopw, hhopw

qvs qD

q2

qzbopw qzb1

qgopw

qgafw

v3, h3

qvopw

hvopw

qK18

q3 q4

vw, hw

qK19 qK30

qbgopw

qK7lg

qgl

vbg, hbg

qK7bg

qzb3

q7 Demer

Zw

arte

wat

er

Zwartebeek

Vlootgracht

Schulensmeer

Webbekom

Her

k

Get

e

Beg

ijne

beek

Vel

pe

Leu

gebe

ek

Gro

te L

eigr

acht

Hou

wer

sbee

k

q6 q5

qK31

qzb2

v4, h4

vzb, hzb

qzw

q1

vlg, hlg

qK24B

hbgopw

qK24A

vzw, hzw

qzwopw

qhs2

v2, h2

qh

qsa

up downh h

Page 9: De Demer geregeld met MPC

Introduction River modeling NMPC NMHE Set invariance Conclusions

Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010

River modeling Nonlinear gate equations (Infoworks)

independent of the gate level uncontrollability (see later)

Page 10: De Demer geregeld met MPC

Introduction River modeling NMPC NMHE Set invariance Conclusions

Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010

River modeling Calibration and validation

Page 11: De Demer geregeld met MPC

Introduction River modeling NMPC NMHE Set invariance Conclusions

Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010

River modeling Calibration and validation

Page 12: De Demer geregeld met MPC

Introduction River modeling NMPC NMHE Set invariance Conclusions

Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010

River modeling Calibration and validation

1

( ) ( )100

( )

nc iw

ri iw

y i y ie

y i

Page 13: De Demer geregeld met MPC

Introduction River modeling NMPC NMHE Set invariance Conclusions

Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010

Control scheme State of the art

Classical feedback and feedforwardOptimal controlHeuristic controlThree-position controlModel predictive control

Why model predictive control ? River dynamics are slow Constraint handling Rainfall predictions (model based) MIMO

Page 14: De Demer geregeld met MPC

Introduction River modeling NMPC NMHE Set invariance Conclusions

Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010

Control scheme Model predictive control

t

u

x

Page 15: De Demer geregeld met MPC

Introduction River modeling NMPC NMHE Set invariance Conclusions

Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010

Control scheme

Flood regulationNonlinear dynamicsNonlinear relation discharge/gate

position

Practical MPC for setpoint regulation

Page 16: De Demer geregeld met MPC

Introduction River modeling NMPC NMHE Set invariance Conclusions

Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010

Control scheme Nonlinear model predictive control scheme (NLP)

subject to the following constraints for :

1

1

, ,1 0

, ,

, ,

minp c

k k N p

k k N p

k k Nc

N NT T

k i r k i r k i r k i rx x

i iy y

u u

y y Q y y u u R u u

1

1

1 max

ˆ

, ,

,c

k k

k i k i k i k i

k i k i

k i k N c

k i

k j

k j k j

x x

x f x u d

y Cx

u u i N

y y

u u u

u u

1, , , 0, , 1p ci N j N

1k i k i k i k i k i k i k ix A x B u D d

Page 17: De Demer geregeld met MPC

Introduction River modeling NMPC NMHE Set invariance Conclusions

Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010

Simulation

Linearization with central difference scheme

LTV system

with

Control scheme

01kx

t

x

u

k+1 k+2k

02kx

02ku

01ku

0 0 01 1k k k k k k k k k kx A x B u x A x B u 0 0 0 0

1 , ,k k k kx f x u d

Page 18: De Demer geregeld met MPC

Introduction River modeling NMPC NMHE Set invariance Conclusions

Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010

Control scheme SQP algorithm

(ii).

Page 19: De Demer geregeld met MPC

Introduction River modeling NMPC NMHE Set invariance Conclusions

Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010

Control scheme

Constraints: Hard constraints : input Soft constraints : water levels

Constraint strategy: Heavy rainfall flooding unavoidable Constraint prioritization: remove less important constraints and resolve NLP

Cost function strategy: Adjusting weights in order to minimize constraint violation of removed

constraints

Page 20: De Demer geregeld met MPC

Introduction River modeling NMPC NMHE Set invariance Conclusions

Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010

Control scheme

Uncontrollability

Equations:

Reference levels and corresponding weights in cost function

Page 21: De Demer geregeld met MPC

Introduction River modeling NMPC NMHE Set invariance Conclusions

Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010

Simulations

No uncertainty

Regulation and flood cost:

with

outperformed by MPC

30p cN N

Page 22: De Demer geregeld met MPC

Introduction River modeling NMPC NMHE Set invariance Conclusions

Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010

Simulations Gaussian uncertainty (10 % unc, increase of 0.2 %, overestimation)

±equal

outperformed by MPC

30p cN N

Page 23: De Demer geregeld met MPC

Introduction River modeling NMPC NMHE Set invariance Conclusions

Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010

State estimation At each sampling time estimation current state based on past

measurements of a subset of the states.

Page 24: De Demer geregeld met MPC

Introduction River modeling NMPC NMHE Set invariance Conclusions

Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010

State estimation State of the art in river control:

Sensor measurements Kalman filtering

Moving horizon estimation (MHE)

MHE: Dual of MPC Online constrained optimization problem Finite window in the past computational tractability Solves following problem: “Given the measurements of a subset of states

within the past time window, find all the states in that window that match the measurements as close as possible, given the underlying system model .”

Page 25: De Demer geregeld met MPC

Introduction River modeling NMPC NMHE Set invariance Conclusions

Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010

Moving horizon estimator Nonlinear MHE scheme (NLP)

Page 26: De Demer geregeld met MPC

Introduction River modeling NMPC NMHE Set invariance Conclusions

Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010

Moving horizon estimator Linearization of nonlinear system around previous

estimated state trajectory.

Linearized model:

Central difference scheme:

01| 1k kx

02| 1k kx

ˆkx0

4| 1k kx

03| 1k kx

k-1k-2k-3k-4 k

05| 1k kx

k-5 t

x

with

Page 27: De Demer geregeld met MPC

Introduction River modeling NMPC NMHE Set invariance Conclusions

Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010

Moving horizon estimation SQP

Linearize system around state trajectory obtained at the previous time step or iteration:

Solve QP and obtain a new estimated state trajectory.

Perform line-search between previous and new state trajectory.

Check convergence: Converged stop SQP iterationsNot converged go to step 1

* * *2 1ek N k kx x x

1

1 2, 0, , , ,1

25 25i i ip p p p

Page 28: De Demer geregeld met MPC

Introduction River modeling NMPC NMHE Set invariance Conclusions

Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010

Simulations Gaussian uncertainty on rainfall-runoff Measurement noise MHE parameters

State estimates

8eN

Page 29: De Demer geregeld met MPC

Introduction River modeling NMPC NMHE Set invariance Conclusions

Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010

Simulations Comparison performance MPC with three-position controller

Significant improvement

Slightly worsened

Page 30: De Demer geregeld met MPC

Introduction River modeling NMPC NMHE Set invariance Conclusions

Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010

Set invariance LTV system:

Constraints:

Set invariance:

Page 31: De Demer geregeld met MPC

Introduction River modeling NMPC NMHE Set invariance Conclusions

Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010

Set invariance MPC stability (dual mode MPC):

0x

pNx

Polytopic Ellipsoidal Convex program

Page 32: De Demer geregeld met MPC

Introduction River modeling NMPC NMHE Set invariance Conclusions

Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010

Set invariance Low-complexity polytopes:

Vertices:

Existing algorithms : Conservative Fixed feedback law K Scale badly with state dimension (vertex based 2n vertices)

New algorithm with better properties

1

1js

Page 33: De Demer geregeld met MPC

Introduction River modeling NMPC NMHE Set invariance Conclusions

Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010

Set invariance New algorithm :

Initial invariant and feasible set Sequence of convex programs increasing the volume of the set while keeping it

invariant and feasible until convergence

Initialization :

Convex LMI : convex

Page 34: De Demer geregeld met MPC

Introduction River modeling NMPC NMHE Set invariance Conclusions

Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010

Set invariance Volume maximization :

New invariance conditions :

Introduction of transformed variables :

New parametrization of unknown variable P:

with X a symmetric inverse positive matrix

Page 35: De Demer geregeld met MPC

Introduction River modeling NMPC NMHE Set invariance Conclusions

Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010

Set invariance Algorithm :

Page 36: De Demer geregeld met MPC

Introduction River modeling NMPC NMHE Set invariance Conclusions

Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010

Example Control of temperature profile of a one-dimensional bar [Agudelo,2006]:

New algorithm outperforms existing ones w.r.t. volume of set as well as computation time

Page 37: De Demer geregeld met MPC

Introduction River modeling NMPC NMHE Set invariance Conclusions

Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010

Setpoint regulation Regulation of the upstream part of the Demer

Steady state

vgl, hgl

qbg

vopw, hopw

qman

qopw

K7 A

v1, h1

E

vs, hs

qK7

qA qE

vs2, hs2

qs

vs3, hs3

D

qs2 qs3

vvg, hvg

qhopw

vs4, hs4

qs4 qhs

vhopw, hhopw

qvs qD

q2

qzbopw qzb1

qgopw

qgafw

v3, h3

qvopw

hvopw

qK18

q3 q4

vw, hw

qK19 qK30

qbgopw

qK7lg

qgl

vbg, hbg

qK7bg

qzb3

q7 Demer

Zw

arte

wat

er

Zwartebeek

Vlootgracht

Schulensmeer

Webbekom

Her

k

Get

e

Beg

ijne

beek

Vel

pe

Leu

gebe

ek

Gro

te L

eigr

acht

Hou

wer

sbee

k

q6 q5

qK31

qzb2

v4, h4

vzb, hzb

qzw

q1

vlg, hlg

qK24B

hbgopw

qK24A

vzw, hzw

qzwopw

qhs2

v2, h2

qh

qsa

Page 38: De Demer geregeld met MPC

Introduction River modeling NMPC NMHE Set invariance Conclusions

Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010

Setpoint regulation LQR

Linearize nonlinear model around steady state

Determine state feedback K with LQR theory

Robust state feedback Determining a LTV system simulation:

Invariant set + feedback K

1000Q I

k ku Kx

1k k kx Ax Bu

0

T Tk k k k

k

J x Qx u Ru

R I

1 1 2 2 3 3, , , , ,A B A B A B

Page 39: De Demer geregeld met MPC

Introduction River modeling NMPC NMHE Set invariance Conclusions

Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010

Setpoint regulation Simulation 1: step disturbance

Page 40: De Demer geregeld met MPC

Introduction River modeling NMPC NMHE Set invariance Conclusions

Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010

Setpoint regulation Simulation 2:

new K LTV based on 6 linear models 2 different step disturbances and no disturbance at the end

Page 41: De Demer geregeld met MPC

Introduction River modeling NMPC NMHE Set invariance Conclusions

Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010

Setpoint regulation

Simulation 3: simulation first 200 hours of 1998

LQR cost Robust feedback cost

2.6883 1.1913

Page 42: De Demer geregeld met MPC

Introduction River modeling NMPC NMHE Set invariance Conclusions

Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010

Conclusions and future research

A nonlinear model was determined accurate and fast enough for real-time control purposes. A nonlinear MPC and MHE scheme was developed that outperformed the current three-

position controller. Moreover, the scheme was robust against uncertainties. A new algorithm was developed for the efficient calculation of low-complexity polytopes. The

algorithm was used for improved setpoint regulation of the upstream part of the Demer.

Concluding remarks

Coupling control scheme with finite-difference model Extending model with flood map Distributed MPC Extend results to invariant low-complexity polytopes with a more general shape

Future research

Page 43: De Demer geregeld met MPC

Introduction River modeling NMPC NMHE Set invariance Conclusions

Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010

THANK YOU FOR LISTENING