3.5.29 · D3Guidance, Navigation & Control (GNC)

Worked examples — State-space representation — x' = Ax + Bu, y = Cx + Du

3,150 words14 min readBack to topic

This page is a drill room. The parent note built the ideas; here we hit every kind of situation the state-space form can hand you, one worked example per cell.


The scenario matrix

Every state-space problem lands in one of these cells. Each row is a case class; the last column says which worked example covers it.

# Case class The thing that varies What you must not get wrong Example
C1 Build from a physical ODE order , which state you pick naming derivatives as states Ex 1
C2 Eigenvalues: both real & negative real, distinct stable, non-oscillating decay Ex 2
C3 Eigenvalues: complex, negative real part decaying oscillation Ex 3
C4 Eigenvalues: pure imaginary () degenerate boundary undamped ring, marginal Ex 4
C5 Eigenvalue with positive real part unstable — blows up Ex 5
C6 Repeated real negative eigenvalue critically damped, term Ex 6
C7 A zero eigenvalue () neutral mode constant, non-decaying direction Ex 7
C8 Forced response, constant input , steady state zero-state term, Ex 8
C9 Nonzero feedthrough direct shortcut shows up in Ex 9
C10 State-space transfer function invert poles = eigenvalues Ex 10
C11 Coordinate change (non-uniqueness) all of transform Ex 11
C12 Word problem / exam twist (MIMO) , columns, rows Ex 12

Prerequisites we lean on: Eigenvalues and stability, Matrix exponential, Transfer functions and G(s).


Ex 1 — Building the matrices (cell C1)

Step 1 — pick states. Why this step? The system's memory is where it is and how fast it moves, so

Step 2 — normalize the ODE. Why? State-space needs alone on the left, so divide by the leading coefficient :

Step 3 — write each derivative. Why? We need purely in terms of and :

Step 4 — stack. Why? One clean matrix object for the computer:

Here (two states), (one input ), (one measured output ) — a SISO system.


Ex 2 — Two real negative eigenvalues (cell C2)

Step 1 — write the characteristic equation. Why? Eigenvalues are the numbers where , and they govern :

Step 2 — factor. Why? We want the actual roots:

Step 3 — read the physics. Why? Each eigenvalue contributes to the motion. Both are real and negative → two decaying exponentials, no imaginary part means no oscillation. In the figure below, the solid decay curve for slides monotonically to zero and never crosses the dashed zero line — the legend labels it and both axes are marked in seconds and state units.

Figure — State-space representation — x' = Ax + Bu, y = Cx + Du

Ex 3 — Complex eigenvalues, negative real part (cell C3)

Step 1 — characteristic equation. Why? Same reason: roots of set the dynamics:

Step 2 — quadratic formula. Why? The discriminant tells us real vs complex: The discriminant is negative → complex roots.

Step 3 — decode . Why? A complex pair means carries and : an oscillation at frequency inside an envelope . Here → envelope shrinks; rad/s.

In the figure, the solid oscillating curve for wiggles but its peaks stay inside the two dashed envelope curves that squeeze toward zero; the legend names each and the axes are labelled.

Figure — State-space representation — x' = Ax + Bu, y = Cx + Du

Ex 4 — Pure imaginary eigenvalues, the boundary case (cell C4)

Step 1 — characteristic equation. Why? Same tool:

Step 2 — read and . Why? Here exactly. Envelope never grows or shrinks. rad/s.

Step 3 — classify. Why? is neither nor marginally stable (the razor's edge). This is the degenerate boundary between Ex 3 (stable) and Ex 5 (unstable).

In the figure the solid curve keeps returning to the same peak height forever; the axes are labelled and an arrow marks that the amplitude never changes.

Figure — State-space representation — x' = Ax + Bu, y = Cx + Du

Ex 5 — A positive-real-part eigenvalue: instability (cell C5)

Step 1 — characteristic equation. Why? Roots decide fate:

Step 2 — inspect signs. Why? Even one eigenvalue with makes the whole system unstable. Here .

Step 3 — physical meaning. Why? The term grows without bound → the pendulum topples. No initial condition (except sitting exactly balanced) avoids it.

In the figure the solid curve shoots upward off the top of the plot; the axes are labelled and an arrow marks "runs away."

Figure — State-space representation — x' = Ax + Bu, y = Cx + Du

Ex 6 — Repeated real negative eigenvalue: critical damping (cell C6)

Step 1 — characteristic equation. Why? Same eigenvalue tool:

Step 2 — factor. Why? Find the roots and notice they coincide: The discriminant is exactly — the razor's edge between real-distinct and complex.

Step 3 — read the physics. Why? When an eigenvalue repeats, carries not only but also (one extra factor of for the repeated root). So Both pieces still decay because eventually beats the growing . This is critical damping: the fastest return to rest with no oscillation.

In the figure, the solid critically-damped curve for (with a starting velocity) rises to a single hump then decays to zero without ever crossing — the legend and axes are labelled, and it is compared against the pure envelope.

Figure — State-space representation — x' = Ax + Bu, y = Cx + Du

Ex 7 — A zero eigenvalue: a neutral (constant) mode (cell C7)

Step 1 — characteristic equation. Why? Same tool:

Step 2 — interpret . Why? The mode contributes : a constant that neither grows nor decays. The mode contributes , which dies out. So velocity decays, but the final position is frozen at some nonzero value.

Step 3 — classify. Why? for one eigenvalue means the system is neutrally (marginally) stable: it does not blow up, but it also does not return to the origin. A constant offset lives forever.

In the figure, the solid position curve climbs and then flattens at a nonzero constant (the frozen position), while the dashed velocity curve decays to zero — axes and legend labelled.


Ex 8 — Forced response with constant input (cell C8)

Step 1 — recall the solution formula. Why? The parent derived ; for a scalar with this is a plain integral:

Step 2 — do the integral. Why? We want an explicit . Pull out:

Step 3 — take the limit. Why? Steady state is ; since : This matches the forecast. In the figure the solid curve rises and flattens at the dashed line ; axes and legend labelled.


Ex 9 — Nonzero feedthrough (cell C9)

Step 1 — steady state of the state. Why? Set : .

Step 2 — build the output. Why? uses both the state and the direct shortcut:

Step 3 — the instant part. Why? At with , the state hasn't moved yet, but — the output jumps immediately because of . Dropping would wrongly give .


Ex 10 — State-space to transfer function (cell C10)

Step 1 — form . Why? The parent formula is :

Step 2 — invert. Why? Need ; for a matrix, swap diagonal, negate off-diagonal, divide by determinant :

Step 3 — assemble. Why? Multiply out (and ):


Ex 11 — Coordinate change: same system, new clothes (cell C11)

Step 1 — invert . Why? Every transformed matrix needs :

Step 2 — transform . Why? is the new dynamics:

Step 3 — transform , , . Why? A coordinate change touches all four matrices, not just :

\tilde C = CT^{-1} = \begin{bmatrix}1&0\end{bmatrix}\begin{bmatrix}1&0\\-1&1\end{bmatrix}=\begin{bmatrix}1&0\end{bmatrix},\quad \tilde D = D = 0.$$ **Step 4 — check eigenvalues.** *Why?* $\tilde A$ is upper-triangular, so eigenvalues are the diagonal: $-1$ and $-2$ — identical to $A$. > [!recall] Verify > $\mathrm{trace}(\tilde A)=-3=\mathrm{trace}(A)$ and $\det(\tilde A)=2=\det(A)$: same eigenvalues. And the transfer function is invariant — you can check $\tilde C(sI-\tilde A)^{-1}\tilde B+\tilde D$ gives the same $1/(s^2+3s+2)$. ✅ --- ## Ex 12 — MIMO word problem / exam twist (cell C12) > [!example] A tiny rocket: two inputs, two outputs > A rocket's lateral dynamics are modeled as > $$\dot x = \begin{bmatrix}0&1\\-4&-2\end{bmatrix}x + \begin{bmatrix}0&0\\1&0.5\end{bmatrix}\begin{bmatrix}u_1\\u_2\end{bmatrix},\qquad y=\begin{bmatrix}1&0\\0&1\end{bmatrix}x.$$ > Here $u_1$=main thrust deflection, $u_2$=reaction jet. (a) State the sizes $n,m,p$. (b) At steady state with $u_1=2,u_2=0$, find $x_\infty$. (c) Is the open-loop system stable? > > **Forecast:** $n=2,m=2,p=2$. With steady inputs, set $\dot x=0$ and solve a $2\times2$ system. Damping term $-2$ suggests stability. **Step 1 — sizes.** *Why?* Read them off the shapes using the definitions from the top of the page: state has 2 rows → $n=2$; $B$ has 2 columns → $m=2$ (two inputs); $C$ has 2 rows → $p=2$ (two outputs). MIMO is native — this is exactly the parent's point. **Step 2 — steady state (finish the algebra).** *Why?* Set $\dot x=0$ so $Ax_\infty = -Bu$. With $u=(2,0)^\top$, $$Bu=\begin{bmatrix}0&0\\1&0.5\end{bmatrix}\begin{bmatrix}2\\0\end{bmatrix}=\begin{bmatrix}0\\2\end{bmatrix},\qquad \begin{bmatrix}0&1\\-4&-2\end{bmatrix}\begin{bmatrix}x_1\\x_2\end{bmatrix}=-\begin{bmatrix}0\\2\end{bmatrix}.$$ Top row: $x_2 = 0$. Substitute into the bottom row: $-4x_1 - 2x_2 = -2 \Rightarrow -4x_1 - 0 = -2 \Rightarrow x_1 = \tfrac{1}{2}=0.5$. $$\boxed{\,x_\infty = \begin{bmatrix}0.5\\0\end{bmatrix}\,}$$ **Step 3 — stability check.** *Why?* Stability lives in the eigenvalues of $A$: $$\det(\lambda I - A)=\det\!\begin{bmatrix}\lambda&-1\\4&\lambda+2\end{bmatrix}=\lambda(\lambda+2)+4=\lambda^2+2\lambda+4=0.$$ Quadratic formula: $\lambda=\dfrac{-2\pm\sqrt{4-16}}{2}=-1\pm i\sqrt3$. Both have $\mathrm{Re}(\lambda)=-1<0$ → **stable** (a decaying oscillation, like Ex 3). > [!recall] Verify > Check $x_\infty=(0.5,0)$: $Ax_\infty=\begin{bmatrix}0\cdot0.5+1\cdot0\\-4\cdot0.5-2\cdot0\end{bmatrix}=\begin{bmatrix}0\\-2\end{bmatrix}=-Bu$ ✅. Eigenvalue real part $-1<0$ → stable ✅. Position output $y_1=0.5$ means the rocket settles offset by 0.5 under constant thrust. ✅ --- > [!mnemonic] The eigenvalue traffic light > **Real part negative → green** (decays, stable). **Real part zero → yellow** (rings or freezes, marginal). **Real part positive → red** (blows up, unstable). Imaginary part just adds the wiggle; a **repeated** root adds a $t\,e^{\lambda t}$ term (critical damping). ## Connections - [[Eigenvalues and stability]] — Ex 2–7 are the full eigenvalue traffic-light zoo. - [[Matrix exponential]] — powers the forced response in Ex 8 and the $t\,e^{\lambda t}$ term in Ex 6. - [[Transfer functions and G(s)]] — Ex 10 crosses the bridge; defines the Laplace variable $s$. - [[Controllability and Observability]] — whether $B,C$ in Ex 12 actually reach/see every state. - [[LQR optimal control]] — how you'd stabilize the unstable Ex 5. - [[Kalman filter]] — recovers unmeasured states behind $C$. - [[Linearization of nonlinear systems]] — where the rocket's $A,B$ in Ex 12 come from.