Skip to main content

solve_continuous_are

Function solve_continuous_are 

Source
pub fn solve_continuous_are<T: Scalar, S1: Data<Elem = T>, S2: Data<Elem = T>, S3: Data<Elem = T>, S4: Data<Elem = T>>(
    a: &ArrayBase<S1, Ix2>,
    b: &ArrayBase<S2, Ix2>,
    q: &ArrayBase<S3, Ix2>,
    r: &ArrayBase<S4, Ix2>,
) -> Result<Array2<T>>
Expand description

Solves the continuous algebraic Riccati equation Aᴴ X + X A − X B R⁻¹ Bᴴ X + Q = 0 for the stabilising solution X (SciPy’s linalg.solve_continuous_are, without its e and s options), for which A − B R⁻¹ Bᴴ X has all its eigenvalues in the left half-plane.

The Hamiltonian H = [[A, −G], [−Q, −Aᴴ]] with G = B R⁻¹ Bᴴ satisfies H [I; X] = [I; X] (A − G X), so [I; X] spans its stable invariant subspace, the null space of sign(H) + I. The sign function is computed by Newton’s iteration Z ← (Z / c + c Z⁻¹) / 2 with determinant scaling c = |det Z|^{1/2n}; X follows by least squares and is polished by Newton (Kleinman) steps, each a continuous Lyapunov equation. Requires (A, B) stabilisable and no eigenvalues of H on the imaginary axis.