Sketch of proof Summary of Section (8) (9) Economic

Sketch of proof
(D)
`(x, u)
|
`(xe , ue ) + (x)
{z
˜
=: `(x, u)
(f (x, u))
}
Summary of Section (8)
↵(kx xe k)
Due to the terminal constraints the functionals JN (using `)
˜ di↵er only by a constant independent of u
and JeN (using `)
optimal trajectories coincide
The optimal control problem with `˜ instead of ` satisfies all
properties for stability of stabilizing MPC (with the
corresponding optimal value function VeN as Lyapunov
function)
asymptotic stability for the modified problem
Since the optimal trajectories coincide, the MPC closed loops
coincide
asymptotic stability for the original problem
Economic MPC means that the cost function is not
a-priori related to an equilibrium
However, the results become particularly nice if an
optimal equilibrium (xe , ue ) exist
In contrast to stabilizing MPC, this equilibrium need not
be the (unique) minimizer of ` over X ⇥ U
The optimal equilibrium can be used as terminal
constraint
Optimality can be proven in a (rather weak) averaged
sense, though simulations suggest better optimality
properties
Strict dissipativity ensures both the existence of an
optimal equilibrium and asymptotic stability of the closed
loop
Lars Grüne, Nonlinear Model Predictive Control, p. 133
Lars Grüne, Nonlinear Model Predictive Control, p. 134
Economic MPC without terminal constraints
What happens without terminal constraints? We investigate
this for the macroeconomic example
[Brock/Mirman ’72]
Minimize the average performance with
(9) Economic MPC without
terminal constraints
`(x, u) =
ln(Ax↵
u),
A = 5, ↵ = 0.34
with dynamics x(n + 1) = u(n)
and constraints X = [0.1, 10], U = [0.1, 5]
This problem exhibits the optimal equilibrium
xe ⇡ 2.2344 with `(xe , ue ) ⇡ 1.4673
and is strictly dissipative with (x) ⇡ 0.2306x
Note: now the NMPC algorithm knows neither xe nor
Lars Grüne, Nonlinear Model Predictive Control, p. 136
Example: trajectories
Example: averaged closed loop performance
5
4.5
0
10
4
5
−2
3.5
10
4.5
x(n)
J∞(5,µN)−le
3
4
2.5
3.5
2
3
x(n)
1.5
−4
10
−6
10
2.5
1
−8
10
2
0.5
1.5
0
0
5
10
15
n
1
0.5
0
−10
10
N =5
cl
0
5
10
15
n
J 1 (5, µN )
N =3
2
4
6
N
8
10
`(xe , ue ) depending on N , logarithmic scale
Lars Grüne, Nonlinear Model Predictive Control, p. 137
Lars Grüne, Nonlinear Model Predictive Control, p. 138
Example: a linearized tank reactor
Tank reactor example: trajectories
[Diehl/Amrit/Rawlings ’11]
15.1
Minimize the average performance with
15
2
`(x, u) = kxk + 0.05u
2
14.9
with dynamics
x(n+1) =
0.8353 0
0.1065 0.9418
◆
x(n)+
✓
0.00457
0.00457
◆
u(n)+
✓
0.5559
0.5033
◆
This problem exhibits the optimal steady state
✓
◆
3.546
e
x ⇡
with `(xe , ue ) ⇡ 229.1876
14.653
x2(n)
✓
14.8
14.7
14.6
14.5
14.4
3.2
3.3
3.4
3.5
3.6
x1(n)
3.7
3.8
3.9
N = 15
and is dissipative with (x) = ( 368.6684, 503.5415)T x
Lars Grüne, Nonlinear Model Predictive Control, p. 139
Lars Grüne, Nonlinear Model Predictive Control, p. 140
Tank reactor example: averaged closed loop
performance
Observations
15.1
5
2
4.5
15
4
14.9
1.5
3.5
0
10
14.8
x2(n)
x(n)
x(n)
3
1
2.5
14.7
2
14.6
1.5
0.5
14.5
1
−1
0.5
0
10
14.4
0
5
10
15
20
25
0
0
J∞(x*,µN)−g*
n
−2
10
−3
−4
cl
J 1 (xe , µN )
5
10
15
N
20
25
`(xe , ue ) depending on N , logarithmic scale
3.2
3.3
3.4
3.5
3.6
3.7
3.8
3.9
x1(n)
Lars Grüne, Nonlinear Model Predictive Control, p. 142
Idea of proof
VN +1 (x)
15
Can we prove this behavior?
Lars Grüne, Nonlinear Model Predictive Control, p. 141
The following inequality plays the role of the “↵N –inequality”
from stabilizing NMPC:
10
n
optimal open loop trajectories first approach the optimal
equilibrium and then turn away – “turnpike property”
closed loop trajectories converge to a neighborhood of the
optimal equilibrium whose size tends to 0 as N ! 1
the closed loop performance satisfies
cl
J 1 (x, µN ) ! `(xe , ue ) as N ! 1, exponentially fast
10
10
5
Prolonging in the middle
Sketch of the idea:
x? (k)
VN (x)  `(xe , ue ) + “error”
In stabilizing MPC or under terminal constraints, we have seen
that this inequality can be established by “prolonging” the
finite horizon optimal trajectory at the end
xe
But: this method does not work here, since at the end the
finite horizon optimal trajectories are far away from xe
Remedy: prolong the optimal trajectory in the middle
Lars Grüne, Nonlinear Model Predictive Control, p. 143
Lars Grüne, Nonlinear Model Predictive Control, p. 144
Assumptions needed for this construction
Economic MPC theorem
What do we need to make this construction work? [Gr. ’13]
Theorem: [Gr./Stieler ’14]
(1) Continuity of VN near xe (uniform in x and N )
I
ensures that we can prolong the trajectory in the middle
without changing the value of the tail too much
(2) Turnpike property
I
ensures that the finite horizon optimal trajectory satisfies
min
k2{0,...,N }
I
kx? (k)
xe k  (N )
Let f and ` be Lipschitz, X and U be compact and assume
(i) local controllability near xe
(ii) strict dissipativity
) uniform continuity of VN
(iii) reachability of xe from all x 2 X
) turnpike property
(iv) polynomial growth conditions for `˜
with (N ) ! 0 as N ! 1
note: in numerical examples we often observe
exponential turnpike, i.e., (N ) = ✓N
(i)–(iv) ) exponential turnpike
[Damm/Gr./Stieler/Worthmann ’14]
(for alternative conditions see also [Porretta/Zuazua ’13])
The next theorem provides checkable sufficient conditions
for these properties
Lars Grüne, Nonlinear Model Predictive Control, p. 145
Economic MPC theorem
Under assumptions (i)–(iii), there exist "1 (N ), "2 (K) ! 0 as
N ! 1 and K ! 1, exponentially fast if additionally (iv)
holds, such that the following properties hold
Lars Grüne, Nonlinear Model Predictive Control, p. 146
x
Illustration of (2) and (3)
(1) Approximate average optimality:
cl
J 1 (x, µN )  `(xe , ue ) + "1 (N )
(2) Practical asymptotic stability: there is
kxµN (k, x)
xe k  (kx
xe
K
ε1(N)
n
2 KL:
xe k, k) + "1 (N ) for all k 2 N
(3) Approximate transient optimality: for all K 2 N:
(2): xµN (n) converges to the "1 (N )-ball around xe
cl
JK
(x, µN (x))  JK (x, u) + K"1 (N ) + "2 (K)
for all admissible u with kxu (K, x)
xe k
 (kx
xe k, K)
+ "1 (N )
Lars Grüne, Nonlinear Model Predictive Control, p. 147
(3): cost of light blue trajectories is higher than that of
(3): xµN (n) up to error terms K"1 (N ) + "2 (K)
Lars Grüne, Nonlinear Model Predictive Control, p. 148
Linear quadratic convex problems
Theorem: [Gr./Stieler ’14] For X = Rn , U = Rm and
f (x, u) = Ax + Bu + c
`(x, u) = xT Rx + uT Qu + dT x + eT u,
R, Q > 0
the condition
(A, B) is stabilizable
is necessary and sufficient for practical asymptotic stability and
approximate optimality of the MPC closed loop.
Moreover, all error terms converge to 0 exponentially fast
Summary of Section (9)
Without terminal constraints, average performance is only
achieved approximately — the larger N , the better
Likewise, asymptotic stability is only achieved up to a
small neighborhood of xe , i.e., “practically”
On the other hand, no a priori knowledge of the optimal
equilibrium is needed
In addition, transient optimality is achived
(recently also established for terminal constrained variant)
Exponential turnpike plus polynomial bounds in addition
ensure exponential decay of the error terms
As in the case with terminal constraints dissipativity plus
controllability (or stabilizability) are the important
streuctural conditions
Lars Grüne, Nonlinear Model Predictive Control, p. 149
Lars Grüne, Nonlinear Model Predictive Control, p. 150
An application to a smart grid control problem
Consider the following setting
in a future smart grid:
+ -
(10) Application to a smart grid
control problem
with Philipp Braun (Bayreuth), Chris Kellett (Newcastle),
Steve Weller (Newcastle) and Karl Worthmann (Ilmenau)
+ -
(batteries could be replaced
by other storage devices)
+ -
Control goal: Use the batteries as bu↵er in order to avoid
Control goal: large variations in demand and supply
Lars Grüne, Nonlinear Model Predictive Control, p. 152
Data: net energy demand
Model
Energy drawn from / supplied to the grid
For each unit i = 1, . . . , P we define
5
xi = state of battery of ith unit
ui = battery charge/discharge
wi = energy load minus production in ith unit
yi = power drawn from/supplied to the outside
4
y [KWh]
3
2
0  xi  Ci
ui  ui  ui
1
xi (k + 1) = xi (k) + T ui (k)
yi (k) = wi (k) + ui (k)
0
−1
0h
24h
48h
72h
96h
120h
144h
time
Ausgrid Data: individual units, averaged
sampling time T = 30 min
In practice, forecasted data will be used
Lars Grüne, Nonlinear Model Predictive Control, p. 153
Lars Grüne, Nonlinear Model Predictive Control, p. 154
MPC approach
Control Schemes
Centralized Control
S1
Decentralized Control
S3
S4
S2
S5
S1
Compute at sampling instant n
P NP1
P
⇣(n) = N1P
wi (n + j)
i=1 j=0
Objective: keep yi close to average (in time) consumption
using MPC with ` penalizing the deviation from the average
and minimize over (u1 , . . . , uP )
NP1
P
P
2
⇣(n) P1
yi (n + j)
j=0
i=1
w.r.t. global constraints
Lars Grüne, Nonlinear Model Predictive Control, p. 155
S6
For each unit i compute
NP1
⇣ i (n) = N1
wi (n + j)
j=0
and minimize over ui
NP1
⇣ i (n) yi (n + j)
2
j=0
w.r.t. local constraints
Lars Grüne, Nonlinear Model Predictive Control, p. 156
Numerical Results
Average Battery Profiles
Performance
1.6
0.8
1.4
x in [KWh]
z in [KW]
1.8
1
0.6
0.4
Alternative: Distributed Control
(Optimization in units with communication via Central Entity)
S3
S4
2
Uncontrolled
Decentrtralized MPC
Centralized MPC
1.2
Control Schemes
1.2
1
0.8
0.6
0.2
0.4
0
−0.2
0
0
24
48
72
96
Time in hours
120
144
168
0
Central
Entity
S2
0.2
24
48
72
96
Time in hours
120
144
S1
S6
Lars Grüne, Nonlinear Model Predictive Control, p. 157
The Centralized Optimization Algorithm
At each sampling instant n:
1
NP
P NP1
P
s.t.
I
I
I
wi (n + k)
1
P
P
P
yi (n + k)
i=1
⇢
◆2
1 and i = 1, . . . , P
optimal control sequence u? (0), . . . , u? (N
performance output
y ? (0), . . . , y ? (N
1 (i.e., ui ⌘ 0)
a. Units: send yi` to the Central Entity
xi (0) = xµN ,i (n) and xi (k + 1) = xi (k) + T ui (k)
yi (n + k) = wi (n + k) + ui (k)
0  xi (k + 1)  Ci and ui  ui (k)  ui
for k = 0, . . . , N
The Distributed Optimization Algorithm
1. Initialize yi0 (j) := wi (j), j = n, . . . , n + N
2. Perform iteratively for ` = 0, 1, . . .
i=1 j=0
✓
3. Minimize
NP1
JN (x0 , y(n + ·)) =
⇣(n)
k=0
Lars Grüne, Nonlinear Model Predictive Control, p. 158
At each sampling instant n:
1. Set x0 = [x1 (n), . . . , xP (n)]T
⇣(n) =
S5
168
Setting:
100 units; 1 week simulation length
prediction horizon 24[h]; sampling time 0.5[h]
maximal charging/discharging rates per hour: 0.3[kWh]
2. Compute
Public
Data
1)
1)
Lars Grüne, Nonlinear Model Predictive Control, p. 159
b. Central Entity: Compute and broadcast ⇣(n) and
P
Y ` (j) := Pi=1 yi` (j),
j = n, 1, . . . , n + N
1
c. Units: For each i 2 {1, . . . , P } minimize (in parallel)
n+N
P 1
2
JN,i (xi , yi (·)) =
P ⇣(n) Y ` (j) + yi` (j) yi (j) ,
j=n
send the (unique) minimizer yi`,? (·) to the Central Entity
d. Central Entity: Compute
and broadcast
✓
i ◆2
n+N
P h
P 1
`,?
1 P
`
✓ = argmin
⇣(n) P
(1 ✓)yi (j) + ✓yi (j)
✓2[0,1]
e. Units: Set
j=n
`+1
yi (·)
= (1
i=1
`
✓)yi (·) +
✓yi`,? (·)
Lars Grüne, Nonlinear Model Predictive Control, p. 160
Convergence of Distributed Optimization (1)
Convergence of Distributed Optimization (2)
Lemma: If y `,? (·) 6= y ` (·), then V `+1 < V ` holds for
Lemma: If y `,? (·) 6= y ` (·), then V `+1 < V ` holds for
n+N
X1
V ` :=
⇣(n)
j=n
Proof:
P
1 X `
Y (j)
P i=1
!2
<
P
1 X `
Y (j)
P i=1
⇣(n)
j=n
!2
Corollary: lim`!1 V ` exists
⌘2
`+1 (j)
Y
j=n
i=1
⌘⌘2
P ⇣¯
P ⇣
= j ⇣(n) Y ` (j) + P1 i ✓ yi`,? (j) yi` (j)
⇣
⌘⌘⌘2
P ⇣P 1 ⇣ ¯
 j
Y ` (j) + P1 yi`,? (j) yi` (j)
✓ = P1
i P ⇣
⇣
⌘⌘2
P P ⇣
 j i P1 ⇣¯ Y ` (j) + P1 yi`,? (j) yi` (j)
Jen.’s Ineq.
V `+1 =
V ` :=
n+N
X1
Pn+N
1
P
1
P P
i
⇣
⇣(n)
¯
⇣(n)
j
1
P
PP
Y ` (j)
2
= V `.
Local Minimization
Proof: V `
0 is bounded from below and decreasing.
Theorem: The limit V ? = lim`!1 V ` generated by distributed
optimization coincides with the optimal value V ] of the
centralized optimization
Proof (by contradiction):
Assume V ] < V ?
Local minimization leads to y `,? (·) 6= y ` (·) in the limit which
by the lemma above implies an improvement of V ? .
Lars Grüne, Nonlinear Model Predictive Control, p. 161
Lars Grüne, Nonlinear Model Predictive Control, p. 162
Convergence of Distributed Optimization (3)
Numerical Results
`
Theorem: The limit V = lim`!1 V generated by distributed
optimization coincides with the optimal value V ] of the
centralized optimization.
Closed loop (MPC) performance with incomplete optimization
0.8
`
Lemma Let (y )`2N0 be the sequence of minimizers generated
by distributed optimization. Then
ky
`
y
` 1
k!0
for ` ! 1.
The proof is based on sensitivity analysis [Fiacco]
Question: When should the iterative distributed optimization
be terminated? ! numerical simulation studies
Lars Grüne, Nonlinear Model Predictive Control, p. 163
z in [KW]
Question: Do the minimizers also converge?
Answer: Not necessarily, because the centralized minimizer is
not unique. But we obtain something slightly weaker:
0.8
Centralized MPC
Distributed MPC
Centralized MPC
Distributed MPC
0.7
0.7
0.6
0.6
z in [KW]
?
0.5
0.5
0.4
0.4
0.3
0.3
0.2
0
24
48
72
96
Time in hours
120
144
168
0.2
0
24
48
72
96
Time in hours
120
144
168
iteration until ` = 3 (left) and ` = 10 (right) at every
sampling instant
Simulation for 100 units, simulation length one week
Lars Grüne, Nonlinear Model Predictive Control, p. 164
Summary of Section (10)
For the particular networked situation, we were able to derive a
distributed optimization routine (to be carried out in each step
of the MPC scheme) providing
Flexibility due to local optimization
Rather fast convergence to the centralized optimum
Price to pay: existence of a Central Entity and
communication during the iteration
Lars Grüne, Nonlinear Model Predictive Control, p. 165
Open Questions
Independent from the optimization algorithm developed for
this application, there are several open questions for MPC:
Can we derive a performance bound for the time varying
situation of this example?
What replaces the optimal equilibrium for this
time-varying problem? Is there a suitable dissipativity
notion?
What can we say about the MPC closed loop if the units
cannot reach an optimum but, e.g., only a Nash
equilibrium?
Lars Grüne, Nonlinear Model Predictive Control, p. 166