Car model

Let us consider the following nonlinear ordinary differential system:

eqs={x'[t]->v[t]Cos[ψ[t]],
y'[t]->v[t]Sin[ψ[t]],
z'[t]->-v[t]θ[t],
ψ'[t]-> ω[t],
θ'[t]-> -ϕ[t] ω[t],
ϕ'[t]-> θ[t]ω[t]};
vars={x[t],y[t],z[t],ψ[t],θ[t],ϕ[t],v[t],ω[t]};
TableForm[eqs]

Let us introduce the Ore algebra A defined by

replA=ModelToReplacementRules[eqs,t];
A=OreAlgebraWithRelations[Der[t],replA]

and the matrix R of ordinary differential operators, which defines the generic linearization of the above nonlinear system

MatrixForm[R=ToOrePolynomialD[eqs,vars,A]]

and the left A-module, finitely presented by R, defined by M = (A^(1×8))/(A^(1×6))R.

Let us compute the adjoint of R:

MatrixForm[Radj=Involution[R,A]]

Let us check whether or not M is torsion-free:

MatrixForm/@({Ann,Rp,Q}=Exti[Radj,A,1])

Since the first matrix is not identity, we deduce that M admits nontrivial torsion elements and thus the corresponding system admits autonomous elements τ[1], ...,  τ[6], defined by:

AutonomousElements[R,{dx[t],dy[t],dz[t],dψ[t],dθ[t],dϕ[t],dv[t],dω[t]},τ,A,Relations->True]

The first list gives the definition of the autonomous elements τ[1], ..., τ[6], the second list gives the equations they satisfy and the last list gives the relations between τ[1], ..., τ[6].

Using an implementation of Frobenius theorem in NLControl (see NLControl website http://www.nlcontrol.ioc.ee) we can prove that the one-forms defining the autonomous elements are closed.

aut=AutonomousElementsD[R,vars,τ,A,Relations->True];

BookForm[sp=SpanK[Last/@aut[[1]],t]]

Integrability[sp]

Let us compute a flat output of the controllable part of the generic linearization, defined by:

Thread[ApplyMatrix[Rp,{x[t],y[t],z[t],ψ[t],θ[t],ϕ[t],v[t],ω[t]}]==0]

It is given by

ApplyMatrix[LeftInverse[Q,A],{x[t],y[t],z[t],ψ[t],θ[t],ϕ[t],v[t],ω[t]}]