Inferensys

Glossary

Lyapunov Function

A Lyapunov function is a scalar, energy-like function used to mathematically prove the stability of an equilibrium point in dynamic systems and control theory.
Developer building agentic RAG system, retrieval pipeline diagram on laptop, technical workspace with notes.
CONTROL THEORY

What is a Lyapunov Function?

A Lyapunov function is a fundamental mathematical tool in control theory and Model Predictive Control (MPC) used to formally prove the stability of a dynamical system's equilibrium point.

A Lyapunov function is a scalar, energy-like function, typically denoted V(x), assigned to the states of a dynamical system. For a stable equilibrium (like a resting point), this function must be positive definite (V(x) > 0 for x ≠ 0) and its time derivative along the system's trajectories must be negative definite (dV/dt < 0). This guarantees that the system's state will continuously decrease this "energy" and converge to the equilibrium, providing a rigorous certificate of asymptotic stability.

In Model Predictive Control (MPC), Lyapunov functions are crucial for designing stability guarantees. They are often incorporated as a terminal cost in the objective function or used to define a terminal constraint set at the end of the prediction horizon. By ensuring the optimized trajectory decreases this function, MPC can provably stabilize the closed-loop system, even when solving a finite-horizon optimization problem online. This bridges the gap between optimal control and guaranteed stability.

MATHEMATICAL FOUNDATIONS

Key Properties of a Lyapunov Function

A Lyapunov function is a scalar, energy-like function used to prove the stability of an equilibrium point for a dynamical system. Its core properties provide a formal, mathematical certificate of stability without requiring explicit solution of the system's differential equations.

01

Positive Definiteness

A Lyapunov function, denoted as V(x), must be positive definite around the equilibrium point (typically chosen as the origin, x=0). This means:

  • V(0) = 0 (zero at the equilibrium).
  • V(x) > 0 for all x ≠ 0 in a region around the origin.

This property ensures the function acts like an abstract measure of "energy" or "distance" from the equilibrium. Common examples include quadratic forms like V(x) = xᵀPx, where P is a positive definite matrix.

02

Negative Definiteness of its Derivative

The time derivative of the Lyapunov function along the trajectories of the system, denoted V̇(x), must be negative definite (or at least negative semi-definite). For a system ẋ = f(x), this derivative is computed as V̇(x) = (∂V/∂x) f(x).

  • V̇(0) = 0.
  • V̇(x) < 0 for all x ≠ 0 in a region.

This is the critical property: it guarantees that the "energy" V(x) is strictly decreasing over time, forcing the system state x(t) to converge to the origin.

03

Radial Unboundedness (for Global Stability)

To prove global asymptotic stability (stability from any initial state), a Lyapunov function must be radially unbounded. This means:

  • V(x) → ∞ as ||x|| → ∞.

This property ensures that the sub-level sets of V(x) (the regions where V(x) ≤ c) are bounded for all finite values of c. It prevents trajectories from escaping to infinity while the function value decreases. A quadratic Lyapunov function V(x) = xᵀPx is inherently radially unbounded.

04

Role in MPC Stability Guarantees

In Model Predictive Control (MPC), a Lyapunov function is often employed as a terminal cost and used to define a terminal constraint set. This is a key technique in the dual-mode or quasi-infinite horizon MPC paradigm.

  • Terminal Cost: The function V_f(x) is added to the MPC cost function evaluated at the end of the prediction horizon.
  • Terminal Set: A constraint requires the terminal state to lie within a region where V_f(x) is a valid Lyapunov function for the system under a local stabilizing controller.

Together, these enforce that the MPC optimization constructs a feasible, stabilizing sequence of controls.

05

Connection to Linear Systems and LQR

For linear time-invariant (LTI) systems of the form ẋ = Ax, stability analysis is greatly simplified. A quadratic Lyapunov function V(x) = xᵀPx is sought. Its derivative is V̇(x) = xᵀ(AᵀP + PA)x.

Stability is proven if there exists a positive definite matrix P satisfying the Lyapunov equation: AᵀP + PA = -Q where Q is any positive definite matrix. This equation is directly related to the solution of the Algebraic Riccati Equation (ARE) from Linear Quadratic Regulator (LQR) design, where the optimal cost-to-go is itself a Lyapunov function.

06

Control Lyapunov Function (CLF)

A Control Lyapunov Function (CLF) is an extension for systems with control inputs ẋ = f(x, u). It is a Lyapunov function candidate for which, for every state x ≠ 0, there exists a control input u such that V̇(x, u) < 0.

  • Existence vs. Synthesis: A CLF proves the system is stabilizable. Finding the actual control law u(x) is a separate step.
  • Integration with MPC: CLF constraints can be added to the MPC optimization problem to guarantee stability, often forming a safety filter or being used in conjunction with Control Barrier Functions (CBFs) for provably safe control.
CONTROL THEORY COMPARISON

Lyapunov Stability vs. Other Analysis Methods

A comparison of formal methods for analyzing the stability of dynamical systems, highlighting the role of Lyapunov's direct method in control design.

Feature / CriterionLyapunov's Direct MethodLinearization (Jacobian)Frequency Domain (Nyquist/Bode)Simulation-Based Analysis

Primary Mathematical Foundation

Scalar energy-like functions (V(x))

Eigenvalues of the system Jacobian

Complex analysis & transfer functions

Numerical integration of ODEs

Applicability to Nonlinear Systems

Local (near equilibrium)

Provides Formal Stability Proof

Local asymptotic only

Linear systems only

Handles Constrained Systems

Yes (via invariant sets)

Useful for Controller Synthesis

Yes (control Lyapunov functions)

Yes (pole placement)

Yes (loop shaping)

Trial-and-error tuning

Computational Burden for Analysis

Finding V(x) is challenging

Low (matrix computation)

Low (plot generation)

High (many scenarios)

Provides Stability Margins/Robustness

Via robust/ISS Lyapunov functions

Gain/phase margins

Qualitative insight only

Directly Informs MPC Design

Yes (terminal cost/constraint)

Indirectly (local approx.)

Empirically

LYAPUNOV FUNCTION

Frequently Asked Questions

A Lyapunov function is a foundational mathematical tool in control theory used to prove the stability of dynamic systems. In Model Predictive Control (MPC), it plays a critical role in guaranteeing that the closed-loop system will converge to a desired state.

A Lyapunov function is a scalar, energy-like function, denoted as V(x), that is used to prove the stability of an equilibrium point (like a desired setpoint) for a dynamic system. If you can find a function V(x) that is always positive and its derivative along the system's trajectories is always negative (except at the equilibrium), then the system is guaranteed to be stable—it will naturally settle to that equilibrium point. Think of it as proving a ball will roll to the bottom of a bowl by showing the total energy (the Lyapunov function) is always decreasing.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.