Nonlinear Dynamics, Stability & Chaos
Dynamical systems theory studies how states evolve. Learn state space and phase portraits, equilibria and linearisation with the Jacobian, classification of fixed points (nodes, saddles, spirals, centres), Lyapunov stability, limit cycles, bifurcations, and chaos with sensitive dependence — using pendulums, oscillators and the logistic map.
Linear systems are predictable: double the input, double the output. Real systems — pendulums swinging high, power grids, flutter, chemical reactors, populations — are nonlinear, and can jump between states, oscillate on their own or behave chaotically.
Instead of hunting for formulas, dynamical systems theory asks qualitative questions: Where are the equilibria? Are they stable? What happens as a parameter changes? This geometric view is essential for safe design.
An analogy
Think of a ball rolling on a landscape: valleys are stable equilibria, hilltops unstable, mountain passes saddles. Changing a parameter reshapes the landscape — valleys can merge or vanish (bifurcations).
State space and equilibria
Write any ODE system as first-order ẋ = f(x). A pendulum θ̈ + (g/L)sin θ = 0 becomes x₁ = θ, x₂ = θ̇. Equilibria are points where everything stops: hanging down (θ = 0) and balanced upright (θ = π).
Linearise and classify
Near an equilibrium, f(x) ≈ J(x* )δx. The eigenvalues of J decide: both negative → stable node; complex with negative real part → stable spiral (damped oscillation); opposite signs → saddle; purely imaginary → centre (linearisation inconclusive). The upright pendulum has λ = ±√(g/L): a saddle, hence unstable.
Limit cycles and bifurcations
Nonlinear systems can oscillate at a fixed amplitude regardless of initial conditions — a limit cycle (Van der Pol oscillator, heart rhythm, machine-tool chatter). As a parameter varies, equilibria can appear/disappear (saddle-node), exchange stability (transcritical), split (pitchfork — e.g. buckling), or give birth to oscillations (Hopf — e.g. aircraft flutter).
Chaos
Chaos is bounded, aperiodic behaviour with sensitive dependence on initial conditions (positive Lyapunov exponent). It needs at least three dimensions for continuous flows (Lorenz system) or one for maps (logistic map). Chaotic systems are still deterministic and can be controlled by small, well-timed inputs (OGY control).
Formulas
- Equilibrium:
f(x*) = 0 - Linearisation:
δẋ = J(x*) δx - Stability (hyperbolic):
All Re(λ) < 0 → asymptotically stable; any Re(λ) > 0 → unstable - 2-D classification:
τ = trace J, Δ = det J: Δ < 0 saddle; τ² > 4Δ node; τ² < 4Δ spiral - Lyapunov:
V > 0, V̇ < 0 → stable (no solution needed) - Logistic map:
xₖ₊₁ = r xₖ (1 − xₖ); period doubling at r = 3, 3.449, …; chaos beyond ≈ 3.57 - Lyapunov exponent:
|δx(t)| ≈ |δx₀| e^(λ_L t); λ_L > 0 → chaos
Worked example: Damped oscillator classification
Given: ẋ = y, ẏ = −x − 0.5y
Find: Type of equilibrium.
- J = [[0, 1], [−1, −0.5]]
- λ² + 0.5λ + 1 = 0 → λ = −0.25 ± 0.968i
Answer: Stable spiral
Worked example: Inverted pendulum
Given: θ̈ = (g/L) sin θ − … about θ = π
Find: Stability.
- Linearise: δθ̈ = (g/L) δθ
- λ = ±√(g/L)
Answer: Saddle → unstable (needs active control)
Worked example: Logistic fixed point
Given: r = 2.8
Find: x* and stability.
- x* = 1 − 1/r = 0.6429
- f′(x*) = 2 − r = −0.8 → |f′| < 1
Answer: Stable fixed point (oscillating approach)
Logistic map: from equilibrium to chaos
import numpy as np
# Logistic map x_{k+1} = r x_k (1 - x_k): long-term behaviour vs r
for r in (2.8, 3.2, 3.5, 3.9):
x = 0.2
for _ in range(1000): # discard transient
x = r * x * (1 - x)
orbit = set()
for _ in range(64):
x = r * x * (1 - x)
orbit.add(round(x, 4))
kind = f"period {len(orbit)}" if len(orbit) <= 8 else "chaotic"
print(f"r = {r}: {kind:9s} e.g. {sorted(orbit)[:4]}")
# Sensitive dependence: two starts 1e-10 apart at r = 3.9
a, b = 0.2, 0.2 + 1e-10
for k in range(60):
a, b = 3.9 * a * (1 - a), 3.9 * b * (1 - b)
if abs(a - b) > 0.1:
print(f"trajectories diverge (> 0.1) after {k + 1} iterations")
break
# r = 2.8: period 1 e.g. [0.6429]
# r = 3.2: period 2 e.g. [0.513, 0.7995]
# r = 3.5: period 4 e.g. [0.3828, 0.5009, 0.8269, 0.875]
# r = 3.9: chaotic e.g. [0.1013, 0.1023, 0.1069, 0.1072]
# trajectories diverge (> 0.1) after 37 iterationsA one-line deterministic rule produces period doubling and then chaos. A 10⁻¹⁰ difference grows to order one in 37 steps — why long-range weather prediction is fundamentally limited.
Common mistakes
- Wrong: Trusting linearisation at a centre. — Right: Purely imaginary λ: nonlinear terms decide; use Lyapunov or simulation.
- Wrong: Assuming deterministic means predictable. — Right: Chaos limits prediction horizon.
- Wrong: Checking only one equilibrium. — Right: Map all equilibria and their basins.
Applications
- Power systems: Transient stability of generators; voltage collapse (saddle-node).
- Aeroelasticity: Flutter onset as a Hopf bifurcation.
- Structures: Buckling as a pitchfork bifurcation.
- Control & robotics: Lyapunov design of stabilising controllers.
Key takeaways
- Find equilibria, then linearise with the Jacobian.
- Eigenvalues classify stability.
- Bifurcations change qualitative behaviour.
- Chaos: deterministic but unpredictable long-term.
Going further
- Centre manifold theory: Reduces dynamics near non-hyperbolic points.
- Poincaré maps: Turn continuous flows into discrete maps.
- Koopman operator: Linear representation of nonlinear dynamics for data-driven modelling.