Bipendulum

We study a bipendulum, namely a system composed of a bar where two pendula are fixed, one of length (Subscript[l, 1]) and one of length (Subscript[l, 2]). See J.-F. Pommaret, Partial Differential Control Theory, Kluwer, 2001, p. 569.

The appropriate Ore algebra for this example is the Weyl algebra A, where (Subscript[D, t]) is the differential operator w.r.t. time t:

A=OreAlgebra[t,Der[t],g,(Subscript[l, 1]),(Subscript[l, 2])]

Next we enter the system matrix:

MatrixForm[R=ToOrePolynomial[{{(Subscript[l, 1]) ((Der[t])^2)+g,0,-g},{0,(Subscript[l, 2])((Der[t])^2)+g,-g}},A]]

In terms of equations, the bipendulum is defined by:

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

We compute the formal 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 g, (Subscript[l, 1]), (Subscript[l, 2]) for M to be a projective left A-module.

OreIntersection[Flatten@P,{g,(Subscript[l, 1]),(Subscript[l, 2])},A]

We obtain that M is a projective left A-module, i.e. the system is flat, if and only if (Subscript[l, 1])-(Subscript[l, 2]) is not equal to zero.

If (Subscript[l, 1])-(Subscript[l, 2]) ≠ 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 (Subscript[l, 1])-(Subscript[l, 2]) = 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[#/.(Subscript[l, 1])->(Subscript[l, 2])]&)]

the matrix S of differential operators given by

MatrixForm[S=ToOrePolynomial[{{(Subscript[l, 1]) ((Der[t])^2)+g,0,-g},{0,(Subscript[l, 2])((Der[t])^2)+g,-g}},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]]