## 3 Reducing the Uncertainty at the Output of Kalman Filter by Post Processing
### Kalman Filter  
One of the original applications of the Kalman filter [3] was for space aircraft tracking in the Apollo navigation system. The Kalman filtering is used in a tracking process to realize a system state estimation at the current timestamp \(t\)[1,7,16]. This operation is accomplished by combining the values of the measurements at the current timestamp \(t\) with the system state prediction realized at the previous time stamp \(t-1\). The solution is computed recursively by the filter. The current system state at timestamp \(t\) consists of the Cartesian coordinates of position and speed:  
\[\mathbf{x}=\big{[}x\;y\;v_{x}\;v_{y}\big{]}^{T} \tag{1}\]  
where \(T\) denotes the transpose. Considering the simplest model for the target movement (constant velocity), the state prediction for timestamp \(t\) based on the previous state can be described as:  
\[\mathbf{x_{t}}=\mathbf{A}\cdot\mathbf{x}_{t-1}+\mathbf{w}_{t-1} \tag{2}\]where **A** is the state transition matrix and \(\textbf{w}_{t-1}\) is Gaussian state noise vector of zero expectation and covariance matrix \(\textbf{E}_{x}\), or, equivalently:  
\[\left[ \begin{array}{c}x\\ y\\ v_{x}\\ v_{y}\end{array} \right]_{t}=\left[ \begin{array}{cccc}1&0&\text{T}&0\\ 0&1&0&\text{T}\\ 0&0&1&0\\ 0&0&0&1\end{array} \right]\left[ \begin{array}{c}x\\ y\\ v_{x}\\ v_{y}\end{array} \right]_{t-1}+\left[ \begin{array}{c}0\\ 0\\ w_{x}\\ w_{y}\end{array} \right]_{t-1} \tag{3}\]  
where T is the measurement period. The measurement equation is written as:  
\[\textbf{z}_{t}=\textbf{H}\cdot\textbf{x}_{t}+\textbf{n}_{t} \tag{4}\]  
where **H** is the measurement matrix and **n** is the measurement noise that is the supposed Gaussian of zero mean and covariance matrix \(\textbf{E}_{z}\). When only the target positions are estimated (as we will proceed in the following), the measurement matrix is expressed as:  
\[\textbf{H}=\left[ \begin{array}{cccc}1&0&0&0\\ 0&1&0&0\end{array} \right] \tag{5}\]  
The Kalman filtering equations describe the current state prediction and the update of the state estimation as [7,16]:  
\[ \begin{array}{l}\overline{\textbf{x}}_{t}=\textbf{A}\cdot\textbf{x}_{t-1}\\ \overline{\textbf{P}}_{t}=\textbf{A}\cdot\textbf{P}_{t-1}\cdot\textbf{A}^{T }+\textbf{E}_{x}\\ \textbf{K}_{t}=\overline{\textbf{P}}_{t}\cdot\textbf{H}^{T}\cdot\left( \textbf{H}\cdot\overline{\textbf{P}}_{t}\cdot\textbf{H}^{T}+\textbf{E}_{z} \right)^{-1}\\ \textbf{x}_{t}=\overline{\textbf{x}}_{t}+\textbf{K}_{t}\cdot\left(\textbf{z} _{t}-\textbf{H}\cdot\overline{\textbf{x}}_{t}\right)\\ \textbf{P}_{t}=\left(\textbf{I}-\textbf{K}_{t}\cdot\textbf{H}\right)\cdot \overline{\textbf{P}}_{t}\end{array}  \tag{6}\]  
where **K** denotes the Kalman gain, \(\overline{\textbf{P}}\) is the predicted covariance matrix of the error and **P** is the covariance matrix of the state estimation error. This error expresses the output of the Kalman filter uncertainty mentioned earlier. In the traditional formulation, the dynamics and output matrices are considered attributes of the system, the covariance matrices of the process and sensor noise are tuned by the designer, within some limits, to obtain good performance in simulation or on the actual system [2,16]. For the rest of this paper, the covariance matrices for the measurement noise \(\textbf{E}_{x}\) and the state error estimation \(\textbf{E}_{x}\) are selected based on the following criteria [16]:  
* Small values for the elements of the matrix \(\textbf{E}_{x}\) mean that we tend to rely more on the noisy measurement than on the prediction of the filter based on the model;
* Big values for the elements of the matrix \(\textbf{E}_{x}\) mean that we do not rely very much on the model. The measurement noise covariance matrix \(\textbf{E}_{z}\) and the state error estimation covariance matrix \(\textbf{E}_{x}\) are [6]:  
\[\textbf{E}_{z}=\left[ \begin{array}{cc}z_{x}&0\\ 0&z_{y}\end{array} \right] \tag{7}\]  
and  
\[\textbf{E}_{x}=\left[