Numerical Solution of Some Types of Fractional Optimal Control Problems

We present two different approaches for the numerical solution of fractional optimal control problems (FOCPs) based on a spectral method using Chebyshev polynomials. The fractional derivative is described in the Caputo sense. The first approach follows the paradigm “optimize first, then discretize” and relies on the approximation of the necessary optimality conditions in terms of the associated Hamiltonian. In the second approach, the state equation is discretized first using the Clenshaw and Curtis scheme for the numerical integration of nonsingular functions followed by the Rayleigh-Ritz method to evaluate both the state and control variables. Two illustrative examples are included to demonstrate the validity and applicability of the suggested approaches.


Introduction
FOCP refers to the minimization of an objective functional subject to dynamical constraints on the state and the control which have fractional order models. Fractional order models are sometimes more appropriate than conventional integer order models to describe physical systems [1][2][3][4]. For example, it has been shown that materials with memory and hereditary effects and dynamical processes including gas diffusion and heat conduction in fractal porous media can be more adequately modeled by fractional order models [5]. Numerical methods for solving FOCPs have been suggested in [6][7][8][9].
This paper presents two numerical methods for solving some types of FOCPs where fractional derivatives are introduced in the Caputo sense. These numerical methods rely on the spectral method where Chebyshev polynomials are used to approximate the unknown functions. Chebyshev polynomials are widely used in numerical computation [10,11].
For the first numerical method, we follow the approach "optimize first, then discretize" and derive the necessary optimality conditions in terms of the associated Hamiltonian.
The necessary optimality conditions give rise to fractional boundary value problems that have left Caputo and right Riemann-Liouville fractional derivatives. We construct an approximation of the right Riemann-Liouville fractional derivatives and solve the fractional boundary value problems by the spectral method. The second method relies on the strategy "discretize first, then optimize. " The Clenshaw and Curtis scheme [12] is used for the discretization of the state equation and the objective functional. The Rayleigh-Ritz method provides the optimality conditions in the discrete regime.
The paper is organized as follows: in Section 2, some basic notations and preliminaries as well as properties of the shifted Chebyshev polynomials are introduced. Section 3 contains the necessary optimality conditions of the FOCP model. Section 4 is devoted to the approximations of the fractional derivatives. In Section 5, we develop two numerical schemes and present two illustrative examples to demonstrate the validity and applicability of the suggested approaches. Finally, in Section 6, we provide a brief conclusion and some final remarks.

Fractional Derivatives and Integrals
Definition 1. Let : [ , ] → R be a function, let > 0 be a real number, and let = ⌈ ⌉, where ⌈ ⌉ denotes the smallest integer greater than or equal to . The left (left RLFI) and right (right RLFI) Riemann-Liouville fractional integrals are defined by The left (left RLFD) and right (right RLFD) Riemann-Liouville fractional derivatives are given according to Moreover, the left (left CFD) and right (right CFD) Caputo fractional derivatives are defined by means of ( ) The relation between the right RLFD and the right CFD is as follows [13]: Further, it holds where N 0 = {0, 1, 2, . . .}. We recall that, for ∈ N, the Caputo differential operator coincides with the usual differential operator of integer order. For more details on the fractional derivatives definitions and their properties, we refer the reader to [3,8,14,15].

Shifted Chebyshev Polynomials.
The well-known Chebyshev polynomials are defined on the interval [−1, 1] and can be determined by the following recurrence formula [16]: The analytic form of the Chebyshev polynomials ( ) of degree is as follows: where ⌊ ⌋ denotes the biggest integer less than or equal to . The orthogonality condition reads In order to use these polynomials on the interval We note that (10) implies that * (0) = (−1) , * ( ) = 1. Further, it is easy to see that the orthogonality condition reads with the weight function ( ) = 1/ √ − 2 , ℎ = ( /2) , can be expressed in terms of shifted Chebyshev polynomials as where the coefficients are given by The Scientific World Journal 3
Theorem 2 (see [8]). If ( , , ) is a minimizer of (14a)-(14c), then there exists an adjoint state for which the triple ( , , ) satisfies the optimality conditions Remark 3. Under some additional assumptions on the objective functional and the right-hand side , for example, convexity of and linearity of in and , the optimality conditions (15a)-(15c) are also sufficient.

Numerical Approximations
In this section, we provide numerical approximations of the left CFD and the right RLFD using Chebyshev polynomials. We choose the grid points to be the Chebyshev-Gauss-Lobatto points associated with the interval [0, ]; that is, Clenshaw and Curtis [12] introduced an approximation of the function . We reformulate it to be used with respect to the shifted Chebyshev polynomials as follows: Here, the summation symbol with double primes denotes a sum with both first and last terms halved.

Approximation of the Left CFD.
In the sequel, some basic results for the approximation of the fractional derivative 0 ( ) are given.
An upper bound for the error in the approximation of the fractional derivative 0 of the function is given as follows.
Theorem 5 (see [18]). Let 0 ( ) be the approximation of the fractional derivative 0 of the function as given by (19). where The Scientific World Journal 4.2. Approximation of the Right RLFD. Let be a sufficiently smooth function in [0, ] and let ( ; ) be defined as follows: From (3) and (4), we deduce that We approximate ( ), 0 ≤ ≤ , by a sum of shifted Chebyshev polynomials (2 / − 1) according to Proof. Let ( ) − ( ) be expanded in a Taylor series at = : Then, The assertion follows, if we choose with an arbitrary constant 0 ( ).
In view of (27), we have Moreover, ( ) can be approximated by means of We express −1 ( ) in (31) by a sum of Chebyshev polynomials and provide the recurrence relation satisfied by the Chebyshev coefficients. Differentiating both sides of (27) with respect to yields To evaluate −1 ( ) in (31), we expand −1 ( ) in terms of the shifted Chebyshev polynomials as where the summation symbol with one prime denotes a sum with the first term halved. Integrating both sides of (35) gives where −1 = = 0. On the other hand, we have By using the relation +1 ( ) + −1 ( ) = 2 ( ) and (35), it follows that The Scientific World Journal 5 where −1 = 1 . Let Inserting −1 ( ) − −1 ( ) and ( − ) −1 ( ) as given by (36) and (38) into (34) and taking (39) into account, we get The Chebyshev coefficients of ( ) as given by (39) can be evaluated by integrating (39) and comparing it with (25): with starting values = +1 = 0, where are the Chebyshev coefficients of ( ).

Numerical Results
In this section, we develop two algorithms (Algorithms A and B) for the numerical solution of FOCPs and apply them to two illustrative examples.
The exact solution is given by ) .

(43)
Algorithm A. The first algorithm for the solution of (42a)-(42c) follows the "optimize first, then discretize" approach. It is based on the necessary optimality conditions from Theorem 2 and implements the following steps.
Step 3.1. In order to solve (46a) by the Chebyshev expansion method, use (18) to approximate . A collocation scheme is defined by substituting (18) Consequently, it remains to compute the two unknowns ( 0 ), ( ). This can be done by using any two points , ∈ ]0, 1[ which differ from the Gauss-Lobatto nodes and satisfy (46a). We end up with two equations in two unknowns: Step 3.2. In order to solve (46b) by the Chebyshev expansion method, we use (18) to approximate . A collocation scheme is defined by substituting (18) where 1 , and , are defined in (20). By using the boundary conditions, we have ( 0 ) = 0 and ( ) = 2/Γ(3 + ). The system (49) represents −1 algebraic equations which can be solved for the unknown coefficients ( 1 ), ( 2 ), . . . , ( −1 ). Figures 1, 2, 3, and 4 display the exact and approximate state and the exact and approximate control for = 1/2 and = 2, 3. Table 1 contains the maximum errors in the state and in the control for = 2, = 3, and = 5.  Algorithm B. The second algorithm follows the "discretize first, then optimize" approach and proceeds according to the following steps.
Step 3. Use = (1/2)( + 1) to transform (51) to (52) Step 4. Use the Clenshaw and Curtis formula [12] to approximate the integral (52) as a finite sum of shifted Chebyshev polynomials as follows: Step 5. According to the Rayleigh-Ritz method, the critical points of the objective functional (42a) are given by = 0, . . . , which leads to a system of nonlinear algebraic equations. Solve this system by Newton's method to obtain ( 1 ), ( 2 ), . . . , ( −1 ) and use the boundary conditions to get ( 0 ), ( ). Then, the pair ( , ) which solves the FOCP has the form Figures 5, 6, 7, and 8 display the exact and approximate state and the exact and approximate control for = 1/2 and = = 2, 3. Table 2 contains the maximum errors in the state and in the control for = = 2, = = 3, and = = 5.
A comparison of Tables 1 and 2 reveals that both algorithms yield comparable numerical results which are more accurate than those obtained by the algorithm used in [8].   Table 3 Alg .
We note that, for Example 2, the optimality conditions stated in Theorem 2 are also sufficient (cf. Remark 3). Table 3 contains a comparison between the maximum error in the state and in the control for Algorithms A and B.
As opposed to Example 1, in this case, Algorithm A performs substantially better than Algorithm B.

Conclusions
In this paper, we have presented two algorithms for the numerical solution of a wide class of fractional optimal control problems, one based on the "optimize first, then discretize" approach and the other one on the "discretize first, then optimize" strategy. In both algorithms, the solution is approximated by -term truncated Chebyshev series. Numerical results for two illustrative examples show that the algorithms converge as the number of terms is increased and that the first algorithm is more accurate than the second one.
The Scientific World Journal 9