tutorialpoint.org

# Linear Estimation

## 1. Kalman Filter Tutorial (Cont'd...)

#### 1.3.1 Derivation of Kalman filter (cont'd...)

Substituting the expression of posterior estimation of state to the expression of posterior error covariance: \begin{equation*} P_{k|k}=E[\lbrace \hat{X}_{k|k-1}+K_{k}(Y_{k}-H_{k}\hat{X}_{k|k-1})-X_{k}\rbrace \lbrace \hat{X}_{k|k-1}+K_{k}(Y_{k}-H_{k}\hat{X}_{k|k-1})-X_{k}\rbrace^{T} ] \end{equation*} or, \begin{equation*} P_{k|k}=E[\lbrace e_{k|k-1}+K_{k}(Y_{k}-H_{k}\hat{X}_{k|k-1})\rbrace \lbrace e_{k|k-1}+K_{k}(Y_{k}-H_{k}\hat{X}_{k|k-1})\rbrace^{T}] \end{equation*} or, $$\label{3k} \begin{split} &P_{k|k}=E[e_{k|k-1}e_{k|k-1}^{T}+K_{k}(Y_{k}-H_{k}\hat{X}_{k|k-1})e_{k|k-1}^{T}+e_{k|k-1}(Y_{k}-H_{k}\hat{X}_{k|k-1})^{T}K_{k}^{T}\\& \hspace{3cm} +K_{k}(Y_{k}-H_{k}\hat{X}_{k|k-1})(Y_{k}-H_{k}\hat{X}_{k|k-1})^{T}K_{k}^{T}].\\& \end{split}$$ We know that, $$\label{3l} Y_{k}-H_{k}\hat{X}_{k|k-1}=H_{k}X_{k}+v_{k}-H_{k}\hat{X}_{k|k-1}=v_{k}-H_{k}e_{k|k-1}.$$ Hence the expression of posterior error covariance $P_{k|k}$ becomes: \begin{equation*} \begin{split} &P_{k|k}=E[e_{k|k-1}e_{k|k-1}^{T}+K_{k}v_{k}e_{k|k-1}^{T}-K_{k}H_{k}e_{k|k-1}e_{k|k-1}^{T}+e_{k|k-1}v_{k}^{T}K_{k}^{T}\\& \hspace{2cm}-e_{k|k-1}e_{k|k-1}^{T}H_{k}^{T}K_{k}^{T}+K_{k}(v_{k}v_{k}^{T}-v_{k}e_{k|k-1}^{T}H_{k}^{T}-H_{k}e_{k|k-1}v_{k}^{T}\\&\hspace{2cm}+H_{k}e_{k|k-1}e_{k|k-1}^{T}H_{k}^{T})K_{k}^{T}],\\& \end{split} \end{equation*} or, \begin{equation*} \begin{split} &P_{k|k}=E[e_{k|k-1}e_{k|k-1}^{T}]+K_{k}E[v_{k}e_{k|k-1}^{T}]-K_{k}H_{k}E[e_{k|k-1}e_{k|k-1}^{T}]+E[e_{k|k-1}v_{k}^{T}]K_{k}^{T}\\& \hspace{2cm}-E[e_{k|k-1}e_{k|k-1}^{T}]H_{k}^{T}K_{k}^{T}+K_{k}(E[v_{k}v_{k}^{T}]-E[v_{k}e_{k|k-1}^{T}]H_{k}^{T}-H_{k}E[e_{k|k-1}v_{k}^{T}]\\&\hspace{2cm}+H_{k}E[e_{k|k-1}e_{k|k-1}^{T}]H_{k}^{T})K_{k}^{T}],\\& \end{split} \end{equation*} where, $e_{k|k-1}$ and $v_{k}$ are uncorrelated. So, \begin{equation*} \begin{split} &P_{k|k}=E[e_{k|k-1}e_{k|k-1}^{T}]-K_{k}H_{k}E[e_{k|k-1}e_{k|k-1}^{T}]-E[e_{k|k-1}e_{k|k-1}^{T}]H_{k}^{T}K_{k}^{T}+\\&\hspace{3cm}K_{k}(E[v_{k}v_{k}^{T}]+H_{k}E[e_{k|k-1}e_{k|k-1}^{T}]H_{k}^{T})K_{k}^{T}].\\& \end{split} \end{equation*} or, \begin{equation*} P_{k|k}=P_{k|k-1}-K_{k}H_{k}P_{k|k-1}-P_{k|k-1}H_{k}^{T}K_{k}^{T}+K_{k}(R_{k}+H_{k}P_{k|k-1}H_{k}^{T})K_{k}^{T} \end{equation*} Now, arranging the above equation, to obtain $$\label{3m} P_{k|k}=(I-K_{k}H_{k})P_{k|k-1}(I-K_{k}H_{k})^{T}+K_{k}R_{k}K_{k}^{T},$$ where, $I$ is an identity matrix.