Kalman example

Let k = K[t, R1, R2, L, C] be the commutative polynomial ring in t, R1, R2, L, C and let us define the Ore algebra A = k⟨∂⟩, where ∂ is differential operator defined by ∂f(t) = f'(t).

A=OreAlgebra[t,Der[t],R1,R2,L,C]

We consider the matrix R ∈ (A^(2×3)) given by

MatrixForm[R=ToOrePolynomial[{{R1 C Der[t]+1,0,-1},
{0,L Der[t]+R2,-1}},A]]

the system defined by

Thread[ApplyMatrix[R,{(Subscript[x, 1])[t],(Subscript[x, 2])[t],u[t]}]==0]

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

Let us compute the adjoint of R:

MatrixForm[Radj=Involution[R,A]]

Let us check whether or not the left A-module M is torsion-free, i.e. whether or not the system admits some autonomous elements.

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

Since the first matrix is identity, M is torsion-free. Let us now compute the obstructions for M to be projective:

P=ObstructionToProjectiveness[R,A]

Let us deduce the obstructions in the parameters R1, R2, L, C for M to be a projective left A-module.

OreIntersection[Flatten@P,{R1,R2, L, C},A]

We obtain that M is a projective left A-module, i.e. the system is flat, if and only if C R1 R2-L is not equal to zero.

If C R1 R2-L ≠ 0, let us compute flat output.

B=OreAlgebra[t,Der[t]]

T=LeftInverse[Q,B]

A flat output ξ is then defined by:

ApplyMatrix[T,{(Subscript[x, 1])[t],(Subscript[x, 2])[t],u[t]}][[1]]

Finally a parametrization of the flat system is defined by

Thread[{(Subscript[x, 1])[t],(Subscript[x, 2])[t],u[t]}->ApplyMatrix[Q,{ξ[t]}]]

If C R1 R2-L = 0, then let us compute the autonomous elements of the new system. To do that let us introduce a new Ore algebra B, defined by

B=OreAlgebra[t,Der[t],CoefficientNormal->(Expand[#/.L->C R1 R2]&)]

the matrix S of differential operators given by

MatrixForm[S=ToOrePolynomial[{{R1 C Der[t]+1,0,-1},
{0,L Der[t]+R2,-1}},B]]

and the left B-module N finitely presented by S. Let us compute the torsion elements of N, i.e. the autnomous elements of the corresponding system.

MatrixForm[Sadj=Involution[S,B]]

MatrixForm/@({Ann,Sp,Q}=Exti[Sadj,B,1])

Since the first matrix is not identity, the system is not controllable (N is not torsion free) and we have one autonomous element, defined by the first row of Sp, namely θ, defined by

ApplyMatrix[{Sp[[1]]},{(Subscript[x, 1])[t],(Subscript[x, 2])[t],u[t]}]

Moreover, θ satisfies the equation

Thread[ApplyMatrix[{{Ann[[1,1]]}},{θ[t]}]==0]

Finally, this result can be obtained directly by means of the command AutonomousElements

AutonomousElements[S,{(Subscript[x, 1])[t],(Subscript[x, 2])[t],u[t]}, θ, B]

The controllable part of the system is defined by:

Thread[ApplyMatrix[Sp,{(Subscript[x, 1])[t],(Subscript[x, 2])[t],u[t]}]==0]

Finally let us compute a flat output of the controllable part:

ApplyMatrix[LeftInverse[Q,B],{(Subscript[x, 1])[t],(Subscript[x, 2])[t],u[t]}][[1]]