Skip to content
Systems Theory

Reachability and controllability: Kalman's test and the Gramian

Definitions, Kalman's test with proof and the Cayley-Hamilton theorem, the continuous case with the Gramian and minimum-energy input, an example with two subsystems, the PBH test, stabilisability.

Before designing a controller one must ask whether the input can take the system where we want. It is not obvious: a car cannot move sideways from rest, and two identical tanks fed by the same tap cannot have different levels. Reachability answers with a test on the rank of a matrix. In this lesson we look at the definitions, Kalman’s test with the discrete-time proof and the role of the Cayley-Hamilton theorem, the continuous-time proof with the Gramian, the difference between reachability and controllability and an example with two subsystems.

Definitions

A state x_f is reachable if there is an input that takes the system from the zero state to x_f in finite time. The system is reachable if all states are. A state is controllable if there is an input that takes it to zero in finite time. For continuous-time linear systems the two properties coincide; in discrete time they do not, as we shall see.

Kalman’s test in discrete time

Define the reachability matrix

    \[ \mathcal{R} = \begin{pmatrix} B & AB & A^2B & \cdots & A^{n-1}B \end{pmatrix} \]

with n block columns, i.e. n\times nm.

Theorem. The system x(k+1) = Ax(k) + Bu(k) is reachable if and only if \mathrm{rank}\,\mathcal{R} = n. In that case every state is reached in at most n steps.

Proof. Starting from x(0) = 0, the solution (lesson on discrete systems) after k steps is

    \[ x(k) = \sum_{j=0}^{k-1}A^{k-1-j}Bu(j) = \begin{pmatrix} B & AB & \cdots & A^{k-1}B \end{pmatrix}\begin{pmatrix} u(k-1) \\ \vdots \\ u(0) \end{pmatrix} \]

The states reachable in k steps are therefore the image of the matrix (B\ \ AB\ \cdots\ A^{k-1}B). By the Cayley-Hamilton theorem every matrix satisfies its own characteristic polynomial, A^n + a_{n-1}A^{n-1} + \dots + a_0I = 0, so A^n and all higher powers are linear combinations of I, A, \dots, A^{n-1}. The columns A^kB with k \ge n add no new directions: the set of reachable states stops growing after n steps and is the image of \mathcal{R}. It equals the whole of \mathbb{R}^n if and only if \mathcal{R} has rank n. ∎

The reachable subspace is the image of \mathcal{R}: if the rank is less than n, the input can move the state only within this subspace, whatever it does.

The continuous case and the Gramian

Theorem. The system \dot{x} = Ax + Bu is reachable if and only if \mathrm{rank}\,\mathcal{R} = n, with the same matrix \mathcal{R}. Moreover, in that case every state is reached in any time T \gt  0.

Proof. *Necessity.* If the rank is less than n, there is a vector v \ne 0 orthogonal to all the columns of \mathcal{R}: v^TA^kB = 0 for k \lt  n, and by Cayley-Hamilton for every k. Summing the exponential series, v^Te^{At}B = 0 for every t. From Lagrange’s formula with zero initial state, v^Tx(t) = \int_0^t v^Te^{A(t-\tau)}Bu(\tau)d\tau = 0: the state always stays orthogonal to v, and states with v^Tx_f \ne 0 are unreachable.

*Sufficiency.* Define the reachability Gramian

    \[ W(T) = \int_0^T e^{A\tau}BB^Te^{A^T\tau}\,d\tau \]

If W(T) is invertible, the input u(t) = B^Te^{A^T(T-t)}\,W(T)^{-1}x_f takes the state from 0 to x_f. Indeed by Lagrange’s formula

    \[ x(T) = \int_0^T e^{A(T-t)}BB^Te^{A^T(T-t)}\,dt\;W(T)^{-1}x_f \]

and with \tau = T - t the integral is exactly W(T), so x(T) = x_f. It remains to note that W(T) is invertible when the rank is full: if W(T)v = 0, then v^TW(T)v = \int_0^T\|B^Te^{A^T\tau}v\|^2d\tau = 0, so v^Te^{A\tau}B = 0 for every \tau; differentiating at \tau = 0 gives v^TA^kB = 0 for every k, i.e. v orthogonal to \mathcal{R}, and with full rank v = 0. ∎

The input found with the Gramian is also the one of minimum energy \int\|u\|^2dt among all those achieving the same transfer. If T is very small, W(T) is nearly singular and enormous inputs are needed: reachability says it can be done, not that it is easy.

An example

Two identical subsystems driven by the same input, in parallel and in series
(a) Two identical first-order systems fed by the same input: the reachability matrix has rank 1, and the states cannot be made different. (b) The same two systems in series: rank 2, every state is reachable.

(a) In parallel. Two equal tanks fed by the same tap: A = -I, B = (1\ \ 1)^T. Then AB = (-1\ \ -1)^T and \mathcal{R} has two proportional columns: rank 1. One can also see it directly: the difference x_1 - x_2 satisfies \frac{d}{dt}(x_1 - x_2) = -(x_1 - x_2), with no input. Starting from equal levels they stay equal forever.

(b) In series. The second tank is fed by the first: A = \begin{pmatrix} -1 & 0 \\ 1 & -1 \end{pmatrix}, B = (1\ \ 0)^T. Then AB = (-1\ \ 1)^T and \mathcal{R} = \begin{pmatrix} 1 & -1 \\ 0 & 1 \end{pmatrix} has determinant 1: rank 2. Acting only on the first, by playing with timing, the system can be brought to any pair of levels (even with the second higher than the first, for an instant).

Reachability, controllability and alternative tests

In discrete time, if A is singular a system can be controllable (driven to zero) without being reachable: with A = 0 and B = 0, every state goes to zero in one step by itself, but no non-zero state can be reached.

An equivalent test, useful to understand which mode is unreachable, is the Popov-Belevitch-Hautus test: the system is reachable if and only if \mathrm{rank}\begin{pmatrix} \lambda I - A & B \end{pmatrix} = n for every eigenvalue \lambda of A. An eigenvalue that makes the rank drop corresponds to a mode on which the input has no effect at all.

Reachability is exactly the condition for being able to assign all the eigenvalues with state feedback u = -Kx (Automatic Control lesson on state space). If the system is not reachable, the eigenvalues of the unreachable part stay as they are: the system can be stabilised only if they are already stable, and it is then called stabilisable.

Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
0
Would love your thoughts, please comment.x
()
x