# An NLOS Ranging Error Mitigation Method for 5G Positioning in Indoor Environments
## 2 Problem Description and System Model  
This section introduces the 5G NR time-frequency resource mapping scheme. The 5G positioning reference signal (PRS) has an abundance of time-frequency resources, and it is expected to exhibit a better performance. The pseudorandom code of the PRS signal is generated using gold sequences, and OFDM modulation is employed to achieve reliable data transmission in complex scenarios with a scalable OFDM numerology. The physical signal's transmissions are organized into signal frames, subframes, and slots in the time domain. Each signal frame has a duration of 10 ms and consists of 10 subframes with a subframe duration of 1 ms. A subframe is formed by one or multiple slots. The resource element consists of one subcarrier in one OFDM symbol, which is the smallest physical time-frequency resource unit. The physical resource block is defined as 12 continuous subcarriers in one time slot. In this study, factors such as the positioning accuracy and resource occupancy rate were comprehensively considered. The parameter of 30 KHz subcarrier spacing was used in our experiments, and thus, one subframe had two slots, and each slot had 14 OFDM symbols. Comb-4 was adopted for resource mapping. This study took into account a wide range of parameters, including the resource occupancy rate and placement accuracy. In our experiments, we selected a 30 kHz subcarrier spacing setting, which resulted in two slots per subframe, with 14 OFDM symbols in each slot. Comb-4 was utilized for the mapping of resources. In this section, we analyze the 5G PRS as an example. After appropriate adjustments, the proposed method can also be applied to the suppression of NLOS errors in other wireless signals. The baseband received signal at the terminal for 5G positioning can be represented as follows:  
\[ \begin{split} r(t)=&\sum_{m=1,m\
eq n}^{M}(A^{m}C^{ m}(t-\tau^{m})\cos(2\pi(f_{IF}^{m}+f_{d}^{m})t+\varphi^{m}))\\ &+\alpha^{\text{NLOS}}A^{n}C^{n}\Big{(}i-\tau^{\text{LOS},\mu}- \tau^{\text{NLOS}}\Big{)}\\ &\times\cos(2\pi(f_{IF}^{n}+f_{d}^{m})t+\varphi^{n})+\omega(t) \end{split}  \tag{1}\]  
where \(r(t)\) represents the 5G signal sampled at time \(t\), \(m\) denotes the identifier of the positioning base station in the network, M represents the total number of positioning base stations. \(A\) indicates the amplitude value of the positioning signal, \(C\) represents the ranging code sequence, \(\tau^{m}\) denotes the delay of the ranging code for a base station, \(f_{IF}\) and \(\varphi\) denote the frequency and initial phase of the local carrier, respectively, \(f_{d}\) represents the Doppler frequency shift, \(n\) indicates the identifier of the NLOS base station, \(\alpha^{\text{NLOS}}\) represents the reflection coefficient of the NLOS signal, \(\tau^{\text{NLOS}}\) denotes the delay caused by the NLOS effect relative to the direct path signal, and \(\omega(t)\) represents additive Gaussian white noise. Achieving THE high-precision positioning of 5G PRS signals requires continuous signal tracking at the terminal side. The impact of NLOS effects on the code tracking loop is far greater than that on the carrier tracking loop.