## 3 Reducing the Uncertainty at the Output of Kalman Filter by Post Processing
### Reducing the Uncertainty at the Output of Kalman Filter
#### 3.3.2 Wavelet-Based Polynomial Fitting  
Wavelets are defined starting from an orthogonal multiresolution analysis. Adapting the signal resolution allows one to process only the relevant details for a particular task. For example, in computer vision, it is possible to process a low-resolution image first and then selectively increase the resolution when necessary. The mathematical formalization of the multiresolution concept in the space of finite energy analogic signals (\(\mathbf{L}^{2}(\mathbf{R})\)) is made in [23] in definition 7.1 as a sequence of closed subspaces \(\{\mathbf{V}_{j}\}_{j\in\mathbf{Z}}\) satisfying six properties. Denoting the orthogonal complement of \(\mathbf{V}_{j}\) in \(\mathbf{V}_{j-1}\) by \(\mathbf{W}_{j}\), it is shown in [23] that the sequence of closed subspaces \(\big{\{}\mathbf{W}_{j}\big{\}}_{j\in\mathbf{Z}}\) constitutes an orthogonal decomposition of \(\mathbf{L}^{2}(\mathbf{R})\). The subspaces \(\mathbf{V}_{j}\) are generated by orthonormal bases \(\big{\{}\varphi_{j,k}\big{\}}_{k\in\mathbf{Z}}\) formed by scaling and translating with integers a function \(\varphi(\tau)\) named the scaling function (or father wavelets), \(\varphi_{j,k}(\tau)=2^{-\frac{j}{2}}\varphi\big{(}2^{-j}(\tau-k)\big{)}\). Similarly, the subspaces \(\mathbf{W}_{j}\) are generated by orthonormal bases formed by scaling and translating with integers a function \(\psi(\tau)\) named mother wavelets (MW), \(\psi_{j,k}(\tau)=2^{-\frac{j}{2}}\psi\big{(}2^{-j}(\tau-k)\big{)}\)[23]. One of the most interesting properties of a MW, which characterizes its regularity, is its number of vanishing moments (VM). A MW has r vanishing moments if:  
\[\int\limits_{-\infty}^{\infty}\tau^{k}\psi(t)d\tau=0,\text{ for }0\leq k<r \tag{13}\]  
Any finite energy signal, \(x(\tau)\), can be decomposed into a wavelet series:  
\[x(\tau)=\sum\limits_{k=-\infty}^{\infty}a_{j_{0},k}\varphi_{j_{0},k}(\tau)+ \sum\limits_{j=j_{0}}^{\infty}d_{j,k}\psi_{j,k}(\tau) \tag{14}\]  
where:\(a_{j,k}=\left\langle x(\tau),\varphi_{j,k}(\tau)\right\rangle\) are named approximation coefficients and \(d_{j,k}=\left\langle x(\tau),\psi_{j,k}(\tau)\right\rangle\) are named detail coefficients. These sequences of coefficients represent the outputs of the discrete wavelet transform (DWT) of the signal x. The connection between the wavelets theory and polynomials is given by the following remark: a wavelet with r VM is orthogonal to polynomials of degree r-1 [23] (p. 166). So, if the signal \(x(\tau)\) is a polynomial, all the detail coefficients \(d_{j,k}\) in the right-hand side of Equation (14) equal zero. The representation of polynomials in wavelet series is sparse (only the first sum in the right-hand side of Equation (14) is not null). The wavelet-based polynomial part extraction of a signal consists of the computation of its DWT followed by the retention of approximation coefficients only. Next, the inverse DWT (IDWT) is computed. As the sequences \(\{x_{t}\}\) and \(\{y_{t}\}\) at the output of the Kalman filter are affected by the already mentioned uncertainty, the mathematical model of these sequences is a sum of the polynomial part and a noise. For this reason, it is recommended to apply a denoising procedure before the polynomial part extraction. The denoising operation is another practical application of wavelets theory. We will apply in the following the denoising method proposed by [PERSON] [24]. It consists of three steps:  
* Computation of DWT and separation of detail coefficients;
* Nonlinear filtering of detail coefficients using (for example) the hard thresholding filter [24];
* Concatenation of the sequence of approximation coefficients, extracted in the first step with the new sequence of detail coefficients obtained after the second step and the computation of the IDWT.