# Maximum Correntropy Unscented Kalman Filter for Spacecraft Relative State Estimation
## 3 Unscented Kalman Filter under MCC
One is to re-weight the residual error covariance depending on the value of \(e_{i}(k)=d_{i}(k)-\mathbf{g}_{i}\left(k,\mathbf{x}(k)\right)\), the other is to reconstruct the 'pseudo-observation'. In general, the derived results based on two ways are the same. In this paper, we just describe the algorithm based on the first way for simplicity. Defining \(\widetilde{\Psi}(k)\) is the modified covariance, and could be given as  
\[\widetilde{\Psi}(k)=\mathbf{T}(k)\mathbf{C}^{-1}(k)\mathbf{T}^{T}(k). \tag{35}\]For our next discussion, we write \(\widetilde{\mathbf{\Psi}}(k)\) into two portions so that  
\[\widetilde{\mathbf{\Psi}}(k)=\left[ \begin{array}{cc}\widetilde{\mathbf{\Psi}}_ {x}(k)&\mathbf{0}\\ \mathbf{0}&\widetilde{\mathbf{\Psi}}_{y}(k)\end{array} \right]. \tag{36}\]  
In fact, since the true state \(\mathbf{x}(k)\) is unknown, we set \(\eta(\mathbf{x}(k))=\widehat{\mathbf{x}}(k|k-1)-\mathbf{x}(k)=\mathbf{0}\). In this case, we can see easily that  
\[\widetilde{\mathbf{\Psi}}_{x}(k)= \mathbf{T}_{p}(k|k-1)*\mathbf{I}*\mathbf{T}_{p}^{T}(k|k-1) \tag{37}\] \[= \mathbf{P}(k|k-1).\]  
The modified measurement covariance can be obtained  
\[\widetilde{\mathbf{R}}(k)=\widetilde{\mathbf{\Psi}}_{y}(k). \tag{38}\]  
In the above derivation, the MCUKF algorithm can be summarized as follows:  
1. Choose a proper kernel bandwidth \(\sigma\); set an initial estimate \(\widehat{\mathbf{x}}(0|0)\) and corresponding covariance matrix \(\mathbf{P}(0|0)\); and let \(k=1\);
2. Use Equations (10) and (12) to calculate the sigma points and the propagated sigma points with respect to function f;
3. Compute predicted estimate \(\widehat{\mathbf{x}}(k|k-1)\) and covariance matrix \(\mathbf{P}(k|k-1)\) by Equations (13) and (14), and adopt Cholesky decomposition to get \(\mathbf{T}_{p}(k|k-1)\);
4. Use Equations (16) and (17) to calculate the sigma points and the propagated sigma points with respect to function h;
5. Use Equations (24)-(38) to derive the modified \(\widetilde{\mathbf{R}}(k)\); compute the predicted measurement mean by Equation (18); and replace \(\mathbf{R}(k)\) with \(\widetilde{\mathbf{R}}(k)\) in Equation (19) and have the following covariance matrix: \[\mathbf{P}_{\mathbf{y}\mathbf{y}}=\sum_{i=0}^{2n}w_{c}^{i}\left[\gamma^{i}(k )-\widehat{\mathbf{y}}(k)\right]\left[\gamma^{i}(k)-\widehat{\mathbf{y}}(k) \right]^{T}+\widetilde{\mathbf{R}}(k).\] (39)
6. Use Equations (20)-(23) to compute the filter state mean and covariance matrix; go back to 2. **Remark 1**. : _As one can see, different from the UKF algorithm, the MCUKF uses a non-linear regression model combined MCC to update the measurement information. Note that the kernel bandwidth \(\sigma\) is a key parameter in MCUKF. In general, a smaller kernel bandwidth makes the algorithm more robust (with respect to outliers). However, when the kernel bandwidth is too small, it may result in the filter divergence or accuracy deterioration. The reason for this can be seen in [34]. On the other hand, when \(\sigma\) becomes larger and larger, the MCUKF will behave more and more like the UKF algorithm. In particular, the following theorem holds._  
**Theorem 1**. : _If the kernel bandwidth \(\sigma\) approaches infinity, the MCUKF will reduce to the traditional UKF._  
Proof of Theorem 1.: The proof is simple, we give a short explanation. Note that as \(\sigma\rightarrow\infty\), we have \(\mathbf{C}(k)\rightarrow\mathbf{I}\). In this case, the MCUKF is equal to the traditional UKF. Thus, it is seen that the kernel bandwidth has significant influences on the behavior of MCUKF. In practical applications, the kernel bandwidth can be set manually or optimized by trial and error methods.