Guidance, Navigation and Control · Theory · M4
M4-T1 — State-Space Models, Modes and Stability
A transfer function describes one input and one output. A state-space model describes everything inside, and its eigenvectors say which states move together.
Module 3 designed one loop on one pitch angle. Hopper is not one loop. Its position, velocity, pitch and pitch rate are tied together, and the gimbal that steers one steers all four. State-space models are the language for that. They write the whole vehicle as one first-order matrix equation, and the eigenvalues and eigenvectors of its matrix are the vehicle's natural motions. This lesson sets the language up on Hopper's lateral channel and answers a first question with it: when the unstable pitch axis diverges, what does the rest of the vehicle do?
Learning objectives
After this lesson, you should be able to:
- Write a linear vehicle model in the form ẋ = Ax + Bu, y = Cx + Du.
- Compute the modes of a model (eigenvalue and eigenvector) and say what each describes physically.
- Relate the eigenvalues of A to the poles of a transfer function, and say how the zeros depend on the output.
- Recognise a repeated eigenvalue with a single eigenvector and its consequence.
The intuition
M2-T4: Trim and Linearization linearized Hopper's lateral channel into four states, the position , velocity , pitch and pitch rate , with the gimbal angle as the input. Written as a matrix equation it is the following.
with having the entries 1, , 1 and and . The first two rows say that velocity is the rate of change of position and that tilting the thrust accelerates the vehicle sideways. The last two say that pitch rate is the rate of change of pitch and that the pitch moment has a destabilizing term and a gimbal term.
Module 3's tools read one input and one output. A state-space model keeps all four states and lets you ask what the transfer-function view hides.
Modes: motions that keep their shape
Release the vehicle with the gimbal fixed and look at what it does. In general the four states move in a tangle. But there are special starting points from which the motion is simple: all four states change by the same exponential, , in fixed proportions. Such a motion is a mode. The exponent is an eigenvalue of and the proportions are its eigenvector. Any motion is a sum of modes.
The eigenvalues are the poles of module 3, and they come out the same: 0, 0, −0.7 and +0.7. The eigenvector adds something the transfer function does not show: what moves with what. For the divergent mode, with the pitch normalized to 1, the position is 20.0, the velocity 14.0 and the pitch rate 0.7. A pitch error of 0.01 rad that diverges drags the velocity along at 0.14 m/s and the position at 0.20 m, and all of them grow at the same rate. The figure shows the four states after such an error, on a logarithmic scale. After the first second they are parallel lines: one mode is in charge.
The practical lesson is about the order of a design. The vehicle's position cannot be controlled without first controlling the divergent mode, because any pitch error carries a position error with it. Control design for the lateral channel starts from the pitch.
Poles are shared, zeros depend on the output
The same gives different transfer functions for different outputs. The transfer function from the gimbal to the pitch has no finite zero. The one to the position has two zeros at : they appear because the gimbal moves the position by two routes, through the pitch it creates and directly, by tilting the thrust, and at one frequency the two cancel. Poles belong to the vehicle. Zeros belong to the choice of what is measured or controlled.
A repeated eigenvalue with one eigenvector
The double eigenvalue at zero is the position and velocity pair, a double integrator. A matrix of this kind has fewer eigenvectors than eigenvalues, and then the motion contains a term growing like . Left alone, with a velocity of 1 m/s, the position grows linearly, and no exponential describes it. The mode picture still holds, with this extension.
A model with one input and one output tells you how the output responds to the input. A state-space model also tells you which states move together, and that is what a multivariable design needs.
Definitions
- State , input , output
- The state is a vector that, with the input, determines the future: for Hopper's lateral channel . The output is what is measured or controlled.
- System matrices
- (how the state changes by itself), (how the input drives it), (what is read out) and (direct feed from input to output, usually 0).
- Eigenvalue and eigenvector
- and with . A left eigenvector satisfies .
- Mode
- The motion : every state moves by the same exponential, in the proportions of the eigenvector.
The model, with its output equation:
With no input, a motion is a sum of modes. When has a full set of eigenvectors , the coefficient of each is found from a left eigenvector :
The transfer function of the model, whose denominator is the characteristic polynomial of :
Derivation: modes, the transfer function, and Hopper's divergent mode
All three ideas follow from substituting an exponential.
Look for a motion with no input in which every state has the same exponential time dependence. Substitute it in .
Cancel the exponential. A nonzero exists only if , so is an eigenvalue and its eigenvector.
The equation is linear, so a sum of solutions is a solution. If the eigenvectors span the space, any initial state is a sum of them, and its motion is the same sum of modes.
Take the Laplace transform of the state equation, with zero initial state, and solve for the state. The output gives the transfer function.
The inverse of a matrix is its adjugate over its determinant, so every pole of is a root of the characteristic polynomial. A root can fail to appear as a pole when the numerator cancels it: that is a mode that the input cannot excite or the output cannot see (the next lesson).
Hopper's divergent mode, by hand
Normalize the pitch component to 1. The fourth row of reads , and the third row . Both give .
The second row says that tilting accelerates the vehicle, and the first that velocity is the rate of change of position. They fix the velocity and the position in the mode.
Both signs of work. The plus sign is the divergent mode, the minus sign its decaying twin.
The eigenvalues of A are the poles. The eigenvectors say how the states share each mode, and the zeros come from what is measured. The same vehicle has one set of poles and many sets of zeros.
A worked example
Take Hopper's lateral model with , and and examine it.
- Eigenvalues. The matrix has eigenvalues 0, 0, −0.7 and +0.7: the position-velocity integrators and the pitch pair.
- The pitch modes. The vectors satisfy to 2×10⁻¹⁵: (20.02, 14.01, 1, 0.7) for the divergent mode and (20.02, −14.01, 1, −0.7) for the convergent one.
- The Jordan pair. The matrix has rank 3, so the double eigenvalue at 0 has a single eigenvector: position and velocity form a Jordan block.
- Transfer functions. From the gimbal to the pitch the numerator is (no finite zero). To the position it is , with zeros at : the pitch route and the direct route cancel at . The same four poles in both.
- Check the mode picture. Start with a 0.01 rad pitch error, with all else zero, and propagate it 8 s with the matrix exponential. The state is (26.87 m, 18.95 m/s, 1.352 rad, 0.946 rad/s). The divergent mode alone, with its coefficient found from the left eigenvector, gives (27.07, 18.95, 1.352, 0.946). The other three modes contribute under 1% of the position and nothing to the others.
import math
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]] # states: position, velocity, pitch, pitch rate
B = [0, gr, 0, b]
print('eigenvalues of A:', [round(complex(p).real, 3) for p in g.mat_eigvals(A)])
for sign in (+1, -1):
mu = sign * lam
v = [gr / mu ** 2, gr / mu, 1.0, mu] # the mode: pitch 1, rate mu, velocity g/mu, position g/mu^2
res = max(abs(a - mu * c) for a, c in zip(g.mat_vec(A, v), v))
print(f'mode for lambda = {mu:+.1f}: v = {[round(c, 2) for c in v]}, |A v - lambda v| = {res:.0e}')
print('rank of A =', g.mat_rank(A), 'so the double eigenvalue at 0 has a single eigenvector: position and velocity form a Jordan block')
for name, C in (('position', [1, 0, 0, 0]), ('pitch', [0, 0, 1, 0])):
tf = g.ss_to_tf(A, B, C)
print(f'gimbal to {name}: numerator {[round(c, 2) for c in tf.num]}, zeros {[complex(round(z.real, 2), round(z.imag, 2)) for z in tf.zeros()]}')
# a 0.01 rad pitch error: how much of the state at t = 8 s is the divergent mode?
x0 = [0.0, 0.0, 0.01, 0.0]
E = g.mat_expm(A, 8.0)
x8 = g.mat_vec(E, x0)
vp = g.eigvec(A, lam)
wl = g.left_eigvec(A, lam)
coef = sum(w * x for w, x in zip(wl, x0)) / sum(w * v for w, v in zip(wl, vp))
mode = [coef * v * math.exp(lam * 8.0) for v in vp]
print('state at 8 s (position, velocity, pitch, rate):', [round(c, 3) for c in x8])
print('divergent mode alone :', [round(c, 3) for c in mode])eigenvalues of A: [0.0, 0.0, -0.7, 0.7] mode for lambda = +0.7: v = [20.02, 14.01, 1.0, 0.7], |A v - lambda v| = 2e-15 mode for lambda = -0.7: v = [20.02, -14.01, 1.0, -0.7], |A v - lambda v| = 2e-15 rank of A = 3 so the double eigenvalue at 0 has a single eigenvector: position and velocity form a Jordan block gimbal to position: numerator [9.81, 0.0, 187.67], zeros [(-0-4.37j), 4.37j] gimbal to pitch: numerator [19.62, 0.0, 0.0], zeros [0j, 0j] state at 8 s (position, velocity, pitch, rate): [26.87, 18.949, 1.352, 0.946] divergent mode alone : [27.07, 18.949, 1.352, 0.946]
In robotics
Modes are how vehicle dynamics are read in every field.
- Aircraft modes. The short-period, phugoid, roll, spiral and Dutch-roll motions of module 10 are modes of a state-space model, and their eigenvectors say which states take part: the short period is mostly angle of attack and pitch rate, the phugoid mostly airspeed and pitch angle. Flight-test engineers identify them from the eigenvectors.
- Flexible structures. A rocket's bending modes and a satellite's solar-array modes are eigenvectors of the structural model: the shape in which the structure vibrates. The bending mode seen by the gyroscope is the one the notch filter of M3-T7: Digital Control: Sampling, Delay and Anti-Windup removes.
- Unstable airframes. The eigenvector of the divergent mode of a relaxed-stability aircraft says which sensors see the divergence first, and so where a feedback loop should take its measurement.
- Tools. Eigenvalues and eigenvectors come from
numpy.linalg.eigor, for a few states, fromgnckit.mat_eigvalsandeigvec. The linear algebra is the subject of Linear Algebra M6-T1: Eigenvalues and Eigenvectors. The rigid-body model that the UAV track writes out in UAV M1-T5: Six-degree-of-freedom UAV dynamics is linearized to such a model in the same way as here.
The next lesson asks the two questions that matter before designing anything: can the input reach every mode (controllability), and can the sensors see every mode (observability).
Common misconceptions
“The states of a model are unique.”
Any invertible change of variables gives another valid state vector with matrices and so on, with the same eigenvalues and the same transfer function. Position, velocity, pitch and rate are a convenient choice, not the only one. The modal coordinates are another.
“A transfer function holds all the information in a state-space model.”
It holds only the part that is both reachable from the input and visible at the output. A mode that cancels in the transfer function is still in the vehicle and can still diverge. Hopper's state model has four modes and the transfer function to the position shows four poles, but a different choice of output can hide some.
“A zero eigenvalue is neutral and harmless.”
A double eigenvalue at zero with a single eigenvector gives a response that grows linearly, and a single zero gives a state that never returns. Hopper's position drifts for ever after any velocity error. Neutral is not the same as safe.
“Eigenvectors point along physical axes.”
They are directions in the space of states, mixing quantities with different units: position, velocity, angle. Only the ratios matter and they carry units (20 m per radian, 14 m/s per radian). Scaling the states changes the numbers, not the mode.
“The zeros are a property of the plant.”
They depend on which output you look at. The same Hopper has no zero from gimbal to pitch and a pair at ±4.37j from gimbal to position. Choosing what to control is also choosing the zeros.
Key takeaways
- A linear vehicle model is , ; the same serves every choice of output.
- A mode is a motion in which all states move together; the eigenvalue is its exponent and the eigenvector its shape.
- Every free motion is a sum of modes, with coefficients given by the left eigenvectors.
- Hopper's divergent mode has the shape : a pitch error carries a position and a velocity error with it.
- The poles of the transfer function are eigenvalues of ; the zeros depend on and .
- A repeated eigenvalue with one eigenvector gives a response that grows like .
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.
- K. J. Åström and R. M. Murray, Feedback Systems, 2nd edition, Princeton University Press, 2021 , the chapter on linear systems, with modes and the matrix exponential. Free to read as the authors' PDF; the book is copyrighted.
- S. Brunton, “Control Bootcamp” (video series) , the first lectures on linear systems and eigenvalues. Free to watch.
- J. How and E. Frazzoli, MIT 16.30 Feedback Control Systems (OpenCourseWare) , the lectures on state-space models. Free; licence CC BY-NC-SA 4.0.
- B. L. Stevens, F. L. Lewis and E. N. Johnson, Aircraft Control and Simulation, 3rd edition, Wiley, 2016, the chapter on linear models and modes. Paid book.
Knowledge check
Three questions. Write an answer, then reveal the explanation. Your answers stay in your browser.
Question 1
A pitch error of 0.02 rad (and nothing else) is released at t = 0 with the gimbal held fixed. Using the exact solution θ = θ₀ cosh λt, v = (gθ₀/λ) sinh λt, x = (gθ₀/λ²)(cosh λt − 1), what are the pitch, the lateral velocity and the position after 5 s?
Explanation
With λt = 3.5, cosh 3.5 = 16.57 and sinh 3.5 = 16.54. The pitch is 0.02 × 16.57 = 0.331 rad (19°), the velocity is (9.81 × 0.02 / 0.7) × 16.54 = 4.64 m/s, and the position is (9.81 × 0.02 / 0.49) × (16.57 − 1) = 6.24 m. The pitch error has multiplied by 17 and brought a 6 m position error with it. The proportions of the divergent mode, 20 m per radian of pitch for position and 14 m/s per radian for velocity, appear once the exponential dominates.
Question 2
Hopper's lateral A has a double eigenvalue at 0 but only one eigenvector. What does that say about the response of the position to an initial velocity of 2 m/s, with the pitch kept at zero?
Explanation
With one eigenvector for the double zero eigenvalue there is no pure mode that carries a velocity: the response contains a term that grows like t. With the pitch held at zero the position obeys ẍ = 0, so x(t) = 2t: it grows linearly and never settles. A matrix with a full set of eigenvectors (distinct eigenvalues) has only exponentials, so a double eigenvalue at 0 with one eigenvector is a sign of an integrator chain, and of a vehicle that drifts.
Question 3
Why does the transfer function from the gimbal to Hopper's position have zeros at ±4.37j while the one to the pitch has none, although both come from the same A and B?
Explanation
The zeros come from the output matrix and the way the input enters. The gimbal affects the position by two routes: directly, because tilting the thrust gives a sideways force g δ, and through the pitch it creates, which then accelerates the vehicle sideways. At s² = λ² − b = −19.1 the contributions of the two routes cancel, giving zeros at ±j4.37. The pitch has only one route from the gimbal, so it has no zero. The poles come from A alone and are the same for both outputs.
What’s next
Related content
Nothing below is required to finish this lesson.
Other courses on this site treat neighbouring topics from their own angle:
- UAV M5-T7: LQR control
- UAV M5-L2: Implement LQR
- Navigation M5-T6: LQR and MPC for Path Tracking
- UAV M3-T4: Kalman Filter
- UAV M3-T12: Observability and consistency
- Linear Algebra M6-T1: Eigenvalues and Eigenvectors
- Linear Algebra M6-T4: Positive Definite Matrices
- Linear Algebra M9-T7: Linear Kalman Filter Mathematics
- Robot Learning M4-T4: Dynamic Programming and Value Iteration
- Probability for Robotics (module 7 derives the Kalman filter)
This course leaves the following to the pages that already teach them:
Get notified when the next lesson and new labs are released.
One email per new lesson or lab.