# LMIs in Control/pages/H-infinity filtering

LMIs in Control/pages/H-infinity filtering

This is a WIP based on the template.

## The System

For the application of this LMI, we will look at linear systems that can be represented in state space as

{\displaystyle {\begin{aligned}{\dot {x}}&=Ax+B_{w},x(0)=x_{0}\\y&=Cx+Dw\\z&=Lx\end{aligned}}}

where ${\displaystyle x\in R^{n},y\in R^{l},z\in R^{m}}$ represent the state vector, the measured output vector, and the output vector of interest, respectively, ${\displaystyle w\in R^{p}}$ is the disturbance vector, and ${\displaystyle A,B,C,D}$ and ${\displaystyle L}$ are the system matrices of appropriate dimension.

## The Data

The data are ${\displaystyle w}$ (the disturbance vector), and ${\displaystyle A,B,C,D}$ and ${\displaystyle L}$ (the system matrices). Furthermore, the ${\displaystyle A}$ matrix is assumed to be stable

## The Optimization Problem

We need to design a filter that will eliminate the effects of the disturbances as best we can. For this, we take a filter of the following form:

{\displaystyle {\begin{aligned}{\dot {\sigma }}&=A_{f}\sigma +B_{f}\sigma ,\sigma (0)=\sigma _{0}\\{\hat {z}}&=C_{f}\sigma +D_{f}y,\end{aligned}}}

where ${\displaystyle \sigma \in R^{n}}$ is the state vector, ${\displaystyle {\hat {z}}\in R^{m}}$ is the estimation vector of z, and ${\displaystyle A_{f},B_{f},C_{f},andD_{f}}$ are the coefficient matrices of appropriate dimensions.

Note that the combined complete system can be represented as

{\displaystyle {\begin{aligned}{\dot {x}}_{e}&={\tilde {A}}x_{e}+{\tilde {B}}w,x_{e}(0)=x_{e0}\\{\tilde {z}}&={\tilde {C}}x_{e}+{\tilde {D}}w,\end{aligned}}}

where ${\displaystyle {\tilde {z}}=z-{\hat {z}}\in R^{m}}$ is the estimation error,

{\displaystyle {\begin{aligned}x_{e}={\begin{bmatrix}x\\\sigma \end{bmatrix}}\\\end{aligned}}}

is the state vector of the system, and ${\displaystyle {\tilde {A}},{\tilde {B}},{\tilde {C}},{\tilde {D}}}$ are the coefficient matrices, defined as:

{\displaystyle {\begin{aligned}{\tilde {A}}={\begin{bmatrix}A&0\\B_{f}C&A_{f}\end{bmatrix}},{\tilde {B}}={\begin{bmatrix}B\\B_{f}D\end{bmatrix}},\\{\tilde {C}}={\begin{bmatrix}L-D_{f}C&-C_{f}\end{bmatrix}},{\tilde {D}}=-D_{f}D\end{aligned}}}

In other words, for the system defined above we need to find ${\displaystyle A_{f},B_{f},C_{f},andD_{f}}$ such that

{\displaystyle {\begin{aligned}|G_{{\tilde {z}}w}(s)|_{\inf }<\gamma ,\end{aligned}}}

where ${\displaystyle \gamma }$ is a positive constant, and

{\displaystyle {\begin{aligned}G_{{\tilde {z}}w}(s)={\tilde {C}}(sI-{\tilde {A}})^{-1}{\tilde {B}}+{\tilde {D}}.\end{aligned}}}

## The LMI: H-inf Filtering

The solution can be obtained by finding matrices ${\displaystyle R,X,M,N,Z,D_{f}}$ that obey the following LMIs:

{\displaystyle {\begin{aligned}X&>0\\R-X&>0\\{\begin{bmatrix}RA+A^{T}R+ZC+C^{T}Z^{T}&*&*&*\\M^{T}+ZC+XA&M^{T}+M&*&*\\B^{T}R+D^{T}Z^{T}&B^{T}X+D^{T}Z^{T}&-\gamma I&*\\L-D_{f}C&-N&-D_{f}D&-\gamma I\end{bmatrix}}&<0\\\end{aligned}}}

## Conclusion:

To find the corresponding filter, use the optimized matrices from the solution to find:

${\displaystyle A_{f}=X^{-1}M,B_{f}=X^{-1}Z,C_{f}=N,D_{f}=D_{f}}$

These matrices can then be used to produce ${\displaystyle {\tilde {A}},{\tilde {B}},{\tilde {C}},{\tilde {D}}}$ to construct the filter described above, that will best eliminate the disturbances of the system.

## Implementation

A link to CodeOcean or other online implementation of the LMI