A pseudospectral method for generating optimal trajectories of linear
and nonlinear constrained dynamic systems is proposed. The method cons
ists of representing the solution of the optimal control problem by an
mth degree interpolating polynomial, using Chebyshev nodes, and then
discretizing the problem using a cell-averaging technique. The optimal
control problem is thereby transformed into an algebraic nonlinear pr
ogramming problem. Due to its dynamic nature, the proposed method avoi
ds many of the numerical difficulties typically encountered in solving
standard optimal control problems. Furthermore, for discontinuous opt
imal control problems, we develop and implement a Chebyshev smoothing
procedure which extracts the piecewise smooth solution from the oscill
atory solution near the points of discontinuities. Numerical examples
are provided, which confirm the convergence of the proposed method. Mo
reover, a comparison is made with optimal solutions obtained by closed
-form analysis and/or other numerical methods in the literature.