# 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
Then, the error probability can be expressed as  
\[P_{\min}(\varphi,\mathbf{c})=Q\bigg{(}\sqrt{\kappa_{\mathrm{snr}}(\rho_{r}(0,\mathbf{ c})-\rho_{r}(\varphi,\mathbf{c}))}\bigg{)} \tag{14}\]  
where \(\kappa_{\mathrm{snr}}=E_{\mathrm{P}}/N_{0}\) denotes the signal-to-noise ratio, \(E_{\mathrm{P}}\) is the average received energy, and \(Q\) denotes the Gaussian Q-function. The normalized autocorrelation function is defined as follows:  
\[\rho_{r}(\varphi,\mathbf{c})=\frac{1}{E_{\mathrm{P}}}\int_{-\infty}^{\infty}r(t- \tau,\mathbf{c})r(t-\tau-\varphi,\mathbf{c})dt =\mathbf{c}^{T}\mathbf{R}(\varphi)\mathbf{c} \tag{15}\]  
where  
\[\mathbf{R}(\varphi)\triangleq\bigg{(}\left[ \begin{array}{cc}\cos(2\pi f_{c} \varphi)&\sin(2\pi f_{c}\varphi)\\ -\sin(2\pi f_{c}\varphi)&\cos(2\pi f_{c}\varphi)\end{array} \right]\otimes\mathbf{ R}(\varphi)\bigg{)} \tag{16}\]  
By replacing \(P_{\min}(\varphi)\) with \(P_{\min}(\varphi,\mathbf{c})\) in Equation (12), we can obtain the \(ZZB\) under the condition of channel state \(\mathbf{c}\):  
\[\left.ZZB\right|_{c}=\frac{1}{T}\int_{0}^{T}\varphi(T-\varphi)P_{\min}(\varphi,\mathbf{c})d\varphi \tag{17}\]  
On the basis of Equation (17), in further deriving the idea of averaging on the vector \(c\), the unconditionally restricted \(ZZB\) can be obtained:  
\[ZZB=\left.\int f_{\mathbf{c}}(\mathbf{c})ZZB\right|_{\mathbf{c}}d\mathbf{c}=\frac{1}{T}\int_{ 0}^{T}\varphi(T-\varphi)\bar{P}_{\min}(\varphi)d\varphi \tag{18}\]  
The average error probability function can be expressed as  
\[\bar{P}_{\min}\left(\varphi\right)=\int f_{\mathbf{c}}(\mathbf{c})P_{\min}(z,\mathbf{c})d \mathbf{c} \tag{19}\]  
It should be noted that the premise of obtaining Equation (18) is that the positioning terminal has accurate channel state information. Therefore, when the positioning terminal receives signals completely synchronized, the \(ZZB\) can serve as a lower bound for the root mean square error of the TOA estimation. Furthermore, Equation (19) represents the average bit error probability using receiver coherent detection with perfect channel state information in the presence of NLOS and multiple paths. Many scholars have studied the coupling relationship between BEP and \(ZZB\) under different conditions [35]. Here, we adopted a method similar to that in [36] to solve for \(\bar{P}_{\min}(\varphi)\):  
\[Q(x)=\frac{1}{\pi}\int_{0}^{\pi/2}\exp\biggl{\{}-\frac{x^{2}}{2\sin^{2}(\theta )}\biggr{\}}d\theta \tag{20}\]Substituting Equation (14) and Equation (20) into Equation (19) can yield the expression for the error probability function as follows:  
\[\bar{P}_{\text{min}}(\varphi) =\text{E}_{\text{c}}\{P_{\text{min}}(\varphi,\mathbf{\epsilon})\} \tag{21}\] \[=\frac{1}{\pi}\int_{0}^{\pi/2}E_{\text{c}}\bigg{\{}\exp\bigg{\{}- \frac{\kappa_{\text{snr}}\mathbf{\epsilon}^{T}[R_{2}(0)-R_{2}(\varphi)]\mathbf{\epsilon }}{2\sin^{2}(\theta)}\bigg{\}}\bigg{\}}d\theta\] \[=\frac{1}{\pi}\int_{0}^{\pi/2}\Phi_{\rho}\bigg{(}-\frac{\kappa_{ \text{snr}}}{2\sin^{2}(\theta)}\bigg{)}d\theta\]  
where \(\Phi_{\rho}\) represents the moment generating function (MGF). The specific derivation process can be found in [37]. Here, we only need to evaluate an integral with a finite limit. An effective method for evaluating the integral in the form of Equation (21) can be found in [38]. Therefore, under the condition of known accurate channel state information in an additive white gaussian noise (AWGN) channel, the performance \(ZZB\) for wireless localization can be expressed as follows:  
\[ZZB=\frac{1}{T}\int_{0}^{T}\varphi(T-\varphi)Q\bigg{(}\sqrt{\kappa_{\text{ snr}}\big{(}1-\rho_{\text{P}}(\varphi)\big{)}}\bigg{)}d\varphi \tag{22}\]