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 hereafter, of value functions, denoted 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 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 , the terminal cost , and the state dynamic function are of class . The initial and final times are fixed, as well as the initial state . The control domain is a nonempty set. Solving (OCP) consists in finding an absolutely continuous1 state and an essentially bounded2 control , which minimize the cost (2.2) and satisfy the constraints (2.3), (2.4), and (2.5).
2.2 Bilevel optimal control method
Considering intermediate times , the optimal control problem (OCP) can be decomposed into the following bilevel optimal control problem:
where for all , the functions are the intermediate value functions: for any admissible3 pair , is the optimal cost of
The set appearing in (BOCP) is defined as follows: if, for all , the pair 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 cannot be computed explicitly. Thus, it has been proposed in [5] to replace them by approximations denoted . This leads to a hierarchical method in two steps, called Macro–Micro. The first step consists in solving the finite-dimensional optimization problem
to get the intermediate state . The second step is to solve independent optimal control problems of the following Lagrange form:
to get the state and command trajectory on each subinterval . This method is suboptimal, due to the approximation error between and , 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 . 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 . 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
where stands for the usual scalar product in . For a given initial state and costate couple , let us define the problem of finding the state and costate trajectory solution of
where is the pseudo-Hamiltonian vector field defined by
If we assume that the exponential map is a well-defined application, where is a solution of problem (2.5), then the maximum principle leads to the resolution of the two-points boundary value problem
To use simple notation, let us define by
where is the projection on the state space.
In the following, we assume that for all initial and final admissible state , if is a solution of (OCPi,a,b), then there exists such that the pair 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 the cost of the state and command trajectory, given by the solution of problem (2.5), with the initial state and costate conditions . We also consider the following hypothesis that will be numerically verified in our application.
Hypothesis 2.1.
Let be a given initial and final admissible state. Then all the zeros of
are associated to the same state and command trajectory , depending on the pair .
Remark.
Under the previous assumptions and Hypothesis 2.1, for all initial and final admissible state , 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
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 of (BOCP), if is differentiable at , it is established [3] that the vector is a zero of . Unfortunately, is not known, but since is an approximation of , the vector 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 , which is the main contribution of this paper.