# harold.controllability_indices¶

harold.controllability_indices(A, B, tol=None)

Computes the controllability indices for a controllable pair (A, B)

Controllability indices are defined as the maximum number of independent columns per input column of B in the following sense: consider the Kalman controllability matrix (widely known as Krylov sequence)

C = [B, AB, ..., A^(n-1)B]


We start testing (starting from the left-most) every column of this matrix whether it is a linear combination of the previous columns. Obviously, since C is (n x nm), there are many ways to pick a linearly independent subset. We select a version from . If a new column is dependent we delete that column and keep doing this until we are left with a full-rank square matrix (this is guaranteed if (A, B) is controllable).

Then at some point, we are necessarily left with columns that are obtained from different input columns

̅C = [b₁,b₂,b₃...,Ab₁,Ab₃,...,A²b₁,A²b₃,...,A⁽ᵏ⁻¹⁾b₃,...]


For example, it seems like Ab₂ is deleted due to dependence on the previous columns to its left. It can be shown that the higher powers will also be dependent and can be removed too. By reordering these columns, we combine the terms that involve each bⱼ

̅C = [b₁,Ab₁,A²b₁,b₂,b₃,Ab₃,A²b₃,...,A⁽ᵏ⁻¹⁾b₃,...]


The controllability index associated with each input column is defined as the number of columns per bⱼ appearing in the resulting matrix. Here, 3 for first input 1 for second and so on.

If B is not full rank then the index will be returned as 0 as that column bⱼ will be dropped too.

Parameters: A (ndarray) – 2D (n, n) real-valued array B (ndarray) – 2D (n, m) real-valued array tol (float) – Tolerance value for the Arnoldi iteration to decide linear dependence. By default it is sqrt(eps)*n² ind (ndarray) – 1D array that holds the computed controllability indices. The sum of the values add up to n if (A, B) is controllable.

Notes

Though internally not used, this function can also be used as a controllability/observability test by summing up the resulting indices and comparing to n.

References

  : W.M. Wonham, “Linear Multivariable Control: A Geometric Approach”, 3rd edition, 1985, Springer, ISBN:9780387960715