Inferensys

Glossary

Lyapunov Function

A Lyapunov function is a scalar function used to prove the stability of an equilibrium point of a dynamical system by showing it is positive definite and its derivative along system trajectories is negative definite.
Developer building agentic RAG system, retrieval pipeline diagram on laptop, technical workspace with notes.
STABILITY ANALYSIS

What is a Lyapunov Function?

A mathematical tool from control theory used to prove the stability of equilibrium points in dynamical systems, such as robotic controllers.

A Lyapunov function is a scalar, energy-like function, V(x), defined on the state space of a dynamical system, used to prove the asymptotic stability of an equilibrium point (often the origin). The core principle is that if V(x) is positive definite (like an energy measure) and its time derivative along the system's trajectories, V̇(x), is negative definite, then all trajectories will converge to the equilibrium over time. This provides a powerful certificate of stability without needing to solve the system's differential equations explicitly.

In robotics and motion planning, Lyapunov functions are used to design and verify stable feedback controllers and navigation laws. For instance, a controller for a mobile robot might be engineered so that a chosen Lyapunov function, representing the distance to a goal, always decreases. This guarantees the robot will reach its destination. The method is also foundational for proving the stability of complex hybrid systems and for constructing Control Barrier Functions (CBFs) to ensure safety alongside stability.

STABILITY ANALYSIS

Core Properties of a Lyapunov Function

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

01

Positive Definiteness

A Lyapunov function, denoted as V(x), must be positive definite around the equilibrium point (typically the origin). 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₁² + x₂², which is clearly zero only at the origin and positive elsewhere.

02

Negative Definiteness of its Derivative

The most critical property is that the time derivative of V(x) along the system's trajectories must be negative definite (or negative semi-definite). For a system ẋ = f(x), this derivative is computed as Ṽ(x) = ∇V(x) · f(x).

  • Ṽ(0) = 0 at the equilibrium.
  • Ṽ(x) < 0 for all x ≠ 0 in a region.

This condition guarantees that V(x) strictly decreases over time as the system evolves, mathematically proving that the state x(t) is being driven toward the equilibrium.

03

Radial Unboundedness (for Global Stability)

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

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

This property ensures that the level sets of V(x) (contours of constant V) are closed and bounded. It prevents trajectories from "escaping to infinity" while decreasing V, guaranteeing they will eventually converge to the origin regardless of how far they start. A function like V(x) = x₁² + x₂² is radially unbounded.

04

Invariance Principle (LaSalle's Theorem)

When the derivative Ṽ(x) is only negative semi-definite (Ṽ(x) ≤ 0), asymptotic stability can still be proven using LaSalle's Invariance Principle. This advanced property states that the system state will converge to the largest invariant set contained within the set where Ṽ(x) = 0.

  • This is crucial for systems with conserved quantities (like mechanical energy in frictionless systems).
  • It allows engineers to prove stability even when the Lyapunov function's derivative is not strictly negative everywhere.
05

Construction Methods & Challenges

Finding a valid Lyapunov function is more art than science, but common construction methods include:

  • Quadratic Forms (V = xᵀPx): For linear systems ẋ = Ax, solving the Lyapunov Equation AᵀP + PA = -Q for a positive definite P is systematic.
  • Sum-of-Squares (SOS) Programming: For polynomial systems, this provides an algorithmic search method.
  • Energy-Based Functions: For mechanical/electrical systems, total energy (kinetic + potential) is a natural candidate.

The core challenge is that no universal method exists for nonlinear systems; failure to find a function does not prove instability.

06

Relationship to Control Design

Lyapunov functions are not just for analysis but are central to control synthesis. Techniques like:

  • Control Lyapunov Function (CLF): A function where a controller u(x) can be explicitly designed to ensure Ṽ(x) < 0.
  • Backstepping: A recursive method that constructs both the controller and the Lyapunov function step-by-step for cascaded systems.
  • Lyapunov Redesign: A method for robust control that modifies a nominal controller to handle bounded uncertainties or disturbances.

This makes the Lyapunov function a blueprint for building stabilizing controllers.

CONTROL THEORY

How Lyapunov Stability Analysis Works

Lyapunov stability analysis is a mathematical framework for proving the stability of equilibrium points in dynamical systems without explicitly solving the system's differential equations.

A Lyapunov function is a scalar, energy-like function, V(x), constructed for a dynamical system. To prove an equilibrium point (like x=0) is stable, V(x) must be positive definite (V(x) > 0 for x ≠ 0, V(0)=0) and its time derivative along system trajectories, V̇(x), must be negative definite (V̇(x) < 0 for x ≠ 0). This guarantees all system trajectories decay towards the equilibrium, like a ball rolling to the bottom of a bowl. The function's existence is sufficient for stability.

In motion planning and robotics, Lyapunov functions are used to design stable feedback controllers. A controller is synthesized to make a chosen Lyapunov function decrease, ensuring the robot's state (e.g., position error) converges to zero. This method provides formal stability guarantees for nonlinear systems where linear approximations fail. Related techniques include Control Barrier Functions (CBFs) for safety and Model Predictive Control (MPC) for optimal, constrained performance over a horizon.

STABILITY ANALYSIS

Applications in Robotics and Autonomous Systems

Lyapunov functions are a cornerstone of stability theory, providing a rigorous mathematical framework to prove that a robotic system's equilibrium (e.g., a balanced pose or a target trajectory) is stable. This is foundational for safe, predictable autonomous behavior.

01

Formal Stability Proof for Controllers

A Lyapunov function provides a certificate of stability for a designed controller. For a robot balancing (like an inverted pendulum) or tracking a planned trajectory, engineers construct a candidate Lyapunov function V(x). By proving V(x) > 0 and its derivative dV/dt < 0 along the system's trajectories, they mathematically guarantee the robot will converge to the desired state and remain there despite small disturbances. This replaces heuristic tuning with verifiable guarantees.

02

Region of Attraction Estimation

Not all stable systems recover from large pushes. The region of attraction (ROA) is the set of all initial states from which the system will converge to the equilibrium. By finding a level set of the Lyapunov function where dV/dt remains negative, engineers can computationally estimate and visualize this safe basin. This tells operators how far a legged robot can be leaned or a drone blown off course before its controller can no longer recover it, defining operational limits.

03

Basis for Control Lyapunov Functions (CLFs)

A Control Lyapunov Function (CLF) is a more powerful tool used for controller synthesis, not just analysis. The goal is to find a control law u(x) that makes dV/dt negative. This framework is used in:

  • Quadrotor flight controllers to stabilize aggressive maneuvers.
  • Feedback linearization techniques for robotic arms.
  • Real-time optimization in methods like Model Predictive Control (MPC), where ensuring dV/dt < 0 can be added as a stability constraint.
04

Integration with Safety via Barrier Functions

In modern safe robotics, Lyapunov functions (for stability) are combined with Control Barrier Functions (CBFs) (for safety). This creates a quadratic program (QP)-based controller that:

  1. Seeks stability by minimizing deviation from a CLF condition.
  2. Enforces safety by ensuring the system state remains within a defined safe set (e.g., away from obstacles, within joint limits). This allows a mobile robot to stabilize to a goal while dynamically avoiding collisions, with both properties formally verified.
05

Analyzing Learning-Based Systems

When reinforcement learning (RL) or neural networks are used for robot control, stability is often lost. Lyapunov functions are used to:

  • Analyze and certify the stability of a learned policy post-training.
  • Guide the training process itself by incorporating a Lyapunov-derived stability loss into the RL objective.
  • Provide stability guarantees for adaptive controllers that adjust parameters online, ensuring the robot remains stable even as its model is updated.
06

Switched and Hybrid System Stability

Robots often operate as hybrid systems with discrete mode switches (e.g., a walking robot's feet making/breaking contact). Proving stability requires a multiple Lyapunov function approach. Engineers design a function for each mode (e.g., left-foot stance, right-foot stance) and show that the function's value decreases at the switching instants. This proves the entire walking gait is stable, not just individual phases.

STABILITY ANALYSIS TOOLS

Lyapunov Function vs. Related Stability Concepts

A comparison of mathematical tools used to analyze the stability of dynamical systems, highlighting their distinct mechanisms, requirements, and applications in robotics and control.

Feature / CriterionLyapunov Function (Direct Method)Linearization (Indirect Method)Control Barrier Function (CBF)

Primary Purpose

Prove stability of an equilibrium point for nonlinear systems.

Analyze local stability near an equilibrium by examining eigenvalues.

Enforce forward invariance of a safe set (safety, not necessarily stability).

Mathematical Foundation

Scalar energy-like function V(x). Requires V(x) > 0 and dV/dt < 0.

Jacobian matrix of the system dynamics. Eigenvalue analysis.

Scalar function h(x). Requires existence of control input such that dh/dt ≥ -α(h(x)).

Type of Guarantee

Global or regional asymptotic stability (with suitable V(x)).

Local stability (exponentially stable if all eigenvalues have negative real parts).

Safety guarantee (system states remain in safe set).

Handles Nonlinearities

Directly, if a suitable Lyapunov function can be found.

Only locally, via approximation. Conclusions are not global.

Directly, for the defined safe set constraints.

System Requirements

Autonomous systems (no explicit time dependence in dynamics for standard analysis).

Smooth dynamics differentiable at equilibrium.

Control-affine dynamics typically required for synthesis.

Output / Result

Proof of stability. Often used for controller design via Lyapunov's second method.

Classification: stable, unstable, or marginally stable.

A safety-filtering controller that modifies desired inputs to ensure safety.

Computational Complexity

Finding V(x) is analytically challenging; automatic discovery is an active research area.

Low: compute Jacobian and eigenvalues.

Moderate: often requires solving a quadratic program (QP) online for control synthesis.

Common Use Case in Robotics

Proving stability of a balancing controller or a planned trajectory.

Initial stability check for a newly designed controller around an operating point.

Ensuring a mobile robot avoids obstacles or a manipulator stays within joint limits.

LYAPUNOV FUNCTION

Frequently Asked Questions

A Lyapunov function is a foundational mathematical tool in control theory and robotics for proving the stability of dynamical systems. These questions address its core principles, applications in motion planning, and practical implementation.

A Lyapunov function is a scalar, energy-like function, typically denoted V(x), used to prove the asymptotic stability of an equilibrium point (like a robot's goal state) in a dynamical system without solving the system's equations. It works by satisfying two key conditions: it must be positive definite (V(x) > 0 for all x ≠ 0 and V(0) = 0), and its time derivative along the system's trajectories must be negative definite (dV/dt < 0 for all x ≠ 0). Conceptually, if you can find such a function, it acts like a mathematical "bowl": the system's state is a ball that will always roll down to the bottom (the equilibrium), proving it is stable. In motion planning, a controller designed to make a Lyapunov function decrease guarantees the robot will converge to its target.

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.