pub fn is_ss_observable<T: StateSpaceModel>(model: &T) -> (bool, DMatrix<f64>)Expand description
Checks if a given state-space model is observable.
§Arguments
model- A reference to a state-space model that implements theStateSpaceModeltrait.
§Returns
- A tuple with a
boolwhich istrueif the system is controllable,falseotherwise and the observability matrix.
§Panics
This function will panic if the computation of the controllability matrix fails.
§Examples
use control_sys::analysis;
use control_sys::model;
let ss_model = model::DiscreteStateSpaceModel::from_matrices(
&nalgebra::dmatrix![1.0, -2.0;
2.0, 1.0],
&nalgebra::dmatrix![],
&nalgebra::dmatrix![1.0, 2.0],
&nalgebra::dmatrix![],
0.05,
);
let (is_observable, observability_matrix) = analysis::is_ss_observable(&ss_model);