Documentation

CslibFrontier.Algorithms.LinearAlgebra.SparseDescriptorRealization

Realizations and equilibria from structured decouplings #

Cslib.LinearAlgebra.SparseDecouplingCert certifies an index-one decoupling in Schur form, T E U = [[E₁₁, 0], [0, 0]], T F U = [[F₁₁, F₁₂], [F₂₁, F₂₂]], F₂₂ K = F₂₁, without ever forming P and Q (DescriptorSystem.IndexOneDecoupling.ofSchur). This file adds the input and output maps of the reduced system and a sparse equilibrium check, so that a structured certificate gives the same proper realization ẋ = A x + B u, y - y₀ = C x + D u as a dense Cslib.LinearAlgebra.DecouplingCert (DecouplingCert.realization_toDecoupling).

For the decoupling of ofSchur, the blocks of P and Q are

P₁ = E₁₁⁻¹ (T₁ - F₁₂ F₂₂⁻¹ T₂), P₂ = F₂₂⁻¹ T₂, Q₁ = U₁ - U₂ K, Q₂ = U₂,

with T₁, T₂ the first k and the last r rows of T and U₁, U₂ the first k and the last r columns of U (DescriptorSystem.IndexOneDecoupling.P₁_ofSchur, P₂_ofSchur, Q₁_ofSchur, Q₂_ofSchur, in CslibFrontier.Foundations.Analysis.ODE.Descriptor). The input matrix B = P₁ G and the algebraic response P₂ G again involve inverses. A Cslib.LinearAlgebra.SparseRealizationCert supplies them as sparse solutions instead, W = P₂ G and B = P₁ G, and its checker SparseRealizationCert.check verifies, with sparse rational products,

F₂₂ W = T₂ G and E₁₁ B = T₁ G - F₁₂ W,

which give P₂ G = W and P₁ G = B (DescriptorSystem.IndexOneDecoupling.P₂_G_B_ofSchur).

Given these, everything else is a product of checked sparse rows, computed rather than supplied: for output rows H, the reconstruction z = z₀ + Q₁ x - (U₂ W) u with Q₁ = U₁ - U₂ K (SparseDecouplingCert.stateRows, SparseRealizationCert.inputRows), the output matrix C = H Q₁ and the direct feedthrough D = -H U₂ W (SparseRealizationCert.realization_toDecoupling).

isEquilibriumSparse checks F z₀ + b = 0 for sparse rows of F with one sparse product (isEquilibrium_of_isEquilibriumSparse), instead of the dense row products of isEquilibriumRows.

Main definitions #

Main results #

Rows of the block transforms #

theorem Cslib.LinearAlgebra.realOfSparse_take {k r N n : ℕ} (h : k + r = N) (X : List (List (ℕ × ℚ))) :

The first k rows of a split matrix, read from sparse rows.

theorem Cslib.LinearAlgebra.realOfSparse_drop {k r N n : ℕ} (h : k + r = N) (X : List (List (ℕ × ℚ))) :

The last r rows of a split matrix, read from sparse rows.

theorem Cslib.LinearAlgebra.realOfSparse_loCols {k r N n : ℕ} (h : k + r = N) (X : List (List (ℕ × ℚ))) :

The first k columns of a split matrix, read from sparse rows.

theorem Cslib.LinearAlgebra.realOfSparse_hiCols {k r N n : ℕ} (h : k + r = N) (X : List (List (ℕ × ℚ))) :

The last r columns of a split matrix, read from sparse rows.

Sparse rows that eqSparse identifies have the same real matrix.

Realizations #

N × k: the sparse rows of Q₁ = U₁ - U₂ K, the unknowns from the differential coordinates.

theorem Cslib.LinearAlgebra.SparseDecouplingCert.Q₁_toDecoupling {d : SparseDecouplingCert} {N m : ℕ} {E F : List (List (ℕ × ℚ))} {S : DescriptorSystem (Fin N) (Fin m)} (hE : S.E = realOfSparse N N E) (hF : S.F = realOfSparse N N F) (h : d.check N E F = true) :

The unknowns of an accepted decoupling from its differential coordinates are Q₁ = U₁ - U₂ K.

The input data of a proper realization through a structured decoupling: sparse solutions W = P₂ G (r × m) and B = P₁ G (k × m); see the module documentation.

  • W : List (List (ℕ × ℚ))

    r × m: the solution of F₂₂ W = T₂ G.

  • B : List (List (ℕ × ℚ))

    k × m: the solution of E₁₁ B = T₁ G - F₁₂ W, the input matrix of the reduced system.

Whether e gives the input maps of the decoupling d for the input matrix G, given by sparse rows with at most N rows.

N × m: the sparse rows of Q₂ P₂ G = U₂ W, the response of the unknowns to the input.

p × k: the output matrix C = H Q₁ for output rows H.

p × m: the direct feedthrough D = -H Q₂ P₂ G for output rows H.

The input maps of an accepted structured decoupling. Q₂ P₂ G is the matrix of inputRows and the input matrix P₁ G of the reduced system is the matrix of e.B.

theorem Cslib.LinearAlgebra.SparseRealizationCert.realization_toDecoupling {e : SparseRealizationCert} {d : SparseDecouplingCert} {N m : ℕ} {E F G : List (List (ℕ × ℚ))} {S : DescriptorSystem (Fin N) (Fin m)} (hE : S.E = realOfSparse N N E) (hF : S.F = realOfSparse N N F) (hG : S.G = realOfSparse N m G) (hd : d.check N E F = true) (h : e.check d N E F G = true) (p : ℕ) (H : List (List (ℕ × ℚ))) :

The checked proper realization of a structured decoupling. For an accepted structured decoupling d with accepted input data e and output rows H, the realization ẋ = A x + B u, y = C x + D u of DescriptorSystem.IndexOneDecoupling.realization has the matrices of d.A, e.B, outputRows (C = H Q₁) and feedthroughRows (D = -H Q₂ P₂ G).

Equilibria #

The sparse rows of the column vector v.

Whether z₀ is an equilibrium, F z₀ + b = 0, of the system with N unknowns and sparse rows F: one sparse product.

theorem Cslib.LinearAlgebra.isEquilibrium_of_isEquilibriumSparse {N m : ℕ} {S : DescriptorSystem (Fin N) (Fin m)} {F : List (List (ℕ × ℚ))} {b z₀ : List ℚ} (hF : S.F = realOfSparse N N F) (hb : S.b = realOfList N b) (h : isEquilibriumSparse N F b z₀ = true) :

Soundness of the sparse equilibrium check.