optimal_control

# Optimal control

Keywords: Geometric control, Second order conditions, Simple and Multiple shooting, Differential path following.

## General description

Consider a dynamical system (given by an ordinary differential equation) that one can control. Control theory deals with finding a control law such that the trajectory of the system joins an initial set with a final target. An optimal control problem includes in addition, a cost function (that is a function of state and control variables) to minimize. Hence, an optimal control problem is an optimization problem with differential constraints and boundary conditions.

The optimal solution (i.e. the optimal control and the associated trajectory) can be found as an extremal, solution of the Pontryagin Maximum Principle (a necessary condition) or by solving the Hamilton-Jacobi-Bellman equation (a sufficient condition). Sufficient second order conditions of local optimality can be derived using the PMP, computing Jacobi fields and then conjugate points.

The optimal control problem is transformed to a Boundary Value Problem (BVP) when the PMP is applied. In the smooth case one obtains a Two-Points BVP (TPBVP) while in the Bang-Bang or Bang-Singular cases (i.e. with discontinuous optimal control), one gets a Multiple-Points BVP (MPBVP) to solve. Then from the BVP, one defines the shooting method which consists in finding a zero of the shooting equations. Newton algorithm is usually used to find a zero of the nonlinear shooting function, which implies two main difficulties: i) computing the Jacobian of the shooting function and ii) finding an initial guess for the shooting method.

• i) The Jacobian is computed rigorously using the variational equations combined with Automatic Differentiation.
• ii) In the smooth case, the initial guess must only be a good enough approximation of the solution. In the discontinuous case, the regularized approximation must also reveal the optimal structure (i.e. the sequence of bang and singular arcs, see Figs. 2 and 4). Homotopy method can be used to transform the problem into a simpler one and then to retrieve the solution of the original problem by continuation. Besides, in the discontinuous case, we need a proper regularization technique. The geometric, algorithmic and numerical tools we develop are based on the PMP. To make a close and detailed analysis of optimal control problems, any open-source software we distribute (see Softwares tab) includes indirect methods:

• Shoot: it is a fortran package for solving Two Points Boundary Value Problems by the shooting method. The Jacobian of the shooting function is computed rigorously using variational equations. The problems can be Bang-Bang with many discontinuities.
• Cotcot: it is a Matlab package designed to compute extremals in the case of smooth Hamiltonian systems, and to obtain the associated conjugate points with respect to the performance index of the underlying optimal control problem.
• Hampath: it combines Shoot package with Cotcot code, with additional features such as an homotopy method (based on a differential path following algorithm). This software is made to solve optimal control problems with smooth, Bang-Bang or Bang-Singular optimal controls, but also to study Hamiltonian flows.

## Applications:

### Orbital transfer

One of the main application is the orbital transfer of satellites with low thrust. The two-body and the circular restricted three-body problems have been studied so far. The cost function can be the transfer time or the fuel consumption which leads in the second case to Bang-Bang optimal control. The methods developed by the team have led to the complete resolution of the problem without any a priori knowledge on the optimal structure, in particular without any knowledge on the number of discontinuities (which can be extremely large in the case of low thrust).  Figure 2 (from J.-B. Caillau, O. Cots & J. Gergaud, Differential continuation for regular optimal control problems, Optim. Methods Softw., 27 (2012), no 2, 177-196).

(left) Minimum fuel consumption problem (λ = 1) in two-body control, norm of the controls. The norm of the three-dimensional control versus longitude (the final longitude is fixed whereas the final time is free) is displayed for λ close to 0, λ = 0.6, and λ close to 1. For λ = 0, the minimum time problem is solved and |u| = 1 everywhere. Conversely, for λ close to 1, the switching structure has been captured and almost-switches between 0 and 1 are observed on the norm.

(right) Minimum fuel consumption problem (λ = 1) in two-body control, optimal trajectory. The trajectory (in blue) around the Earth is displayed for λ = 0.999, in three dimensions (upper subplot), (q1,q2) and (q2,q3)-projections (lower subplots). The red arrows indicate the control in the three-dimensional view. The action of the control is clearly located around the apogees and the last two perigees.

### Quantum control

The contrast problem in medical imaging by Nuclear Magnetic Resonance is another main activity of the team. The contrast problem is modeled by pairs of Bloch equations. The control which is a magnetic RF-field is applied to distinguish two different substances. This is done by maximizing the image contrast between the two samples. An interesting case is to distinguish oxygenated blood and deoxygenated blood in the circulatory system (see Fig 3). The introduction of optimal control theory has given great improvements. We first have proved that the optimal solutions are made of bang and singular arcs and we have obtained sub-optimal synthesis (depending on parameters) for which we can certify how far the solutions are from the global solution. Figure 3 (from B. Bonnard & O. Cots, Geometric numerical methods and results in the control imaging problem in nuclear magnetic resonance, Math. Models Methods Appl. Sci., 24 (2014), no. 1, 187-212). Experimental results: The inner circle shape sample mimics the deoxygenated blood, where T1 = 1.3s and T2 = 50ms; the outside moon shape sample corresponds to the oxygenated blood, where T1 = 1.3s and T2 = 200ms.   Figure 4 (from B. Bonnard & O. Cots, Geometric numerical methods and results in the control imaging problem in nuclear magnetic resonance, Math. Models Methods Appl. Sci., 24 (2014), no. 1, 187-212). Contrast problem in the blood case, solution BSBSBS with contrast 0.484 for a transfer time tf = 1.5 × min tf. Trajectories for spin 1 (i.e. deoxygenated blood) and spin 2 (i.e. oxygenated blood) in the (y, z)-plane are portrayed in the first two subgraphs. The corresponding control is drawn in the rightmost subgraph.