# Joint Angle Estimation Error Analysis and 3D Positioning Algorithm Design
for mmWave Positioning System

Tuo Wu, Cunhua Pan, Yijin Pan, Sheng Hong, Hong Ren, Maged Elkashlan, Feng Shu
and Jiangzhou Wang, _Fellow, IEEE_ (Corresponding author: Cunhua Pan). T. Wu
and M. Elkashlan are with the School of Electronic Engineering and Computer
Science at Queen Mary University of London, London E1 4NS, U.K.
(Email:{tuo.wu, maged.elkashlan}@qmul.ac.uk). C. Pan, Y. Pan and H. Ren are
with the National Mobile Communications Research Laboratory, Southeast
University, Nanjing 210096, China. (Email: {cpan,panyj,hren}@seu.edu.cn). S.
Hong is with Information Engineering School of Nanchang University, Nanchang
330031, China. (Email: shenghong@ncu.edu.cn). F. Shu is with the School of
Electronic and Optical Engineering, Nanjing University of Science and
Technology, Nanjing 210094, China, and also with the School of Information and
Communication Engineering, Hainan University, Haikou 570228, China.(E-mail:
shufeng0101@163.com). J. Wang is with the School of Engineering, University of
Kent, UK. (e-mail: J.Z.Wang@kent.ac.uk).

###### Abstract

In this paper, we propose a comprehensive framework to jointly analyze the
angle estimation error and design the three-dimensional (3D) positioning
algorithm for a millimeter wave (mmWave) positioning system. First, we
estimate the angles of arrival (AoAs) at the anchors by applying the two-
dimensional discrete Fourier transform (2D-DFT) algorithm. Based on the
property of the 2D-DFT algorithm, the angle estimation error is analyzed in
terms of probability density functions (PDF). The analysis shows that the
derived angle estimation error is non-Gaussian, which is different from the
existing work. Second, the intricate expression of the PDF of the AoA
estimation error is simplified by employing the first-order linear
approximation of triangle functions. Then, we derive a complex expression for
the variance based on the derived PDF. Specifically, for the azimuth
estimation error, the variance is separately integrated according to the
different non-zero intervals of the PDF. Finally, we apply the weighted least
square (WLS) algorithm to estimate the 3D position of the MU by using the
estimated AoAs and the obtained non-Gaussian variance. Extensive simulation
results confirm that the derived angle estimation error is non-Gaussian, and
also demonstrate the superiority of the proposed framework.

###### Index Terms:

Millimeter wave (mmWave), angles of arrival (AoAs), non-Gaussian, positioning.

##  I Introduction

As an important requirement for the sixth generation (6G) wireless networks,
high-accuracy positioning service is of great importance in a wide range of
applications [1], such as automated driving vehicles [2], smart factory [3]
and virtual reality [4]. For example, it is predicted that the 2020s will be
the first decade for automated driving vehicles with the positioning accuracy
at decimeter level [5]. However, the positioning accuracy of the prevalent
global positioning system (GPS) is about 5 meters even in ideal conditions
[6], which cannot meet the stringent requirement on positioning accuracy for
these thriving applications [7]. Therefore, network-based positioning systems
are emerging as a promising alternative to GPS in 6G networks [8].

In current wireless positioning networks, the millimeter wave (mmWave)
technique [9] can provide an extremely highly-accurate estimation of channel
parameters, such as the channel gain, time delays, and angle of arrival (AoA).
These parameters can be used to estimate the position of the mobile user (MU).
Therefore, it is of much interest to explore positioning algorithms for the
mmWave positioning systems. Typically, positioning algorithms work through the
following two steps. First, channel parameters can be acquired through some
estimation methods [10, 11, 12]. Second, positioning algorithms can be
designed accordingly. Specifically, expressions of the complex non-linear
geometric relationships between the channel parameters and the position
coordinates are first derived [13]. Then, the estimation error of the channel
parameters and the non-linear geometric relationships are jointly utilized to
derive the non-linear equations [14]. Finally, the position of the MU is
determined by solving the equations using iterative or non-iterative
algorithms. From the above-mentioned positioning steps, the estimation error
of the channel parameters can directly determine the positioning accuracy. In
general, different methods for estimating different channel parameters lead to
different types of parameter estimation errors [15].

To date, mmWave positioning systems have attracted extensive research
attention [16, 17, 18, 19, 20, 21]. To reduce the high computational
complexity due to a large number of antennas, [16] proposed a novel channel
compression method for the mmWave positioning systems. In [17], the successive
localization and beamforming scheme was proposed to estimate the long-term MU
location and the instantaneous channel state for the mmWave multiple-input
multiple-output (MIMO) communications. To provide an analytical performance
validation, [18] studied the theoretical performance bounds (i.e.,
Cram$\rm{\acute{e}}$r-Rao lower bounds (CRLB)) for positioning, and evaluated
the impact of the number of reflecting elements and the phase shifts of
reconfigurable intelligent surface (RIS) on the positioning estimation
accuracy. Alouini _et al._ derived the CRLB for assessing the performance of
synchronous and asynchronous signaling schemes and proposed an optimal closed-
form expression of the reflecting phase shifts of the RIS for joint
communication and localization [19]. The authors of [20] demonstrated that
accurate estimates of the position of an unknown node can be determined using
estimates of time of arrival (ToA), and AoA, as well as data fusion or machine
learning. [21] considered the channel estimation problem and the channel-based
wireless applications in MIMO orthogonal frequency division multiplexing
(OFDM) systems assisted by RISs.

However, the above contributions assumed that the estimation error of the
channel parameters follows the Gaussian distribution, which is inconsistent
with practical scenarios. In practice, the distribution of these parameters
depends on the practical estimation methods (e.g., 2D-DFT algorithm [22]),
which may not follow the Gaussian distribution. Therefore, existing
positioning algorithms and performance analysis may not be applicable when
considering practical channel parameter estimation methods. Hence, it is
necessary to model the estimation error of the estimated channel parameters,
so that the position of the MU can be estimated based on the estimation error.

In this paper, we aim to propose a complete framework to jointly analyze the
angle estimation and design the three-dimensional (3D) positioning algorithm
for the mmWave positioning system. Our main contributions are summarized as
follows:

  * 1)

We propose a comprehensive framework to jointly analyze the angle estimation
and design the 3D positioning algorithm for the mmWave positioning system.
Specifically, we first estimate the AoAs at the anchors by applying the 2D-DFT
algorithm. Then, we derive the closed-form expression of the PDF of the
estimation error. We further derive the variance of the estimation error based
the PDF. Finally, by using the estimated AoAs and the derived variance, we
apply the weighted least square (WLS) algorithm to estimate the 3D position of
the MU.

  * 2)

The estimated AoAs are first derived in closed-form based on the 2D-DFT
method. Based on the expression of estimation, we find that the angle
estimation error at the anchors depends on the search grid, the panel size of
the anchors, and the number of antennas of the anchors. Moreover, due to the
property of 2D-DFT, the angle estimation error follows the uniform
distribution.

  * 3)

According to the uniform distribution of the estimation error of azimuth and
elevation, the angle estimation error is characterized in terms of the PDF,
which is non-Gaussian. To be specific, we first derive the PDF by using the
geometric relationship between the AoAs and their triangle functions. Then, we
simplify the complex geometric expression of the PDF by employing the first-
order linear approximation of the triangle function. For the azimuth angle
estimation, we provide an algorithm to derive and approximate the PDF
expression of its estimation error.

  * 4)

Based on the PDF of estimation error, we theoretically derive the variance of
the angle estimation error. Since the PDF of the azimuth estimation error has
three different non-zero intervals, we separately calculate the integral in
the different intervals according to the variance calculation formula.

  * 5)

Simulation results verify the accuracy of the derived results and demonstrate
the superiority of the proposed framework. We observe that the variance
decreases with the number of elements, which means that increasing the number
of anchor antennas improves the estimation accuracy.

The remainder of the paper is organized as follows. The system model for the
mmWave positioning system is described in Section II. The details of the whole
framework are given in Section III. The procedures of estimating angles are
given in Section IV. Section V derives the PDF in more details. Section VI
calculates the variance. The positioning algorithm is given in Section VII.
Simulation results are given in Section VIII. Section IX concludes the work of
this paper.

Figure 1: System model of considered mmWave positioning system.

##  II System Model

Consider a mmWave time division duplex (TDD) 3D positioning system, where an
MU sends pilot signals to the anchors to locate the MU. We assume that there
are $I$ anchors, each of which is equipped with a uniform planar array (UPA)
with $N_{y,z}=N_{y}\times N_{z}$ antennas, where $N_{y}$ and $N_{z}$ denote
the numbers of antennas along the y-axis and z-axis, respectively. The MU is
equipped with a single antenna.

As shown in Fig. 1, the anchors are placed parallel to the y-o-z plane with
the center located at $\mathbf{s}_{i}=[x_{i},y_{i},z_{i}]^{T}$,
$i\in[1,\cdots,I]$. The true location of the MU is
$\mathbf{q}=[x_{q},y_{q},z_{q}]^{T}$. The estimated location of the MU is
denoted as $\mathbf{\hat{q}}=[\hat{x}_{q},\hat{y}_{q},\hat{z}_{q}]^{T}$.
Generally, once the anchors are deployed, the coordinate $\mathbf{s}_{i}$ are
known and invariant. In order to locate the MU, we need to obtain the
estimated $\mathbf{\hat{q}}$.

Assuming that the number of propagation paths between the MU and the $i$th
anchor is $N_{i}$, the AoA of the $n_{i}$th path from the MU to the $i$th
anchor can be decomposed into the elevation angle $0\leq\Theta_{n_{i}}\leq\pi$
in the vertical direction, and the azimuth angle $0\leq\Phi_{n_{i}}\leq\pi$ in
the horizontal direction, respectively. As a result, the array response vector
at the $i$th anchor of the $n_{i}$th path can be expressed as

$\displaystyle{\bf a}(\Theta_{n_{i}},\Phi_{n_{i}})={\bf
a}_{e}(\Phi_{n_{i}})\otimes{\bf a}_{a}(\Theta_{n_{i}},\Phi_{n_{i}}),$ (1)

where $\otimes$ denotes the Kronecker product. Moreover, we have

$\displaystyle{\bf a}_{e}(\Phi_{n_{i}})=[1,e^{\frac{-j2\pi
d_{r}\sin\Phi_{n_{i}}}{\lambda_{c}}},...,e^{\frac{-j2\pi(M_{x}-1)d_{r}\sin\Phi_{n_{i}}}{\lambda_{c}}}]^{T},$
(2)

and

$\displaystyle{\bf a}_{a}(\Theta_{n_{i}},\Phi_{n_{i}})=[1,e^{\frac{-j2\pi
d_{r}\cos\Theta_{n_{i}}\cos\Phi_{n_{i}}}{\lambda_{c}}},...,e^{\frac{-j2\pi(M_{z}-1)d_{r}\cos\Theta_{n_{i}}\cos\Phi_{n_{i}}}{\lambda_{c}}}]^{T},$
(3)

where $d_{r}$ and $\lambda_{c}$ denote the distance between the antennas of
the anchors and the carrier wavelength, respectively. Then, the channel
between the MU and the $i$th anchor, denoted as ${\bf h}_{i}$, can be modeled
as

$\displaystyle{\bf h}_{i}=\sum^{N_{i}}_{n_{i}=1}\alpha_{n_{i}}{\bf
a}(\Theta_{n_{i}},\Phi_{n_{i}})=\underbrace{\alpha_{L,i}{\bf
a}(\Theta_{L,i},\Phi_{L,i})}_{LoS}+\underbrace{\sum^{N_{i}}_{n_{i}=2}\alpha_{n_{i}}{\bf
a}(\Theta_{n_{i}},\Phi_{n_{i}})}_{NLoS},$ (4)

where $\alpha_{n_{i}}$ denotes the complex channel gain of $n_{i}$th path.
Moreover, $\alpha_{L,i}$, $\Theta_{L,i}$,and $\Phi_{L,i}$ denote the complex
channel gain, the elevation AoA, and the azimuth AoA of the line-of-sight
(LoS) path, respectively. As we can see from (4), channel components of ${\bf
h}_{i}$ can be categorized into two types, namely _LoS_ and _NLoS_. LoS path
component is the direct path between the anchors and the MU, non-line-of-sight
(NLoS) path component consists of the paths between the anchors and the MU
reflected by scatters, e.g., walls, human bodies, and etc. Moreover, according
to [23], the complex channel gain of LoS is given by

$\displaystyle\alpha_{L,i}=\frac{\lambda_{c}e^{-j2\pi d_{L,i}}}{4\pi
d_{L,i}},$ (5)

where $d_{L,i}$ is the distance between the $i$th anchor and the MU.

##  III Joint Angle Estimation Analysis and 3D Positioning Algorithm Design

In the existing works concerning the positioning algorithm design, for
tractability, the estimation error of channel parameters is assumed to be
additive zero-mean complex Gaussian noise. However, in practice, the
distribution of these channel parameters depends on the practical estimation
methods, which may not follow the Gaussian distribution. To investigate the
impact of the practical estimation error of the channel parameters, we propose
to design a comprehensive framework to jointly analyze the angle estimation
error and estimate the 3D position of the MU.

Based on the 2D-DFT angle estimation technique, the angle estimation error
analysis and 3D positioning algorithm design is investigated in this paper.
First, we apply the 2D-DFT algorithm to estimate $(\Theta_{L,i},\Phi_{L,i})$
111As NLoS path component usually varies fast and its weight to the channel is
marginal, especially in the mmWave band, we are more interested in LoS path.
Hence, we intend to estimate the path parameter $(\Theta_{L,i},\Phi_{L,i})$ of
the LoS component from the MU to the anchors, which can be used to derive the
position of the MU.. Then, based on the estimation of the AoAs, we first
derive the PDF of the angle estimation error, based on which the closed-form
expression of the variance of the angle estimation error is derived. Finally,
we apply the WLS algorithm to estimate the 3D position of the MU by using the
estimated AoAs and the derived variance.

The details of the proposed framework are summarized in Algorithm 1. The
descriptions of each step of the proposed framework will be introduced in the
following sections.

Algorithm 1 Joint Angle Estimation Error Analysis and 3D Positioning Framework

1: Estimate $(\Theta_{L,i},\Phi_{L,i})$ by using the 2D-DFT estimation
algorithm;

2: Derive the PDF of the angle estimation error;

3: Derive the closed-form expression of the variance of the angle estimation
error;

4: Estimate the 3D position of the MU by using the variance of the angle
estimation error.

##  IV Angle Estimation

The first step of the proposed framework is to estimate
$(\Theta_{L,i},\Phi_{L,i})$. Hence, in this section, we apply the 2D-DFT
algorithm [12] to estimate the AoA at the anchors. For the sake of
illustration, we consider the estimation errors only for the noise-free
scenario similar to [12] and [24], the performance of which is roughly the
same as the general scenarios with sufficiently high received signal to noise
ratio (SNR).

###  IV-A Initial Angle Estimation

According to the expression of ${\bf a}(\Theta_{L,i},\Phi_{L,i})$ in (1),
${\bf a}(\Theta_{L,i},\Phi_{L,i})$ can be further derived as

$\displaystyle{\bf a}(\Theta_{L,i},\Phi_{L,i})={\rm vec}\\{{\bf
A}(\Theta_{L,i},\Phi_{L,i})\\}={\rm vec}\\{{\bf a}_{e}(\Phi_{L,i}){\bf
a}_{a}(\Theta_{L,i},\Phi_{L,i})\\}.$ (6)

To estimate the AoA at the $i$th anchor, we define two normalized DFT matrices
${\bf F}_{N_{y}}$ and ${\bf F}_{N_{z}}$, elements of which are written as
$[{\bf
F}_{N_{y}}]_{b_{i}b_{i}^{\prime}}=e^{-j\frac{2\pi}{N_{y}}b_{i}b_{i}^{\prime}}$
$(b_{i},b_{i}^{\prime}=0,1,\cdots,N_{y}-1)$ and $[{\bf
F}_{N_{z}}]_{qq^{\prime}}=e^{-j\frac{2\pi}{N_{z}}q_{i}q_{i}^{\prime}}$
$(q_{i},q_{i}^{\prime}=0,1,\cdots,N_{z}-1)$, respectively. Meanwhile, let us
define $u_{L,i}=\frac{2\pi d_{r}\cos\Theta_{L,i}\cos\Phi_{L,i}}{\lambda_{c}}$
and $v_{L,i}=\frac{2\pi d_{r}\sin\Phi_{L,i}}{\lambda_{c}}$. Then, we define
the normalized 2D-DFT of the matrix ${\bf A}(\Theta_{L,i},\Phi_{L,i})$ in (6)
as ${\bf A}_{DFT}(\Theta_{L,i},\Phi_{L,i})={\bf F}_{N_{y}}{\bf
A}(\Theta_{L,i},\Phi_{L,i}){\bf F}_{N_{z}}$, whose $(b_{i},q_{i})$th element
is calculated as

$\displaystyle[{\bf A}_{DFT}(\Theta_{L,i},\Phi_{L,i})]_{b_{i}q_{i}}$
$\displaystyle=\sum^{N_{y}-1}_{n_{y}=0}\sum^{N_{z}-1}_{n_{z}=0}[{\bf
A}(\Theta_{L,i},\Phi_{L,i})]_{b_{i}q_{i}}e^{-j2\pi(\frac{b_{i}n_{y}}{N_{y}}+\frac{q_{i}n_{z}}{N_{z}})}$
$\displaystyle=e^{j\frac{N_{y}-1}{2}(u_{L,i}-\frac{2\pi
b_{i}}{N_{y}})}e^{j\frac{N_{z}-1}{2}(v_{L,i}-\frac{2\pi q_{i}}{N_{z}})}$
$\displaystyle\quad\times\frac{\sin(\pi
b_{i}-\frac{N_{y}u_{L,i}}{2})}{\sin((\pi
b_{i}-\frac{N_{y}u_{L,i}}{2})/N_{y})}\cdot\frac{\sin(\pi
q_{i}-\frac{N_{z}v_{L,i}}{2})}{\sin((\pi
q_{i}-\frac{N_{z}v_{L,i}}{2})/N_{z})}.$ (7)

When the number of reflecting elements becomes infinite, i.e.,
$N_{y}\rightarrow\infty$, $N_{z}\rightarrow\infty$, there always exist some
integers $b_{n_{i}}=\frac{N_{y}u_{L,i}}{2\pi}$,
$q_{n_{i}}=\frac{N_{z}v_{L,i}}{2\pi}$ such that $[{\bf
A}_{DFT}(\Theta_{L,i},\Phi_{L,i})]_{b_{n_{i}}q_{n_{i}}}=1$, while the other
elements are all zero. Therefore, all power is concentrated on the
$(b_{n_{i}},q_{n_{i}})$th element and ${\bf A}_{DFT}(\Theta_{L,i},\Phi_{L,i})$
is a sparse matrix. However, the anchor size could not be infinitely large,
thus $\frac{N_{y}u_{L,i}}{2\pi}$ and $\frac{N_{z}v_{L,i}}{2\pi}$ may not be
integers in general, which leads to the channel power leakage from the
$(b_{n_{i}},q_{n_{i}})$th element to its adjacent element. However, ${\bf
A}_{DFT}(\Theta_{L,i},\Phi_{L,i})$ can still be approximated as a sparse
matrix with the most power concentrated around the $(b_{n_{i}},q_{n_{i}})$th
element. Therefore, the peak power position of ${\bf
A}_{DFT}(\Theta_{L,i},\Phi_{L,i})$ is still useful for estimating the AoAs at
the achor. Then, the initial estimation is derived as follows:

$\displaystyle\cos\hat{\Theta}^{ini}_{L,i}\cos\hat{\Phi}^{ini}_{L,i}=\frac{\lambda_{c}b_{n_{i}}}{N_{y}d_{r}},$
$\displaystyle\sin\hat{\Phi}^{ini}_{L,i}=\frac{\lambda_{c}q_{n_{i}}}{N_{z}d_{r}},$
(8)

where $\hat{\Theta}^{ini}_{L,i}$ and $\hat{\Phi}^{ini}_{L,i}$ denote the
initial estimated angles at the anchor.

###  IV-B Fine Angle Estimation

The resolution of the estimated $\sin\hat{\Phi}^{ini}_{L,i}$ and
$\cos\hat{\Theta}^{ini}_{L,i}\cos\hat{\Phi}^{ini}_{L,i}$ is limited by the
half of the DFT interval. In order to improve the estimation accuracy, angle
rotation is provided to solve the mismatch issue in this subsection[22].

Let us define the angle rotation matrix of ${\bf A}(\Theta_{L,i},\Phi_{L,i})$
as ${\bf A}^{ro}(\Theta_{L,i},\Phi_{L,i})$, expressed as

$\displaystyle{\bf A}^{ro}(\Theta_{L,i},\Phi_{L,i})={\bf
U}_{N_{y}}(\tilde{\varpi}_{1,i}){\bf A}(\Theta_{L,i},\Phi_{L,i}){\bf
U}_{N_{z}}(\tilde{\varpi}_{2,i}),$ (9)

where the diagonal matrices ${\bf U}_{N_{y}}(\tilde{\varpi}_{1,i})$ and ${\bf
U}_{N_{z}}(\tilde{\varpi}_{2,i})$ are given by

$\displaystyle{\bf U}_{N_{y}}(\tilde{\varpi}_{1,i})={\rm
Diag}\\{1,e^{j\tilde{\varpi}_{1,i}},...,e^{j(N_{y}-1)\tilde{\varpi}_{1,i}}\\},$
$\displaystyle{\bf U}_{N_{z}}(\tilde{\varpi}_{2,i})={\rm
Diag}\\{1,e^{j\tilde{\varpi}_{2,i}},...,e^{j(N_{z}-1)\tilde{\varpi}_{2,i}}\\},$
(10)

with $\tilde{\varpi}_{1,i}\in[-\pi/N_{y},\pi/N_{y}]$ and
$\tilde{\varpi}_{2,i}\in[-\pi/N_{z},\pi/N_{z}]$ being the angle rotation
parameters. By using the angle rotation operation, the $(b_{i},q_{i})$th
element of the 2D-DFT of the rotated matrix ${\bf
A}^{ro}_{DFT}(\Theta_{L,i},\Phi_{L,i})$ is calculated as

$\displaystyle[{\bf A}^{ro}_{DFT}(\Theta_{L,i},\Phi_{L,i})]_{b_{i}q_{i}}$
$\displaystyle=\sum^{N_{y}-1}_{n_{y}=0}\sum^{N_{z}-1}_{n_{z}=0}[{\bf
A}(\Theta_{L,i},\Phi_{L,i})]_{b_{i}q_{i}}e^{-j2\pi(\frac{b_{i}n_{y}}{N_{y}}+\frac{q_{i}n_{z}}{N_{z}})}e^{j2\pi(\frac{\tilde{\varpi}_{1,i}n_{y}}{2\pi}+\frac{\tilde{\varpi}_{2,i}n_{z}}{2\pi})}$
$\displaystyle=e^{j\frac{N_{y}-1}{2}(u_{L,i}+\tilde{\varpi}_{1,i}-\frac{2\pi
b_{i}}{N_{y}})}e^{j\frac{N_{z}-1}{2}(v_{L,i}+\tilde{\varpi}_{2,i}-\frac{2\pi
q_{i}}{N_{z}})}$ $\displaystyle\quad\times\frac{\sin(\pi
b_{i}-\frac{N_{y}u_{L,i}}{2}-\frac{N_{y}\tilde{\varpi}_{1,i}}{2})}{\sin((\pi
b_{i}-\frac{N_{y}u_{L,i}}{2}-\frac{N_{y}\tilde{\varpi}_{1,i}}{2})/N_{y})}\cdot\frac{\sin(\pi
q_{i}-\frac{N_{z}v_{L,i}}{2}-\frac{N_{z}\tilde{\varpi}_{2,i}}{2})}{\sin((\pi
q_{i}-\frac{N_{z}v_{L,i}}{2}-\frac{N_{z}\tilde{\varpi}_{2,i}}{2})/N_{z})},$
(11)

where $\tilde{\varpi}_{1,i}$ and $\tilde{\varpi}_{2,i}$ could be optimized
with the one-dimensional search. Then, we could obtain the estimated results
as

$\displaystyle\cos\hat{\Theta}_{L,i}\cos\hat{\Phi}_{L,i}=\frac{\lambda_{c}b_{n_{i}}}{N_{y}d_{r}}-\frac{\lambda_{c}\tilde{\varpi}_{1,i}}{2\pi
d_{r}},$
$\displaystyle\sin\hat{\Phi}_{L,i}=\frac{\lambda_{c}q_{n_{i}}}{N_{z}d_{r}}-\frac{\lambda_{c}\tilde{\varpi}_{2,i}}{2\pi
d_{r}},$ (12)

where $\hat{\Theta}_{L,i}$ and $\hat{\Phi}_{L,i}$ denote the final estimated
azimuth and elevation AoAs after angle rotation, respectively. Furthermore,
$\hat{\Theta}_{L,i}$ and $\hat{\Phi}_{L,i}$ could be expressed as

$\displaystyle\hat{\Phi}_{L,i}$
$\displaystyle=\arcsin\bigg{(}\frac{\lambda_{c}b_{n_{i}}}{N_{z}d_{r}}-\frac{\lambda_{c}\tilde{\varpi}_{2,i}}{2\pi
d_{r}}\bigg{)},$ $\displaystyle\hat{\Theta}_{L,i}$
$\displaystyle=\arccos\bigg{(}\bigg{(}\frac{\lambda_{c}b_{n_{i}}}{N_{y}d_{r}}-\frac{\lambda_{c}\tilde{\varpi}_{1,i}}{2\pi
d_{r}}\bigg{)}\bigg{/}\sqrt{\bigg{(}1-\bigg{(}\frac{\lambda_{c}q_{n_{i}}}{N_{z}d_{r}}-\frac{\lambda_{c}\tilde{\varpi}_{2,i}}{2\pi
d_{r}}\bigg{)}^{2}\bigg{)}}\bigg{)}.$ (13)

##  V Derivation of the PDF of Angle Estimation Error

In this section, as the second step of the proposed framework, we derive the
PDF of the angle estimation error, which will be used for deriving the
variance of the angle estimation error. To obtain the PDF of the angle
estimation error, the first step is to derive the PDF of $\tilde{\Phi}_{L,i}$
based on the estimated angle $\hat{\Phi}_{L,i}$ and the property of the
2D-DFT. Then, the second step is to design an algorithm by deriving the PDF of
$\tilde{\Theta}_{L,i}$ based on the estimated angle $\hat{\Theta}_{L,i}$ and
the property of the 2D-DFT. The details are given as follows:

###  V-A PDF of $\tilde{\Phi}_{L,i}$

Based on the above section, we can find that $\tilde{\varpi}_{2,i}$ could be
obtained by the one-dimensional search in the interval of
$[-\frac{\pi}{N_{z}},\frac{\pi}{N_{z}}]$. We assume that there are $S_{2,i}$
grids points in the interval $[-\frac{\pi}{N_{z}},\frac{\pi}{N_{z}}]$ and
$s_{2,i}\in\\{1,\cdots,S_{2,i}\\}$ is the optimal point. Therefore, the
optimal solution for the one-dimensional search is
$\tilde{\varpi}_{2,i}=\frac{2\pi s_{2,i}}{N_{z}S_{2,i}}$, and the estimation
of $\sin{\Phi}_{L,i}$ is thus written as

$\displaystyle\sin\hat{\Phi}_{L,i}=\frac{\lambda_{c}q_{n_{i}}}{N_{z}d_{r}}-\frac{\lambda_{c}\tilde{\varpi}_{2,i}}{2\pi
d_{r}}=\frac{\lambda_{c}q_{n_{i}}}{N_{z}d_{r}}-\frac{\lambda_{c}s_{2,i}}{N_{z}d_{r}S_{2,i}}.$
(14)

For notation simplicity, let us define $\hat{Y_{i}}=\sin\hat{\Phi}_{L,i}$ and
$Y_{i}=\sin\Phi_{L,i}$. Then, the estimation of $\Phi_{L,i}$ could be
expressed as

$\displaystyle\hat{\Phi}_{L,i}=\arcsin\hat{Y_{i}}=\arcsin\left(\frac{\lambda_{c}q_{n_{i}}}{N_{z}d_{r}}-\frac{\lambda_{c}s_{2,i}}{N_{z}d_{r}S_{2,i}}\right).$
(15)

According to (14) and the property of the one-dimensional search method, the
value of $Y_{i}$ follows the uniform distribution within the region of
$\left[\hat{Y_{i}}-a_{i},\hat{Y_{i}}+a_{i}\right]$, where
$a_{i}=\frac{\lambda_{c}}{2N_{z}d_{r}S_{2,i}}$, which is given by

$\displaystyle
f_{Y_{i}}(y)=\left\\{\begin{array}[]{rcl}\frac{1}{2a_{i}},&&{\hat{Y_{i}}-a_{i}\leq
y\leq\hat{Y_{i}}+a_{i}}\\\ 0,&&{\rm others}.\end{array}\right.$ (18)

By denoting the estimation error of $Y_{i}$ as $\tilde{Y_{i}}$, we have
$\hat{Y_{i}}=Y_{i}+\tilde{Y_{i}}$. Then, the distribution of $\tilde{Y_{i}}$
is given by

$\displaystyle
f_{\tilde{Y_{i}}}(\tilde{y})=\left\\{\begin{array}[]{rcl}\frac{1}{2a_{i}},&&{-a_{i}\leq\tilde{y}\leq
a_{i}}\\\ 0,&&{\rm others.}\end{array}\right.$ (21)

Since $\Phi_{L,i}=\arcsin Y_{i}$, the cumulative density function (CDF) of
$\Phi_{L,i}$ is derived as

$\displaystyle
F_{\Phi_{L,i}}(\phi_{L,i})=\textrm{Pr}(\Phi_{L,i}\leq\phi_{L,i})=\textrm{Pr}(\arcsin
Y_{i}\leq\phi_{L,i})=\textrm{Pr}(Y_{i}\leq\sin\phi_{L,i}).$ (22)

By assuming that $\Phi_{L,i}\in(-\frac{\pi}{2},\frac{\pi}{2})$, the PDF of
$\Phi_{L,i}$ could be derived as

$\displaystyle f_{\Phi_{L,i}}(\phi_{L,i})$ $\displaystyle=\frac{\partial
F_{\Phi_{L,i}}(\phi_{L,i})}{\partial\phi_{L,i}}=\cos\phi_{L,i}f_{Y_{i}}(\sin\phi_{L,i})$
$\displaystyle=\left\\{\begin{array}[]{rcl}\frac{\cos\phi_{L,i}}{2a_{i}},&&{\arcsin(\hat{Y_{i}}-a_{i})\leq\phi_{L,i}\leq\arcsin(\hat{Y_{i}}+a_{i})}\\\
0,&&{\rm others.}\end{array}\right.$ (25)

As we have $\hat{\Phi}_{L,i}=\Phi_{L,i}+\tilde{\Phi}_{L,i}$, the CDF of the
estimation error $\tilde{\Phi}_{L,i}$ is calculated as

$\displaystyle F_{\tilde{\Phi}_{L,i}}\left(\tilde{\phi}_{L,i}\right)$
$\displaystyle=\textrm{Pr}\left(\tilde{\Phi}_{L,i}\leq\tilde{\phi}_{L,i}\right)=\textrm{Pr}\left(\hat{\Phi}_{L,i}-\Phi_{L,i}\leq\tilde{\phi}_{L,i}\right)$
$\displaystyle=\textrm{Pr}\left(\Phi_{L,i}\geq\hat{\Phi}_{L,i}-\tilde{\phi}_{L,i}\right)=1-\textrm{Pr}\left(\Phi_{L,i}\leq\hat{\Phi}_{L,i}-\tilde{\phi}_{L,i}\right).$
(26)

Define $a_{1,i}=\arcsin\left(\hat{Y_{i}}+a_{i}\right)$ and
$a_{2,i}=\arcsin\left(\hat{Y_{i}}-a_{i}\right)$. Based on (V-A), the PDF of
$\tilde{\Phi}_{L,i}$ is written as

$\displaystyle f_{\tilde{\Phi}_{L,i}}\left(\tilde{\phi}_{L,i}\right)$
$\displaystyle=\frac{\partial
F_{\tilde{\Phi}_{L,i}}\left(\tilde{\phi}_{L,i}\right)}{\partial\tilde{\phi}_{L,i}}=f_{{\Phi}_{L,i}}\left(\hat{\Phi}_{L,i}-\tilde{\phi}_{L,i}\right)$
$\displaystyle=\left\\{\begin{array}[]{rcl}\frac{\cos\left(\hat{\Phi}_{L,i}-\tilde{\phi}_{L,i}\right)}{2a_{i}},&&{\hat{\Phi}_{L,i}-a_{1,i}\leq\tilde{\phi}_{L,i}\leq\hat{\Phi}_{L,i}-a_{2,i}}\\\
0,&&{\rm others.}\end{array}\right.$ (29)

Moreover, as the estimation techniques are relatively mature, it is assumed
that the estimation error is very small. Therefore, we have
$\sin\left(\tilde{\phi}_{L,i}\right)\approx\tilde{\phi}_{L,i}$ and
$\cos\left(\tilde{\phi}_{L,i}\right)\approx 1$. Consequently, we have the
following approximation:

$\displaystyle\cos\left(\hat{\Phi}_{L,i}-\tilde{\phi}_{L,i}\right)=\cos\hat{\Phi}_{L,i}\cos\tilde{\phi}_{L,i}+\sin\hat{\Phi}_{L,i}\sin\tilde{\phi}_{L,i}\approx\cos\hat{\Phi}_{L,i}+\tilde{\phi}_{L,i}\sin\hat{\Phi}_{L,i}.$
(30)

Then, the PDF of $\tilde{\Phi}_{L,i}$ is approximated as

$\displaystyle
f_{\tilde{\Phi}_{L,i}}\left(\tilde{\phi}_{L,i}\right)\approx\left\\{\begin{array}[]{rcl}\frac{\cos\hat{\Phi}_{L,i}+\tilde{\phi}_{L,i}\sin\hat{\Phi}_{L,i}}{2a_{i}},&&{\hat{\Phi}_{L,i}-a_{1,i}\leq\tilde{\phi}_{L,i}\leq\hat{\Phi}_{L,i}-a_{2,i}}\\\
0,&&{\rm others.}\end{array}\right.$ (33)

###  V-B PDF of $\tilde{\Theta}_{L,i}$

In this subsection, we derive the PDF of the estimation error
$\tilde{\Theta}_{L,i}$. As the derivations are complicated, we summarize the
main procedure in Algorithm 2.

Algorithm 2 Algorithm of deriving the PDF of $\tilde{\Phi}_{L,i}$

1: Derive the PDF of $\cos\Phi_{L,i}$ by using the PDF of $\tilde{Y_{i}}$ in
(21);

2: Derive the PDF of $\cos\Theta_{L,i}$ for two cases by using the PDF of
$\cos\Phi_{L,i}$ in (44) and the PDF of $\cos\Phi_{L,i}\cos\Theta_{L,i}$ in
(48);

3: Derive the PDF of $\tilde{\Theta}_{L,i}$ based on the two cases of the PDF
of $\cos{\Theta}_{L,i}$ in (63) and (68).

####  V-B1 PDF of $\cos\Phi_{L,i}$

First of all, we need to derive the PDF of $\cos\Phi_{L,i}$, so that the PDF
of $\cos\Theta_{L,i}$ could be calculated.

Let ${X_{i}}=\cos\Phi_{L,i}$, which can be expressed as a function of
$\tilde{Y_{i}}$ as follows:

$\displaystyle{X_{i}}=\cos\Phi_{L,i}=\sqrt{1-\sin^{2}\Phi_{L,i}}=\sqrt{1-Y_{i}^{2}}=\sqrt{1-(\hat{Y_{i}}-\tilde{Y_{i}})^{2}}.$
(34)

By defining the estimation of ${X_{i}}$ as
$\hat{{X_{i}}}=\cos\hat{\Phi}_{L,i}={X_{i}}+\tilde{{X_{i}}}$, the estimation
error $\tilde{{X_{i}}}$ could be calculated as:

$\displaystyle\tilde{{X_{i}}}=\hat{{X_{i}}}-\sqrt{1-(\hat{Y_{i}}-\tilde{Y_{i}})^{2}}.$
(35)

However, the expression (35) is complicated and thus challenging to derive a
compact form of the PDF of $\tilde{{X_{i}}}$. Fortunately, since the value of
$\tilde{Y_{i}}$ is relatively small, we can approximate $\tilde{{X_{i}}}$ in
(35) by using the Taylor expansion, which is given by

$\displaystyle\tilde{{X_{i}}}=\sqrt{1-\hat{Y_{i}}^{2}}-\sqrt{1-(\hat{Y_{i}}-\tilde{Y_{i}})^{2}}\approx\sqrt{1-\hat{Y_{i}}^{2}}-\bigg{(}(1-\hat{Y_{i}}^{2})^{\frac{1}{2}}+\frac{\tilde{Y_{i}}\cdot\hat{Y_{i}}}{(1-\hat{Y_{i}}^{2})^{\frac{1}{2}}}\bigg{)}=-\frac{\hat{Y_{i}}}{\hat{{X_{i}}}}\tilde{Y_{i}}.$
(36)

Utilizing (36), the CDF of $\tilde{{X_{i}}}$ could be calculated as

$\displaystyle
F_{\tilde{{X_{i}}}}(\tilde{x_{i}})=\textrm{Pr}(\tilde{{X_{i}}}\leq\tilde{{x_{i}}})\approx\textrm{Pr}\bigg{(}-\frac{\hat{Y_{i}}}{\hat{{X_{i}}}}\tilde{Y_{i}}\leq\tilde{{x_{i}}}\bigg{)}=\textrm{Pr}\bigg{(}\tilde{Y_{i}}\geq-\frac{\hat{{X_{i}}}}{\hat{Y_{i}}}\tilde{{x_{i}}}\bigg{)}=1-\textrm{Pr}\bigg{(}\tilde{Y_{i}}\leq-\frac{\hat{{X_{i}}}}{\hat{Y_{i}}}\tilde{{x_{i}}}\bigg{)}.$
(37)

Then, by using (37), the PDF of $\tilde{{X_{i}}}$ could be calculated as

$\displaystyle
f_{\tilde{{X_{i}}}}(\tilde{{x_{i}}})=-\bigg{(}-\frac{\hat{{X_{i}}}}{\hat{Y_{i}}}\bigg{)}f_{\tilde{Y_{i}}}\bigg{(}-\frac{\hat{{X_{i}}}}{\hat{Y_{i}}}\tilde{{x_{i}}}\bigg{)}=\left\\{\begin{array}[]{rcl}\frac{\hat{{X_{i}}}}{2a_{i}\hat{Y_{i}}},&&{-\frac{\hat{Y_{i}}}{\hat{{X_{i}}}}a_{i}\leq\tilde{{x_{i}}}\leq\frac{\hat{Y_{i}}}{\hat{{X_{i}}}}a_{i}}\\\
0,&&{\rm others.}\end{array}\right.$ (40)

Furthermore, by using $\hat{{X_{i}}}={X_{i}}+\tilde{{X_{i}}}$, the CDF of
${X_{i}}$ can be calculated as

$\displaystyle
F_{X_{i}}({x_{i}})=\textrm{Pr}({X_{i}}\leq{x_{i}})=\textrm{Pr}(\hat{{X_{i}}}-\tilde{{X_{i}}}\leq{x_{i}})=\textrm{Pr}(\tilde{{X_{i}}}\geq\hat{{X_{i}}}-{x_{i}})=1-\textrm{Pr}(\tilde{{X_{i}}}\leq\hat{{X_{i}}}-{x_{i}}).$
(41)

By using (40) and (41), the PDF of ${X_{i}}$ could be written as

$\displaystyle f_{X_{i}}({x_{i}})=\frac{\partial
F_{X_{i}}({x_{i}})}{\partial{x_{i}}}=f_{\tilde{{X_{i}}}}(\hat{{X_{i}}}-{x_{i}})=\left\\{\begin{array}[]{rcl}\frac{\hat{{X_{i}}}}{2a_{i}\hat{Y_{i}}},&&{\hat{{X_{i}}}-\frac{\hat{Y_{i}}}{\hat{{X_{i}}}}a_{i}\leq{x_{i}}\leq\hat{{X_{i}}}-\frac{\hat{Y_{i}}}{\hat{{X_{i}}}}a_{i}}\\\
0,&&{\rm others.}\end{array}\right.$ (44)

####  V-B2 PDF of $\cos\Theta_{L,i}$

By using the PDF of $\cos\Phi_{L,i}$ and $\cos\Phi_{L,i}\cos\Theta_{L,i}$, we
can derive the PDF of $\cos\Theta_{L,i}$ as follows.

Firstly, from the above section, we know that $\tilde{\varpi}_{1,i}$ could be
obtained by using the one-dimensional search in the interval of
$[-\frac{\pi}{N_{y}},\frac{\pi}{N_{y}}]$. Similarly, we assume that there are
$S_{1}$ grids points in the interval $[-\frac{\pi}{N_{y}},\frac{\pi}{N_{y}}]$
and $s_{1,i}\in\\{1,\cdots,S_{1,i}\\}$ is the optimal point. Therefore, the
optimal solution for the one-dimensional search is
$\tilde{\varpi}_{1,i}=\frac{2\pi s_{1,i}}{N_{y}S_{1,i}}$, and the estimated
$\cos\Phi_{L,i}\cos\Theta_{L,i}$ is given by

$\displaystyle\hat{Z}=\cos\hat{\Theta}_{L,i}\cos\hat{\Phi}_{L,i}$
$\displaystyle=\frac{\lambda_{c}b_{n_{i}}}{N_{y}d_{1}}-\frac{\lambda_{c}\tilde{\varpi}_{1,i}}{2\pi
d_{r}}=\frac{\lambda_{c}b_{n_{i}}}{N_{y}d_{r}}-\frac{\lambda_{c}s_{1,i}}{N_{y}d_{r}S_{1,i}}.$
(45)

By using (45) and the nature of the one-dimensional search method, the real
value of ${Z_{i}}=\cos{\Theta}_{L,i}\cos{\Phi}_{L,i}$ follows the uniform
distribution within the region of
$\left[\hat{{Z_{i}}}-{b_{i}},\hat{{Z_{i}}}+{b_{i}}\right]$, where
${b_{i}}=\frac{\lambda_{c}}{2N_{y}d_{1}S_{1,i}}$. The PDF of ${Z_{i}}$ is thus
given by

$\displaystyle
f_{{Z_{i}}}(z_{i})=\left\\{\begin{array}[]{rcl}\frac{1}{2{b_{i}}},&&{\hat{{Z_{i}}}-{b_{i}}\leq
z_{i}\leq\hat{{Z_{i}}}+{b_{i}}}\\\ 0,&&{\rm others.}\end{array}\right.$ (48)

By denoting the estimation error of ${Z_{i}}$ as $\tilde{{Z_{i}}}$, we have
$\hat{{Z_{i}}}={Z_{i}}+\tilde{{Z_{i}}}$. Then, the distribution of
$\tilde{{Z_{i}}}$ is given by

$\displaystyle
f_{\tilde{{Z_{i}}}}(\tilde{z_{i}})=\left\\{\begin{array}[]{rcl}\frac{1}{2{b_{i}}},&&{-{b_{i}}\leq\tilde{z_{i}}\leq{b_{i}}}\\\
0,&&{\rm others.}\end{array}\right.$ (51)

Next, for simplicity, let us denote ${U_{i}}=\cos\Theta_{L,i}$. Then, by
utilizing the definition of ${Z_{i}}$ below (45) and ${X_{i}}$ above (34), we
have ${Z_{i}}={U_{i}}{X_{i}}$. By combining the PDF of ${X_{i}}$ in (44) and
the PDF of ${Z_{i}}$ in (48), we could derive the PDF of ${U_{i}}$ as follows

$\displaystyle
f_{{U_{i}}}(u_{i})=\int_{\hat{{X_{i}}}-\frac{\hat{Y_{i}}}{\hat{{X_{i}}}}a_{i}}^{\hat{{X_{i}}}+\frac{\hat{Y_{i}}}{\hat{{X_{i}}}}a_{i}}{x}f_{X_{i}}(x)f_{Z_{i}}(u_{i}x)dx.$
(52)

According to (48), it is observed that $f_{Z_{i}}(u_{i}x)$ is non-zero when
$\hat{{Z_{i}}}-{b_{i}}\leq u_{i}x\leq\hat{{Z_{i}}}+{b_{i}}$, which determines
the PDF of ${U_{i}}$. Therefore, we need to discuss the different conditions
according to the non-zero intervals of $f_{Z_{i}}(u_{i}x)$ and $f_{X_{i}}(x)$
in the following. For notation brevity, we denote
${\alpha_{1,i}}=\hat{{X_{i}}}-\frac{\hat{Y_{i}}}{\hat{{X_{i}}}}a_{i}$,
${\alpha_{2,i}}=\hat{{X_{i}}}+\frac{\hat{Y_{i}}}{\hat{{X_{i}}}}a_{i}$,
${\beta_{1,i}}=\hat{{Z_{i}}}-{b_{i}}$ and
${\beta_{2,i}}=\hat{{Z_{i}}}+{b_{i}}$.

Condition 1: If
${\alpha_{1,i}}<\frac{{\beta_{1,i}}}{u_{i}}\leq{\alpha_{2,i}}<\frac{{\beta_{2,i}}}{u_{i}}$,
the integral interval of $x$ in (52) can be recast as
$\left[\frac{{\beta_{1,i}}}{u_{i}},{\alpha_{2,i}}\right]$, thereby yielding
the PDF of ${U_{i}}$ as

$\displaystyle
f_{{U_{i}}}(u_{i})=\int_{\frac{{\beta_{1,i}}}{u_{i}}}^{{\alpha_{2,i}}}\frac{1}{2b_{i}}\cdot\frac{\hat{{X_{i}}}}{2a_{i}\hat{Y_{i}}}\cdot
xdx=\frac{\hat{{X_{i}}}}{4a_{i}{b_{i}}\hat{Y_{i}}}\int_{\frac{{\beta_{1,i}}}{u_{i}}}^{{\alpha_{2,i}}}xdx=\frac{\hat{{X_{i}}}}{8a_{i}{b_{i}}\hat{Y_{i}}}\left({\alpha_{2,i}}^{2}-\left(\frac{{\beta_{1,i}}}{u_{i}}\right)^{2}\right).$
(53)

Furthermore, the interval of $u_{i}$ is given by

$\displaystyle\left[\frac{{\beta_{1,i}}}{{\alpha_{2,i}}},\frac{{\beta_{1,i}}}{{\alpha_{1,i}}}\right)\cap\left(-\infty,\frac{{\beta_{2,i}}}{{\alpha_{2,i}}}\right).$
(54)

Based on (54), it is necessary to compare
$\frac{{\beta_{1,i}}}{{\alpha_{1,i}}}$ with
$\frac{{\beta_{2,i}}}{{\alpha_{2,i}}}$, so that the interval of $u_{i}$ can be
further determined. If
$\frac{{\beta_{2,i}}}{{\alpha_{2,i}}}>\frac{{\beta_{1,i}}}{{\alpha_{1,i}}}$
holds, the interval can be rewritten as
$\left[\frac{{\beta_{1,i}}}{{\alpha_{2,i}}},\frac{{\beta_{1,i}}}{{\alpha_{1,i}}}\right)$.
Otherwise, the interval is
$\left[\frac{{\beta_{1,i}}}{{\alpha_{2,i}}},\frac{{\beta_{2,i}}}{{\alpha_{2,i}}}\right)$.

Condition 2: If
$\frac{{\beta_{1,i}}}{u_{i}}\leq{\alpha_{1,i}}<\frac{{\beta_{2,i}}}{u_{i}}\leq{\alpha_{2,i}}$,
the integral interval of $x$ in (52) can be recast as
$\left[{\alpha_{1,i}},\frac{{\beta_{2,i}}}{u_{i}}\right]$, thus the PDF of
${U_{i}}$ is given by

$\displaystyle
f_{{U_{i}}}(u_{i})=\int_{{\alpha_{1,i}}}^{\frac{{\beta_{2,i}}}{u_{i}}}\frac{1}{2b_{i}}\cdot\frac{\hat{{X_{i}}}}{2a_{i}\hat{Y_{i}}}\cdot{x}d{x}=\frac{\hat{{X_{i}}}}{4a_{i}{b_{i}}\hat{Y_{i}}}\int_{{\alpha_{1,i}}}^{\frac{{\beta_{2,i}}}{u_{i}}}{x}d{x}=\frac{\hat{{X_{i}}}}{8a_{i}{b_{i}}\hat{Y_{i}}}\left(\left(\frac{{\beta_{2,i}}}{u_{i}}\right)^{2}-{\alpha_{1,i}}^{2}\right).$
(55)

The interval of $u_{i}$ is given by

$\displaystyle\left[\frac{{\beta_{2,i}}}{{\alpha_{2,i}}},\frac{{\beta_{2,i}}}{{\alpha_{1,i}}}\right)\cap\left[\frac{{\beta_{1,i}}}{{\alpha_{1,i}}},+\infty\right).$
(56)

As a result, if
$\frac{{\beta_{2,i}}}{{\alpha_{2,i}}}>\frac{{\beta_{1,i}}}{{\alpha_{1,i}}}$
holds, the interval can be further recast as
$\left[\frac{{\beta_{2,i}}}{{\alpha_{2,i}}},\frac{{\beta_{2,i}}}{{\alpha_{1,i}}}\right)$.
Otherwise, the interval can be derived as
$\left[\frac{{\beta_{1,i}}}{{\alpha_{1,i}}},\frac{{\beta_{2,i}}}{{\alpha_{1,i}}}\right)$.

Condition 3: If
$\frac{{\beta_{1,i}}}{u_{i}}\leq{\alpha_{1,i}}<{\alpha_{2,i}}<\frac{{\beta_{2,i}}}{u_{i}}$,
the integral interval of $x$ in (52) can be derived as
$\left[{\alpha_{1,i}},{\alpha_{2,i}}\right]$. Thus, the PDF of ${U_{i}}$ is

$\displaystyle f_{{U_{i}}}(u_{i})$
$\displaystyle=\int_{{\alpha_{1,i}}}^{{\alpha_{2,i}}}\frac{1}{2{b_{i}}}\cdot\frac{\hat{{X_{i}}}}{2a_{i}\hat{Y_{i}}}\cdot
xdx=\frac{\hat{{X_{i}}}}{4a_{i}{b_{i}}\hat{Y_{i}}}\int_{{\alpha_{1,i}}}^{{\alpha_{2,i}}}xdx=\frac{\hat{{X_{i}}}}{8a_{i}{b_{i}}\hat{Y_{i}}}\left({\alpha_{2,i}}^{2}-{\alpha_{1,i}}^{2}\right)$
$\displaystyle=\frac{\hat{{X_{i}}}}{8a_{i}{b_{i}}\hat{Y_{i}}}\left(\left(\hat{{X_{i}}}+\frac{\hat{Y_{i}}}{\hat{{X_{i}}}}a_{i}\right)^{2}-\left(\hat{{X_{i}}}-\frac{\hat{Y_{i}}}{\hat{{X_{i}}}}a_{i}\right)^{2}\right)=\frac{\hat{{X_{i}}}}{2{b_{i}}}.$
(57)

The interval of $u_{i}$ is accordingly given by
$\left[\frac{{\beta_{1,i}}}{{\alpha_{1,i}}},\frac{{\beta_{2,i}}}{{\alpha_{2,i}}}\right)$.

Condition 4: If
${\alpha_{1,i}}<\frac{{\beta_{1,i}}}{u_{i}}<\frac{{\beta_{2,i}}}{u_{i}}\leq{\alpha_{2,i}}$,
the integral interval of $x$ in (52) can be derived as
$\left[\frac{{\beta_{1,i}}}{u_{i}},\frac{{\beta_{2,i}}}{{U_{i}}}\right]$.
Thus, the PDF of ${U_{i}}$ is

$\displaystyle
f_{{U_{i}}}(u_{i})=\int_{\frac{{\beta_{1,i}}}{u_{i}}}^{\frac{{\beta_{2,i}}}{u_{i}}}\frac{\hat{{X_{i}}}}{4a_{i}{b_{i}}\hat{Y_{i}}}\cdot
xdx=\frac{\hat{{X_{i}}}}{4a_{i}{b_{i}}\hat{Y_{i}}}\int_{\frac{{\beta_{1,i}}}{u_{i}}}^{\frac{{\beta_{2,i}}}{u_{i}}}xdx=\frac{\hat{{X_{i}}}}{8a_{i}{b_{i}}\hat{Y_{i}}}\left(\left(\frac{{\beta_{2,i}}}{u_{i}}\right)^{2}-\left(\frac{{\beta_{1,i}}}{u_{i}}\right)^{2}\right)=\frac{\hat{{X_{i}}}\hat{{Z_{i}}}}{2a_{i}\hat{Y_{i}}u_{i}^{2}}.$
(58)

Additionally, after some mathematical manipulations, we can derive the
interval of $u_{i}$ as
$\left[\frac{{\beta_{2,i}}}{{\alpha_{2,i}}},\frac{{\beta_{1,i}}}{{\alpha_{1,i}}}\right)$.

Based on the above discussions, by comparing
$\frac{{\beta_{2,i}}}{{\alpha_{2,i}}}$ with
$\frac{{\beta_{1,i}}}{{\alpha_{1,i}}}$, the PDF of ${U_{i}}$ can be simplified
as the following two cases:

Case 1: If
$\frac{{\beta_{2,i}}}{{\alpha_{2,i}}}>\frac{{\beta_{1,i}}}{{\alpha_{1,i}}}$
holds, the intervals of $u$ in Condition 1 and Condition 2 are given by
$\left[\frac{{\beta_{1,i}}}{{\alpha_{2,i}}},\frac{{\beta_{1,i}}}{{\alpha_{1,i}}}\right)$
and
$\left[\frac{{\beta_{2,i}}}{{\alpha_{2,i}}},\frac{{\beta_{2,i}}}{{\alpha_{1,i}}}\right)$.
Additionally, Condition 3 is valid, whereas Condition 4 is invalid. Therefore,
the PDF of ${U_{i}}$ is written as

$\displaystyle
f_{{U_{i}}}(u_{i})=\left\\{\begin{array}[]{rcl}\frac{\hat{{X_{i}}}}{8a_{i}b_{i}\hat{Y_{i}}}\left({\alpha_{2,i}}^{2}-\left(\frac{{\beta_{1,i}}}{u_{i}}\right)^{2}\right),&&{\frac{{\beta_{1,i}}}{{\alpha_{2,i}}}\leq
u_{i}<\frac{{\beta_{1,i}}}{{\alpha_{1,i}}}}\\\
\frac{\hat{{X_{i}}}}{2b_{i}},&&{\frac{{\beta_{1,i}}}{{\alpha_{1,i}}}\leq
u_{i}<\frac{{\beta_{2,i}}}{{\alpha_{2,i}}}}\\\
\frac{\hat{{X_{i}}}}{8a_{i}b_{i}\hat{Y_{i}}}\left(\left(\frac{{\beta_{2,i}}}{u_{i}}\right)^{2}-{\alpha_{1,i}}^{2}\right),&&{\frac{{\beta_{2,i}}}{{\alpha_{2,i}}}\leq
u_{i}\leq\frac{{\beta_{2,i}}}{{\alpha_{1,i}}}}\\\ 0,&&{\rm
others.}\end{array}\right.$ (63)

Case 2: If
$\frac{{\beta_{2,i}}}{{\alpha_{2,i}}}<\frac{{\beta_{1,i}}}{{\alpha_{1,i}}}$
holds, the intervals of $u_{i}$ in Condition 1 and Condition 2 are given by
$\left[\frac{{\beta_{1,i}}}{{\alpha_{2,i}}},\frac{{\beta_{2,i}}}{{\alpha_{2,i}}}\right)$
and
$\left[\frac{{\beta_{1,i}}}{{\alpha_{1,i}}},\frac{{\beta_{2,i}}}{{\alpha_{1,i}}}\right)$,
respectively. Moreover, Condition 4 is valid, while Condition 3 is invalid.
Accordingly, the PDF of ${U_{i}}$ can be derived as

$\displaystyle
f_{{U_{i}}}(u_{i})=\left\\{\begin{array}[]{rcl}\frac{\hat{{X_{i}}}}{8a_{i}b_{i}\hat{Y_{i}}}\left({\alpha_{2,i}}^{2}-\left(\frac{{\beta_{1,i}}}{u_{i}}\right)^{2}\right),&&{\frac{{\beta_{1,i}}}{{\alpha_{2,i}}}\leq
u_{i}<\frac{{\beta_{2,i}}}{{\alpha_{2,i}}}}\\\
\frac{\hat{{X_{i}}}\hat{{Z_{i}}}}{2a_{i}\hat{Y_{i}}u_{i}^{2}},&&{\frac{{\beta_{2,i}}}{{\alpha_{2,i}}}\leq
u_{i}<\frac{{\beta_{1,i}}}{{\alpha_{1,i}}}}\\\
\frac{\hat{{X_{i}}}}{8a_{i}b_{i}\hat{Y_{i}}}\left(\left(\frac{{\beta_{2,i}}}{u_{i}}\right)^{2}-{\alpha_{1,i}}^{2}\right),&&{\frac{{\beta_{1,i}}}{{\alpha_{1,i}}}\leq
u_{i}\leq\frac{{\beta_{2,i}}}{{\alpha_{1,i}}}}\\\ 0,&&{\rm
others.}\end{array}\right.$ (68)

####  V-B3 PDF of $\Theta_{L,i}$

By using the PDF of $\cos\Theta_{L,i}$, the PDF of $\Theta_{L,i}$ can be
derived as follows.

First of all, the CDF of $\Theta_{L,i}$ can be derived as follows

$\displaystyle
F_{\Theta_{L,i}}(\theta_{L,i})=\textrm{Pr}(\Theta_{L,i}\leq\theta_{L,i})=\textrm{Pr}(\arccos{U_{i}}\leq\theta_{L,i})=1-\textrm{Pr}({U_{i}}\leq\cos\theta_{L,i}).$
(69)

Then, the PDF of $\Theta_{L,i}$ is obtained as follows

$\displaystyle f_{\Theta_{L,i}}(\theta_{L,i})=\frac{\partial
F_{\Theta_{L,i}}(\theta_{L,i})}{\partial\theta_{L,i}}=\sin\theta_{L,i}f_{U_{i}}(\cos\theta_{L,i}).$
(70)

Furthermore, we consider the indoor positioning system in this paper, where
the RISs are supposed to be mounted on the wall. Hence we have
$\Theta_{L,i}\in(0,\pi)$. Thus, $\Theta_{L,i}$ decreases monotonically with
${U_{i}}$. According to the PDF of ${U_{i}}$ in the aforementioned two cases,
we can derive the PDF of $\Theta_{L,i}$ in the following.

Case 1: When
$\frac{{\beta_{2,i}}}{{\alpha_{2,i}}}>\frac{{\beta_{1,i}}}{{\alpha_{1,i}}}$,
according to (63), we can derive the PDF of $\Theta_{L,i}$, which is given by

$\displaystyle
f_{\Theta_{L,i}}(\theta_{L,i})=\left\\{\begin{array}[]{rcl}\frac{\hat{{X_{i}}}\sin\theta_{L,i}}{8a_{i}b_{i}\hat{Y_{i}}}\left[\left(\frac{{\beta_{2,i}}}{\cos\theta_{L,i}}\right)^{2}-{\alpha_{1,i}}^{2}\right],&&{\arccos\frac{{\beta_{2,i}}}{{\alpha_{1,i}}}\leq\theta_{L,i}\leq\arccos\frac{{\beta_{2,i}}}{{\alpha_{2,i}}}}\\\
\frac{\hat{{X_{i}}}\sin\theta_{L,i}}{2b_{i}},&&{\arccos\frac{{\beta_{2,i}}}{{\alpha_{2,i}}}<\theta_{L,i}\leq\arccos\frac{{\beta_{1,i}}}{{\alpha_{1,i}}}}\\\
\frac{\hat{{X_{i}}}\sin\theta_{L,i}}{8a_{i}b_{i}\hat{Y_{i}}}\left[{\alpha_{2,i}}^{2}-(\frac{{\beta_{1,i}}}{\cos\theta_{L,i}})^{2}\right],&&{\arccos\frac{{\beta_{1,i}}}{{\alpha_{1,i}}}<\theta_{L,i}\leq\arccos\frac{{\beta_{1,i}}}{{\alpha_{2,i}}}}\\\
0,&&{\rm others.}\end{array}\right.$ (75)

Case 2: When
$\frac{{\beta_{2,i}}}{{\alpha_{2,i}}}<\frac{{\beta_{1,i}}}{{\alpha_{1,i}}}$,
we can derive the PDF of $\Theta_{L,i}$ based on (68), which is given by

$\displaystyle
f_{\Theta_{L,i}}(\theta_{L,i})=\left\\{\begin{array}[]{rcl}\frac{\hat{{X_{i}}}\sin\theta_{L,i}}{8a_{i}b_{i}\hat{Y_{i}}}\left[\left(\frac{{\beta_{2,i}}}{\cos\theta_{L,i}}\right)^{2}-{\alpha_{1,i}}^{2}\right],&&{\arccos\frac{{\beta_{2,i}}}{{\alpha_{1,i}}}\leq\theta_{L,i}\leq\arccos\frac{{\beta_{1,i}}}{{\alpha_{1,i}}}}\\\
\frac{\hat{{X_{i}}}\hat{{Z_{i}}}\sin\theta_{L,i}}{2a_{i}\hat{Y_{i}}(\cos\theta_{L,i})^{2}},&&{\arccos\frac{{\beta_{1,i}}}{{\alpha_{1,i}}}\leq\theta_{L,i}<\arccos\frac{{\beta_{2,i}}}{{\alpha_{2,i}}}}\\\
\frac{\hat{{X_{i}}}\sin\theta_{L,i}}{8a_{i}b_{i}\hat{Y_{i}}}\left[{\alpha_{2,i}}^{2}-(\frac{{\beta_{1,i}}}{\cos\theta_{L,i}})^{2}\right],&&{\arccos\frac{{\beta_{2,i}}}{{\alpha_{2,i}}}\leq\theta_{L,i}<\arccos\frac{{\beta_{1,i}}}{{\alpha_{2,i}}}}\\\
0,&&{\rm others.}\end{array}\right.$ (80)

####  V-B4 PDF of $\tilde{\Theta}_{L,i}$

By using the CDF and PDF of $\Theta_{L,i}$ in (69), (75) and (80), we can
calculate the CDF and PDF of $\tilde{\Theta}_{L,i}$ as follows.

Firstly, based on $\hat{\Theta}_{L,i}={\Theta}_{L,i}+\tilde{\Theta}_{L,i}$,
the CDF of $\tilde{\Theta}_{L,i}$ can be derived as follows

$\displaystyle F_{\tilde{\Theta}_{L,i}}(\tilde{\theta}_{L,i})$
$\displaystyle=\textrm{Pr}(\tilde{\Theta}_{L,i}\leq\tilde{\theta}_{L,i})=\textrm{Pr}(\hat{\Theta}_{L,i}-\Theta_{L,i}\leq\tilde{\theta}_{L,i})$
$\displaystyle=\textrm{Pr}(\Theta_{L,i}\geq\hat{\Theta}_{L,i}-\tilde{\theta}_{L,i})=1-\textrm{Pr}(\Theta_{L,i}\leq\hat{\Theta}_{L,i}-\tilde{\theta}_{L,i}).$
(81)

Then, based on the above two cases of $f_{\Theta_{L,i}}(\theta_{L,i})$ in (75)
and (80), the PDF of $\tilde{\Theta}_{L,i}$ can be derived accordingly by
using (V-B4).

Case 1: When
$\frac{{\beta_{2,i}}}{{\alpha_{2,i}}}>\frac{{\beta_{1,i}}}{{\alpha_{1,i}}}$,
by using (75), the PDF of $\tilde{\Theta}_{L,i}$ is calculated as

$\displaystyle f_{\tilde{\Theta}_{L,i}}(\tilde{\theta}_{L,i})=\frac{\partial
F_{\tilde{\Theta}_{L,i}}(\tilde{\theta}_{L,i})}{\partial\tilde{\theta}_{L,i}}=f_{\Theta_{L,i}}(\hat{\Theta}_{L,i}-\tilde{\theta}_{L,i})$
$\displaystyle=\left\\{\begin{array}[]{rcl}\frac{\hat{{X_{i}}}\sin(\hat{\Theta}_{L,i}-\tilde{\theta}_{L,i})}{8a_{i}b_{i}\hat{Y_{i}}}\left[{\alpha_{2,i}}^{2}-(\frac{{\beta_{1,i}}}{\cos(\hat{\Theta}_{L,i}-\tilde{\theta}_{L,i})})^{2}\right],&&{\hat{\Theta}_{L,i}-\arccos\frac{{\beta_{1,i}}}{{\alpha_{2,i}}}\leq\tilde{\theta}_{L,i}<\hat{\Theta}_{L,i}-\arccos\frac{{\beta_{1,i}}}{{\alpha_{1,i}}}}\\\
\frac{\hat{{X_{i}}}\sin(\hat{\Theta}_{L,i}-\tilde{\theta}_{L,i})}{2b_{i}},&&{\hat{\Theta}_{L,i}-\arccos\frac{{\beta_{1,i}}}{{\alpha_{1,i}}}\leq\tilde{\theta}_{L,i}<\hat{\Theta}_{L,i}-\arccos\frac{{\beta_{2,i}}}{{\alpha_{2,i}}}}\\\
\frac{\hat{{X_{i}}}\sin(\hat{\Theta}_{L,i}-\tilde{\theta}_{L,i})}{8a_{i}b_{i}\hat{Y_{i}}}\left[\left(\frac{{\beta_{2,i}}}{\cos(\hat{\Theta}_{L,i}-\tilde{\theta}_{L,i})}\right)^{2}-{\alpha_{1,i}}^{2}\right],&&{\hat{\Theta}_{L,i}-\arccos\frac{{\beta_{2,i}}}{{\alpha_{2,i}}}\leq\tilde{\theta}_{L,i}\leq\hat{\Theta}_{L,i}-\arccos\frac{{\beta_{2,i}}}{{\alpha_{1,i}}}}\\\
0,&&{\rm others.}\end{array}\right.$ (86)

Case 2: When
$\frac{{\beta_{2,i}}}{{\alpha_{2,i}}}<\frac{{\beta_{1,i}}}{{\alpha_{1,i}}}$,
we can derive the PDF of $\tilde{\Theta}_{L,i}$ by using (80), which is given
by

$\displaystyle f_{\tilde{\Theta}_{L,i}}(\tilde{\theta}_{L,i})=\frac{\partial
F_{\tilde{\theta}_{L,i}}(\tilde{\theta}_{L,i})}{\partial\tilde{\theta}_{L,i}}=f_{\Theta_{L,i}}(\hat{\Theta}_{L,i}-\tilde{\theta}_{L,i})$
$\displaystyle=\left\\{\begin{array}[]{rcl}\frac{\hat{{X_{i}}}\sin(\hat{\Theta}_{L,i}-\tilde{\theta}_{L,i})}{8a_{i}b_{i}\hat{Y_{i}}}\left({\alpha_{2,i}}^{2}-\left(\frac{{\beta_{1,i}}}{\cos(\hat{\Theta}_{L,i}-\tilde{\theta}_{L,i})}\right)^{2}\right],&&{\hat{\Theta}_{L,i}-\arccos\frac{{\beta_{1,i}}}{{\alpha_{2,i}}}\leq\tilde{\theta}_{L,i}<\hat{\Theta}_{L,i}-\arccos\frac{{\beta_{2,i}}}{{\alpha_{2,i}}}}\\\
\frac{\hat{{X_{i}}}\hat{{Z_{i}}}\sin(\hat{\Theta}_{L,i}-\tilde{\theta}_{L,i})}{2a_{i}\hat{Y_{i}}[\cos(\hat{\Theta}_{L,i}-\tilde{\theta}_{L,i})]^{2}},&&{\hat{\Theta}_{L,i}-\arccos\frac{{\beta_{2,i}}}{{\alpha_{2,i}}}\leq\tilde{\theta}_{L,i}<\hat{\Theta}_{L,i}-\arccos\frac{{\beta_{1,i}}}{{\alpha_{1,i}}}}\\\
\frac{\hat{{X_{i}}}\sin(\hat{\Theta}_{L,i}-\tilde{\theta}_{L,i})}{8a_{i}b_{i}\hat{Y_{i}}}\left[\left(\frac{{\beta_{2,i}}}{\cos(\hat{\Theta}_{L,i}-\tilde{\theta}_{L,i})}\right)^{2}-{\alpha_{1,i}}^{2}\right],&&{\hat{\Theta}_{L,i}-\arccos\frac{{\beta_{1,i}}}{{\alpha_{1,i}}}\leq\tilde{\theta}_{L,i}\leq\hat{\Theta}_{L,i}-\arccos\frac{{\beta_{2,i}}}{{\alpha_{1,i}}}}\\\
0,&&{\rm others.}\end{array}\right.$ (91)

To facilitate the error analysis, we now aim to derive the approximation of
$f_{\tilde{\Theta}_{L,i}}(\tilde{\theta}_{L,i})$ in this paper. As we have
assumed that the estimation error is very small, we have
$\sin\tilde{\theta}_{L,i}\approx\tilde{\theta}_{L,i}$ and
$\cos\tilde{\theta}_{L,i}\approx 1$, leading to

$\displaystyle\sin(\hat{\Theta}_{L,i}-\tilde{\theta}_{L,i})=\sin\hat{\Theta}_{L,i}\cos\tilde{\theta}_{L,i}-\sin\tilde{\theta}_{L,i}\cos\hat{\Theta}_{L,i}\approx\sin\hat{\Theta}_{L,i}-\tilde{\theta}_{L,i}\cos\hat{\Theta}_{L,i},$
$\displaystyle\cos(\hat{\Theta}_{L,i}-\tilde{\theta}_{L,i})=\cos\hat{\Theta}_{L,i}\cos\tilde{\theta}_{L,i}+\sin\hat{\Theta}_{L,i}\sin\tilde{\theta}_{L,i}\approx\cos\hat{\Theta}_{L,i}+\tilde{\theta}_{L,i}\sin\hat{\Theta}_{L,i}.$
(92)

Using the approximations in (V-B4), we can derive the approximation of
$f_{\tilde{\Theta}_{L,i}}(\tilde{\theta}_{L,i})$ according to the above two
cases. Furthermore, by denoting $\sin\hat{\Theta}_{L,i}=\hat{V_{i}}$ ,
$\cos\hat{\Theta}_{L,i}=\hat{{U_{i}}}$,
$B_{1,i}=\hat{\Theta}_{L,i}-\arccos\frac{{\beta_{1,i}}}{{\alpha_{2,i}}}$,
$B_{2,i}=\hat{\Theta}_{L,i}-\arccos\frac{{\beta_{1,i}}}{{\alpha_{1,i}}}$,
$B_{3,i}=\hat{\Theta}_{L,i}-\arccos\frac{{\beta_{2,i}}}{{\alpha_{2,i}}}$,
$B_{4,i}=\hat{\Theta}_{L,i}-\arccos\frac{{\beta_{2,i}}}{{\alpha_{1,i}}}$, the
expression could be further simplified in the following.

Case 1: When
$\frac{{\beta_{2,i}}}{{\alpha_{2,i}}}>\frac{{\beta_{1,i}}}{{\alpha_{1,i}}}$,
based on (V-B4), we can derive the approximation of
$f_{\tilde{\Theta}_{L,i}}(\tilde{\theta}_{L,i})$, which is written as

$\displaystyle
f_{\tilde{\Theta}_{L,i}}(\tilde{\theta}_{L,i})\approx\left\\{\begin{array}[]{rcl}\frac{\hat{{X_{i}}}(\hat{V_{i}}-\tilde{\theta}_{L,i}\hat{{U_{i}}})}{8a_{i}b_{i}\hat{Y_{i}}}\left[{\alpha_{2,i}}^{2}-\left(\frac{{\beta_{1,i}}}{\hat{{U_{i}}}+\tilde{\theta}_{L,i}\hat{V_{i}}}\right)^{2}\right],&&{B_{1,i}\leq\tilde{\theta}_{L,i}<B_{2,i}}\\\
\frac{\hat{{X_{i}}}(\hat{V_{i}}-\tilde{\theta}_{L,i}\hat{{U_{i}}})}{2b_{i}},&&{B_{2,i}\leq\tilde{\theta}_{L,i}<B_{3,i}}\\\
\frac{\hat{{X_{i}}}(\hat{V_{i}}-\tilde{\theta}_{L,i}\hat{{U_{i}}})}{8a_{i}b_{i}\hat{Y_{i}}}\left[\left(\frac{{\beta_{2,i}}}{\hat{{U_{i}}}+\tilde{\theta}_{L,i}\hat{V_{i}}}\right)^{2}-{\alpha_{1,i}}^{2}\right],&&{B_{3,i}\leq\tilde{\theta}_{L,i}\leq
B_{4,i}}\\\ 0,&&{\rm others.}\end{array}\right.$ (97)

Case 2: When
$\frac{{\beta_{2,i}}}{{\alpha_{2,i}}}<\frac{{\beta_{1,i}}}{{\alpha_{1,i}}}$,
as we have (V-B4), we could derive the approximation of
$f_{\tilde{\Theta}_{L,i}}(\tilde{\theta}_{L,i})$, which is written as

$\displaystyle f_{\tilde{\theta}_{L,i}}(\tilde{\theta}_{L,i})$
$\displaystyle\approx\left\\{\begin{array}[]{rcl}\frac{\hat{{X_{i}}}(\hat{V_{i}}-\tilde{\theta}_{L,i}\hat{{U_{i}}})}{8a_{i}b_{i}\hat{Y_{i}}}\left[{\alpha_{2,i}}^{2}-\left(\frac{{\beta_{1,i}}}{\hat{{U_{i}}}+\tilde{\theta}_{L,i}\hat{V_{i}}}\right)^{2}\right],&&{B_{1,i}\leq\tilde{\theta}_{L,i}<B_{3,i}}\\\
\frac{\hat{{X_{i}}}\hat{{Z_{i}}}(\hat{V_{i}}-\tilde{\theta}_{L,i}\hat{{U_{i}}})}{2a\hat{Y_{i}}(\hat{{U_{i}}}+\tilde{\theta}_{L,i}\hat{V_{i}})^{2}},&&{B_{3,i}\leq\tilde{\theta}_{L,i}<B_{2,i}}\\\
\frac{\hat{{X_{i}}}(\hat{V_{i}}-\tilde{\theta}_{L,i}\hat{{U_{i}}})}{8a_{i}b_{i}\hat{Y_{i}}}\left[\left(\frac{{\beta_{2,i}}}{\hat{{U_{i}}}+\tilde{\theta}_{L,i}\hat{V_{i}}}\right)^{2}-{\alpha_{1,i}}^{2}\right],&&{B_{2,i}\leq\tilde{\theta}_{L,i}\leq
B_{4,i}}\\\ 0,&&{\rm others.}\end{array}\right.$ (102)

##  VI Variance of Angle Estimation Error

In this section, we aim to calculate the variance of $\tilde{\Phi}_{L,i}$ and
$\tilde{\Theta}_{L,i}$ by using the PDF in the above section, which will be
used for the 3D position estimation in the next section.

###  VI-A Variance of $\tilde{\Phi}_{L,i}$

In this subsection, we provide the variance expression of
$\tilde{\Phi}_{L,i}$. Based on the PDF of $\tilde{\Phi}_{L,i}$ in (33), the
variance of $\tilde{\Phi}_{L,i}$ can be calculated as

$\displaystyle D(\tilde{\phi}_{L,i})$
$\displaystyle=E(\tilde{\phi}_{L,i}^{2})-(E(\tilde{\phi}_{L,i}))^{2}$
$\displaystyle=\int^{\hat{\Phi}_{L,i}-a_{2,i}}_{\hat{\Phi}_{L,i}-a_{1,i}}\tilde{\phi}^{2}_{L,i}f_{\tilde{\Phi}_{L,i}}(\tilde{\phi}_{L,i})d\tilde{\phi}_{L,i}-\left(\int^{\hat{\Phi}_{L,i}-a_{2,i}}_{\hat{\Phi}_{L,i}-a_{1,i}}\tilde{\phi}_{L,i}f_{\tilde{\Phi}_{L,i}}(\tilde{\phi}_{L,i})d\tilde{\phi}_{L,i}\right)^{2}$
$\displaystyle=\frac{1}{2a_{i}}\left(\frac{\tilde{\phi}^{3}_{L,i}}{3}\cos\hat{\Phi}_{L,i}+\frac{\tilde{\phi}^{4}_{L,i}}{4}\sin\hat{\Phi}_{L,i}\right)\bigg{|}^{\hat{\Phi}_{L,i}-a_{2,i}}_{\hat{\Phi}_{L,i}-a_{1,i}}$
$\displaystyle\quad-\frac{1}{4a_{i}^{2}}\left[\left(\frac{\tilde{\phi}^{2}_{L,i}}{2}\cos\hat{\Phi}_{L,i}+\frac{\tilde{\phi}^{3}_{L,i}}{3}\sin\hat{\Phi}_{L,i}\right)\bigg{|}^{\hat{\Phi}_{L,i}-a_{2,i}}_{\hat{\Phi}_{L,i}-a_{1,i}}\right]^{2},$
(103)

where $f(x)\big{|}^{x_{1}}_{x_{2}}=f(x_{1})-f(x_{2})$ and
$E(\tilde{\phi}_{L,i})$ denotes the expectation of $\tilde{\phi}_{L,i}$.

###  VI-B Variance of $\tilde{\Theta}_{L,i}$

In this subsection, we aim to derive the variance of $\tilde{\Theta}_{L,i}$.
Different from the PDF of $\tilde{\Phi}_{L,i}$, the PDF of
$\tilde{\Theta}_{L,i}$ is more complicated. Therefore, we need to analyze the
variance according to the aforementioned two cases as follows.

Case 1: When
$\frac{{\beta_{2,i}}}{{\alpha_{2,i}}}>\frac{{\beta_{1,i}}}{{\alpha_{1,i}}}$,
based on the PDF of $\tilde{\theta}_{L,i}$ in (97), the variance of
$\tilde{\Theta}_{L,i}$ is derived as

$\displaystyle
D(\tilde{\theta}_{L,i})=\underbrace{\int\tilde{\theta}^{2}_{L,i}f_{\tilde{\Theta}_{L,i}}(\tilde{\theta}_{L,i})d\tilde{\theta}_{L,i}}_{D_{1,i}}-\bigg{(}\underbrace{\int\tilde{\theta}_{L,i}f_{\tilde{\Theta}_{L,i}}(\tilde{\theta}_{L,i})d\tilde{\theta}_{L,i}}_{D_{2,i}}\bigg{)}^{2}.$
(104)

For $D_{1,i}$ in (104), we divide it into three different non-zero intervals
that can be expressed as

$\displaystyle D_{1,i}=D_{11,i}+D_{12,i}+D_{13,i},$ (105)

where $D_{11,i}$, $D_{12,i}$ and $D_{13,i}$ are the integral expressions in
the intervals of $[B_{1,i},B_{2,i})$, $[B_{2,i},B_{3,i})$ and
$[B_{3,i},B_{4,i}]$, respectively. The expressions of $D_{11,i}$, $D_{12,i}$
and $D_{13,i}$ are given in Appendix A.

For $D_{2,i}$ in (104), it is the expectation of $\tilde{\theta}_{L,i}$, which
is denoted by $E(\tilde{\theta}_{L,i})$. It can be divided into three
different non-zero intervals that are given by

$\displaystyle D_{2,i}=D_{21,i}+D_{22,i}+D_{23,i},$ (106)

where $D_{21,i}$, $D_{22,i}$ and $D_{23,i}$ are the integral expressions in
the intervals of $[B_{1,i},B_{2,i})$, $[B_{2,i},B_{3,i})$ and
$[B_{3,i},B_{4,i}]$, respectively. The expressions of $D_{21,i}$, $D_{22,i}$
and $D_{23,i}$ are given in Appendix B.

Case 2: When
$\frac{{\beta_{2,i}}}{{\alpha_{2,i}}}<\frac{{\beta_{1,i}}}{{\alpha_{1,i}}}$,
according to the PDF of $\tilde{\Theta}_{L,i}$ in (102), the variance of
$\tilde{\Theta}_{L,i}$ can be calculated as

$\displaystyle
D^{\prime}(\tilde{\theta}_{L,i})=\underbrace{\int\tilde{\theta}^{2}_{L,i}f_{\tilde{\Theta}_{L,i}}(\tilde{\theta}_{L,i})d\tilde{\theta}_{L,i}}_{D^{\prime}_{1,i}}-\bigg{(}\underbrace{\int\tilde{\theta}_{L,i}f_{\tilde{\Theta}_{L,i}}(\tilde{\theta}_{L,i})d\tilde{\theta}_{L,i}}_{D^{\prime}_{2,i}}\bigg{)}^{2}.$
(107)

For $D^{\prime}_{1,i}$, we divide it into three different non-zero intervals
that are given by

$\displaystyle
D^{\prime}_{1,i}=D^{\prime}_{11,i}+D^{\prime}_{12,i}+D^{\prime}_{13,i},$ (108)

where $D^{\prime}_{11,i}$, $D^{\prime}_{12,i}$ and $D^{\prime}_{13,i}$ are the
integral expressions in the intervals of $[B_{1,i},B_{3,i})$,
$[B_{3,i},B_{2,i})$ and $[B_{2,i},B_{4,i}]$. The expressions of
$D^{\prime}_{11,i}$, $D^{\prime}_{12,i}$ and $D^{\prime}_{13,i}$ are given in
Appendix C.

For $D^{\prime}_{2,i}$ in (107), it is the expectation of
$\tilde{\theta}_{L,i}$, which is denoted by $E(\tilde{\theta}_{L,i})$. It is
also divided into three different non-zero intervals that are given by

$\displaystyle
D^{\prime}_{2,i}=D^{\prime}_{21,i}+D^{\prime}_{22,i}+D^{\prime}_{23,i},$ (109)

where $D^{\prime}_{21,i}$, $D^{\prime}_{22,i}$ and $D^{\prime}_{23,i}$ are the
integral expressions in the intervals of $[B_{1,i},B_{3,i})$,
$[B_{3,i},B_{2,i})$ and $[B_{2,i},B_{4,i}]$. The expressions of
$D^{\prime}_{21,i}$, $D^{\prime}_{22,i}$ and $D^{\prime}_{23,i}$ are given in
Appendix D.

##  VII 3D Position Estimation

Using the estimated AoA in Section IV and the variance of the estimation error
in Section VI, we aim to derive the expression of the estimation of the MU’s
3D position at this section. First, we have the AoAs at the $i$th anchor given
by

$\displaystyle\hat{\Theta}_{L,i}$
$\displaystyle=\Theta_{L,i}+\tilde{\Theta}_{L,i}$
$\displaystyle\hat{\Phi}_{L,i}$ $\displaystyle=\Phi_{L,i}+\tilde{\Phi}_{L,i},$
(110)

where $\hat{\Theta}_{L,i}$ and $\hat{\Phi}_{L,i}$ denote the estimated AoAs at
the $i$th anchor, ${\Theta}_{L,i}$ and ${\Phi}_{L,i}$ denote the true AoAs at
the $i$th anchor, and $\tilde{\Theta}_{L,i}$ and $\tilde{\Phi}_{L,i}$ denote
the estimation error at the $i$th anchor. For the sake of illustration, we
collect all the estimated AoAs in the following vectors:

$\displaystyle\hat{{\bm{\Theta}}}$
$\displaystyle={\bm{\Theta}}+\tilde{\bm{\Theta}},$
$\displaystyle\hat{\bm{\Phi}}$ $\displaystyle=\bm{\Phi}+\tilde{\bm{\Phi}},$
(111)

where

$\displaystyle\hat{{\bm{\Theta}}}$
$\displaystyle=[\hat{\Theta}_{L,1},\cdots,\hat{\Theta}_{L,I}],\quad\hat{\bm{\Phi}}=[\hat{\Phi}_{L,1},\cdots,\hat{\Phi}_{L,I}],$
$\displaystyle{{\bm{\Theta}}}$
$\displaystyle=[{\Theta}_{L,1},\cdots,{\Theta}_{L,I}],\quad{\bm{\Phi}}=[{\Phi}_{L,1},\cdots,{\Phi}_{L,I}],$
$\displaystyle\tilde{{\bm{\Theta}}}$
$\displaystyle=[\tilde{\Theta}_{L,1},\cdots,\tilde{\Theta}_{L,I}],\quad\tilde{\bm{\Phi}}=[\tilde{\Phi}_{L,1},\cdots,\tilde{\Phi}_{L,I}].$
(112)

In the existing works, for tractability, $\tilde{\bm{\Theta}}$ and
$\tilde{\bm{\Phi}}$ are assumed to be the additive complex Gaussian noise with
zero mean. However, according to the angle estimation error analysis in our
previous section, the PDF of the estimation error $\tilde{\bm{\Phi}}$ should
be modeled as (33), while the PDF of the estimation error
$\tilde{\bm{\Theta}}$ should be modeled as (97) or (102). Furthermore, the
covariance matrices can be written as

$\displaystyle{\bf
Q}_{\Theta}=\textrm{diag}[\sigma^{2}_{\Theta_{L,1}},\cdots,\sigma^{2}_{\Theta_{L,I}}],$
$\displaystyle{\bf
Q}_{\Phi}=\textrm{diag}[\sigma^{2}_{\Phi_{L,1}},\cdots,\sigma^{2}_{\Phi_{L,I}}],$
(113)

where $\sigma^{2}_{\Theta_{L,i}}$ and $\sigma^{2}_{\Phi_{L,i}}$ denote the
variance of $\tilde{\Theta}_{L,i}$ and $\tilde{\Phi}_{i}$, respectively.
$\sigma^{2}_{\Phi_{L,i}}$ can be calculated according to (VI-A), and
$\sigma^{2}_{\Theta_{L,i}}$ can be calculated according to (104) or (107).

Accordingly, we propose to derive the closed-form expression of the MU’s
estimated 3D position. First, we can derive the pseudolinear equations [25]
based on the estimated AoAs as follows:

$\displaystyle\hat{\mathbf{g}}_{\Theta_{i}}^{T}\mathbf{s}_{i}-\hat{\mathbf{g}}_{\Theta_{i}}^{T}\mathbf{q}$
$\displaystyle\approx-\tilde{\Theta}_{L,i}d_{L,i}\cos\hat{\Phi}_{L,i},$
$\displaystyle\hat{\mathbf{g}}_{\Phi_{i}}^{T}\mathbf{s}_{i}-\hat{\mathbf{g}}_{\Phi_{i}}^{T}\mathbf{q}$
$\displaystyle\approx-\tilde{\Theta}_{L,i}d_{L,i},$ (114)

where $d_{L,i}$ denotes the distance between the $i$th anchor and the MU, and
we have

$\displaystyle\hat{\mathbf{g}}_{\Theta_{i}}=[-\cos\hat{\Theta}_{L,i},\sin\hat{\Theta}_{L,i},0]^{T},\hat{\mathbf{g}}_{\Phi_{i}}=[-\sin\hat{\Phi}_{L,i}\sin\hat{\Theta}_{L,i},\sin\hat{\Phi}_{L,i}\cos\hat{\Theta}_{L,i},-\cos\hat{\Phi}_{L,i}]^{T}.$
(115)

As a result, we can derive the following compact form of equations as

$\displaystyle\hat{\mathbf{h}}-\hat{\mathbf{G}}\mathbf{q}={\bf Bz}$ (116)

where

$\displaystyle\hat{\mathbf{h}}=[\mathbf{1}^{T}(\hat{\mathbf{G}}_{\Theta}\odot\mathbf{S})^{T},\mathbf{1}^{T}(\hat{\mathbf{G}}_{\Phi}\odot\mathbf{S})^{T}]^{T},\hat{\mathbf{G}}=[\hat{\mathbf{G}}^{T}_{\Theta},\hat{\mathbf{G}}^{T}_{\Phi}]^{T},{\bf
B}=[{\bf B}_{1},{\bf B}_{2}]^{T},{\bf
z}=[\tilde{{\bm{\Theta}}}^{T},\tilde{{\bm{\Phi}}}^{T}]^{T},$
$\displaystyle\hat{\mathbf{G}}_{\Theta}=[\hat{\mathbf{g}}_{\Theta_{1}},\cdots,\hat{\mathbf{g}}_{\Theta_{I}}]^{T},\hat{\mathbf{G}}_{\Phi}=[\hat{\mathbf{g}}_{\Phi_{1}},\cdots,\hat{\mathbf{g}}_{\Phi_{I}}]^{T},\mathbf{S}=[\mathbf{s}_{{1}},\cdots,\mathbf{s}_{{I}}]^{T},{\bf
B}_{1}=[{\bf B}_{\Theta},{\bf O}]^{T},{\bf B}_{2}=[{\bf O},{\bf
B}_{\Phi}]^{T},$
$\displaystyle\mathbf{B}_{\Theta}=-\textrm{diag}[d_{L,1}\cos\hat{\Phi}_{L,1},\cdots,d_{L,I}\cos\hat{\Phi}_{L,I}]^{T},\mathbf{B}_{\Phi}=-\textrm{diag}[d_{L,1},\cdots,d_{L,I}]^{T}.$
(117)

Based on (116), we can apply the WLS algorithm [25] to derive the closed-form
expression of the MU’s estimated position, which is written as:

$\displaystyle\hat{\bf
q}=(\hat{\mathbf{G}}^{T}\mathbf{W}\hat{\mathbf{G}})^{-1}\hat{\mathbf{G}}^{T}\mathbf{W}\hat{\mathbf{h}},$
(118)

where $\mathbf{W}={\bf B}{\bf Q}{\bf B}^{T}$ and
$\mathbf{Q}=\textrm{diag}[\mathbf{Q}_{\Theta},\mathbf{Q}_{\Phi}]$. The details
of the derivation can be found in [25].

Figure 2: PDF of $\tilde{\Theta}_{L,i}$.

Figure 3:  PDF of $\tilde{\Phi}_{L,i}$.

Figure 4: Variance of $\tilde{\Theta}_{L,i}$ versus anchor size.

Figure 5: Variance of $\tilde{\Phi}_{L,i}$ versus anchor size.

##  VIII Simulation Results

This section presents simulation results to validate the accuracy of our
derivations and approximations. In our simulation, we consider a mmWave
multiple input single output (MISO) channel from the MU to the anchors.
Moreover, the MU, the anchors are assumed to be placed in a 3D area. The
locations of four anchors are ${\bf s}_{1}=[2,20,3]^{T}$, ${\bf
s}_{2}=[-12,-16,58]^{T}$, ${\bf s}_{3}=[-10,-6,-8]^{T}$ and ${\bf
s}_{4}=[10,6,-20]^{T}$. It is assumed that the inter-antenna spacing of UPA at
the anchors is $d_{r}=\lambda_{c}/2$. The following results are obtained by
averaging over 10,000 random estimation error realizations. Unless otherwise
stated, we assume $S=S_{1}\times S_{2}=64\times 64$ for rotation angle search
grids, and the SNR is assumed to be $10$ dB. The positioning accuracy is
assessed in terms of the mean-square error (MSE).

Fig. 3 and Fig. 3 illustrate the PDF of estimation errors. It is assumed that
the anchor size is $N_{y}=N_{z}=16$. It can be observed from Fig. 3 and Fig. 3
that our derived results match well with the simulation results, which verify
the accuracy of our derived results and confirm that the angle estimation
error is non-Gaussian.

Fig. 5 and Fig. 5 display the variance $\sigma^{2}_{\theta_{L,i}}$ of
estimation error $\tilde{\Theta}_{L,i}$ and the variance
$\sigma^{2}_{\phi_{L,i}}$ of estimation error $\tilde{\Phi}_{L,i}$ as the
functions of anchor size $N_{y}(N_{z})$, respectively. Fig. 5 and Fig. 5
display the variance $\sigma^{2}_{\theta_{L,i}}$, which show that the
theoretical results coincide with the simulation results, which validates the
correctness of the derived results. Moreover, it is observed that the
variances of $\tilde{\Theta}_{L,i}$ and $\tilde{\Phi}_{L,i}$ decrease with the
anchor size, which means that increasing the number of antennas could improve
the estimation accuracy.

Fig. 7 compares the MSE of the proposed framework aided by 2 anchors with that
aided by 3 anchors when the size of anchors increases from $N_{y}=N_{z}=1$ to
$N_{y}=N_{z}=20$. As shown in the figure, the MSE decreases with the anchor
size as expected. Furthermore, it is shown that the MSE of 2 anchors is larger
than that of 3 anchors. It implies that increasing the number of anchors can
significantly improve the positioning accuracy of the proposed framework.

In [26], the position of the MU is derived by using the geometry relationship
between the estimated AOA and the 3D position, which is denoted as the
geometry algorithm in this paper. Fig. 7 also presents the positioning
performance comparison of the proposed framework with the geometry algorithm.
It is seen from Fig. 7 that the proposed framework outperforms the geometry
algorithm even with only 2 anchors.

Figure 6:  Comparison of the proposed framework and geometry algorithm.

Figure 7:  MSE of the proposed framework versus anchors number.

Fig. 7 illustrates the impact of the number of anchors and the size of the
anchors on the performance of the proposed framework. To be specific, we
present the comparison of the proposed framework with $N_{y}=N_{z}=1$,
$N_{y}=N_{z}=2$, $N_{y}=N_{z}=4$, and $N_{y}=N_{z}=8$. As it can be seen from
Fig. 7, MSE decreases with the number of anchors. This implies that the
positioning accuracy is better with a larger number of anchors. Furthermore,
as shown in Fig. 7, there is a large gap between the curve of $N_{y}=N_{z}=1$
and the curve of $N_{y}=N_{z}=2$, while the curve of $N_{y}=N_{z}=8$ is only a
little better than the curve of $N_{y}=N_{y}=4$. This implies that the impact
of the anchor size becomes small when $N_{y}(N_{z})$ is larger than $4$.

##  IX Conclusion

In this paper, we designed a comprehensive framework to analyze the angle
estimation error and design the 3D positioning algorithm for the mmWave
system. First, we estimated the AoAs at the anchors by applying the 2D-DFT
algorithm. Based on the property of the 2D-DFT algorithm, the angle estimation
error was analyzed in terms of PDF. We then simplified the intricate geometric
expression of the error PDF by employing the first-order linear approximation
of triangle functions. We also derived the variance expression of the error by
using the error PDF and theoretically derived the variance from the error PDF.
Finally, we applied the WLS algorithm to estimate the 3D position of the MU by
using the estimated AoAs and the obtained non-Gaussian variance. Extensive
simulation results confirmed that the derived angle estimation error is non-
Gaussian, and also demonstrated the superiority of the proposed framework.

##  Appendix A Derivation of $D_{1,i}$

Firstly, we derive the expression of $D_{11,i}$ as

$\displaystyle D_{11,i}$
$\displaystyle=\frac{\hat{{X_{i}}}{\alpha_{2,i}}^{2}}{8a_{i}b_{i}\hat{Y_{i}}}\int_{B_{1,i}}^{B_{2,i}}(\hat{V_{i}}\tilde{\theta}^{2}_{L,i}-\hat{U_{i}}\tilde{\theta}^{3}_{L,i})d\tilde{\theta}_{L,i}-\frac{\hat{{X_{i}}}{\beta_{1,i}}^{2}}{8a_{i}b_{i}\hat{Y_{i}}}\int_{B_{1,i}}^{B_{2,i}}\frac{\hat{V_{i}}\tilde{\theta}^{2}_{L,i}-\hat{U_{i}}\tilde{\theta}^{3}_{L,i}}{(\hat{U_{i}}+\hat{V_{i}}\tilde{\theta}_{L,i})^{2}}d\tilde{\theta}_{L,i}$
$\displaystyle=\frac{\hat{{X_{i}}}{\alpha_{2,i}}^{2}}{8a_{i}b_{i}\hat{Y_{i}}}\int_{B_{1,i}}^{B_{2,i}}(\hat{V_{i}}\tilde{\theta}^{2}_{L,i}-\hat{U_{i}}\tilde{\theta}^{3}_{L,i})d\tilde{\theta}_{L,i}$
$\displaystyle\quad-\bigg{[}\frac{\hat{{X_{i}}}{\beta_{1,i}}^{2}}{8a_{i}b_{i}\hat{Y_{i}}\hat{U_{i}}}\bigg{(}\int_{0}^{B_{2,i}}\frac{\frac{\hat{V_{i}}}{\hat{U_{i}}}\tilde{\theta}^{2}_{L,i}}{(1+\frac{\hat{V_{i}}\tilde{\theta}_{L,i}}{\hat{U_{i}}})^{2}}d\tilde{\theta}_{L,i}-\int_{0}^{B_{2,i}}\frac{\tilde{\theta}^{3}_{L,i}}{(1+\frac{\hat{V_{i}}\tilde{\theta}_{L,i}}{\hat{U_{i}}})^{2}}d\tilde{\theta}_{L,i}\bigg{)}$
$\displaystyle=\frac{\hat{{X_{i}}}{\alpha_{2,i}}^{2}}{8a_{i}b_{i}\hat{Y_{i}}}\bigg{(}\frac{\hat{U_{i}}\tilde{\theta}^{4}_{L,i}}{4}-\frac{\hat{V_{i}}\tilde{\theta}^{3}_{L,i}}{3}\bigg{)}\bigg{|}_{B_{1,i}}^{B_{2,i}}-$
$\displaystyle\quad\bigg{[}\bigg{(}-\frac{\hat{{X_{i}}}{\beta_{1,i}}^{2}}{8a_{i}b_{i}\hat{Y_{i}}\hat{U_{i}}}\cdot\frac{B_{2,i}^{4}}{4}\cdot\
_{2}F_{1}\bigg{(}2,4;5;-\frac{\hat{V_{i}}}{\hat{U_{i}}}B_{2,i}\bigg{)}+\frac{\hat{{X_{i}}}{\beta_{1,i}}^{2}\hat{V_{i}}}{8a_{i}b_{i}\hat{Y_{i}}\hat{U_{i}}^{2}}\cdot\frac{B_{2,i}^{3}}{3}\cdot\
_{2}F_{1}\bigg{(}2,3;4;-\frac{\hat{V_{i}}}{\hat{U_{i}}}B_{2,i}\bigg{)}\bigg{)}$
$\displaystyle\quad-\bigg{(}-\frac{\hat{{X_{i}}}{\beta_{1,i}}^{2}}{8a_{i}b_{i}\hat{Y_{i}}\hat{U_{i}}}\cdot\frac{B_{1,i}^{4}}{4}\cdot\
_{2}F_{1}\bigg{(}2,4;5;-\frac{\hat{V_{i}}}{\hat{U_{i}}}B_{1,i}\bigg{)}+\frac{\hat{{X_{i}}}{\beta_{1,i}}^{2}\hat{V_{i}}}{8a_{i}b_{i}\hat{Y_{i}}\hat{U_{i}}^{2}}\cdot\frac{B_{1,i}^{3}}{3}\cdot\
_{2}F_{1}\bigg{(}2,3;4;-\frac{\hat{V_{i}}}{\hat{U_{i}}}B_{1,i}\bigg{)}\bigg{)}\bigg{]},$
(119)

where $\int^{u}_{0}\frac{x^{\mu-1}dx}{(1+\beta
x)^{v}}=_{2}F_{1}\bigg{(}\nu,\mu;1+\mu;-\beta u\bigg{)}$ is a generalized
hypergeometric series [27].

Then, $D_{12,i}$ in (105) is derived as

$\displaystyle
D_{12,i}=\int_{B_{2,i}}^{B_{3,i}}\frac{\hat{{X_{i}}}(\hat{V_{i}}-\tilde{\theta}_{L,i}\hat{U_{i}})}{2b}\tilde{\theta}^{2}_{L,i}d\tilde{\theta}_{L,i}=\frac{\hat{{X_{i}}}}{2b_{i}}\bigg{(}\frac{\hat{V_{i}}\tilde{\theta}^{3}_{L,i}}{3}-\frac{\hat{U_{i}}\tilde{\theta}^{4}_{L,i}}{4}\bigg{)}\bigg{|}_{B_{2,i}}^{B_{3,i}}.$
(120)

Finally, $D_{13,i}$ in (105) is given by

$\displaystyle
D_{13,i}=\bigg{[}\bigg{(}-\frac{\hat{{X_{i}}}{\beta_{2,i}}^{2}}{8a_{i}b_{i}\hat{Y_{i}}\hat{U_{i}}}\cdot\frac{B_{4,i}^{4}}{4}\cdot\
_{2}F_{1}\bigg{(}2,4;5;-\frac{\hat{V_{i}}}{\hat{U_{i}}}B_{4,i}\bigg{)}+\frac{\hat{{X_{i}}}{\beta_{2,i}}^{2}\hat{V_{i}}}{8a_{i}b_{i}\hat{Y_{i}}\hat{U_{i}}^{2}}\cdot\frac{B_{4,i}^{3}}{3}\cdot\
_{2}F_{1}\bigg{(}2,3;4;-\frac{\hat{V_{i}}}{\hat{U_{i}}}B_{4,i}\bigg{)}\bigg{)}$
$\displaystyle-\bigg{(}-\frac{\hat{{X_{i}}}{\beta_{2,i}}^{2}}{8a_{i}b_{i}\hat{Y_{i}}\hat{U_{i}}}\cdot\frac{B_{3,i}^{4}}{4}\cdot\
_{2}F_{1}\bigg{(}2,4;5;-\frac{\hat{V_{i}}}{\hat{U_{i}}}B_{3,i}\bigg{)}+\frac{\hat{{X_{i}}}{\beta_{2,i}}^{2}\hat{V_{i}}}{8a_{i}b_{i}\hat{Y_{i}}\hat{U_{i}}^{2}}\cdot\frac{B_{3,i}^{3}}{3}\cdot\
_{2}F_{1}\bigg{(}2,3;4;-\frac{\hat{V_{i}}}{\hat{U_{i}}}B_{3,i}\bigg{)}\bigg{)}\bigg{]}$
$\displaystyle-\frac{\hat{{X_{i}}}{\alpha_{1,i}}^{2}}{8a_{i}b_{i}\hat{Y_{i}}}\bigg{(}-\frac{\hat{U_{i}}\tilde{\theta}^{4}_{L,i}}{4}+\frac{\hat{V_{i}}\tilde{\theta}^{3}_{L,i}}{3}\bigg{)}\bigg{|}_{B_{3,i}}^{B_{4,i}}.$
(121)

##  Appendix B Derivation of $D_{2,i}$

Firstly, $D_{21,i}$ in (106) is derived as

$\displaystyle D_{21,i}$
$\displaystyle=\frac{\hat{{X_{i}}}{\alpha_{2,i}}^{2}}{8a_{i}b_{i}\hat{Y_{i}}}\bigg{(}-\frac{\hat{U_{i}}\tilde{\theta}^{3}_{L,i}}{3}+\frac{\hat{V_{i}}\tilde{\theta}^{2}_{L,i}}{2}\bigg{)}\bigg{|}_{B_{1,i}}^{B_{2,i}}$
$\displaystyle-\bigg{[}\bigg{(}-\frac{\hat{{X_{i}}}{\beta_{1,i}}^{2}}{8a_{i}b_{i}\hat{Y_{i}}\hat{U_{i}}}\cdot\frac{B_{2,i}^{3}}{3}\cdot\
_{2}F_{1}\bigg{(}2,3;4;-\frac{\hat{V_{i}}}{\hat{U_{i}}}B_{2,i}\bigg{)}+\frac{\hat{{X_{i}}}{\beta_{1,i}}^{2}\hat{V_{i}}}{8a_{i}b_{i}\hat{Y_{i}}\hat{U_{i}}^{2}}\cdot\frac{B_{2,i}^{2}}{2}\cdot\
_{2}F_{1}\bigg{(}2,2;3;-\frac{\hat{V_{i}}}{\hat{U_{i}}}B_{2,i}\bigg{)}\bigg{)}$
$\displaystyle-\bigg{(}-\frac{\hat{{X_{i}}}{\beta_{1,i}}^{2}}{8a_{i}b_{i}\hat{Y_{i}}\hat{U_{i}}}\cdot\frac{B_{1,i}^{3}}{3}\cdot\
_{2}F_{1}\bigg{(}2,3;4;-\frac{\hat{V_{i}}}{\hat{U_{i}}}B_{1,i}\bigg{)}+\frac{\hat{{X_{i}}}{\beta_{1,i}}^{2}\hat{V_{i}}}{8a_{i}b_{i}\hat{Y_{i}}\hat{U_{i}}^{2}}\cdot\frac{B_{1,i}^{2}}{2}\cdot\
_{2}F_{1}\bigg{(}2,2;3;-\frac{\hat{V_{i}}}{\hat{U_{i}}}B_{1,i}\bigg{)}\bigg{)}\bigg{]}.$
(122)

Then, $D_{22,i}$ in (106) is written as

$\displaystyle
D_{22,i}=\int_{B_{2,i}}^{B_{3,i}}\frac{\hat{{X_{i}}}(\hat{V_{i}}-\tilde{\theta}_{L,i}\hat{U_{i}})}{2b_{i}}\tilde{\theta}_{L,i}d\tilde{\theta}_{L,i}=\frac{\hat{{X_{i}}}}{2b_{i}}\bigg{(}-\frac{\hat{U_{i}}\tilde{\theta}^{3}_{L,i}}{3}+\frac{\hat{V_{i}}\tilde{\theta}^{2}_{L,i}}{2}\bigg{)}\bigg{|}_{B_{2,i}}^{B_{3,i}}.$
(123)

Finally, $D_{23,i}$ in (106) could be formulated as

$\displaystyle D_{23,i}$
$\displaystyle=\bigg{[}\bigg{(}-\frac{\hat{{X_{i}}}{\beta_{2,i}}^{2}}{8a_{i}b_{i}\hat{Y_{i}}\hat{U_{i}}}\cdot\frac{B_{4,i}^{3}}{3}\cdot\
_{2}F_{1}\bigg{(}2,3;4;-\frac{\hat{V_{i}}}{\hat{U_{i}}}B_{4,i}\bigg{)}+\frac{\hat{{X_{i}}}{\beta_{2,i}}^{2}\hat{V_{i}}}{8a_{i}b_{i}\hat{Y_{i}}\hat{U_{i}}^{2}}\cdot\frac{B_{4,i}^{2}}{2}\cdot\
_{2}F_{1}\bigg{(}2,2;3;-\frac{\hat{V_{i}}}{\hat{U_{i}}}B_{4,i}\bigg{)}\bigg{)}$
$\displaystyle-\bigg{(}-\frac{\hat{{X_{i}}}{\beta_{2,i}}^{2}}{8a_{i}b_{i}\hat{Y_{i}}\hat{U_{i}}}\cdot\frac{B_{3,i}^{3}}{3}\cdot\
_{2}F_{1}\bigg{(}2,3;4;-\frac{\hat{V_{i}}}{\hat{U_{i}}}B_{3,i}\bigg{)}+\frac{\hat{{X_{i}}}{\beta_{2,i}}^{2}\hat{V_{i}}}{8a_{i}b_{i}\hat{Y_{i}}\hat{U_{i}}^{2}}\cdot\frac{B_{3,i}^{2}}{2}\cdot\
_{2}F_{1}\bigg{(}2,2;3;-\frac{\hat{V_{i}}}{\hat{U_{i}}}B_{3,i}\bigg{)}\bigg{)}\bigg{]}$
$\displaystyle-\frac{\hat{{X_{i}}}{\alpha_{1,i}}^{2}}{8a_{i}b_{i}\hat{Y_{i}}}\bigg{(}-\frac{\hat{U_{i}}\tilde{\theta}^{3}_{L,i}}{3}+\frac{\hat{V_{i}}\tilde{\theta}^{2}_{L,i}}{2}\bigg{)}\bigg{|}_{B_{3,i}}^{B_{4,i}}.$
(124)

##  Appendix C Derivation of $D^{\prime}_{1,i}$

As for $D^{\prime}_{11,i}$ in (108), it could be expressed as

$\displaystyle D^{\prime}_{11,i}$
$\displaystyle=\frac{\hat{{X_{i}}}{\alpha_{2,i}}^{2}}{8a_{i}b_{i}\hat{Y_{i}}}\bigg{(}-\frac{\hat{U_{i}}\tilde{\theta}^{4}_{L,i}}{4}+\frac{\hat{V_{i}}\tilde{\theta}^{3}_{L,i}}{3}\bigg{)}\bigg{|}_{B_{1,i}}^{B_{3,i}}-$
$\displaystyle\bigg{[}\bigg{(}-\frac{\hat{{X_{i}}}{\beta_{1,i}}^{2}}{8a_{i}b_{i}\hat{Y_{i}}\hat{U_{i}}}\cdot\frac{B_{3,i}^{4}}{4}\cdot\
_{2}F_{1}\bigg{(}2,4;5;-\frac{\hat{V_{i}}}{\hat{U_{i}}}B_{3,i}\bigg{)}+\frac{\hat{{X_{i}}}{\beta_{1,i}}^{2}\hat{V_{i}}}{8a_{i}b_{i}\hat{Y_{i}}\hat{U_{i}}^{2}}\cdot\frac{B_{3,i}^{3}}{3}\cdot\
_{2}F_{1}\bigg{(}2,3;4;-\frac{\hat{V_{i}}}{\hat{U_{i}}}B_{3,i}\bigg{)}\bigg{)}$
$\displaystyle-\bigg{(}-\frac{\hat{{X_{i}}}{\beta_{1,i}}^{2}}{8a_{i}b_{i}\hat{Y_{i}}\hat{U_{i}}}\cdot\frac{B_{1,i}^{4}}{4}\cdot\
_{2}F_{1}\bigg{(}2,4;5;-\frac{\hat{V_{i}}}{\hat{U_{i}}}B_{1,i}\bigg{)}+\frac{\hat{{X_{i}}}{\beta_{1,i}}^{2}\hat{V_{i}}}{8a_{i}b_{i}\hat{Y_{i}}\hat{U_{i}}^{2}}\cdot\frac{B_{1,i}^{3}}{3}\cdot\
_{2}F_{1}\bigg{(}2,3;4;-\frac{\hat{V_{i}}}{\hat{U_{i}}}B_{1,i}\bigg{)}\bigg{)}\bigg{]}.$
(125)

Then, $D^{\prime}_{12,i}$ in (108) is given by

$\displaystyle D^{\prime}_{12,i}$
$\displaystyle=\bigg{(}-\frac{\hat{{X_{i}}}\hat{{Z_{i}}}}{2a\hat{Y_{i}}\hat{U_{i}}}\cdot\frac{B_{2,i}^{4}}{4}\cdot\
_{2}F_{1}\bigg{(}2,4;5;-\frac{\hat{V_{i}}}{\hat{U_{i}}}B_{2,i}\bigg{)}+\frac{\hat{{X_{i}}}\hat{{Z_{i}}}\hat{V_{i}}}{2a\hat{Y_{i}}\hat{U_{i}}^{2}}\cdot\frac{B_{2,i}^{3}}{3}\cdot\
_{2}F_{1}\bigg{(}2,3;4;-\frac{\hat{V_{i}}}{\hat{U_{i}}}B_{2,i}\bigg{)}\bigg{)}$
$\displaystyle-\bigg{(}-\frac{\hat{{X_{i}}}\hat{{Z_{i}}}}{2a\hat{Y_{i}}\hat{U_{i}}}\cdot\frac{B_{3,i}^{4}}{4}\cdot\
_{2}F_{1}\bigg{(}2,4;5;-\frac{\hat{V_{i}}}{\hat{U_{i}}}B_{3,i}\bigg{)}+\frac{\hat{{X_{i}}}\hat{{Z_{i}}}\hat{V_{i}}}{2a\hat{Y_{i}}\hat{U_{i}}^{2}}\cdot\frac{B_{3,i}^{3}}{3}\cdot\
_{2}F_{1}\bigg{(}2,3;4;-\frac{\hat{V_{i}}}{\hat{U_{i}}}B_{3,i}\bigg{)}\bigg{)}.$
(126)

Finally, $D^{\prime}_{13,i}$ in (108) is derived as

$\displaystyle D^{\prime}_{13,i}$
$\displaystyle=\bigg{[}\bigg{(}-\frac{\hat{{X_{i}}}{\beta_{2,i}}^{2}}{8a_{i}b_{i}\hat{Y_{i}}\hat{U_{i}}}\cdot\frac{B_{4,i}^{4}}{4}\cdot\
_{2}F_{1}\bigg{(}2,4;5;-\frac{\hat{V_{i}}}{\hat{U_{i}}}B_{4,i}\bigg{)}+\frac{\hat{{X_{i}}}{\beta_{2,i}}^{2}\hat{V_{i}}}{8a_{i}b_{i}\hat{Y_{i}}\hat{U_{i}}^{2}}\cdot\frac{B_{4,i}^{3}}{3}\cdot\
_{2}F_{1}\bigg{(}2,3;4;-\frac{\hat{V_{i}}}{\hat{U_{i}}}B_{4,i}\bigg{)}\bigg{)}$
$\displaystyle-\bigg{(}-\frac{\hat{{X_{i}}}{\beta_{2,i}}^{2}}{8a_{i}b_{i}\hat{Y_{i}}\hat{U_{i}}}\cdot\frac{B_{2,i}^{4}}{4}\cdot\
_{2}F_{1}\bigg{(}2,4;5;-\frac{\hat{V_{i}}}{\hat{U_{i}}}B_{2,i}\bigg{)}+\frac{\hat{{X_{i}}}{\beta_{2,i}}^{2}\hat{V_{i}}}{8a_{i}b_{i}\hat{Y_{i}}\hat{U_{i}}^{2}}\cdot\frac{B_{2,i}^{3}}{3}\cdot\
_{2}F_{1}\bigg{(}2,3;4;-\frac{\hat{V_{i}}}{\hat{U_{i}}}B_{2,i}\bigg{)}\bigg{)}\bigg{]}$
$\displaystyle-\frac{\hat{{X_{i}}}{\alpha_{1,i}}^{2}}{8a_{i}b_{i}\hat{Y_{i}}}\bigg{(}-\frac{\hat{U_{i}}\tilde{\theta}^{4}_{L,i}}{4}+\frac{\hat{V_{i}}\tilde{\theta}^{3}_{L,i}}{3}\bigg{)}\bigg{|}_{B_{2,i}}^{B_{4,i}}.$
(127)

##  Appendix D Derivation of $D^{\prime}_{2,i}$

Firstly, $D^{\prime}_{21,i}$ in (109) is formulated as

$\displaystyle D^{\prime}_{21,i}$
$\displaystyle=\frac{\hat{{X_{i}}}{\alpha_{2,i}}^{2}}{8a_{i}b_{i}\hat{Y_{i}}}\bigg{(}-\frac{\hat{U_{i}}\tilde{\theta}^{3}_{L,i}}{3}+\frac{\hat{V_{i}}\tilde{\theta}^{2}_{L,i}}{2}\bigg{)}\bigg{|}_{B_{1,i}}^{B_{3,i}}-$
$\displaystyle\quad\bigg{[}\bigg{(}-\frac{\hat{{X_{i}}}{\beta_{1,i}}^{2}}{8a_{i}b_{i}\hat{Y_{i}}\hat{U_{i}}}\cdot\frac{B_{3,i}^{3}}{3}\cdot\
_{2}F_{1}\bigg{(}2,3;4;-\frac{\hat{V_{i}}}{\hat{U_{i}}}B_{3,i}\bigg{)}+\frac{\hat{{X_{i}}}{\beta_{1,i}}^{2}\hat{V_{i}}}{8a_{i}b_{i}\hat{Y_{i}}\hat{U_{i}}^{2}}\cdot\frac{B_{3,i}^{2}}{2}\cdot\
_{2}F_{1}\bigg{(}2,2;3;-\frac{\hat{V_{i}}}{\hat{U_{i}}}B_{3,i}\bigg{)}\bigg{)}$
$\displaystyle\quad-\bigg{(}-\frac{\hat{{X_{i}}}{\beta_{1,i}}^{2}}{8a_{i}b_{i}\hat{Y_{i}}\hat{U_{i}}}\cdot\frac{B_{1,i}^{3}}{3}\cdot\
_{2}F_{1}\bigg{(}2,3;4;-\frac{\hat{V_{i}}}{\hat{U_{i}}}B_{1,i}\bigg{)}+\frac{\hat{{X_{i}}}{\beta_{1,i}}^{2}\hat{V_{i}}}{8a_{i}b_{i}\hat{Y_{i}}\hat{U_{i}}^{2}}\cdot\frac{B_{1,i}^{2}}{2}\cdot\
_{2}F_{1}(2,2;3;-\frac{\hat{V_{i}}}{\hat{U_{i}}}B_{1,i})\bigg{)}\bigg{]}.$
(128)

Then, $D^{\prime}_{22,i}$ in (109) is written as

$\displaystyle D^{\prime}_{22,i}$
$\displaystyle=\bigg{(}-\frac{\hat{{X_{i}}}\hat{{Z_{i}}}}{2a\hat{Y_{i}}\hat{U_{i}}}\cdot\frac{B_{2,i}^{3}}{3}\cdot\
_{2}F_{1}\bigg{(}2,3;4;-\frac{\hat{V_{i}}}{\hat{U_{i}}}B_{2,i}\bigg{)}+\frac{\hat{{X_{i}}}\hat{{Z_{i}}}\hat{V_{i}}}{2a\hat{Y_{i}}\hat{U_{i}}^{2}}\cdot\frac{B_{2,i}^{2}}{2}\cdot\
_{2}F_{1}\bigg{(}2,2;3;-\frac{\hat{V_{i}}}{\hat{U_{i}}}B_{2,i}\bigg{)}\bigg{)}$
$\displaystyle\quad-\bigg{(}-\frac{\hat{{X_{i}}}\hat{{Z_{i}}}}{2a\hat{Y_{i}}\hat{U_{i}}}\cdot\frac{B_{3,i}^{3}}{3}\cdot\
_{2}F_{1}\bigg{(}2,3;4;-\frac{\hat{V_{i}}}{\hat{U_{i}}}B_{3,i}\bigg{)}+\frac{\hat{{X_{i}}}\hat{{Z_{i}}}\hat{V_{i}}}{2a\hat{Y_{i}}\hat{U_{i}}^{2}}\cdot\frac{B_{3,i}^{2}}{2}\cdot\
_{2}F_{1}\bigg{(}2,2;3;-\frac{\hat{V_{i}}}{\hat{U_{i}}}B_{3,i}\bigg{)}\bigg{)}.$
(129)

Finally, $D^{\prime}_{23,i}$ in (109) is obtained as

$\displaystyle D^{\prime}_{23,i}$
$\displaystyle=\bigg{[}\bigg{(}-\frac{\hat{{X_{i}}}{\beta_{2,i}}^{2}}{8a_{i}b_{i}\hat{Y_{i}}\hat{U_{i}}}\cdot\frac{B_{4,i}^{3}}{3}\cdot\
_{2}F_{1}\bigg{(}2,3;4;-\frac{\hat{V_{i}}}{\hat{U_{i}}}B_{4,i}\bigg{)}+\frac{\hat{{X_{i}}}{\beta_{2,i}}^{2}\hat{V_{i}}}{8a_{i}b_{i}\hat{Y_{i}}\hat{U_{i}}^{2}}\cdot\frac{B_{4,i}^{2}}{2}\cdot\
_{2}F_{1}\bigg{(}2,2;3;-\frac{\hat{V_{i}}}{\hat{U_{i}}}B_{4,i}\bigg{)}\bigg{)}$
$\displaystyle\quad-\bigg{(}-\frac{\hat{{X_{i}}}{\beta_{2,i}}^{2}}{8a_{i}b_{i}\hat{Y_{i}}\hat{U_{i}}}\cdot\frac{B_{2,i}^{3}}{3}\cdot\
_{2}F_{1}\bigg{(}2,3;4;-\frac{\hat{V_{i}}}{\hat{U_{i}}}B_{2,i}\bigg{)}+\frac{\hat{{X_{i}}}{\beta_{2,i}}^{2}\hat{V_{i}}}{8a_{i}b_{i}\hat{Y_{i}}\hat{U_{i}}^{2}}\cdot\frac{B_{2,i}^{2}}{2}\cdot\
_{2}F_{1}\bigg{(}2,2;3;-\frac{\hat{V_{i}}}{\hat{U_{i}}}B_{2,i}\bigg{)}\bigg{)}\bigg{]}$
$\displaystyle\quad-\frac{\hat{{X_{i}}}{\alpha_{1,i}}^{2}}{8a_{i}b_{i}\hat{Y_{i}}}\bigg{(}-\frac{\hat{U_{i}}\tilde{\theta}^{3}_{L,i}}{3}+\frac{\hat{V_{i}}\tilde{\theta}^{2}_{L,i}}{2}\bigg{)}\bigg{|}_{B_{2,i}}^{B_{4,i}}.$
(130)

## References

  * [1] Y. Zhou, L. Liu, L. Wang, N. Hui, X. Cui, J. Wu, Y. Peng, Y. Qi, and C. Xing, “Service-aware 6G: An intelligent and open network based on the convergence of communication, computing and caching,” _Digit. Commun. Netw._ , 2020.
  * [2] Z. Zhang, Y. Xiao, Z. Ma, M. Xiao, Z. Ding, X. Lei, G. K. Karagiannidis, and P. Fan, “6G Wireless Networks: Vision, Requirements, Architecture, and Key Technologies,” _IEEE Commun. Mag._ , vol. 14, no. 3, pp. 28–41, 2019.
  * [3] H. Ren, K. Wang, and C. Pan, “Intelligent Reflecting Surface-Aided URLLC in a Factory Automation Scenario,” _IEEE Trans. Commun._ , vol. 70, no. 1, pp. 707–723, 2022.
  * [4] F. Hu, Y. Deng, W. Saad, M. Bennis, and A. H. Aghvami, “Cellular-Connected Wireless Virtual Reality: Requirements, Challenges, and Solutions,” _IEEE Commun. Mag._ , vol. 58, no. 5, pp. 105–111, 2020.
  * [5] T. G. Reid, S. E. Houts, R. Cammarata, G. Mills, S. Agarwal, A. Vora, and G. Pandey, “Localization Requirements for Autonomous Vehicles,” _SAE International Jour. of Conn. and Auto. Veh._ , vol. 2, no. 3, sep 2019\.
  * [6] H. Sarieddeen, N. Saeed, T. Y. Al-Naffouri, and M.-S. Alouini, “Next Generation Terahertz Communications: A Rendezvous of Sensing, Imaging, and Localization,” _IEEE Commun. Mag._ , vol. 58, no. 5, pp. 69–75, 2020.
  * [7] R. Mendrzik, F. Meyer, G. Bauch, and M. Z. Win, “Enabling Situational Awareness in Millimeter Wave Massive MIMO Systems,” _IEEE J. Sel. Topics Signal Process._ , vol. 13, no. 5, pp. 1196–1211, 2019.
  * [8] H. Liu, H. Darabi, P. Banerjee, and J. Liu, “Survey of Wireless Indoor Positioning Techniques and Systems,” _IEEE Trans. on Sys., Man, and Cyber., Part C (Applications and Reviews)_ , vol. 37, no. 6, pp. 1067–1080, 2007\.
  * [9] C. Pan, H. Ren, K. Wang, J. F. Kolb, M. Elkashlan, M. Chen, M. Di Renzo, Y. Hao, J. Wang, A. L. Swindlehurst, X. You, and L. Hanzo, “Reconfigurable Intelligent Surfaces for 6G Systems: Principles, Applications, and Research Directions,” _IEEE Commun. Mag._ , vol. 59, no. 6, pp. 14–20, 2021.
  * [10] D. Dardari, P. Closas, and P. M. Djuri$\acute{\mathrm{c}}$, “Indoor Tracking: Theory, Methods, and Technologies,” _IEEE Trans. Veh. Technol._ , vol. 64, no. 4, pp. 1263–1278, 2015.
  * [11] Q. Li, B. Chen, and M. Yang, “Improved Two-Step Constrained Total Least-Squares TDOA Localization Algorithm Based on the Alternating Direction Method of Multipliers,” _IEEE Sensors Journal_ , vol. 20, no. 22, pp. 13 666–13 673, 2020.
  * [12] D. Fan, F. Gao, Y. Liu, Y. Deng, G. Wang, Z. Zhong, and A. Nallanathan, “Angle Domain Channel Estimation in Hybrid Millimeter Wave Massive MIMO Systems,” _IEEE Trans. Wireless Commun._ , vol. 17, no. 12, pp. 8165–8179, 2018.
  * [13] S. Rao, A. Mezghani, and A. L. Swindlehurst, “Channel Estimation in One-Bit Massive MIMO Systems: Angular Versus Unstructured Models,” _IEEE J. Sel. Topics Signal Process._ , vol. 13, no. 5, pp. 1017–1031, 2019.
  * [14] R. Ramlall, J. Chen, and A. L. Swindlehurst, “Non-line-of-sight mobile station positioning algorithm using TOA, AOA, and Doppler-shift,” in _2014 Ubiquitous Positioning Indoor Navigation and Location Based Service (UPINLBS)_ , 2014, pp. 180–184.
  * [15] C. Hu, L. Dai, S. Han, and X. Wang, “Two-Timescale Channel Estimation for Reconfigurable Intelligent Surface Aided Wireless Communications,” _IEEE Trans. Commun._ , vol. 69, no. 11, pp. 7736–7747, 2021.
  * [16] Z. Lin, T. Lv, and P. T. Mathiopoulos, “3-D Indoor Positioning for Millimeter-Wave Massive MIMO Systems,” _IEEE Trans. Commun._ , vol. 66, no. 6, pp. 2472–2486, 2018.
  * [17] B. Zhou, A. Liu, and V. Lau, “Successive Localization and Beamforming in 5G mmWave MIMO Communication Systems,” _IEEE Trans. Signal Process._ , vol. 67, no. 6, pp. 1620–1635, 2019.
  * [18] J. He, H. Wymeersch, L. Kong, O. Silv$\acute{\mathrm{e}}$n, and M. Juntti, “Large intelligent surface for positioning in millimeter wave MIMO systems,” in _2020 IEEE 91st Veh. Technol. Conf._ , 2020, pp. 1–5.
  * [19] A. Elzanaty, A. Guerra, F. Guidi, and M.-S. Alouini, “Reconfigurable Intelligent Surfaces for Localization: Position and Orientation Error Bounds,” _IEEE Trans. Signal Process._ , vol. 69, pp. 5386–5402, 2021.
  * [20] O. Kanhere and T. S. Rappaport, “Position Locationing for Millimeter Wave Systems,” in _2018 IEEE Glob. Commun. Conf. (GLOBECOM)_ , 2018, pp. 206–212.
  * [21] Y. Lin, S. Jin, M. Matthaiou, and X. You, “Channel Estimation and User Localization for IRS-Assisted MIMO-OFDM Systems,” _IEEE Trans. Wireless Commun._ , vol. 21, no. 4, pp. 2320–2335, 2022.
  * [22] G. Zhou, C. Pan, H. Ren, P. Popovski, and A. L. Swindlehurst, “Channel estimation for RIS-aided multiuser millimeter-wave systems,” _IEEE Trans. Signal Process._ , vol. 70, pp. 1478–1492, 2022.
  * [23] E. Basar, M. Di Renzo, J. De Rosny, M. Debbah, M.-S. Alouini, and R. Zhang, “Wireless communications through reconfigurable intelligent surfaces,” _IEEE Access_ , vol. 7, pp. 116 753–116 773, 2019.
  * [24] X. Y. Yang and B. X. Chen, “A High-Resolution Method for 2D DOA Estimation,” _J. Elect. and Inf. Tech._ , vol. 32, no. 4, pp. 953–958, 2010\.
  * [25] T. Wu, C. Pan, Y. Pan, S. Hong, H. Ren, M. Elkashlan, F. Shu, and J. Wang, “3D Positioning Algorithm Design for RIS-aided mmWave Systems,” 2022. [Online]. Available: https://arxiv.org/abs/2208.07606
  * [26] H. Wymeersch and B. Denis, “Beyond 5G Wireless Localization with Reconfigurable Intelligent Surfaces,” in _ICC 2020 - 2020 IEEE International Conf. Commun. (ICC)_ , 2020, pp. 1–6.
  * [27] I. S. Gradshteyn and I. M. Ryzhik, “Table of integrals, series, and products,” _Mathematics of Computation_ , vol. 20, no. 96, p. 1157, 2007\.