# LMIs in Control/pages/Hinf-Optimal Filter

Hinf-Optimal Filter

The goal of optimal filtering is to design a filter that acts on the output ${\displaystyle {\mathbf {z}}}$of the generalized plant and optimizes the transfer matrix from ${\displaystyle {\mathbf {w}}}$to the filtered output.

## The System

Consider the continuous-time generalized LTI plant, with minimal state-space representation

${\displaystyle {\mathbf {\dot {x}}}={\mathbf {Ax}}+{\mathbf {B}}_{1}{\mathbf {w}},}$

${\displaystyle {\mathbf {z}}={\mathbf {C}}_{1}{\mathbf {x}}+{\mathbf {D}}_{11}{\mathbf {w}},}$

${\displaystyle {\mathbf {y}}={\mathbf {C}}_{2}{\mathbf {x}}+{\mathbf {D}}_{21}{\mathbf {w}},}$

where it is assumed that ${\displaystyle {\mathbf {A}}}$ is Hurwitz. A continuous-time dynamic LTI filter with state-space representation

${\displaystyle {\mathbf {\dot {x}}}_{f}={\mathbf {A}}_{f}{\mathbf {x}}_{f}+{\mathbf {B}}_{f}{\mathbf {y}},}$

${\displaystyle {\mathbf {\hat {z}}}={\mathbf {C}}_{f}{\mathbf {x}}_{f}+{\mathbf {D}}_{f}{\mathbf {y}},}$

is designed to optimize the transfer function from ${\displaystyle {\mathbf {w}}}$ to ${\displaystyle {\mathbf {\tilde {z}}}={\mathbf {z}}-{\mathbf {\hat {z}}}}$ , which is given by

${\displaystyle {\tilde {\mathbf {P}}}(s)={\tilde {\mathbf {C}}}_{1}(s{\mathbf {I}}-{\tilde {\mathbf {A}}})^{-1}{\tilde {\mathbf {B}}}_{1}+{\tilde {\mathbf {D}}}_{11},}$

where

${\displaystyle {\tilde {\mathbf {A}}}={\begin{bmatrix}{\mathbf {A}}&{\mathbf {0}}\\{\mathbf {B}}_{f}{\mathbf {C}}_{2}&{\mathbf {A}}_{f}\end{bmatrix}},}$

${\displaystyle {\tilde {\mathbf {B}}}_{1}={\begin{bmatrix}{\mathbf {B}}_{1}\\{\mathbf {B}}_{f}{\mathbf {D}}_{21}\end{bmatrix}},}$

${\displaystyle {\tilde {\mathbf {C}}}_{1}={\begin{bmatrix}{\mathbf {C}}_{1}-{\mathbf {D}}_{f}{\mathbf {C}}_{2}&-{\mathbf {C}}_{f}\end{bmatrix}},}$

${\displaystyle {\tilde {\mathbf {D}}}_{11}={\mathbf {D}}_{11}-{\mathbf {D}}_{f}{\mathbf {D}}_{21}.}$

Optimal Filtering seeks to minimize the given norm of the transfer function ${\displaystyle {\tilde {\mathbf {P}}}(s).}$

## Filter Synthesis

Solve for ${\displaystyle {\mathbf {A}}_{n}\in \mathbb {R} ^{n_{x}\times n_{x}},{\mathbf {B}}_{n}\in \mathbb {R} ^{n_{x}\times n_{y}},{\mathbf {C}}_{f}\in \mathbb {R} ^{n_{z}\times n_{x}},{\mathbf {D}}_{f}\in \mathbb {R} ^{n_{z}\times n_{y}},{\mathbf {X,Y}}\in \S ^{n_{x}},}$ and ${\displaystyle \gamma \in \mathbb {R} _{>0}}$  that minimize the objective function ${\displaystyle J(\gamma )=\gamma }$ , subject to

${\displaystyle {\mathbf {X,Y}}>0,}$

${\displaystyle {\mathbf {Y}}-{\mathbf {X}}>0,}$

${\displaystyle {\begin{bmatrix}{\mathbf {YA}}+{\mathbf {A}}^{T}{\mathbf {Y}}+{\mathbf {B}}_{n}{\mathbf {C}}_{2}+{\mathbf {C}}_{2}^{T}{\mathbf {B}}_{n}^{T}&{\mathbf {A}}_{n}+{\mathbf {C}}_{2}^{T}{\mathbf {B}}_{n}^{T}+{\mathbf {A}}^{T}{\mathbf {X}}&{\mathbf {YB}}_{1}+{\mathbf {B}}_{n}{\mathbf {D}}_{21}\\*&{\mathbf {A}}_{n}+{\mathbf {A}}_{n}^{T}&{\mathbf {XB}}_{1}+{\mathbf {B}}_{n}{\mathbf {D}}_{21}\\*&*&-{\mathbf {I}}\end{bmatrix}}<0.}$

## Conclusion

The optimal Hinf filter is recovered by the state-space matrices ${\displaystyle {\mathbf {A}}_{f}={\mathbf {X}}^{-1}{\mathbf {A}}_{n}}$ and ${\displaystyle {\mathbf {B}}_{f}={\mathbf {X}}^{-1}{\mathbf {B}}_{n}.}$

## Remark

The problem of optimal filtering can alternatively be formulated as a special case of synthesizing a dynamic output "feedback" controller for the generalized plant given by

${\displaystyle {\mathbf {\dot {x}}}={\mathbf {Ax}}+{\mathbf {B}}_{1}{\mathbf {w}},}$

${\displaystyle {\mathbf {z}}={\mathbf {C}}_{1}{\mathbf {x}}+{\mathbf {D}}_{11}{\mathbf {w}}-{\mathbf {u}},}$

${\displaystyle {\mathbf {y}}={\mathbf {C}}_{2}{\mathbf {x}}+{\mathbf {D}}_{21}{\mathbf {w}}.}$

The synthesis method presented in this page takes advantage of the fact that the controller in this case is not a true feedback controller, as it only appears as a feedthrough term in the performance channel.