# LMIs in Control/pages/discrete time mixed h2 hinf optimal observer

LMIs in Control/pages/discrete time mixed h2 hinf optimal observer

## The System

{\displaystyle {\begin{aligned}x_{k+1}&=A_{d}x_{k}+B_{d1,1}w_{1,k}+B_{d1,2}w_{2,k},\\y_{k}&=C_{c2}x_{k}+D_{d21,1}w_{1,k}+D_{d21,2}w_{2,k}\\\end{aligned}}}

Where it is assumed that :${\displaystyle (A_{d},C_{d2})}$ is detectable.

## The Data

The matrices ${\displaystyle A_{d},B_{d1},C_{cd2},C_{cd1},D_{d21}}$.

## The Optimization Problem

An observer of the form:

{\displaystyle {\begin{aligned}{\hat {x}}_{k+1}&=A_{d}{\hat {x}}_{k}+L_{d}(y_{k}-{\hat {y}}_{k}),\\{\hat {y}}_{k}&=C_{d2}{\hat {x}}_{k}\\\end{aligned}}}

is to be designed, where ${\displaystyle L_{d}\in R^{n_{x}*n_{y}}}$ is the observer gain.

Defining the error state ${\displaystyle e_{k}=x_{k}-{\hat {x}}_{k}}$, the error dynamics are found to be

${\displaystyle e_{k+1}=(A_{d}-L_{d}C_{d2})e_{k}+(B_{d1,1}-L_{d}D_{d21,1})w_{1,k}+(B_{d1,2}-L_{d}D_{d21,2})w_{2,k}}$,

and the performance output is defined as

${\displaystyle {\begin{bmatrix}Z_{1,k}\\Z_{2,k}\end{bmatrix}}={\begin{bmatrix}C_{d1,1}\\C_{d1,2}\end{bmatrix}}e_{k}+{\begin{bmatrix}0&D_{d11,12}\\D_{d11,21}&D_{d11,22}\end{bmatrix}}{\begin{bmatrix}w_{1,k}\\w_{2,k}\end{bmatrix}}}$.

The observer gain ${\displaystyle L_{d}}$ is to be designed to minimize the ${\displaystyle H_{2}}$ norm of the closed loop transfer matrix ${\displaystyle T_{11}(z)}$ from the exogenous input ${\displaystyle w_{2,k}}$ to the performance output ${\displaystyle z_{2,k}}$ is less than ${\displaystyle \gamma _{d}}$, where

{\displaystyle {\begin{aligned}T_{11}(z)&=C_{d1,1}(z1-(A_{d}-L_{d}C_{d2}))^{-1}(B_{d1,1}-L_{d}D_{d21,1}),\\T_{22}(z)&=C_{d1,2}(z1-(A_{d}-L_{d}C_{d2}))^{-1}(B_{d1,2}-L_{d}D_{d21,2})+D_{d11,22}\end{aligned}}}

## The LMI: Discrete-Time Mixed H2-Hinf-Optimal Observer

The discrete-time mixed-${\displaystyle H_{2}H_{inf}}$-optimal observer gain is synthesized by solving for ${\displaystyle P\in S^{n_{x}}}$, ${\displaystyle Z\in S^{n_{z}}}$, ${\displaystyle G_{d}\in R^{n_{x}*n_{y}}}$, and ${\displaystyle v\in R_{>0}}$ that minimize J${\displaystyle (v)=v}$ subject to ${\displaystyle P>0,Z>0}$,

{\displaystyle {\begin{aligned}{\begin{bmatrix}P&PA_{d}-G_{d}C_{d2}&PB_{d1,1}-G_{d}D_{d21,1}\\*&P&0\\*&*&1\end{bmatrix}}&>0,\\{\begin{bmatrix}P&PA_{d}-G_{d}C_{d2}&PB_{d1,2}-G_{d}D_{d21,2}&0\\*&P&0&C_{d1,2}^{T}\\*&*&\gamma _{d}1&D_{d11,22}^{T}\\*&*&*&\gamma _{d}1\end{bmatrix}}&>0,\\{\begin{bmatrix}Z&PC_{d1,1}\\*&P\end{bmatrix}}&>0,\\trZ

## Conclusion:

The mixed-${\displaystyle H_{2}H_{inf}}$-optimal observer gain is recovered by ${\displaystyle L_{d}=P^{-1}G_{d}}$, the ${\displaystyle H_{2}}$ norm of ${\displaystyle T_{11}(z)}$ is less than ${\displaystyle \mu ={\sqrt {v}}}$, and the ${\displaystyle H_{inf}}$ norm of ${\displaystyle T_{22}(z)}$ is less than ${\displaystyle \gamma _{d}}$ .

## Implementation

WIP! NEEDS TO BE UPDATED: THE CURRENTLY LINKED CODE IS FOR DISCRETE TIME H2 OPTIMAL OBSERVER: https://github.com/rezajamesahmed/LMImatlabcode/blob/master/Discrete_Time_H2_Optimal_Observer_LMIs_Wikibook_Example.m

## Related LMIs

Discrete-Time Mixed H2-H∞-Optimal Observer//

Discrete-Time H∞-Optimal Observer//