In this paper, an efficient and accurate computational method based on the hat functions
(HFs) is proposed for solving a class of fractional optimal control problems (FOCPs). In
the proposed method, the fractional optimal control problem under consideration is reduced
to a system of nonlinear algebraic equations which can be simply solved. To this end, the
fractional state and control variables are expanded by the HFs with unknown coefficients.
Then, the operational matrix of fractional integration of the HFs with some properties of
these basis functions are employed to achieve a nonlinear algebraic equation, replacing the
performance index and a nonlinear system of algebraic equations, replacing the dynamical
system in terms of the unknown coefficients. Finally, the method of constrained extremum is
applied, which consists of adjoining the constraint equations derived from the given dynamical
system to the performance index by a set of undetermined Lagrange multipliers. As a result, the
necessary conditions of optimality are derived as a system of algebraic equations in the unknown
coefficients of the state variable, control variable and Lagrange multipliers. Furthermore, the
efficiency of the proposed method is shown for some concrete examples. The results reveal that
the proposed method is very accurate and efficient.
 N. H. Sweilam and T. M. Al-Ajami, Legendre spectral-collocation method for solving some
types of fractional optimal control problems, Journal of Advanced Research, vol. 6 (2015),
 A. Lotfi, M. Dehghan and S. A. Yousefi, A numerical technique for solving fractional optimal
control problems, Computer and mathematics with applications, vol. 62 (2011), pp. 1055-1067.
 T. L. Guo, The necessary conditions of fractional optimal control in the sense of caputo, J.
Optim Theory Appl, vol. 156 (2013), pp. 115-126.
 O. P. Agrawal, A formulation and numerical schem for fractional optimal control problems, J.
Vib. control, vol. 13 (2007), pp. 1291-1299.
 A. Lotfi and S. Yousefi, A numerical technique for solving a class of fractional variational
problems, J. Comput. Appl. Math., vol. 237 (2013), pp. 633-643.
 A. Lotfi, S. Yousefi and M. Dehghan, Numerical solution of a class of fractional optimal control
problems via the legendre orthonormal basis combined with the operational matrix and the gauss
quadrature rule, Journal of Computational and Applied Mathematics, vol. 250 (2013), pp. 143-
 O. M. P. Agrawal, M. M. Hasan and X. W. Tangpong, A numerical scheme for a class of
parametric problem of fractional variational calculus, J. Comput. Nonlinear Dyn., vol. 7 (2012),
 R. Almedia and D. F. M. Torres, Necessary and sufficient conditions for the fractional calculus
of variations with caputo derivatives, Commun. Nonlinear Sci. Numer. Simul, vol. 16 (2011),
 R. Almedia and D. F. M. Torres, Calculus of variations with fractional derivatives and frac-
tional integrals, Appl. Math. Lett, vol. 22 (2009), pp. 1816-1820.
 O. M. P. Agrawal, A general finite element formulation for fractional variational problems, J.
Math. Anal. Appl., vol. 337 (2008), pp. 1-12.
 S. Djennounea and M. Bettaye, Optimal synergetic control for fractional-order systems, Auto-
matica, vol. 49 (2013), p. 2243.
 R. Toledo-Hernandez, V. Rico-Ramirez, R. Rico-Martinez, S. Hernandez-Castro and U. M.
Diwekar, A fractional calculus approach to the dynamic optimization of biological reactive sys-
tems. part ii: Numerical solution of fractional optimal control problems, Chemical Engineering
Science, vol. 117 (2014), pp. 239-247.
 R. Kamocki, On the existence of optimal solutions to fractional optimal control problems,
Applied Mathematics and Computation, vol. 235 (2014), pp. 94-104.
 G. M. Mophoua and G. M. Niguerekata, Optimal control of a fractional diffusion equation with
state constraints, Computers and Mathematics with Applications, vol. 62 (2011), pp. 1413-
 M. Abedini, M. A. Nojoumian, H. Salarieh and A. Meghdari, Model reference adaptive control
in fractional order systems using discrete-time approximation methods, Commun Nonlinear
Sci Numer Simulat, vol. 25 (2015), pp. 27-40.
 Z. D. Jelicic and N. Petrovacki, Optimality conditions and a solution scheme for fractional
optimal control problems, Struct Multidisc Optim, vol. 38 (2009), pp. 571-581.
 A. Lotfi and S. A. Yousefi, Epsilon-ritz method for solving a class of fractional constrained
optimization problems, J. Optim Theory Appl, vol. 163 (2014), pp. 884-899.
 F. Jarad, T. Abdeljawad and D. Baleanu, Fractional variational optimal control problems with
delayed arguments, m Nonlinear Dyn, vol. 62 (2010), pp. 609-614.
 A. H. Bhrawy, E. H. Doha, J. A. T. Machado and S. Ezz-Eldien, An efficient numerical scheme
for solving multi-dimensional fractional optimal control problems with a quadratic performance
index, Asian Journal of Control, DOI: 10.1002/asjc.1109, 2015.
 A. Bhrawy, T. Taha and J. A. T. Machado, A review of operational matrices and spectral
techniques for fractional calculus, Nonlinear Dynamics, vol. 81 (2015), pp. 1023-1052.
 S. Ezz-Eldien, E. Doha, D. Baleanu and A. Bhrawy, A numerical approach based on Legendre
orthonormal polynomials for numerical solutions of fractional optimal control problems, Journal
of Vibration and Control, DOI: 10.1177/1077546315573916, 2015.
 A. Bhrawy, E. Doha, D. Baleanu, S. Ezz-Eldien and M. Abdelkawy, An accurate numerical
technique for solving fractional optimal control problems, Proc. Rom. Acad. A, vol. 16(1)
(2015), pp. 47-54.
 I. Podlubny, Fractional Differential Equations. San Diego: Academic Press, 1999.
 M. P. Tripathi, V. K. Baranwal, R. K. Pandey and O. P. Singh, A new numerical algorithm to
solve fractional differential equations based on operational matrix of generalized hat functions,
Commun Nonlinear Sci Numer Simulat, vol. 18 (2013), pp. 1327-1340.
 M. H. Heydari, M. R. Hooshmandasl, F. M. M. Ghaini and C. Cattani, A computational method
for solving stochastic it^o-volterra integral equations based on stochastic operational matrix for
generalized hat basis functions, J. Comput. Phys., vol. 270 (2014), pp. 402-415.
 M. H. Heydari, M. R. Hooshmandasl, C. Cattani and F. M. M. Ghaini, An efficient computa-
tional method for solving nonlinear stochastic it^o integral equations: Application for stochastic
problems in physics, J. Comput. Phys., vol. 283 (2015), pp. 148-168.
 E. Babolian and M. Mordad, A numerical method for solving systems of linear and nonlinear
integral equations of the second kind by hat basis function, Comput. Math. Appl., vol. 62
(2011), pp. 187-198.
 S. Momani and Z. Odibat, Numerical approach to differential equations of fractional order, J.
Comput. Appl. Math, vol. 207 (2007), pp. 96-110.