# Control-Lyapunov function

In control theory, a control-Lyapunov function[1] is a Lyapunov function ${\displaystyle V(x)}$ for a system with control inputs. The ordinary Lyapunov function is used to test whether a dynamical system is stable (more restrictively, asymptotically stable). That is, whether the system starting in a state ${\displaystyle x\neq 0}$ in some domain D will remain in D, or for asymptotic stability will eventually return to ${\displaystyle x=0}$. The control-Lyapunov function is used to test whether a system is feedback stabilizable, that is whether for any state x there exists a control ${\displaystyle u(x,t)}$ such that the system can be brought to the zero state by applying the control u.

More formally, suppose we are given an autonomous dynamical system

${\displaystyle {\dot {x}}=f(x,u)}$

where ${\displaystyle x\in \mathbf {R} ^{n}}$ is the state vector and ${\displaystyle u\in \mathbf {R} ^{m}}$ is the control vector, and we want to feedback stabilize it to ${\displaystyle x=0}$ in some domain ${\displaystyle D\subset \mathbf {R} ^{n}}$.

Definition. A control-Lyapunov function is a function ${\displaystyle V:D\rightarrow \mathbf {R} }$ that is continuously differentiable, positive-definite (that is ${\displaystyle V(x)}$ is positive except at ${\displaystyle x=0}$ where it is zero), and such that

${\displaystyle \forall x\neq 0,\exists u\qquad {\dot {V}}(x,u)=\nabla V(x)\cdot f(x,u)<0.}$

The last condition is the key condition; in words it says that for each state x we can find a control u that will reduce the "energy" V. Intuitively, if in each state we can always find a way to reduce the energy, we should eventually be able to bring the energy to zero, that is to bring the system to a stop. This is made rigorous by the following result:

Artstein's theorem. The dynamical system has a differentiable control-Lyapunov function if and only if there exists a regular stabilizing feedback u(x).

It may not be easy to find a control-Lyapunov function for a given system, but if we can find one thanks to some ingenuity and luck, then the feedback stabilization problem simplifies considerably, in fact it reduces to solving a static non-linear programming problem

${\displaystyle u^{*}(x)=\operatorname {*} {argmin}_{u}\nabla V(x)\cdot f(x,u)}$

for each state x.

The theory and application of control-Lyapunov functions were developed by Z. Artstein and E. D. Sontag in the 1980s and 1990s.

## Example

Here is a characteristic example of applying a Lyapunov candidate function to a control problem.

Consider the non-linear system, which is a mass-spring-damper system with spring hardening and position dependent mass described by

${\displaystyle m(1+q^{2}){\ddot {q}}+b{\dot {q}}+K_{0}q+K_{1}q^{3}=u}$

Now given the desired state, ${\displaystyle q_{d}}$, and actual state, ${\displaystyle q}$, with error, ${\displaystyle e=q_{d}-q}$, define a function ${\displaystyle r}$ as

${\displaystyle r={\dot {e}}+\alpha e}$

A Control-Lyapunov candidate is then

${\displaystyle V={\frac {1}{2}}r^{2}}$

which is positive definite for all ${\displaystyle q\neq 0}$, ${\displaystyle {\dot {q}}\neq 0}$.

Now taking the time derivative of ${\displaystyle V}$

${\displaystyle {\dot {V}}=r{\dot {r}}}$
${\displaystyle {\dot {V}}=({\dot {e}}+\alpha e)({\ddot {e}}+\alpha {\dot {e}})}$

The goal is to get the time derivative to be

${\displaystyle {\dot {V}}=-\kappa V}$

which is globally exponentially stable if ${\displaystyle V}$ is globally positive definite (which it is).

Hence we want the rightmost bracket of ${\displaystyle {\dot {V}}}$,

${\displaystyle ({\ddot {e}}+\alpha {\dot {e}})=({\ddot {q}}_{d}-{\ddot {q}}+\alpha {\dot {e}})}$

to fulfill the requirement

${\displaystyle ({\ddot {q}}_{d}-{\ddot {q}}+\alpha {\dot {e}})=-{\frac {\kappa }{2}}({\dot {e}}+\alpha e)}$

which upon substitution of the dynamics, ${\displaystyle {\ddot {q}}}$, gives

${\displaystyle ({\ddot {q}}_{d}-{\frac {u-K_{0}q-K_{1}q^{3}-b{\dot {q}}}{m(1+q^{2})}}+\alpha {\dot {e}})=-{\frac {\kappa }{2}}({\dot {e}}+\alpha e)}$

Solving for ${\displaystyle u}$ yields the control law

${\displaystyle u=m(1+q^{2})({\ddot {q}}_{d}+\alpha {\dot {e}}+{\frac {\kappa }{2}}r)+K_{0}q+K_{1}q^{3}+b{\dot {q}}}$

with ${\displaystyle \kappa }$ and ${\displaystyle \alpha }$, both greater than zero, as tunable parameters

This control law will guarantee global exponential stability since upon substitution into the time derivative yields, as expected

${\displaystyle {\dot {V}}=-\kappa V}$

which is a linear first order differential equation which has solution

${\displaystyle V=V(0)exp^{-\kappa t}}$

And hence the error and error rate, remembering that ${\displaystyle V={\frac {1}{2}}({\dot {e}}+\alpha e)^{2}}$, exponentially decay to zero.

If you wish to tune a particular response from this, it is necessary to substitute back into the solution we derived for ${\displaystyle V}$ and solve for ${\displaystyle e}$. This is left as an exercise for the reader but the first few steps at the solution are:

${\displaystyle r{\dot {r}}=-{\frac {\kappa }{2}}r^{2}}$
${\displaystyle {\dot {r}}=-{\frac {\kappa }{2}}r}$
${\displaystyle r=r(0)exp^{-{\frac {\kappa }{2}}t}}$
${\displaystyle {\dot {e}}+\alpha e=({\dot {e}}(0)+\alpha e(0))exp^{-{\frac {\kappa }{2}}t}}$

which can then be solved using any linear differential equation methods.

## Notes

1. ^ Freeman (46)