résolution de problème de contrôle optimal en mécanique quantique...

25
Résolution de problème de contrôle optimal en mécanique quantique par des méthodes de continuation et de tir multiple Conférence MODE 2012 - Dijon Mathématiques de l’Optimisation et de la décision O. Cots Dijon, 28-30 mars 2012 O. Cots (IMB Bourgogne) Results on contrast problem MODE’12 1 / 25

Upload: vuquynh

Post on 15-Sep-2018

213 views

Category:

Documents


0 download

TRANSCRIPT

Résolution de problème de contrôle optimal en mécanique quantiquepar des méthodes de continuation et de tir multiple

Conférence MODE 2012 - DijonMathématiques de l’Optimisation et de la décision

O. Cots

Dijon, 28-30 mars 2012

O. Cots (IMB Bourgogne) Results on contrast problem MODE’12 1 / 25

Introduction - Collaborations

Figure: (LHS) Hard pulse of 90◦. (RHS) Optimal solution.

– Bernard Bonnard (Univ. Bourgogne)– Jean-Baptiste Caillau (Univ. Bourgogne)– Joseph Gergaud (N7 - IRIT)– Steffen J. Glaser (Univ. Munich)– Dominique Sugny (Univ. Bourgogne)– . . .

O. Cots (IMB Bourgogne) Results on contrast problem MODE’12 2 / 25

Contrast problem

(P)

|q2(tf )|2 =(y2

2(tf ) + z22(tf )

)→ max[

y1 = − Γ1 y1 − u z1

z1 = γ1(1− z1) + u y1[y2 = − Γ2 y2 − u z2

z2 = γ2(1− z2) + u y2

q1(0) = (0, 1) = q2(0)q1(tf ) = (0, 0)

qi = (yi, zi), |qi| ≤ 1, i = 1, 2

γi = 1/(32.3 Ti1)Γi = 1/(32.3 Ti2)

|u| ≤ 2π

−1 −0.5 0 0.5 1−1

−0.5

0

0.5

1

y1

z1

−1 −0.5 0 0.5 1−1

−0.5

0

0.5

1

y2

z2

0 0.2 0.4 0.6 0.8 1

0

1

2

3

4

5

6

Figure: Trajectories of spin 1, 2 and the control associated for the Blood case.

O. Cots (IMB Bourgogne) Results on contrast problem MODE’12 3 / 25

Single spin problem (see [BCG+11])

(P1)

tf → min[y = − Γ y − u zz = γ(1− z) + u y

q(0) = (0, 1)q(tf ) = (0, 0)

q = (y, z), |q| ≤ 1

3γ2 < Γ

|u| ≤ 2π

The dynamics: q = F(q) + u G(q)

The Hamiltonian: H(q, u, p) = HF(q, p) + u HG(q, p), Hi =< p,Fi >, i = F,G

⇒ The singular extremals are those contained in HG = 0.

[BCG+11] B Bonnard, Olivier Cots, S Glaser, M Lapert, and Dominique Sugny.Geometric optimal control of the contrast imaging problem in nuclear magnetic resonance.math.u-bourgogne.fr, 2011.

O. Cots (IMB Bourgogne) Results on contrast problem MODE’12 4 / 25

Single spin: singular extremals

⇒ The singular extremals are those contained in HG = 0.

HG = < p,G > = 0HG = < p, [G,F] > = 0

}⇒ det(G, [G,F]) = y(−2δz + γ) = 0

with δ = γ − Γ.

The singular lines are y = 0 and z0 = γ2δ . The singular control us(q, p) is computed from

HG = {{HG,HF},HF}(z) + us{{HG,HF},HG}(z) = 0.

Horizontal line (z0 = γ2δ ): optimal, according to Generalized Legendre-Clebsch

condition (see [BC03]) and us(q) = γ(2Γ− γ)/(2δy)⇒ us ∈ L1, us /∈ L2

Vertical line (y = 0): optimal for z0 < z < 1 (GLC) and us(q) = 0.

[BC03] B Bonnard and M Chyba.Singular trajectories and their role in control theory, mathématiques & applications, vol. 40.lavoisier.fr, Jan 2003.

O. Cots (IMB Bourgogne) Results on contrast problem MODE’12 5 / 25

Single spin: global synthesis

Red: bang (u = 2π)Blue: bang (u = −2π)Green: singular (u = us)B: saturation

O. Cots (IMB Bourgogne) Results on contrast problem MODE’12 6 / 25

Single spin => contrast problem

We need to start with a bang.

Singular extremals are expected for the contrast problem.

To solve the contrast problem, we use an indirect method (multiple shooting)

⇒ we need to know the structure a priori.

⇒ we use an homotopic approach to capture the structure and initialize the multipleshooting method.

O. Cots (IMB Bourgogne) Results on contrast problem MODE’12 7 / 25

Homotopy

(Pλ)

−(y2

2(tf ) + z22(tf )

)+ (1− λ)

∫ tf0 |u|

2−λ(t)dt→ min[y1 = − Γ1 y1 − u z1

z1 = γ1(1− z1) + u y1[y2 = − Γ2 y2 − u z2

z2 = γ2(1− z2) + u y2

q1(0) = (0, 1) = q2(0)q1(tf ) = (0, 0)

qi = (yi, zi), |qi| ≤ 1, i = 1, 2

γi = 1/(32.3 Ti1)Γi = 1/(32.3 Ti2)

|u| ≤ 2π

Homotopy (Pλ): −(y2

2(tf ) + z22(tf )

)+ (1− λ)

∫ tf0 |u|

2−λ(t)dt→ min

The Hamiltonian: H(q, u, p, λ) = HF(q, p) + u HG(q, p) + (1− λ) |u|2−λ

(Pλ)-extremals are admissible for (P).

O. Cots (IMB Bourgogne) Results on contrast problem MODE’12 8 / 25

Maximum principle

The maximization of the Hamiltonian gives:

u(q, p, λ) = argmax H(q,w, p, λ)w ∈ U

and we have

λ < 1⇒

{u = sign(HG).{ 2|HG|

((2−λ)(1−λ))}1

(1−λ) if |u| ≤ 2πu = 2π sign(HG) else

We call true Hamiltonian the function (which does not depend on u)

Hr(q, p, λ) = H(q, u(q, p, λ), p, λ)

In order to solve the problem (P) in λ = 1, we:

1 solve by simple shooting method the problem in λ = 0 easily,

2 use homotopic method to solve (Pλ), from λ = 0 to λ = λf < 1, to . . .

3 . . . capture the structure of (P) and initialize the multiple shooting method.

O. Cots (IMB Bourgogne) Results on contrast problem MODE’12 9 / 25

1: Solving in λ = 0 with simple shooting method

The final time tf is equal to 1.1Tmin where Tmin is the minimal time to transfer the spin 1from (0, 1) to (0, 0).

Blood case: Spin 1 = (De)oxygenate blood : T11 = 1350 and T21 = 200Spin 2 = Oxygenate blood : T12 = 1350 and T22 = 50

−1 −0.5 0 0.5 1−1

−0.5

0

0.5

1

y1

z1

−1 −0.5 0 0.5 1−1

−0.5

0

0.5

1

y2

z2

0 0.2 0.4 0.6 0.8 1

0

1

2

3

4

5

6

t

u

Figure: Solution for λ = 0 with L2−λ regularization. Trajectories of spin 1 and 2 and the controlassociated.

O. Cots (IMB Bourgogne) Results on contrast problem MODE’12 10 / 25

2: homotopic method

Let us define the homotopic function

h : R2n × [0, 1] −→ R2n

(z0, λ) 7−→ Sλ(z0)

with z0 = (q0, p0).Assuming that 0 is a regular value for h, the level set {h = 0} is a one dimensionalsubmanifold of R2n+1 called the path of zeros.

We know a zero of h(., λ) for λ0 = 0 noted z00, and we want to follow this path to reach a

zero for a target value of the parameter λ close to 1.

λ

z0

(zf0, λf )

(z00, 0)

c(s)

O. Cots (IMB Bourgogne) Results on contrast problem MODE’12 11 / 25

Differential algorithms

HAMPATH uses DOPRI5 from E. Hairer and G. Wanner [HrW93] [HW], for the numericalintegration (without any correction) of:

(IVP)

{c(s) = T(c(s))c(0) = (z0

0, 0)

Until sf such as λ(sf ) close to 1 (dense output).

Under generic assumptions, c(s) = T(c(s)) isdetermined by

1 h′(c(s))c(s) = 02 |c(s)|=1

3 det(

h′(c(s))t c(s)

)is of constant sign

λ

z0

(zf0, λf )

(z00, 0)

c(s)

[HrW93] E. Hairer, S.P. Nørsett, and G. Wanner.Solving Ordinary Differential Equations I, Nonstiff Problems, volume 8 of Springer Serie in Computational Mathematics.Springer-Verlag, second edition, 1993.

[HW] E. Hairer and G. Wanner.DOPRI5 http://www.unige.ch/~hairer/prog/nonstiff/dopri5.f.

O. Cots (IMB Bourgogne) Results on contrast problem MODE’12 12 / 25

The path of zeros: λf = 0.915.

−2 −1.5 −1 −0.5 0 0.50

0.2

0.4

0.6

0.8

1

py1

(0)

λ

−2.5 −2 −1.5 −1 −0.5 00

0.2

0.4

0.6

0.8

1

pz1

(0)

λ

−0.08 −0.07 −0.06 −0.05 −0.04 −0.030

0.2

0.4

0.6

0.8

1

py2

(0)

λ

0.215 0.22 0.225 0.230

0.2

0.4

0.6

0.8

1

pz2

(0)

λ

Figure: Homotopic path with L2−λ regularization. Initial adjoint vector w.r.t. λ.

O. Cots (IMB Bourgogne) Results on contrast problem MODE’12 13 / 25

Control: λ ∈ {0.5, 0.8, 0.9, 0.915}

0 0.2 0.4 0.6 0.8 1

0

1

2

3

4

5

6

t

u

λ = 0.5

0 0.2 0.4 0.6 0.8 1

0

1

2

3

4

5

6

t

u

λ = 0.8

0 0.2 0.4 0.6 0.8 1

0

1

2

3

4

5

6

t

u

λ = 0.9

0 0.2 0.4 0.6 0.8 1

0

1

2

3

4

5

6

t

u

λ = 0.915

O. Cots (IMB Bourgogne) Results on contrast problem MODE’12 14 / 25

States-Control: λ = 0.915

0 0.2 0.4 0.6 0.8 1

0

1

2

3

4

5

6

t

u

λ = 0.915

−→ Bang-Singular structure.

−1 −0.5 0 0.5 1−1

−0.5

0

0.5

1

y1

z1

−1 −0.5 0 0.5 1−1

−0.5

0

0.5

1

y2

z2

Figure: Solution for λ = 0.915 with L2−λ regularization. Trajectories of spin 1 and 2 and thecontrol associated.

O. Cots (IMB Bourgogne) Results on contrast problem MODE’12 15 / 25

3: multiple shooting

We have a BS structure for tf = 1.1Tmin. We denote by t0, t1, tf the different instants andby z0, z1, zf the state-costate variables associated (z = (q1, q2, p1, p2) ∈ R4 × R4).

Hamiltonian :

H(q, u, p) = HF(q, p) + u HG(q, p),{

u = 2π if t ∈ [t0; t1]u = using if t ∈ [t1; tf ]

Equations (cf. [Mau76]) :

Bang Sing(t0, z0) −→ (t1, z1) −→ (tf , zf )q1 = (0, 1) HG = 0 q1 = (0, 0)q2 = (0, 1) HG = 0 q2 = p2

with the matching conditions z(t1; t0, z0) = z1.

[Mau76] H Maurer.Numerical solution of singular control problems using multiple shooting techniques.Journal of optimization theory and applications, Jan 1976.

O. Cots (IMB Bourgogne) Results on contrast problem MODE’12 16 / 25

Trajectories of spin 1 and 2 and the control: blood case (λ = 1.0)

−1 −0.5 0 0.5 1−1

−0.5

0

0.5

1

y1

z1

−1 −0.5 0 0.5 1−1

−0.5

0

0.5

1

y2

z2

0 0.2 0.4 0.6 0.8 1

1

2

3

4

5

6

Figure: First solution (contrast of 0.41) from the L2−λ regularization.

−1 −0.5 0 0.5 1−1

−0.5

0

0.5

1

y1

z1

−1 −0.5 0 0.5 1−1

−0.5

0

0.5

1

y2

z2

0 0.2 0.4 0.6 0.8 1

0

1

2

3

4

5

6

Figure: Second solution (contrast of 0.42) from the L2−λ regularization.

O. Cots (IMB Bourgogne) Results on contrast problem MODE’12 17 / 25

Trajectories of spin 1 and 2 and the control: blood case (λ = 1.0)

−1 −0.5 0 0.5 1−1

−0.5

0

0.5

1

y1

z1

−1 −0.5 0 0.5 1−1

−0.5

0

0.5

1

y2

z2

0 0.2 0.4 0.6 0.8 1

1

2

3

4

5

6

Figure: Best solution (contrast of 0.45) from the L2−λ regularization.

Remark: other possible homotopy

Let us define the L2 regularization : −(y2

2(tf ) + z22(tf )

)+ (1− λ)

∫ tf0 |u|

2(t)dt→ min

The Hamiltonian becomes : H(q, u, p, λ) = HF(q, p) + u HG(q, p) + (1− λ) |u|2

And the maximization of the H gives : λ < 1⇒{

u = − HG2(1−λ)p0 if |u| ≤ 2π

u = 2π sign(HG) else

We find the same solutions but the structure appears not very clearly during thecontinuation process.

O. Cots (IMB Bourgogne) Results on contrast problem MODE’12 18 / 25

First conclusion

We have an optimal control problem with Bang and Singular arcs. Theregularizations L2−λ and L2 permit to find solutions satisfying the first ordernecessary conditions of optimality.

To solve in λ = 0 is very easy.

L2−λ captures the BS structure very well compared to L2.

O. Cots (IMB Bourgogne) Results on contrast problem MODE’12 19 / 25

Contrast problem: continuation on tf

We use HAMPATH to perform a differential continuation on tf from Tmin + ε to 2Tmin.

Tmin : the minimal time to transfer the spin 1 from (0, 1) to (0, 0).

↪→ there is an horizontal asymptote on the contrast plot. The optimal solution in termsof contrast is obtain from tf = 1.3Tmin.

1 1.2 1.4 1.6 1.8 2

0.39

0.4

0.41

0.42

0.43

0.44

0.45

0.46

tf/min t

f

√y2 2(t

f)+

z2 2(t

f)

1 1.2 1.4 1.6 1.8 2

0

0.05

0.1

0.15

0.2

t 1/t

f

tf/min t

f

Figure: Best solution in black. (LHS) Contrast w.r.t the transfer duration. (RHS) Normalizedduration of the Bang arc.

O. Cots (IMB Bourgogne) Results on contrast problem MODE’12 20 / 25

Solution for tf close to Tmin

1 1.2 1.4 1.6 1.8 20

1

2

3

4

5

6

tf/min t

f

Figure: The minimal distance between the singular control and the saturation with respect to thefinal time.

−1 −0.5 0 0.5 1−1

−0.5

0

0.5

1

y1

z1

−1 −0.5 0 0.5 1−1

−0.5

0

0.5

1

y2

z2

0 0.2 0.4 0.6 0.8 1

0

1

2

3

4

5

6

t

u

Figure: Best solution for tf = 1.000004 × min tf .O. Cots (IMB Bourgogne) Results on contrast problem MODE’12 21 / 25

HAMPATH package

From the true hamiltonian and the boundary, intermediate and transversalityconditions, HAMPATH [CCG11]:

produces automatically the state-costate equations (thanks TAPENADE)

computes the shooting function by numerical integration (thanks DOPRI5)

provides the variationnal equations used in the jacobian of the shooting function(thanks TAPENADE)

integrates the variationnal equations so that the diagram commutes (the step sizecontrol is only made on the state and co-state equations)

(IVP)Numerical integration−−−−−−−−−−→ h(z0, λ)

Derivative

y yDerivative

(VAR)Numerical integration−−−−−−−−−−→ ∂h

∂z0(z0, λ)

[CCG11] J.B. Caillau, O. Cots, and J. Gergaud.Differential pathfollowing for regular optimal control problems. HAMPATH apo.enseeiht.fr/hampath.Optimization Methods and Software, to appear, 2011.

O. Cots (IMB Bourgogne) Results on contrast problem MODE’12 22 / 25

Global diagram of HAMPATH

efun

b(ti, zi, λ)

hfun

Hr(t, z, λ)

db~H

(∂Hr∂p ,−

∂Hr∂x )

S(ti, zi, λ)

d~H

S′(ti, zi, λ) T(S′(ti, zi, λ))

ssolve

shooting method

hampath

continuation method

expdhvfun

variational equations

TAPENADE

TAPENADE

DOPRI5

VAR

DOPRI5

DOPRI5

VAR

DOPRI5

HYBRJ

MATLAB functions

Available for use

FORTRAN 90

O. Cots (IMB Bourgogne) Results on contrast problem MODE’12 23 / 25

Last conclusion

The HAMPATH package gives tools to solve OCP by indirect methods:Shooting methods: simple and multiple;Homotopic methods: differential without correction;Function which integrate the variationnal equations and permit to check sufficientsecond order conditions in the smooth case;...

The derivatives and the functions are computed accurately and automatically.

It is very easy to use since only 2 FORTRAN subroutines need to be implemented.Then it is interfaced with MATLAB.

Homotopic method gave us the right structure and a good initial point for thecontrast problem. We could compute the solution with accuracy thanks to multipleshooting.Work in progress:

Second order conditions for the contrast problem with BS structure (see [BC12] fordetails);Convergence of the zeros path to the best solution.

[BC12] B. Bonnard and O. Cots.Geometric numerical methods and results in the control imaging problem in nuclear magnetic resonance.submitted to Mathematical Models and Methods in Applied Sciences (M3AS), 2012.

O. Cots (IMB Bourgogne) Results on contrast problem MODE’12 24 / 25

[AG03] E.L. Allgower and K. Georg.Introduction to numerical continuation methods, volume 45 of Classics In Applied Mathematics.SIAM, 2003.

[BC03] B Bonnard and M Chyba.Singular trajectories and their role in control theory, mathématiques & applications, vol. 40.lavoisier.fr, Jan 2003.

[BC12] B. Bonnard and O. Cots.Geometric numerical methods and results in the control imaging problem in nuclear magnetic resonance.submitted to Mathematical Models and Methods in Applied Sciences (M3AS), 2012.

[BCG+11] B Bonnard, Olivier Cots, S Glaser, M Lapert, and Dominique Sugny.Geometric optimal control of the contrast imaging problem in nuclear magnetic resonance.math.u-bourgogne.fr, 2011.

[BCS09] B Bonnard, M Chyba, and Dominique Sugny.Time-minimal control of dissipative two-level quantum systems: the generic case.Automatic Control, Jan 2009.

[BS09] B Bonnard and Dominique Sugny.Time-minimal control of dissipative two-level quantum systems: the integrable case.SIAM J. Control Optim, Jan 2009.

[CCG11] J.B. Caillau, O. Cots, and J. Gergaud.Differential pathfollowing for regular optimal control problems. HAMPATH apo.enseeiht.fr/hampath.Optimization Methods and Software, to appear, 2011.

[HrW93] E. Hairer, S.P. Nørsett, and G. Wanner.Solving Ordinary Differential Equations I, Nonstiff Problems, volume 8 of Springer Serie in Computational Mathematics.Springer-Verlag, second edition, 1993.

[HW] E. Hairer and G. Wanner.DOPRI5 http://www.unige.ch/~hairer/prog/nonstiff/dopri5.f.

[LZB+10] M Lapert, Y Zhang, M Braun, S Glaser, and Dominique Sugny.Singular extremals for the time-optimal control of dissipative spin 1/2 particles.Physical review letters, Jan 2010.

[Mau76] H Maurer.Numerical solution of singular control problems using multiple shooting techniques.Journal of optimization theory and applications, Jan 1976.

O. Cots (IMB Bourgogne) Results on contrast problem MODE’12 25 / 25