TSA Part 2: The Revenge A HJB-POD approach for the control of - - PowerPoint PPT Presentation

tsa part 2 the revenge a hjb pod approach for the control
SMART_READER_LITE
LIVE PREVIEW

TSA Part 2: The Revenge A HJB-POD approach for the control of - - PowerPoint PPT Presentation

TSA Part 2: The Revenge A HJB-POD approach for the control of nonlinear PDEs on a tree structure Luca Saluzzi joint work with A. Alla and M. Falcone ICODE Workshop on Numerical Solution of HJB Equations Paris, January 9, 2020 Outline


slide-1
SLIDE 1

TSA Part 2: The Revenge A HJB-POD approach for the control of nonlinear PDEs on a tree structure

Luca Saluzzi joint work with A. Alla and M. Falcone

ICODE Workshop on Numerical Solution of HJB Equations

Paris, January 9, 2020

slide-2
SLIDE 2

Outline

1

Extension to high-order High-order TSA Numerical test

2

Control of nonlinear PDEs by TSA Model Order Reduction Methods HJB-POD on a tree structure Numerical tests

  • L. Saluzzi (GSSI)

A HJB-POD approach for PDEs 2 / 29

slide-3
SLIDE 3

Outline

1

Extension to high-order High-order TSA Numerical test

2

Control of nonlinear PDEs by TSA Model Order Reduction Methods HJB-POD on a tree structure Numerical tests

  • L. Saluzzi (GSSI)

A HJB-POD approach for PDEs 3 / 29

slide-4
SLIDE 4

Extension to high-order (Falcone, Ferretti, ’94)

We introduce a convergent one-step approximation

  • yn+1 = yn + ∆t Φ(yn, Un, tn, ∆t),

y0 = x, where the admissible control matrix Un ∈ U∆t ⊂ U × U . . . × U ∈ RM×(q+1), with U ⊂ RM. We assume that the function Φ is consistent lim

∆t→0 Φ(x, u, t, ∆t) = f(x, u, t),

where u = (¯ u, . . . , u) ∈ U for u ∈ U and Lipschitz continuous: |Φ(x, U, t, ∆t) − Φ(y, U, t, ∆t)| ≤ LΦ|x − y|. Under these assumptions the scheme is convergent.

  • L. Saluzzi (GSSI)

A HJB-POD approach for PDEs 4 / 29

slide-5
SLIDE 5

Extension to high-order schemes

Then, we consider the approximation of the cost functional J∆t

x,tn({Um}) = ∆t N−1

  • m=n

q

  • i=0

wiL(ym+τi, um

i , tm) + g(yN),

where τi and wi are the nodes and weights of the quadrature formula. Finally we define the numerical value function as V(t, x) = inf

{Un} J∆t x,t ({Un})

Proposition (Discrete DPP)

V(t, x) = inf

{Um}

  • ∆t

q

  • i=0

wiL(yn+τi, un

i , tn+τi) + V(tn+1, yn+1)

  • L. Saluzzi (GSSI)

A HJB-POD approach for PDEs 5 / 29

slide-6
SLIDE 6

Pruning for high-order scheme

We can again define the pruned trajectory ηn+1

j

= ηn +∆t Φ(ηn, Un, tn, ∆t)+EεT (ηn + ∆t Φ(ηn, Un, tn, ∆t), {ηn+1

i

}i)

  • L. Saluzzi (GSSI)

A HJB-POD approach for PDEs 6 / 29

slide-7
SLIDE 7

Pruning for high-order scheme

We can again define the pruned trajectory ηn+1

j

= ηn +∆t Φ(ηn, Un, tn, ∆t)+EεT (ηn + ∆t Φ(ηn, Un, tn, ∆t), {ηn+1

i

}i)

Proposition

Given a one-step approximation {yn}n and its perturbation {ηn}n , then |yn − ηn| ≤ εT tn − t ∆t eLΦ(tn−t). To guarantee p-th order convergence, the tolerance must be chosen such that εT ≤ C(∆t)p+1.

  • L. Saluzzi (GSSI)

A HJB-POD approach for PDEs 6 / 29

slide-8
SLIDE 8

Test 1: Bilinear control for Advection Equation

     yt + cyx = yu(t) (x, t) ∈ Ω × [0, T], y(x, t) = 0 (x, t) ∈ ∂Ω × [0, T], y(x, 0) = y0(x) x ∈ Ω. Jy0,t(u) = T

t

  • y(s) − ˜

y(s)2

2 dx + 0.01|u(s)|2

ds + y(T) − ˜ y(T)2

2.

Semi-discrete problem (System dimension = 102)

˙ y(t) = Ay(t) + y(t)u(t), ∆x = 0.01, Ω = [0, 3] and c = 1.5

  • L. Saluzzi (GSSI)

A HJB-POD approach for PDEs 7 / 29

slide-9
SLIDE 9

Case 1: ˜ y = 0, U = [−4, 0]

0.2 0.4 0.6 0.8 1 0.02 0.04 0.06 0.08 0.1 0.12 0.14 Implicit Euler Trapezoidal 0.5 1 1.5 2 2.5 3 0.2 0.4 0.6 0.8 1 Uncontrolled Implicit Euler Uncontrolled Trapezoidal Controlled Implicit Euler Controlled Trapezoidal

Figure: Top: Uncontrolled (left) and trapezoidal rule controlled solution (right). Bottom: cost functionals (left) and solutions at final time (right).

  • L. Saluzzi (GSSI)

A HJB-POD approach for PDEs 8 / 29

slide-10
SLIDE 10

Case 2: ˜ y(x, t) = y0(x − ct), U = [0, 1]

0.2 0.4 0.6 0.8 1 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 Uncontrolled Implicit Euler Uncontrolled Trapezoidal Controlled Implicit Euler Controlled Trapezoidal

0.5 1 1.5 2 2.5 3 0.2 0.4 0.6 0.8 1 Uncontrolled Implicit Euler Uncontrolled Trapezoidal Controlled Implicit Euler Controlled Trapezoidal

Figure: Comparison of the cost functionals (left) and the solutions at final time (right).

∆t Nodes CPU Error2 Order 0.1 506 0.11s 2.8e-2 0.05 3311 0.7s 8e-3 1.84

Table: Trapezoidal rule with 2 × 2 discrete controls and εT = ∆t3

.

  • L. Saluzzi (GSSI)

A HJB-POD approach for PDEs 9 / 29

slide-11
SLIDE 11

How does the cardinality change?

50 100

Time level

50 100

Cardinality Euler method

5 10 15 20

Time level

100 200 300 400 500

Cardinality Trapezoidal method

Figure: Implicit Euler: |T | = O(N2), Trapezoidal rule: |T | = O(N3)

Method ∆t Controls Nodes CPU Error Implicit Euler 2.5e-3 2 80982 9s 9e-3 Trapezoidal 5e-2 2 × 2 3311 0.7s 8e-3

  • L. Saluzzi (GSSI)

A HJB-POD approach for PDEs 10 / 29

slide-12
SLIDE 12

Outline

1

Extension to high-order High-order TSA Numerical test

2

Control of nonlinear PDEs by TSA Model Order Reduction Methods HJB-POD on a tree structure Numerical tests

  • L. Saluzzi (GSSI)

A HJB-POD approach for PDEs 11 / 29

slide-13
SLIDE 13

Problem Setting

Semidiscretized PDE

   M ˙ y(t) = Ay(t) + f(t, y(t)), t ∈ (0, T], y(0) = y0,

Assumptions

y0 ∈ Rn is a given initial data, M, A ∈ Rn×n given matrices, f : [0, T] × Rn → Rn a continuous function in both arguments and locally Lipschitz-type with respect to the second variable WARNING: High dimensional problems are computationally expensive.

  • L. Saluzzi (GSSI)

A HJB-POD approach for PDEs 12 / 29

slide-14
SLIDE 14

Proper Orthogonal Decomposition and SVD

Given snapshots (y(t0), . . . , y(tn)) ∈ Rm We look for an orthonormal basis {ψi}ℓ

i=1 in Rm with ℓ ≪ min{n, m} s.t.

J(ψ1, . . . , ψℓ) =

n

  • j=1

αj

  • yj −

  • i=1

yj, ψiψi

  • 2

=

d

  • i=ℓ+1

σ2

i

reaches a minimum where {αj}n

j=1 ∈ R+.

min J(ψ1, . . . , ψℓ) s.t.ψi, ψj = δij Singular Value Decomposition: Y = ΨΣV T. For ℓ ∈ {1, . . . , d = rank(Y)}, {ψi}ℓ

i=1 are called POD basis of rank ℓ.

ERROR INDICATOR: E(ℓ) =

  • i=1

σ2

i d

  • i=1

σ2

i

with σi singular values of the SVD.

  • L. Saluzzi (GSSI)

A HJB-POD approach for PDEs 13 / 29

slide-15
SLIDE 15

Reduced Order Modelling Control Problem

MOR ansatz

y(t) ≈ Ψyℓ(t) ΨTΨ = I, Ψ ∈ Rn×ℓ

Compact Notations

xℓ := ΨTx, yℓ(t) := ΨTy(t), gℓ(yℓ(t)) := ΨTg(Ψyℓ(t)), f ℓ(yℓ(t), u(t), t) := ΨTf(Ψyℓ(t), u(t), t), Lℓ(yℓ(t), u(t)) := L(Ψyℓ(t), u(t)). ˙ yℓ(t) = f ℓ(yℓ(t), u(t)), t ∈ [0, T], yℓ(0) = xℓ ∈ Rℓ. The cost functional is: Jℓ

xℓ(u) =

T Lℓ(yℓ(t), u(t), t)e−λt dt + gℓ(yℓ(T))

  • L. Saluzzi (GSSI)

A HJB-POD approach for PDEs 14 / 29

slide-16
SLIDE 16

Reduced Order Modelling Control Problem

Reduced Value Function

vℓ(xℓ, t) = inf

u∈Uad

Jℓ

xℓ,t(u)

Reduced HJB equation

−∂vℓ(xℓ, t) ∂t +λvℓ(xℓ, t)+sup

u∈U

{−∇xℓvℓ(xℓ, t)·f ℓ(xℓ, u, t)−Lℓ(xℓ, u, t)} = 0

Feedback Control

uℓ,∗(xℓ, t) = arg min

u∈U

{f ℓ(xℓ, u, t) · ∇xℓvℓ(xℓ, t) + Lℓ(xℓ, u, t)}

  • L. Saluzzi (GSSI)

A HJB-POD approach for PDEs 15 / 29

slide-17
SLIDE 17

HJB-POD on a tree structure

Computation of the snapshots

POD for optimal control problems presents a major bottleneck: the choice of the control inputs to compute the snapshots. We store the tree in the snapshots matrix Y = T = ∪N

n=0T n for a

chosen ∆t and discrete control set U.

Computation of the basis functions

We solve min

ψ1,...,ψℓ∈Rd N

  • j=1
  • uj⊂Uj
  • y(tj, uj) −

  • i=1

y(tj, uj), ψiψi

  • 2

, ψi, ψj = δij, No restrictions on the choice of the number of basis ℓ, since we will solve the HJB equation on a tree structure. We choose ℓ such that E(ℓ) ≈ 0.999,

  • L. Saluzzi (GSSI)

A HJB-POD approach for PDEs 16 / 29

slide-18
SLIDE 18

HJB-POD on a tree structure

Construction of the reduced tree

Construction of a new (projected) tree T ℓ with a smaller ∆t and/or a finer control space with respect to the snapshots set. The first level of the tree is contains the projection of the initial condition, i.e. T 0,ℓ = ΨTx. Again we have T n,ℓ = {ζn−1,ℓ

i

+ ∆t f ℓ(ζn−1,ℓ

i

, uj, tn−1)}M

j=1

i = 1, . . . , Mn−1, where the reduced nonlinear term f ℓ can be done via POD or POD-DEIM. The procedure follows the full dimensional case, but with the projected dynamics.

  • L. Saluzzi (GSSI)

A HJB-POD approach for PDEs 17 / 29

slide-19
SLIDE 19

HJB-POD on a tree structure

Approximation of the reduced value function

The numerical reduced value function V ℓ(xℓ, t) will be computed on the tree nodes in space as V ℓ(xℓ, tn) = V n,ℓ(xℓ), ∀xℓ ∈ T n,ℓ. The computation of the reduced value function follows directly from the DPP:        V n,ℓ(ζn,ℓ

i

) = min

u∈U{V n+1,ℓ(ζn,ℓ i

+ ∆t f ℓ(ζn,ℓ

i

, u, tn)) + ∆t Lℓ(ζn,ℓ

i

, u, tn)}, ζn,ℓ

i

∈ T n,ℓ , n = N − 1, . . . , 0, V N,ℓ(ζN,ℓ

i

) = gℓ(ζN,ℓ

i

), ζN,ℓ

i

∈ T N,ℓ.

  • L. Saluzzi (GSSI)

A HJB-POD approach for PDEs 18 / 29

slide-20
SLIDE 20

HJB-POD on a tree structure

Nonlinear dynamics

Since ΨTf(Ψyℓ, t) is computationally expensive (Ψyℓ ∈ Rd), we apply Discrete Empirical Interpolation Method to obtain f DEIM(yDEIM, t) which is independent of the original dimension. This method is based on a further SVD of the matrix {f(y(ti), ti)}i.

Computation of the feedback control

When we compute the reduced value function, we store the control indices corresponding to the argmin of the hamiltonian and then we follow the path of tree, We can consider a postprocessing procedures with a control set ˜ U ⊃ U, involving interpolation on scattered data. If the dynamics is linear in u ∈ R, we can consider 1D interpolation.

  • L. Saluzzi (GSSI)

A HJB-POD approach for PDEs 19 / 29

slide-21
SLIDE 21

HJB-POD on a tree structure

Theorem (Alla, S., 2019)

Let f, L and g be Lipschitz continuous, bounded. Moreover let L and g be semiconcave and f ∈ C1, then there exists a constant C(T) such that sup

s∈[0,T]

|v(x, s) − V ℓ(ΨTx, s)| ≤ C(T)     

i≥l+1

σ2

i

 

1/2

+ ∆t    , where {σi}i are the singular values of the snapshots matrix.

  • L. Saluzzi (GSSI)

A HJB-POD approach for PDEs 20 / 29

slide-22
SLIDE 22

Pros about TSA-POD

We build the snapshots set upon all the trajectories that appear in the tree, avoiding the selection of a forecast for the control inputs which is always not trivial for model reduction. The application of POD also allows an efficient pruning since it reduces the dimension of the problem. We avoid to define the numerical domain for the projected problem, which is a difficult task since we lose the physical meaning of the reduced coordinates. We are not restricted to consider a very low dimensional reduced space.

  • L. Saluzzi (GSSI)

A HJB-POD approach for PDEs 21 / 29

slide-23
SLIDE 23

Test 1: Heat equation

     ∂ty(x, t) = σyxx(x, t) + y0(x)u(t) (x, t) ∈ Ω × [0, T], y(x, t) = 0 (x, t) ∈ ∂Ω × [0, T], y(x, 0) = y0(x) x ∈ Ω, U = [−1, 0], σ = 0.15, T = 1 and Ω = [0, 1].

OFFLINE

2 discrete controls and ∆t = 0.1. We choose ℓ = 2 basis with projection error Err = 7.e − 4.

  • L. Saluzzi (GSSI)

A HJB-POD approach for PDEs 22 / 29

slide-24
SLIDE 24

Test 1: Heat equation

∆t Nodes Pruned/Full CPU Err2 Err∞ Order2 Order∞ 0.1 134 4.3e-10 0.1s 0.244 0.220 0.05 825 1.0e-19 0.56s 0.102 9.4e-2 1.25 1.22 0.025 11524 2.1e-39 8.74s 3.1e-2 3.0e-2 1.73 1.67 0.0125 194426 7.8e-80 151s 1.0e-2 8.2e-3 1.60 1.85

Table: Test 1: Error analysis for TSA-POD method with εT = ∆t2, 11 discrete controls and 2 POD basis.

∆t Nodes Pruned/Full CPU Err2 Err∞ Order2 Order∞ 0.1 134 4.7e-09 0.14s 0.279 0.241 0.05 863 1.2e-18 0.65s 0.144 0.118 0.95 1.03 0.025 15453 3.1e-38 12.88s 5.5e-2 5.3e-2 1.40 1.17 0.0125 849717 3.8e-78 1.1e3s 1.6e-2 1.6e-2 1.77 1.42

Table: Test 1: Error analysis for TSA with εT = ∆t2 and 11 discrete controls.

  • L. Saluzzi (GSSI)

A HJB-POD approach for PDEs 23 / 29

slide-25
SLIDE 25

Test 1: Feedback reconstruction

First, we apply TSA-POD with 2 basis e 3 discrete controls. Then, we consider the feedback law un,ℓ

:= arg min

u∈U

  • V n+1,ℓ(ζn,ℓ

+ ∆t f ℓ(ζn,ℓ

∗ , u, tn)) + ∆t Lℓ(ζn,ℓ ∗ , u, tn)

  • ,

Scattered Interpolation

We fix U with 100 controls and we apply scattered interpolation in dimension ℓ.

1D Interpolation

Since the dynamics is linear in u ∈ R, the sons of a node lie on a segment and we consider 1D interpolation (e.g. quadratic).

  • L. Saluzzi (GSSI)

A HJB-POD approach for PDEs 24 / 29

slide-26
SLIDE 26

Test 1: Feedback reconstruction

0.2 0.4 0.6 0.8 1 0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009 0.01

Without reconstrunction Quadratic reconstruction Reconstruction by comparioson LQR

0.2 0.4 0.6 0.8 1

  • 1
  • 0.9
  • 0.8
  • 0.7
  • 0.6
  • 0.5
  • 0.4
  • 0.3
  • 0.2
  • 0.1

Without reconstrunction Quadratic reconstruction Reconstruction by comparioson LQR

Figure: Test 1: Cost functional (top) and optimal control (bottom) with different techniques for the feedback reconstruction.

  • L. Saluzzi (GSSI)

A HJB-POD approach for PDEs 25 / 29

slide-27
SLIDE 27

Test 2: 2D Reaction diffusion equation

     ∂ty(x, t) = σ∆y(x, t) + µ

  • y2(x, t) − y3(x, t)
  • + y0(x)u(t)

∂ny(x, t) = 0 y(x, 0) = y0(x) Jy0,t(u) = T

t

|y(x, s)|2dx + 1 100|u(s)2|

  • ds +

|y(x, T)|2dx

POD-DEIM resolution

T = 1, σ = 0.1, µ = 5, and Nx = 961. 6 POD basis to obtain a projection ratio equal to 0.9999.

  • L. Saluzzi (GSSI)

A HJB-POD approach for PDEs 26 / 29

slide-28
SLIDE 28

Test 2: 2D Reaction diffusion equation

Figure: Uncontrolled solution (top) and controlled solution with full tree (bottom) for time t = {0, 0.5, 1}

  • L. Saluzzi (GSSI)

A HJB-POD approach for PDEs 27 / 29

slide-29
SLIDE 29

Test 2: 2D Reaction diffusion equation

0.2 0.4 0.6 0.8 1

  • 2
  • 1.8
  • 1.6
  • 1.4
  • 1.2
  • 1
  • 0.8
  • 0.6
  • 0.4
  • 0.2

Control Policy with POD-DEIM

2 Controls 3 Controls 4 Controls 5 Controls 0.2 0.4 0.6 0.8 1 0.5 1 1.5

Cost Functional

Uncontrolled 2 Controls 3 Controls 4 Controls 2 3 4 5 0.0845 0.085 0.0855 0.086 0.0865 0.087 0.0875 0.088

Figure: Test 1: Optimal policy (left), cost functional (middle) and Jy0,0 (right) for Un with n = {2, 3, 4, 5}.

U2 U3 U4 U5 TSA-Full 6s 241s 3845s > 4 days TSA-POD 0.5s 20s 432s 1e4s

Table: CPU time of the TSA and the TSA-POD with a different number of controls

  • L. Saluzzi (GSSI)

A HJB-POD approach for PDEs 28 / 29

slide-30
SLIDE 30

Thank you for your attention

1

  • A. Alla, M. Falcone, L. Saluzzi, An efficient DP algorithm on a tree-structure

for finite horizon optimal control problems, SISC, 2019

2

  • A. Alla, M. Falcone, L. Saluzzi, High-order Approximation of the Finite Horizon

Control Problem via a Tree Structure Algorithm, IFAC CPDE 2019

3

  • A. Alla, L. Saluzzi, A HJB-POD approach for the control of nonlinear PDEs on a

tree structure, APNUM, 2019

4

  • M. Falcone, R. Ferretti, Discrete time high-order schemes for viscosity solutions
  • f Hamilton-Jacobi-Bellman equations, Numerische Mathematik, 1994

5

  • L. Saluzzi, A. Alla, M. Falcone, Error estimates for a tree structure algorithm on

dynamic programming equations, submitted, 2019

  • L. Saluzzi (GSSI)

A HJB-POD approach for PDEs 29 / 29