Direct trajectory optimization by a Chebyshev pseudospectral method

A Chebyshev pseudospectral method is presented in this paper for directly solving a generic optimal control problem with state and control constraints. This method employs Nth degree Lagrange polynomial approximations for the state and control variables with the values of these variables at the Chebyshev-Gauss-Lobatto (CGL) points as the expansion coefficients. This process yields a nonlinear programming problem (NLP) with the state and control values at the CGL points as unknown NLP parameters. Numerical examples demonstrate this method yields more accurate results than those obtained from the traditional collocation methods.


Introduction
In recent years, direct solution methods have been used extensively in a variety of trajectory optimization problems [l, lo]. Their advantage over indirect methods, which rely on solving the necessary conditions derived from Pontryagin's minimum principle, is their wider radius of convergence to a n optimal solution. In addition, since the necessary conditions do not have t o be derived, the direct methods can be quickly used to solve a number of practical trajectory optimization problems.
Direct methods can be basically described as discretizing the optimal control problem and then solving the resulting nonlinear programming problem (NLP) . The discretization is achieved by first dividing t h e time interval into a prescribed number of subintervals whose endpoints are called nodes [lo]. T h e unknowns are the values of the controls and the states at these nodes, the state and control parameters. The cost function and the state equations can be expressed in terms of these parameters which effectively reduce the optimal control problem t o a n NLP that can be solved by a standard nonlinear programming code. T h e time histories of both t h e control and the state variables can be obtained by using a n interpolation scheme. In most  [12]. These polynomials are used extensively in spectral methods for solving fluid dynamics problems [2, 71, but their use in solving optimal control problems has created a new way of transforming these problems t o NLP problems. One particular merit of the use of orthogonal polynomials is their close relationship to Gauss-type integration rules. This relationship can be used to derive simple rules for transforming the original optimal control problem to a system of algebraic equations. The efficiency and simplicity of these rules are best demonstrated in t h e spectral collocation (or pseudospectral) method that Given the success of the Legendre pseudospectral method, we are encouraged t o check the effectiveness of using Chebyshev polynomials and Chebyshev-Gauss-Lobatto (CGL) points in the discretization method. Chebyshev polynomials have been widely used in engineering applications, and aside from their popularity have the added computational advantage in that their corresponding quadrature weights and CGL points can b e easily evaluated. On the other hand, the calculation of LGL points require the use of advanced numerical linear algebra techniques. In t h e two numerical examples presented in this paper, the results clearly show that Chebyshev polynomials are very effective in direct optimization techniques and offer superior results than the existing collocation methods.

Problem Formulation
Consider the following optimal control problem. Determine the control function u(T), and t h e corresponding state trajectory x(T), that minimize the Mayer cost function:

7 ) = f(X(T),U(T),T),
with x E Rn and U E Rm subject to the state dynamics and boundary conditions: where qo E R p with p I n and +f E Rq with q 5 n. Possible state and control inequality constraints are formulated as

The Chebyshev Pseudospectral Method
The Chebyshev pseudospectral method is one special case of a more general class of spectral methods [7]. The basic formulation of these methods involve two essential steps: One is to choose a finite dimensional space (usually a polynomial space) from which an approximation t o the solution of the differential equation is made. The other step is to choose a projection operator which imposes the differential equation in the finite dimensional space. One important feature of spectral met hods which distinguishes it from finiteelement or finite difference methods is that the underlying polynomial space is spanned by orthogonal polynomials which are infinitely differentiable global functions. Among examples of these orthogonal polynomials are Legendre and Chebyshev polynomials which are orthogonal on the interval [-1,1], with respect to an appropriate weight function (w(z) = 1 for Legendre polynomials, and W(Z) = ____ for Chebyshev polynomials of the first kind.) In the collocation methods, after choosing a polynomial approximation for a function, the requirement is t o satisfy the differential equation exactly at some chosen nodes (or collocation nodes). In the orthogonal collocation methods, a given function is expanded in terms of orthogonal polynomials such that the expansion coefficients are exactly the values of the function at t h e collocation points. Also, since an arbitrary choice of collocation points can give very poor results in interpolation, different Gauss quadrature points are chosen to give the best accuracy in interpolation of a function. These two important aspects (choice of orthogonal polynomials as the trial functions and Gauss quadrature points) of orthogonal or spectral collocation methods separate them from the other collocat ion methods [SI- [ lo].
The basic idea behind the use of a Chebyshev pseudospectral method for solving the optimal control problem is to find global polynomial approximations for the state and control functions in terms of their values at the points. The time derivative of the approximate state vector, X N ( 7 ) , is expressed in terms of the approximate state vector xN(-r) at the collocation points by the use of a differentiation matrix. In this manner, the optimal control problem is transformed to an NLP problem for the value of the states and the controls at the nodes.

It can be shown that
From this property of +I it follows that

XN(tl) = X(tl), U N ( t l ) = +l).
To express the derivative x N ( t ) in terms of xN ( t ) at the collocation points t l , we differentiate (11) which results in a matrix multiplication of the following form: To summarize, the optimal control problem (6)-(9) is approximated by the following nonlinear programming problem: Find coefficients a = ( % , a i , .   . . , a N ) , b = (bo, b i , . . . , blv) and possibly the final time ~f to minimize

T(a,b,Tf) = M(aN,Tf)
) f ( % b k , t k )  In this section, we present two numerical examples: one is the brachistochrone problem discussed in [3], and the other is the moon-landing problem [ll]. The first example demonstrates the efficiency of this technique while the second example shows that the discontinuities are adequately captured by this approach.

Example 1: Brachistochrone
In this well-known problem, the control problem is formulated as finding the shape of a wire so that a bead sliding on the wire will reach a given horizontal dis- The optimal control (angle) is given by the following expression: For the value of g = 1, the minimum time is rf =

1.2533.
For discretization of the problem, the Chebyshev pseudospectral method was used with NPSOL as the NLP solver. In Table 1, we show the minimum cost function obtained from our method with the Simpson collocation method and a fifth-degree Gauss-Lobatto method from [3], for N = 11. It is evident that even for a low number degree of discretization (and number of NLP variables), the Chebyshev method gives superior results than either of the other collocation methods.
In Figures 1 and 2, we show the time histories of the state and control variables against the analytic solutions for the same number N = 11. The graphs clearly demonstrate the accuracy of the results from the Chebyshev collocation method.   The other parameters in the problem are 9, the gravity of moon (or any planet without an atmosphere) and Isp, t h e specific impulse of the propellent. Given any set of initial conditions ho, vo and mo, the normalized parameters for the problem were chosen as Therefore, we have the following normalized initial con- It is clear that the method has adequately captured the optimal bang-bang structure of the control with one switch.

Conclusions
The simplicity and efficiency of the Chebyshev pseudospectral method allows one to perform rapid and accurate trajectory optimization. A low degree of discretization appears t o be sufficient to generate good results. Thus, it is apparent that the technique has a high potential for use in optimal guidance algorithms that require corrective maneuver from the perturbed trajectory. In any cme, reference optimal paths can be easily generated and the numerical examples indicate that t h e converged solutions are indeed optimal. Further tests and analysis are necessary to investigate the stability and accuracy of the method.