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.
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.
The core idea
List everything the system remembers. That list is the state. Its evolution is ẋ = Ax + Bu.
ẋ = Ax + BuAny 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 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 + BuA 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:
| Poles | Response |
|---|---|
| all real parts negative | stable: returns to equilibrium |
| any real part positive | unstable: runs away |
| complex pair | oscillates; 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.
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.
- ProblemWrite the oscillator as ẋ = Ax + Bu and read its behavior from A.
- Given / findm = 2 kg, c = 8 N·s/m, k = 50 N/m. Find A, its eigenvalues, and the stability verdict.
- AssumptionsLinear spring and damper; F is the single input.
- ModelName states x₁ = x (position) and x₂ = ẋ (velocity). Then ẋ₁ = x₂ by definition, and Newton gives ẋ₂.
- Equationsẋ₁ = x₂ ẋ₂ = (F − 8x₂ − 50x₁)/2 = −25x₁ − 4x₂ + F/2
- 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.
- 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.
- 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.
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.
- Given / finddi/dt = −2i − ω + V, dω/dt = i − ω. Find A and B, the eigenvalues, and the equilibrium under V = 12.
- State and inputState x = (i, ω); input u = V. Current and speed are remembered; the voltage is imposed.
- MatricesA = [−2, −1; 1, −1], B = [1; 0].
- Characteristic equationdet(A − λI) = (−2−λ)(−1−λ) − (−1)(1) = λ² + 3λ + 3.
- Polesλ = (−3 ± √(9 − 12))/2 = −1.5 ± 0.87i. Negative real parts, so the motor is stable and settles with a slight overshoot.
- Steady speedSet the derivatives to zero: i = ω, and −2ω − ω + 12 = 0 gives ω = 4, i = 4. The motor settles at ω = 4 in steady state.
- 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.
- 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.
Misconceptions and diagnostics
| Mistake | Symptom | Diagnostic question | Correction |
|---|---|---|---|
| Too few states | A 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 inputs | The 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 zero | Offsets 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). |
Practice ladder
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.
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.
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.
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.
Working with AI, and proving it yourself
Use AI as an examiner, not a solver
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.
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 ζ.
Textbook mapping
| Item | Mapping |
|---|---|
| Main source | Kreyszig, Advanced Engineering Mathematics, Ch 4 (systems of ODEs, phase plane, qualitative methods) |
| Core topics | 13.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 connection | Controls (the plant model), Vibrations (multi-DOF), Mechatronics, System Dynamics. |
| Skip on first pass | Matrix exponentials in full, controllability and observability: they belong to the Controls course itself. |
| Read next | Laplace Transforms and Transfer Functions. |