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.
Glossary
Lyapunov Function

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.
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.
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.
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.
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.
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.
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.
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.
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.
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 / Criterion | Lyapunov's Direct Method | Linearization (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 |
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.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Lyapunov functions are a cornerstone of stability analysis in control theory. The following terms are essential for understanding their role in Model Predictive Control and related advanced control methodologies.
Control Barrier Function (CBF)
A Control Barrier Function (CBF) is a mathematical construct used to enforce safety constraints by defining a forward-invariant safe set. It certifies that if a system starts within this safe set, it will remain there for all future time under an appropriate control law. In practice, CBFs are often used as safety filters alongside performance-oriented controllers like MPC.
- Key Mechanism: Derives a constraint on the control input that guarantees the time derivative of the barrier function is non-positive on the boundary of the safe set.
- Relation to Lyapunov: While a Lyapunov function certifies stability (convergence to an equilibrium), a CBF certifies safety (remaining within a set). They can be combined in a CLF-CBF framework for stable and safe control.
Stability (Nominal & Robust)
Stability is the fundamental property that a system's state will remain bounded or converge to a desired equilibrium under specified conditions.
- Nominal Stability: Guarantees convergence when the system model used for controller design is perfectly accurate, with no disturbances. Lyapunov's direct method is the primary tool for proving nominal stability.
- Robust Stability: Ensures the system remains stable despite model uncertainties, disturbances, or noise. This is a more stringent requirement. In MPC, robust stability is often addressed via techniques like tube-based MPC or constraint tightening, which use the Lyapunov function analysis as a foundation but account for bounded errors.
- Lyapunov's Role: A Lyapunov function decreasing over time is the certificate for nominal stability. For robust stability, one might use a Lyapunov function for the error system or a robust control Lyapunov function (RCLF).
Terminal Cost & Terminal Constraint
In Model Predictive Control (MPC), the terminal cost and terminal constraint are design elements added to the finite-horizon optimal control problem to guarantee closed-loop stability, using Lyapunov theory.
- Terminal Cost (P): An additional term, often a quadratic form
x(t+N)^T P x(t+N), added to the MPC cost function. MatrixPis typically chosen as the solution to the Algebraic Riccati Equation (ARE) for the linearized system, making the terminal cost a Lyapunov function for the system under a local stabilizing controller. - Terminal Set (X_f): A constraint requiring the predicted state at the end of the horizon to lie within a positively invariant set. This set is often defined as a sub-level set of the terminal Lyapunov function.
- Stability Proof: This combination ensures the optimal cost of the MPC problem acts as a Lyapunov function for the closed-loop system, proving stability.
Algebraic Riccati Equation (ARE)
The Algebraic Riccati Equation (ARE) is a foundational matrix equation in optimal control theory. For a linear system with quadratic cost, the solution to the ARE provides the optimal state feedback gain for the Linear Quadratic Regulator (LQR), which minimizes an infinite-horizon cost.
- Direct Link to Lyapunov: The optimal cost-to-go for the LQR problem,
V(x) = x^T P x, wherePsolves the ARE, is a quadratic Lyapunov function for the closed-loop system. Its time derivative equals the negative of the stage cost. - Role in MPC: The matrix
Pfrom the ARE is the standard choice for the terminal cost in Linear MPC. This elegantly connects the infinite-horizon optimal solution (LQR) to the finite-horizon MPC formulation, providing a ready-made Lyapunov function to ensure stability.
Optimal Control Problem (OCP)
An Optimal Control Problem (OCP) is the core mathematical formulation solved (repeatedly) by Model Predictive Control. It defines the objective and rules for controlling a dynamic system.
- Components: An OCP is defined by: 1) A dynamic model (e.g.,
x_{k+1} = f(x_k, u_k)), 2) A cost function to minimize (e.g., tracking error + control effort), 3) Constraints on states and inputs, 4) An initial condition and a time horizon. - Lyapunov Connection: The value function of an OCP—the optimal cost achieved from a given initial state—can often serve as a Lyapunov function for the closed-loop system. This is the theoretical bedrock for proving MPC stability. Designing the OCP with a terminal cost derived from a Lyapunov function ensures this property holds.
Receding Horizon Control
Receding Horizon Control is the real-time implementation strategy of MPC, describing the closed-loop execution loop. It is not an algorithm itself but the operational principle.
- The Loop: At each time step
t:- Measure/estimate the current system state.
- Solve an Optimal Control Problem (OCP) over a finite future horizon
[t, t+N]. - Apply only the first control input from the optimized sequence to the system.
- At time
t+1, shift the horizon forward and repeat.
- Stability Challenge: Solving a finite-horizon OCP at each step does not inherently guarantee infinite-horizon stability. This is where Lyapunov theory intervenes. By designing the OCP with a terminal cost/constraint based on a Lyapunov function, the receding-horizon application of the control law is provably stable.

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.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us