-3
$\begingroup$

I'm angry with the Lyapunov stability criteria. Consider this system:

enter image description here

Here, $u$ is the input and $x_1$, $x_2$ are my state variables. Now, solve for the transference of the system, defining my output as $y = x_1$:

$$Y(s) = X_1(s) = U(s) \frac{\frac{1}{s-1}}{1 + \frac{2}{s-1}} \frac{\frac{1}{s}}{1 + \frac{1}{s}} = U(s) \frac{1}{s+1} \frac{1}{s+1}$$

I got two negative poles on $s = -1$, nothing weird, a completely stable system.

Now, let's build the state equation:

$$\begin{cases}X_1 (s+1) = X_2\\ X_2 (s+1) = U\end{cases}$$ $$\begin{cases}x_1'(t) + x_1(t) = x_2(t)\\ x_2'(t) + x_2(t) = u(t)\end{cases}$$

Rearranging we got that:

$$\begin{bmatrix}x_1'(t)\\x_2'(t)\end{bmatrix} = \begin{bmatrix}-1&1\\0&-1\end{bmatrix}\begin{bmatrix}x_1(t)\\x_2(t)\end{bmatrix} + \begin{bmatrix}0\\1\end{bmatrix} u(t)$$

Now, determine stability using Lyapunov criteria. I have to find a matrix that is the solution to Lyapunov. Having $A = \begin{bmatrix}-1&1\\0&-1\end{bmatrix}$ and proposing $Q = \begin{bmatrix}1&0\\0&1\end{bmatrix}$, I run on Python the function of Scipy:

import numpy as np
from scipy import linalg
a = np.array([[-1, 1], [0, -1]])
q = np.eye(2)
m = linalg.solve_continuous_lyapunov(a, q)
e = np.linalg.eig(m)

From where I got $M = \begin{bmatrix}-0.75&-0.25\\-0.25&-0.5\end{bmatrix}$, and computing its eigenvalues I got $\lambda_1 = -0.9045085$, $\lambda_2 = -0.3454915$. Therefore, the Lyapunov matrix for this system is not definite positive, hence the system is unstable, but previously my conclusion was that the system was stable!!! What am I doing wrong?

$\endgroup$
3
  • $\begingroup$ see en.wikipedia.org/wiki/Lyapunov_stability $\endgroup$
    – hyportnex
    Commented Oct 13 at 19:14
  • $\begingroup$ @hyportnex Which part? $\endgroup$
    – tac
    Commented Oct 13 at 19:20
  • 1
    $\begingroup$ "Stability for linear state space models" $\endgroup$
    – hyportnex
    Commented Oct 13 at 19:20

1 Answer 1

2
$\begingroup$

Ok, thanks to @hyportnex I realize that I didn't understand anything about Lyapunov. He talked about functions, not matrices. Actually, what I need is to find a function $V$ such that the function is definite positive and its time derivative is definite negative.

Let $V(\vec{x}) = \vec{x}^tM\vec{x}$. If $M$ is positive definite, then $V$ is definite positive. Setting the input equal to zero, the derivative will be $V(\vec{x'}) = \vec{x'}^tM\vec{x'} = \vec{x}^t (A^t M + M A)\vec{x}$. If $A^t M + M A$ is definite negative, then $V'$ is definite negative.

Thats is the purpose of solving Lyapunov equation. Reading the documentation of scipy.linalg.solve_continuous_lyapunov, it solves $ A M + M A^t = Q$, so I should actually choose a definite negative for $Q$ and call the function for $A^t$ in this case.

Setting $Q = \begin{bmatrix}-1&0\\0&-1\end{bmatrix}$, I excecute the command and got the Lyapunov solution $M = \begin{bmatrix}0.75&0.25\\0.25&0.5\end{bmatrix}$, a positive definite matrix.

Therefore, I found a pair of matrices $M$ and $Q$ which satisfy the conditions I mentioned, so the system is asymptotically stable.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.