# LMIs in Control/pages/LMI for H2/Hinf Polytopic Controller for Robot Arm.

LMIs in Control/pages/LMI for H2/Hinf Polytopic Controller for Robot Arm.

## The System:

{\begin{aligned}{\dot {x}}(t)&=Ax(t)+B_{1}w(t)+B_{2}u(t)\\z(t)&=C_{1}x(t)+D_{11}w(t)+D_{12}u(t)\\y(t)&=C_{2}x(t)+D_{21}w(t)+D_{22}u(t)\\{\dot {x}}_{K}(t)&=A_{K}x_{K}(t)+B_{K}y(t)\\u(t)&=C_{K}x_{K}(t)+D_{K}y(t)\\\end{aligned}}

## The Optimization Problem:

Given a state space system of

{\begin{aligned}{\dot {x}}(t)&=Ax(t)+B_{1}w(t)+B_{2}u(t)\\z(t)&=C_{1}x(t)+D_{11}w(t)+D_{12}u(t)\\y(t)&=C_{2}x(t)+D_{21}w(t)+D_{22}u(t)\\{\dot {x}}_{K}(t)=A_{K}x_{K}(t)+B_{K}y(t)\\u(t)&=C_{K}x_{K}(t)+D_{K}y(t)\end{aligned}}

where $A_{K},$  ,$B_{K},$ ,$C_{K},$  and $D_{K},$  form the K matrix as defined in below. This, therefore, means that the Regulator system can be re-written as:

${\begin{bmatrix}{\dot {x}}(t)\\z_{1}(t)\\z_{2}(t)\\y(t)\end{bmatrix}}={\begin{bmatrix}{\begin{array}{c|c c|c}A&{B}&0&{B}\\C&D&0&D\\0&0&0&I\\C&D&I&D\end{array}}\end{bmatrix}}{\begin{bmatrix}{\dot {x}}(t)\\w_{1}(t)\\w_{2}(t)\\u(t)\end{bmatrix}}$

With the above 9-matrix representation in mind, the we can now derive the controller needed for solving the problem, which in turn will be accomplished through the use of LMI's. Firstly, we will be taking our $H_{2}$ /$H_{\infty }$ state-feedback control and make some modifications to it. More specifically, since the focus is modeling for worst-case scenario of a given parameter, we will be modifying the LMI's such that the mixed $H_{2}$ /$H_{\infty }$  controller is polytopic.

## The LMI:

$H_{2}$ /$H_{\infty }$  Polytopic Controller for Quadrotor with Robotic Arm.

Recall that from the 9-matrix framework , $w_{1}(t)$  and ${w_{2}}(t)$  represent our process and sensor noises respectively and $u(t)$  represents our input channel. Suppose we were interested in modeling noise across all three of these channels. Then the best way to model uncertainty across all three cases would be modifying the $D$  matrix to $D_{i}$ , where ($i=1,..,k$  parameters, $D_{i}=nI$ , and $n$  is a constant noise value). This, in turn results in our $D_{11}$ -$D_{22}$  matrices to be modifified to $D_{11,i}$ -$D_{22,i}$

Using the LMI's given for optimal $H_{2}$ /$H_{\infty }$ -optimal state-feedback controller from Peet Lecture 11 as reference, our resulting polytopic LMI becomes:

$\min \limits _{\gamma _{1},\gamma _{2},X_{1},Y_{1},Z,A_{n},B_{n},C_{n},D_{n}}$ $\gamma _{1}^{2}$ +$\gamma _{2}^{2}$

{\begin{aligned}{\begin{bmatrix}AA_{i}&AB_{i}^{T}&AC_{i}^{T}\\AB_{i}&BB_{i}&BC_{i}^{T}\\AC_{i}&BC_{i}&-I\end{bmatrix}}&<0\\{\begin{bmatrix}AA_{i}&AB_{i}^{T}&AC_{i}^{T}&AD_{i}^{T}\\AB_{i}&BB_{i}&BC_{i}^{T}&BD_{i}^{T}\\AC_{i}&BC_{i}&-I&CD_{i}^{T}\\AD_{i}&BD_{i}&CD_{i}&{-\gamma _{2}^{2}}I\end{bmatrix}}&<0\\{\begin{bmatrix}Y_{1}&I&AD_{i}^{T}\\I&X_{1}&BD_{i}^{T}\\AD_{i}&BD_{i}&Z\end{bmatrix}}&>0\\\end{aligned}}

CD=0

$trace(Z)<\gamma _{1}^{2}$

where i=1,..,k,$||S(K,P)||_{H_{2}}$ &$<\gamma _{1}$  and $||S(K,P)||_{H_{\infty }}<\gamma _{2}$  and:

{\begin{aligned}AA_{i}=AY_{1}+Y_{1}A^{T}+B_{2}C_{n}+C_{n}^{T}B_{2}^{T}\\AB_{i}=A^{T}+A_{n}+[B_{2}D_{n}C_{2}]^{T}\\AC_{i}=[B_{1}+B_{2}D_{n}D_{21,i}]^{T}\\AD_{i}=C_{1}Y_{1}+D_{12,i}C_{n}\\BB_{i}=X_{1}A+A^{T}X_{1}+B_{n}C_{2}+C_{2}^{T}B_{n}^{T}\\BC_{i}=[X_{1}B_{1}+B_{n}D_{21,i}]^{T}\\BD_{i}=C_{1}+D_{12,i}D_{n}C_{2}\\CD_{i}=D_{11,i}+D_{12,i}D_{n}D_{21,i}\end{aligned}}

After solving for both the optimal $H_{2}$  and $H_{\infty }$  gain ratios as well as ${X_{1}},{Y_{1}},Z,{A_{n}},{B_{n}},{C_{n}},{D_{n}}$ , we can then construct our worst-case scenario controller by setting our $D$  matrix (and consequently our ${D_{11}},{D_{12}},{D_{21}},{D_{22}}$  matrices) to the highest $n$ value. This results in the controller:

{\begin{aligned}K={\begin{bmatrix}{\begin{array}{c|c}{A_{K}}&{B_{K}}\\\hline {C_{K}}&{D_{K}}\\\end{array}}\end{bmatrix}}\end{aligned}}

which is constructed by setting:

{\begin{aligned}&{D_{K}}=(I+D_{K_{2}}D_{22})^{-1}{D_{K_{2}}}\\&{B_{K}}={B_{K_{2}}}(I+D_{22}D_{K})\\&{C_{K}}=(I-D_{K}D_{22}){C_{K_{2}}}\\&{A_{K}}={A_{K_{2}}}-{B_{K}}(I-D_{22}D_{K})^{-1}D_{22}{C_{K}}\end{aligned}}

where:

{\begin{aligned}&{X_{2}}{Y_{2}^{T}}=I-{X_{1}}{Y_{1}}\\&{\begin{bmatrix}{\begin{array}{c|c}{A_{K_{2}}}&{B_{K_{2}}}\\\hline {C_{K_{2}}}&{D_{K_{2}}}\end{array}}\end{bmatrix}}={\begin{bmatrix}{X_{2}}&{X_{1}}{B_{2}}\\0&I\end{bmatrix}}^{-1}{\begin{bmatrix}{A_{n}}-{X_{1}}A{Y_{1}}&{B_{n}}\\{C_{n}}&{D_{n}}\end{bmatrix}}{\begin{bmatrix}Y_{2}^{T}&0\\{C_{2}}{Y_{1}}&I\end{bmatrix}}\end{aligned}}

## Conclusion:

The LMI is feasible and the resulting controller is found to be stable under normal noise disturbances for all states.