3.5.29 · D4Guidance, Navigation & Control (GNC)

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

2,178 words10 min readBack to topic

Reminder of the objects you will keep using (all from the parent):


Level 1 — Recognition

Goal: read the matrices and name what you see. No calculation heavier than counting.

Exercise 1.1

A system is written as State (a) the order , (b) the number of inputs , (c) the number of outputs , and (d) whether there is direct feedthrough.

Recall Solution 1.1

What we do: just read the shapes of each box.

  • is , so has 3 entries ==order ==.
  • has 1 column (one input).
  • has 2 rows (two outputs).
  • No matrix is written, so : no direct feedthrough.

Why: columns of count inputs (each column is "where one input pushes"); rows of count outputs (each row is "one sensor's recipe").

Exercise 1.2

Which of these matrices could legally be an matrix for a state-space system, and which could be a matrix, if and ?

Recall Solution 1.2
  • must be . Only is is the == matrix==.
  • must be . Only is is the == matrix==.
  • is — wrong shape for both; it could not be (not square) nor (needs 1 column). It would fit a matrix only if , which contradicts . So is invalid here.

Level 2 — Application

Goal: run the derivation recipe and the standard formulas end-to-end.

Exercise 2.1

Convert the third-order ODE into state-space form with output .

Recall Solution 2.1

Step 1 — pick the state (WHY: the memory is the function and its derivatives up to one below the highest). For a 3rd-order ODE we need 3 states: Step 2 — write each derivative in terms of the states (WHY: we need only in terms of and ). Step 3 — stack (WHY: one clean matrix object). This layout (identity ones on the super-diagonal, coefficients along the bottom row) is the controllable canonical form — recognise it whenever you meet a single high-order ODE.

Exercise 2.2

For , , , , compute the transfer function .

Recall Solution 2.2

Step 1 — form (WHY: this is the matrix whose inverse the formula needs). Step 2 — invert a (WHY: is how the state responds to ). For the inverse is . Here . Step 3 — sandwich with and . The denominator — its roots are exactly the eigenvalues of . See Transfer functions and G(s).


Level 3 — Analysis

Goal: extract behaviour — stability, oscillation, response — from the matrices.

Exercise 3.1

Find the eigenvalues of and classify the system's stability and motion.

Recall Solution 3.1

Step 1 — characteristic polynomial (WHY: grows like , so eigenvalues dictate everything). Step 2 — solve . Factor . Step 3 — classify (WHY: stability lives in the real parts). Both eigenvalues are real and negative the system is asymptotically stable. Real (not complex) roots no oscillation: the response is a decaying sum (an overdamped settle). See Eigenvalues and stability.

Exercise 3.2

For (a mass–spring with , no damping), find the eigenvalues and describe the motion. What angular frequency does it ring at?

Recall Solution 3.2

Interpretation: purely imaginary eigenvalues marginally stable — the response is , which by Euler's identity is and : it oscillates forever without growing or decaying. The imaginary part is the angular frequency rad/s. Physically: no damping () so no energy is lost — it rings forever, matching the parent note's undamped forecast.

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

Level 4 — Synthesis

Goal: build state-space models and combine the four boxes for a designed purpose.

Exercise 4.1

A cart of mass is driven by force with viscous friction coefficient : , where is position. You have two sensors: one reads position , one reads velocity . Build the full with .

Recall Solution 4.1

Step 1 — state: , (memory = where it is + how fast). Step 2 — derivatives: ; and , so . Step 3 — matrices: Step 4 — output (WHY: two sensors two rows of , so ). We read both states directly: Check stability: eigenvalues solve . The is the free-drift mode (a cart with no spring keeps coasting) — marginally stable, exactly the physics.

Exercise 4.2

Take the mass–spring–damper of the parent note, , giving . Apply the coordinate change with . Compute the new and confirm its eigenvalues are unchanged.

Recall Solution 4.2

Step 1 — : since is diagonal, . Step 2 — (WHY: coordinate changes reshape the boxes but not the physics). Step 3 — eigenvalues of : . Same as the original ()! The matrices look different but describe the identical ringing system — eigenvalues are the invariant that survives coordinate changes.


Level 5 — Mastery

Goal: chain the whole framework — solution, invariance, feedback, feedthrough — under pressure.

Exercise 5.1

For (already diagonal) and with , write the exact free-response and evaluate at (to 4 decimals).

Recall Solution 5.1

Why the matrix exponential (from parent): the free response of is , generalising the scalar . For a diagonal the exponential is just the exponential of each diagonal entry (the modes are decoupled): Solution: At : , . Both decay (eigenvalues ): stable. See Matrix exponential.

Exercise 5.2

Design a state-feedback for , (a double integrator) so that the closed-loop matrix has eigenvalues at and (both). Find .

Recall Solution 5.2

Step 1 — closed loop (WHY: feedback reshapes the dynamics from to ). Step 2 — characteristic polynomial: . Step 3 — match the desired polynomial. We want roots at : . So , . This is exactly what pole placement / LQR optimal control automates: choose to move the eigenvalues of into the stable left half-plane.

Exercise 5.3

A sensor reads acceleration directly from a commanded force in the cart of Ex 4.1 (so ). With , and , express as and show .

Recall Solution 5.3

Why appears (from parent): if an input instantly affects an output, the algebraic shortcut is nonzero. Here . Read off the row (WHY: , split state-part from input-part): So and ====. Dropping here would corrupt the transfer function's high-frequency behaviour — the input feeds through immediately.


Wrap-up recall

Recall One-line self-test

Given any , what three things can you now compute? ::: (1) stability via eigenvalues of ; (2) transfer function ; (3) time response .

Connections

  • Transfer functions and G(s) — Ex 2.2 built one from .
  • Eigenvalues and stability — Ex 3.1–3.2 read stability off .
  • Matrix exponential — Ex 5.1 used for the free response.
  • Controllability and Observability — whether in Ex 5.2 can place any pole depends on .
  • LQR optimal control — automates the feedback of Ex 5.2.
  • Kalman filter — needed when (Ex 4.1) does not read every state.
  • Linearization of nonlinear systems — where the of these problems come from as Jacobians.