November 22, 2024

Failure of Linearization Approach for Control System Analysis and Design of Nonlinear Systems


In this control engineering and control theory tutorial, we explain how the linearization approach can fail when someone is analyzing stability or designing controllers for nonlinear systems. The main motivation for creating this video tutorial comes from the fact that I have noticed that often students, as well as scientists and engineers blindly use the linearization approach when analyzing the stability or designing controllers of nonlinear systems. Consequently, it is very important to explain when we can safely use a linearized model for stability analysis or control system design. The YouTube tutorial accompanying this webpage tutorial is given below.

Lyapunov’s First Method

Consider the nonlinear system

(1)   \begin{align*}\dot{\mathbf{x}}=\mathbf{f}\big(\mathbf{x}\big)\end{align*}

where \mathbf{x}\in \mathbb{R}^{n} is the state vector and \mathbf{f}\big(\cdot \big) is a nonlinear function that is represented as follows

(2)   \begin{align*}\mathbf{f}\big(\mathbf{x}\big)=\begin{bmatrix} f_{1}(\mathbf{x}) \\ f_{2}(\mathbf{x}) \\ \vdots \\ f_{n}(\mathbf{x}) \end{bmatrix}\end{align*}

where f_{i}(\mathbf{x}), i=1,2,\ldots, n are scalar functions. Let \mathbf{x}^{*} be an equilibrium point around which we linearize the model (1). Let the linearized matrix A be defined by

(3)   \begin{align*}A=\left \frac{\partial \mathbf{f}\big(\mathbf{x}\big)  }{\partial  \mathbf{x}}\right \vert_{\mathbf{x}=\mathbf{x}^{*}}\end{align*}

where the matrix \frac{\partial \mathbf{f}\big(\mathbf{x}\big)  }{\partial  \mathbf{x}} \in \mathbb{R}^{n\times n} is the matrix of partial derivatives defined by

(4)   \begin{align*}\frac{\partial \mathbf{f}\big(\mathbf{x}\big)  }{\partial  \mathbf{x}}=\begin{bmatrix} \frac{\partial f_{1} }{\partial x_{1}} &   \frac{\partial f_{1} }{\partial x_{2}} & \ldots & \frac{\partial f_{1} }{\partial x_{n}} \\ \frac{\partial f_{2} }{\partial x_{1}} &   \frac{\partial f_{2} }{\partial x_{2}} & \ldots & \frac{\partial f_{2} }{\partial x_{n}} \\  \vdots  &    \vdots & \ldots &  \vdots \\ \frac{\partial f_{n} }{\partial x_{1}} &   \frac{\partial f_{n} }{\partial x_{2}} & \ldots & \frac{\partial f_{n} }{\partial x_{n}}  \end{bmatrix}\end{align*}

The linearized system is defined by

(5)   \begin{align*}\dot{\mathbf{z}}=A\mathbf{z}\end{align*}

where \mathbf{z}\in \mathbb{R}^{n} is the relative state-space variable defined with respect to the equilibrium point \mathbf{x}^{*}, that is

(6)   \begin{align*}\mathbf{z}=\mathbf{x}-\mathbf{x}^{*}\end{align*}

The following theorem is one of the most important results:

LOCAL STABILITY THEOREM: Consider the nonlinear system (1) and its linearization (5) around the equilibrium point \mathbf{x}^{*}. Then

  1. If all the eigenvalues of the matrix A have strictly negative real parts, then the equilibrium point \mathbf{x}^{*} is asymptotically stable.
  2. If at least one of the eigenvalues of A has a positive real part, then the equilibrium point \mathbf{x}^{*} is unstable.
  3. If one or more eigenvalues of A have zero real parts and no eigenvalues with positive real parts, then we cannot conclude anything about the stability of the equilibrium point \mathbf{x}^{*} by using the linearization approach.

This theorem is very important for the stability analysis by using the linearization approach. Namely, if at least one eigenvalue has a zero real part, and we do not have eigenvalues with positive real parts, then we cannot conclude anything by using the linearization approach. That is, if the linearized model has eigenvalues on the imaginary axis, and no eigenvalue in the right-half of the complex plane, then the linearized model can behave quite differently from the original nonlinear model around the equilibrium point.

Let us illustrate this with the following example

(7)   \begin{align*}\dot{x}_{1}=-x_{2}+x_{1}(x_{1}^{2}+x_{2}^{2}) \\\dot{x}_{2}=x_{1}+x_{2}(x_{1}^{2}+x_{2}^{2})\end{align*}

The point x_{1}^{*}=0 and x_{2}^{*}=0 is the equilibrium point of the nonlinear system. To see that, we can see that (x_{1}^{*},x_{2}^{*}) is the solution of the equation

(8)   \begin{align*}0=-x_{2}+x_{1}(x_{1}^{2}+x_{2}^{2}) \\0=x_{1}+x_{2}(x_{1}^{2}+x_{2}^{2})\end{align*}

Next, we need to linearize the system around this equilibrium point. To do that, we need to recognize that

(9)   \begin{align*}f_{1}=-x_{2}+x_{1}(x_{1}^{2}+x_{2}^{2})  \\f_{2}=x_{1}+x_{2}(x_{1}^{2}+x_{2}^{2})\end{align*}

Next, we need to compute the matrix A. The matrix A is given by

(10)   \begin{align*}A & =\left\begin{bmatrix} \frac{\partial f_{1} }{\partial x_{1}} & \frac{\partial f_{1} }{\partial x_{2}}  \\ \frac{\partial f_{2}}{\partial x_{1}} & \frac{\partial f_{2}} {\partial x_{2}}  \end{bmatrix}\right \vert_{x_{1}=0,x_{2}=0} =\left  \begin{bmatrix} 3x_{1}^{2} + x_{2}^{2} & -1+2x_{1}x_{2}  \\ 1+2x_{1}x_{2} & x_{1}^{2}+3x_{2}^{2}   \end{bmatrix}\right \vert_{x_{1}=0,x_{2}=0}  \\A & =\begin{bmatrix} 0 & -1 \\ 1 & 0  \end{bmatrix}\end{align*}

Next, we need to determine the eigenvalues of the matrix A. The eigenvalues are given by

(11)   \begin{align*}\det (sI-A)=\det \Big(\begin{bmatrix}s & 0 \\ 0 & s  \end{bmatrix} - \begin{bmatrix} 0 & -1 \\ 1 & 0  \end{bmatrix} \Big) = \det \Big(\begin{bmatrix} s & 1 \\ -1 & s \end{bmatrix} \Big)   =s^{2}+1\end{align*}

Consequently, the eigenvalues are

(12)   \begin{align*}\det (sI-A)=s^{2}+1=0 \\s_{1}=-j, \;\; s_{2}=j\end{align*}

where j is the imaginary unit. Someone who does not know control system theory will conclude that since the linearized system is stable (marginally stable but not asymptotically stable) nonlinear system will also be stable (marginally stable). Well, this is a wrong conclusion!

Let us show that. To show that, we need to introduce polar coordinates, since our system will have a much simpler description in the polar coordinates.

(13)   \begin{align*}x_{1}=\rho \cos (\theta)  \\x_{2}=\rho \sin (\theta) \end{align*}

where \rho >0 and \theta are the new state-space variables. They are illustrated in the figure below.

Our next task is to express the system dynamics in the polar coordinates (13). To do that, from (13), we have

(14)   \begin{align*}x_{1}^{2}+x_{2}^{2}=\rho^{2}\cos^{2} (\theta)+\rho^{2}\sin^{2} (\theta)=\rho^{2}\end{align*}

That is,

(15)   \begin{align*}\rho^{2}=x_{1}^{2}+x_{2}^{2}\end{align*}

By differentiating the last expression, we obtain

(16)   \begin{align*}2\rho \dot{\rho} =2x_{1}\dot{x}_{1}+2x_{2}\dot{x}_{2} \\\rho \dot{\rho} =x_{1}\dot{x}_{1}+x_{2}\dot{x}_{2}\end{align*}

Next, let us substitute (15) in the system dynamics (7), as the result, we obtain

(17)   \begin{align*}\dot{x}_{1}=-x_{2}+x_{1}\rho^{2} \\\dot{x}_{2}=x_{1}+x_{2}\rho^{2}\end{align*}

By substituting (15) and (17) in (16), we obtain

(18)   \begin{align*}\rho \dot{\rho} & =x_{1}(-x_{2}+x_{1}\rho^{2})+x_{2}(x_{1}+x_{2}\rho^{2})=-x_{1}x_{2}+x_{1}^{2}\rho^{2}+x_{2}x_{1}+x_{2}^{2}\rho^{2}  \\\rho \dot{\rho}  & = \rho^{2}(x_{1}^{2}+x_{1}^{2}) \\\rho \dot{\rho}  & = \rho^{4} \\ \dot{\rho} & = \rho^{3}\end{align*}

That is, the first state equation in the polar coordinates is very simple, and it takes the following form:

(19)   \begin{align*} \dot{\rho} & = \rho^{3}\end{align*}

To derive the second equation for \dot{\theta}, we can start from this expression

(20)   \begin{align*}\frac{x_{2}}{x_{1}}=\frac{\rho \sin (\theta) }{\rho \cos (\theta)} = \frac{\sin (\theta )}{\cos (\theta )} = \tan (\theta)\end{align*}

From the last equation, we obtain

(21)   \begin{align*}\theta = \arctan \Big( \frac{x_{2}}{x_{1}} \Big)\end{align*}

We know the derivative of \arctan ( ) function is given by the following equation

(22)   \begin{align*}\frac{d}{dz} \arctan(z)=\frac{1}{1+z^{2}}\end{align*}

By using this expression and by taking the first derivative of (21) with respect to time, we obtain

(23)   \begin{align*}\dot{\theta}=\frac{1}{1+\Big(\frac{x_{2}}{x_{1}} \Big)^{2}}\cdot \frac{\dot{x}_{2}x_{1}-x_{2}\dot{x}_{1}}{x_{1}^{2}}\end{align*}

By substituting (7) in the last equation, we obtain

(24)   \begin{align*}\dot{\theta}=1\end{align*}

The state-space model in the polar coordinates takes a simple form

(25)   \begin{align*}\dot{\rho}=\rho^{3}  \\\dot{\theta}=1\end{align*}

Since \dot{\rho} is always positive for positive \rho and \rho is by definition always positive, we conclude that the nonlinear system is unstable. However, the linearized model is marginally stable. This example clearly shows the pitfalls of not properly understanding when we can perform stability analysis that is based on linearization.

Next, let us plot and compare the phase portraits of linearized and nonlinear models. To plot the phase portraits, we use the Python code posted here. The phase portrait of the nonlinear model (7) is given below.

Phase portrait and trajectory of the nonlinear system (7).

The phase portrait of the linearized system with the matrix A given by the equation (10) is given below.

Phase portrait and trajectory of the linearized system with the A matrix given in (10).