Controllability and observability tests#

Controllability and observability tests: structural (graph) and numerical (rank).

A system \((\mathbf{A},\mathbf{B})\) is controllable if the state can be driven from any initial value to any final value in finite time; Kalman’s criterion asks for \(\operatorname{rank}[\mathbf{B},\mathbf{A}\mathbf{B},\dots,\mathbf{A}^{N-1}\mathbf{B}]=N\). A structured system fixes only the zero pattern of the matrices; it is structurally controllable if almost all numerical realizations of the pattern are controllable. Lin’s theorem characterizes structural controllability by two graph conditions:

  1. accessibility: every state can be reached from an input in the system graph;

  2. no dilation: the generic rank of \([\mathbf{A},\mathbf{B}]\) is \(N\) (a matching covers every state).

Observability is the dual property of \((\mathbf{A}^{\mathsf T},\mathbf{C}^{\mathsf T})\).

Lin’s structural test, Kalman and PBH tests, generic controllable subspace, control centrality.

Functions#

structural_rank(M)

Generic (structural) rank of a matrix: the size of a maximum matching between its rows and columns through non-zero entries.

is_structurally_controllable(A, B)

Lin's structural controllability test.

is_structurally_observable(A, C)

Structural observability: structural controllability of the dual pair \((\mathbf{A}^{\mathsf T},\mathbf{C}^{\mathsf T})\).

accessible_states(A, B)

Boolean mask of the states reachable from the inputs in the graph of \((\mathbf{A},\mathbf{B})\).

controllability_matrix(A, B)

Kalman controllability matrix \([\mathbf{B},\mathbf{A}\mathbf{B},\dots,\mathbf{A}^{N-1}\mathbf{B}]\) (dense).

observability_matrix(A, C)

Kalman observability matrix \([\mathbf{C};\mathbf{C}\mathbf{A};\dots;\mathbf{C}\mathbf{A}^{N-1}]\) (dense).

controllable_subspace_dimension(A, B[, tol])

Dimension of the controllable subspace of a numerical pair.

generic_controllable_dimension(A, B[, ...])

Generic dimension of the controllable subspace of a structured pair.

is_controllable(A, B[, method, tol, ...])

Controllability of \((\mathbf{A},\mathbf{B})\).

is_observable(A, C[, method, tol, random_state])

Observability of \((\mathbf{A},\mathbf{C})\); dual of is_controllable().

pbh_uncontrollable_modes(A, B[, tol])

Eigenvalues \(\lambda\) of \(\mathbf{A}\) with \(\operatorname{rank}[\mathbf{A}-\lambda\mathbf{I},\mathbf{B}]<N\) (PBH test).

control_centrality(A[, B, nodes, method, ...])

Control centrality: generic dimension of the controllable subspace from one node.

observe_centrality(A[, C, nodes, method, ...])

Observe centrality: control centrality of the dual system (MATLAB observeCentrality).

random_realization(M[, random_state, low, high])

Random numerical realization of a zero pattern: magnitudes in [low, high], random signs.