# An NLOS Ranging Error Mitigation Method for 5G Positioning in Indoor Environments
## 3 The Proposed NLOS Mitigation and SRUKF-Based Location Estimation Method for 5G Positioning
### SRUKF-Based Location Estimation Method for NLOS Mitigation  
In the previous section, we presented a method for NLOS mitigation for each base station's positioning signal. In this section, we select some NLOS observations based on the previous section for fused position estimation. To improve the numerical stability of the output results of the position estimator, we introduced the square root of the state covariance on the basis of the UKF. In the implementation of the SRUKF, the square root of the state covariance is directly propagated, avoiding the need to reconstruct the covariance at each iteration. Additionally, the square root form has the additional advantages of numerical stability and positive semi-definiteness of the state covariance. It is essential to ensure the stability of the filter during the fusion process of LOS and NLOS observations. The implementation of the proposed method is shown in Figure 2.  
The initial system state follows a Gaussian distribution with mean m and variance P. From the system state matrix, we can obtain 2L+1 sigma points. Ref. [39] presented the way to calculate sigma points. The nonlinear function is used to propagate these sigma vectors:  
\[\mathcal{Y}_{i}=h(x_{i})i=0,\ldots, \tag{38}\]  
The covariance of the 5G LOS and NLOS mixed positioning state prediction error can be expressed as  
\[P^{-}[t_{k}]=FP[t_{k}]F^{T}+Q[t_{k}] \tag{39}\]  
Figure 2: The implementation of the proposed SRUKF-based location estimation method. where \(Q[t_{k}]\) is a Gaussian process noise matrix at \(t_{k}\), and \(P[t_{k}]\) denotes the estimate error covariance and its square root form \(R[t_{k}]\):  
\[P[t_{k}]=R[t_{k}](R[t_{k}])^{T} \tag{40}\]  
The square root of the state prediction covariance can be defined as follows by introducing QR decomposition:  
\[R^{-}[t_{k}]=\left(\text{qr}\bigg{\{}\bigg{[}FR[t_{k}]\sqrt{Q[t_{k}]}\bigg{]}^{ T}\bigg{\}}\right)^{T} \tag{41}\]  
In the SRUKF algorithm for 5G NLOS mitigation observations, process noise mainly consists of two parts: deterministic noise and stochastic noise. Deterministic noise can be addressed through prior knowledge, while stochastic noise caused by modeling errors should be accurately compensated. Due to the inaccuracies in modeling, the expected mean and covariance of the innovations may differ from the actual values. We propose a stability coefficient to address this issue. \[R[t_{k}]=\sqrt{\varphi[t_{k}]}R^{-}[t_{k}] \tag{42}\]  
The estimated innovation covariance \(P_{\gamma,\gamma}[t_{k}]\) should be larger than or equal to the actual one \(\text{E}\big{\{}\gamma[t_{k}]\gamma^{T}[t_{k}]\big{\}}\) in order to maintain consistent estimations. \[P_{\gamma,\gamma}[t_{k}]\geq\text{E}\big{\{}\gamma[t_{k}]\gamma^{T}[t_{k}] \big{\}} \tag{43}\]  
\[\gamma[t_{k}]=y[t_{k}]-\hat{y}[t_{k}] \tag{44}\]  
The innovation covariance has the following expression:  
\[P_{\gamma,\gamma}[t_{k}]=H[t_{k}]P[t_{k}]H^{T}[t_{k}]+Q[t_{k}] \tag{45}\]  
where \(P[t_{k}]\) denotes the covariance of the predicted state, and the cross-covariance between the measurements and the predicted state is \(P_{x,y}[t_{k}]\):  
\[\mathcal{Y}_{i}=h(x_{i})i=0,\ldots, \tag{38}\]0  
Combining (45) and (46) leads to (47):  
\[\mathcal{Y}_{i}=h(x_{i})i=0,\ldots, \tag{38}\]1  
Incorporating (43) into (47) yields (48), and the fading factor introduced into the predicted state covariance should meet the following requirement:  
\[\mathcal{Y}_{i}=h(x_{i})i=0,\ldots, \tag{38}\]2  
where \(P^{-}[t_{k}]\) represents the covariance of the predicted state \(P[t_{k}]=\varphi[t_{k}]P^{-}[t_{k}]\), and \(P_{x,y}^{-}[t_{k}]\) denotes the cross-covariance of the state and measurement without the fading factor, given by \(P_{x,y}[t_{k}]=\varphi[t_{k}]P_{x,y}^{-}[t_{k}]\). As a result, it can be confirmed that the lower bound of the stabilized coefficient \(\varphi[t_{k}]\), as obtained in Equation (48), can be utilized to mitigate modeling errors while maintaining the estimation consistency of the innovation.