an a posteriori error estimate for symplectic euler ... seminars/… · optimal control ill-posed...

44
An a posteriori error estimate for Symplectic Euler approximation of optimal control problems J. Karlsson, S. Larsson, M. Sandberg, A. Szepessy, and R. Tempone 2014-03-06 J. Karlsson, S. Larsson, M. Sandberg, A. Szepessy, and R. Tempone Adaptivity for Optimal Control

Upload: others

Post on 04-Aug-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: An a posteriori error estimate for Symplectic Euler ... seminars/… · Optimal Control Ill-posed Ex. Minimize jX(1)jover solutions X0= 2[ 1;1]. t T=1 x J. Karlsson, S. Larsson, M

An a posteriori error estimate for SymplecticEuler approximation of optimal control problems

J. Karlsson, S. Larsson, M. Sandberg, A. Szepessy, and R.Tempone

2014-03-06

J. Karlsson, S. Larsson, M. Sandberg, A. Szepessy, and R. TemponeAdaptivity for Optimal Control

Page 2: An a posteriori error estimate for Symplectic Euler ... seminars/… · Optimal Control Ill-posed Ex. Minimize jX(1)jover solutions X0= 2[ 1;1]. t T=1 x J. Karlsson, S. Larsson, M

Outline

I Optimal Control as ill-posed and well-posed problems

I Error representation

I Adaptive algorithm

I Numerical tests

J. Karlsson, S. Larsson, M. Sandberg, A. Szepessy, and R. TemponeAdaptivity for Optimal Control

Page 3: An a posteriori error estimate for Symplectic Euler ... seminars/… · Optimal Control Ill-posed Ex. Minimize jX(1)jover solutions X0= 2[ 1;1]. t T=1 x J. Karlsson, S. Larsson, M

Optimal Control

Minimize ∫ T

0h(X (s), α(s)

)ds + g

(X (T )

)when X solves

X ′(s) = f(X (s), α(s)

), 0 < s < T

X (0) = x0.

and X (s) ∈ Rd , α(s) ∈ B.

J. Karlsson, S. Larsson, M. Sandberg, A. Szepessy, and R. TemponeAdaptivity for Optimal Control

Page 4: An a posteriori error estimate for Symplectic Euler ... seminars/… · Optimal Control Ill-posed Ex. Minimize jX(1)jover solutions X0= 2[ 1;1]. t T=1 x J. Karlsson, S. Larsson, M

Optimal Control Ill-posed

Ex. Minimize −|X (1)| over solutions X ′ = α ∈ [−1, 1].

t

T=1

x

J. Karlsson, S. Larsson, M. Sandberg, A. Szepessy, and R. TemponeAdaptivity for Optimal Control

Page 5: An a posteriori error estimate for Symplectic Euler ... seminars/… · Optimal Control Ill-posed Ex. Minimize jX(1)jover solutions X0= 2[ 1;1]. t T=1 x J. Karlsson, S. Larsson, M

Optimal Control Ill-posed

Ex. Minimize |X (1)| over solutions X ′ = α ∈ [−1, 1].

t

T=1

x

J. Karlsson, S. Larsson, M. Sandberg, A. Szepessy, and R. TemponeAdaptivity for Optimal Control

Page 6: An a posteriori error estimate for Symplectic Euler ... seminars/… · Optimal Control Ill-posed Ex. Minimize jX(1)jover solutions X0= 2[ 1;1]. t T=1 x J. Karlsson, S. Larsson, M

Optimal Control Well-posed

u(x , t) = infα

Xt=x

( ∫ T

th(X (s), α(s))ds + g(X (T ))

)Hamilton-Jacobi equation:

ut + H(ux , x) = 0,

u(x ,T ) = g(x),(1)

whereH(λ, x) = min

a

(λ · f (x , a) + h(x , a)

)(See e.g. L. Evans “Partial Differential Equations”.)

J. Karlsson, S. Larsson, M. Sandberg, A. Szepessy, and R. TemponeAdaptivity for Optimal Control

Page 7: An a posteriori error estimate for Symplectic Euler ... seminars/… · Optimal Control Ill-posed Ex. Minimize jX(1)jover solutions X0= 2[ 1;1]. t T=1 x J. Karlsson, S. Larsson, M

Optimal controls are characteristics

TheoremAssume H ∈ C 1,1

loc (Rd × Rd), f , g , h smooth etc., and (α,X )optimal control and state variables for the starting position(x , t) ∈ Rd × [0,T ]. Then ∃ dual path λ : [t,T ]→ Rd :

X ′(s) = Hλ

(λ(s),X (s)

),

−λ′(s) = Hx

(λ(s),X (s)

),

λ(T ) = g ′(X (T )

).

(See e.g. P. Cannarsa, C. Sinestrari, “Semiconcave Functions,Hamilton-Jacobi Equations, and Optimal Control.”)This is the Pontryagin principle for the case when the Hamiltonianis differentiable.

J. Karlsson, S. Larsson, M. Sandberg, A. Szepessy, and R. TemponeAdaptivity for Optimal Control

Page 8: An a posteriori error estimate for Symplectic Euler ... seminars/… · Optimal Control Ill-posed Ex. Minimize jX(1)jover solutions X0= 2[ 1;1]. t T=1 x J. Karlsson, S. Larsson, M

Hamilton-Jacobi vs. Pontryagin

Hamilton-Jacobi PontryaginGlobal min + -

High dimension - +Idea: Use Pontryagin for numerical methods, and Hamilton-Jacobifor theoretical evaluation.

J. Karlsson, S. Larsson, M. Sandberg, A. Szepessy, and R. TemponeAdaptivity for Optimal Control

Page 9: An a posteriori error estimate for Symplectic Euler ... seminars/… · Optimal Control Ill-posed Ex. Minimize jX(1)jover solutions X0= 2[ 1;1]. t T=1 x J. Karlsson, S. Larsson, M

Allen-Cahn Ex.

minα

∫ T

0h(α(t)

)dt + g

(ϕ(T )

),

h(α) = ||α||2L2(0,1)/2, g(ϕT ) = K ||ϕT − ϕ−||2L2(0,1)

and ϕ solves

ϕt = εϕxx − ε−1V ′(ϕ) + α, ϕ(0, t) = ϕ(1, t) = 0,

ϕ(x , 0) = ϕ0(x).

J. Karlsson, S. Larsson, M. Sandberg, A. Szepessy, and R. TemponeAdaptivity for Optimal Control

Page 10: An a posteriori error estimate for Symplectic Euler ... seminars/… · Optimal Control Ill-posed Ex. Minimize jX(1)jover solutions X0= 2[ 1;1]. t T=1 x J. Karlsson, S. Larsson, M

0 0.2 0.4 0.6 0.8 1−1

−0.8

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

0.8

1

x0 0.2 0.4 0.6 0.8 1

−1

−0.8

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

0.8

1

x

J. Karlsson, S. Larsson, M. Sandberg, A. Szepessy, and R. TemponeAdaptivity for Optimal Control

Page 11: An a posteriori error estimate for Symplectic Euler ... seminars/… · Optimal Control Ill-posed Ex. Minimize jX(1)jover solutions X0= 2[ 1;1]. t T=1 x J. Karlsson, S. Larsson, M

J. Karlsson, S. Larsson, M. Sandberg, A. Szepessy, and R. TemponeAdaptivity for Optimal Control

Page 12: An a posteriori error estimate for Symplectic Euler ... seminars/… · Optimal Control Ill-posed Ex. Minimize jX(1)jover solutions X0= 2[ 1;1]. t T=1 x J. Karlsson, S. Larsson, M

Variational representation of Hamilton-Jacobi

If u : Rd × [0,T ]→ R viscosity solution ofHamilton-Jacobi-Bellman equation (1):

u(x , t) = infβ

∫ T

tL(β,X )dt + g

(X (T )

)|X ′(t) = β(t),X (t) = x

,

where

L(x , β) = supλ

−β·λ+H(λ, x)

, and H(λ, x) = inf

β

λ·β+L(x , β)

.

(Legendre-type transform)

J. Karlsson, S. Larsson, M. Sandberg, A. Szepessy, and R. TemponeAdaptivity for Optimal Control

Page 13: An a posteriori error estimate for Symplectic Euler ... seminars/… · Optimal Control Ill-posed Ex. Minimize jX(1)jover solutions X0= 2[ 1;1]. t T=1 x J. Karlsson, S. Larsson, M

Representation as discrete minimization

Symplectic Euler

Xn+1 = Xn + ∆tnHλ(Xn, λn+1),

λn = λn+1 + ∆tnHx(Xn, λn+1),

corresponds to minimization of

N−1∑n=0

∆tnL(Xn, βn) + g(XN) =: u(x0, 0),

where Xn+1 = Xn + ∆tnβn.

J. Karlsson, S. Larsson, M. Sandberg, A. Szepessy, and R. TemponeAdaptivity for Optimal Control

Page 14: An a posteriori error estimate for Symplectic Euler ... seminars/… · Optimal Control Ill-posed Ex. Minimize jX(1)jover solutions X0= 2[ 1;1]. t T=1 x J. Karlsson, S. Larsson, M

Proof

Assume u(·, tn+1) semiconcave and λn+1 ∈ D+u(Xn+1, tn+1).Since

β 7→ u(Xn + ∆tβ, tn+1) + ∆tL(Xn, β)

minimized for β = βn, we have

β 7→ λn+1 · β + L(Xn, β)

minimized for β = βn. Hence βn = Hλ(Xn, λn+1).

Need also show that semiconcavity of u(·, tn+1) impliessemiconcavity of u(·, tn), and λn := λn+1 + ∆tHx(Xn, λn+1). Usecontrol Hλ(x , λn+1).

J. Karlsson, S. Larsson, M. Sandberg, A. Szepessy, and R. TemponeAdaptivity for Optimal Control

Page 15: An a posteriori error estimate for Symplectic Euler ... seminars/… · Optimal Control Ill-posed Ex. Minimize jX(1)jover solutions X0= 2[ 1;1]. t T=1 x J. Karlsson, S. Larsson, M

Aim: Bound error |u(x0, 0)− u(x0, 0)|Introduce piecewise linear X (t) as

X (t) = Xn + (t − tn)βn = Xn + (t − tn)Hλ(Xn, λn+1), t ∈ (tn, tn+1), n = 0, . . . ,N − 1.

(u − u)(x0, 0) =N−1∑n=0

∆tnL(Xn, βn) + g(XN)︸ ︷︷ ︸u(XN ,T )

−u(x0, 0)

=N−1∑n=0

∆tnL(Xn, βn) + u(XN ,T )− u(x0, 0)

=N−1∑n=0

∆tnL(Xn, βn) +

∫ T

0

d

dtu(X (t), t)dt

=N−1∑n=0

∫ tn+1

tn

L(Xn, βn) + ut(X (t), t) + ux(X (t), t) · βndt.

J. Karlsson, S. Larsson, M. Sandberg, A. Szepessy, and R. TemponeAdaptivity for Optimal Control

Page 16: An a posteriori error estimate for Symplectic Euler ... seminars/… · Optimal Control Ill-posed Ex. Minimize jX(1)jover solutions X0= 2[ 1;1]. t T=1 x J. Karlsson, S. Larsson, M

If we write

(u − u)(x0, 0) =N−1∑n=0

∫ tn+1

tn

L(Xn, βn) + ut(X (t), t) + ux(X (t), t) · βndt

=N−1∑n=0

∫ tn+1

tn

(ut(X (t), t) + ux(X (t), t) · βn + L(X (t), βn)

+ L(Xn, βn)− L(X (t), βn))dt

and useH(x , λ) = min

β∈Rd

(λ · β + L(x , β)

)together with the fact that u solves a Hamilton-Jacobi equation weget

u(x0, 0)− u(x0, 0) ≥N−1∑n=0

∫ tn+1

tn

(L(Xn, βn)− L(X (t), βn)

)dt.

Hence lower bound for the error.J. Karlsson, S. Larsson, M. Sandberg, A. Szepessy, and R. TemponeAdaptivity for Optimal Control

Page 17: An a posteriori error estimate for Symplectic Euler ... seminars/… · Optimal Control Ill-posed Ex. Minimize jX(1)jover solutions X0= 2[ 1;1]. t T=1 x J. Karlsson, S. Larsson, M

Convergence of Symplectic Pontryagin

TheoremAssume that the Hamiltonian satisfies

|H(x , λ1)− H(x , λ2)| ≤ C |λ1 − λ2|,|H(x1, λ)− H(x2, λ)| ≤ C |x1 − x2|(1 + |λ|),H(x , ·) is concave.

Assume that the terminal cost g is continuously differentiable, andg(x) ≥ −k(1 + |x |).Then there exists a solution Xn, λn with associated value u, suchthat

|u − u| = O(δ + ∆t).

J. Karlsson, S. Larsson, M. Sandberg, A. Szepessy, and R. TemponeAdaptivity for Optimal Control

Page 18: An a posteriori error estimate for Symplectic Euler ... seminars/… · Optimal Control Ill-posed Ex. Minimize jX(1)jover solutions X0= 2[ 1;1]. t T=1 x J. Karlsson, S. Larsson, M

Example of a nondifferentiable Hamiltonian

f = α ∈ −1, 1, inf

∫ 1

0X 2dt

H(λ, x) = mina

(λ · f (x , a) + h(x , a)

)= −|λ|+ x2

x

tT

J. Karlsson, S. Larsson, M. Sandberg, A. Szepessy, and R. TemponeAdaptivity for Optimal Control

Page 19: An a posteriori error estimate for Symplectic Euler ... seminars/… · Optimal Control Ill-posed Ex. Minimize jX(1)jover solutions X0= 2[ 1;1]. t T=1 x J. Karlsson, S. Larsson, M

Nondifferentiable Hamiltonian example contd.

0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.50

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

X

t

δ=1/30δ=1/2000

J. Karlsson, S. Larsson, M. Sandberg, A. Szepessy, and R. TemponeAdaptivity for Optimal Control

Page 20: An a posteriori error estimate for Symplectic Euler ... seminars/… · Optimal Control Ill-posed Ex. Minimize jX(1)jover solutions X0= 2[ 1;1]. t T=1 x J. Karlsson, S. Larsson, M

Nondifferentiable Hamiltonian example contd.

0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.50

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

x

t

J. Karlsson, S. Larsson, M. Sandberg, A. Szepessy, and R. TemponeAdaptivity for Optimal Control

Page 21: An a posteriori error estimate for Symplectic Euler ... seminars/… · Optimal Control Ill-posed Ex. Minimize jX(1)jover solutions X0= 2[ 1;1]. t T=1 x J. Karlsson, S. Larsson, M

Back to u − u error

Usingut = −H(x , ux),

L(Xn, βn) + λn+1 · βn = H(xn, λn+1),

βn = Hλ(xn, λn+1),

we have

(u − u)(x0, 0) =N−1∑n=0

∫ tn+1

tn

L(Xn, βn) + ut(X (t), t) + ux(X (t), t) · βndt

=N−1∑n=0

∫ tn+1

tn

H(Xn, λn+1)− H(X (t), ux(X (t), t))dt+

N−1∑n=0

∫ tn+1

tn

(ux(X (t), t)− λn+1

)· Hλ(Xn, λn+1)dt

J. Karlsson, S. Larsson, M. Sandberg, A. Szepessy, and R. TemponeAdaptivity for Optimal Control

Page 22: An a posteriori error estimate for Symplectic Euler ... seminars/… · Optimal Control Ill-posed Ex. Minimize jX(1)jover solutions X0= 2[ 1;1]. t T=1 x J. Karlsson, S. Larsson, M

Error in approximate value function

The trapezoidal rule and an assumption on closeness between λnand ux(xn, tn) gives

TheoremAssume H ∈ C 2(Rd × Rd) and |λn − ux(Xn, λn)| ≤ C ∆tmax andthe value function u is bounded in C 3((0,T )×Rd) (either globallyor locally with an extra assumption on Xn convergence).Then

u(x0, 0)− u(x0, 0) =N−1∑n=0

∆t2nρn + R, (2)

with density

ρn := −Hλ(Xn, λn+1) · Hx(Xn, λn+1)

2(3)

and the remainder term |R| ≤ C ∆t2max, for some constant C.

J. Karlsson, S. Larsson, M. Sandberg, A. Szepessy, and R. TemponeAdaptivity for Optimal Control

Page 23: An a posteriori error estimate for Symplectic Euler ... seminars/… · Optimal Control Ill-posed Ex. Minimize jX(1)jover solutions X0= 2[ 1;1]. t T=1 x J. Karlsson, S. Larsson, M

Algorithm (Adaptivity (Numer. Math. 03 M. S. T. Z.))

Choose the error tolerance TOL, the initial grid tnNn=0, theparameters s and M, and repeat the following points:

1. Calculate (Xn, λn)Nn=0.

2. Calculate error densities ρnNn=0 and the correspondingapproximate error densities

ρn := sgn(ρn) max(|ρn|,√

∆tmax).

3. Break if

maxn

rn <TOL

N.

where the error indicators are defined by rn := |ρn|∆t2n .

4. Traverse through the mesh and subdivide an interval (tn, tn+1)into M parts if

rn > sTOL

N.

5. Update N and tnNn=0 to reflect the new mesh.J. Karlsson, S. Larsson, M. Sandberg, A. Szepessy, and R. TemponeAdaptivity for Optimal Control

Page 24: An a posteriori error estimate for Symplectic Euler ... seminars/… · Optimal Control Ill-posed Ex. Minimize jX(1)jover solutions X0= 2[ 1;1]. t T=1 x J. Karlsson, S. Larsson, M

Introduce a constant c = c(t), such that

c ≤ | ρ(t)[parent(n, k)]

ρ(t)[k]| ≤ c−1,

c ≤ | ρ(t)[k − 1]

ρ(t)[k]| ≤ c−1,

(4)

holds for all time steps t ∈ ∆tn[k] and all refinement levels k.

Theorem[Stopping] Assume that c satisfies (4) for the time stepscorresponding to the maximal error indicator on each refinementlevel, and that

M2 > c−1, s ≤ c

M. (5)

Then each refinement level either decreases the maximal errorindicator with the factor

maxn

rn[k + 1] ≤ c−1

M2maxn

rn[k],

or stops the algorithm.J. Karlsson, S. Larsson, M. Sandberg, A. Szepessy, and R. TemponeAdaptivity for Optimal Control

Page 25: An a posteriori error estimate for Symplectic Euler ... seminars/… · Optimal Control Ill-posed Ex. Minimize jX(1)jover solutions X0= 2[ 1;1]. t T=1 x J. Karlsson, S. Larsson, M

Theorem[Accuracy] The adaptive algorithm satisfies

lim supTOL→0+

(TOL−1|u(x0, 0)− u(x0, 0)|

)≤ 1.

Theorem[Efficiency] Assume that c = c(t) satisfies (4) for all time steps atthe final refinement level, and that all initial time steps have beendivided when the algorithm stops. Then there exists a constantC > 0, bounded by M2s−1, such that the final number of adaptivesteps N, of the algorithm 0.4, satisfies

TOL N ≤ C‖ ρc‖L

12≤ ‖ρ‖

L12

max0≤t≤T

c(t)−1,

and ‖ρ‖L

12→ ‖ρ‖

L12

asymptotically as TOL→ 0+.

J. Karlsson, S. Larsson, M. Sandberg, A. Szepessy, and R. TemponeAdaptivity for Optimal Control

Page 26: An a posteriori error estimate for Symplectic Euler ... seminars/… · Optimal Control Ill-posed Ex. Minimize jX(1)jover solutions X0= 2[ 1;1]. t T=1 x J. Karlsson, S. Larsson, M

Numerical Tests

Ex. (From PROPT Manual, by Rutquist, Edvall). Minimize∫ 25

0X (t)2 + α(t)2dt + γ(X (25)− 1)2,

subject to

X ′(t) = −X (t)3 + α(t), 0 < t ≤ 25,

X (0) = 1.

for some large γ > 0. The Hamiltonian is then given by

H(x , λ) := minα

−λx3 + λα + x2 + α2

= −λx3 − λ2/4 + x2.

J. Karlsson, S. Larsson, M. Sandberg, A. Szepessy, and R. TemponeAdaptivity for Optimal Control

Page 27: An a posteriori error estimate for Symplectic Euler ... seminars/… · Optimal Control Ill-posed Ex. Minimize jX(1)jover solutions X0= 2[ 1;1]. t T=1 x J. Karlsson, S. Larsson, M

J. Karlsson, S. Larsson, M. Sandberg, A. Szepessy, and R. TemponeAdaptivity for Optimal Control

Page 28: An a posteriori error estimate for Symplectic Euler ... seminars/… · Optimal Control Ill-posed Ex. Minimize jX(1)jover solutions X0= 2[ 1;1]. t T=1 x J. Karlsson, S. Larsson, M

102

103

10−3

10−2

10−1

100

Error estimate

total time steps

E

Error estimates for the hyper-sensitive optimal control problem.The solid line indicates the error estimate, and the dotted lineindicates the difference between the value function and the valuefunction using a fine uniform mesh with 51200 time steps. Theerror estimate for the uniform mesh is approximately as large asthe estimate for the finest adaptive level. Hence, the dotted line isonly an approximation of the true error.

J. Karlsson, S. Larsson, M. Sandberg, A. Szepessy, and R. TemponeAdaptivity for Optimal Control

Page 29: An a posteriori error estimate for Symplectic Euler ... seminars/… · Optimal Control Ill-posed Ex. Minimize jX(1)jover solutions X0= 2[ 1;1]. t T=1 x J. Karlsson, S. Larsson, M

102

103

104

105

10−3

10−2

10−1

100

Error estimate

total time steps

E

Error estimates for the hyper-sensitive optimal control problemversus the cumulative number of time steps on all refinement levelsfor the adaptive algorithm (solid) and uniform meshes (dotted).The number of time steps in the uniform meshes is doubled in eachrefinement.

J. Karlsson, S. Larsson, M. Sandberg, A. Szepessy, and R. TemponeAdaptivity for Optimal Control

Page 30: An a posteriori error estimate for Symplectic Euler ... seminars/… · Optimal Control Ill-posed Ex. Minimize jX(1)jover solutions X0= 2[ 1;1]. t T=1 x J. Karlsson, S. Larsson, M

Example with non-smooth Hamiltonian

Ex. Minimize ∫ 1

0X (t)10dt,

subject toX ′(t) = α(t) ∈ [−1, 1], 0 < t ≤ T ,

X (0) = 0.5.

The Hamiltonian is then non-smooth

H(x , λ) := minα∈[−1,1]

λα + x10

= −|λ|+ x10,

but can be regularized by

Hδ(x , λ) := −√λ2 + δ2 + x10,

for some small δ > 0.

J. Karlsson, S. Larsson, M. Sandberg, A. Szepessy, and R. TemponeAdaptivity for Optimal Control

Page 31: An a posteriori error estimate for Symplectic Euler ... seminars/… · Optimal Control Ill-posed Ex. Minimize jX(1)jover solutions X0= 2[ 1;1]. t T=1 x J. Karlsson, S. Larsson, M

Changing the Hamiltonian H to Hδ, with |H − Hδ| = O(δ)introduces an error of order δ in the value function u. However,the remainder term R in the error representation contains secondderivatives of H, and ∂λλHδ = O(δ−1).

The a priori error result however gives bound O(δ + ∆t)...

J. Karlsson, S. Larsson, M. Sandberg, A. Szepessy, and R. TemponeAdaptivity for Optimal Control

Page 32: An a posteriori error estimate for Symplectic Euler ... seminars/… · Optimal Control Ill-posed Ex. Minimize jX(1)jover solutions X0= 2[ 1;1]. t T=1 x J. Karlsson, S. Larsson, M

J. Karlsson, S. Larsson, M. Sandberg, A. Szepessy, and R. TemponeAdaptivity for Optimal Control

Page 33: An a posteriori error estimate for Symplectic Euler ... seminars/… · Optimal Control Ill-posed Ex. Minimize jX(1)jover solutions X0= 2[ 1;1]. t T=1 x J. Karlsson, S. Larsson, M

Figure : δ = 10−6 and TOL = 10−6. The blue and red lines indicatesolutions from adaptive and uniform meshes, respectively, correspondingto the lower right plot.

J. Karlsson, S. Larsson, M. Sandberg, A. Szepessy, and R. TemponeAdaptivity for Optimal Control

Page 34: An a posteriori error estimate for Symplectic Euler ... seminars/… · Optimal Control Ill-posed Ex. Minimize jX(1)jover solutions X0= 2[ 1;1]. t T=1 x J. Karlsson, S. Larsson, M

Figure : The solid lines indicate the error estimate while the dotted linesindicate the difference between the value function and the value functionusing the finest mesh for the uniform refinement.

J. Karlsson, S. Larsson, M. Sandberg, A. Szepessy, and R. TemponeAdaptivity for Optimal Control

Page 35: An a posteriori error estimate for Symplectic Euler ... seminars/… · Optimal Control Ill-posed Ex. Minimize jX(1)jover solutions X0= 2[ 1;1]. t T=1 x J. Karlsson, S. Larsson, M

Ex. (Fuller’s problem)

(From PROPT Manual, by Rutquist, Edvall). Minimize∫ 1

0X1(t)2dt + γ(X1(1)− 0.01)2 + γX2(1)2,

subject to

X ′1(t) = X2(t),

X ′2(t) = −α(t),0 < t ≤ T ,

X1(0) = 0.01,

X2(0) = 0,

and|α(t)| ≤ 1,

for some large γ > 0. The Hamiltonian is then non-smooth

H(x1, x2, λ1, λ2) := minα∈[−1,1]

λ1x2 − λ2α + x2

1

= λ1x2 − |λ2|+ x2

1 ,

but can be regularized by

Hδ(x1, x2, λ1, λ2) := λ1x2 −√λ2

2 + δ2 + x21 ,

for some small δ > 0.J. Karlsson, S. Larsson, M. Sandberg, A. Szepessy, and R. TemponeAdaptivity for Optimal Control

Page 36: An a posteriori error estimate for Symplectic Euler ... seminars/… · Optimal Control Ill-posed Ex. Minimize jX(1)jover solutions X0= 2[ 1;1]. t T=1 x J. Karlsson, S. Larsson, M

Figure : γ = 1, δ = 10−7 and TOL = 10−6. The blue and red lines hereindicate solutions from adaptive and uniform meshes, respectively.

J. Karlsson, S. Larsson, M. Sandberg, A. Szepessy, and R. TemponeAdaptivity for Optimal Control

Page 37: An a posteriori error estimate for Symplectic Euler ... seminars/… · Optimal Control Ill-posed Ex. Minimize jX(1)jover solutions X0= 2[ 1;1]. t T=1 x J. Karlsson, S. Larsson, M

Figure : The solid lines indicate the error estimate and the dotted linesindicate the difference between the value function and the value functionusing the finest mesh for the uniform refinement.

J. Karlsson, S. Larsson, M. Sandberg, A. Szepessy, and R. TemponeAdaptivity for Optimal Control

Page 38: An a posteriori error estimate for Symplectic Euler ... seminars/… · Optimal Control Ill-posed Ex. Minimize jX(1)jover solutions X0= 2[ 1;1]. t T=1 x J. Karlsson, S. Larsson, M

Ex: Singular problem

Minimize ∫ 4

0(α(t)− X (t))2dt + (X (4)− Xref(4))2

subject to

X ′(t) =α(t)(

(t − 5/3)2 + ε2)β/2

≈ α(t)

|t − 5/3|β,

X (0) = Xref(0).

Reference solves

X ′ref(t) =Xref(t)(

(t − 5/3)2 + ε2)β/2

and

Xref(t) = exp( t − 5/3

εβ2F1(

1

2,β

2,

3

2;−(t − 5/3)2

ε2)).

J. Karlsson, S. Larsson, M. Sandberg, A. Szepessy, and R. TemponeAdaptivity for Optimal Control

Page 39: An a posteriori error estimate for Symplectic Euler ... seminars/… · Optimal Control Ill-posed Ex. Minimize jX(1)jover solutions X0= 2[ 1;1]. t T=1 x J. Karlsson, S. Larsson, M

OC problem with explicit time dep. May be reformulated with timeindependent Hamiltonian by extending the state space:

s ′(t) = 1, s(0) = 0.

Then

H(x , s;λ1, λ2) =λ1x(

(s − 5/3)2 + ε2)β/2− λ2

1

4((s − 5/3)2 + ε2

)β +λ2.

J. Karlsson, S. Larsson, M. Sandberg, A. Szepessy, and R. TemponeAdaptivity for Optimal Control

Page 40: An a posteriori error estimate for Symplectic Euler ... seminars/… · Optimal Control Ill-posed Ex. Minimize jX(1)jover solutions X0= 2[ 1;1]. t T=1 x J. Karlsson, S. Larsson, M

Figure : Red: Uniform. Blue: Adaptive. ε = 10−10, β = 3/4.

J. Karlsson, S. Larsson, M. Sandberg, A. Szepessy, and R. TemponeAdaptivity for Optimal Control

Page 41: An a posteriori error estimate for Symplectic Euler ... seminars/… · Optimal Control Ill-posed Ex. Minimize jX(1)jover solutions X0= 2[ 1;1]. t T=1 x J. Karlsson, S. Larsson, M

0 0.5 1 1.5 2 2.5 3 3.5 410

−7

10−6

10−5

10−4

10−3

10−2

10−1

Mesh

t

∆ t

Figure : Mesh size versus time

J. Karlsson, S. Larsson, M. Sandberg, A. Szepessy, and R. TemponeAdaptivity for Optimal Control

Page 42: An a posteriori error estimate for Symplectic Euler ... seminars/… · Optimal Control Ill-posed Ex. Minimize jX(1)jover solutions X0= 2[ 1;1]. t T=1 x J. Karlsson, S. Larsson, M

Ex: Computation of optimal designs. Find σ : Ω→ σ−, σ+

div(σ∂xϕ(x)) = 0 x ∈ Ω, σ∂ϕ

∂n

∣∣∣∂Ω

= I

minσ

(

∫∂Ω

Iϕds + η

∫Ωσdx).

Regularized Hamiltonian Hδ, with δ → 0 possible.J. Karlsson, S. Larsson, M. Sandberg, A. Szepessy, and R. TemponeAdaptivity for Optimal Control

Page 43: An a posteriori error estimate for Symplectic Euler ... seminars/… · Optimal Control Ill-posed Ex. Minimize jX(1)jover solutions X0= 2[ 1;1]. t T=1 x J. Karlsson, S. Larsson, M

I A priori error est.: Sandberg, Szepessy, ”Convergence rates ofsymplectic Pontryagin approximations in optimal controltheory”, M2AN 40 (2006), no. 1, 149–173.

I A priori error est.: Sandberg, ”Extended applicability of theSymplectic Pontryagin method”, submitted.

I A posteriori error est.: Karlsson, Larsson, Sandberg, Szepessy,Tempone, ”An a posteriori error estimate for Symplectic Eulerapproximations of optimal control problems”, submitted.

I Application: Karlsson, Sandberg, Szepessy: ”SymplecticPontryagin approximations for optimal design”, M2AN 43(2009), no. 1 , 3–32.

I Application: Kiessling: ”Calibration of a jump-diffusionprocess using optimal control”, Num. anal. mult. comp.,259-277, Lect. Notes Comp. Sci. Eng. 82.

I Application: Karlsson: ”Symplectic reconstruction of data forheat and wave equations” and ”Pontryagin Approximationsfor Optimal Design of Elastic Structures”, in J. K. PhD thesis:http://kth.diva-portal.org/smash/get/diva2:54461

J. Karlsson, S. Larsson, M. Sandberg, A. Szepessy, and R. TemponeAdaptivity for Optimal Control

Page 44: An a posteriori error estimate for Symplectic Euler ... seminars/… · Optimal Control Ill-posed Ex. Minimize jX(1)jover solutions X0= 2[ 1;1]. t T=1 x J. Karlsson, S. Larsson, M

Conclusions

I Error representation for value function associated with optimalcontrol problems using discretization of Hamiltonian system.

I May be used for adaptive algorithms.

I Adaptivity natural since some iterative method must be usedto solve the initial-terminal time boundary value problem. Asolution on a grid level may be used as initial guess for thesolution on the next level.

I Seems adaptivity is not essential for problems withdiscontinuous controls.

I Seems that the computable leading order term in the errorrepresentation is dominant even in cases where theHamiltonian has large second order derivatives. Open problemto show this theoretically.

J. Karlsson, S. Larsson, M. Sandberg, A. Szepessy, and R. TemponeAdaptivity for Optimal Control