Lyapunov's method is a:
Backstepping:
Sliding mode control:
Points in the state space where if you start there you stay there.
if
\begin{equation} \dot{x} = f(x) \end{equation}find the values where $\dot{x} = 0$, (i.e. f(x) = 0)
In non linear systems we dont use the words: stability of the system, becuase is ambiguos (multiple stability points).
We use the words: Stability of an equilibrium.
Lyapunov has introduced two stability methods:
Used to determinate asymptotically stability.
Lyapunov idea:
Notations:
For explain the L-stability is common find a figure as:
Then L-stability is shown as:
The equilibrium point x0 is locally asymptotically stable if there exists r and R and are finite.
Global asymptotically stability: Starting anywhere we finished in a equilibrium point, $r = \infty$
Escential facts
If $V(x)$ is a smooth function (continous with continuous derivatives), it is define the next concept of lyapunov stability:
where $\dot{V}(x)$ is a time-derivative of $V(x)$.
V(x) is a Lyapunov function if:
If a Lyapunov function V(x) can be found for the state of a nonlinear or linear system $\dot{x} = f(x)$, where $f(0) = 0$, then the state $x = 0$ (equilibrium state) is asymptotically stable
There are no general algorithm to construct Lyapunov functions. But and idea is explained bellow.
A staring point to define a Lyapunov function can be of the next form:
$V(x) = \frac{\sum_{i = 1}^{n} {x_i ^2}}{2} $
V(0) represent a equilibrium point, its values can be diferent to 0
In [23]:
#Example step 1: Obtain values of V(0)
from sympy.abc import*
from sympy import *
from tools import*
t = Symbol('t')
x1 = Symbol('x_1')(t)
f = -x1 +x1**3
V0 = find_roots(f,'x_1')
print "The equilibrium points are:"
V0
Out[23]:
In [8]:
%matplotlib inline
from numpy import*
import matplotlib.pyplot as plt
fig = plt.figure()
axes = fig.add_subplot(111)
x = arange(-3,3,.1)
y = (x-1)**2/2
axes.plot(x,y)
Out[8]:
But why $\frac{(x-1)^2}{2}$ is $>0$ intead of $\frac{x^2}{2}$ if the sugested rules say that a staring point to define a Lyapunov function can be of the next form:
$V(x) = \frac{\sum_{i = 1}^{n} {x_i ^2}}{2} $
beacuse with $\frac{(x-1)^2}{2} \Longrightarrow V(0) = 0$. Remember that $V(0)$ is the evaluation of $V(x)$ in the equilibrium point, in this case $x =1$
The derivative of $V(x)$ is: $\dot{V}(x) = (x-1) \dot{x}$
In [12]:
#Example step 2: obtain time derivative of V(x)
from tools import*
var = ['x']
x, = def_vars(var,True)
V = (x-1)**2/2
Vd = diff(V,t)
Vd
Out[12]:
We need to subtitute $\dot{x} = f(x)$ in $\dot{V}(x)$, we have
In [24]:
x, = def_vars(var,False)
sub = simplify((x-1)*(-x +x**3))
sub
Out[24]:
In [40]:
fig = plt.figure()
axes = fig.add_subplot(111)
x = arange(0,2,.1)
y = (x-1)*(-x +x**3)
plt.ylim(-1, 2)
plt.grid(True)
axes.plot(x,y)
Out[40]:
$\dot{V}(x)$ is positive defined $>0$ in the locallity of $x=1$, then the equilibrium is unstable
x = 0
The candidate is $\frac{x^2}{2}$, $V(0) = 0$, $\dot{V(}x) = x (-x + x**3) $
In [43]:
fig = plt.figure()
axes = fig.add_subplot(111)
x = arange(-1.5,1.5,.1)
y = (x)*(-x +x**3)
plt.ylim(-1, 3)
plt.grid(True)
axes.plot(x,y)
Out[43]:
$\dot{V}(x)$ is negative semidefined $\leq 0$ in the locallity of $x=0$, then the equilibrium is locally stable
Simillarlly is done with the last equilibrium point
More examples:
In [ ]: