nyx_space::utils

Function are_eigenvalues_stable

Source
pub fn are_eigenvalues_stable<N: DimName>(
    eigenvalues: OVector<Complex<f64>, N>,
) -> bool
Expand description

Checks if the given matrix represents a stable linear system by examining its eigenvalues.

Stability of a linear system is determined by the properties of its eigenvalues:

  • If any eigenvalue has a positive real part, the system is unstable.
  • If the real part of an eigenvalue is zero and the imaginary part is non-zero, the system is oscillatory.
  • If the real part of an eigenvalue is negative, the system tends towards stability.
  • If both the real and imaginary parts of an eigenvalue are zero, the system is invariant.

§Arguments

eigenvalues - A vector of complex numbers representing the eigenvalues of the system.

§Returns

bool - Returns true if the system is stable, false otherwise.

§Example

use nyx_space::utils::are_eigenvalues_stable;
use nyx_space::linalg::Vector2;
use nalgebra::Complex;

let eigenvalues = Vector2::new(Complex::new(-1.0, 0.0), Complex::new(0.0, 1.0));
assert_eq!(are_eigenvalues_stable(eigenvalues), true);

§Source

Chemical Process Dynamics and Controls (Woolf)