Public API

Hurwitz Stability

PaceControl.hurwitz_stableFunction
hurwitz_stable(coefs::Vector{T}) where T -> Int

Check stability using the Routh-Hurwitz criterion.

Description

This function implements the Routh-Hurwitz stability criterion for polynomials. A polynomial is said to be Hurwitz stable if all its roots have negative real parts.

Arguments

  • coefs::Vector{T}: Vector of polynomial coefficients in descending order of powers (highest degree coefficient first)

Returns

  • true: System is Hurwitz stable (all roots have negative real parts)
  • false: System is Hurwitz unstable (has roots with positive real parts, or on the imaginary axis)

Algorithm

The function constructs the Hurwitz matrix from the polynomial coefficients and checks the signs of its principal minors:

  1. Construct Hurwitz Matrix: Build the n×n Hurwitz matrix H from the n+1 polynomial coefficients
  2. Check Principal Minors: Verify that all principal minors of H have the correct sign
  3. Determine Stability: Based on the signs of the minors, determine if the system is stable

Example

using PaceControl

# Stable polynomial: s³ + 3s² + 3s + 1 (has a triple root at -1)
coefs_stable = [1.0, 3.0, 3.0, 1.0]
result = hurwitz_stable(coefs_stable) # Should return true

# Unstable polynomial: s³ + s² - s - 1 (has root at 1)
coefs_unstable = [1.0, 1.0, -1.0, -1.0]
result = hurwitz_stable(coefs_unstable) # Should return false

H∞-norm Computation

PaceControl.Hinf_StHaFunction
Hinf_StHa(P; starting_precision::Int32=Int32(2))

Compute the H∞-norm of a transfer function using the Sturm-Habicht method.

Description

This function computes the H∞-norm of a transfer function G ∈ ℝ(s)^{u×v} using the Sturm-Habicht method. The H∞-norm is defined as:

‖G‖∞ = max{ω ∈ ℝ} σ_max(G(iω))

where σ_max denotes the maximum singular value.

Arguments

  • P: A bivariate polynomial P(ω, γ) ∈ (ℤ[γ])[ω] such that the curve {(ω, γ) ∈ ℝ² | P(ω, γ) = 0} is bounded in the γ-direction
  • starting_precision: (optional) Starting precision for interval arithmetic computations (default: 2)

Returns

  • An isolating interval containing the H∞-norm value

Algorithm

The Sturm-Habicht method follows these steps:

  1. Compute Sturm-Habicht Sequence: Compute {Sresj(P, ∂P/∂ω, ω)}{j=0,…,deg_ω(P)}
  2. Find Real Roots: Compute y₁ < … < y_m, the real roots of Sres₀
  3. Evaluate Conditions: For i from 1 to m:
    • If y{1-i+m} ∈ Vℝ(⟨Lc(P)⟩), return the isolating interval of y{1-i+m}
    • Else if SignVariations({sign(sthad(ω)(y{1-i+m})), …, sign(stha₁(y{1-i+m}))}) > 0, return the isolating interval of y_{1-i+m}

Example

using PaceControl, Nemo, AbstractAlgebra

# Method 1: With polynomial P(γ, ω)
S, γ = polynomial_ring(Nemo.QQ, "γ")
S2, ω = polynomial_ring(S, "ω")
P = (4*γ - 1)*(4*γ + 1)*ω^4 - 4*(2*γ - 1)*(2*γ + 1)*ω^2 + 16*(γ - 1)*(γ + 1)

hinf_norm = Hinf_StHa(P)
println("H∞-norm: ", hinf_norm)

# Method 2: With transfer matrix G(s)
S1, (y, s) = rational_function_field(AbstractAlgebra.QQ, [:y, :s])
G = [s//(s+1) -s//(s+1); -s//(s+1) 1//(s+1)]

hinf_norm = Hinf_StHa(G)
println("H∞-norm: ", hinf_norm)

References

  • Bouzidi, Y., Quadrat, A., Rouillier, F., & Younes, G. (2021). "Computation of the L∞-norm of Finite-Dimensional Linear Systems." In Mathematical Software – ICMS 2021, Springer.
Hinf_StHa(G::Matrix{T}; starting_precision::Int32=Int32(2)) where T

Compute the H∞-norm of a transfer function matrix using the Sturm-Habicht method.

Description

This function computes the H∞-norm of a transfer function matrix G ∈ ℝ(s)^{u×v} using the Sturm-Habicht method. The H∞-norm is defined as:

‖G‖∞ = max{ω ∈ ℝ} σ_max(G(iω))

where σ_max denotes the maximum singular value.

Arguments

  • G: A transfer function matrix G(s) ∈ ℝ(s)^{u×v} with no poles on the imaginary axis
  • starting_precision: (optional) Starting precision for interval arithmetic computations (default: 2)

Returns

  • An isolating interval containing the H∞-norm value

Algorithm

The method constructs the polynomial P(ω, γ) from the transfer function matrix G(s) by:

  1. Form Φ_γ(s): Construct Φγ(s) = γ²Iv - G^T(-s)G(s)
  2. Compute Determinant: Compute det(Φ_γ(iω)) = n(ω, γ)/d(ω) where n ∈ ℝ[ω, γ] and d ∈ ℝ[ω]
  3. Apply Sturm-Habicht: Use the Sturm-Habicht method on the polynomial n(ω, γ)

Example

using PaceControl, AbstractAlgebra

# Define transfer function matrix
S1, (y, s) = rational_function_field(AbstractAlgebra.QQ, [:y, :s])
G = [s//(s+1) -s//(s+1); -s//(s+1) 1//(s+1)]

# Compute H∞-norm
hinf_norm = Hinf_StHa(G)
println("H∞-norm: ", hinf_norm)

# With higher precision
hinf_norm_precise = Hinf_StHa(G, starting_precision=Int32(10))
println("H∞-norm (high precision): ", hinf_norm_precise)

References

  • Bouzidi, Y., Quadrat, A., Rouillier, F., & Younes, G. (2021). "Computation of the L∞-norm of Finite-Dimensional Linear Systems." In Mathematical Software – ICMS 2021, Springer.