Documentation

CslibFrontier.Foundations.Analysis.ODE.Feedback

Feedback loops of LTI systems and the small-gain theorem #

Two LTISystems S₁ : u₁ ↦ y₁ and S₂ : u₂ ↦ y₂ are closed into a feedback loop with sign σ by u₁ = σ y₂ + r₁, u₂ = y₁ + r₂ (LTISystem.feedback; σ = -1 is negative feedback). The loop is well-posed when 1 - σ D₂ D₁ is invertible (LTISystem.WellPosed): then the algebraic loop through the direct feedthroughs has a unique solution, and the closed loop is again an LTI system with inputs (r₁, r₂), outputs (y₁, y₂) and state (x₁, x₂). The definition takes the proof of well-posedness, so an ill-posed loop has no closed-loop system. Internal stability of the loop is the Hurwitz property of the closed-loop state matrix, the one state matrix of this realization.

The construction is static output feedback u = J y + r (LTISystem.closeLoop) around the two systems side by side (LTISystem.blockDiag), with J = [[0, σ], [1, 0]] (LTISystem.loopMatrix).

The characteristic equation #

For static output feedback, off the spectrum of A, det (s I - A_cl) det (1 - J D) = det (s I - A) det (1 - J H(s)) (LTISystem.det_closeLoop), by the Weinstein–Aronszajn identity det (1 - X Y) = det (1 - Y X). For the loop this reads det (s I - A_cl) det (1 - σ D₂ D₁) = det (s I - A₁) det (s I - A₂) det (1 - σ H₂(s) H₁(s)) (LTISystem.det_feedback). So if A₁ and A₂ are Hurwitz and det (1 - σ H₂ H₁) has no zero in re s ≥ 0, the closed loop is internally stable (LTISystem.feedback_isHurwitz_of_det_ne_zero).

Small gain, loop-gain form (SISO) #

For single-input single-output parts with Hurwitz state matrices, the loop gain L(s) = σ H₂(s) H₁(s) is holomorphic on a half-plane re s > -α and bounded on re s ≥ 0 (LTISystem.exists_norm_transferFunction_le_of_isHurwitz). The Phragmén–Lindelöf principle for the right half-plane (PhragmenLindelof.right_half_plane_of_bounded_on_real) then bounds |L| on re s ≥ 0 by its supremum on the imaginary axis. Hence |L(iω)| ≤ ρ < 1 for every real ω gives 1 - L(s) ≠ 0 on re s ≥ 0, and the closed loop is internally stable (LTISystem.feedback_isHurwitz_of_norm_loop_le). The hypothesis is on the loop transfer function itself, not on the product of the two peak gains, so the peaks of |H₁| and |H₂| may lie at different frequencies.

Small gain against a unit-bounded block (LTISystem.feedback_isHurwitz_of_norm_le): if |H₁(iω)| ≤ ρ < 1 and |H₂(iω)| ≤ 1 for all ω, the supplied well-posed feedback realization has a Hurwitz state matrix for every sign or gain |σ| ≤ 1. This is the small-gain step used in the sufficiency proof of Doyle, Francis and Tannenbaum's robust stability theorem [DFT92], with H₁ = -W₂ T, the transfer function that a multiplicative perturbation (1 + Δ W₂) P sees around Δ, and H₂ = Δ. Their conclusion concerns every admissible perturbation of a nominal internally stabilized plant; identifying a particular feedback realization here with that perturbed plant–controller loop is left to clients.

Main definitions #

Main results #

References #

def LTISystem.blockDiag {n₁ : Type u_4} {n₂ : Type u_5} {m₁ : Type u_6} {m₂ : Type u_7} {p₁ : Type u_8} {p₂ : Type u_9} (S₁ : LTISystem n₁ m₁ p₁) (S₂ : LTISystem n₂ m₂ p₂) :
LTISystem (n₁ ⊕ n₂) (m₁ ⊕ m₂) (p₁ ⊕ p₂)

Two systems side by side, with no connection: state (x₁, x₂), input (u₁, u₂), output (y₁, y₂), and block-diagonal matrices.

noncomputable def LTISystem.closeLoop {n : Type u_1} {m : Type u_2} {p : Type u_3} [Fintype m] [DecidableEq m] [Fintype p] (S : LTISystem n m p) (J : Matrix m p ℝ) :
IsUnit (1 - J * S.D) → LTISystem n m p

Static output feedback u = J y + r around S. Eliminating u from y = C x + D u gives u = K (J C x + r) with K = (1 - J D)⁻¹, so the closed loop has state matrix A + B K J C, input matrix B K, output matrix C + D K J C and feedthrough D K. The loop is well-posed when 1 - J D is invertible; the definition takes that proof.

def LTISystem.WellPosed {m : Type u_2} {p : Type u_3} {n₁ : Type u_4} {n₂ : Type u_5} [Fintype m] [DecidableEq m] [Fintype p] (S₁ : LTISystem n₁ m p) (S₂ : LTISystem n₂ p m) (σ : ℝ) :

The feedback loop of S₁ : m → p and S₂ : p → m with sign σ is well-posed when 1 - σ D₂ D₁ is invertible.

theorem LTISystem.wellPosed_of_D_eq_zero {m : Type u_2} {p : Type u_3} {n₁ : Type u_4} {n₂ : Type u_5} [Fintype m] [DecidableEq m] [Fintype p] {S₁ : LTISystem n₁ m p} (S₂ : LTISystem n₂ p m) (σ : ℝ) (h : S₁.D = 0) :
S₁.WellPosed S₂ σ

A loop in which S₁ has no direct feedthrough is well-posed.

def LTISystem.loopMatrix {m : Type u_2} {p : Type u_3} [DecidableEq m] [DecidableEq p] (σ : ℝ) :
Matrix (m ⊕ p) (p ⊕ m) ℝ

The interconnection of a feedback loop with sign σ, from the outputs (y₁, y₂) to the inputs (u₁, u₂) = (σ y₂, y₁).

theorem LTISystem.isUnit_one_sub_loopMatrix_mul_iff {m : Type u_2} {p : Type u_3} {n₁ : Type u_4} {n₂ : Type u_5} [Fintype m] [DecidableEq m] [Fintype p] [DecidableEq p] (S₁ : LTISystem n₁ m p) (S₂ : LTISystem n₂ p m) (σ : ℝ) :
IsUnit (1 - loopMatrix σ * (S₁.blockDiag S₂).D) ↔ S₁.WellPosed S₂ σ

The loop is well-posed iff static output feedback with loopMatrix σ around the two systems side by side is.

noncomputable def LTISystem.feedback {m : Type u_2} {p : Type u_3} {n₁ : Type u_4} {n₂ : Type u_5} [Fintype m] [DecidableEq m] [Fintype p] [DecidableEq p] (S₁ : LTISystem n₁ m p) (S₂ : LTISystem n₂ p m) (σ : ℝ) (h : S₁.WellPosed S₂ σ) :
LTISystem (n₁ ⊕ n₂) (m ⊕ p) (p ⊕ m)

The feedback loop u₁ = σ y₂ + r₁, u₂ = y₁ + r₂ of S₁ : u₁ ↦ y₁ and S₂ : u₂ ↦ y₂, for a well-posed loop: static output feedback with loopMatrix σ around blockDiag S₁ S₂. Its state is (x₁, x₂), its input (r₁, r₂) and its output (y₁, y₂); σ = -1 is negative feedback.

theorem LTISystem.feedback_A_of_D_eq_zero {m : Type u_2} {p : Type u_3} {n₁ : Type u_4} {n₂ : Type u_5} [Fintype m] [DecidableEq m] [Fintype p] [DecidableEq p] {S₁ : LTISystem n₁ m p} (S₂ : LTISystem n₂ p m) (σ : ℝ) (h : S₁.WellPosed S₂ σ) (hD : S₁.D = 0) :
(S₁.feedback S₂ σ h).A = Matrix.fromBlocks (S₁.A + σ • (S₁.B * S₂.D * S₁.C)) (σ • (S₁.B * S₂.C)) (S₂.B * S₁.C) S₂.A

The closed-loop state matrix without feedthrough in S₁. If D₁ = 0, the feedback loop has state matrix [[A₁ + σ B₁ D₂ C₁, σ B₁ C₂], [B₂ C₁, A₂]].

The characteristic equation #

theorem LTISystem.det_closeLoop {n : Type u_1} {m : Type u_2} {p : Type u_3} [Fintype n] [DecidableEq n] [Fintype m] [DecidableEq m] [Fintype p] (S : LTISystem n m p) (J : Matrix m p ℝ) (hJ : IsUnit (1 - J * S.D)) {s : ℂ} (hs : IsUnit (s • 1 - S.A.map ⇑(algebraMap ℝ ℂ))) :
(s • 1 - (S.closeLoop J hJ).A.map ⇑(algebraMap ℝ ℂ)).det * (1 - J.map ⇑(algebraMap ℝ ℂ) * S.D.map ⇑(algebraMap ℝ ℂ)).det = (s • 1 - S.A.map ⇑(algebraMap ℝ ℂ)).det * (1 - J.map ⇑(algebraMap ℝ ℂ) * S.transferFunction s).det

The characteristic equation of static output feedback. Off the spectrum of A, det (s I - A_cl) det (1 - J D) = det (s I - A) det (1 - J H(s)), with every real matrix read over ℂ.

theorem LTISystem.isUnit_smul_one_sub_map_of_isHurwitz {n : Type u_1} [Fintype n] [DecidableEq n] {A : Matrix n n ℝ} (hA : A.IsHurwitz) {s : ℂ} (hs : 0 ≤ s.re) :

s I - A is invertible on the closed right half-plane when A is Hurwitz.

theorem LTISystem.closeLoop_isHurwitz_of_det_ne_zero {n : Type u_1} {m : Type u_2} {p : Type u_3} [Fintype n] [DecidableEq n] [Fintype m] [DecidableEq m] [Fintype p] (S : LTISystem n m p) (J : Matrix m p ℝ) (hJ : IsUnit (1 - J * S.D)) (hA : S.A.IsHurwitz) (hL : ∀ (s : ℂ), 0 ≤ s.re → (1 - J.map ⇑(algebraMap ℝ ℂ) * S.transferFunction s).det ≠ 0) :

Internal stability of static output feedback from its characteristic equation. If A is Hurwitz and det (1 - J H(s)) ≠ 0 on re s ≥ 0, the closed loop is internally stable.

theorem LTISystem.det_feedback {m : Type u_2} {p : Type u_3} {n₁ : Type u_4} {n₂ : Type u_5} [Fintype m] [DecidableEq m] [Fintype p] [DecidableEq p] [Fintype n₁] [DecidableEq n₁] [Fintype n₂] [DecidableEq n₂] (S₁ : LTISystem n₁ m p) (S₂ : LTISystem n₂ p m) (σ : ℝ) (h : S₁.WellPosed S₂ σ) {s : ℂ} (h₁ : IsUnit (s • 1 - S₁.A.map ⇑(algebraMap ℝ ℂ))) (h₂ : IsUnit (s • 1 - S₂.A.map ⇑(algebraMap ℝ ℂ))) :
(s • 1 - (S₁.feedback S₂ σ h).A.map ⇑(algebraMap ℝ ℂ)).det * (1 - ↑σ • (S₂.D.map ⇑(algebraMap ℝ ℂ) * S₁.D.map ⇑(algebraMap ℝ ℂ))).det = (s • 1 - S₁.A.map ⇑(algebraMap ℝ ℂ)).det * (s • 1 - S₂.A.map ⇑(algebraMap ℝ ℂ)).det * (1 - ↑σ • (S₂.transferFunction s * S₁.transferFunction s)).det

The characteristic equation of the feedback loop. Off the spectra of A₁ and A₂, det (s I - A_cl) det (1 - σ D₂ D₁) = det (s I - A₁) det (s I - A₂) det (1 - σ H₂(s) H₁(s)).

theorem LTISystem.feedback_isHurwitz_of_det_ne_zero {m : Type u_2} {p : Type u_3} {n₁ : Type u_4} {n₂ : Type u_5} [Fintype m] [DecidableEq m] [Fintype p] [DecidableEq p] [Fintype n₁] [DecidableEq n₁] [Fintype n₂] [DecidableEq n₂] {S₁ : LTISystem n₁ m p} {S₂ : LTISystem n₂ p m} {σ : ℝ} (h : S₁.WellPosed S₂ σ) (h₁ : S₁.A.IsHurwitz) (h₂ : S₂.A.IsHurwitz) (hL : ∀ (s : ℂ), 0 ≤ s.re → (1 - ↑σ • (S₂.transferFunction s * S₁.transferFunction s)).det ≠ 0) :
(S₁.feedback S₂ σ h).A.IsHurwitz

Internal stability of a feedback loop from its characteristic equation. If A₁ and A₂ are Hurwitz, the loop is well-posed and det (1 - σ H₂(s) H₁(s)) ≠ 0 on re s ≥ 0, then every eigenvalue of the closed-loop state matrix has negative real part.

Small gain for SISO loops #

theorem LTISystem.feedback_isHurwitz_of_norm_loop_le {n₁ : Type u_1} {n₂ : Type u_2} {m : Type u_3} {p : Type u_4} [Fintype n₁] [DecidableEq n₁] [Fintype n₂] [DecidableEq n₂] [Fintype m] [DecidableEq m] [Unique m] [Fintype p] [DecidableEq p] [Unique p] {S₁ : LTISystem n₁ m p} {S₂ : LTISystem n₂ p m} {σ ρ : ℝ} (h : S₁.WellPosed S₂ σ) (h₁ : S₁.A.IsHurwitz) (h₂ : S₂.A.IsHurwitz) (hρ : ρ < 1) (hL : ∀ (ω : ℝ), ‖↑σ * (S₂.transferFunction (↑ω * Complex.I) default default * S₁.transferFunction (↑ω * Complex.I) default default)‖ ≤ ρ) :
(S₁.feedback S₂ σ h).A.IsHurwitz

Small-gain theorem, loop-gain form, for SISO loops. Let S₁ and S₂ be single-input single-output systems with Hurwitz state matrices in a well-posed feedback loop with sign (or gain) σ. If the loop gain L(iω) = σ H₂(iω) H₁(iω) satisfies |L(iω)| ≤ ρ for every real ω, with ρ < 1, then the closed loop is internally stable: its state matrix is Hurwitz.

The hypothesis bounds the loop transfer function on the imaginary axis, which is weaker than bounding the product of the two peak gains.

theorem LTISystem.feedback_isHurwitz_of_norm_le {n₁ : Type u_1} {n₂ : Type u_2} {m : Type u_3} {p : Type u_4} [Fintype n₁] [DecidableEq n₁] [Fintype n₂] [DecidableEq n₂] [Fintype m] [DecidableEq m] [Unique m] [Fintype p] [DecidableEq p] [Unique p] {S₁ : LTISystem n₁ m p} {S₂ : LTISystem n₂ p m} {σ ρ : ℝ} (h : S₁.WellPosed S₂ σ) (h₁ : S₁.A.IsHurwitz) (h₂ : S₂.A.IsHurwitz) (hσ : |σ| ≤ 1) (hρ : ρ < 1) (hS₁ : ∀ (ω : ℝ), ‖S₁.transferFunction (↑ω * Complex.I) default default‖ ≤ ρ) (hS₂ : ∀ (ω : ℝ), ‖S₂.transferFunction (↑ω * Complex.I) default default‖ ≤ 1) :
(S₁.feedback S₂ σ h).A.IsHurwitz

Small gain against a unit-bounded block, for SISO loops. If S₁ and S₂ have Hurwitz state matrices, |H₁(iω)| ≤ ρ < 1 and |H₂(iω)| ≤ 1 for every real ω, then every well-posed feedback loop of S₁ and S₂ with |σ| ≤ 1 is internally stable: the supplied realization S₁.feedback S₂ σ h has a Hurwitz state matrix.

This is the small-gain step used in the sufficiency proof of [DFT92], §4.2, Theorem 1. For a multiplicative perturbation P̃ = (1 + Δ W₂) P of a plant in a loop with controller C, take S₂ a realization of Δ and S₁ one of the transfer function -W₂ T that Δ sees, T = P C / (1 + P C) (Figures 4.4 and 4.5 there); then |W₂ T(iω)| ≤ ρ < 1 and ‖Δ‖∞ ≤ 1 give internal stability of this Δ-loop. The cited theorem concludes internal stability for every admissible perturbation of a nominal internally stabilized plant. Identifying a particular feedback realization with that perturbed plant–controller loop, up to a similarity of state and an exchange of signals, is client work and is not done here; nor is the converse half of the cited theorem.