Spectral tau algorithm for solving a class of fractional optimal control problems via Jacobi polynomials

Article History: Received 21 January 2017 Accepted 06 March 2018 Available 11 April 2018 This paper is dedicated to presenting an efficient numerical algorithm for solving a class of fractional optimal control problems (FOCPs). The basic idea behind the suggested algorithm is based on transforming the FOCP under investigation into a coupled system of fractional-order differential equations whose solutions can be expanded in terms of the Jacobi basis. With the aid of the spectral-tau method, the problem can be reduced into a system of algebraic equations which can be solved via any suitable solver. Some illustrative examples and comparisons are presented aiming to demonstrate the accuracy, applicability and efficiency of the proposed algorithm.


Introduction
Fractional calculus is of course a very important branch of mathematical analysis.This branch of calculus is interested in generalizing the derivatives and integrals of integer order to include derivatives and integrals of an arbitrary order (real or complex).A large number of authors investigate fractional derivatives from both theoretical and practical points of view (see, for example, [1][2][3][4]).It is well-known that many physical phenomena in acoustics, damping laws, electroanalytical chemistry, neuron modeling, diffusion processing and material sciences (see for example, [5][6][7]) are described by fractional differential equations.Various algorithms are developed for handling different kinds of fractional differential equations.Some of these methods are, Adomian decomposition method [7,8], variational iteration method [9] and fractional differential transform method [10,11] and ultraspherical wavelets method [12].
Optimal control problems arise in various applied sciences such as mechanics, aerospace engineering, and economics.The exact solutions for most of these problems are not easy to implement, so it is natural to try to derive numerical solutions for such problems.The general definition of an optimal control problem requires the minimization of a criterion function of the states and control inputs of the system over a set of admissible control functions.This system is governed by constrained dynamics and control variables.Additional constraints such as final time constraints can be considered, see for example [13,14].
Spectral and pseudospectral methods have become increasingly popular as higher order methods for the solution of various differential equations represent the solution of a certain problem in a basis set of orthogonal functions.The main advantage of these methods is that they can provide exponential convergence of the solutions.These methods are employed for solving many problems appear in various branches of science such as *Corresponding Author physics, chemistry and fluid mechanics.One can consult the monographs by Shen et al. [15], the books by Kopriva [16], and Shizgal [17] for some of these applications.There are three popular techniques for spectral methods, they are Galerkin, tau and collocation methods.Every method has its importance.The Galerkin approach requires to select suitable basis functions satisfying the boundary conditions and then enforcing the residual to be orthogonal with the basis functions.This method has been applied in a variety of papers.It has has been successfully applied to linear problems, see for example [18,19].The collocation method is a suitable approach for treating nonlinear problems, see for example [20][21][22][23].The tau method is a particular class of Petrov-Galerkin method.This method is often used for problems contain complicated boundary conditions.
Orthogonal polynomials in general and Jacobi polynomials in particular have distinguished parts in applied mathematical analysis.It is wellknown that the class of the Jacobi polynomials includes six subclasses of orthogonal polynomials, namely, Legendre, ultraspherical and the four kinds of Chebyshev polynomials.The Jacobi polynomials and their special polynomials are extensively used along with spectral methods for solving ordinary and fractional differential equations, see for instance [24][25][26][27][28][29].
This paper introduces a general numerical algorithm for a class of FOCPs.A FOCP is an optimal control problem in which the criterion and/or the differential equations governing the dynamics of the system contain at least one fractional derivative operator.
FOCP can be described by different definitions of fractional derivatives.The most commonly used types of fractional derivatives are Riemann-Liouville and Caputo fractional derivatives.General necessary conditions of optimality have been developed for FOCPs.For instance, in [9,11], the author has achieved Hamiltonian formulas for FOCPs with Riemann-Liouville fractional derivative, while the author in [30] has achieved some formulas with Caputo fractional derivative.Hamiltonian system of equations provides necessary conditions of optimization.The optimal solution of the FOCP should satisfy the system [31].
The main aim of this article is twofold: • Reformulating fractional optimal control problem to a coupled system of fractionalorder differential equations.• Analyzing efficient spectral-tau algorithm for handling the resulting system of fractional-order differential equations via Jacobi polynomials.
The rest of the paper is arranged as follows.
The next section is devoted to presenting mathematical preliminaries containing some basic definitions in the fractional calculus theory which are required for establishing our results.Also, some relevant properties of Jacobi polynomials and their shifted ones are presented.In Section 3, we present an efficient spectral tau algorithm for solving FOCPs.In Section 4, we give some numerical examples to ensure the efficiency, simplicity and applicability of the suggested algorithm.Finally, Section 5 is devoted to presenting concluding remarks.

Preliminaries
This section is devoted to presenting some basic definitions and properties in fractional calculus.
In addition, some relevant properties of Jacobi polynomials and their shifted ones are presented.

Some definitions and properties of fractional calculus
Definition 1.The Riemann-Liouville fractional integral operator I α of order α on the usual Lebesgue space L 1 [0, 1] is defined as The operator I α has the following properties: (i) Definition 2. The Riemann-Liouville fractional derivative of order α > 0 is defined by Definition 3. The Caputo fractional left and right differential operators are defined respectively as The Caputo fractional differential operator satisfies the following basic formula, for n−1 α < n, For more details on the mathematical properties of fractional derivatives and integrals, see for example, [3].

Classical Jacobi polynomials
For γ, δ ∈ R, γ, δ > −1, and a nonnegative integer n, we denote by P (γ,δ) n (x) the Jacobi polynomial, which comprises all the polynomial solutions to singular Sturm-Liouville problems on (−1, 1).P (γ,δ) n (x) has the following Gauss hypergeometric representation: The Jacobi polynomials are orthogonal on [−1, 1] with the wight function where, and δ mn is the well-known kronecker delta function.These polynomials are eigenfunctions of the following singular Sturm-Liouville equation Also, Jacobi polynomials may be generated by means of Rodrigue's formula The polynomials, namely the ultraspherical, Legendre, first, second, third and fourth kinds Chebyshev polynomials, can be deduced as special cases of the Jacobi polynomials as shown in Table 1.
Table 1.Special cases of Jacobi polynomials.

Ultraspherical polynomials C
Chebyshev polynomials of first kind Note that in this table, the symbol (a) n is the Pochhammer symbol, (a For more details about Jacobi polynomials, one can see [32][33][34].

Shifted Jacobi polynomials
In order to use the Jacobi polynomials on the interval [0, 1], we define the so-called shifted Jacobi polynomials by introducing the change of variable t = 2x − 1.Let the shifted Jacobi polynomials P (γ,δ) n (2x − 1) be denoted by ρ (γ,δ) n (x).Then ρ (γ,δ) n (x) can be obtained as follows: The shifted Jacobi Polynomials ρ (γ,δ) n (x) has the orthogonality relation The following special values will be of important use later A function f (t) defined over [0, 1] may be expanded in terms of the shifted Jacobi polynomials as where, The following theorem gives the differentiation and integration formulae of ρ Theorem 1. [35] The differentiation and integration of ρ (γ,δ) i (t) are given by the following formulae:

Numerical treatment for FOCP
In this section, we are interested in the reformulation of the fractional optimal control problem.
In addition, we introduce numerical solutions for the proposed FOCP.

FOCP reformulation
The fractional optimal control problem (FOCP) can be defined as follows.Find the optimal control u(t) for a fractional dynamical system (FDS) that minimizes the performance index subject to the dynamical system subject to the initial condition where x(t) is the state variable, t represents the time, F and G are two arbitrary functions and X i are real known constants.The necessary optimality conditions (see, [30]) of FOCP (13-15) leads to and The necessary conditions for the optimality of the FOCP considered are those given in (16)(17)(18)(19).These equations are similar to the Euler-Lagrange equations for classical optimal control problems except that the resulting differential equations contain the left and the right fractional derivatives.Moreover, the derivation of these equations is very similar to the derivation for an optimal control problem containing integral order derivatives.Determination of the optimal control for the fractional system requires solution of Eqs. ( 16)-( 19).

Numerical algorithm for FOCP
In this section, we are concerned with the numerical solutions of the coupled system of equations ( 16)- (19), by applying shifted Jacobi tau method.First, we use Eq. ( 18), to eliminate u(t) from Eqs. ( 16) and ( 17) to obtain a system of coupled fractional order differential equations of the form: subject to We approximate x(t), λ(t) as follows Now we can compute the residual of Eqs. ( 20) and ( 21) as follows: The application of the typical tau method yields The derivative and integral formulae of shifted Jacobi polynomials in ( 11) and ( 12) enable one to reduce the integrals in ( 27) and ( 28) into a set of algebraic equations in the unknown expansion coefficients.Moreover, the use of the initial conditions along with the identities ( 8) and ( 9) yield Eqs. ( 27)-( 30) generate a system of (N + M ) algebraic equations in the expansion coefficients, a i and b i , which can be solved with the aid of the well-known Newton's iterative method.

Numerical results and discussion
In this section, the spectral-tau Jacobi algorithm (STJA) is employed for handling some FOCPs accompanied with some comparisons hoping to demonstrate the efficiency and applicability of the proposed algorithm.
Example 1.Consider the following minimization problem [31]: with the exact solution x(t) u(t) = t 2 t 3 .This solution minimizes the performance index J, and the minimum value is µ = 0. Applying the procedures explained in Section 3, we get the following coupled system: x(0) = 0, λ(1) = 1.
If we apply STJA with N = M = 4, then we have Now the residuals of (31), ( 32) can be written in the following formulae The application of tau method yields Moreover, the initial conditions lead to the following two equations: The system in (38)-(41) can be solved to give , a 3 = 0, Hence Finally, and based on Eq. (18), we get which are the exact solutions.
Example 2. Consider the following FOCP (see, [31]): 9Γ( 910 ) − t 4 .This solution minimizes the performance index J and the minimum value is µ = 0.In Table 2, we introduce the maximum absolute error |u − u M | by using STJA for various choices of N, M, γ and δ.
Remark 1.It is worthy to note that the best error obtained here is 3.28 .10 −17 for (N, M ) = (5,5) and (γ, δ) = (− 1 2 , 1 2 ), while the best error obtained in [31] is 7.03 .10 −8 , for (M, N ) = (8,9).Example 3. Consider the following time invariant FOCP: Find the control function u(t) which minimizes the performance index (see, [9]): The exact solution for this problem in case α = 1, is where In Figure 1, we illustrate the exact solution in case of α = 1, and the STJA solution for the case corresponds to (N, M ) = (7, 7), (γ, δ) = (− 1 2 , 1 2 ) (Chebyshev third kind case) and different values of α. Figure 1 shows the state and the control variables, respectively, as a function of time.From this figure it is clear that both the state and the control variables is close to the solution in the integral value of α as expected.
Example 4. Consider a linear time varying system with the same performance index and the same initial condition as those considered in Example 3, except in this example, the system is subjected to the following dynamic constraint: the exact solution for this problem in case α = 1, is , where c 1 = tan(1).In Figure 2, we illustrate the exact solution in case of α = 1, and the STJA solution for the case corresponds to (N, M ) = (8, 8), (γ, δ) = ( 12 , − 1 2 ) (Chebyshev fourth kind case) and different values of α. Figure 2 shows the state and the control variables, respectively, as a function of time.From this figure it is clear that both the state and the control variables is close to the solution in the integral value of α as expected.
Example 5. Consider the following nonlinear FOCP (see, [36]): The exact solution for this problem is 2 ) , minimizes the performance index J and the minimum value is 1  2 (e 2 − 1) ≈ 3.1945280494653251.In Table 3, we introduce the maximum absolute error

Concluding Remarks
In this paper, we presented an efficient numerical algorithm for some spectral solutions of a class of fractional optimal control problems.The proposed numerical solutions are expressed as expansions of Jacobi polynomials.The celebrated spectral tau method is utilized for this purpose.The numerical tests clarify that our method is applicable and it is more accurate than some other methods in literature.

Table 2 .
Maximum absolute error of Example 2.