Abstract

In this paper, a numerical method is applied to approximate the solution of variable-order fractional-functional optimal control problems. The variable-order fractional derivative is described in the type III Caputo sense. The technique of approximating the optimal solution of the problem using Lagrange interpolating polynomials is employed by utilizing the shifted Legendre–Gauss–Lobatto collocation points. To obtain the coefficients of these interpolating polynomials, the problem is transformed into a nonlinear programming problem. The proposed method offers a significant advantage in that it does not require the approximation of singular integral. In addition, the matrix differentiation is calculated accurately and efficiently, overcoming the difficulties posed by variable-order fractional derivatives. The convergence of the proposed method is investigated, and to validate the effectiveness of our proposed method, some examples are presented. We achieved an excellent agreement between numerical and exact solutions for different variable orders, indicating our method’s good performance.

1. Introduction

Nowadays, fractional calculus, a branch of mathematics that studies the properties of derivatives and integrals of noninteger order, is essential due to its increasing applications in the sciences and engineering. Particularly, mathematical modeling of phenomena based on fractional calculus has proven to exhibit more realistic behavior [14].

A mild solution for a control problem governed by fractional stochastic evolution inclusion using the Caputo derivative with nonlocal conditions was proved by Abuasbeh et al. [5] via the fixed-point theorem of convex multiple-valued maps.

In [6], Khan et al. address the issue of resilient base containment control for fractional-order multiagent systems (FOMASs) that have mixed time delays. Niazi and his colleagues [7] prove the existence of a solution for an initial value problem involving a hybrid fractional differential equation with delay.

In recent years, solving optimal control problems governed by a fractional dynamical system has become one of the most popular topics in control theory, and it has encouraged many researchers to come up with an efficient numerical approach to solving them. A new method for finding the approximate solution of fractional optimal control problems with the Caputo–Fabrizio (CF) fractional integro-differential equation is presented in [8]. This method is based on the Gegenbauer polynomials definition and utilizes the modified operational matrix of the CF-fractional derivative. In [9], Heidari and Razzaghi attempted to solve two classes of fractional optimal control problems (OCPs) with delay. Their approach involves using the Legendre–Gauss collocation method and extended Chebyshev cardinal wavelets to solve the Hamilton–Jacobi–Bellman equation numerically. Ghanbari and Razzaghi [10] have proposed a new numerical method to solve fractional optimal control problems (FOCPs). Their method is based on generalized fractional-order Chebyshev wavelets (GFOCW) and the incomplete beta function. A Fibonacci wavelet operational matrix and the Galerkin method were used by Sabermahani and Ordokhani [11] to solve fractional optimal control problems with equal and unequal constraints. In [12], authors use modified hat functions as basic functions to approximate control and state variables. The properties of these basis functions, the Caputo derivative and the Riemann–Liouville integral simplify the FOCP to nonlinear algebraic equations. For more study, see also the related works [1315].

Recently, the variable-order fractional optimal control problems have attracted the attention of many researchers. This is because variable-order fractional calculus offers greater flexibility in selecting the most appropriate order for accurately describing real-world problems. Heydari et al. [16] used a method based on the Chebyshev cardinal functions and Lagrange multipliers to reduce the problem to a system of algebraic equations. An efficient method was presented by Heydari and Avazzadeh [17] through the Legendre wavelets and their operational matrix of variable-order fractional integration in the Riemann–Liouville sense. Hassani et al. [18] examined two-dimensional variable-order fractional optimal control problems. Using the transcendental Bernstein series and extending problem variables based on these series, they transformed the optimal control problem into a simple optimization problem. Bhrawy and Zaky in [19] proposed a method using shifted Chebyshev polynomials and an operational matrix to approximate the solution of a variable-order fractional functional Dirichlet boundary value problem.

The novelty of our work lies in the fact that there is no study on the numerical solution of variable-order fractional-functional optimal control (VOFFOC) problems, and we look at this issue for the first time. The purpose of this paper is to present a numerical scheme that will be able to approximate the VOFFOC problem efficiently. Our scheme is based on the Legendre spectral collocation methods and reduces the problem into a nonlinear programming (NLP) problem.

The structure of the paper is as follows. In Section 2, some necessary preliminaries are given. In Section 3, a new direct method is described to solve the VOFFOC problems. Section 4 discusses the convergence of the proposed method. In Section 5, some numerical examples are given to show the method’s efficiency. Finally, the conclusions and suggestions are presented in Section 6.

2. Some Preliminaries

In this section, we present some basic definitions and mathematical preliminaries related to the fixed-order and variable-order fractional integrals and derivatives [20].

Definition 1. Consider the function defined on the finite interval . For fixed-order , the left and right RL fractional integrals are and and are defined by

Definition 2. Let be a function on the interval . The left and right fractional derivatives of fixed-order are denoted by and , respectively, and defined by

Definition 3. Suppose that function is defined on . The left and right Caputo fractional derivatives of of fixed-order are denoted by and , respectively, and defined by

We now present the basic concepts of variable-order fractional calculus and consider the fractional order in the derivative and integral to be a continuous function on . First, we introduce the generalization of a fixed-order fractional integral called the variable-order Riemann–Liouville integral.

Definition 4. Assuming that the continuously differentiable function is defined on . The left and right Riemann–Liouville fractional integrals of order are defined as follows:

Definition 5. Assume that is a continuously differentiable function and is a given function.(1)The type I left and right Caputo variable-order fractional derivatives (VOFDs) of of order , respectively, are defined by(2)The type II left and right Caputo VOFDs of of order , respectively, are given by(3)The type III left and right Caputo derivatives of of order , respectively, are defined by

Lemma 6 (see [20]). Let for where . Then,

In this paper, we will focus on the type III Caputo VOFDs.

3. Implementation of the Method for VOFFOC Problem

In this paper, we consider the following VOFFOC problemwhere is given, and and are continuously differentiable functions, and are the state and control variables, respectively, is a continuous function, and is the type III Caputo VOFD operator. We assume that there exists a smooth optimal solution for the above VOFFOC problem. We are going to propose a convergent and efficient method to approximate the optimal solution. In implementing the method, we use the following Lagrange interpolating polynomialswhere for are the shifted Legendre–Gauss–Lobatto (SLGL) points. These points can be given by , where are the roots of polynomialswhere is the Legendre polynomial of degree defined by the following recurrence formula on interval

The Lagrange polynomials have the useful delta Kronecker property, i.e.,

Now, we approximate the variables of the problem (9) and (10) in terms of the Lagrange interpolating polynomials as follows:where and are unknown coefficients. With the interpolation property of the Lagrange interpolating polynomials, we obtain

Also, to approximate the VOFD of state variable , we gain

So, at the collocation points, we havewhere for and

Here, we define the type III Caputo VOF differentiation matrix as Note that the elements of matrix differentiation can not be directly and exactly calculated by relation (11). Some Jacobi–Gauss quadrature formulas can be used for approximating the singular integral in (19) and for obtaining the matrix differentiation. But, here, we are going to present an exact and efficient method to gain this matrix. In the presented method, we use Lemma 6 and the properties of interpolating polynomials, and we do not need to approximately calculate a singular integral.

First, we consider the following expansion for the Lagrange polynomialswhere are coefficients that we can calculate as follows. By evaluating (14) and (20), we obtain

Relation (21) can be represented as the following matrix formwhere

Since is an invertible matrix, we gain for where is the -th column of matrix . So,

Hence, by evaluating (20) and (24), we obtain

Now, using Lemma 6 and relation (25), the components of type III Caputo VOF differentiation matrix can be shown asfor and .

We will use the following theorem to approximate the objective functional (9).

Lemma 7. Consider a polynomial of degree at most , on the interval . We havewhere are the SLGL points on and for .

Proof. It can be gained by employing the transformation in Theorem 3.29 of [21].
As a result of Lemma 7, for any continuous function on , we obtainHere, is the sequence of SLGL nodes and weights.
Now, by relations (16), (18), and (28), we discretize the problem (9) and (10), as follows:By obtaining the decision variables and of solving the above NLP problem, we can find an approximate solution for the main system.

4. Convergence Analysis of the Method

In this section, we analyze the convergence of the method. We first rewrite the problem (29) and (30) as the following equivalent form:where and satisfy (15). We assume the problem (31) and (32) (or equivalently (29) and (30)) is feasible.

Assumption 8. We assume that the optimal solution of VOFFOC problem (1) and (2) has a Lagrange interpolating polynomial (based on the SLGL points), which uniformly converges to it.

Theorem 9. Assume that is the optimal solution of (22) and (23) and define and on . Also, assume uniformly converges to such that and are continuously differentiable and is in . Then, is an optimal solution for the main VOFFOC problem (1) and (2).

Proof. We first show that is a feasible solution for the VOFOC problem (1) and (2). Suppose that is given. Since SLGR points with is dense on [0, T], there exists a subsequence such that and . By continuity of functions and , and (23), we obtainAlso, for the initial conditionNow, we want to show that is an optimal solution for the VOFOC problem (9) and (10). By objective function (31), we obtainAlso, by objective functional (1) and replacing continuous function in relation (28) with , we gainMoreover, since and is uniformly convergent to , we obtainwhere is the Lipschitz constant of continuously differentiable function . Thus, by (26)–(28), we gainHence,On the other hand, by Assumption I, for any optimal solution of the problem (9) and (10), there exists a corresponding sequence such thatSince satisfies constraint (10) sequence with satisfies constraint (32) (or equivalently (30)). Similar to the relation (39) and the process of achieving it, we havewhere and . By relations (39) and (41), and optimality of pairs and , we achievewhich tends to . Thus, is an optimal solution for the VOFOC problem (9) and (10).

5. Numerical Examples

To show the feasibility and validity of the presented scheme, we implement the numerical method mentioned above in three examples and utilize the FMINCON command in MATLAB software and SQP algorithm to solve the corresponding NLP problem (29) and (30). Also, we define the absolute error based on the following relations:where and are the exact and approximate solutions, respectively.

Example 1. Consider the following VOFFOC problemwhere is an arbitrary continuous function. The functions and are the optimal state and optimal control, respectively. The corresponding problem (29) and (30) can be given asFigure 1 displays the exact solution and the approximate solutions of our proposed method for various values of N. According to this figure, we can see that the numerical solutions for different values of correspond to the exact solution. Also, the logarithms of absolute errors for state and control variables for different values of at are shown in Figure 2. Results represent that our method has a relatively good performance.

Example 2. As a second example, we consider the following VOFFOC problemwhere is an arbitrary continuous function. The exact optimal solution of this problem is . We employ our approach to approximate the solutions. The obtained results are shown in Figure 3 for and . In Figure 4, the gained approximate control is given for different fractional orders and . Moreover, the logarithm of absolute errors is provided in Figures 5 and 6. The results confirm the accuracy and efficiency of the presented approach.

Example 3. Consider the following problemThe exact solution for this system is . To solve this problem, we use the proposed method with for in Figure 7. In Figure 8, the absolute error functions of the state (control) variable with N = 8 and different functions of are plotted. Based on these figures, we can see that our numerical solutions are excellently in agreement with the exact solution.

Example 4. Consider the following problemThe exact solution for this system is and . Figure 9 illustrates the approximate solutions of our proposed method for with . In Figure 10, the absolute error functions of the state (control) variable with N = 8 and different functions of are plotted. We can understand from Figure 11 that by increasing the number of collocation points, the error of approximate variables decreases, which indicates the efficiency of the presented method. Based on these figures, we observed an excellent agreement between our numerical solutions and the exact solution.

6. Conclusions and Suggestions

In this paper, we considered a class of optimal control problems under variable-order fractional functional differential equations. We obtained an approximate solution based on the shifted Legendre pseudospectral collection method. This is the first time that the shifted Legendre pseudospectral collection method has been applied to variable-order fractional-functional problems. The proposed method accurately and efficiently calculates matrix differentiation, avoiding singular integral approximation and overcoming challenges of variable-order functional fractional derivatives. By implementing this method, the original optimal control problem was transformed into an optimization problem which is easier to solve. Several numerical examples have been examined. We obtained a high level of agreement between the numerical and exact solutions, indicating that our method has good performance. In future studies, the applicability of the mentioned method on other OC problems, such as OC problems under variable-order fractional-functional differential equations with delay and variable-order fractional integro-differential equations, will be investigated.

Data Availability

No data were used to support the findings of this study.

Conflicts of Interest

The authors declare that they have no conflicts of interest.