# LMIs in Control/pages/H-2 filtering

LMIs in Control/pages/H-2 filtering

For systems that have disturbances, filtering can be used to reduce the effects of these disturbances. Described on this page is a method of attaining a filter that will reduce the effects of the disturbances as completely as possible. To do this, we look to find a set of new coefficient matrices that describe the filtered system. The process to achieve such a new system is described below. The H2-filter tries to minimize the average magnitude of error.

## 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+Bw,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. To further define: ${\displaystyle x}$ is ${\displaystyle \in R^{n}}$ and is the state vector, ${\displaystyle A}$ is ${\displaystyle \in R^{n*n}}$ and is the state matrix, ${\displaystyle B}$ is ${\displaystyle \in R^{n*r}}$ and is the input matrix, ${\displaystyle w}$ is ${\displaystyle \in R^{r}}$ and is the exogenous input, ${\displaystyle C}$ is ${\displaystyle \in R^{m*n}}$ and is the output matrix, ${\displaystyle D}$ and ${\displaystyle L}$ are ${\displaystyle \in R^{m*r}}$ and are feedthrough matrices, and ${\displaystyle y}$ and ${\displaystyle z}$ are ${\displaystyle \in R^{m}}$ and are the output and the output of interest, respectively.

## 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}y,\sigma (0)=\sigma _{0}\\{\hat {z}}&=C_{f}\sigma ,\end{aligned}}}

where ${\displaystyle \sigma \in R^{n}}$ is the state vector, ${\displaystyle {\hat {z}}\in R^{m}}$ is the estimation vector, and ${\displaystyle A_{f},B_{f},C_{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},\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}}}$ 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&-C_{f}\end{bmatrix}}\end{aligned}}}

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

{\displaystyle {\begin{aligned}||G_{{\tilde {z}}w}(s)||_{2}<\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}}\end{aligned}}}

## The LMI: H-2 Filtering

For this LMI, the solution exists if one of the following sets of LMIs hold:

Matrices ${\displaystyle R,X,M,N,Z,Q}$ exist that obey the following LMIs:

{\displaystyle {\begin{aligned}R-X&>0,\\trace(Q)&<\gamma ^{2},\\{\begin{bmatrix}-Q&*&*\\L^{T}&-R&*\\-N^{T}&-X&-X\end{bmatrix}}&<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}&-I\end{bmatrix}}&<0.\\\end{aligned}}}

or

Matrices ${\displaystyle {\bar {R}},{\bar {X}},{\bar {M}},{\bar {N}},{\bar {Z}},{\bar {Q}}}$ exist that obey the following LMIs:

{\displaystyle {\begin{aligned}{\bar {R}}-{\bar {X}}&>0,\\trace({\bar {Q}})&<\gamma ^{2},\\{\begin{bmatrix}-{\bar {Q}}&*&*\\{\bar {R}}B+{\bar {Z}}D&-{\bar {R}}&*\\{\bar {X}}B+{\bar {Z}}D&-{\bar {X}}&-I\end{bmatrix}}&<0,\\{\begin{bmatrix}{\bar {R}}A+A^{T}{\bar {R}}+{\bar {Z}}C+C^{T}{\bar {Z}}^{T}&*&*\\{\bar {M}}^{T}+{\bar {Z}}C+{\bar {X}}A&{\bar {M}}^{T}+{\bar {M}}&*\\L&-{\bar {N}}&-I\end{bmatrix}}&<0.\\\end{aligned}}}

## Conclusion:

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

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

Or the second solution to find:

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

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

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

## Implementation

This implementation requires Yalmip and Sedumi.