Math for ME · Chapter 13 of 19 · Advanced

Systems of ODEs and State-Space Thinking

Real machines have many states changing together. State-space packs them into one vector equation, and eigenvalues read its fate. This is the bridge to modern engineering.

The thread: One differential equation handled one moving part. Couple several together and you need a whole vector of states, whose fate the eigenvalues from Act 4 now decide.

01

Readiness check

From Linear Systems, Eigenvalues and Modes, and ODEs. Tick only what you can do closed-notes.

  • Solve a second-order ODE and classify its damping.
  • Multiply matrices and vectors fluently.
  • Find eigenvalues of a 2×2 matrix.
  • Read stability from the sign of eigenvalue real parts.
  • Write mẍ + cẋ + kx = F from a physical sketch.
0 or 1 weak itemsContinue with this chapter.
2 weak itemsRedo the Eigenvalues and ODEs ladders; this chapter glues them together.
3 or more weak itemsStep back to Eigenvalues and Modes and ODEs.
02

The core idea

List everything the system remembers. That list is the state. Its evolution is ẋ = Ax + Bu.

ẋ = Ax + Bu

Any high-order ODE becomes first-order by naming derivatives as new states (position and velocity, temperature of each zone). The matrix A holds the physics; its eigenvalues are the system's poles: they decide decay, oscillation, or blow-up before any simulation runs.

The skill works when: the system is linear or linearized around an operating point; then one matrix tells the whole local story.
The skill breaks down when: behavior far from the operating point matters; the linearization is a local map, not the territory.
The concept. The state (x, ẋ) is a point; the system drags it along a trajectory. Stable eigenvalues spiral it home; unstable ones fling it away.
03

The skills, taught in order

13.1 The state: what the system remembers

The state is the shortest list of quantities that, together with the future inputs, determines the future completely. There is one state per independent energy store: each mass contributes its velocity, each spring its stretch, each thermal mass its temperature, each inductor its current.

13.2 Any order becomes first-order

Name each derivative as a new state and a single high-order ODE turns into a set of first-order ones. For a second-order system, x₁ = x and x₂ = ẋ give ẋ₁ = x₂ for free, while the physics supplies ẋ₂. Stacked into vectors, the whole system is one matrix equation:

ẋ = Ax + Bu

A holds the internal physics; B says how the inputs u push on each state.

13.3 Equilibrium

An equilibrium is a state that does not change, found by setting ẋ = 0 and solving Ax + Bu = 0. Under a constant input the equilibrium generally sits at a nonzero offset, a spring stretched by a steady load or a motor turning at a steady speed, not at the origin.

13.4 Stability from eigenvalues (the poles)

The eigenvalues of A are the system's poles, and they decide its fate before any simulation:

PolesResponse
all real parts negativestable: returns to equilibrium
any real part positiveunstable: runs away
complex pairoscillates; the imaginary part is the ring frequency

A pole's distance from the origin is the natural frequency and its angle encodes the damping ratio, linking straight back to ODEs.

13.5 Why this is the bridge to modern engineering

One vector equation handles coupled masses, multi-zone thermal networks, circuits, and control plants alike. Controls then asks the next question: feedback u = −Kx reshapes A into A − BK, which moves the poles wherever the designer needs them.

Engineering connection: Controls, Vibrations, Mechatronics, System Dynamics.

04

Worked example: an oscillator in state-space form

Take the ODE oscillator: 2ẍ + 8ẋ + 50x = F(t). Convert it to state-space, find the eigenvalues, and judge stability without solving anything.

Figure 1. The state-space form and the poles in the complex plane: both in the left half, so the system is stable and rings while settling.
  1. ProblemWrite the oscillator as ẋ = Ax + Bu and read its behavior from A.
  2. Given / findm = 2 kg, c = 8 N·s/m, k = 50 N/m. Find A, its eigenvalues, and the stability verdict.
  3. AssumptionsLinear spring and damper; F is the single input.
  4. ModelName states x₁ = x (position) and x₂ = ẋ (velocity). Then ẋ₁ = x₂ by definition, and Newton gives ẋ₂.
  5. Equationsẋ₁ = x₂ ẋ₂ = (F − 8x₂ − 50x₁)/2 = −25x₁ − 4x₂ + F/2
  6. SolveA = [0, 1; −25, −4]. Characteristic equation: λ² + 4λ + 25 = 0, so λ = −2 ± 4.58i. Both eigenvalues sit in the left half-plane: stable, oscillating at about 4.58 rad/s while decaying like e−2t.
  7. CheckAgainst ODE language: ωₙ = √(k/m) = 5 rad/s, ζ = c/(2√(km)) = 8/20 = 0.4, ω_d = 5√(1 − 0.16) = 4.58 rad/s, decay rate ζωₙ = 2. Identical numbers, two notations. Equilibrium under constant F = 100 N: ẋ = 0 gives x = F/k = 2 m.
  8. ConclusionWithout solving the ODE, the matrix told us everything a designer asks first: stable or not, how fast it settles, at what frequency it rings. Controls courses start exactly here and ask the next question: how to move those eigenvalues.
Result. A = [0, 1; −25, −4]; poles at −2 ± 4.58i; stable, underdamped (ζ = 0.4), settling like e−2t.
04b

Worked example 2: a DC motor in state-space

A small DC motor has armature current i and shaft speed ω as its states, governed by di/dt = −2i − ω + V and dω/dt = i − ω (consistent units, with V the applied voltage). Write the state-space matrices, find the poles, and find the steady speed under a constant 12 V.

  1. Given / finddi/dt = −2i − ω + V, dω/dt = i − ω. Find A and B, the eigenvalues, and the equilibrium under V = 12.
  2. State and inputState x = (i, ω); input u = V. Current and speed are remembered; the voltage is imposed.
  3. MatricesA = [−2, −1; 1, −1], B = [1; 0].
  4. Characteristic equationdet(A − λI) = (−2−λ)(−1−λ) − (−1)(1) = λ² + 3λ + 3.
  5. Polesλ = (−3 ± √(9 − 12))/2 = −1.5 ± 0.87i. Negative real parts, so the motor is stable and settles with a slight overshoot.
  6. Steady speedSet the derivatives to zero: i = ω, and −2ω − ω + 12 = 0 gives ω = 4, i = 4. The motor settles at ω = 4 in steady state.
  7. CheckBoth poles have real part −1.5, so transients fade like e−1.5t; the small imaginary part means a gentle oscillation on the way to 4. Equilibrium scales with voltage, as a motor should: double V doubles the steady speed.
  8. ConclusionTwo coupled physical laws became one matrix whose eigenvalues gave stability and whose equilibrium gave the operating point. This is the standard starting model for every motor-control design in mechatronics.
Result. A = [−2, −1; 1, −1], B = [1; 0]; poles −1.5 ± 0.87i (stable); steady speed ω = 4 at V = 12.
05

Misconceptions and diagnostics

MistakeSymptomDiagnostic questionCorrection
Too few statesA second-order system with one state; dynamics lost"How many independent energy stores exist?"One state per store: each mass's velocity, each spring's stretch, each thermal mass's temperature.
States chosen as inputsThe applied force appears inside x"Does the system remember this quantity, or do I impose it?"Imposed quantities are inputs u; remembered quantities are states x.
Stability judged from one eigenvalue"Stable" declared while another pole grows"Did I check every eigenvalue's real part?"One bad pole ruins the system. All real parts must be negative.
Equilibrium confused with rest at zeroOffsets under constant load missed"Where does ẋ = 0 actually hold with this input?"Solve Ax + Bu = 0: equilibrium moves with the load (x = F/k here).
06

Practice ladder

Level 1 · Direct skill

Convert ẍ + 6ẋ + 8x = 0 to state-space and find the eigenvalues.

Show answer

A = [0, 1; −8, −6]; λ² + 6λ + 8 = 0 gives λ = −2 and −4. Real and negative: overdamped, no ringing.

Then write ẍ + 9x = 0 (undamped) in state-space and find its eigenvalues.

Show answer

A = [0, 1; −9, 0]; λ² + 9 = 0 gives λ = ±3i. Purely imaginary: undamped oscillation at 3 rad/s that never decays.

Level 2 · Mixed concept

Two tanks exchange heat: Ṫ₁ = −2T₁ + T₂, Ṫ₂ = T₁ − 2T₂ (temperatures above ambient). Write A, find its eigenvalues, and interpret.

Show answer

A = [−2, 1; 1, −2]; eigenvalues −1 and −3 (the Eigenvalues pattern). Both negative: every temperature difference dies out, the shared mode (1,1) slowly, the opposing mode (1,−1) fast.

For ẋ = −4x + 2u with constant input u = 6, find the equilibrium and its stability.

Show answer

Set ẋ = 0: −4x + 12 = 0, so x = 3, a nonzero offset set by the input. The single eigenvalue −4 is negative, so it is stable and settles to 3.

Level 3 · Independent problem

For the worked example, double the damping to c = 16. Recompute the poles and describe what changed physically.

Show answer

A = [0, 1; −25, −8]; λ² + 8λ + 25 = 0 gives λ = −4 ± 3i. Faster decay (e−4t), slower ring (3 rad/s), ζ = 0.8. More damping pushes poles left and toward the real axis: settling improves, oscillation fades.

Level 4 · Transfer to real engineering

Pick a real two-store system (phone battery + case temperatures, two rooms sharing a wall, a car body on suspension). Name its states, write a plausible A with estimated coefficients, and defend the signs of every entry.

What good work looks like

A state list tied to energy stores, a 2×2 A with units on every coefficient, sign reasoning for each entry, and the eigenvalue verdict with a physical reading.

07

Working with AI, and proving it yourself

Use AI as an examiner, not a solver

"Here is my state choice and A matrix for this system. Audit only the signs of the entries against the physics."
"Give me three pole locations; I will sketch the expected response of each before you confirm."
"Convert this to state-space." The state-choosing step is the modeling skill controls courses test.
"Is this system stable?" Reading eigenvalue real parts must be your reflex, not a lookup.

Portfolio task

Produce a one-page "Pole Atlas": for five pole patterns (two real negative, complex pair left, pole at zero, real positive, complex pair right), sketch the response, name a mechanical system that behaves that way, and state the stability verdict.

Must include: the worked example's poles placed on your atlas, and the Level 3 damped version shown moving across it.
08

Retrieval and spaced review

Closed notes. Answer out loud, then reveal.

1. What is a state, and how many does a system need?

A quantity the system remembers between instants. One per independent energy store.

2. How does a second-order ODE become first-order?

Name the derivative as a new state: x₁ = x, x₂ = ẋ. Then ẋ₁ = x₂ and Newton supplies ẋ₂.

3. Where are equilibria, and how is their stability judged?

Where ẋ = 0 (solve Ax + Bu = 0). Stable if every eigenvalue of A has negative real part.

4. What do complex eigenvalues mean physically?

Oscillation: the imaginary part is the ringing frequency, the real part the decay (or growth) rate.

5. Translate ζ and ωₙ into pole language.

Poles sit at −ζωₙ ± ωₙ√(1−ζ²)i: distance from origin is ωₙ, the angle encodes ζ.

TodayFinish this quiz and Levels 1 and 2 of the ladder.
+1 dayRe-derive the worked example's A and poles from memory.
+3 daysOne thermal network (Level 2 style) with your own coefficients.
+7 daysMixed set: state-space conversion plus a Eigenvalues and Modes eigenproblem.
+30 daysMeet the same A again as the plant in Laplace transfer functions.
09

Textbook mapping

ItemMapping
Main sourceKreyszig, Advanced Engineering Mathematics, Ch 4 (systems of ODEs, phase plane, qualitative methods)
Core topics13.1 Coupled ODEs · 13.2 Matrix form · 13.3 First-order representation · 13.4 State variables · 13.5 Equilibria · 13.6 Stability · 13.7 Linear response · 13.8 Coupled masses, thermal networks, control plants
Engineering connectionControls (the plant model), Vibrations (multi-DOF), Mechatronics, System Dynamics.
Skip on first passMatrix exponentials in full, controllability and observability: they belong to the Controls course itself.
Read nextLaplace Transforms and Transfer Functions.