1. Introduction
Fractional calculus has emerged as a powerful mathematical framework for modeling systems with memory, hereditary characteristics, and anomalous diffusion phenomena that cannot be accurately represented using classical integer-order differential equations. Unlike conventional models, fractional differential equations (FDEs) incorporate nonlocal operators that account for the historical evolution of a process, thereby providing more realistic descriptions of complex dynamical systems arising in science and engineering [
1,
2,
3]. Due to their ability to capture memory-dependent behavior, fractional models have found extensive applications in viscoelastic materials, biological systems, diffusion and transport processes, porous media, and many other areas of science and engineering [
4,
5]. Over the last few decades, significant progress has been made in the theoretical analysis, modeling, and numerical approximation of fractional differential equations. Important advances include the development of existence and uniqueness theories, stability analyses, and efficient numerical algorithms for fractional differential equations [
6,
7]. In addition, novel fractional models have been proposed to describe complex physical phenomena, including wave propagation in lossy media and anomalous transport in heterogeneous systems [
8,
9]. Nevertheless, the nonlocal structure of fractional operators substantially increases the analytical and computational complexity of the resulting mathematical models.
The fractional optimal control problems (FOCPs) have emerged from the integration of fractional calculus and control theory, providing a more realistic framework for modeling dynamical systems with memory and hereditary properties. Unlike classical optimal control models, FOCPs allow the control process to depend not only on the current state of the system but also on the entire history of its evolution. Consequently, substantial progress has been made in the formulation of fractional optimal control theory, including the development of Hamiltonian frameworks and necessary optimality conditions [
10,
11]. In addition, important advances have been achieved in the existence theory of optimal solutions and the controllability analysis of fractional dynamical systems [
12,
13]. Recent advances in fractional control theory have addressed challenging problems such as controllability of tempered Caputo fractional systems, finite-time control of time-delay fractional-order systems, and state-constrained control using barrier Lyapunov function techniques [
14,
15,
16].
These developments further demonstrate the broad applicability of fractional dynamical systems and motivate the development of efficient computational methods for fractional optimal control problems. In particular, FOCPs have attracted considerable attention in engineering systems, diffusion processes, distributed parameter systems, and dynamical control applications. Furthermore, optimal control problems governed by semilinear fractional differential equations with non-instantaneous impulses have also been investigated, thereby enriching the theoretical framework and practical applicability of FOCPs [
17]. In parallel, a variety of numerical approaches have been developed for solving FOCPs, including spectral methods, operational matrix techniques, and polynomial approximation schemes. Early studies employed operational matrix and spectral-based techniques to construct efficient numerical algorithms for fractional optimal control problems [
18,
19]. More recently, these approaches have been extended to address multi-dimensional and distributed-order fractional optimal control problems using advanced polynomial approximation frameworks [
20,
21]. These methods have demonstrated considerable success in improving the accuracy and computational efficiency of numerical solutions. Nevertheless, the development of efficient and accurate numerical techniques for FOCPs remains a challenging task. In particular, the nonlocal nature of fractional derivatives requires the evaluation of historical information over the entire computational interval, which significantly increases the computational cost and memory requirements of the resulting algorithms.
Different numerical methods have been proposed to solve fractional differential equations and fractional optimal control problems. Finite difference methods, finite element methods, and robust optimization techniques have been successfully employed to analyze various classes of fractional models and optimal control systems [
22,
23,
24]. In addition, spectral methods and their variants, including spectral-Galerkin and spectral collocation approaches, have attracted considerable attention due to their high-order accuracy and excellent approximation properties for smooth solutions [
25,
26,
27,
28]. Finite difference schemes are relatively easy to implement and have been successfully applied to many fractional models, but they often require dense discretizations because of the global memory effects associated with fractional operators. Finite element and collocation methods provide additional flexibility for handling irregular geometries and complex boundary conditions, whereas operational matrix techniques transform the original problems into systems of algebraic equations, thereby reducing computational complexity. Among the existing numerical approaches, spectral methods have attracted considerable attention because of their global approximation properties, exponential convergence, and high-order accuracy for smooth solutions. The spectral approximations with the Legendre, Chebyshev and Bernstein polynomial bases have been very successful in solving fractional differential equations and optimal control problems. Recently, deep learning-based approaches have become promising tools for high-dimensional nonlinear partial differential equations and fractional models. Some notable examples are the deep Galerkin method (DGM) [
29,
30,
31], deep neural network solvers for PDEs in complex geometries, and extended physics-informed neural networks (XPINNs) based on space-time domain decomposition. However, many existing numerical and deep learning approaches still suffer from high computational cost, large memory requirements and reduced efficiency when dealing with strongly nonlinear or high dimensional fractional systems.
In recent years, machine learning and scientific machine learning-based approaches have emerged as promising alternatives for solving differential equations and optimization problems. Among these approaches, Physics-Informed Neural Networks (PINNs) have become one of the most influential paradigms in scientific computing [
32]. PINNs incorporate the governing differential equations, initial and boundary conditions, and physical constraints directly into the loss function of the neural network, enabling the network to respect the underlying mathematical model without relying heavily on labeled datasets. Different from purely data-driven methods, PINNs incorporate physical information into the training process, leading to better generalization ability and reduced dependence on labeled data. Due to their mesh-free nature and flexibility, PINNs and their variants have been successfully applied to a wide range of forward and inverse problems involving nonlinear partial differential equations and fractional differential equations [
33,
34]. Representative developments include gradient-enhanced PINNs, fractional PINNs (fPINNs), Monte Carlo fPINNs, Hermite neural solvers for time-fractional PDEs, and PINN-based frameworks for integral operator problems [
35,
36,
37]. However, many existing PINN-based approaches still suffer from limitations related to training efficiency, computational cost, and memory requirements, especially when dealing with strongly nonlinear or high-dimensional fractional systems.
Although PINNs have been very successful for classical integer-order differential equations, their direct application to fractional systems is significantly more challenging. The main issue is that the automatic differentiation, which is the computational backbone of traditional PINNs, cannot be directly extended to fractional operators since the fractional calculus does not obey the classical chain rule. Thus, the existing PINN frameworks are faced with great difficulties in approximating nonlocal fractional derivatives. To address these limitations, several neural computational frameworks have been developed by combining automatic differentiation with numerical discretization techniques for fractional operators. Simultaneously, the recent development of approximation theory has produced the generalized polynomial operators with enhanced approximation and convergence properties [
38,
39]. These developments show the power of polynomial-based approximation techniques and add further incentives for using high-order spectral approximations in the proposed Spectral-fPINN framework. Typical examples of recent advances based on PINNs are fractional PINNs for time-fractional phase-field models, PINNs for high-speed flows, PDE-constrained optimization and control, and physics-informed optimal control frameworks [
40,
41,
42,
43]. The obtained results indicate that combining machine learning techniques with classical numerical analysis can substantially improve the computational efficiency and approximation accuracy for complex fractional systems.
Among the recently proposed approaches, physics-informed spectral frameworks have shown considerable promise by combining the high-order accuracy of spectral approximations with the flexibility of neural network learning. In particular, Spectral-fPINNs employ global polynomial approximations within the PINN architecture, thereby improving convergence behavior and reducing approximation errors for smooth solutions [
44]. Furthermore, spectral methods naturally provide efficient representations of nonlocal fractional operators, making them especially attractive for fractional optimal control systems. However, despite the rapidly growing literature on PINNs and fPINNs, relatively limited attention has been devoted to the development of highly accurate spectral-fPINN formulations for fractional optimal control problems governed by Caputo fractional derivatives.
Although physics-informed neural networks, fractional PINNs, spectral neural methods, and operational-matrix-based approaches have been extensively studied in recent years, relatively limited attention has been devoted to their integration within a unified framework for fractional optimal control problems governed by Caputo fractional differential equations. The novelty of the present work is the integration of shifted Legendre spectral approximations, operational matrix representations of fractional derivatives, and physics-informed optimization into a unified computational framework for the simultaneous approximation of the state, control, and adjoint variables arising from the fractional optimality system. Unlike conventional PINN and fPINN approaches that directly approximate the solution variables, the proposed methodology employs a spectral coefficient representation that provides a compact global approximation and facilitates the efficient treatment of nonlocal fractional operators. To the best of our knowledge, such a spectral coefficient-based physics-informed framework for Caputo fractional optimal control systems has received limited attention in the existing literature.
Motivated by the above observations, the present work develops a Spectral-fPINN framework for solving a class of fractional optimal control problems governed by Caputo fractional differential equations. The proposed methodology combines the high-order approximation capability of shifted Legendre spectral techniques with the flexibility of physics-informed neural networks to construct highly accurate and computationally efficient numerical solutions. By incorporating spectral approximations directly into the physics-informed learning framework, the proposed method aims to improve convergence accuracy, enhance numerical stability, and reduce the computational complexity commonly encountered in existing fPINN formulations. The developed framework therefore provides an effective computational tool for solving complex fractional optimal control systems arising in modern scientific and engineering applications. The proposed Spectral-fPINN framework differs from existing spectral collocation and operational matrix methods in that the unknown state, control, and costate variables are not obtained through direct discretization and solution of the resulting algebraic system. Instead, the spectral coefficients are determined through physics-informed neural network optimization. Compared with conventional PINNs and fPINNs, the proposed approach employs a global shifted Legendre spectral representation and fractional operational matrices, allowing the fractional derivatives to be evaluated analytically at the coefficient level. This substantially reduces the number of trainable parameters while preserving spectral accuracy. Furthermore, the framework is specifically developed for fractional optimal control problems and is supported by approximation, consistency, stability, and convergence analyses.
The remaining part of this paper is organized as follows.
Section 2 presents the preliminary concepts and fundamental definitions related to fractional calculus and fractional optimal control problems.
Section 3 introduces the mathematical formulation of the considered fractional optimal control problem together with the proposed Spectral-fPINN methodology, including the spectral approximation framework, neural network architecture, operational matrix formulation, and construction of the physics-informed loss function.
Section 4 is devoted to the theoretical analysis of the proposed framework, where approximation, consistency, stability, convergence, and error estimates are established.
Section 5 presents several numerical examples to demonstrate the accuracy, efficiency, and robustness of the proposed approach. Finally, concluding remarks and possible future research directions are given in
Section 6.
5. Results and Discussion
The proposed Spectral-fPINN framework is tested on several benchmark fractional optimal control problems to investigate its accuracy, stability, and computational efficiency. The numerical performance is assessed through error measurements, residual evaluations, spectral coefficient decay, and graphical comparisons with the corresponding analytical solutions.
5.1. Example 1
We first consider a classical integer-order optimal control problem corresponding to the limiting case . Although the governing equation does not explicitly involve a fractional derivative, this example serves as a benchmark for validating the accuracy, stability, and consistency of the proposed Spectral-fPINN framework before applying it to genuinely fractional optimal control problems.
Consider the following optimal control problem:
subject to
The exact solution is given by
where
The corresponding exact objective value is
. We employ the proposed Spectral-fPINN framework to solve this problem using normalized shifted Legendre polynomial approximations together with physics-informed optimization. The numerical results are summarized in
Table 1 and
Table 2 and the corresponding state, control and costate approximations are presented in
Figure 2. The reported errors are calculated on an independent set of test points and provide a measure for the actual approximation errors with respect to the analytical solution. The residual quantities represent the degree to which the computed solution satisfies the governing optimality system.
The numerical results presented in
Table 1 and
Table 2 demonstrate that the proposed Spectral-fPINN framework yields highly accurate approximations for the state, control and costate variables. The computed objective functional is in good agreement with the exact value with an absolute error of order
. Furthermore, the residual norms for the state equation, costate equation and stationarity condition are small, which implies that the computed solution satisfies the optimality system accurately.
Figure 2a–c displays the exact and approximate state, control and costate variables respectively, with excellent agreement over the computational interval. The pointwise absolute errors in
Figure 2d are uniformly small and the residual profiles in
Figure 2e remain close to zero in the whole domain. The evolution of loss components is depicted in
Figure 2f, showing a stable convergence of the optimization process. Moreover, the fast decay of the spectral coefficients in
Figure 2g and the spectral energy distributions in
Figure 2h confirm the high-order accuracy, compactness and computational efficiency of the normalized shifted Legendre representation.
Overall, this example demonstrates that the proposed Spectral-fPINN framework provides a reliable and accurate approach for solving optimal control problems and serves as a solid foundation for the subsequent fractional-order examples.
5.2. Example 2
In this example, we consider a fractional optimal control problem involving a Caputo fractional derivative of order in order to assess the ability of the proposed Spectral-fPINN framework to accurately approximate fractional dynamics and optimal control variables.
Consider
subject to
The exact solutions are
and
The proposed Spectral-fPINN framework is employed using normalized shifted Legendre polynomial approximations together with physics-informed optimization. The numerical results are summarized in
Table 3 and
Table 4, while
Figure 3 presents the corresponding state, control, and fractional derivative approximations. The reported errors are computed using an independent set of test points and measure the actual approximation errors with respect to the analytical solutions, whereas the residual quantities assess the satisfaction of the governing fractional optimality system.
The numerical results reported in
Table 3 and
Table 4 show that the proposed Spectral-fPINN framework yields highly accurate approximations for the state, control and fractional derivative variables. The computed objective functional matches very well the exact value with an absolute error of order
. The residual norms are also small, which verifies that the computed solution satisfies the governing fractional optimality system with high accuracy. Moreover, the training history shows stable optimization behavior with the increase in the penalty parameter.
Figure 3a–c presents the comparison of the exact and approximate state, control and fractional derivative variables, respectively. In all cases, the numerical solutions are in excellent agreement with the respective analytical solutions over the entire computational interval. The pointwise absolute errors in
Figure 3d are uniformly small, which confirms the high approximation accuracy and spectral convergence of the proposed method. The residual errors corresponding to the governing equations are shown in
Figure 3e.
It is observed that the residual errors are close to zero in the entire domain. The evolution of the loss components shown in
Figure 3f suggests that the optimization process converges stably. The fast decay of the spectral coefficients in
Figure 3g indicates the high-order approximation capability of the normalized shifted Legendre basis, and the spectral energy distributions in
Figure 3h demonstrate that most of the solution energy is concentrated in the lower-order modes. These observations confirm the computational efficiency and compactness of the proposed spectral representation.
Overall, this example demonstrates that the proposed Spectral-fPINN framework provides an accurate, stable, and computationally efficient approach for solving fractional optimal control problems involving fractional-order dynamical systems.
5.3. Example 3
In this example, we consider a fractional optimal control problem involving a higher-order Caputo derivative of order . This example assesses the ability of the proposed Spectral-fPINN framework to approximate higher-order fractional dynamics and the corresponding optimal control variables.
The exact solutions are
and
Hence, the exact objective value is .
The proposed Spectral-fPINN framework is applied using normalized shifted Legendre polynomial approximations and physics-informed optimization. The numerical results are summarized in
Table 5 and
Table 6, while
Figure 4 presents the corresponding graphical comparisons. The reported errors are evaluated on an independent set of test points with respect to the analytical solutions, whereas the residual quantities measure the satisfaction of the governing fractional optimality system.
The numerical results reported in
Table 5 and
Table 6 demonstrate that the proposed Spectral-fPINN framework provides highly accurate approximations for this higher-order fractional optimal control problem. The computed objective functional is in excellent agreement with the exact value, with an absolute error of order
. The residual norms are also small, confirming that the computed solution satisfies the governing fractional optimality system with high accuracy. Furthermore, the training history exhibits stable optimization behavior as the penalty parameter increases.
Figure 4a–c compares the exact and approximate state, control, and fractional derivative variables, respectively. In all cases, the numerical solutions closely match the corresponding analytical solutions throughout the computational interval, demonstrating the ability of the proposed framework to accurately capture higher-order fractional dynamics. The pointwise absolute errors shown in
Figure 4d remain uniformly small, confirming the high approximation accuracy and spectral convergence of the method.
The residual errors shown in
Figure 4e are also close to zero over the entire computational domain, providing further evidence that the computed solution indeed satisfies the governing fractional optimality system. The evolution of the loss components in
Figure 4f shows the stable convergence of the optimization process. Moreover, the fast decay of the spectral coefficients, as shown in
Figure 4g, reveals the high-order approximation capability of the normalized shifted Legendre basis. The distributions of the spectral energy in
Figure 4h show that most of the solution energy is concentrated in the low-order modes. These observations confirm the compactness and computational efficiency of the proposed spectral representation.
Overall, this example demonstrates that the proposed Spectral-fPINN framework provides an accurate, stable and computationally efficient approach for solving fractional optimal control problems involving higher-order fractional dynamics.
5.4. Example 4
In this example, we consider a nonlinear fractional optimal control problem involving a Caputo derivative of order . This example is intended to assess the ability of the proposed Spectral-fPINN framework to solve nonlinear fractional optimal control problems with smooth analytical solutions.
The exact solutions are
and
Hence, the exact objective value is
The proposed Spectral-fPINN framework is employed using normalized shifted Legendre polynomial approximations together with physics-informed optimization. The numerical results are summarized in
Table 7 and
Table 8, while
Figure 5 presents the corresponding graphical comparisons. The reported errors are evaluated on an independent set of test points with respect to the analytical solutions, whereas the residual quantities measure the satisfaction of the governing nonlinear fractional optimality system.
The numerical results in
Table 7 and
Table 8 show that the proposed Spectral-fPINN framework can produce very accurate approximations for this nonlinear fractional optimal control problem. The computed objective functional is very close to the exact value and the residual norms are small, which confirms that the computed solution is a high accuracy solution of the governing nonlinear fractional optimality system. Moreover, the training history indicates stable optimization behavior for the increasing penalty parameter. The comparison of the exact and approximate variables of the state, control and fractional derivative are shown in
Figure 5a–c. The numerical solutions in all cases are in good agreement with the corresponding analytical solutions over the computational interval, which demonstrates the ability of the proposed framework to capture nonlinear fractional dynamics accurately. The pointwise absolute errors in
Figure 5d are uniformly small, which further verifies the high approximation accuracy and spectral convergence of the method.
Finally, the residual errors shown in
Figure 5e remain uniformly close to zero throughout the computational domain, further validating that the computed solution satisfies the governing fractional optimality system. The evolution of the loss components in
Figure 5f indicates a stable convergence of the optimization process. Moreover, the fast decay of the spectral coefficients displayed in
Figure 5g indicates that the normalized shifted Legendre basis has the high-order approximation capability. The spectral energy distributions in
Figure 5h show that most of the solution energy is concentrated in the lower-order modes. These results verify the compactness and computational efficiency of the proposed spectral representation.
Overall, this example demonstrates that the proposed Spectral-fPINN framework provides an accurate, stable, and computationally efficient approach for solving nonlinear fractional optimal control problems. The conditioning of the fractional operational matrices generally deteriorates as the spectral order N increases, which is a common feature of global spectral discretizations. In the present work, moderate values of N are employed, and the numerical experiments demonstrate stable convergence without noticeable loss of accuracy. For very large spectral orders, preconditioning and matrix-scaling strategies may be beneficial to further improve numerical robustness.
All numerical experiments were performed in MATLAB R2023b using double-precision arithmetic. The Spectral-fPINN framework employs a fully connected feed-forward neural network with four hidden layers and 40 neurons per hidden layer. The hyperbolic tangent activation function is used throughout the hidden layers. Network parameters are initialized using the Xavier (Glorot) initialization strategy. The trainable parameters are optimized using the Adam optimizer with an initial learning rate of
, combined with an exponential learning-rate decay strategy. Full-batch training is employed, where all Gauss–Legendre collocation points are used simultaneously in the loss evaluation. The optimization process is terminated when either the loss function becomes smaller than
or the gradient norm falls below
. No additional regularization techniques are applied. For all numerical examples, a penalty continuation strategy is adopted using
where the optimized parameters obtained at one penalty level are used as the initial guess for the subsequent level. All computations were performed on a 64-bit Windows workstation equipped with an Intel Core i7-1255U processor, 16 GB RAM, and an NVIDIA GeForce RTX 2050 GPU.