The Legendre–Gauss Pseudospectral Method
This section develops the Legendre–Gauss (LG) pseudospectral method for direct optimal control. The method is particularly important because it shows how Gaussian quadrature can be preserved even though the LG points do not include either endpoint of the interval.
The key ideas are:
the LG points lie strictly inside the interval ;
the initial point is added to the state approximation as a non-collocated point;
the terminal point is recovered using Gaussian quadrature;
the resulting differentiation matrix is rectangular rather than square;
a square submatrix of the differentiation matrix is invertible;
its inverse is exactly the LG integration matrix; and
the differential and integral forms of the LG method are equivalent.
Model Optimal-Control Problem¶
Consider the normalized optimal-control problem
subject to
and the initial condition
The interval is already normalized. A general interval may be mapped to through an affine transformation.
Location of the LG Points¶
Let
be the roots of the Legendre polynomial .
These points satisfy
Therefore, neither endpoint belongs to the LG quadrature set.
Why the Naive LG Construction Fails¶
Suppose the state were approximated only at the LG points:
This polynomial has degree .
Its derivative has degree .
Collocating the derivative at all LG points would again produce an over-collocated system, just as in the LGL formulation. In addition, the initial and final conditions would be enforced at the wrong points.
Thus, the LG method must be constructed differently.
Introduction of Non-Collocated Endpoints¶
Introduce
as a non-collocated initial point.
Also define
as a non-collocated terminal point.
The initial point is included in the state approximation.
The terminal point is not included in the collocation polynomial, but it will later be recovered by Gaussian quadrature.
LG State Approximation¶
Approximate the state using the initial point and all LG points:
where
The approximation contains support points and therefore has degree .
At the support points,
Derivative Approximation¶
Differentiating,
Since has degree , its derivative has degree .
A polynomial of degree is uniquely determined by conditions.
The LG rule provides exactly collocation points.
Thus, unlike the naive construction, the collocation count is now correct.
LG Collocation Equations¶
Collocate the derivative approximation at the LG points:
Therefore,
Define
The LG differentiation matrix is
It is rectangular.
Matrix Form of the Differential Equations¶
Partition the matrix as
where:
is the first column;
contains the remaining columns.
Define
and
The collocation equations become
The initial condition is
Integral Form of the Dynamics¶
The exact dynamics satisfy
At an LG point ,
Approximate each integral using a scaled LG quadrature:
The coefficients are the integration weights from -1 to .
In matrix form,
Here,
is the LG integration matrix.
Recovery of the Terminal State¶
The final point is not a collocation point.
However,
Using the standard LG quadrature weights ,
Equivalently,
The Mayer objective becomes
Thus the terminal state is recovered without making a collocation point.
Equivalence of Differential and Integral Forms¶
Starting with
assume that
is nonsingular.
Then
The critical identities are
and
Therefore,
which is exactly the integral form.
Why the Initial Point Must Be Isolated¶
The initial condition acts as the integration constant.
When solving
integration gives
The initial value is not part of the quadrature itself.
It must remain separate from the accumulated integral.
This is why the LG method includes in the state approximation but does not collocate the dynamics there.
Comparison with the LGL Method¶
| Feature | LGL | LG |
|---|---|---|
| Quadrature endpoints | Both included | Neither included |
| State approximation | LGL nodes | Initial point plus LG nodes |
| Differentiation matrix | Square | Rectangular |
| Key submatrix | Singular | Nonsingular |
| Equivalent integral form | Not directly available | Exactly available |
| Terminal state | Direct node | Recovered by quadrature |
Complete LG NLP Formulation¶
A simplified LG transcription is
Additional endpoint, path, and control constraints may be appended.
Computational Interpretation¶
The differential form is often computationally preferable because:
derivative matrices are easy to precompute;
the collocation constraints retain sparse structure;
the form is convenient for automatic differentiation;
the final-state equation is a single quadrature constraint.
However, the integral form is essential for understanding why the method is a valid Gaussian quadrature method.
Remaining Limitation of the LG Method¶
The control is approximated only at the LG points:
There is no control variable at
Thus the first available control value occurs at
This is inconvenient in:
real-time control;
receding-horizon control;
model predictive control;
applications requiring the control at the initial time.
This limitation motivates the Legendre–Gauss–Radau method, which includes one endpoint in the quadrature set.
Generalization to Multiple Mesh Intervals¶
For a multiple-interval transcription:
divide the normalized horizon into mesh intervals;
map each interval locally to ;
apply LG collocation inside each interval;
include the left endpoint of each interval as a non-collocated state point;
recover the right endpoint through quadrature;
impose continuity between neighboring intervals.
This produces an -type pseudospectral method when both interval sizes and polynomial degrees may vary.
Summary¶
LG points exclude both endpoints.
A naive LG transcription is invalid.
The initial point is added as a non-collocated support point.
The state polynomial has degree .
Its derivative has degree .
The derivative is collocated at exactly LG points.
The LG differentiation matrix is rectangular.
Its square submatrix is invertible.
The inverse of this submatrix is the LG integration matrix.
The differential and integral forms are equivalent.
The final state is recovered using standard LG quadrature.
The method is a true Gaussian quadrature integration scheme.
The absence of an initial control value motivates LGR collocation.
Connection. Including one endpoint instead yields LGR, a closely related formulation with practical advantages for initial control and multiple-interval assembly.