Algorithm Search⌘K

Theoremcore

Kalman rank condition

Also called controllability matrix test, Kalman controllability test.

An LTI system is controllable if and only if the matrix [B, AB, ..., A^(n-1)B] has full rank n, and observable by the dual test.

The Kalman rank condition decides controllability of a linear time-invariant system by one rank computation: the pair (A,B)(A, B) is controllable if and only if the controllability matrix [B,AB,…,An−1B][B, AB, \dots, A^{n-1} B] has rank nn, the dimension of the state. The transposed test decides observability. The proof also shows that the range of this matrix is exactly the set of states the input can reach. The test is exact in rational arithmetic, but in floating point it is badly conditioned, and numerical codes use orthogonal methods or the Popov-Belevitch-Hautus test instead.

Statement

Let A∈Rn×nA \in \mathbb{R}^{n \times n}, B∈Rn×mB \in \mathbb{R}^{n \times m} and C∈Rp×nC \in \mathbb{R}^{p \times n}. Define the controllability matrix and the observability matrix

C=[BAB⋯An−1B]∈Rn×nm,O=[CCA⋮CAn−1]∈Rpn×n.\mathcal{C} = \begin{bmatrix} B & AB & \cdots & A^{n-1} B \end{bmatrix} \in \mathbb{R}^{n \times nm}, \qquad \mathcal{O} = \begin{bmatrix} C \\ CA \\ \vdots \\ CA^{n-1} \end{bmatrix} \in \mathbb{R}^{pn \times n}.

Theorem. For the system x˙=Ax+Bu\dot x = A x + B u, y=Cx+Duy = C x + D u with piecewise continuous inputs, and for every T>0T > 0:

  1. The set of states x(T)x(T) reachable from x(0)=0x(0) = 0 is the subspace range⁡C\operatorname{range} \mathcal{C}.
  2. (A,B)(A, B) is controllable if and only if rank⁡C=n\operatorname{rank} \mathcal{C} = n.
  3. The set of initial states x0x_0 with CeAtx0=0C e^{At} x_0 = 0 for all t∈[0,T]t \in [0, T] is the subspace ker⁡O\ker \mathcal{O}.
  4. (C,A)(C, A) is observable if and only if rank⁡O=n\operatorname{rank} \mathcal{O} = n.

For the discrete-time system xk+1=Axk+Bukx_{k+1} = A x_k + B u_k, the states reachable from x0=0x_0 = 0 in N≥nN \ge n steps form range⁡C\operatorname{range} \mathcal{C}, and the outputs y0,…,yN−1y_0, \dots, y_{N-1} with zero input determine x0x_0 if and only if rank⁡O=n\operatorname{rank} \mathcal{O} = n.

In plain words

Push the system with the input and watch where the state can go. The input moves the state along the columns of the input matrix. The dynamics then turn those directions, and turned again, and so on. The theorem says that a finite list is enough: the input directions and their images under the dynamics, applied up to one time less than the number of state variables. If these directions span the whole state space, every state can be reached. If they span less, the states the input can reach form exactly their span, whatever input and whatever time is used. Observability is the same test on the transposed system: the output must see every direction of the state.

Proof

Step 0: an invariant subspace. By the Cayley-Hamilton theorem, An=−a1An−1−⋯−anIA^n = -a_1 A^{n-1} - \dots - a_n I, where sn+a1sn−1+⋯+ans^n + a_1 s^{n-1} + \dots + a_n is the characteristic polynomial of AA. By induction on kk, every AkBA^k B with k≥nk \ge n is a linear combination of B,AB,…,An−1BB, AB, \dots, A^{n-1} B. So the columns of AkBA^k B lie in range⁡C\operatorname{range} \mathcal{C} for every k≥0k \ge 0.

Step 1: reachable states lie in range⁡C\operatorname{range} \mathcal{C}. With x(0)=0x(0) = 0, x(T)=∫0TeA(T−s)Bu(s) dsx(T) = \int_0^T e^{A(T - s)} B u(s)\, ds. The series eAτB=∑k≥0τkk!AkBe^{A\tau} B = \sum_{k \ge 0} \frac{\tau^k}{k!} A^k B converges, and each term has its columns in range⁡C\operatorname{range} \mathcal{C} by Step 0. A subspace of Rn\mathbb{R}^n is closed, so eAτBu(s)∈range⁡Ce^{A\tau} B u(s) \in \operatorname{range} \mathcal{C} for every τ\tau and ss, and so is the integral.

Step 2: the gramian has the same range. Let W=∫0TeAsBBTeATsdsW = \int_0^T e^{As} B B^T e^{A^T s} ds, a symmetric matrix. If vTC=0v^T \mathcal{C} = 0, then vTAkB=0v^T A^k B = 0 for all kk by Step 0, so vTeAsB=0v^T e^{As} B = 0 for all ss, and Wv=0W v = 0. Conversely, if Wv=0W v = 0, then

0=vTWv=∫0T∣BTeATsv∣2ds.0 = v^T W v = \int_0^T \bigl| B^T e^{A^T s} v \bigr|^2 ds .

The integrand is continuous and nonnegative, so vTeAsB=0v^T e^{As} B = 0 for all s∈[0,T]s \in [0, T]. Differentiate kk times at s=0s = 0: vTAkB=0v^T A^k B = 0 for k=0,…,n−1k = 0, \dots, n - 1, so vTC=0v^T \mathcal{C} = 0. Hence ker⁡W=ker⁡CT\ker W = \ker \mathcal{C}^T. Since WW is symmetric, range⁡W=(ker⁡W)⊥=(ker⁡CT)⊥=range⁡C\operatorname{range} W = (\ker W)^\perp = (\ker \mathcal{C}^T)^\perp = \operatorname{range} \mathcal{C}.

Step 3: every state of range⁡C\operatorname{range} \mathcal{C} is reachable. Let x1∈range⁡C=range⁡Wx_1 \in \operatorname{range} \mathcal{C} = \operatorname{range} W, and pick zz with Wz=x1W z = x_1. The input u(s)=BTeAT(T−s)zu(s) = B^T e^{A^T (T - s)} z gives, with the substitution σ=T−s\sigma = T - s,

x(T)=∫0TeA(T−s)BBTeAT(T−s)z ds=∫0TeAσBBTeATσdσ z=Wz=x1.x(T) = \int_0^T e^{A(T - s)} B B^T e^{A^T (T - s)} z\, ds = \int_0^T e^{A\sigma} B B^T e^{A^T \sigma} d\sigma\, z = W z = x_1 .

Steps 1 and 3 prove part 1.

Part 2. From x(0)=x0x(0) = x_0 the state at time TT is eATx0+re^{AT} x_0 + r with rr in the reachable set of part 1. So x0x_0 can be steered to x1x_1 at time TT if and only if x1−eATx0∈range⁡Cx_1 - e^{AT} x_0 \in \operatorname{range} \mathcal{C}. This holds for all x0,x1x_0, x_1 if and only if range⁡C=Rn\operatorname{range} \mathcal{C} = \mathbb{R}^n, that is, rank⁡C=n\operatorname{rank} \mathcal{C} = n. If the rank is less than nn, it fails for every TT, so no time helps.

Parts 3 and 4. If Ox0=0\mathcal{O} x_0 = 0, then CAkx0=0C A^k x_0 = 0 for all kk by Step 0 applied to ATA^T and CTC^T, so CeAtx0=∑ktkk!CAkx0=0C e^{At} x_0 = \sum_k \frac{t^k}{k!} C A^k x_0 = 0. Conversely, if CeAtx0=0C e^{At} x_0 = 0 on [0,T][0, T], differentiating kk times at t=0t = 0 gives CAkx0=0C A^k x_0 = 0 for k=0,…,n−1k = 0, \dots, n - 1. So the set in part 3 is ker⁡O\ker \mathcal{O}. By the reduction on the observability page, the system is observable if and only if this set is {0}\{0\}, that is, if rank⁡O=n\operatorname{rank} \mathcal{O} = n.

Discrete time. By induction, xN=∑k=0N−1AN−1−kBukx_N = \sum_{k=0}^{N-1} A^{N-1-k} B u_k when x0=0x_0 = 0. As the uku_k vary over Rm\mathbb{R}^m, these sums fill range⁡[B,AB,…,AN−1B]\operatorname{range} [B, AB, \dots, A^{N-1} B], which equals range⁡C\operatorname{range} \mathcal{C} for N≥nN \ge n by Step 0. With zero input, yk=CAkx0y_k = C A^k x_0 for k=0,…,N−1k = 0, \dots, N - 1, and the stacked map x0↦(y0,…,yN−1)x_0 \mapsto (y_0, \dots, y_{N-1}) has the same kernel as O\mathcal{O} for N≥nN \ge n, again by Step 0. ■\blacksquare

Consequences

Example. For A=[01−2−3]A = \begin{bmatrix} 0 & 1 \\ -2 & -3 \end{bmatrix} and B=[01]B = \begin{bmatrix} 0 \\ 1 \end{bmatrix}, AB=[1−3]AB = \begin{bmatrix} 1 \\ -3 \end{bmatrix} and C=[011−3]\mathcal{C} = \begin{bmatrix} 0 & 1 \\ 1 & -3 \end{bmatrix} has determinant −1-1: the pair is controllable. With C=[1,1]C = [1, 1], CA=[−2,−2]CA = [-2, -2] and O=[11−2−2]\mathcal{O} = \begin{bmatrix} 1 & 1 \\ -2 & -2 \end{bmatrix} has rank 1: the pair (C,A)(C, A) is not observable, and ker⁡O\ker \mathcal{O} is spanned by (1,−1)(1, -1).

Invariance. For an invertible TT, the controllability matrix of (TAT−1,TB)(T A T^{-1}, T B) is TCT \mathcal{C}, so the rank is a property of the system. For state feedback, range⁡\operatorname{range} of the controllability matrix of (A−BK,B)(A - BK, B) equals range⁡C\operatorname{range} \mathcal{C}, so feedback neither creates nor destroys controllability.

Fewer powers are enough with more inputs. Let r=rank⁡Br = \operatorname{rank} B. Then range⁡C=range⁡[B,AB,…,An−rB]\operatorname{range} \mathcal{C} = \operatorname{range} [B, AB, \dots, A^{n-r} B]. Proof: the subspaces Kj=range⁡[B,…,AjB]K_j = \operatorname{range} [B, \dots, A^j B] grow with jj, and Kj+1=range⁡B+AKjK_{j+1} = \operatorname{range} B + A K_j. If Kj=Kj+1K_j = K_{j+1}, then Kj+2=range⁡B+AKj+1=range⁡B+AKj=Kj+1K_{j+2} = \operatorname{range} B + A K_{j+1} = \operatorname{range} B + A K_j = K_{j+1}, so the sequence is constant from then on. The dimension starts at rr for j=0j = 0, grows by at least one at each step before it stops, and cannot pass nn, so it stops by j=n−rj = n - r. For a controllable pair, the least kk with rank⁡[B,AB,…,Ak−1B]=n\operatorname{rank} [B, AB, \dots, A^{k-1} B] = n is the controllability index of the pair (Chen 1999, Section 6.2.1).

Controllability is generic. The pair is uncontrollable exactly when every n×nn \times n minor of C\mathcal{C} vanishes. These minors are polynomials in the entries of AA and BB, and at least one is not the zero polynomial: it is nonzero at the chain of integrators of the Tightness section, extended to dimension nn and with ene_n as the first column of BB. So the uncontrollable pairs form a closed set with empty interior, and a perturbation of an uncontrollable pair by a random matrix with a density is controllable with probability 1. This is why a model that is "nearly uncontrollable" must be judged by a distance, not by a rank.

Uses. The single-input Ackermann formula inverts C\mathcal{C}, and the pole placement theorem needs rank⁡C=n\operatorname{rank} \mathcal{C} = n. The range of C\mathcal{C} is the Krylov subspace of AA and BB of order nn, and the Kalman decomposition uses it as the first block of coordinates.

Cost. In the real RAM, forming C\mathcal{C} takes n−1n - 1 products of AA with an n×mn \times m block, O(n3m)O(n^3 m) operations, and its rank by Gaussian elimination takes O(n3m)O(n^3 m) more. With rational data and exact rational arithmetic the rank is exact.

Numerical use: a pitfall. In floating point the rank of C\mathcal{C} is a poor test (Paige 1981). The columns AkBA^k B turn toward the dominant eigenvector, as in power iteration, so C\mathcal{C} is close to rank deficient even for systems far from any uncontrollable one. For A=diag⁡(−1,−2,…,−n)A = \operatorname{diag}(-1, -2, \dots, -n) and BB the vector of ones, the pair is controllable for every nn (distinct eigenvalues, and BB reaches each mode). In double precision, the condition number of C\mathcal{C} is about 2.1×10122.1 \times 10^{12} for n=10n = 10 and about 4×10194 \times 10^{19} for n=15n = 15, and for n=15n = 15 the usual rank tolerance (largest singular value times nn times the unit roundoff) gives rank 8. Yet at every eigenvalue λ\lambda of AA the smallest singular value of [A−λI,B][A - \lambda I, B] stays above 0.460.46. The robust measure is the distance to the nearest uncontrollable pair, min⁡λ∈Cσmin⁡[A−λI,B]\min_{\lambda \in \mathbb{C}} \sigma_{\min} [A - \lambda I, B] (Eising 1984, Systems and Control Letters 4(5)). Software uses an orthogonal staircase reduction instead of C\mathcal{C}.

Tightness

The power n−1n - 1 cannot be lowered in general. Take the single-input chain A=[010001000]A = \begin{bmatrix} 0 & 1 & 0 \\ 0 & 0 & 1 \\ 0 & 0 & 0 \end{bmatrix} and B=e3B = e_3, a triple integrator. Then AB=e2AB = e_2 and A2B=e1A^2 B = e_1, so [B,AB][B, AB] has rank 2 and only [B,AB,A2B]=[e3,e2,e1][B, AB, A^2 B] = [e_3, e_2, e_1] has rank 3. The same holds in dimension nn: with one input (r=1r = 1) the bound n−r=n−1n - r = n - 1 of the Consequences section is attained.

The test is for time-invariant systems. For x˙=A(t)x+B(t)u\dot x = A(t) x + B(t) u the pointwise rank of [B(t),A(t)B(t),… ][B(t), A(t) B(t), \dots] does not decide controllability; the test is the time-varying gramian on the linear time-varying system page.

History

Kalman introduced controllability for linear systems in 1960 and tested it with the integral now called the controllability gramian (Kalman 1960). The rank form of the test appears in Kalman, Ho and Narendra (1963), together with the discrete-time case and the effect of sampling. Gilbert (1963) gave the test for systems with distinct eigenvalues in modal coordinates. Paige (1981) showed why the rank test fails as a numerical method and gave a numerically stable orthogonal algorithm.

References

  1. R. E. Kalman, Y. C. Ho and K. S. Narendra, Controllability of linear dynamical systems, Contributions to Differential Equations 1, 189-213, 1963, the rank condition for controllability of time-invariant linear systems
  2. R. E. Kalman, Contributions to the theory of optimal control, Boletín de la Sociedad Matemática Mexicana (2) 5, 102-119, 1960, controllability and its test by the gramian integral
  3. C. C. Paige, Properties of numerical algorithms related to computing controllability, IEEE Transactions on Automatic Control 26(1), 130-138, 1981, why the rank of the controllability matrix is a poor numerical test, and a numerically stable orthogonal alternative
  4. Chi-Tsong Chen, Linear System Theory and Design, third edition, Oxford University Press, 1999, Section 6.2 (controllability and controllability indices), Section 6.3 (observability) and Section 6.6 (discrete time)
  5. Kemin Zhou, John C. Doyle and Keith Glover, Robust and Optimal Control, Prentice Hall, 1996, Section 3.2, Controllability and Observability

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/A2NF3D/text.yaml