Upload
others
View
4
Download
0
Embed Size (px)
Citation preview
Infinite-dimensional nonlinear predictivecontroller design for open-channel hydraulic
systems
D. Georges,Control Systems Dept - Gipsa-lab, Grenoble INP
Workshop on ”Irrigation Channels and Related Problems”,Salerno, Italy, october 2-4, 2008
Outline of the talk
1. Control of a single canal pool
2. Modelling of open-channel hydraulic systems: Saint VenantPDE
3. Some backgrounds on predictive control
4. Formulation of the associated optimal control problem
5. Necessary conditions for optimality: the adjoint PDEs
6. Computation of the related two-point boundary value problem
7. Description of the here-proposed predictive control scheme
8. Some simulation results
9. The multi-pool case: a decomposition approach viaLagrangian relaxation
10. Some conclusions and perspectives
Control problemRegulation of a single pool of an irrigation canal (pool = canalsection delimited by 2 gates) using the upstream regulator gate:
B
hDh
S
P
hQ
I
L
Upstream Downstream
Transversal section Longitudinal section
Why to use nonlinear predictive control?
1. In order to take nonlinear transportation and diffusionphenomena into account;
2. Because (finite-dimensional) nonlinear optimal controlprovides, under some specific assumptions, stabilizingfeedbacks (infinite-horizon optimal control, predictive control):possible extension in the infinite-dimensional framework?
Open-channel modelling: Saint Venant PDE
Rectangular canal section case:
S :
{B∂z∂t + ∂Q
∂x = q∂Q∂t + ∂
∂x (Q2
Bz ) + gBz ∂z∂x − gBz(I − J(Q, z)) = kq Q
Bz
(1)z = relative water level,(m); B=canal width,(m); Q = water flow
rate, (m3
s ); A = wet section, (m2); I = canal slope ; g = acc. ofgravity, ( m
s2 ); J = friction (mm ) ; q(x)= withdrawal / length unit
(m2
s ) ; k=0, if q > 0, 1, if q < 0.
B.C .
{Q(0, t) = u(t) (integral control : upstream)z(L, t) = v(t) (disturbance : downstream)
(2)
Models of the gates may be introduced
Some backgrounds on predictive controlConsider a nonlinear system of the form:
x = F (x , u), x(0) = x0 (3)
with F (0, 0) = 0 (the origin is an equilibrium point).
1. At time t, x(t) = xt is measured or computed from a stateobserver.
2. Computation of an (open-loop) optimal control problem overa receding control interval [t, t + T ] starting with state xt
(so-called ”associated optimal control problem” (AOCP)):
minu(.)
∫ t+T
tL(x(τ), u(τ))dτ (4)
s.t. x = F (x , u), x(t) = xt and x(t + T ) ∈ E (5)
where E denotes a domain of the state space in whichx(t + T ) is assigned.
3. Application of the first control u(t) obtained from thesequence {u(t), u(t + ∆t), u(t + 2∆t), ...., u(t + N∆t)}.
4. Go back to 1), t + ∆t → t.
Some backgrounds on predictive control
Some sufficient conditions to ensure local asymptoticstability around the origin (Mayne & Michalska, TAC 90):
I L(., .) is positive definite in both x and u (in the sense ofHessian matrices w.r.t. x and u)
I under assumptions (mainly, F is 2 times cont. differentiabble,F is uniformly Lipschitz in x w.r.t. u, local uniformcontrollability) ensuring existence and uniqueness of theAOCP
I E = {0}
V (x , t) =
∫ t+T
tL(x(τ), u(τ))dτ is a control Lyapunov function.
Extension to the infinite-dimensional case?
Associated optimal control problem
minu
∫ T
0m(u(t))dt +
∫ T
0
∫ L
0l(z(x , t),Q(x , t))dxdt (6)
s.t.
S :
B ∂z∂t + ∂Q
∂x = q∂Q∂t + ∂
∂x (Q2
Bz ) + gBz ∂z∂x − gBz(I − J) = kq Q
Bzµ = u
(7)
with
I .C .
Q(x , 0) = φ1(x), x ∈ [0, L]z(x , 0) = φ2(x)µ(0) = φ1(0)
(8)
B.C .
{Q(0, t) = µ(t) (control : upstream − end)z(L, t) = v(t) (disturbance : downstream − end)
(9)
and constraint on state at final time (terminal constraint):
T .C .
{Q(x ,T ) = Q0(x), x ∈ [0, L]z(x ,T ) = z0(x)
(10)
Regulation around an equilibrium state
I Regularization term:
m(u(t)) =r
2u(t)2, r > 0 (11)
I State cost function:
l(z(x , t),Q(x , t)) =1
2[q1(x)(z(x , t)− z0(x))2 (12)
+q2(x)(Q(x , t)− Q0(x))2], q1(.), q2(.) > 0
where z0(x), Q0(x), x ∈ [0, L] = equilibrium state, solution of:
Se :
{∂Q∂x = q0∂∂x (Q2
Bz ) + gBz ∂z∂x − gBz(I − J) = kq0
QBz
(13)
with Boundary Conditions:
B.C .
{Q0(0) = Qo
z0(L) = zL(14)
Some remarks
I Some other possible control objectives by choosing other mand l functionals:
I Regulation of the downstream-end level z(x = L, t), withupstream-end boundary control and a downstream-endboundary condition Q(x = L, t) = v(t), where v is thedownstream-end water flow acting as a disturbance.
I Regulation of the downstream-end level z(x = L, t), withdownstream-end boundary control and an upstream-endboundary condition Q(x = 0, t) = v(t), where v is theupstream-end water flow acting as a disturbance.
I Control problems with withdrawals may be also consideredwithout restriction.
Lagrangian formulation
L(Q, z , λ1, λ2, λ3, u) =
∫ T
0{m(u) + λ3S3}dt
(15)
+
∫ T
0
∫ L
0{l(z ,Q) + λ1S1 + λ2S2}dxdt
with
S :
S1 = B∂z
∂t + ∂Q∂x − q
S2 = ∂Q∂t + ∂
∂x (Q2
Bz ) + gBz ∂z∂x − gBz(I − J)− kq Q
Bz
= ∂Q∂t + ∂
∂x (Q2
Bz + 12gBz2)− gBz(I − J)− kq Q
BzS3 = µ− u
(16)
Necessary conditions for optimality: some adjointPDEs (D. Georges & M.L. Chen, ECC 01)
derived from the Lagrangian formulation + variational calculus:In order that both u(t) ∈ [0,T ] and the trajectory of system:
S :
B ∂z∂t + ∂Q
∂x = q∂Q∂t + ∂
∂x (Q2
Bz ) + gBz ∂z∂x − gBz(I − J) = kq Q
Bzµ = u
(17)
with
I .C .
Q(x , 0) = φ1(x), x ∈ [0, L]z(x , 0) = φ2(x)µ(0) = φ1(0)
(18)
B.C .
{Q(0, t) = µ(t) (control)z(L, t) = v(t) (disturbance)
(19)
and
T .C .
Q(x ,T ) = Q0(x), x ∈ [0, L]z(x ,T ) = z0(x)µ(T ) = Q0(x = 0)
(20)
are optimal,
it is necessary that there exists λ = (λ1(x , t), λ2(x , t), λ3(t)),solution of the adjoint system of S:
Sadj :
∂l∂z − B ∂λ1
∂t + ∂λ2∂x ( Q2
Bz2 − gBz)− λ2(gB(I − J)
−gBz∂J
∂z− kq
Q
Bz2) = 0
∂l
∂Q− ∂λ1
∂x− ∂λ2
∂t− 2
∂λ2
∂x
Q
Bz− λ2(kq
1
Bz− gBz
∂J
∂Q) = 0
λ1(0, t) + 2λ2(0, t)Q(0, t)
Bz(0, t)+ λ3 = 0
with
I .T .C .
λ1(x , 0), λ1(x ,T ), free, x ∈ [0, L]λ2(x , 0), λ2(x ,T ), freeλ3(0), λ3(T ) free
(21)
and
B.C .
{λ2(0, t) = 0, t ∈ [0,T ]
λ1(L, t) + 2λ2(L, t) Q(L,t)Bz(L,t) = 0
(22)
For all t ∈ [0,T ], the optimal control u = u∗, is necessary solutionof:
m′(u(t))− λ3(t) = 0
⇒ A two-point boundary value problem
Computation of the two-point boundary valueproblem
Computation in two stages:
1. Spatial and temporal discretization of the canonical equations:Preissman numerical scheme (1962): applied to both S andSadj ;
2. Solution of the nonlinear algebraic equations derived from thetwo-dimensional grid via a Newton-Raphson method.
Preissman scheme: a finite-difference scheme
semi-implicit in timeApproximation of fonctions f and their derivatives:
f (x , t) =1− θ
2[fi+1 + fi ] +
θ
2[f +
i+1 + f +i ]
∂f
∂x(x , t) =
1− θ∆x
[fi+1 − fi ] +θ
∆x[f +
i+1 − f +i ]
∂f
∂t(x , t) =
1
2∆t[f +
i − fi + f +i+1 − fi+1] (23)
where i = spatial index, + = t + ∆t and 0 ≤ θ ≤ 1 = relaxationcoefficient.If θ ≥ 0, 5, we get an unconditionally stable integration scheme.
An algebraic set of nonlinear equations
For the case when m(u) = 12u2, if N is the number of spatial
discretization points and M, the number of temporal discretizationpoints:
I S + B.C. ⇒ (2N + 1)×M unknown variables(z(x , t),Q(x , t), µ(t)) with (2N + 1)× (M − 1) equations +4N + 2 constraints (the states (z ,Q, µ) are imposed at t = 0and t = T ).
I Sadj + B.C. ⇒ (2N + 1)×M unknown variables(λ1(x , t), λ2(x , t), λ3(t)) with (2N + 1)× (M − 1) equations.
⇒ 4N ×M + 2M variables(z(x , t),Q(x , t), µ(t), λ1(x , t), λ2(x , t), λ3(t)) for 4N ×M + 2Mequations: an implicit problem
Computation of both state and adjoint state via aNewton-Raphson scheme.
The predictive control scheme1. At time t : computation of the open-loop optimal control
problem, with both initial and final states fixed:
minu
∫ t+T
tm(u(t))dt +
∫ t+T
t
∫ L
0l(z(x , t),Q(x , t))dxdt (24)
s.t.
S :
B ∂z∂t + ∂Q
∂x = q∂Q∂t + ∂
∂x (Q2
Bz ) + gBz ∂z∂x − gBz(I − J) = kq Q
Bzµ = u
(25)with
I .C .
Q(x , 0) = Qt(x), x ∈ [0, L]z(x , 0) = zt(x)µ(0) = Qt(0)
(26)
Qt(x) et zt(x) = states at time t on [0, L],
B.C .
{Q(0, τ) = µ(τ), τ ∈ [t, t + T ] (control)z(L, τ) = v(τ) (prediction of downstream − end level)
(27)and
T .C .
{Q(x , τ = t + T ) = Q0(x), x ∈ [0, L]z(x , τ = t + T ) = z0(x)
(28)
The predictive control scheme
2 Apply u(t) defined as the first optimal control input sequencecomputed on [t, t + T ]: the system reaches state(z(x , t + ∆t),Q(x , t + ∆t)), ∀x ∈ [0, L].
3 Go to 1), with t + ∆t → t and get zt(x) = z(x , t + ∆t),Qt(x) = Q(x , t + ∆t).
Some simulation results
I Simulation based on Preissman numerical scheme;
I A 5 km long canal divided into 10 sections of 500 m each;
I Regulation around a uniform equilibrium state correspondingto a constant relative water level z0 of 1.05 m, along the pool;
I Simulation starting from a uniform equilibrium of 1 m;
I At each time step: complexity of the two-point boundaryvalue problem: N = 11 (spatial discretization) and M = 6(temporal discretization, ∆t = 100s): 4N ×M + 2M = 288equations for 4N ×M + 2M = 288 unknown variables:computation time < 60 s on a Pentium 1,8 Mhz, 512 MoLaptop: real-time control is possible.
Simulations results
0 10 20 30 40 50 60 70 80 903.5
3.6
3.7
3.8
3.9
Time in mns
in m
3/sWater flow rate
0 10 20 30 40 50 60 70 80 900.96
0.98
1
1.02
1.04
1.06
1.08
Time in mns
in m
eter
s
Water level
Simulations results
The multi-pool case
A two-pool case: (easy extension to n pools) :
−
= 1Lx+
= 1Lx
0=x
2Lx =
Regulator gate
Pool 1
Pool 2
I Dynamics of the 2 pools: 2 X 2 PDE coupled by a gatemodel: Q1(L−1 , t) = Q2(L+
1 , t) = Q(t) and Q such that
Q2 = K 2α2 × 2g(z1(L−1 , t)− z2(L+1 , t))
⇔ F (Q(t), z1(L−1 , t), z2(L+1 , t), α(t)) = 0
Two-pool modelling
Spool1 :
B ∂z1
∂t + ∂Q1∂x = q1
∂Q1∂t + ∂
∂x (Q2
1Bz1
) + gBz1∂z1∂x − gBz1(I − J) = kq1
Q1Bz1
µ = u1
(29)
B.C .
{Q1(0, t) = µ(t)Q1(L−1 , t) = Q(t)
(30)
Spool2 :
B ∂z2
∂t + ∂Q2∂x = q2
∂Q2∂t + ∂
∂x (Q2
2Bz2
) + gBz2∂z2∂x − gBz2(I − J) = kq2
Q2Bz2
α = u2
(31)
B.C .
{Q2(L+
1 , t) = Q(t)z2(L2, t) = v(t)
(32)
Q(t)2 = K 2α2 × 2g(z1(L−1 , t)− z2(L+1 , t)), (33)
Optimal control formulation
minu
2∑i=1
[
∫ T
0mi (ui )dt +
∫ T
0
∫ bi
ai
li (zi (x , t),Qi (x , t))dxdt] (34)
s.t. Spool1 + B.C. + I.C.+ T.C. and Spool2 + B.C + I.C.+ T.C.
and the additional algebraic constraint defined on [0,T ]:
Q2 = K 2α2 × 2g(z1(L−1 , t)− z2(L+1 , t)).
Main issues
I How to reduce the computational complexity?
I How to take advantage of distributed control architecture(supervisory control and data acquisition: SCADA) used inlarge-scale water distribution systems?
I Here-proposed solution: use of adecomposition-coordination algorithm based onLagrangian relaxation (D. Georges, Workshop NMPC’06)
An augmented lagrangian formulation
Lc(Q1, z1,Q2, z2,Q, λ11, λ
12, λ
13, λ
21, λ
22, λ
23, p, u1, u2)
=
∫ T
0{[m1(u1) + λ1
3[Q1(0, t)− u1(t)]}dt
+
∫ T
0
∫ L−1
0{l1(z1,Q1) + λ1
1S11 + λ1
2S12}dxdt
+
∫ T
0{[m2(u2) + λ2
3[α− u2(t)]}dt
+
∫ T
0
∫ L2
L+1
{l2(z2,Q2) + λ21S2
1 + λ22S2
2}dxdt
(35)
+
∫ T
0[(p +
c
2F (Q(t), z1(L−1 , t), z2(L+
1 , t)))
× F (Q(t), z1(L−1 , t), z2(L+1 , t), α)]dt
(36)
p is the dual variable associated to the gate constraint F
an additional quadratic term c2‖F‖
2 is introduced
⇒ An augmented Lagrangian Lc
Main improvement of augmented Lagrangians:For ”sufficiently” large c > 0, the augmented Lagrangian admits atleast one local saddle-point (no duality gap) even for non convexproblems.
⇒ Convergence of relaxation algorithms is guaranteed
Some backgrounds on price-decomposition
minu=(u1,u2)
J(u1, u2) sous θ(u1, u2) = 0. (37)
Augmented Lagrangian:
Lc(u, p) = J(u1, u2)+ < p, θ(u1, u2) > +c
2‖θ(u1, u2)‖2
Duality approach:Computation of a saddle-point, solution of:
maxp
minu
Lc(u, p)
A price-decomposition algorithm (UZAWA):1) Solve minu Lc(u, pk)⇒ uk+1
2) pk+1 = pk + ρθ(uk+11 , uk+1
2 )
If both J(u1, u2) = J1(u1) + J2(u2) and θ(u1, u2) = θ1(u1) + θ2(u2)(separable case) and if c = 0 (ordinary lagrangian formulation),then price decomposition-coordination:
1. Decomposition: Solve two independant subproblemsminui Ji (ui )+ < pk , θi (ui ) >⇒ uk+1
i , i = 1, 2
2. Coordination: pk+1 = pk + ρθ(uk+11 , uk+1
2 )
If θ is not separable and c 6= 0, separability via linearization ofc‖.‖2:ALGORITHM (Cohen, 84)
1. Decomposition :
minui
Ji (ui )+ < pk + cθ(uk1 , u
k2 ), θ′i (uk
1 , uk2 ).ui > +
1
2ε‖ui −uk
i ‖2,
=⇒ uk+1i ,
where θ′i is the gradient of θ w.r.t. ui .
2. Coordination:
pk+1 = pk + ρθ(uk+11 , uk+1
2 )
with 0 < ρ ≤ c et 0 < ε < 1/2c (for convex problems).
Application to the 2-pool AOCP1. AOCP of pool 1:
minu1
∫ T
0m1(u1)dt +
∫ T
0
∫ L−1
0l1(z1(x , t),Q1(x , t))dxdt +∫ T
0[< pk + cF k ,F ′ku1
.u1 > +1
2ε(u1 − uk
1 )2]dt s.t. Spool1 +
B.C. + I.C.+ T.C., =⇒ uk+11 (.),
2. AOCP of pool 2:
minu2
∫ T
0m2(u2)dt +
∫ T
0
∫ L2
L+1
li (z2(x , t),Q2(x , t))dxdt +
∫ T
0[<
pk + cF k ,F ′ku2.u2 > +
1
2ε(u2 − uk
2 )2]dt, s.t. Spool1 + B.C. +
I.C.+ T.C., =⇒ uk+12 (.),
3. Coordination:
minQ
∫ T
0[< pk + cF k ,F ′kQ .Q > +
1
2ε(Q − Qk)2]dt,
=⇒ Qk+1(.),
pk+1 = pk + ρF (Qk+1, z1(uk+11 ), z2(uk+1
2 ), α(uk+12 ))
Some potential advantages
I Complexity reduction thanks to the decomposition insub-problems and parallel computation:In our case study, 2 problems of complexity 4(N + 1)×Mversus one problem of complexity 8(N + 1)×M ;
I Well suited for distributed control application (NetworkedControl Systems).
A distributed predictive control scheme
At each instant dt, parallel computation of the two-point boundary value sub-problems
POOL 1
Computation of a two-point boundary value problem (similar to a single-pool problem)
The local variables z1 and u1 at iteration k are sent through the network
POOL 2
Computation of a two-point boundary value problem (similar to a single-pool problem)
The local variables z2 and u2 at iteration k are sent through the network
Coordination: The coordination variables are the Lagrangian multiplier p associated to the gate constraint and the flow rate Q
Update of p and Q ; p and Q are sent through the network
k+1 -> k
Broadcast of variables through the communication network until convergence
NETWORK
Conclusions and perspectives
1. Practical extension of finite-dimensional predictive controltechniques to an infinite-dimensional problem;
2. Computation of the related two-point boundary value problemusing a 2D discretization method based on Preissmanintegration scheme;
3. Theoretical analysis still to be performed (see M. Herty’spresentation);
4. Extension to the multi-pool case via a Lagrangian relaxationtechnique (Decomposition-Coordination) is possible, but hasto be validated;
5. For practical implementation: need of a state observer (can bederived by using variational calculus as a ”dual controlproblem”).