Skip to content
ELECTRONICS ENGINEERINGelectronics-engineering.com
Systems Theory

Reachability in depth: the Gramian computed, the minimum-energy input and the PBH test

The Gramian of the double integrator computed step by step, the input that moves the state and the proof that it is the minimum-energy one, the cost of being quick, a discrete-time example and the Popov-Belevitch-Hautus test.

https://www.electronics-engineering.com/en/reachability-in-depth-gramian-minimum-energy/

No ratings yet: be the first to rate this page.

This page goes deeper into the lesson on reachability and controllability: it computes the Gramian in full on an example, the double integrator, derives the input that moves the state and proves that it is the minimum-energy one, shows the cost of being quick, solves a discrete-time example in the minimum number of steps and applies the PBH test to find the mode that the input cannot see.

The Gramian computed by hand: the double integrator

The best way to understand the Gramian is to compute it in full once. Take the double integrator, a unit mass pushed by a force: x_1 is the position, x_2 the velocity, u the force.

    \[ \dot x_1 = x_2,\qquad \dot x_2 = u\qquad\Rightarrow\qquad A = \begin{pmatrix} 0 & 1 \\ 0 & 0 \end{pmatrix},\quad B = \begin{pmatrix} 0 \\ 1 \end{pmatrix} \]

Step 1: Kalman’s test. AB = (1\ \ 0)^T, so \mathcal{R} = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}, with determinant -1: rank 2, the system is reachable.

Step 2: the exponential. Since A^2 = 0, the series stops at the second term: e^{A\tau} = I + A\tau = \begin{pmatrix} 1 & \tau \\ 0 & 1 \end{pmatrix}, and therefore e^{A\tau}B = (\tau\ \ 1)^T.

Step 3: the Gramian. Integrate the product of the vector with its transpose:

    \[ W(T) = \int_0^T \begin{pmatrix} \tau \\ 1 \end{pmatrix}\begin{pmatrix} \tau & 1 \end{pmatrix}d\tau = \int_0^T \begin{pmatrix} \tau^2 & \tau \\ \tau & 1 \end{pmatrix}d\tau = \begin{pmatrix} T^3/3 & T^2/2 \\ T^2/2 & T \end{pmatrix} \]

The determinant is T^4/3 - T^4/4 = T^4/12, positive for every T \mathchar"313E  0: the Gramian is invertible, as the theorem promises. The inverse is

    \[ W(T)^{-1} = \frac{12}{T^4}\begin{pmatrix} T & -T^2/2 \\ -T^2/2 & T^3/3 \end{pmatrix} \]

Step 4: the input. We want to move the mass by d and leave it at rest: x_f = (d\ \ 0)^T. Then W(T)^{-1}x_f = \left(\frac{12d}{T^3}\ \ -\frac{6d}{T^2}\right)^T. With s = T - t we have B^Te^{A^Ts} = (s\ \ 1), and the input given by the Gramian formula is

    \[ u(t) = (T - t)\frac{12d}{T^3} - \frac{6d}{T^2} = \frac{6d}{T^2}\left(1 - \frac{2t}{T}\right) \]

A linearly decreasing force: it pushes forward in the first half and brakes in the second, symmetrically.

Step 5: the check. Integrating twice from zero initial conditions:

    \[ x_2(t) = \frac{6d}{T^2}\left(t - \frac{t^2}{T}\right),\qquad x_1(t) = d\left(3\frac{t^2}{T^2} - 2\frac{t^3}{T^3}\right) \]

and at t = T: x_2(T) = 0, x_1(T) = d(3 - 2) = d. The transfer succeeds exactly.

Minimum-energy input for the double integrator
Top: the input u, a straight line going from 6 to minus 6 over the time T (with unit d and T). Bottom: the position x 1, an S-shaped curve from 0 to 1 with horizontal tangent at both ends, and the velocity x 2, dashed, a parabola that is zero at the start and at the end with its maximum halfway.

Why it is the minimum-energy input

The energy spent by this input can be computed without integrating u^2: substituting u = B^Te^{A^T(T-t)}W^{-1}x_f,

    \[ E = \int_0^T u^Tu\,dt = x_f^TW^{-1}\left(\int_0^T e^{A(T-t)}BB^Te^{A^T(T-t)}dt\right)W^{-1}x_f = x_f^TW(T)^{-1}x_f \]

In our example E = \frac{12}{T^4}\,T\,d^2 = \frac{12d^2}{T^3}.

Theorem. Among all the inputs that bring the state from 0 to x_f in a time T, the Gramian one has the minimum energy.

Proof. Let u + \delta be another input performing the same transfer. By Lagrange’s formula the difference \delta must produce a zero final state: \int_0^T e^{A(T-t)}B\delta(t)\,dt = 0. The energy is

    \[ \int_0^T\|u + \delta\|^2dt = \int_0^T\|u\|^2dt + 2\int_0^T u^T\delta\,dt + \int_0^T\|\delta\|^2dt \]

The cross term is 2\,x_f^TW^{-1}\int_0^T e^{A(T-t)}B\delta\,dt = 0. What remains is E + \int\|\delta\|^2 \ge E, with equality only for \delta = 0. ∎

Minimum energy versus the time allowed
The violet curve is 12 d squared over T cubed, with unit d: it is 12 for T equal to 1 and 96 for T equal to one half. Halving the time multiplies the required energy by eight.

The practical meaning. Halving the allowed time multiplies the energy by 8 and the peak force 6d/T^2 by 4. This is why a system that is reachable “in theory” may not be so in practice: actuators have limits, and a nearly singular Gramian (directions of the state that the input moves with difficulty) turns into huge inputs.

A discrete-time example: arriving in n steps

The system x(k+1) = Ax(k) + Bu(k) with

    \[ A = \begin{pmatrix} 1 & 1 \\ 0 & 1 \end{pmatrix},\qquad B = \begin{pmatrix} 0 \\ 1 \end{pmatrix} \]

is the sampled double integrator (position and velocity, with the step as the unit of time). AB = (1\ \ 1)^T, \mathcal{R} = \begin{pmatrix} 0 & 1 \\ 1 & 1 \end{pmatrix}, determinant -1: reachable, so every state is reached in at most two steps.

We want x_f = (1\ \ 0)^T. From the solution formula

    \[ x(2) = ABu(0) + Bu(1) = \begin{pmatrix} u(0) \\ u(0) + u(1) \end{pmatrix} = \begin{pmatrix} 1 \\ 0 \end{pmatrix}\quad\Rightarrow\quad u(0) = 1,\ u(1) = -1 \]

Check: x(1) = Bu(0) = (0\ \ 1)^T (the mass has gained speed), x(2) = Ax(1) + Bu(1) = (1\ \ 1)^T + (0\ \ -1)^T = (1\ \ 0)^T. In one step it would be impossible: Bu(0) = (0\ \ u(0))^T only changes the velocity. In discrete time the minimum number of steps is tied to the rank of the partial matrices (B\ \ AB\ \cdots), and it is the principle of deadbeat control (lesson on digital control).

The PBH test on an example

Take again the two tanks in parallel from the example in the lesson, A = -I, B = (1\ \ 1)^T. The only eigenvalue is \lambda = -1, and

    \[ \begin{pmatrix} \lambda I - A & B \end{pmatrix} = \begin{pmatrix} 0 & 0 & 1 \\ 0 & 0 & 1 \end{pmatrix} \]

has rank 1: the test fails at \lambda = -1. The vector v = (1\ \ -1)^T, which annihilates the matrix from the left (v^T(\lambda I - A) = 0 and v^TB = 0), points to the combination of the state that the input cannot see: exactly the level difference x_1 - x_2, which evolves on its own with the mode e^{-t}.

Common mistakes

  • Computing the determinant when \mathcal{R} is not square: with m inputs \mathcal{R} is n \times nm, and what counts is the rank, not the determinant (which does not exist).
  • Stopping at AB with n = 3: all powers up to A^{n-1}B are needed.
  • Confusing reachability and stability: an unstable system can be perfectly reachable (and therefore stabilizable by feedback), a stable one may not be.
  • Bringing C in: reachability depends only on A and B; the output concerns observability.
  • Thinking that time matters in continuous time: if the system is reachable, it is so in any time T; the time only changes the “price”, that is the energy x_f^TW(T)^{-1}x_f.

Exercises on the topic, from Kalman’s test to the minimum energy, are on the exercise page linked at the top.

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