# 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 $K_{p}\in R^{r*m_{p}}$ , $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:

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

where $x\in R^{n}$  and $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:

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

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

$\in R^{n}$

## The Data

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

## The Optimization Problem

For the system described, we choose the following control law

{\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 $K_{p}\in R^{r*m_{p}}$ , $K_{d}\in R^{r*m_{d}}$ , we obtain the closed-loop system as follows:

{\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:

{\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 $K_{p}\in R^{r*m_{p}}$  and $K_{d}\in R^{r*m_{d}}$  that satisfy the following LMIs:

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

and

{\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, $K_{p}$  and $K_{d}$  that can be substituted into the system as

{\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