Skip to the lesson
FixTheRobot Explore Robotics / Guidance, Navigation and Control / M4 State-Space and Optimal Control / M4-T2

Guidance, Navigation and Control · Theory · M4

M4-T2 — Controllability, Observability and Pole Placement

Before designing a feedback law, ask two questions of the model: can the input reach every mode, and can the sensors see every mode? Then choose where the poles go, with the gimbal in mind.

  • Lesson 2 of 6
  • Intermediate
  • Module 4: State-Space and Optimal Control
  • Theory
  • About 15 minutes to read

A designer is free to put the poles of a state-feedback loop anywhere, but only if the input can reach every mode, and an observer can only recover the states that the sensors reveal. The first property is called controllability and the second observability. Both are decided by a rank test on a matrix built from the model, and both have physical meanings on Hopper that can be read from the structure of its lateral channel. Once they hold, pole placement is a formula. What the formula does not tell you is where to place the poles, and the answer is set by the actuator.

Learning objectives

After this lesson, you should be able to:

  • Test controllability and observability of a model by the rank of the controllability and observability matrices.
  • Explain, from the structure of a model, which states a given sensor can and cannot reveal.
  • Compute the state-feedback gain that places the poles of a single-input model at chosen locations.
  • Estimate the actuator demand of a pole placement and reject placements that saturate.

The intuition

M4-T1: State-Space Models, Modes and Stability gave Hopper's lateral model: four states and one input, the gimbal. Two questions about that pair come before any design.

Can the input reach every state?

A model is controllable if, for any target state, some input drives the model there from rest. If a mode cannot be influenced by the input, no feedback law can move it. Think of two tanks of water that are filled by the same pipe and drain at the same rate: the sum of their levels can be controlled, the difference cannot. The difference obeys its own equation and the input never enters it.

The test is mechanical. Compute the directions the input can push the state in: B\mathbf{B}, then how the dynamics carry those pushes forward, AB\mathbf{A}\mathbf{B}, A2B\mathbf{A}^2\mathbf{B}, and so on. The model is controllable if these directions together span the whole state space. Hopper's gimbal does: the matrix of these four vectors has rank 4. The gimbal pushes the pitch rate directly, the pitch rate becomes pitch, pitch becomes velocity, velocity becomes position. Every state is on the chain.

Can the sensors see every state?

The dual question is observability: can the state be reconstructed from the measurements over time? The test is the same with the roles reversed: take what a sensor reads, C\mathbf{C}, then how that reading would change with the dynamics, CA\mathbf{C}\mathbf{A}, CA2\mathbf{C}\mathbf{A}^2, and ask whether these rows span the space.

Hopper's lateral channel has a one-way structure that makes the answer easy to read. The pitch drives the velocity, and the velocity drives the position, but nothing drives the pitch from the position. So:

  • Measuring the position reveals everything: its first derivative is the velocity, its second the acceleration, which is proportional to the pitch, its third the pitch rate. Rank 4.
  • Measuring the velocity reveals the velocity, pitch and pitch rate but never the position: a constant offset in position changes nothing the velocity sensor reads. Rank 3.
  • Measuring the pitch or the pitch rate reveals only the two pitch states: nothing about them depends on the velocity or the position. Rank 2.

The consequence for the vehicle is concrete. A gyroscope alone, however good, cannot tell Hopper where it is. Something must measure position, and the beacons of M1-T1: Three Questions: Where Am I, Where Should I Go, How Do I Get There are there for that.

Placing the poles, and the price

If the model is controllable, state feedback u=−Kxu = -\mathbf{K}\mathbf{x} can put the closed-loop poles anywhere. The formula that finds K\mathbf{K} is Ackermann's. The choice of where to put the poles is the design, and it is limited by the actuator. A pole twice as far to the left needs a loop twice as fast, with gains that grow roughly as the product of the poles. The figure shows what that does to Hopper: with poles at −1 to −4 the gimbal saturates for a position error of 1.6 m. With poles at −4 to −16 it saturates for 6 mm, so any real error drives it to its limit and the loop is never linear.

Position error that saturates the gimbal, for three pole placementsA bar chart on a logarithmic vertical axis. For closed-loop poles at minus 1, 1.5, 3 and 4 the position error that saturates the gimbal is 1.56 metres. For poles at minus 2, 3, 6 and 8 it is 0.098 metres. For poles at minus 4, 6, 12 and 16 it is 0.006 metres, six millimetres. Faster poles need larger gains, and the actuator saturates for smaller errors.-2.6-1.8-1-0.20.6where the closed-loop poles are placedlog10 of the error (m)1.56 mpoles −1, −1.5, −3, −40.098 mpoles −2, −3, −6, −80.006 mpoles −4, −6, −12, −16
The position error that saturates the 0.15 rad gimbal for three pole placements of Hopper's lateral channel. Faster poles mean higher gains and an actuator that is at its limit for ordinary errors.

Controllability says the poles can be placed anywhere. The actuator says where they should be placed. The two questions are separate, and the second is the one that decides the design.

Definitions

Controllability matrix C\mathcal{C}
The matrix with columns B, AB, A2B, …, An−1B\mathbf{B},\ \mathbf{A}\mathbf{B},\ \mathbf{A}^2\mathbf{B},\ \ldots,\ \mathbf{A}^{n-1}\mathbf{B} for a model with nn states. The model is controllable if its rank is nn.
Observability matrix O\mathcal{O}
The matrix with rows C, CA, …, CAn−1\mathbf{C},\ \mathbf{C}\mathbf{A},\ \ldots,\ \mathbf{C}\mathbf{A}^{n-1}. The model is observable if its rank is nn.
Duality
(A,C)(\mathbf{A}, \mathbf{C}) is observable exactly when (AT,CT)(\mathbf{A}^{\mathsf{T}}, \mathbf{C}^{\mathsf{T}}) is controllable, so every result about one gives a result about the other.
State feedback and desired polynomial
u=−Kxu = -\mathbf{K}\mathbf{x} gives the closed loop A−BK\mathbf{A} - \mathbf{B}\mathbf{K}. The desired characteristic polynomial is ϕd(s)=∏i(s−pi)\phi_d(s) = \prod_i (s - p_i) for the chosen poles pip_i.

The rank tests are:

Controllability and observability tests
rank⁡ C=rank⁡[B, AB, …, An−1B]=n,rank⁡ O=rank⁡(CCA⋮CAn−1)=n\operatorname{rank}\,\mathcal{C} = \operatorname{rank}\bigl[\mathbf{B},\ \mathbf{A}\mathbf{B},\ \ldots,\ \mathbf{A}^{n-1}\mathbf{B}\bigr] = n, \qquad \operatorname{rank}\,\mathcal{O} = \operatorname{rank}\begin{pmatrix}\mathbf{C}\\ \mathbf{C}\mathbf{A}\\ \vdots\\ \mathbf{C}\mathbf{A}^{n-1}\end{pmatrix} = n
A rank below n means that some combination of states cannot be reached (or cannot be seen). Hopper: the gimbal gives rank 4, and the sensors give 4, 3, 2 and 2.

For a controllable single-input model, the gain that places the poles at the roots of ϕd\phi_d is given by Ackermann's formula:

Ackermann's formula
K=(0⋯01) C−1 ϕd(A)\mathbf{K} = \begin{pmatrix} 0 & \cdots & 0 & 1 \end{pmatrix}\,\mathcal{C}^{-1}\,\phi_d(\mathbf{A})
ϕd(A)\phi_d(\mathbf{A}) is the desired polynomial evaluated at the matrix A\mathbf{A}: An\mathbf{A}^n for sns^n, and so on. It requires C\mathcal{C} to be invertible, which is controllability. For models of more than about five states the formula is numerically fragile and other algorithms are used.

Derivation: why the rank test works, and where Ackermann's formula comes from

The test rests on the Cayley-Hamilton theorem, which says that a matrix satisfies its own characteristic equation.

  1. x(T)=∫0TeA(T−τ) B u(τ) dτ\mathbf{x}(T) = \int_0^T e^{\mathbf{A}(T - \tau)}\,\mathbf{B}\,u(\tau)\,d\tau

    The state reached at time TT from rest under an input uu is this integral (the variation of constants formula).

  2. eAt=∑k=0n−1αk(t) Ake^{\mathbf{A}t} = \sum_{k=0}^{n-1}\alpha_k(t)\,\mathbf{A}^k

    By Cayley-Hamilton, An\mathbf{A}^n and every higher power is a combination of I,A,…,An−1\mathbf{I}, \mathbf{A}, \ldots, \mathbf{A}^{n-1}, so the matrix exponential is too, with scalar functions αk(t)\alpha_k(t).

  3. x(T)=∑k=0n−1AkB∫0Tαk(T−τ) u(τ) dτ  ∈  span⁡{B,AB,…,An−1B}\mathbf{x}(T) = \sum_{k=0}^{n-1}\mathbf{A}^k\mathbf{B}\int_0^T \alpha_k(T - \tau)\,u(\tau)\,d\tau \;\in\; \operatorname{span}\{\mathbf{B}, \mathbf{A}\mathbf{B}, \ldots, \mathbf{A}^{n-1}\mathbf{B}\}

    Substitute and take the matrices out of the integral. Whatever the input, the reached state is a combination of these nn vectors: the model can reach only their span.

  4. span⁡{…}=Rn  ⟺  rank⁡ C=n\operatorname{span}\{\ldots\} = \mathbb{R}^n \;\Longleftrightarrow\; \operatorname{rank}\,\mathcal{C} = n

    Conversely, if the vectors span the whole space then inputs can be found that reach any state. The reachable set is exactly the span, so the rank test is both necessary and sufficient.

Where Ackermann's formula comes from

  1. Ac=(01⋱⋱01−an⋯−a2−a1),Bc=(0⋮01)\mathbf{A}_c = \begin{pmatrix} 0 & 1 & & \\ & \ddots & \ddots & \\ & & 0 & 1 \\ -a_n & \cdots & -a_2 & -a_1 \end{pmatrix}, \quad \mathbf{B}_c = \begin{pmatrix} 0 \\ \vdots \\ 0 \\ 1 \end{pmatrix}

    A controllable model can be transformed into controllable canonical form: a chain of integrators whose last row holds the coefficients of the characteristic polynomial sn+a1sn−1+⋯+ans^n + a_1 s^{n-1} + \cdots + a_n.

  2. Kc=(αn−an, …, α1−a1)\mathbf{K}_c = (\alpha_n - a_n,\ \ldots,\ \alpha_1 - a_1)

    Feedback −Kcz-\mathbf{K}_c\mathbf{z} changes only the last row, adding kik_i to each aia_i. To reach the desired coefficients αi\alpha_i of ϕd\phi_d, choose the differences.

  3. K=Kc T−1,T=C Cc−1\mathbf{K} = \mathbf{K}_c\,\mathbf{T}^{-1}, \qquad \mathbf{T} = \mathcal{C}\,\mathcal{C}_c^{-1}

    Transform back to the original coordinates: the transformation that took the model to canonical form is built from the two controllability matrices.

  4. K=(0 ⋯ 0 1) C−1 ϕd(A)\mathbf{K} = (0\ \cdots\ 0\ 1)\,\mathcal{C}^{-1}\,\phi_d(\mathbf{A})

    Using the Cayley-Hamilton theorem, ϕd(Ac)\phi_d(\mathbf{A}_c) has a simple last row equal to Kc\mathbf{K}_c, and carrying it back gives Ackermann's formula.

The reachable set is the span of B, AB, ..., A^(n-1)B. If it is everything, the poles can be placed anywhere, and the gain is one formula. If not, some modes are beyond the reach of any feedback.

A worked example

Test and design Hopper's lateral channel (the model of M4-T1: State-Space Models, Modes and Stability).

  1. Controllability. The controllability matrix of the gimbal has rank 4 of 4. For contrast, two identical modes (both −1) driven by one input have rank 1 of 2: only their sum can be steered.
  2. Observability. By the sensor: position 4 of 4, velocity 3, pitch 2, pitch rate 2. The velocity sensor cannot see the position, and the pitch and rate sensors cannot see the translation: as the one-way structure said.
  3. Place the poles. Ackermann's formula for poles at (−1, −1.5, −3, −4) gives K=(0.096, 0.216, 1.557, 0.376)\mathbf{K} = (0.096,\ 0.216,\ 1.557,\ 0.376). For (−2, −3, −6, −8) it is (1.535, 1.726, 5.578, 0.105), and for (−4, −6, −12, −16) it is (24.55, 13.81, 13.03, −4.97).
  4. The actuator. The first gain KxK_x is the gimbal angle per metre of position error. The gimbal saturates at 0.15 rad for a position error of 1.56 m with the first set of poles, 0.098 m with the second, and 6 mm with the third. The first design is linear for any realistic error. The third is saturated all the time, and has a negative rate gain (−4.97) that fights the other terms.
  5. Choose. The first set is slow (the slowest pole is at −1, a settling time of several seconds). A balance is between the first and second sets, which is what the optimal design of M4-T4: The Linear-Quadratic Regulator from Dynamic Programming finds from the weights instead of from guessed poles.
import gnckit as g

gr, lam, b = 9.81, 0.7, 19.62
A = [[0, 1, 0, 0], [0, 0, gr, 0], [0, 0, 0, 1], [0, 0, lam ** 2, 0]]
B = [0, gr, 0, b]
print('rank of the controllability matrix:', g.mat_rank(g.ctrb(A, B)), 'of 4')
print('two identical modes with one input: rank', g.mat_rank(g.ctrb([[-1.0, 0.0], [0.0, -1.0]], [1.0, 1.0])), 'of 2')

print('rank of the observability matrix, by what is measured:')
for name, C in (('position', [1, 0, 0, 0]), ('velocity', [0, 1, 0, 0]), ('pitch', [0, 0, 1, 0]), ('pitch rate', [0, 0, 0, 1])):
    print(f'  {name:10s}: {g.mat_rank(g.obsv(A, C))} of 4')

print('state feedback u = -K x by pole placement (Ackermann):')
for poles in ([-1, -1.5, -3, -4], [-2, -3, -6, -8], [-4, -6, -12, -16]):
    K = g.acker(A, B, poles)
    print(f'  poles {poles}: K = {[round(k, 3) for k in K]}; position error that saturates the 0.15 rad gimbal: {0.15 / abs(K[0]):.3f} m')
rank of the controllability matrix: 4 of 4
two identical modes with one input: rank 1 of 2
rank of the observability matrix, by what is measured:
  position  : 4 of 4
  velocity  : 3 of 4
  pitch     : 2 of 4
  pitch rate: 2 of 4
state feedback u = -K x by pole placement (Ackermann):
  poles [-1, -1.5, -3, -4]: K = [0.096, 0.216, 1.557, 0.376]; position error that saturates the 0.15 rad gimbal: 1.564 m
  poles [-2, -3, -6, -8]: K = [1.535, 1.726, 5.578, 0.105]; position error that saturates the 0.15 rad gimbal: 0.098 m
  poles [-4, -6, -12, -16]: K = [24.554, 13.812, 13.028, -4.969]; position error that saturates the 0.15 rad gimbal: 0.006 m
ctrb and obsv build the matrices, mat_rank counts the rank, and acker is Ackermann's formula; all are checked against NumPy and SciPy in the library tests.

In robotics

Both properties are checked on every vehicle, and the failures are instructive.

  • Sensor suites. Observability decides which sensors are needed. Hopper needs a position sensor because the gyroscopes cannot see translation. An inertial navigation system cannot observe its heading from accelerometers at rest, and gyrocompassing uses the Earth's rotation to get it (module 6). A visual-inertial estimator has directions that are unobservable by construction, the absolute position and the yaw, and an estimator that ignores this becomes overconfident: the topic of UAV M3-T12: Observability and consistency.
  • Actuator failures. When an effector fails, controllability of the vehicle can drop. A multirotor with one rotor lost can still be controlled in some axes and not in yaw, which is why failure-tolerant designs exist (module 5, control allocation).
  • Placement in practice. Nobody places the poles of a flight vehicle by choosing numbers and hoping. The poles are chosen from a bandwidth the actuator can support (the budget of M3-T6: Limits of Performance: Delay, Right-Half-Plane Zeros and the Bode Integral) or the gains are derived from weights, as in LQR. Ackermann's formula is used to check designs and to teach, and larger models use algorithms of better numerical behaviour.
  • Controllable is not the same as practical. The rank can be 4 with a matrix that is nearly singular: some mode is reachable only with enormous inputs. The condition number of C\mathcal{C} is the warning, and the rank test is a yes-or-no that hides it.
  • Linear algebra. The rank of a matrix and the span of its columns are treated in Linear Algebra M3-T4: Rank and Linear Independence; controllability is that idea applied to the columns B, AB, A²B and so on.

The next lesson uses observability, the dual, to build a state estimate from the sensors that Hopper actually has, and shows that the controller and the observer can be designed separately.

Common misconceptions

“Controllable means easy to control.”

It means that the input can reach every state in principle. It says nothing about how much input is needed or how fast. A model can be controllable with a controllability matrix so ill-conditioned that reaching one mode needs a thousand times the actuator range.

“Faster poles are always better, so place them far to the left.”

The gains grow quickly with speed and the actuator saturates. Hopper's gimbal saturates for a 6 mm position error when the poles are at −4 to −16, so the loop is nonlinear for every real error and the design says nothing. Place poles where the actuator can follow them.

“If a mode is uncontrollable, the system is unstable.”

The two are different properties. An uncontrollable mode can be stable (a stable mode the input does not touch is harmless) or unstable (and then no feedback can stabilize the system). The check is whether the uncontrollable modes are stable: a weaker property called stabilizability.

“A sensor that sees one state cannot give information about the others.”

It can, if the dynamics couple them: the position sensor of Hopper reveals all four states because the position is driven by the velocity, which is driven by the pitch, which is driven by the pitch rate. A model with the opposite one-way structure, as for the pitch sensor, does not.

“The controllability of the model is the controllability of the vehicle.”

The test assumes that the input can take any value. A vehicle with a saturating actuator can reach only part of the space the model says it can: the set of states that can be reached with a gimbal of ±0.15 rad is bounded. The model is a necessary check, not a sufficient one.

Key takeaways

  1. A model is controllable if the vectors B,AB,…,An−1B\mathbf{B}, \mathbf{A}\mathbf{B}, \ldots, \mathbf{A}^{n-1}\mathbf{B} span the state space, observable if the rows C,CA,…\mathbf{C}, \mathbf{C}\mathbf{A}, \ldots do. Both are rank tests, and the two are duals.
  2. Hopper's gimbal controls all four lateral states. A position sensor sees all four, a velocity sensor three, and a pitch or pitch-rate sensor two.
  3. The one-way structure (pitch drives velocity drives position) decides what a sensor can reveal: downstream states are invisible to upstream sensors.
  4. For a controllable single-input model, Ackermann's formula K=enTC−1ϕd(A)\mathbf{K} = \mathbf{e}_n^{\mathsf{T}}\mathcal{C}^{-1}\phi_d(\mathbf{A}) places the poles anywhere.
  5. Where to place them is set by the actuator: Hopper's gimbal saturates for a 1.56 m error with poles at −1 to −4 and for 6 mm with poles at −4 to −16.
  6. Check the conditioning of the controllability matrix as well as its rank.

References and further reading

Each source is marked free or paid. Free to read does not mean free to reuse: the course resources page lists every source with its licence.

Knowledge check

Three questions. Write an answer, then reveal the explanation. Your answers stay in your browser.

Question 1

With the second pole placement (−2, −3, −6, −8), Hopper's gain on position is Kx = 1.535 rad per metre. What gimbal angle does a 0.5 m position error call for, and what happens?

Explanation

The gimbal angle demanded is Kx × 0.5 = 0.77 rad (44°), about five times the 0.15 rad limit. The gimbal saturates, the loop is open until the error has fallen below 0.098 m, and the linear design predicts a response that the actuator cannot deliver. A designer should either slow the poles, or limit the commanded step (a reference prefilter) so that the loop stays in its linear range.

Question 2

Hopper's velocity sensor gives rank 3. Which combination of states can it not see, and why?

Explanation

It cannot see the position. A constant offset in position, the state (1, 0, 0, 0), is in the null space of the observability matrix: the velocity, pitch and pitch rate are all unchanged by it, and A applied to it gives zero (nothing moves). Measuring the velocity says how fast the vehicle is going, not where it is. A position fix such as the beacons is needed, or the velocity measurement must be integrated, which accumulates an unknown starting offset.

Question 3

Two identical stable modes, ẋ₁ = −x₁ + u and ẋ₂ = −x₂ + u, share one input. Show that they are not controllable.

Explanation

The difference d = x₁ − x₂ obeys ḋ = −d: the input cancels and d decays on its own whatever u does, so no input can move d to a chosen value. The controllability matrix [B, AB] = [[1, −1], [1, −1]] has rank 1, not 2: only the sum x₁ + x₂ can be steered. This mode is stable, so the model is stabilizable but not controllable: nothing needs to be done about d for stability, but it cannot be placed anywhere.

What’s next

Next lesson

M4-T3 — Observers and the Separation Principle

Design a Luenberger observer, show that controller and observer poles can be chosen separately, and identify the Kalman filter as the optimal observer.

Nothing below is required to finish this lesson.

Other courses on this site treat neighbouring topics from their own angle:

This course leaves the following to the pages that already teach them: