{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "[中文版](http://nbviewer.jupyter.org/github/w407022008/All-of-Notes/blob/master/System_Science_and_Control_Engineering/系统稳定性分析%20Lyapunov%20Stability.ipynb)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# System stability\n", "\n", "There is a state equilibrium point $X_e$ that satisfies $f(x_e)=0$,\n", "- if $\\forall \\epsilon >0,\\exists \\delta(\\epsilon)>0$,$\\forall x_0$ exists $\\| x_0-x_e\\| <\\delta$,as long as $t\\geq t_0$,$\\| x(t)-x_e\\| <\\epsilon$,then the state point $X_e$ is called the **equilibrium point**\n", "- if $\\exists \\delta>0$ $\\forall x_0$ exists $\\| x_0-x_e\\|<\\delta$,and$\\lim\\limits_{t\\rightarrow\\inf}x(t)=a$,then the state point $X_e$ is ** asymptotically stable equilibrium point**.\n", "- if $\\exists \\alpha,\\beta,\\delta>0$ $\\forall X_0$ exists $\\| x_0-x_e\\|<\\delta$,as long as $t\\geq t_0$ $\\|x(t)-x_e\\|\\leq\\alpha\\|x_0-x_e\\|e^{-\\beta t}$,then the state point $X_e$ is the ** exponential stable equilibrium point**." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Lyapunov first method\n", "\n", "**Non-linear system**,a state equation:$\\dot X=f(X)$,where f(X) has a continuous partial derivative for X,has a equilibrium point $X_e$,and then:$\\dot X=f(x_e)+\\frac{\\partial \\vec{f}}{\\partial \\vec{X}^T}_{(X_e)}(X-X_e)+R_{(X-X_e)}=A(X-X_e)+R_{(X-X_e)}$,where Matrix A is a Jacobian matrix:$A=\\begin{bmatrix}\\frac{\\partial f_1}{\\partial X_1}&\\cdots&\\frac{\\partial f_1}{\\partial X_n}\\\\ \\vdots&\\ddots&\\vdots\\\\ \\frac{\\partial f_n}{\\partial X_1}&\\cdots&\\frac{\\partial f_n}{\\partial X_n}\\end{bmatrix}_{(X_e)}$\n", "\n", "- If **all eigenvalues of matrix A have a negative real part**, then the system is progressively stable near the equilibrium point $X_e$ and is independent of R.\n", "- If **all eigenvalues of matrix A have a positive real part**, then the system is unstable near the equilibrium point $X_e$ and is independent of R.\n", "- If **all the eigenvalues of matrix A are not positive real parts, and there is zero real part**, then the stability of the system near the equilibrium point $X_e$ depends on R." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Lyapunov second method\n", "\n", "Based on the energy analysis, a positive definite energy functional is introduced to describe the system and observe whether the functional is gradually decaying with time to determine the stability of the system.\n", "\n", "> Attention! Lyapunov's second method is a sufficient condition for determining stability. This means that if such a functional is not found, the system may also be stable.\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Linear system stability analysis\n", "## - Linear time-invariant continuous system\n", "\n", "System state equation:$\\dot X=AX$ is necessarily and sufficiently asymptotic stability at the equilibrium point $X_e$: \n", "[Hermitian matrix](https://www.wikiwand.com/en/Hermitian_matrix) $\\forall$Q,there is always a Hermitian matrix P,satisfying the Lyapunov equation:$$PA+A^TP=-Q$$. If the matrix P is positive, the system state is stable and the system positive definite energy functional is $V(x)=X^TPX$. \n", "**Matlab code:**\n", "``` matlab\n", "P=lyap(A,Q)\n", "```" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "PropeValue =\n", "\n", " 0.4384\n", " 4.5616\n", "\n", "\n", "detP =\n", "\n", " 0.1300\n", "\n", "\n" ] } ], "source": [ "A=[1 2;1 4];\n", "PropeValue=eig(A)\n", "P=lyap(A,eye(2));\n", "detP=det(P)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## - Linear time-variant continuous system\n", "\n", "System state equation:$\\dot X(t)=A(t)X(t)$ is necessarily and sufficiently asymptotic stability at the equilibrium point $X_e$: \n", "Hermitian matrix $\\forall$Q,there is a Hermitian matrix P,satisfying the Lyapunov equation:$$\\begin{cases}P(t)A(t)+A^T(t)P(t)+\\dot P(t)=-Q(t)& t\\leq t_f \\\\ P(t_f)>0\\end{cases}$$. If the matrix P is positive, the system state is stable and the system positive definite energy functional is $V(x,t)=X^TP(t)X$. \n", "Known by the theory of Ricatti matrix differential equations:$$P(t)=\\Phi^T(t_f,t)P(t_f)\\Phi(t_f,t)+\\int_t^{t_f}\\Phi^T(\\tau,t)Q(\\tau)\\Phi(\\tau,t)d\\tau$$" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## - Linear time-invariant discrete system\n", "\n", "System state equation:$X(k+1)=GX(k)$ is necessarily and sufficiently asymptotic stability at the equilibrium point : \n", "Hermitian matrix $\\forall$Q,there is a Hermitian matrix P,satisfying the Lyapunov equation:$$G^TPG-P=-Q$$. If the matrix P is positive, the system state is stable and the system positive definite energy functional is $V(x,t)=X^TP(t)X$。 \n", "**Matlab code:**\n", "``` matlab\n", "P=dlyap(G,Q)\n", "```" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Nonlinear system stability analysis\n", "\n", "In a linear system, if the state point $X_e$ is the equilibrium point, $X_e$ is the system's only equilibrium point. However, in a nonlinear system, the system may have multiple local asymptotically stable equilibrium points (attractors), and there are also multiple unstable equilibrium points (isolators). Lyapunov's second method provides sufficient sufficiency, but it is not necessary." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## - Krasovsky stability theory\n", "\n", "Nonlinear time-invariant continuous system equation of state:$\\dot X(t)=f(X)$,a equilibrium point $X_e$,where f(X) has a continuous partial derivative for X,is necessarily and sufficiently asymptotic stability:\n", "$$-Q=J+J^T<0$$ where,$J=\\frac{\\partial f}{\\partial X^T}$ is a Jaccobian matrix,and the positive definite energy functional of the system is $V(x)=\\dot X^T\\dot X=f^T(X)f(X)$" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## - 阿依捷尔曼法\n", "\n", "Nonlinear system state equation:$\\dot X=AX+Bf(X)$,a equilibrium point $X_e=0$. if it satisfies $K_{i1}X\\leq f_i(X)\\leq K_{i2}X$,the equilibrium point $X_e=0$ is the local asymptotic stability point of the system。" ] } ], "metadata": { "kernelspec": { "display_name": "Matlab", "language": "matlab", "name": "matlab" }, "language_info": { "codemirror_mode": "octave", "file_extension": ".m", "help_links": [ { "text": "MetaKernel Magics", "url": "https://github.com/calysto/metakernel/blob/master/metakernel/magics/README.md" } ], "mimetype": "text/x-octave", "name": "matlab", "version": "0.15.2" } }, "nbformat": 4, "nbformat_minor": 2 }