制御工学ブログ

制御工学の研究者を20年やっている国立大学教員が制御工学の基礎から専門まで広く説明します。記事内では、動画やMATLABコードを交えながらわかりやすく解説する方針です。制御工学チャンネル(YouTube,動画ポータル)を運営しています。

Stability of Systems Represented by State Equations

This article summarizes the stability of systems represented by state equations. Videos related to stability are placed at the bottom. 

Poles of the Controlled System and Stability

Here, I will explain the stability of control systems. First, let's assume the following system is given.

\begin{equation} \dot x(t) = Ax(t) + Bu(t) \\ y(t) = Cx(t) \end{equation}

The characteristics of the various parameters are summarized in following article.

blog.control-theory.com

 

At this point, whether the given system is stable or not can be determined by examining the characteristics of  \dot x = Ax + Bu, particularly characterized by the eigenvalues of matrix  A.

Matrix  A is a square matrix, and its eigenvalues can be found by solving the following equation.

\begin{equation} det ( A-\lambda I) = 0\end{equation}

Here,  I is the identity matrix. If  A is an  n\times n matrix, there are  n eigenvalues.

By checking these eigenvalues, if the real parts of all eigenvalues are negative, the system is asymptotically stable.

On the other hand, if the real part of any eigenvalue is positive or zero, the system is unstable or marginally stable.

Here, we will check the stability for both the case where the system order  n = 1 and the case where the order  n = 3.

When the Order of the Controlled System is 1

Here, we consider a scalar system with one state.  A is a scalar value, not a matrix. When  A = -1, B = 1, the state equation can be written as follows.

\begin{equation} \dot x(t) = -x(t) + u(t)\end{equation}

The solution of this state equation is

 x(t) = x(0) e^{-t} + \int_{0}^{t} e^{-(t-{\tau})} u({\tau})d\tau

and if  u(t) = 0,  x(t) asymptotically approaches zero over time, regardless of the initial state  x(0). On the other hand, if  A = 1, B = 1,

 x(t) = x(0) e^{t} + \int_{0}^{t} e^{t-\tau} u(\tau) d \tau

and it diverges. Suppose  A = 0, B = 1, then the state equation is

\begin{equation} \dot x(t) = u(t) \end{equation}

This means that the integral of the input  u(t) becomes the state  x(t). For example, if  u(t) is a step signal, the state  x(t) diverges.

When the order of the controlled system is 3

Consider the case where the following matrix  A is given.

\begin{equation} A = \begin{bmatrix} -1 & 0 & 0\\0 &-2&0\\0&0&-3\end{bmatrix}\end{equation}

In this case, the eigenvalues are  -1, -2, -3, and since the real parts of all eigenvalues are negative, it is asymptotically stable. When analyzing a control system, eigenvalues are plotted on the complex plane. When plotting the eigenvalues on the complex plane for this example, it looks like the following diagram.

Eigenvalues of the Matrix 01

An example of the response waveform in this case is shown.

Response Waveform 01

Next, consider the case where  A is given by the following equation.

\begin{equation} A = \begin{bmatrix} -1 & 0 & 0\\0 &-2&-1\\0&1&-2\end{bmatrix}\end{equation}

In this case, the eigenvalues are  -1, -2+i, -2-i, and since the real parts of all eigenvalues are negative, it is asymptotically stable, similar to the previous case. When plotting the eigenvalues on the complex plane for this example, it looks like the following diagram.

Eigenvalues of the Matrix 02

An example of the response waveform in this case is shown.

Response Waveform 02

Finally, consider the case where  A is given by the following equation.

\begin{equation} A = \begin{bmatrix} -1 & 0 & 0\\0 &1&-1\\0&1&1\end{bmatrix}\end{equation}

In this case, the eigenvalues are  -1, 1+i, 1-i, and since it includes an eigenvalue with a positive real part, it is unstable. When plotting the eigenvalues on the complex plane for this example, it looks like the following diagram.

Eigenvalues of the Matrix 03

An example of the response waveform in this case is shown.

Response Waveform 03

This concludes the explanation of eigenvalues of matrices and stability. Design is performed while observing not only stability but also the characteristics of the response. Pole placement is explained in the following article.

blog.control-theory.com

 

Lyapunov's Stability Criterion

Now, I will explain Lyapunov's stability criterion. Lyapunov's stability criterion is a powerful method for determining the stability of autonomous systems without solving for the solution.

It is a quite powerful tool, capable of handling nonlinear systems. The basic idea is as follows.

First, consider a scalar-valued function  V(x(t)) . This is a positive definite function that is always positive for any  x(t). For example,

\begin{equation} V(x)=x^T P x\end{equation}

where  P is set as a positive definite matrix, making it a positive definite function.

If the time derivative of  V(x(t)) is always negative, then the value of  V(x(t)) will continuously decrease over time. This is the basic idea behind stability determination using the Lyapunov function.

Lyapunov Equation for Linear Systems

For linear systems (autonomous systems), the Lyapunov equation is composed of the  A matrix of the autonomous system and matrices  P, Q in the following equation.

\begin{equation} A^T P+ P A + Q =0\end{equation}

If there exists a pair of positive definite matrix  P and semi-positive definite matrix  Q that satisfies this equation, the system is asymptotically stable. If the real parts of all eigenvalues of  A are negative, it is known that for any given  Q, solving the Lyapunov equation yields a positive definite matrix  P. In this case, the Lyapunov function is given by

\begin{equation} V = x(t)^T P x(t)\end{equation}

and its derivative is

 \dot V = x(t)^T (A^T P + PA) x(t)

Furthermore, since the  Q satisfying the Lyapunov equation is semi-positive definite,

\begin{equation}\dot V = - x(t)^T Q x(t)\end{equation}

makes  \dot V always non-positive, and it monotonically decreases.

Here is an example of a program in MATLAB for stability analysis.

    A = [-1 0 0;0 -2 -1;0 1 -2];       
Q = [1 0 0;0 1 0;0 0 1]; %Identity matrix
   P = lyap(A,Q);

The output result in this case is as follows.

  P = 0.5000         0         0
         0    0.2500         0
         0         0    0.2500

Indeed, using the obtained  P, calculating  A^T P + PA + Q yields zero. Also,  P is evidently a positive definite matrix.

However, applying the above function lyap to unstable systems does not yield a  P that becomes positive definite.

Here, consider the case where the matrix  A is given by the following equation in a system with  n = 2 and  u(t) = 0.

\begin{equation} A = \begin{bmatrix}0&1\\-7.1 &-3.4 \end{bmatrix}\end{equation}

When solving the Lyapunov equation with  Q = I as the identity matrix, the Lyapunov matrix  P is determined as follows.

\begin{equation}P = \begin{bmatrix}1.4306&0.0704\\0.0704 &0.1678 \end{bmatrix}\end{equation}

In this case,  P is determined as a positive definite matrix.

The solution trajectory of

\begin{equation} \dot x = A x\end{equation}

is represented by the dashed line in the diagram below. The contour of the Lyapunov function is shown as solid lines. It can be confirmed that the dashed line always progresses in the direction where the Lyapunov function value decreases. Depending on how the  A matrix is given, the function that becomes the Lyapunov function changes.

Example of Solution Trajectory



MATLAB Live Script File

A MATLAB live script file is placed at the following link. This is explained in detail in the video on Lyapunov's stability criterion.

lyapunov.mlx - Google Drive

The following is a video explaining poles and stability of systems represented by state equations.

youtu.be

The following is a video explaining Lyapunov's method for systems represented by state equations.

youtu.be