Skip to text

2 Motivations

This paper is motivated by the torque split and gear shift optimal control problem described in [5] and used for the numerical results in Section 4. Another motivation is the resolution of this problem by the bilevel optimal control method, fully detailed in [5] and briefly presented in Section 2.2, which is robust, fast, and that can be embedded. One crucial feature of this method is the computation of approximations, denoted Ci(a,b) hereafter, of value functions, denoted Vi(a,b) and representing the optimal cost to transfer the state from the initial condition a to the target b. In the same reference [5], the cost approximations Ci are modeled by neural networks, trained on specific databases. The goal of this paper is to explain the method (referred as Method 2 in the following) used to create these databases in [5], but also to compare it to a more intuitive but naive approach (referred as Method 1 in the following).

2.1 Optimal control problem

We consider the following optimal control problem in Bolza form:

where the function f0:R×Rn×Rm→R, the terminal cost g:Rn→R, and the state dynamic function f:R×Rn×Rm→Rn are of class C1. The initial and final times t0<tf are fixed, as well as the initial state x0∈Rn. The control domain U⊂Rm is a nonempty set. Solving (OCP) consists in finding an absolutely continuous1 state x∈AC([t0,tf],Rn) and an essentially bounded2 control u∈L∞([t0,tf],Rm), which minimize the cost (2.2) and satisfy the constraints (2.3), (2.4), and (2.5).

Remark.

For conciseness and clarity, we consider an optimal control problem in this Bolza form but our approach can be easily extended to a more general problem with fixed final state or mixed limit conditions for instance.

2.2 Bilevel optimal control method

Considering intermediate times t0<t1<⋯<tN<tN+1=tf, the optimal control problem (OCP) can be decomposed into the following bilevel optimal control problem:

(BOCP)minX∑i=0NVi(Xi,Xi+1)+g(XN+1),s.t.X=(X0,…,XN+1)∈X,X0=x0,

where for all i∈NN:={0,…,N}, the functions Vi are the intermediate value functions: for any admissible3 pair (a,b), Vi(a,b) is the optimal cost of

(OCPi,a,b)Vi(a,b)=minx,u∫titi+1f0(t,x(t),u(t))dt,s.t.x˙(t)=f(t,x(t),u(t)),t∈[ti,ti+1]a.e.,s.t.u(t)∈U,t∈[ti,ti+1],s.t.x(ti)=a,x(ti+1)=b.

The set X appearing in (BOCP) is defined as follows: X∈X⊂(Rn)N+2 if, for all i∈NN, the pair (Xi,Xi+1) is admissible for (OCPi,Xi,Xi+1. As detailed in [5], problem (BOCP) can be seen as a bilevel optimal control problem [8].

In many applications, the intermediate value functions Vi cannot be computed explicitly. Thus, it has been proposed in [5] to replace them by approximations denoted Ci. This leads to a hierarchical method in two steps, called Macro–Micro. The first step consists in solving the finite-dimensional optimization problem

(Macro)minX∑i=0NCi(Xi,Xi+1)+g(XN+1),s.t.X∈X,X0=x0,

to get the intermediate state Xˆ=(Xˆ0,…,XˆN+1). The second step is to solve N+1 independent optimal control problems of the following Lagrange form:

(Micro)minx,u∫titi+1f0(t,x(t),u(t))dt,s.t.x˙(t)=f(t,x(t),u(t)),t∈[ti,ti+1]a.e.,s.t.u(t)∈U,t∈[ti,ti+1],s.t.x(ti)=Xˆi,x(ti+1)=Xˆi+1,

to get the state and command trajectory on each subinterval [ti,ti+1]. This method is suboptimal, due to the approximation error between Ci and Vi, but it promises to be faster and to require less computations than classical methods, which is particularly interesting for embedded applications.

However, before applying the Macro–Micro method, we need to build the approximation functions Ci. We postpone to Section 3 the creation of the optimal values database, which will be used for that purpose, and which is the main contribution of this article. From now on, we consider one optimal control problem of the problem (Micro), for a given fixed i∈NN. The next section gives some classical details about the so-called simple indirect shooting method to solve it.

2.3 Indirect method

The considered optimal control problem of problem (Micro) may be solved by the classical indirect simple shooting method, which is based on the Pontryagin maximum principle [12]. The core function of this principle is the pseudo-Hamiltonian

h(t,x,p,u)=−f0(t,x,u)+(p|f(t,x,u)),

where (·|·) stands for the usual scalar product in Rn. For a given initial state and costate couple zi=(xi,pi)∈Rn×Rn, let us define the problem of finding the state and costate trajectory z(·) solution of

(2.5)z˙(t)=h→(t,z(t),u(t)),t∈[ti,ti+1]a.e.,h(t,z(t),u(t))=maxw∈U,h(t,z(t),w),t∈[ti,ti+1]a.e.,z(ti)=zi,

where h→ is the pseudo-Hamiltonian vector field defined by

h→(t,(x,p),u)=(∇ph(t,(x,p),u),−∇xh(t,(x,p),u)).

If we assume that the exponential map exph→:(ti+1,ti,zi)↦z(ti+1) is a well-defined application, where z(·) is a solution of problem (2.5), then the maximum principle leads to the resolution of the two-points boundary value problem

(TPBVP)(xi+1,pi+1)=exph→(ti+1,ti,(xi,pi)),xi=Xˆi,xi+1=Xˆi+1.

To use simple notation, let us define x¯i+1(zi) by

(2.6)x¯i+1(zi)=πx(exph→(ti+1,ti,zi)),

where πx(x,p)=x is the projection on the state space.

In the following, we assume that for all initial and final admissible state (a,b), if (x,u) is a solution of (OCPi,a,b), then there exists p∈AC([ti,ti+1],Rn) such that the pair (x,p) is a solution of (TPBVP). Such a pair solution of problem (2.5) is called an extremal. A solution of (TPBVP) is an extremal that satisfies the boundary conditions, and it is called a BC-extremal. This assumption is linked to the normality of the BC-extremals associated to the solution (cf. [1] for more details). For the sake of simplicity, we denote by c¯i(zi) the cost of the state and command trajectory, given by the solution of problem (2.5), with the initial state and costate conditions zi=(xi,pi). We also consider the following hypothesis that will be numerically verified in our application.

Hypothesis 2.1.

Let (xi,xi+1) be a given initial and final admissible state. Then all the zeros of

(2.7)pi↦x¯i+1(xi,pi)−xi+1

are associated to the same state and command trajectory (x,u), depending on the pair (xi,xi+1).

Remark.

Under the previous assumptions and Hypothesis 2.1, for all initial and final admissible state (a,b), there exists at most one solution of (OCPi,a,b).

Remark.

Hypothesis 2.1 comes from our application but is not necessary to apply the two proposed methods described in Section 3. However, it simplifies their descriptions and helps to understand their main characteristics. In fact, consider another application where it does not hold, namely where there are several zeros of (2.7) associated to different state-control pairs. If we still have a unique solution of (OCPi,a,b), we have to add another step to the two proposed methods, which consists simply of keeping the zero with the lowest cost. On the other hand, if there are several solutions, we can either pick one or keep all since it is not an issue to have redundant points in the database.

The indirect simple shooting method aims to solve (TPBVP) by finding a zero of the shooting function

(2.8)Si,Xˆi,Xˆi+1(pi)=x¯i+1(Xˆi,pi)−Xˆi+1.

Thanks to Hypothesis 2.1, all the zeros of the shooting function lead to the same optimal cost and, therefore, only one of them need to be found. On the opposite, without this hypothesis, it would be necessary to find all the zeros and to compare them in terms of cost to get the optimal one.

Equation (2.8) is solved using a classical Newton-like solver, and it is well known that finding a good initial guess for the costate is a critical issue. However, given a solution X∗ of (BOCP), if Vi is differentiable at (Xi∗,Xi+1∗), it is established [3] that the vector −∇aVi(Xi∗,Xi+1∗) is a zero of Si,Xi∗,Xi+1∗. Unfortunately, Vi is not known, but since Ci is an approximation of Vi, the vector −∇aCi(Xˆi,Xˆi+1) could be a good initial guess for the associated optimal control problem of the problem (Micro) shooting function [7]. This initial guess is used with a geometric preconditioning method of the shooting function on the proposed application in [6].

Now that we have described how to solve the optimal control problems of the problem (Micro), we will focus on the creation of a database for the computation of Ci, which is the main contribution of this paper.