A numerical scheme to solve fractional optimal control problems

We review recent results obtained to solve fractional order optimal control problems with free terminal time and a dynamic constraint involving integer and fractional order derivatives. Some particular cases are studied in detail. A numerical scheme is given, based on expansion formulas for the fractional derivative. The efficiency of the method is illustrated through examples.


Introduction
In a letter dated September 30, 1695 l'Hôpital posed the question to Leibniz: what would be the derivative of order α = 1/2? Leibniz's response was: "an apparent paradox, from which one day useful consequences will be drawn." In these words fractional calculus was born. In 1730, based on the formula d n x m dx n = m(m − 1) · · · (m − n + 1)x m−n = Γ(m + 1) Γ(m − n + 1) x m−n , Euler suggested to use this relationship also for real values of n. Taking m = 1 and n = 1/2, he obtained Since then, many different approaches have been carried out, trying to find proper definitions for what should be a derivative and an integral of real order. Starting with Cauchy's formula for an n-fold integral, This is nowadays the most common definition for fractional integral. We remark that when the order α is an integer, then the fractional integral becomes a multiple integral, recovering by this way the classical case.
We begin with some basic definitions and properties about fractional operators [1,2]. To avoid too many details, we omit here the conditions that ensure the existence of such fractional operators and the assumptions in which the results given below hold. For an introduction to the fractional variational calculus we refer the reader to [3].
(right RLFI) The left and right Riemann-Liouville fractional derivatives are defined, respectively, by The left and right Caputo fractional derivatives are defined, respectively, by We remark that if α = n in Definition 1, then we have the usual operators: Some basic properties are useful, namely, a relationship between the Riemann-Liouville and the Caputo fractional derivatives and a fractional integration by parts formula.
Theorem 2. The following conditions hold: For numerical purposes, one of the most common procedure is to replace the fractional operators by a series that involves integer derivatives only. The usual one is given by Although very simple to use, it is easy to conclude that in order to have a small error when we approximate a D α t x by a finite sum up to order N , we need to consider a large value for N , i.e., we need to consider the set of admissible functions to be C N [a, b] which is an important restriction of the set of the space of functions. Recently, in [4], a new expansion formula is given, with the advantage that we only need the first derivative: where V p (t) is the solution of the system for p = 2, 3, . . . , and A, B and C are given by We mention the recent papers [5,6,7], where similar results are proven for fractional integrals and for other types of fractional operators.

Necessary and sufficient optimality conditions
Let α ∈ (0, 1), and let L, f : [a, +∞[×R 2 → R be two differentiable functions and φ : [a, +∞[×R → R a differentiable function. The fundamental problem, as studied in [8], is the following: subject to the dynamic control system and the initial condition with (M, N ) = (0, 0) and x a a fixed real number. Thus, we are not only interested in finding the optimal state function x and the optimal control u, but also the optimal time T .
is a minimizer of (5) under the dynamic constraint (6) and the boundary condition (7), then there exists a function λ for which the triplet (x, u, λ) satisfies (i) the Hamiltonian system (iii) the transversality conditions where the Hamiltonian H is defined by This theorem states the general condition that the optimal solution (x, u, T ) must fulfill. Next, depending on extra conditions imposed over the final time T or in x(T ), new transversality conditions are obtained.
(i) If T is fixed and x(T ) is free, then Theorem 3 holds with the transversality conditions (8) and (9) replaced by (ii) If x(T ) is fixed and T is free, then Theorem 3 holds with the transversality conditions (8) and (9) replaced by (iii) If T and x(T ) are fixed, then Theorem 3 holds with no transversality conditions.
(iv) If the terminal point x(T ) belongs to a fixed curve, i.e., x(T ) = γ(T ) for some differentiable curve γ, then Theorem 3 holds with the transversality conditions (8) and (9) replaced by (v) If T is fixed and x(T ) ≥ K for some fixed K ∈ R, then Theorem 3 holds with the transversality conditions (8) and (9) replaced by Numerically, by using approximation (2) up to order K, we can transform the original problem into the following classical optimal control problem: Theorem 3 can be generalized in the following way. Observe that we have two initial points for the problem, one for the fractional derivative and a second one for the integral of the functional. We now consider a more general approach, where the initial time for the integral is greater than the initial time of the fractional derivative. We impose a boundary condition on t = A, but similar conditions could be obtained if we considered conditions at t = a instead. The problem is formulated as follows. Let α ∈ (0, 1), and let L, f : [a, +∞[×R 2 → R be two differentiable functions, φ : [a, +∞[×R → R a differentiable function, and A > a a real. We wish to subject to and with (M, N ) = (0, 0) and x A being a fixed real number.
Theorem 5. If (x, u, T ) is a minimizer of (11) under the dynamic constraint (12) and the boundary condition (13), then there exists a function λ for which the triplet (x, u, λ) satisfies (i) the Hamiltonian system for all t ∈ [A, T ] and (iii) the transversality conditions where the Hamiltonian H is defined by We remark that when A = a, Theorem 5 reduces to Theorem 3. Under some additional conditions, namely, convexity conditions over L, f , and φ, Theorem 3 provides also sufficient conditions to ensure optimal solutions. The result is given in the next theorem.
Theorem 6. Let x, u, λ be a triplet satisfying the necessary conditions of Theorem 3. Moreover, assume that 1. L and f are convex on x and u, and φ is convex in x;

T is fixed;
3. λ(t) ≥ 0 for all t ∈ [a, T ] or f is linear in x and u.

Numerical treatment
So far, we have provided a theoretical approach to fractional optimal control problems, which involves solving fractional differential equations. As it is known, solving such equations is in most cases impossible to do, and numerical methods are used to find approximated solutions for the problem (see, e.g., [9,10]). We describe next, briefly, how formula (2) is deduced and generalized for arbitrary size expansions.
Let x ∈ C 2 [a, b]. Using integration by parts two times, we deduce that By the binomial formula, we can rewrite the fractional derivative as

Further integration by parts gives
where V p (t), A(α), B(α) and C(α, p) are given in (3)-(4). Following similar calculations, we can deduce the next theorem.
Theorem 7. Fix n ∈ N and let x ∈ C n [a, b]. Then, The idea is to replace the fractional derivative with such expansions and to consider finite sums only. When we use the approximation the error is bounded by To see the accuracy of the method, we exemplify it by considering some functions and compare the exact expression of the fractional derivative with the approximated one. To start, consider x 1 (t) = t 4 and x 2 (t) = e 2t and expansions with n = 2 and different values for N . The result is exemplified in Figures 1(a) and 1(b).
A different approach is to consider a fixed N and vary the size of the expansion, i.e., to consider different values for n. For the same functions x 1 and x 2 , with N = 6, the results are shown in Figures 2(a) and 2(b).

Examples
We will see that applying the numerical method given in the previous section, we are able to solve fractional optimal control problems applying known techniques from the classical optimal control theory. First, consider the following optimal control problem: subject to the control systemẋ (t) and the boundary conditions .
(16)   The solution is given by .
Using the necessary conditions given in Theorem 4, we arrive at which is a fractional boundary value problem. We approximate this problem by approximation in (2) up to order N : The solutions are depicted in Figure 3, for N = 2, N = 3, and α = 1/2, with the error being given by      Another approach is to approximate the original problem by using approximation from (2) directly, gettingJ (x, u) = 1 0 (tu − (α + 2)x) 2 dt −→ min subject to the control system and boundary conditions , V p (0) = 0, p = 2, 3, . . . , N.
The (classical) necessary optimality conditions become subject to the boundary conditions The solutions are depicted in Figure 4 for N = 2, N = 3, and α = 1/2.     For our next example, we consider the final time T free and thus a variable in the problem. We wish to find an optimal triplet (x(·), u(·), T ) that minimizes subject to the control systemẋ and boundary conditions x(0) = 0, x(T ) = 1.
The results obtained are shown in Figure 5.  19), using fractional necessary optimality conditions (dashed lines) and approximation of the problem to an integer order optimal control problem (dash-dotted lines).