LMIs in Control/pages/H2 Optimal Filter

Optimal filtering is a means of adaptive extraction of a weak desired signal in the presence of noise and interfering signals. Optimal filters normally are free from stability problems. There are simple operational checks on an optimal filter when it is being used that indicate whether it is operating correctly. Optimal filters are probably easier to make adaptive to parameter changes than suboptimal filters.The goal of optimal filtering is to design a filter that acts on the output $$ z $$ of the generalized plant and optimizes the transfer matrix from w to the filtered output.

The System:
Consider the continuous-time generalized LTI plant with minimal states-space realization



\begin{align} \dot x &=Ax + B_1w\\ z &=C_1x + D_{11}w,\\ y &=C_2x + D_{21}w, \end{align}$$

where it is assumed that $$ A $$ is Hurwitz.

The Data
The matrices needed as inputs are $$ A, B_1, C_2, D_{21} $$.

The Optimization Problem:
An $$ H_2 $$-optimal filter is designed to minimize the $$ H_2 $$ norm of $$ \tilde{P}(s) $$ in following equation.



\begin{align} \tilde{P}(s) = \tilde{C}_1 (sI - \tilde{A})^-1 \tilde{B}_1 + \tilde{D}_{11},\\ \text{where} \\ \tilde{A} = \begin{bmatrix} A && 0\\ B_fC_2 && A_f\end{bmatrix}&<0\\ \tilde{B}_1 = \begin{bmatrix} B_1\\ B_fD_{21}\end{bmatrix}&<0\\ \tilde{C}_1 = \begin{bmatrix} C_1-D_fC_2 -C_f\end{bmatrix}&<0\\ \tilde{D}_{11} = D_{11}-D_fD_{21}\\ \end{align} $$

To ensure that $$ \tilde{P}(s) $$ has a finite $$ H_2 $$ norm, it is required that $$ D_f = D_{11} $$, which results in $$ \tilde{D}_{11}=D_{11}-D_f=0 $$

The LMI: $$ H_2 $$- Optimal filter
Solve for $$ A_n \in \mathbb{R}^{n_x \times n_x}, B_n \in \mathbb{R}^{n_x \times n_y}, C_f \in \mathbb{R}^{n_x \times n_x} $$, $$ X,Y \in \mathbb{S}^{n_x}, Z \in \mathbb{S}^{n_z} $$ and $$ \nu \in \mathbb{R}_{>0} $$ that minimize $$ \zeta(\nu) =\nu $$ subject to $$ X >0, Y >0, Z >0 $$.



\begin{align}

\begin{bmatrix} YA + A^TY+B_nC_2 && A_n+C_2^TB_n^T+A^TX && YB_1+B_nD_{21}\\ \star && A_n+A_n^T && XB_1+B_nD_{21}\\ \star && \star && -1\end{bmatrix}&<0\\ \begin{bmatrix} -Z && C_1-D_fC_2 && -C_f\\ \star && -Y && -X\\ \star && \star && -X \end{bmatrix}&<0\\ Y-X >0 \\ trZ < /nu \end{align}$$

Conclusion:
The filter is recovered by $$ A_f=X^{-1}A_n $$ and $$ B_f=X^{-1}B_n $$.

Implementation
MATLAB code of $ H_2 $ Optimal filter