Dynamical Systems
Lyapunov Stability
An energy function that proves stability of a fixed point without solving the ODE
Lyapunov's 1892 direct method certifies stability of an equilibrium x* = 0 of ẋ = f(x) by finding a scalar function V(x) that is positive definite (V(0) = 0, V > 0 elsewhere) and whose time derivative along trajectories dV/dt = ∇V · f(x) is negative semidefinite. Then trajectories are trapped in shrinking level sets of V — the equilibrium is Lyapunov stable. Strict negative definiteness gives asymptotic stability. V(x) = ½x² + ½y² works for the damped pendulum; quadratic V solves linear systems via the Lyapunov equation Aᵀ P + P A = −Q. This is the workhorse of nonlinear control theory.
- ConditionV > 0, dV/dt ≤ 0
- AsymptoticdV/dt < 0 strict
- Linear caseAᵀP + PA = −Q
- LaSallelargest invariant in {dV/dt = 0}
- GlobalV radially unbounded
- OriginLyapunov, 1892
Watch the 60-second explainer
A condensed visual walkthrough — narrated, captioned, under a minute.
The direct method
Consider an autonomous ODE ẋ = f(x) in ℝⁿ with f(0) = 0. The question: is the equilibrium x* = 0 stable? The brute-force approach — integrate, ask whether trajectories stay near zero — is impossible in closed form for almost any nonlinear system. Aleksandr Lyapunov's 1892 doctoral thesis introduced a workaround that requires no integration.
Find a continuously differentiable scalar function V : ℝⁿ → ℝ that
- Is positive definite near 0: V(0) = 0 and V(x) > 0 for x in some neighbourhood of 0 with x ≠ 0.
- Decreases along trajectories:
dV/dt = ∇V(x) · f(x) ≤ 0in the same neighbourhood.
Then the equilibrium is Lyapunov stable: trajectories starting close to 0 stay close forever. If condition (2) is strengthened to strict negativity for x ≠ 0, the equilibrium is asymptotically stable: trajectories not only stay close but converge to 0 as t → ∞.
The geometric picture: V's level sets are nested closed surfaces (for V positive definite, they look like distorted spheres near the origin). dV/dt ≤ 0 means a trajectory can only move to lower V — it gets trapped inside shrinking surfaces, hence stays near 0. Strict decrease forces it to a point — namely the unique minimum of V, the origin.
Lyapunov method vs alternatives
| Method | Input | Output | Local / Global | Limitations |
|---|---|---|---|---|
| Lyapunov direct | Lyapunov function V(x) | Stability or asymptotic | Local; global if V radially unbounded | Finding V is hard; no algorithm |
| Linearisation (Hartman-Grobman) | Jacobian at 0 | Stability type (node/spiral/saddle) | Local only | Fails at non-hyperbolic fixed points |
| Lyapunov equation AᵀP + PA = −Q | Linear system matrix A | Quadratic V; certifies Hurwitz | Global (linear) | Linear only; Q must be PD |
| LaSalle's invariance principle | V with dV/dt ≤ 0 only | Asymptotic stability when {dV̇=0} ∩ inv set = {0} | Local; global with radial unboundedness | Need to identify largest invariant set |
| Center manifold theorem | Decomposition into stable/centre directions | Stability on the centre manifold | Local | Computation of centre manifold is delicate |
| Input-to-state stability (ISS) | ISS-Lyapunov V with disturbance | Boundedness under bounded inputs | Global typically | Requires extra inequality on V̇ |
Worked example: the damped pendulum
The damped pendulum θ̈ + b θ̇ + sin θ = 0 with b > 0. Write as a 2D system with x₁ = θ, x₂ = θ̇:
ẋ₁ = x₂
ẋ₂ = −sin x₁ − b x₂
Try the physical energy
V(x₁, x₂) = ½ x₂² + (1 − cos x₁).
It is C¹, V(0, 0) = 0, V(x) > 0 for (x₁, x₂) ≠ (0, 0) in a neighbourhood of 0. Compute the time derivative:
dV/dt = sin(x₁) · x₂ + x₂ · (−sin x₁ − b x₂) = −b x₂².
This is negative semidefinite — zero on x₂ = 0, negative everywhere else. So Lyapunov's theorem gives stability of the origin. For asymptotic stability we need more, because dV/dt = 0 on the entire axis x₂ = 0, not just at the origin.
LaSalle's invariance principle rescues asymptotic stability: the largest invariant subset of {(x₁, x₂) : x₂ = 0} is just {(0, 0)} (on x₂ = 0 the dynamics force ẋ₂ = −sin x₁; a trajectory stuck on x₂ = 0 must have sin x₁ = 0, but to stay there forever we need x₁ = 0 since otherwise we drift). So trajectories converge to the origin — the pendulum settles to its hanging position. Quantitatively, the convergence rate is set by b; small damping gives slow decay through many oscillations.
Linear systems: the Lyapunov equation
For a linear system ẋ = A x with A constant n×n, try the quadratic candidate V(x) = xᵀ P x for some symmetric positive-definite P. Its time derivative along trajectories is
dV/dt = ẋᵀ P x + xᵀ P ẋ = xᵀ (Aᵀ P + P A) x.
For dV/dt to be negative definite, we need Aᵀ P + P A = −Q for some positive-definite Q. The Lyapunov equation
Aᵀ P + P A = −Q
has a unique positive-definite solution P for every Q > 0 if and only if A is Hurwitz (every eigenvalue has Re(λ) < 0). This converts the stability question into a single matrix equation — solvable by vectorising into a linear system in P's entries. The resulting V = xᵀ P x is then a global Lyapunov function, and the origin of the linear system is globally asymptotically stable. The Lyapunov equation is the conceptual root of all LMI-based control synthesis (H₂, H∞, robust control).
Formal proof of the basic theorem
Statement: let f : ℝⁿ → ℝⁿ be locally Lipschitz with f(0) = 0. Suppose V : Ω → ℝ is C¹ on an open Ω ∋ 0, V(0) = 0, V(x) > 0 for x ∈ Ω∖{0}, and dV/dt(x) ≤ 0 in Ω. Then x* = 0 is Lyapunov stable.
Proof. Given ε > 0 small enough that the closed ball B̄_ε(0) ⊂ Ω, set m = min{V(x) : ‖x‖ = ε} > 0 by positive definiteness and continuity. Choose δ > 0 with V(x) < m for ‖x‖ < δ — such δ exists by continuity at 0 with V(0) = 0. Any trajectory x(t) starting in B_δ(0) has V(x(0)) < m. Because dV/dt ≤ 0, V is non-increasing along x(t): V(x(t)) < m for all t ≥ 0. If x(t₀) ever reached the boundary ‖x‖ = ε at some t₀, we would have V(x(t₀)) ≥ m, contradiction. So ‖x(t)‖ < ε forever — Lyapunov stability.
For asymptotic stability under strict negative definiteness, one strengthens the argument: V monotone-decreasing and bounded below by 0 must converge to some limit V* ≥ 0; if V* > 0 the trajectory stays in an annulus where dV/dt is bounded away from 0, contradicting V → V* > 0. So V → 0, which forces x → 0 by positive definiteness.
Variants and extensions
- Global asymptotic stability. The above is local. For global asymptotic stability, require V to be radially unbounded: V(x) → ∞ as ‖x‖ → ∞. Without it, even strict decrease can give trajectories escaping to infinity. (Pathology: V(x) = x²/(1+x²) is positive definite but bounded; dV/dt < 0 doesn't prevent x → ∞.)
- LaSalle's invariance principle. When dV/dt is only semidefinite, the largest invariant subset E ⊆ {x : dV/dt(x) = 0} attracts all trajectories. If E = {0}, asymptotic stability holds even with semidefinite V̇.
- Input-to-state stability (ISS). For systems with input ẋ = f(x, u), Sontag's ISS uses a Lyapunov function with the bound dV/dt ≤ −α(‖x‖) + γ(‖u‖); the state is bounded for any bounded input, with size determined by γ.
- Control Lyapunov functions (CLFs). For control-affine systems ẋ = f(x) + g(x) u, a CLF is a V with the property that one can always choose u to make dV/dt strictly negative. Sontag's universal formula synthesises a stabilising feedback law u = κ(x) directly from V.
- Discrete-time and stochastic versions. For x_{k+1} = f(x_k), require V(f(x)) − V(x) ≤ 0; for stochastic systems, the Foster-Lyapunov drift condition E[V(x_{k+1}) | x_k] − V(x_k) ≤ −α + β · 1_{x_k ∈ C} drives ergodicity.
- Converse theorems. Kurzweil-Massera: if x* = 0 is uniformly asymptotically stable, a smooth Lyapunov function exists. Existence is therefore guaranteed; finding it is the engineering problem.
Where Lyapunov stability shows up
- Control engineering. Backstepping, sliding-mode, model-reference adaptive control are all Lyapunov-based synthesis methods. Stabilising controllers are designed by picking V and then choosing u to enforce dV/dt < 0.
- Robotics. Joint-space and task-space tracking controllers (PD with gravity compensation, computed torque) prove convergence to a desired trajectory via Lyapunov functions on the tracking error.
- Power systems. Transient stability of electric grids after a fault is certified by energy-function methods (Athay-Podmore-Virmani) — direct descendants of the Lyapunov approach to swing equations.
- Neural networks. Hopfield networks were designed around an explicit Lyapunov-style energy that decreases at each update, guaranteeing convergence to a local minimum.
- Game theory and learning. Convergence of fictitious play, replicator dynamics, and many gradient algorithms is proved via Lyapunov functions on the strategy or weight space.
- Reinforcement learning safety. Recent "neural Lyapunov" methods learn V from data and use SOS / SDP relaxations to certify that a policy stabilises a target — bringing classical control rigor into RL.
Common pitfalls
- Forgetting positive definiteness near 0. A function V with V(0) = 0 but V(x) = 0 on a curve through the origin is not positive definite. The whole theorem hinges on V being strictly positive away from x = 0; otherwise the level sets are not nested closed surfaces.
- Confusing semidefinite with definite. dV/dt ≤ 0 gives stability; dV/dt < 0 (strict, for x ≠ 0) gives asymptotic stability. Semidefinite V̇ alone does not imply convergence — you need LaSalle to bridge the gap.
- Skipping radial unboundedness for global claims. A local V with strict decrease only gives local asymptotic stability. For global claims you need V(x) → ∞ as ‖x‖ → ∞. Many textbook errors stem from claiming global stability with a bounded V.
- Computing dV/dt along the wrong dynamics. The time derivative
dV/dt = ∇V · f(x)is taken along trajectories of the specific ODE, not as a general derivative. For ẋ = f(x) + perturbation, dV/dt picks up an extra term from the perturbation that you must analyse separately (ISS or robust control). - Wrong choice of V leads to "no information". A V that does not work is not evidence that the equilibrium is unstable. Lyapunov's theorem is sufficient, not necessary, in either direction. Converse theorems guarantee a V exists if the equilibrium is stable, but constructing it can require deep ingenuity.
- Treating V like physical energy when there is friction in. Physical energy works as a Lyapunov function when there is damping, but it gives only semidefinite V̇ (the friction direction). Without LaSalle this misses asymptotic stability. The damped pendulum example shows exactly this trap and its resolution.
Frequently asked questions
What is a Lyapunov function?
For ẋ = f(x) with fixed point at 0, a C¹ scalar V(x) with V(0) = 0, V > 0 for x ≠ 0 nearby (positive definite), and dV/dt = ∇V · f(x) ≤ 0 along trajectories (negative semidefinite). It generalises energy — strictly positive away from equilibrium, non-increasing in time.
What does Lyapunov stability mean precisely?
For every ε > 0 there is δ > 0 such that ‖x(0)‖ < δ implies ‖x(t)‖ < ε for all t ≥ 0. Asymptotic stability adds x(t) → 0 as t → ∞. The two coincide for Hurwitz linear systems but not for centers — a linear center is Lyapunov stable but not asymptotically stable.
How is Lyapunov's method different from linearisation?
Linearisation reads stability off Jacobian eigenvalues — local, fails at non-hyperbolic fixed points. Lyapunov's method needs a function V but no eigenvalues; handles non-hyperbolic cases, can certify global stability with radial unboundedness, and works for non-smooth systems. The price is finding V — no algorithm in general.
What is the LaSalle invariance principle?
When dV/dt is only semidefinite, Lyapunov gives stability but not asymptotic stability. LaSalle: trajectories converge to the largest invariant subset of {dV/dt = 0}. If that subset is only the origin, asymptotic stability follows. Lets V = ½θ̇² + (1 − cos θ) work for the damped pendulum.
How do you find a Lyapunov function?
Four strategies: (1) physical energy for mechanical systems; (2) quadratic V = xᵀ P x with P from AᵀP + PA = −Q for linear systems; (3) SOS optimisation via SDP; (4) composite Lyapunov for cascaded structure. There is no universal algorithm — finding V is the heart of nonlinear control synthesis.
What is the Lyapunov equation?
For ẋ = A x, AᵀP + PA = −Q has a unique positive-definite solution P for every positive-definite Q iff A is Hurwitz (every eigenvalue has Re < 0). The associated V = xᵀPx satisfies dV/dt = −xᵀQx < 0 — converting stability into a single linear matrix equation. Foundation of LMI control synthesis.