# A Novel UWB Positioning Method Based on a Maximum-Correntropy Unscented Kalman Filter
## 2 UWB Positioning Method Based on Unscented Kalman Filter
### UWB Location Algorithm Based on the UKF  
Formula (4) obtains the initial positioning coordinates of unknown nodes. The UKF algorithm is modified according to the characteristics of the NLOS environment to perform precise positioning and position tracking. The UKF is a new nonlinear filter estimation algorithm that is UT (unscented)-based. The UKF and the EKF have different approaches to linearizing nonlinear functions. The UKF uses UT transformation to deal with nonlinear transference of the mean and the covariance, and directly uses the nonlinear model of the system. The EKF approximates nonlinear functions and needs the Jacobian matrix to be calculated, which greatly increases the amount of calculation. The UKF algorithm obtains more observational assumptions through generation of Sigma points and ignores higher-order terms without linearization. Therefore, in terms of nonlinear problems in an NLOS environment, the UKF has higher calculation accuracy and stronger adaptability than has the EKF [18]. The state equation is established as follows:  
\[\dot{X}=FX+W \tag{5}\]  
where \(F\) is the state transition matrix and \(W\) represents the matrix of noise. \(X\) represents the state vector, which can be expressed as  
\[X= \begin{bmatrix}P_{x}\ P_{y}\ V_{x}\ V_{y}\end{bmatrix} ^{T} \tag{6}\]  
where \(P_{x}\) and \(P_{y}\) represent the positioning coordinates of the label in the X direction and the Y direction, respectively. \(V_{x}\) and \(V_{y}\) indicate the motion velocity of the label in the X and Y directions, respectively. \(F\) from Equation (5) is  
\[F= \begin{bmatrix}1\ 0\ \Delta T\ 0\\ 0\ 1\ 0\ \Delta T\\ 0\ 0\ 1\ 0\\ 0\ 0\ 0\ 1\end{bmatrix}  \tag{7}\]According to the matrix of noise, the covariance matrix, Q, is  
\[\text{Q}=\text{q} \begin{bmatrix}\Delta T^{3}/3\ 0\ \Delta T^{2}/2\ 0\\ 0\ \Delta T^{3}/3\ 0\ \Delta T^{2}/2\\ \Delta T^{2}/2\ 0\ \Delta T\ 0\\ 0\ \Delta T^{2}/2\ 0\ \Delta T\end{bmatrix}  \tag{8}\]  
where q is the power spectrum density of the system noise. \(\Delta T\) is the UWB-data sampling interval. According to the relationship between the position and the distance of the two coordinate points, the equation for the distance between the label and the base station can be established. Considering the existence of multiple base stations, the following general equation is given:  
\[R_{i,k}=\sqrt{\left(x_{k}-x_{i}\right)^{2}+\left(y_{k}-y_{i}\right)^{2}}+n_{i,k} \tag{9}\]  
where \(R_{i,k}\) represents the measurement distance and \(n_{i,k}\) is measurement noise. When the viewing-distance environment is between the base station and the mobile station, \(n_{i,k}\) follows zero-mean Gaussian distribution. When the base station and mobile station are in a non line of sight environment or abnormal ranging occurs, then the measurement equation is  
\[\text{Z}=\text{HX}+\text{V} \tag{10}\]  
where H represents the measurement transfer matrix and V represents measurement noise. Measurement matrix Z consists of the distance measured with UWB positioning:  
\[\text{Z}=\left[R_{1,k}\ R_{2,k}\ \cdots\ R_{M,k}\right]^{T} \tag{11}\]  
\[\text{H}= \begin{bmatrix}\sqrt{\left(x_{k}-x_{1}\right)^{2}+\left(y_{k}-y_{1} \right)^{2}}\\ \sqrt{\left(x_{k}-x_{2}\right)^{2}+\left(y_{k}-y_{2}\right)^{2}}\\ \cdots\\ \sqrt{\left(x_{k}-x_{M}\right)^{2}+\left(y_{k}-y_{M}\right)^{2}}\end{bmatrix}  \tag{12}\]  
\[\text{V}=\left[n_{1,k}\ n_{2,k}\ \cdots\ n_{M,k}\right]^{T} \tag{13}\]  
To sum up, the steps of the UWB positioning algorithm based on the UKF are as follows: Step 1: Set the initial parameters of the UKF filter:  
\[ \begin{cases}\hat{X}_{0}=E(X_{0})\\ P_{0}=E\Big{[}(X-X_{0})(X-X_{0})^{T}\Big{]}\end{cases}  \tag{14}\]  
Step 2: According to Equation (14), calculate the sigma sample points:  
\[\chi_{k-1}=\Big{[}\hat{X}_{k-1}\hat{X}_{k-1}+\gamma\sqrt{P_{k-1}}\hat{X}_{k-1 }-\gamma\sqrt{P_{k-1}}\Big{]}^{T} \tag{15}\]  
Among them, \(P_{k-1}\) represents the covariance matrix, \(\chi_{k-1}\) represents the composed column vector and \(\gamma\) represents a scale factor.