# Evaluation of 5G Positioning Based on Uplink SRS and Downlink PRS Under LOS and NLOS Environments
## 2 Methodology
### The 5G Signal Design of PRS  
In the context of downlink transmission, the implementation of a dedicated PRS signal is required for the purpose of localization. The technology utilizes a multi-carrier waveform, primarily based on the OFDM scheme. The design of the PRS sequence necessitates the assurance of both interference randomization and strong sequence correlation across different TRPs [42]. The PRS beam structure has been demonstrated to enhance coverage, particularly in mm-wave deployments. The PRS technique is contingent upon the utiliza  
Figure 6: Resource grid allocation of SRS at: (**a**) Comb-2; (**b**) Comb-4. tion of Gold sequences, defined as pseudo-random sequences characterized by constant amplitude and orthogonal properties with respect to each other. According to the 3 GPP TS 138.211 version 16.2.0 standard, PRS is defined as \(r(m)\), which is given by  
\[r(m)=\frac{1}{\sqrt{2}}\left(1-2c(2m)\right)+j\frac{1}{\sqrt{2}}\left(1-2c(2m-1 )\right) \tag{3}\]  
where \(j\) is the imaginary part, \(m\) denotes the subcarrier spacing, and \(c(i)\) is the pseudo-random sequence that uses the 31 st-order Gold sequence given by  
\[c(n)=\left[x_{1}(n+N_{c})+x_{2}(n+N_{c})\right]\bmod 2 \tag{4}\]  
Sequence \(c(n)\) of length \(M_{PN}\), where \(n\) = 0, 1, 2, \(\ldots\), \(M_{PN}\)--1, \(N_{c}\) is the offset applied to the sequence \(x_{1}\) and \(x_{2}\)  
\[x_{1}(n+31)=\left[x_{1}(n+3)+x_{1}(n)\right]\bmod 2 \tag{5}\]  
\[x_{2}(n+31)=\left[ \begin{matrix}x_{2}(n+3)+x_{2}(n+2)\\ +x_{2}(n+1)+x_{2}(n)\end{matrix} \right]\bmod 2 \tag{6}\]  
The equation used to generate the initial sequence of \(c_{i}\) is  
\[c_{init}=\left[ \begin{matrix}2^{22}\left[\frac{n_{ID,seq}^{PBS}}{1024}\right] +2^{10}\left(\begin{matrix}N_{symb}^{slot}n_{s,f}^{\mu}\\ +l+1\end{matrix}\right)\\ \cdot\left(2\left(n_{ID,seq}^{PBS}\bmod 1024\right)+1\right)\\ +\left(n_{ID,seq}^{PBS}\bmod 1024\right)\end{matrix} \right]\bmod 2^{31} \tag{7}\]  
where \(c_{init}\) denotes the seed value for the Gold sequence, and \(n_{ID,seq}^{PBS}\in\{0,1,\ldots,4095\}\) is the PRS pattern ID that identifies a PRS part. \(N_{symb}^{slot}\) is the number of symbols in the time slot, and \(n_{s,f}^{\mu}\in\left\{0,\ldots,N_{slot,frame}^{\mu}-1\right\}\) is the number of time slots. The range of slot numbers is from 0 to \(N_{slot}^{frame,\mu}-1\), and the number of slots in the structure is determined by \(\mu\), which is \(N_{slot}^{frame,\mu}=10\cdot 2^{\mu}\). The indices of the OFDM symbols within the allocated space vary from 0 to \(N_{symb}^{slot}-1\). As illustrated in Figure 7, PRS is allocated within the RG, which is structured across the time-frequency domain. The horizontal axis of this grid represents OFDM symbols, while the vertical axis denotes RB. PRS mapping follows 3 GPP specifications, restricting its placement to specific RBs and OFDM symbols rather than spreading it uniformly across the grid. A comb-6 maps PRS tones to every sixth subcarrier, resulting in a lower density of tones. While this approach mitigates spectral overhead and reduces interference, it may also adversely affect positioning accuracy by diminishing the availability of reference signals. Furthermore, distinct pseudo-random sequences are utilized by different cells, based on the PRS sequence ID \(n_{ID,seq}^{PBS}\) to mitigate inter-cell interference. The PRS comb-like structure has been shown to help mitigate inter-cell interference. This is due to the PRS's ability to transmit signals concurrently from multiple gNBs. The gNB utilizes distinct, non-overlapping resource elements of the resource grid. The size of the downlink PRS resource in the time domain, denoted by \(l_{PRS}\), can assume values of 2, 4, 6, or 12. The specific value employed is determined by the higher layer, and it corresponds to the number of the first symbol. \[l=l_{start}^{PRS},\ l_{start}^{PRS}+1,\ldots,\ l_{start}^{PRS}+l_{PRS}-1 \tag{8}\]  
For each value of \(l\), a distinct initial seed value \(c_{init}\) is assigned, which in turn generates a unique sequence.