Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Orthogonal Collocation and Gaussian Quadrature

This section introduces orthogonal collocation, polynomial state approximations, Gaussian quadrature, and Legendre–Gauss (LG), Legendre–Gauss–Radau (LGR), and Legendre–Gauss–Lobatto (LGL) collocation points.

From Euler Collocation to General Collocation

Euler collocation enforces

xk+1xkhk=f(xk,uk,tk),\frac{x_{k+1}-x_k}{h_k}=f(x_k,u_k,t_k),

or equivalently

xk+1xkhkf(xk,uk,tk)=0.x_{k+1}-x_k-h_k f(x_k,u_k,t_k)=0.

The left-hand side approximates the derivative while the right-hand side evaluates the dynamics at the same point. This is the fundamental idea of collocation.

Polynomial Approximation

Over each mesh interval,

x(k)(t)j=0mcj(k)sj(k)(t),x^{(k)}(t)\approx \sum_{j=0}^{m} c_j^{(k)}\,s_j^{(k)}(t),

where sj(k)(t)s_j^{(k)}(t) are basis polynomials.

Differentiating,

x˙(k)(t)j=0mcj(k)s˙j(k)(t).\dot x^{(k)}(t)\approx \sum_{j=0}^{m} c_j^{(k)}\dot s_j^{(k)}(t).

The derivative polynomial has degree m1m-1.

Collocation Conditions

Choose mm collocation points inside each mesh interval,

τ1,τ2,,τm.\tau_1,\tau_2,\ldots,\tau_m.

At every collocation point,

x˙(k)(τi)=f ⁣(x(k)(τi),u(k)(τi),τi),i=1,,m.\dot x^{(k)}(\tau_i)= f\!\left(x^{(k)}(\tau_i),u^{(k)}(\tau_i),\tau_i\right), \qquad i=1,\ldots,m.

Because the derivative polynomial has degree m1m-1, these provide mm equations. One additional condition is required.

Continuity Condition

The missing equation is supplied by continuity:

x(k)(tk)=x(k+1)(tk).x^{(k)}(t_k)=x^{(k+1)}(t_k).

For the first interval,

x(t0)=x0.x(t_0)=x_0.

Thus every interval has exactly the correct number of equations.

Euler as a Special Case

Euler forward corresponds to:

Quadrature

The cost integral

J=11f(τ)dτJ=\int_{-1}^{1}f(\tau)\,d\tau

is approximated by

Ji=1Nwif(τi),J\approx \sum_{i=1}^{N}w_i f(\tau_i),

where wiw_i are quadrature weights satisfying

iwi=2.\sum_i w_i=2.

Choosing Optimal Points

Rather than equally spaced points, Gaussian quadrature chooses both the locations τi\tau_i and weights wiw_i to minimize integration error.

LGL Points

Endpoints are included:

τ1=1,τN=1.\tau_1=-1,\qquad \tau_N=1.

Interior points are roots of

ddτPN1(τ).\frac{d}{d\tau}P_{N-1}(\tau).

LGL exactly integrates polynomials of degree

2N3.2N-3.

LGR Points

Only the left endpoint is fixed. The points are roots of

PN(τ)+PN1(τ).P_N(\tau)+P_{N-1}(\tau).

LGR exactly integrates polynomials of degree

2N2.2N-2.

LG Points

Neither endpoint is fixed. The points are roots of

PN(τ).P_N(\tau).

LG exactly integrates polynomials of degree

2N1.2N-1.

Accuracy Comparison

MethodEndpoints IncludedExact Polynomial Degree
LGLBoth2N32N-3
LGROne2N22N-2
LGNone2N12N-1

Relaxing endpoint constraints increases quadrature accuracy.

Orthogonal Collocation

Legendre polynomials satisfy

11Pi(τ)Pj(τ)dτ=0,ij.\int_{-1}^{1}P_i(\tau)P_j(\tau)\,d\tau=0, \qquad i\neq j.

Because of this orthogonality, collocation at Gaussian points yields highly accurate numerical integration and transcription schemes.

Connection to Optimal Control

Within each mesh interval:

  1. Approximate the state by a polynomial.

  2. Differentiate the polynomial.

  3. Enforce the dynamics at Gaussian collocation points.

  4. Use Gaussian quadrature to approximate the integral cost.

  5. Enforce continuity between neighboring mesh intervals.

This produces a sparse nonlinear programming problem.

Summary

Connection. The polynomial constructions used in orthogonal collocation rest on Legendre orthogonality, Lagrange interpolation, and exactness properties of Gaussian quadrature.