# A Novel UWB Positioning Method Based on a Maximum-Correntropy Unscented Kalman Filter
## 3 Proposed Algorithm Based on the Maximum-Crentropy UKF
### Proposed Algorithm  
This section uses the UWB positioning system as the research object. Aiming at the problem of outlier interference in NLOS environments, a novel unscented Kalman filter algorithm was designed with the maximum cross-correlation entropy criterion and the introduction of the Gaussian kernel function. The specific derivation process is as follows:  
Combined with the maximum-entropy criterion and the MMSE criterion, the recursive expression of the UKF can be obtained via solving the following cost function:  
\[J_{KF}=\min_{\mathbf{X}_{k}}\biggl{(}\|\mathbf{X}_{k}-\mathbf{\hat{X}}_{k|(k-1)}\|_{\mathbf{P }^{-1}_{k|(k-1)}}^{2}+\|\mathbf{H}_{k}\mathbf{X}_{k}-\mathbf{Z}_{k}\|_{\mathbf{R}^{-1}_{k}}^{ 2}\biggr{)} \tag{26}\]  
where \(\mathbf{\hat{X}}_{k|(k-1)}\) represents the state vector, \(\mathbf{X}_{k}\) is the a priori estimate of \(k\) and \(\mathbf{P}_{k|(k-1)}\) represents the prior error covariance matrix;  
\[\mathbf{e}_{k}=\mathbf{R}^{-1/2}_{k}(\mathbf{H}_{k}\mathbf{X}_{k}-\mathbf{Z}_{k}) \tag{27}\]  
The above formula can be expressed as  
\[J_{KF}=\min_{\mathbf{X}_{k}}\biggl{(}\|\mathbf{X}_{k}-\mathbf{\hat{X}}_{k|(k-1)}\|_{\mathbf{P }^{-1}_{k|(k-1)}}^{2}+\sum_{i=1}^{n}\mathbf{e}_{ki}^{2}\biggr{)} \tag{28}\]  
where \(\mathbf{e}_{ki}\) is the component of \(k\) is \(i=(1,\cdots,m)\). The formula above shows that under the MMSE criterion, the cost function of the Equation (28) assigns equal weight values to the residuals of all observations. However, the optimal estimation result cannot be obtained in the case of a measurement anomaly. Through introduction of the Gaussian kernel function in the maximum cross-correlation entropy criterion into the measurement of the cost function, the cost function of Equation (28) can be modified as follows:  
\[J_{MCKF}=\min_{\mathbf{X}_{k}}\biggl{(}\|\mathbf{X}_{k}-\mathbf{\hat{X}}_{k|(k-1)}\|_{\mathbf{ P}^{-1}_{k|(k-1)}}^{2}+\sigma^{2}\sum_{i=1}^{n}G_{\sigma}(\mathbf{e}_{ki})\biggr{)} \tag{29}\]  
Among these variables, \(\sigma>0\) indicates the bandwidth of the kernel function. Formula (29) replaces the MMSE estimation in the measurement-error section of the UKF with the kernel function of the maximum cross-correlation entropy. For Formula (29), in \(\mathbf{X}_{k}\), the derivation at \(k\) gives:  
\[\mathbf{P}_{k|(k-1)}^{-1}\Big{(}\mathbf{X}_{k}-\mathbf{\hat{X}}_{k|(k-1)}\Big{)}+\sum_{i=1}^{ n}G_{\sigma}(e_{ki})e_{ki}\frac{\partial e_{ki}}{\partial\mathbf{x}_{k}}=\mathbf{0} \tag{30}\]  
The formula above is organized into matrix form as follows:  
\[\mathbf{P}_{k|(k-1)}^{-1}\Big{(}\mathbf{X}_{k}-\mathbf{\hat{X}}_{k|(k-1)}\Big{)}+\mathbf{H}_{k} ^{T}\mathbf{R}_{k}^{-T/2}\mathbf{\psi}_{k}\mathbf{e}_{k}=\mathbf{0} \tag{31}\]  
Among these variables, \(\mathbf{\psi}_{k}=diag[G_{\sigma}(e_{ki})]\) indicates the weight matrix and \(diag[\bullet]\) represents a diagonal matrix. Through changing of \(\mathbf{e}_{k}\) via substitution of the expression of k into Formula (31), we derived  
\[\mathbf{P}_{k|(k-1)}^{-1}\Big{(}\mathbf{X}_{k}-\mathbf{\hat{X}}_{k|(k-1)}\Big{)}+\mathbf{H}_{k }^{T}\mathbf{R}_{k}^{-T/2}\mathbf{\psi}_{k}\mathbf{R}_{k}^{-1/2}(\mathbf{H}_{k}\mathbf{X}_{k}-\bm {Z}_{k})=\mathbf{0} \tag{32}\]  
The above equation can be regarded as Equation (33) for the \(\mathbf{X}_{k}\) derivative at \(k\):  
\[J_{\text{MCKF}}=\min_{\mathbf{X}_{k}}\Big{(}\|\mathbf{X}_{k}-\mathbf{\hat{X}}_{k|(k-1)}\|_ {\mathbf{P}_{k|(k-1)}^{2}}^{2}+\|\mathbf{H}_{k}\mathbf{X}_{k}-\mathbf{Z}_{k}\|_{\widetilde{ \mathbf{R}}_{k}^{-1}}^{2}\Big{)} \tag{33}\]  
where  
\[\widetilde{\mathbf{R}}_{k}^{-1}=\mathbf{R}_{k}^{-T/2}\mathbf{\psi}_{k}\mathbf{R}_{k}^{-1/2} \tag{34}\]  
Comparison of Formula (28) and Formula (33) shows that the filtering algorithm based on the maximum cross-correlation entropy passes the weight matrix on the basis of the unscented Kalman filtering algorithm, \(\mathbf{\psi}_{k}\). The covariance of measurement noise is modified. The MCUKF method is as follows:  
Step 1: Initialize the state vector and the covariance matrix. Step 2: State one-step forecast update.