Abstract
The convergence of the novel Legendre-Gauss method is established for solving a continuous optimal control problem using collocation at Legendre-Gauss points. The method allows for changes in the number of Legendre-Gauss points to meet the error tolerance. The continuous optimal control problem is first discretized into a nonlinear programming problem at Gauss collocations by the Legendre-Gauss method. Subsequently, we prove the convergence of the Legendre-Gauss algorithm under the assumption that the continuous optimal control problem has a smooth solution. Compared with those of the shooting method, the single step method, and the general pseudospectral method, the numerical example shows that the Legendre-Gauss method has higher computational efficiency and accuracy in solving the optimal control problem.
Introduction
The numerical methods for optimal control problems include indirect methods and direct methods. A pseudospectral method is a classic example of the direct method. The pseudospectral methods have been used extensively to achieve numerical solutions to optimal control problems by Garg et al. (2011), Chen et al. (2021), Im and Choi (2018), and Liu et al. (2014). Elnagar and Kazemi (1995) published a paper on the Legendre pseudospectral methods in IEEE Transactions on Automatic Control and explained the basic steps of discretizing the optimal control problem into an algebraic nonlinear programming problem, which marked the formal rise of the pseudospectral method. Ross and Fahroo (2003) proved the costate mapping theorem of the Legendre pseudospectral methods that provides an order-preserving transformation of the Lagrange multipliers associated with the discretized problem to the discrete covectors associated with the optimal control problem. The basis of the pseudospectral methods is the approximation of the state using a set of basis functions. Some differential-algebraic constraints are enforced at a specified set of collocation points, which are typically chosen based on orthogonal quadrature rules. By parameterizing the state variable and control variable and collocating the differential-algebraic equations using nodes obtained from a Gaussian quadrature, the pseudospectral methods are transformed into a nonlinear programming problem. The pseudospectral methods mainly include the Legendre method in Elnagar and Kazemi (1995) and Ross and Fahroo (2003), the Legendre-Gauss method in Todd (2007), and the Legendre-Radau method in Hou et al. (2015). The Legendre pseudospectral method is different from the Legendre-Gauss pseudospectral method in the location points interval, where the Legendre-Gauss pseudospectral and the Legendre pseudospectral location points lie on the open interval (-1,1), the closed interval [-1,1], respectively. Since endpoints 1 and +1 are collocation points, the Legendre pseudospectral method has no need for additional nodes at the endpoints. Hence, Garg et al. (2010) proved the state at the endpoints naturally appears in the discrete problem, which results in the oscillation of the curve of the costate variable obtained. The Legendre pseudospectral method no longer holds the costate mapping theorem at the endpoint, while the Legendre-Gauss pseudospectral method rule does not discretize the state equation at the endpoint, which is helpful to improve the accuracy of the solution. The Legendre-Gauss pseudospectral method was used by Zhang et al. (2019) to design controllers for the trajectory optimization of unmanned helicopter formations. The convergence rate of the Legendre-Radau pseudospectral method was established by Hager et al. (2015) and applied to the multiobjective optimization of the energy management strategy by Liu et al. (2019). Liu et al. (2015) proposed the
Generally speaking, the existing results focus on three fundamental issues of pseudospectral methods, namely the state and costate approximation in Fahroo and Ross (2001), the existence of approximate solutions in Gong et al. (2006) and Kang et al. (2008), convergence in Dontchev et al. (1995), and the convergence rate. In recent years, convergence and convergence rate of pseudospectral methods for optimal control problems have been studied in the literature include the Legendre-Radau method by Hager et al. (2017), the Legendre-Gauss method by Francolin et al. (2015), Runge-Kutta method by Hager (2000) and Dontchev et al. (2001), and the segment widths and the polynomial degree (hp) collocation method by Elschner (1993).
The convergence of the discrete optimal solutions requires strong conditions, for instance, the normal form of feedback linearizable in Gong et al. (2006) or Lipschitz continuity of the inverse Karush-Kuhn-Tucker mapping in Gong et al. (2004). These conditions require information of the continuous optimal solution which is extremely difficult to get for nonlinear constrained systems. The convergence rate of the Legendre-Gauss method is determined by the number of Legendre-Gauss points and local minimizer for the nonlinear constrained in Hager et al. (2016) and Hager et al. (2015). However, as the number of Legende-Gauss points increases, the convergence rate of the Legende-Gauss method slows down, which increases the calculation time. We seek to carefully select the number of Legendre-Gauss points to reduce the calculation time under the condition of error tolerance. Therefore, based on the general Legendre-Gauss pseudospectral method, we propose a novel Legendre-Gauss algorithm for nonlinear constrained optimal control. Convergence of the novel Legendre-Gauss algorithm for optimal control problem is proved under the assumption that the continuous optimal control problem has a smooth solution in the paper. Different from previous works, the main innovations of this paper are summarized into the following three-fold:
We propose a novel Legendre-Gauss algorithm based on Gauss pseudospectral method to find the approximate numerical solution to the optimal feedback control problems for nonlinear systems. The novel Legendre-Gauss algorithm effectively reduces the computation time by selecting the fewer Legendre-Gauss points under satisfying the error tolerance.
The novel algorithm is designed to get the numerical computational solution for the optimal control problem. We first convert the continuous optimal control problem to discretized problem with collocation at Legendre-Gauss points, which is essentially transformed into a kind of nonlinear programming problem. Then the procedure of this method to compute the numerical solution to the optimal control problems is proposed.
Under the assumption that the continuous optimal control problem has a smooth solution, the convergence of the novel Legendre-Gauss algorithm is proved.
The rest of this paper is organized as follows. The problem description is presented in Section 2. In Section 3, we convert the optimal control problem to nonlinear programming and present the steps of the proposed algorithm. In Section 4, the algorithm of the optimal control problem is given, and the mathematical proof and demonstration of the proposed method are carried out in detail. And numerical example illustrates that convergence results of the Legendre-Gauss algorithm are more excellent than other methods in Section 5. Finally, a brief conclusion is present in Section 6.
Problem formula
The optimal control problem is considered as follows:
Minimize
subject to
This problem is recorded as a continuous problem
By introducing a new variable
By the linear transformation (2.2), the interval
Minimize
subject to
The problem is recorded as a discrete problem
where |.| is the Euclidean norm.
Legendre-Gauss method for optimal control
In numerical analysis and scientific computing, the Legendre-Gauss methods are a family of numerical methods for ordinary differential equations. More specifically, they are collocation methods based on the points of Legendre-Gauss quadrature.
Colloction at Legendre-Gauss points
Legendre-Gauss points are collocated and satisfy
In addition, two non-collocated points are used with
where
Similarly, the control variables
Differentiation of
where
and
where
Minimize
subject to
The problem is recorded as a discrete problem
The derivative of the costate variable can be expressed as
Also, from Todd (2007), the following relationship exists between the adjoint differential approximation matrix and the Gauss pseudospectral differentiation matrix
The novel Legendre-Gauss algorithm
Pseudospectral optimal control is a joint theoretical-computational method for solving optimal control problems. In a pseudospectral method, the continuous functions are approximated at a set of carefully selected quadrature nodes. The quadrature nodes are determined by the corresponding orthogonal polynomial basis used for the approximation. Mathematically, quadrature nodes can achieve high accuracy with a small number of points. The novel Legendre-Gauss algorithm is proposed for an optimal control problem as follows (Table 1).
The novel Legendre-Gauss algorithm.
Where
Convergence
As a matter of the fact, the control variable and state variable in problem
which shows that the control variable
Minimize
subject to
The Lagrangian of the nonlinear programming problem is
where
The discrete costate
and
The first-order necessary condition for the nonlinear programming problem can be written as
Their expressions are as follows
In Hager et al. (2016), studied the convergence rate of the Legendre-Gauss method but did not study the convergence. In the paper, the Legendre-Gauss algorithm is proposed and the convergence of the Legendre-Gauss algorithm is studied.
Now, we analyze the convergence conditions for the Legendre-Gauss method applied to the optimal control. From Lemma 1, the convergence is equivalent to the fact that the right side of equation (4.1) tends to zero when
where
After the above analysis,
Next, we consider
By the fundamental theorem of calculus, we have
Since
then
Now, we consider
where
we have
Finally, we consider
and
Thus, we get
Combining the analysis of
and
More precisely, the Legendre-Gauss method applied to the optimal control converges when
where
When
and
Substituting (4.6) and (4.7) into (4.4), we have
When
and
Therefore, we have
Hence, the norm
Therefore, the Legendre-Gauss method applied to the optimal control converges when
By the triangle inequality, we have
Combining with (4.9), we obtain
For
Numerical example
Numerical examples were performed in the software MATLAB R2018b, in which the computer was configured as CPU Intel(R) Core(TM) i5-7200U and the system was Windows 10 with a memory of 4.00GB. In the numerical example, the proposed Legendre-Gauss algorithm is compared to the shooting method by Bock and Plitt (1984), the single step method by Cui and Wang (2006), and the general pseudospectral method by Ross and Fahroo (2003), where the general pseudospectral method is operated in the software general pseudospectral optimal control software (GPOPS) by Rao et al. (2010). The single step method is a common numerical method for solving initial value problems of ordinary differential equations and has the advantages of high precision, unconditional stability, and no transcendence. The shooting method is an effective numerical method to solve the initial value problem of an ordinary differential equation. As a numerical solution of optimal control problems, the shooting method is presented in Bock and Plitt (1984). The general pseudospectral method takes the roots of orthogonal polynomials as collocation points and uses global interpolation polynomials as a finite basis to transform the optimal control problem into a nonlinear programming problem. In 5.1 the Bryson-Denham problem, we have shown that the proposed method achieves better performance than the shooting method and the single step method, and the calculation time is increased by adding the number of Legendre-Gauss points for the traditional pseudospectral method. Compared with GPOPS, the proposed method has higher computational efficiency and accuracy in solving the optimal control problem in 5.2 the moon soft landing problem.
The Bryson-Denham problem
Consider the Bryson-Denham optimal control problem taken from Bryon and Ho (1975):
Minimize the cost functional
subject to the dynamic constraints
and the boundary conditions
and the state inequality path constraint
Analytical solution of the Bryson-Denham optimal control problem as follows
Note that the Bryson-Denham optimal control problem is the optimal control problem with the Lagrangian performance index. By introducing new state variables, the optimal control problem with the Lagrangian performance index can be equivalently transformed into the optimal Control problem with the endpoint cost. we introduce new state variables
and an initial value is
Integrating (5.1) from
Then, we have
where
Minimize the cost functional
subject to the dynamic constraints
and the boundary conditions
To demonstrate the effectiveness and usefulness of the proposed method for optimal control problems, the proposed method, single shooting method, and single step method are used to solve the problem. The solution results of each method are shown below Figure 1 and Figure 2 show the results obtained using the proposed method, Figure 3 and Figure 4 are solved by the single shooting method, and the results solved by the single step method are shown in Figure 5 and Figure 6. In these figures, the solid line refers to the true solution of the problem and the dotted line refers to the numerical solution of this problem. These three methods are discretized by the same transcription parameters where the Legendre-Gauss points are 30 in Figure 1–Figure 6, Figure 7 and Figure 8 are discretized for the Legendre-Gauss points

State

Control

State

Control

State

Control

State

Control
To compare different computation effectiveness and performance in a same algorithm, we set number of node points to
Compare computation time with three methods.
From Figure 1, Figure 2, Figure 7, and Figure 8, with the increase of Legendre-Gauss points, the accuracy is improved. Only adding the number of Legendre-Gauss points can improve the accuracy, but the calculation time is increased. Therefore, for the traditional pseudospectral method, it is important to select the least Legendre-Gauss points under the condition of error tolerance. The proposed Legendre-Gauss algorithm effectively reduces the calculation time by selecting the fewer Legendre Gauss points under satisfying the error tolerance. The more effective performance of the novel Legendre-Gauss algorithm compared with the traditional pseudospectral method is demonstrated in the next section.
The moon soft landing problem
In the moon soft landing problem numerical example, the proposed Legendre-Gauss algorithm is compared to the general pseudospectral method (GPOPS). Consider the moon soft landing optimal control problem taken from Sachan K, Padhi R. (2019):
Minimize the cost functional
subject to the dynamic constraints
and the boundary conditions
and the path constraint
where the mass of the spacecraft is
where
The numerical parameters.
We performed experiments on the error tolerance of
Compare the number of
Compare computation times with GPOPS.

Control

States

Control

States

Control

States

Control

States
As shown in Table. 4, when the error tolerance reaches
In Figure 9–Figure 12, the proposed algorithm with
In Figure 13–Figure 16, under the error tolerance
The numerical experiments show that the proposed Legendre-Gauss algorithm successfully has solved the moon soft landing problem and has obtained a very effective result. The proposed Legendre-Gauss algorithm effectively reduces the computation time by selecting fewer Legendre-Gauss points under satisfying the error tolerance. The numerical experiments show that the error tolerance decreases gradually with the increase of Gaussian nodes, which verifies the convergence theory.
Conclusion
The convergence for the optimal control problems using the Legendre-Gauss method is present in this paper. The precision of the Legendre-Gauss quadrature is higher than Gauss quadrature, and it is an advantage that the endpoint is one of the abscissas where the function is evaluated. The convergence theory of the Legendre-Gauss method applied to the optimal control problems is established. The proposed method can be used to find a numerical solution to some nonlinear optimal control problems, the numerical example shows the method performs effectively. The proposed method is not limited to application in the optimal control problems, but can also be applied to path planning problems in different fields, such as those of robots and spacecraft and the optimal path planning of autonomous parking.
Footnotes
Acknowledgements
The authors are very grateful to the anonymous referees and the editors for their valuable suggestions and comments.
Declaration of conflicting interests
The author declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work is partially supported by the National Natural Science Foundation of China (No.11671407).
