De Demer geregeld met MPC
description
Transcript of 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
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
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.
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
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
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)
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
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
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)
Introduction River modeling NMPC NMHE Set invariance Conclusions
Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010
River modeling Calibration and validation
Introduction River modeling NMPC NMHE Set invariance Conclusions
Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010
River modeling Calibration and validation
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
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
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
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
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
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
Introduction River modeling NMPC NMHE Set invariance Conclusions
Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010
Control scheme SQP algorithm
(ii).
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
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
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
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
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.
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 .”
Introduction River modeling NMPC NMHE Set invariance Conclusions
Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010
Moving horizon estimator Nonlinear MHE scheme (NLP)
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
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
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
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
Introduction River modeling NMPC NMHE Set invariance Conclusions
Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010
Set invariance LTV system:
Constraints:
Set invariance:
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
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
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
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
Introduction River modeling NMPC NMHE Set invariance Conclusions
Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010
Set invariance Algorithm :
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
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
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
Introduction River modeling NMPC NMHE Set invariance Conclusions
Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010
Setpoint regulation Simulation 1: step disturbance
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
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
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
Introduction River modeling NMPC NMHE Set invariance Conclusions
Toni Barjas Blanco - Public Doctoral Defense - September 8th, 2010
THANK YOU FOR LISTENING