# Methodology for Simulating 5G and GNSS High-Accuracy Positioning
## 3 Characterization of the Observables
### mmWave  
With 5G technology and more specifically with the combination of mmWave and beamforming, new solutions for cellular network-based positioning can be developed [8]. An attractive and promising approach is the single-BS solution described in [30], which leverages angle-of-arrival, angle-of-departure and ranging estimations to provide accurate user equipment (UE) position and rotation also in mixed LoS and NLoS channel conditions. The mathematical model underpinning this approach relies on: (a) the channel sparsity at the high carrier frequency [31] and (b) the geometric relationship between channel parameters and UE and scatter (reflection point) locations, i.e., channel impulse response is given as,  
\[\mathbf{H}(t,\boldsymbol{\tau},\boldsymbol{\phi}^{t},\boldsymbol{\theta}^{t}, \boldsymbol{\phi}^{r},\boldsymbol{\theta}^{r},\boldsymbol{h})=\sum_{k=0}^{K} h_{k}\mathbf{a}_{R}(\theta_{k}^{r},\phi_{k}^{r})\mathbf{a}_{T}^{\mathrm{H}}( \theta_{k}^{t},\phi_{k}^{t})\delta(t-\tau_{k}), \tag{8}\]  
where \(\mathbf{a}_{R}(\phi,\theta)\) and \(\mathbf{a}_{T}(\phi,\theta)\) are the steering vectors of the receive and transmitting antennas, \(k\) indicates the index of the \(k\)-th channel path (with \(k=0\) and \(k>0\) for the LoS and NLoS paths), \(\boldsymbol{h},\boldsymbol{\tau},\boldsymbol{\phi}^{t},\boldsymbol{\theta}^{ t},\boldsymbol{\phi}^{r},\boldsymbol{\theta}^{r}\) are the vectors of channel coefficients, time-delays, azimuths and elevations of the AoA and AoD of the \(K+1\) paths with \(\tau_{k},\phi_{k}^{r},\theta_{k}^{r}\) and \(\phi_{k}^{t},\phi_{k}^{t}\) given by  
\[\tau_{0}=\|\mathbf{p}-\mathbf{q}\|_{2}/c, \tag{9}\] \[\phi_{0}^{r}=\arctan((p_{y}-q_{y})/(p_{x}-q_{x})),\] (10) \[\theta_{0}^{r}=\arctan((p_{z}-q_{z})/\|\mathbf{p}-\mathbf{q}\|_{ xy}),\] (11) \[\phi_{0}^{t}=\arctan((q_{y}-p_{y})/(q_{x}-p_{x}))-\alpha,\] (12) \[\theta_{0}^{t}=\arctan((q_{z}-p_{z})/\|\mathbf{q}-\mathbf{p}\|_{ xy})-\beta,\] (13) \[\tau_{k}=\tau_{k:1}+\tau_{k:2}=(\|\mathbf{q}-\mathbf{s}_{k}\|_{2 }+\|\mathbf{s}_{k}-\mathbf{p}\|_{2})/c,\,\forall\,k>0\] (14) \[\phi_{k}^{r}=\arctan((s_{k:y}-q_{y})/(s_{k:x}-q_{x})),\,\forall\,k>0\] (15) \[\theta_{k}^{r}=\arctan((s_{k:z}-q_{z})/\|\mathbf{s}_{k}-\mathbf{q }\|_{xy}),\,\forall\,k>0\] (16) \[\phi_{k}^{t}=\arctan((s_{k:y}-p_{y})/(s_{k:x}-p_{x}))-\alpha,\, \forall\,k>0\] (17) \[\tau_{0}=\|\mathbf{p}-\mathbf{q}\|_{2}/c, \tag{9}\]0  
being \(\mathbf{p}\triangleq[p_{x},p_{y},p_{z}]^{\mathrm{T}}\), \(\mathbf{q}\triangleq[q_{x},q_{y},q_{z}]^{\mathrm{T}}\), \(\mathbf{s}\triangleq[s_{k:x},s_{k:y},s_{k:z}]^{\mathrm{T}}\) the coordinates of the UE, BS and \(k\)-th scatter, respectively, \(\alpha\) and \(\beta\) the azimuth and elevation offset of the UE with respect to the BS  
\[\tau_{0}=\|\mathbf{p}-\mathbf{q}\|_{2}/c, \tag{9}\]1 CDF of the ranging errors with a cmWave signal of 90-MHz bandwidth for WINNER channel models in LoS and NLoS conditions. orientation, \(\|\cdot\|_{2}\) denoting the Euclidean norm, and \(\|\cdot\|_{xy}\) the Euclidean norm of \(xy\) components of the three-dimensional (3D) vector. Relying on this model, physical channel parameters and, subsequently, location and orientation of the UE can be estimated from the received reference signal. The signal model is valid for both uplink and downlink transmission. More specifically, for an OFDM transmission, the time-domain expression of the received signal is given by  
\[\tau_{0}=\|\mathbf{p}-\mathbf{q}\|_{2}/c, \tag{9}\]2  
where \(P_{t}\) is the OFDM transmission power, \(\mathbf{n}(t)\) is the white noise, \(N\) is the number of pilot subcarriers, \(n_{i}\) is the \(i\)-th pilot subcarrier index, \(\mathbf{s}_{i}\in\mathbb{C}^{N_{r}}\) is the pilot vector used on the \(i\)-th subcarrier and \(\mathbf{W}\in\mathbb{C}^{M_{r}\times M}\), \(\mathbf{F}\in\mathbb{C}^{N_{r}\times N}\) are the receiver and transmitter beamformer matrix, respectively. As shown in Appendix A the fundamental limits for channel parameters estimation can be derived in closed-form.