# LMIs in Control/pages/stabilization of second order systems

LMIs in Control/pages/stabilization of second order systems

Stabilization is a vastly important concept in controls, and is no less important for second order systems. A second order system can be conceptualized most simply by the model of a mass-spring-damper. Velocity and position are of course chosen as the states for this system, and the state space model can be written as it is below. The goal of stabilization in this context is to design a control law that is made up of two controller gain matrices ${\displaystyle K_{p}\in R^{r*m_{p}}}$, ${\displaystyle K_{d}\in R^{r*m_{d}}}$. These allow the construction of a stabilized closed loop controller.

## The System

Here, we want to stabilize a second order system of the following form:

{\displaystyle {\begin{aligned}M{\ddot {x}}+D{\dot {x}}+Kx&=Bu,\end{aligned}}}

where ${\displaystyle x\in R^{n}}$  and ${\displaystyle u\in R^{r}}$  are the state vector and the control vector, respectively, and M (called the "mass matrix"), D (called the "structural damping matrix"), K (called the "stiffness matrix"), and B are the system coefficient matrices of appropriate dimensions.

To make the system follow standard convention, we reformulate the system as:

{\displaystyle {\begin{aligned}A_{2}{\ddot {x}}+A_{1}{\dot {x}}+A_{0}x&=Bu\\y_{d}&=C_{d}{\dot {x}}\\y_{p}&=C_{p}x,\end{aligned}}}

where: ${\displaystyle x\in R^{n}}$  and ${\displaystyle u\in R^{r}}$  are the state vector and the control vector, respectively; ${\displaystyle y_{d}\in R^{m_{d}}}$  and ${\displaystyle y_{p}\in R^{m_{p}}}$  are the derivative output vector and the proportional output vector, respectively; and ${\displaystyle A_{2},A_{1},A_{0},B,C_{d},}$  and ${\displaystyle C_{p}}$  are the system coefficient matrices of appropriate dimension. Note that ${\displaystyle A_{2}}$  must be ${\displaystyle >0}$ , and ${\displaystyle A_{0},A_{2}}$  must be ${\displaystyle \in S^{n}}$ .

To further define: ${\displaystyle x}$  is${\displaystyle \in R^{n}}$  and is the state vector, ${\displaystyle A_{0}}$  is ${\displaystyle \in R^{n*n}}$  and is the state matrix on ${\displaystyle x}$  , ${\displaystyle A_{1}}$  is ${\displaystyle \in R^{n*n}}$  and is the state matrix on ${\displaystyle {\dot {x}}}$  , ${\displaystyle A_{2}}$  is ${\displaystyle \in R^{n*n}}$  and is the state matrix on ${\displaystyle {\ddot {x}}}$ , ${\displaystyle B}$  is ${\displaystyle \in R^{n*r}}$  and is the input matrix, ${\displaystyle u}$  is ${\displaystyle \in R^{r}}$  and is the input, ${\displaystyle C_{d}}$  and ${\displaystyle C_{p}}$  are ${\displaystyle \in R^{m*n}}$  and are the output matrices, ${\displaystyle y_{d}}$  is ${\displaystyle \in R^{m}}$  and is the output from ${\displaystyle C_{d}}$ , and ${\displaystyle y_{p}}$  is ${\displaystyle \in R^{m}}$  and is the output from ${\displaystyle C_{p}}$ .

${\displaystyle \in R^{n}}$

## The Data

The matrices ${\displaystyle A_{2},A_{1},A_{0},B,C_{d},C_{p}}$ .

## The Optimization Problem

For the system described, we choose the following control law

{\displaystyle {\begin{aligned}u&=K_{p}y_{p}+K_{d}y_{d}\\&=K_{p}C_{p}{\hat {x}}+K_{d}C_{d}x,\end{aligned}}}

with ${\displaystyle K_{p}\in R^{r*m_{p}}}$ , ${\displaystyle K_{d}\in R^{r*m_{d}}}$ , we obtain the closed-loop system as follows:

{\displaystyle {\begin{aligned}A_{2}{\ddot {x}}+(A_{1}-BK_{p}C_{p}){\dot {x}}+(A_{0}-BK_{d}C_{d})x&=0.\\\end{aligned}}}

We are tasked to design a state feedback control law such that the above system is hurwitz stable.

First, in order to solve this problem, we need to introduce a Lemma. This Lemma comes from Appendix A.6 in "LMI's in Control systems" by Guang-Ren Duan and Hai-Hua Yu. This Lemma states the following:

{\displaystyle {\begin{aligned}A_{2}>0,A_{1}+A_{1}^{T}>0,A_{0}>0\\\end{aligned}}}

## The LMI: Stabilization of Second Order Systems

There is a solution if there exists matrices ${\displaystyle K_{p}\in R^{r*m_{p}}}$  and ${\displaystyle K_{d}\in R^{r*m_{d}}}$  that satisfy the following LMIs:

{\displaystyle {\begin{aligned}A_{0}-BK_{d}C_{d}>0,\end{aligned}}}

and

{\displaystyle {\begin{aligned}(A_{1}-BK_{p}C_{p})+(A_{1}-BK_{p}C_{p})^{T}>0.\end{aligned}}}

## Conclusion:

Finally, having solved the LMI the optimization will produce two matrices, ${\displaystyle K_{p}}$  and ${\displaystyle K_{d}}$  that can be substituted into the system as

{\displaystyle {\begin{aligned}u&=K_{p}C_{p}{\dot {x}}+K_{d}C_{d}x\end{aligned}}}

to obtain a stabilized second order system.

## Implementation

This implementation requires Yalmip and Sedumi. https://github.com/rezajamesahmed/LMImatlabcode/blob/master/stab2ndorder.m