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.

Gaussian Quadrature Weights and LGL Pseudospectral Methods

This section develops Gaussian quadrature weights and introduces the Legendre–Gauss–Lobatto (LGL) pseudospectral transcription for optimal control. It concludes by explaining why the differentiation matrix of the LGL method is singular and therefore does not constitute a true quadrature (integration) method.

Gaussian Quadrature Weights

For NN Legendre–Gauss (LG) points,

wi=2(1τi2)(PN(τi))2,i=1,,N.w_i=\frac{2}{(1-\tau_i^2)\left(P_N'(\tau_i)\right)^2}, \qquad i=1,\ldots,N.

For Legendre–Gauss–Radau (LGR),

w1=2N2,w_1=\frac{2}{N^2},

and

wi=1(1τi)(PN1(τi))2,i=2,,N.w_i=\frac{1}{(1-\tau_i)\left(P'_{N-1}(\tau_i)\right)^2}, \qquad i=2,\ldots,N.

For Legendre–Gauss–Lobatto (LGL),

w1=wN=2N(N1),w_1=w_N=\frac{2}{N(N-1)},

and

wi=2N(N1)(PN1(τi))2,i=2,,N1.w_i=\frac{2}{N(N-1)\left(P_{N-1}(\tau_i)\right)^2}, \qquad i=2,\ldots,N-1.

Model Optimal Control Problem

Consider

minΦ=x(1)\min \Phi=x(1)

subject to

x˙=f(x,u,t),\dot x=f(x,u,t),

with

x(1)=x0.x(-1)=x_0.

The interval has already been normalized to

τ[1,1].\tau\in[-1,1].

LGL State Approximation

Using all LGL nodes,

x(τ)X(τ)=i=1NXiLi(τ),x(\tau)\approx X(\tau)= \sum_{i=1}^{N}X_iL_i(\tau),

where Li(τ)L_i(\tau) are Lagrange basis polynomials.

Because

Li(τj)=δij,L_i(\tau_j)=\delta_{ij},

the coefficients satisfy

X(τj)=Xj.X(\tau_j)=X_j.

Differentiation Matrix

Differentiating,

X˙(τ)=i=1NXiLi(τ).\dot X(\tau) = \sum_{i=1}^{N} X_iL_i'(\tau).

Evaluating at each collocation point,

i=1NDjiXi=f(Xj,Uj),\sum_{i=1}^{N} D_{ji}X_i = f(X_j,U_j),

where

Dji=Li(τj).D_{ji}=L_i'(\tau_j).

Stacking every node gives

DX=F.DX=F.

Boundary Conditions

The discretized initial condition becomes

X1=x0,X_1=x_0,

and the Mayer objective becomes

Φ=XN.\Phi=X_N.

The resulting NLP is

minXN\min X_N

subject to

DXF=0,DX-F=0,

and

X1=x0.X_1=x_0.

Integral Form

A true integration method would satisfy

Xj=X1+i=1NAjiFi,X_j = X_1 + \sum_{i=1}^{N} A_{ji}F_i,

which discretizes

x(τj)=x(1)+1τjf(τ)dτ.x(\tau_j) = x(-1) + \int_{-1}^{\tau_j}f(\tau)\,d\tau.

The matrix AA is obtained from Gaussian quadrature weights.

Why LGL Fails as a True Quadrature Method

The interpolation polynomial has degree

N1.N-1.

Its derivative therefore has degree

N2.N-2.

However, collocation is enforced at all NN LGL points.

Thus the differentiation system contains one more equation than is required to uniquely determine the derivative polynomial.

Consequently,

DD

is singular.

Therefore,

D1D^{-1}

does not exist.

The differential system

DX=FDX=F

cannot be transformed into

X=X11+AF.X=X_1\mathbf 1+AF.

Hence the LGL differentiation equations are not equivalent to a Gaussian quadrature rule.

Interpretation

Differentiation destroys constants since

ddt(c)=0.\frac{d}{dt}(c)=0.

Therefore constant functions lie in the null space of the differentiation operator.

The singularity of the differentiation matrix is the finite-dimensional manifestation of this null space.

Comparison with Euler

Euler forward,

xk+1xkh=fk,\frac{x_{k+1}-x_k}{h}=f_k,

may be rewritten as

xk+1=xk+hfk,x_{k+1}=x_k+h f_k,

which is an explicit integration rule.

Therefore Euler possesses an equivalent integral form.

The LGL differentiation equations do not.

Consequences

The lecture emphasizes that although LGL nodes appear attractive because they include both endpoints, their differentiation matrix is singular. This motivates the development of Legendre–Gauss and Legendre–Gauss–Radau pseudospectral methods, which preserve Gaussian quadrature while still enforcing boundary conditions correctly.

Summary

Connection. Removing both endpoints from the collocation grid produces the LG method and reveals the relationship between rectangular differentiation and exact integration matrices.