# RIS-aided Near-Field Localization under Phase-Dependent Amplitude Variations

Cuneyd Ozturk, _Student Member, IEEE_ , Musa Furkan Keskin, _Member, IEEE_ ,
Henk Wymeersch, _Senior Member, IEEE_ , and Sinan Gezici, _Senior Member,
IEEE_ C. Ozturk and S. Gezici are with the Department of Electrical and
Electronics Engineering, Bilkent University, Ankara, 06800, Turkey, E-mails:
<EMAIL_ADDRESS>F. Keskin and H. Wymeersch are with the
Department of Electrical Engineering, Chalmers University of Technology,
Sweden, E-mails<EMAIL_ADDRESS>work was supported, in part,
by the EU H2020 RISE-6G project under grant 101017011 and by the MSCA-IF grant
888913 (OTFS-RADCOM).

###### Abstract

We investigate the problem of reconfigurable intelligent surface (RIS)-aided
near-field localization of a user equipment (UE) served by a base station (BS)
under phase-dependent amplitude variations at each RIS element. Through a
misspecified Cramér-Rao bound (MCRB) analysis and a resulting lower bound (LB)
on localization, we show that when the UE is unaware of amplitude variations
(i.e., assumes unit-amplitude responses), severe performance penalties can
arise, especially at high signal-to-noise ratios (SNRs). Leveraging Jacobi-
Anger expansion to decouple range-azimuth-elevation dimensions, we develop a
low-complexity approximated mismatched maximum likelihood (AMML) estimator,
which is asymptotically tight to the LB. To mitigate performance loss due to
model mismatch, we propose to jointly estimate the UE location and the RIS
amplitude model parameters. The corresponding Cramér-Rao bound (CRB) is
derived, as well as an iterative refinement algorithm, which employs the AMML
method as a subroutine and alternatingly updates individual parameters of the
RIS amplitude model. Simulation results indicate fast convergence and
performance close to the CRB. The proposed method can successfully recover the
performance loss of the AMML under a wide range of RIS parameters and
effectively calibrate the RIS amplitude model online with the help of a user
that has an a-priori unknown location.

###### Index Terms:

Localization, reconfigurable intelligent surfaces, hardware impairments,
misspecified Cramér-Rao bound (MCRB), maximum likelihood estimator, Jacobi-
Anger expansion.

##  I Introduction

Among the envisioned technological enablers for 6G, three stand out as being
truly disruptive: the transition from 30 GHz to beyond 100 GHz (the so-called
higher mmWave and lower THz bands) [1, 2, 3], the convergence of
communication, localization, and sensing (referred to as integrated sensing
and communication (ISAC) or integrated sensing, localization, and
communication (ISLAC)) [4, 5, 6, 7, 8], and the introduction of reconfigurable
intelligent surfaces [9, 10, 11]. RISs are large passive metasurfaces,
comprising arrays of programmable reflective unit cells, and have the ability
to shape the propagation environment by judiciously adjusting the phase shifts
at each reflecting element, thus locally boosting the signal-to-noise ratio
(SNR) to improve communication quality [12, 13, 14, 15]. This is especially
relevant in beyond 100 GHz to overcome sudden drops in rate caused by
temporary blockage of the line-of-sight (LoS) path [14, 16]. In order to
provide enhanced performance in downlink single- and multi-user systems,
passive reflect beamforming at the RIS can be optimized, potentially together
with active beamforming at the base station (BS), to maximize energy
efficiency [15, 17], sum-rate [18, 19, 20] and mutual information [21], as
well as to minimize total transmit power at the BS [22, 23].

In parallel with the benefits for communications, RISs can similarly improve
localization performance [24]. Stronger even, RISs with known position and
orientation enjoy the ability to enable localization in scenarios where it
would otherwise be impossible [25]. In this respect, the large aperture of the
RIS has several interesting properties. First of all, the SNR-boosting
provides accurate delay measurements when wideband signals are used [26, 2].
Secondly, the large number of elements provides high resolution in angle-of-
arrival (AoA) (for uplink localization) or angle-of-departure (AoD) (for
downlink localization) [2]. Third, when the user equipment (UE) is close to
the RIS (in the sense that the distance to the RIS is of similar order as the
physical size of the RIS), wavefront curvature effects (so-called geometric
near-field) can be harnessed to localize the user [24, 27, 28, 29, 30, 16,
31], even when the LoS path between the BS and UE is blocked, irrespective of
whether wideband or narrowband signals are used. Moreover, closed-form RIS
phase profile designs taking into account the spherical wavefront can be
employed to improve localization accuracy under near-field conditions [26,
32]. As a step further, joint benefits in ISLAC applications can be reaped via
RIS phase profile adjustment by simultaneous optimization of localization and
communications metrics [33].

RISBSUELoS Path $\displaystyle w_{t,m}$
$\displaystyle=\beta(\theta_{t,m})e^{j\theta_{t,m}}$ Figure 1: Configuration
of a RIS-aided localization system with LoS blockage.

In ISLAC scenarios, critical to the effective utilization of RIS is the
control of individual RIS elements, commonly through phase shifters, which
provide element-by-element control with a certain resolution and allow
coherent combination of paths to/from the RIS [20, 13]. For localization, in
contrast to communication, the receiver should be equipped with the knowledge
of the RIS phase profiles to apply suitable high-accuracy processing methods
[11]. The ability to modulate the RIS phase profiles brings additional
benefits, such as separating the controlled and uncontrolled multipath through
temporal coding [34]. Hence, the ability to control the RIS in a precise and
known manner is essential for ISLAC applications, which necessitates the
availability of accurate and simple RIS phase control models. Such models
should ideally account for the per-element response [35], the finite
quantization of the control [36, 13], mutual coupling [37], calibration
effects, and power losses. Most studies on RIS localization have considered
ideal phase shifters (e.g. [28, 25, 26, 38, 27, 30, 16]), omitting the listed
impairments. How these proposed localization approaches fare under these
impairments is both unknown and important.

In this manuscript, we investigate the problem of RIS-aided geometric near-
field localization of a single-antenna UE served by a single-antenna BS under
LoS blockage [28, 39, 30, 16], considering a realistic RIS amplitude model
[35], which relies on equivalent circuit models of individual reflecting
elements. Specifically, we quantify degradation in localization performance
due to mismatch between an ideal model with unit-amplitude RIS element
responses and a realistic model with phase-dependent amplitude variations [35,
40], by resorting to the misspecified Cramér-Rao bound (MCRB) analysis [41].
In addition, we develop novel localization and online RIS calibration
algorithms for cases with and without the knowledge of the underlying RIS
amplitude model. The main contributions and novelty of our manuscript can be
summarized as follows:

  * •

MCRB Analysis of Near-Field Localization under RIS Non-Idealities: Employing
the MCRB [42, 41] as a tool to assess the accuracy loss under model mismatch,
we provide a simple expression to find the pseudo-true parameter for the
considered scenario and derive the MCRB of the pseudo-true parameter and the
lower bound (LB) of the true parameter. The MCRB analysis over a wide range of
RIS model parameters reveals an order-of-magnitude localization performance
degradation due to model misspecification at high SNRs, both in terms of the
LB and the mismatched maximum-likelihood (MML) estimator [41]. In contrast,
when the true phase control model is available, localization performance is
relatively stable, for all considered model parameter settings.

  * •

Low-Complexity Near-Field Localization via Jacobi-Anger Expansion: Building
upon the ideas in our recent conference papers [43, 27], we develop a novel
low-complexity near-field localization algorithm using Jacobi-Anger expansion,
which enables decoupling of range, azimuth and elevation dimensions. The
resulting algorithm, named approximated MML (AMML), avoids the costly 3-D
search over the UE position by performing three 1-D searches and attains the
corresponding theoretical limits.

  * •

Joint Localization and Online RIS Calibration: Under the assumption of known
RIS amplitude model with unknown parameters, we propose an efficient
approximate maximum-likelihood (ML) (AML) algorithm for joint localization and
online RIS calibration. The proposed approach iteratively updates the RIS
model parameters based on an initial UE location estimate from the output of
the model-unaware AMML method, and refines the UE location using the updated
RIS model. The AML algorithm is shown to significantly outperform the AMML
estimator at high SNRs (where degradation due to model mismatch is most
evident), closing the performance gap with respect to the case with known
model parameters, and converges quickly to the corresponding model-aware CRB
in few iterations.

##  II System Model

In this section, we describe the system geometry, present the signal model and
the RIS model, and formulate the problem of interest.

###  II-A Geometry and Signal Model

We consider an RIS-aided localization system (see Fig. 1) with a single-
antenna BS, an $M$-element RIS, and a single-antenna UE having the following
three-dimensional (3-D) locations: $\boldsymbol{p}_{\text{BS}}$ denotes the
known BS location,
$\boldsymbol{p}_{\text{RIS}}=[\mathrm{x}_{\text{R}}\,\mathrm{y}_{\text{R}}\,\mathrm{z}_{\text{R}}]^{\mathsf{T}}$
is the known center of the RIS,
$\boldsymbol{p}_{m}=[\mathrm{x}_{m}\,\mathrm{y}_{m}\,\mathrm{z}_{m}]^{\mathsf{T}}$
represents the known location of the $m$th RIS element for $1\leq m\leq M$,
and
$\overline{\boldsymbol{p}}=[\overline{\mathrm{x}}~{}\overline{\mathrm{y}}~{}\overline{\mathrm{z}}]^{\mathsf{T}}$
is the unknown UE location. For convenience, following the notation given in
[41, 44], we use $\overline{(\cdot)}$ for the true values of the parameters of
interest throughout the manuscript.

In the considered setting, the BS broadcasts a narrowband signal $s_{t}$ over
$T$ transmissions under the constraint of
$\mathbb{E}\\{\left|s_{t}\right|^{2}\\}=E_{s}$. For simplicity, we assume that
$s_{t}=\sqrt{E_{s}}$ for any $t$. Assuming LoS blockage [28, 16] and the
absence of uncontrolled multipath111In RIS-aided communications and
localization, the uncontrolled multipath can usually be ignored [26, 45, 33]
or treated as an extra additive disturbance [38] due to the spatial filtering
capability of the RIS with tunable phase shifts, which makes the BS-RIS-UE
path much stronger than the uncontrollable paths., the signal received by the
UE involves only reflections from the RIS and can be expressed at transmission
$t$ as

$y_{t}=\overline{\alpha}\underbrace{\boldsymbol{a}^{\mathsf{T}}(\overline{\boldsymbol{p}})\text{diag}(\boldsymbol{w}_{t})\boldsymbol{a}(\boldsymbol{p}_{\text{BS}})}_{\triangleq\boldsymbol{b}^{\mathsf{T}}(\overline{\boldsymbol{p}})\boldsymbol{w}_{t}}s_{t}+n_{t}\,,$
(1)

where $\overline{\alpha}$ is the unknown channel gain including the effects of
path loss, directivity of the RIS elements and of the antennas of the BS and
UE [16, Eq. (3)], and polarization mismatch222Since the RIS aperture size is
much smaller than the distances from the RIS to the BS and UE in the
considered geometry, the channel gain appears as a global factor that has the
same value for each RIS element [29, Eq. (3)]. [46, Ch. 1-11],
$\boldsymbol{w}_{t}=[w_{t,1}\,\ldots\,w_{t,M}]^{\mathsf{T}}$ is the RIS
profile at transmission $t$, and $n_{t}$ is uncorrelated zero-mean additive
Gaussian noise with variance $N_{0}/2$ per real dimension. Moreover,

$\displaystyle\boldsymbol{b}(\boldsymbol{p})=\boldsymbol{a}(\boldsymbol{p})\odot\boldsymbol{a}(\boldsymbol{p}_{\text{BS}})~{},$
(2)

where $\odot$ represents the Hadamard (element-wise) product and
$\boldsymbol{a}(\boldsymbol{p})$ is the near-field RIS steering vector for a
given position $\boldsymbol{p}$, defined as

$\displaystyle[\boldsymbol{a}(\boldsymbol{p})]_{m}$
$\displaystyle=\exp\left(-j\frac{2\pi}{\lambda}\left(\left\lVert\boldsymbol{p}-\boldsymbol{p}_{m}\right\rVert-\left\lVert\boldsymbol{p}-\boldsymbol{p}_{\text{RIS}}\right\rVert\right)\right)$
(3)

for $m\in\\{1,\ldots,M\\}$, in which $\lambda$ denotes the signal wavelength
and the RIS center $\boldsymbol{p}_{\text{RIS}}$ is chosen as the reference
location [29], [31]. As the distance to the RIS becomes sufficiently large
with respect to the RIS size, i.e., when
$\left\lVert\boldsymbol{p}-\boldsymbol{p}_{\text{RIS}}\right\rVert\gg\left\lVert\boldsymbol{p}_{m}-\boldsymbol{p}_{\text{RIS}}\right\rVert$,
the near-field steering vector in (3) reverts to its standard far-field
counterpart as follows [47, Eq. (9)] (see Appendix F for details):

$[\boldsymbol{a}(\boldsymbol{p})]_{m}{\color[rgb]{0,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@gray@stroke{0}\pgfsys@color@gray@fill{0}\approx[\boldsymbol{a}(\vartheta,\varphi)]_{m}}=\exp\left(-j(\boldsymbol{p}_{m}{\color[rgb]{0,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@gray@stroke{0}\pgfsys@color@gray@fill{0}-\boldsymbol{p}_{\text{RIS}}})^{\mathsf{T}}\boldsymbol{k}(\vartheta,\varphi)\right)~{},$
(4)

where

$\displaystyle\boldsymbol{k}(\vartheta,\varphi)=-\frac{2\pi}{\lambda}[\sin\vartheta\cos\varphi~{}\sin\vartheta\sin\varphi~{}\cos\vartheta]^{\mathsf{T}}$
(5)

is the wavevector, $\vartheta\in[0,\,\pi/2]$ denote the elevation angle
between the $z$-axis and
$\boldsymbol{p}-{\color[rgb]{0,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@gray@stroke{0}\pgfsys@color@gray@fill{0}\boldsymbol{p}_{\text{RIS}}}$
(assuming the RIS orientation aligns with the $x$-$y$ plane [27, Fig. 1]), and
$\varphi\in[0,\,2\pi]$ represent the azimuth angle between the projection of
$\boldsymbol{p}-{\color[rgb]{0,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@gray@stroke{0}\pgfsys@color@gray@fill{0}\boldsymbol{p}_{\text{RIS}}}$
on the $x$-$y$ plane and the $x$-axis, measured counter-clockwise.

For the considered geometry, the UE and the BS are assumed to be located in
the Fresnel (radiative) near-field region with respect to the RIS, which
corresponds to the interval [48, 49, 31]

$\displaystyle 0.62\sqrt{\frac{D^{3}}{\lambda}}\leq
d\leq\frac{2D^{2}}{\lambda}~{},$ (6)

where $D$ is the RIS aperture size (i.e., the largest distance between any two
RIS elements) and
$d=\left\lVert\boldsymbol{p}-\boldsymbol{p}_{\text{RIS}}\right\rVert$ with
$\boldsymbol{p}$ denoting the UE or BS location. Operating in the near-field
enables us to localize the UE under LoS blockage by harnessing the spherical
wavefront of the impinging signal at the UE over the BS-RIS-UE path [29, 16,
31]. As seen from the structure in (3), the unknown UE location
$\overline{\boldsymbol{p}}$ can be directly estimated from the received signal
in (1) by exploiting the phase shifts across the RIS elements (i.e.,
$m=1,\ldots,M$) over multiple observations (i.e., $t=1,\ldots,T$). In far-
field, it is not possible to localize the UE with a single RIS under LoS
blockage since the UE can only estimate the AoD from the RIS (the far-field
steering vector in (4) depends only on the angles), which is not sufficient
for localization. Note that the UE cannot extract any delay information in
far-field in the considered setup due to narrowband transmission and
asynchronism between the UE and the BS.

###  II-B Model for RIS Elements

Following the practical model in [35]333The RIS phase-amplitude model in [35,
Eq. (5)] covers a wide range of semiconductor devices employed in RIS
implementation, such as a positive-intrinsic-negative (PIN) diode and a
variable capacitance diode, and agrees well with the experimental results in
the literature [35, 50, 51, 52]. It is possible to derive more accurate RIS
phase-amplitude relations than in [35, Eq. (5)] using a generalized sheet
transition conditions (GSTC) based model [53] instead of an equivalent circuit
model. However, the goal of this paper is not to derive a perfectly accurate
model of RIS element responses for all types of RISs (which is not practically
possible), but rather to quantify the sensitivity of RIS-aided localization to
deviations from the naive unit-amplitude model commonly used in the literature
[28, 25, 26, 38, 27, 30, 16] by adopting an already available, fairly
realistic model with a closed-form phase-amplitude relation as in [35, Eq.
(5)]. As will be discussed in Sec. III, the proposed MCRB analysis is generic
and applicable to any RIS model with closed-form mapping between element
phases and amplitudes., we consider phase-dependent amplitude variations of
the RIS elements given by

$\displaystyle w_{t,m}=\beta(\theta_{t,m})e^{j\theta_{t,m}},$ (7)

with $\theta_{t,m}\in[-\pi,\pi)$ and $\beta(\theta_{t,m})\in[0,1]$ denoting
the phase shift444Given the near-optimal performance of RIS-aided systems
using phase shifters with few quantization bits [18, 36, 54] and the
availability of such low-resolution RIS phase shifters in practice [51, 36],
we assume continuous phase shifts in our model. and the corresponding
amplitude, respectively. In particular, $\beta(\theta_{t,m})$ is expressed as

$\beta(\theta_{t,m})=(1-\overline{\beta}_{{\rm{min}}})\left(\frac{\sin(\theta_{t,m}-\overline{\phi})+1}{2}\right)^{\overline{\kappa}}+\overline{\beta}_{{\rm{min}}},$
(8)

where $\overline{\beta}_{{\rm{min}}}\geq 0$, $\overline{\phi}\geq 0$, and
$\overline{\kappa}\geq 0$ are the constants related to the specific circuit
implementation [35]. To illustrate amplitude variations in (8), Fig. 2 plots
$\beta(\theta)$ as a function of the applied phase shift $\theta$ for various
values of $\overline{\beta}_{{\rm{min}}}$ when $\overline{\kappa}=1.5$ and
$\overline{\phi}=0$. As seen from the figure, larger amplitude fluctuations
occur as $\overline{\beta}_{{\rm{min}}}$ approaches $0$. The resulting
performance penalties in location estimation will be quantified through the
MCRB analysis in Section III.

$0$$1$$2$$3$$4$$5$$6$$0.3$$0.4$$0.5$$0.6$$0.7$$0.8$$0.9$$1$$\theta$$\beta(\theta)$$\overline{\beta}_{{\rm{min}}}=0.3$$\overline{\beta}_{{\rm{min}}}=0.6$$\overline{\beta}_{{\rm{min}}}=0.9$
Figure 2: $\beta(\theta)$ in (8) for three different values of
$\overline{\beta}_{{\rm{min}}}$, when $\overline{\kappa}=1.5$ and
$\overline{\phi}=0$.

###  II-C Problem Description

Given the observations $y_{t}$ in (1) over $T$ transmission instances, our
goal is to derive theoretical performance bounds and develop low-complexity
algorithms for estimating the position of the UE $\overline{\boldsymbol{p}}$
(and the channel gain $\overline{\boldsymbol{\alpha}}$ as an unknown nuisance
parameter) under three different scenarios:

  * •

Scenario-I: There is a mismatch between the assumption and the reality in this
scenario. It is assumed that the amplitudes of the RIS elements are equal to
$1$ (which is equivalent to assuming $\overline{\beta}_{{\rm{min}}}=1$ or
$\overline{\kappa}=0$); however, the true model is as in (7).

  * •

Scenario-II: The true model in (7) is known, but the RIS related parameters,
$\overline{\beta}_{{\rm{min}}},\overline{\kappa},$ and $\overline{\phi}$, are
assumed to be unknown.

  * •

Scenario-III: Both the true model in (7) and the RIS related parameters,
$\overline{\beta}_{{\rm{min}}},\overline{\kappa},$ and $\overline{\phi}$, are
known.

Note that the amplitude variations occur in the RIS elements through the RIS
control model $w_{t,m}$ in (7), while the near-field effects manifest itself
through the steering vector $(\boldsymbol{p})$ in (3). Hence, the considered
scenarios differ in their knowledge about $w_{t,m}$, but they all consider the
same steering vector $(\boldsymbol{p})$.

The motivation for considering Scenario I is to determine the conditions
(regarding, e.g., SNR, RIS size, RIS model parameters
$\overline{\beta}_{{\rm{min}}},\overline{\kappa},$ and $\overline{\phi}$)
under which the conventional unit-amplitude model can be employed for
localization without significant performance degradation, when the true model
is given by (7). On the other hand, we consider Scenario II to investigate how
the effects of RIS amplitude variations on accuracy can be counteracted by
designing powerful algorithms for localization and RIS model calibration, when
the UE is aware of the true model in (7). Scenario III is mainly used for
benchmarking purposes, i.e., to provide an upper bound on the performance of
the algorithms developed under Scenario II.

To handle the different scenarios, the remainder of the manuscript is
organized as follows. In Section III, the MCRB analysis of near-field
localization under Scenario I is performed while Section IV focuses on the
estimator design for Scenario I. Then, the localization algorithms and the
theoretical bounds for Scenario II and Scenario III are presented in Section
V. Finally, numerical examples for all the three scenarios are provided in
Section VI.

##  III Scenario-I: Misspecified Cramér-Rao Bound (MCRB) Analysis

In this scenario, we aim to quantify the localization performance loss due to
the model mismatch resulting from the phase-dependent amplitude variations
specified in (7). To that end, we will resort to the MCRB analysis [41, 44,
55, 56]. In the following, we first describe the true model, which corresponds
to the realistic RIS response model in (7), and the assumed model, which is
the ideal unit-amplitude RIS model commonly employed in the literature. Then,
we provide theoretical background on the MCRB, propose a method to find the
pseudo-true parameter, and derive the MCRB and the corresponding LB.

###  III-A True and Assumed RIS Amplitude Models

####  III-A1 True Model

The true parameter vector $\overline{\boldsymbol{\eta}}$ is given by
$\overline{\boldsymbol{\eta}}\triangleq[\text{Re}(\overline{\alpha})\,\text{Im}(\overline{\alpha})\,\overline{\boldsymbol{p}}^{\mathsf{T}}]^{\mathsf{T}}$.
We define $\mu_{t}$ as

$\displaystyle\mu_{t}\triangleq\overline{\alpha}\sum_{m=1}^{M}[(\overline{\boldsymbol{p}})]_{m}w_{t,m}s_{t}$
(9)

for $t=1,\ldots,T$. Then, the probability density function (pdf) of the true
observation, $p(\boldsymbol{y})$, can be expressed as

$p(\boldsymbol{y})=\left(\frac{1}{\pi
N_{0}}\right)^{T}\exp\left(-\frac{1}{N_{0}}\left\lVert\boldsymbol{y}-\boldsymbol{\mu}\right\rVert^{2}\right),$
(10)

where $\boldsymbol{y}\triangleq[y_{1}\,\ldots\,y_{T}]^{\mathsf{T}}$ and
$\boldsymbol{\mu}\triangleq[\mu_{1}\,\ldots\,\mu_{T}]^{\mathsf{T}}$.

####  III-A2 Assumed Model

In practice, the knowledge of the exact amplitude model in (8), which is
hardware dependent, may not be available. In that case, the ideal model of
$\beta(\theta_{t,m})=1$ can be used. For this assumed model, we represent
$w_{t,m}$ as $\tilde{w}_{t,m}$, which is given by

$\displaystyle\tilde{w}_{t,m}=e^{j\theta_{t,m}}$ (11)

for any $t$ and $m$. Therefore, the misspecified parametric pdf for
$\boldsymbol{\eta}\triangleq[\text{Re}(\alpha)\,\text{Im}(\alpha)\,\boldsymbol{p}^{\mathsf{T}}]^{\mathsf{T}}$
under the assumed model, denoted by
$\tilde{p}(\boldsymbol{y}|\boldsymbol{\eta})$, can be expressed as

$\tilde{p}(\boldsymbol{y}|\boldsymbol{\eta})=\left(\frac{1}{\pi
N_{0}}\right)^{T}\exp\left(-\frac{1}{N_{0}}\left\lVert\boldsymbol{y}-\tilde{\boldsymbol{\mu}}(\boldsymbol{\eta})\right\rVert^{2}\right),$
(12)

where
$\tilde{\boldsymbol{\mu}}(\boldsymbol{\eta})\triangleq[\tilde{{\mu}}_{1}(\boldsymbol{\eta})\,\ldots\,\tilde{{\mu}}_{T}(\boldsymbol{\eta})]^{\mathsf{T}}$,
and

$\displaystyle\tilde{{\mu}}_{t}(\boldsymbol{\eta})\triangleq\alpha\sum_{m=1}^{M}[(\boldsymbol{p})]_{m}\tilde{w}_{t,m}s_{t}$
(13)

for $t=1,\ldots,T$. It is noted that when $\overline{\beta}_{\text{min}}=1$ or
$\overline{\kappa}=0$, $p(\boldsymbol{y})$ and
$\tilde{p}(\boldsymbol{y}|\overline{\boldsymbol{\eta}})$ coincide with each
other for any $\boldsymbol{y}$.

###  III-B MCRB Definition

We introduce the pseudo-true parameter [41], which minimizes the Kullback-
Leibler (KL) divergence between the true pdf in (10) and the misspecified
parametric pdf in (12); namely,

$\boldsymbol{\eta}_{0}=\operatorname*{arg\,min}_{\boldsymbol{\eta}\in\mathbb{R}^{5}}D\left(p(\boldsymbol{y})\|\tilde{p}(\boldsymbol{y}|\boldsymbol{\eta})\right),$
(14)

where
$D\left(p(\boldsymbol{y})\|\tilde{p}(\boldsymbol{y}|\boldsymbol{\eta})\right)$
denotes the KL divergence between the densities $p(\boldsymbol{y})$ and
$\tilde{p}(\boldsymbol{y}|\boldsymbol{\eta})$.

Next, let $\hat{\boldsymbol{\eta}}(\boldsymbol{y})$ be a misspecified-unbiased
(MS-unbiased) estimator of $\overline{\boldsymbol{\eta}}$, i.e., the mean of
the estimator $\hat{\boldsymbol{\eta}}(\boldsymbol{y})$ under the true model
is equal to $\boldsymbol{\eta}_{0}$. The MCRB is a lower bound for the
covariance matrix of any MS-unbiased estimator of
$\overline{\boldsymbol{\eta}}$, $\hat{\boldsymbol{\eta}}(\boldsymbol{y})$ [41,
44, 42]:

$\displaystyle\mathbb{E}_{p}\\{(\hat{\boldsymbol{\eta}}(\boldsymbol{y})-\boldsymbol{\eta}_{0})(\hat{\boldsymbol{\eta}}(\boldsymbol{y})-\boldsymbol{\eta}_{0})^{\mathsf{T}}\\}\succeq{\rm{MCRB}}(\boldsymbol{\eta}_{0}),$
(15)

where $\mathbb{E}_{p}\\{\cdot\\}$ denotes the expectation operator under the
true model $p(\boldsymbol{y})$ and

$\displaystyle{\rm{MCRB}}(\boldsymbol{\eta}_{0})\triangleq\boldsymbol{A}_{\boldsymbol{\eta}_{0}}^{-1}\boldsymbol{B}_{\boldsymbol{\eta}_{0}}\boldsymbol{A}_{\boldsymbol{\eta}_{0}}^{-1},$
(16)

in which the $(i,j)$-th elements of the matrices
$\boldsymbol{A}_{\boldsymbol{\eta}_{0}}$ and
$\boldsymbol{B}_{\boldsymbol{\eta}_{0}}$ are calculated as

$\displaystyle[\boldsymbol{A}_{\boldsymbol{\eta}_{0}}]_{ij}$
$\displaystyle=\mathbb{E}_{p}\left\\{\frac{\partial^{2}}{\partial\eta_{i}\partial\eta_{j}}\log\tilde{p}(\boldsymbol{y}|\boldsymbol{\eta})\Big{|}_{\boldsymbol{\eta}=\boldsymbol{\eta}_{0}}\right\\},$
(17) $\displaystyle[\boldsymbol{B}_{\boldsymbol{\eta}_{0}}]_{ij}$
$\displaystyle=\mathbb{E}_{p}\left\\{\frac{\partial}{\partial\eta_{i}}\log\tilde{p}(\boldsymbol{y}|\boldsymbol{\eta})\frac{\partial}{\partial\eta_{j}}\log\tilde{p}(\boldsymbol{y}|\boldsymbol{\eta})\Big{|}_{\boldsymbol{\eta}=\boldsymbol{\eta}_{0}}\right\\},$
(18)

for $1\leq i,j\leq 5$, with $\eta_{i}$ denoting the $i$th element of
$\boldsymbol{\eta}$.

Since the value of the pseudo-true parameter is generally not of interest, the
MCRB is used to establish the LB of any MS-unbiased estimator with respect to
the true parameter value [41]

$\displaystyle\mathbb{E}_{p}\\{(\hat{\boldsymbol{\eta}}(\boldsymbol{y})-\overline{\boldsymbol{\eta}})(\hat{\boldsymbol{\eta}}(\boldsymbol{y})-\overline{\boldsymbol{\eta}})^{\mathsf{T}}\\}\succeq{\rm{LB}}(\boldsymbol{\eta}_{0}),$
(19)

where

$\displaystyle{\rm{LB}}(\boldsymbol{\eta}_{0})\triangleq{\rm{MCRB}}(\boldsymbol{\eta}_{0})+(\overline{\boldsymbol{\eta}}-\boldsymbol{\eta}_{0})(\overline{\boldsymbol{\eta}}-\boldsymbol{\eta}_{0})^{\mathsf{T}}~{}.$
(20)

The last term in (20) is a bias term; that is,
${\rm{Bias}}(\boldsymbol{\eta}_{0})\triangleq(\overline{\boldsymbol{\eta}}-\boldsymbol{\eta}_{0})(\overline{\boldsymbol{\eta}}-\boldsymbol{\eta}_{0})^{\mathsf{T}}$,
and it is independent of the SNR. Hence, as the SNR tends to infinity, the
MCRB term goes to zero, and the bias term becomes a tight bound for the MSE of
any MS-unbiased estimator.

###  III-C MCRB Derivation for RIS-aided Localization

####  III-C1 Determining the Pseudo-True Parameter

To derive the MCRB for estimating the UE position under mismatch between the
amplitude models for the RIS elements, we should first calculate the
$\boldsymbol{\eta}_{0}$ parameter in (14) for the system model described in
Section II; that is, we should find the value of $\boldsymbol{\eta}$ that
minimizes the KL divergence between $p(\boldsymbol{y})$ in (10) and
$\tilde{p}(\boldsymbol{y}|\boldsymbol{\eta})$ in (12). The following lemma
characterizes $\boldsymbol{\eta}_{0}$ for the considered system model.

######  Lemma 1.

The value of $\boldsymbol{\eta}$ that minimizes the KL divergence between
$p(\boldsymbol{y})$ in (10) and $\tilde{p}(\boldsymbol{y}|\boldsymbol{\eta})$
in (12) can be expressed as

$\boldsymbol{\eta}_{0}=\operatorname*{arg\,min}_{\boldsymbol{\eta}\in\mathbb{R}^{5}}\left\lVert\boldsymbol{\epsilon}(\boldsymbol{\eta})\right\rVert$
(21)

where
$\boldsymbol{\epsilon}(\boldsymbol{\eta})\triangleq[\epsilon_{1}(\boldsymbol{\eta})\,\ldots\,\epsilon_{T}(\boldsymbol{\eta})]^{\mathsf{T}}$
and
$\epsilon_{t}(\boldsymbol{\eta})\triangleq\mu_{t}-\tilde{{\mu}}_{t}(\boldsymbol{\eta})$
for $t=1,\ldots,T$.

###### Proof.

See Appendix A. ∎

######  Remark 1 (Applicability of Lemma 1 to Different RIS Models).

The proof of Lemma 1 does not exploit the specific functional form of the
adopted (true) RIS model in (8) and thus can be applied to different RIS
models. Hence, Lemma 1 can be used to compute the MCRB and LB in (20) for any
choice of the RIS element model $\beta(\theta_{t,m})$ in (8) by simply
plugging the corresponding $w_{t,m}$ in (7) into the true model expressions in
(9) and (10).

Lemma 1 states that the pseudo-true parameter minimizes the Euclidean distance
between the noise-free observations under the true and assumed models.

Let
$\gamma(\boldsymbol{\eta})\triangleq\left\lVert\boldsymbol{\epsilon}(\boldsymbol{\eta})\right\rVert=\left\lVert\boldsymbol{\mu}-\tilde{\boldsymbol{\mu}}(\boldsymbol{\eta})\right\rVert$.
It is noted from (9) and (13) that $\gamma(\boldsymbol{\eta})$ is non-convex
with respect to $\boldsymbol{\eta}$; hence, it is challenging to solve (21) in
its current form. Based on (12) and (13), we can re-write (21) as

$\displaystyle({\boldsymbol{\alpha}}_{0},\boldsymbol{p}_{0})=\operatorname*{arg\,min}_{({\boldsymbol{\alpha}},\boldsymbol{p})}\left\lVert\boldsymbol{\mu}-\alpha\,\boldsymbol{c}(\boldsymbol{p})\right\rVert,$
(22)

where
$[\boldsymbol{c}(\boldsymbol{p})]_{t}\triangleq\sum_{m=1}^{M}[(\boldsymbol{p})]_{m}\tilde{w}_{t,m}s_{t}$.
The optimal complex-valued $\alpha$ for any given $\boldsymbol{p}$ can be
expressed as

$\displaystyle\alpha={\color[rgb]{0,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@gray@stroke{0}\pgfsys@color@gray@fill{0}\boldsymbol{c}(\boldsymbol{p})^{\dagger}\boldsymbol{\mu}}~{},$
(23)

where
$\boldsymbol{X}^{\dagger}=(\boldsymbol{X}^{\mathsf{H}}\boldsymbol{X})^{-1}\boldsymbol{X}^{\mathsf{H}}$
denotes pseudo-inverse. Inserting (23) into (22), the problem can be reduced
to a 3-D search as follows:

$\displaystyle\boldsymbol{p}_{0}={\color[rgb]{0,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@gray@stroke{0}\pgfsys@color@gray@fill{0}\operatorname*{arg\,min}_{\boldsymbol{p}}\left\lVert\boldsymbol{\Pi}^{\perp}_{\boldsymbol{c}(\boldsymbol{p})}\boldsymbol{\mu}\right\rVert~{},}$
(24)

where
$\boldsymbol{\Pi}^{\perp}_{\boldsymbol{X}}={\boldsymbol{\mathrm{I}}}-\boldsymbol{\Pi}_{\boldsymbol{X}}$
and $\boldsymbol{\Pi}_{\boldsymbol{X}}=\boldsymbol{X}\boldsymbol{X}^{\dagger}$
denotes the orthogonal projection matrix onto the column space of
$\boldsymbol{X}$. Therefore,
$\boldsymbol{\eta}_{0}=[{\boldsymbol{\alpha}}_{0}^{\mathsf{T}}~{}\boldsymbol{p}_{0}^{\mathsf{T}}]^{\mathsf{T}}$
can be found by first performing a 3-D optimization as in (24), and then
calculating $\alpha_{0}$ via (23) and obtaining ${\boldsymbol{\alpha}}_{0}$ as
${\boldsymbol{\alpha}}_{0}=[\text{Re}(\alpha_{0})~{}\text{Im}(\alpha_{0})]^{\mathsf{T}}$.

######  Remark 2 (Initialization of (24)).

In order to determine the pseudo-true parameter or equivalently to find
$\boldsymbol{p}_{0}$ in (24), the true location $\overline{\boldsymbol{p}}$
can be used for initialization, which reduces the computational complexity of
MCRB calculation significantly.

######  Remark 3 (Special Cases of MCRB).

As $\overline{\beta}_{{\rm{min}}}$ approaches $1$, or $\overline{\kappa}$
approaches $0$, the RIS amplitude $\beta(\theta_{t,m})$ in (8) converges to
$1$, implying that the phase-dependent amplitude variations model (true model)
in (7) converges to the standard unit-amplitude model (assumed model) in (11).
In that case, the mismatch between the reality and the assumed model vanishes,
which suggests that the pseudo-true parameter $\boldsymbol{\eta}_{0}$ in (21)
approaches the true parameter $\overline{\boldsymbol{\eta}}$. As a result, the
bias term in (20) disappears and the MCRB in (16) reverts to the classical
Cramér-Rao bound (CRB) expression since
$\boldsymbol{A}_{\boldsymbol{\eta}_{0}}=\boldsymbol{A}_{\overline{\boldsymbol{\eta}}}=-\boldsymbol{B}_{\boldsymbol{\eta}_{0}}=-\boldsymbol{B}_{\overline{\boldsymbol{\eta}}}$
[44].

####  III-C2 Deriving the MCRB

After finding $\boldsymbol{\eta}_{0}$, we compute the matrices
$\boldsymbol{A}_{\boldsymbol{\eta}_{0}}$ from (17) and
$\boldsymbol{B}_{\boldsymbol{\eta}_{0}}$ from (18) for evaluating the MCRB in
(15). Based on the pdf expressions in (10)–(12), (17) becomes

$\displaystyle[\boldsymbol{A}_{{\boldsymbol{\eta}_{0}}}]_{ij}=-\frac{1}{N_{0}}\left(\int\frac{\partial^{2}}{\partial\eta_{i}\partial\eta_{j}}\left\lVert\boldsymbol{y}-\tilde{\boldsymbol{\mu}}(\boldsymbol{\eta})\right\rVert^{2}p(\boldsymbol{y})\,d\boldsymbol{y}\right)\Bigg{|}_{\boldsymbol{\eta}=\boldsymbol{\eta}_{0}}$
(25)
$\displaystyle=-\frac{1}{N_{0}}\left(\sum_{t=1}^{T}\int\frac{\partial^{2}}{\partial\eta_{i}\partial\eta_{j}}\left|y_{t}-\tilde{{\mu}}_{t}(\boldsymbol{\eta})\right|^{2}p(\boldsymbol{y})\,d\boldsymbol{y}\right)\Bigg{|}_{\boldsymbol{\eta}=\boldsymbol{\eta}_{0}}$
(26)
$\displaystyle=-\frac{1}{N_{0}}\left(\sum_{t=1}^{T}\int\frac{\partial^{2}}{\partial\eta_{i}\partial\eta_{j}}\left|y_{t}-\tilde{{\mu}}_{t}(\boldsymbol{\eta})\right|^{2}p(y_{t})\,dy_{t}\right)\Bigg{|}_{\boldsymbol{\eta}=\boldsymbol{\eta}_{0}}$
(27)
$\displaystyle=\frac{2}{N_{0}}\text{Re}\left\\{\sum_{t=1}^{T}\epsilon_{t}(\boldsymbol{\eta})^{*}\frac{\partial^{2}\tilde{{\mu}}_{t}(\boldsymbol{\eta})}{\partial\eta_{i}\eta_{j}}-\frac{\partial\tilde{{\mu}}_{t}^{*}(\boldsymbol{\eta})}{\partial\eta_{i}}\frac{\partial\tilde{{\mu}}_{t}(\boldsymbol{\eta})}{\partial\eta_{j}}\right\\}\Bigg{|}_{\boldsymbol{\eta}=\boldsymbol{\eta}_{0}}~{}.$
(28)

In addition, after some algebraic manipulation, the $(i,j)$th entry of matrix
$\boldsymbol{B}_{\boldsymbol{\eta}_{0}}$ in (18) can be written as the sum of
four terms as
$[\boldsymbol{B}_{\boldsymbol{\eta}_{0}}]_{ij}=T_{1}+T_{2}+T_{3}+T_{4}$, where

$\displaystyle
T_{1}=\frac{1}{N_{0}^{2}}\left(\sum_{t=1}^{T}\frac{\partial\tilde{{\mu}}_{t}(\boldsymbol{\eta})}{\partial\eta_{i}}\epsilon_{t}(\boldsymbol{\eta})^{*}\right)\left(\sum_{l=1}^{T}\frac{\partial\tilde{{\mu}}_{l}(\boldsymbol{\eta})}{\partial\eta_{j}}\epsilon_{l}(\boldsymbol{\eta})^{*}\right)\Bigg{|}_{\boldsymbol{\eta}=\boldsymbol{\eta}_{0}}$
$\displaystyle
T_{2}=\Bigg{[}\frac{1}{N_{0}^{2}}\left(\sum_{t=1}^{T}\frac{\partial\tilde{{\mu}}_{t}(\boldsymbol{\eta})}{\partial\eta_{i}}\epsilon_{t}(\boldsymbol{\eta})^{*}\right)$
$\displaystyle\times\left(\sum_{l=1}^{T}\frac{\partial\tilde{{\mu}}_{l}^{*}(\boldsymbol{\eta})}{\partial\eta_{j}}\epsilon_{l}(\boldsymbol{\eta})\right)+\frac{1}{N_{0}}\sum_{t=1}^{T}\frac{\partial\tilde{{\mu}}_{t}(\boldsymbol{\eta})}{\partial\eta_{i}}\frac{\partial\tilde{{\mu}}_{t}^{*}(\boldsymbol{\eta})}{\partial\eta_{j}}\Bigg{]}\Bigg{|}_{\boldsymbol{\eta}=\boldsymbol{\eta}_{0}}$
$\displaystyle
T_{3}=\frac{1}{N_{0}^{2}}\left(\sum_{t=1}^{T}\frac{\partial\tilde{{\mu}}_{t}^{*}(\boldsymbol{\eta})}{\partial\eta_{i}}\epsilon_{t}(\boldsymbol{\eta})\right)\left(\sum_{t=1}^{T}\frac{\partial\tilde{{\mu}}_{l}^{*}(\boldsymbol{\eta})}{\partial\eta_{j}}\epsilon_{l}(\boldsymbol{\eta})\right)\Bigg{|}_{\boldsymbol{\eta}=\boldsymbol{\eta}_{0}}$
$\displaystyle
T_{4}=\Bigg{[}\frac{1}{N_{0}^{2}}\left(\sum_{t=1}^{T}\frac{\partial\tilde{{\mu}}_{t}^{*}(\boldsymbol{\eta})}{\partial\eta_{i}}\epsilon_{t}(\boldsymbol{\eta})\right)$
$\displaystyle\times\left(\sum_{l=1}^{T}\frac{\partial\tilde{{\mu}}_{l}(\boldsymbol{\eta})}{\partial\eta_{j}}\epsilon_{l}(\boldsymbol{\eta})^{*}\right)+\frac{1}{N_{0}}\sum_{t=1}^{T}\frac{\partial\tilde{{\mu}}_{t}^{*}(\boldsymbol{\eta})}{\partial\eta_{i}}\frac{\partial\tilde{{\mu}}_{t}(\boldsymbol{\eta})}{\partial\eta_{j}}\Bigg{]}\Bigg{|}_{\boldsymbol{\eta}=\boldsymbol{\eta}_{0}}~{}.$

Hence, $[\boldsymbol{A}_{{\boldsymbol{\eta}_{0}}}]_{ij}$ and
$[\boldsymbol{B}_{\boldsymbol{\eta}_{0}}]_{ij}$ can be written in more compact
forms as follows:

$\displaystyle[\boldsymbol{A}_{\boldsymbol{\eta}_{0}}]_{ij}=\frac{2}{N_{0}}\text{Re}\left\\{\boldsymbol{\epsilon}(\boldsymbol{\eta})^{\mathsf{H}}\frac{\partial^{2}\tilde{\boldsymbol{\mu}}(\boldsymbol{\eta})}{\partial\eta_{i}\partial\eta_{j}}-\Big{(}\frac{\partial\tilde{\boldsymbol{\mu}}(\boldsymbol{\eta})}{\partial\eta_{i}}\Big{)}^{\mathsf{H}}\frac{\partial\tilde{\boldsymbol{\mu}}(\boldsymbol{\eta})}{\partial\eta_{j}}\right\\}\Bigg{|}_{\boldsymbol{\eta}=\boldsymbol{\eta}_{0}}$
(29)
$\displaystyle[\boldsymbol{B}_{\boldsymbol{\eta}_{0}}]_{ij}=\frac{2}{N_{0}}\Bigg{[}\frac{2}{N_{0}}\text{Re}\left\\{\boldsymbol{\epsilon}(\boldsymbol{\eta})^{\mathsf{H}}\frac{\partial\tilde{\boldsymbol{\mu}}(\boldsymbol{\eta})}{\partial\eta_{i}}\right\\}\text{Re}\left\\{\boldsymbol{\epsilon}(\boldsymbol{\eta})^{\mathsf{H}}\frac{\partial\tilde{\boldsymbol{\mu}}(\boldsymbol{\eta})}{\partial\eta_{j}}\right\\}$
$\displaystyle+\text{Re}\left\\{\left(\frac{\partial\tilde{\boldsymbol{\mu}}(\boldsymbol{\eta})}{\partial\eta_{i}}\right)^{\mathsf{H}}\frac{\partial\tilde{\boldsymbol{\mu}}(\boldsymbol{\eta})}{\partial\eta_{j}}\right\\}\Bigg{]}\Bigg{|}_{\boldsymbol{\eta}=\boldsymbol{\eta}_{0}}~{},$
(30)

where

$\frac{\partial^{2}\tilde{\boldsymbol{\mu}}(\boldsymbol{\eta})}{\partial\eta_{i}\partial\eta_{j}}\triangleq\left[\frac{\partial^{2}\tilde{{\mu}}_{1}(\boldsymbol{\eta})}{\partial\eta_{i}\partial\eta_{j}}\,\ldots\,\frac{\partial^{2}\tilde{{\mu}}_{T}(\boldsymbol{\eta})}{\partial\eta_{i}\partial\eta_{j}}\right]^{\mathsf{T}}.$
(31)

Therefore, once we compute the first and the second derivatives of
$\tilde{{\mu}}_{t}(\boldsymbol{\eta})$ with respect to $\boldsymbol{\eta}$, we
can easily compute the matrices $\boldsymbol{A}_{\boldsymbol{\eta}_{0}}$ and
$\boldsymbol{B}_{\boldsymbol{\eta}_{0}}$ as specified above. The derivatives
are presented in Appendix E. Based on $\boldsymbol{A}_{\boldsymbol{\eta}_{0}}$
and $\boldsymbol{B}_{\boldsymbol{\eta}_{0}}$, the MCRB in (15) and the lower
bound in (19) can be evaluated in a straightforward manner.

###  III-D Localization Accuracy vs. Number of Transmissions

In order to illustrate the relationship between the localization accuracy and
the number of transmissions, we analyze how the trace of the MCRB or the LB
changes with respect to the number of transmissions, $T$. We consider two sets
of observations for the same values of the true parameter vector
$\overline{\boldsymbol{\eta}}$, the RIS size $M$, and the RIS related
parameters $\beta_{{\rm{min}}},\kappa,\phi$.

We prove that if repetitive RIS phase profiles are used, the MCRB and LB do
not decay with $1/T$ whereas the CRB does. To be more specific, we state the
following lemma.

######  Lemma 2.

For the $k$-th set of the observations, let the number of observations, the
phase profile and the corresponding pseudo-true parameter be given by
$T^{(k)}$,
$\boldsymbol{\theta}^{(k)}=\\{\theta^{(k)}_{t,m}\\}_{\\{t=1,m=1\\}}^{\\{T^{(k)},M\\}}$,
and $\boldsymbol{\eta}_{0}^{(k)}$, respectively, where $k\in\\{1,2\\}$.

  * •

We assume that $T^{(2)}=KT^{(1)}$, where $K\in\mathbb{N}$.

  * •

Moreover, for the phase profiles, for any $1\leq m\leq M$, assume that

$\theta^{(2)}_{t,m}=\theta^{(1)}_{(t\text{ mod }T^{(1)}),m}$ (32)

where $\big{(}t\text{ mod }T^{(1)}\big{)}$ denotes the remainder of the
division of $t$ by $T^{(1)}$.

Let ${\rm{MCRB}}\big{(}T^{(k)},\boldsymbol{\eta}_{0}^{(k)}\big{)}$,
${\rm{LB}}\big{(}T^{(k)},\boldsymbol{\eta}_{0}^{(k)}\big{)}$ and
${\rm{CRB}}\big{(}T^{(k)}\big{)}$ denote the corresponding MCRB, LB and CRB
for the $k$-th set of observations. Then,

$\displaystyle\frac{1}{K}<\frac{\operatorname{Tr}\big{\\{}{\rm{MCRB}}\big{(}T^{(2)},\boldsymbol{\eta}_{0}^{(2)}\big{)}\big{\\}}}{\operatorname{Tr}\big{\\{}{\rm{MCRB}}\big{(}T^{(1)},\boldsymbol{\eta}_{0}^{(1)}\big{)}\big{\\}}}<1,$
$\displaystyle~{}\frac{1}{K}<\frac{\operatorname{Tr}\big{\\{}{\rm{LB}}\big{(}T^{(2)},\boldsymbol{\eta}_{0}^{(2)}\big{)}\big{\\}}}{\operatorname{Tr}\big{\\{}{\rm{LB}}\big{(}T^{(1)},\boldsymbol{\eta}_{0}^{(1)}\big{)}\big{\\}}}<1~{}\text{and}~{}\frac{\operatorname{Tr}\big{\\{}{\rm{CRB}}\big{(}T^{(2)}\big{)}\big{\\}}}{\operatorname{Tr}\big{\\{}{\rm{CRB}}\big{(}T^{(1)}\big{)}\big{\\}}}=\frac{1}{K}.$

###### Proof.

See Appendix B. ∎

Lemma 2 reveals that the trace of the CRB decays with $1/T$ while that of the
MCRB or LB decays slower than $1/T$ due to model misspecification.

##  IV Scenario-I: Mismatched Estimator

In this section, we focus on estimator design for Scenario-I. First, we derive
the plain MML estimator, which entails computationally prohibitive high-
dimensional non-convex optimization. To circumvent this, we then propose a
low-complexity estimator capitalizing on the Jacobi-Anger expansion, which
reduces the problem to a series of line searches over range, azimuth, and
elevation domains.

###  IV-A Mismatched Maximum Likelihood (MML) Estimator

Given the pdf of the assumed model in (12), the MML estimator is given by [41]

$\hat{\boldsymbol{\eta}}_{\text{MML}}(\boldsymbol{y})=\operatorname*{arg\,max}_{\boldsymbol{\eta}\in\mathbb{R}^{5}}\log\tilde{p}(\boldsymbol{y}|\boldsymbol{\eta}).$
(33)

Under some regularity conditions, it can be shown that
$\hat{\boldsymbol{\eta}}_{\text{MML}}(\boldsymbol{y})$ is asymptotically MS-
unbiased and its error covariance matrix is asymptotically equal to the
${\rm{MCRB}}(\boldsymbol{\eta}_{0})$ [41, Thm. 2]. Hence, the covariance
matrix of the MML estimator is asymptotically tight to the MCRB.

From (12) and (33), the MML estimator based on the received signal
$\boldsymbol{y}$ in (1) can be expressed as

$\displaystyle\hat{\boldsymbol{\eta}}_{\text{MML}}(\boldsymbol{y})$
$\displaystyle=\operatorname*{arg\,max}_{\boldsymbol{\eta}\in\mathbb{R}^{5}}\log\tilde{p}(\boldsymbol{y}\lvert\boldsymbol{\eta})=\operatorname*{arg\,min}_{\boldsymbol{\eta}\in\mathbb{R}^{5}}\left\lVert\boldsymbol{y}-\tilde{\boldsymbol{\mu}}(\boldsymbol{\eta})\right\rVert.$
(34)

Since this problem is in the same form as in (21), it can be reduced to a 3-D
optimization problem as discussed in Section III-C. In order to solve the
resulting problem, initialization can be very critical as we are faced with a
non-convex optimization problem. During the estimation process, we do not have
access to the true position $\overline{\boldsymbol{p}}$. Hence, we cannot use
the true position vector $\overline{\boldsymbol{p}}$ for the initialization.
If an arbitrarily chosen position vector is used for the initialization, the
global optimal solution of (33) cannot always be obtained. To find a remedy
for this issue, we next propose an approximated version of the MML estimator
in (34), namely, the approximate mismatched maximum likelihood (AMML)
estimator. Additionally, to reduce the complexity of the proposed algorithm,
we propose a Jacobi-Anger expansion based approach when the number of
transmissions is sufficiently large [27, 43],[57].

###  IV-B AMML Estimator

Let us first re-write $\tilde{\boldsymbol{\mu}}(\boldsymbol{\eta})$ in (13)
using (2) as

$\displaystyle\tilde{\boldsymbol{\mu}}(\boldsymbol{\eta})$
$\displaystyle=\alpha\underbrace{\begin{bmatrix}\left(\tilde{\boldsymbol{w}}_{1}\odot(\boldsymbol{p}_{\text{BS}})\right)^{\mathsf{T}}\\\
\vdots\\\
\left(\tilde{\boldsymbol{w}}_{T}\odot(\boldsymbol{p}_{\text{BS}})\right)^{\mathsf{T}}\end{bmatrix}}_{\triangleq{\boldsymbol{Q}}\in\mathbb{C}^{T\times
M}}(\boldsymbol{p})\sqrt{E_{s}}~{},$
$\displaystyle=\alpha{\boldsymbol{Q}}(\boldsymbol{p})\sqrt{E_{s}}~{},$ (35)

where
$\tilde{\boldsymbol{w}}_{t}\triangleq[\tilde{w}_{t,1}\,\ldots\,\tilde{w}_{t,M}]^{\mathsf{T}}$
and $s_{t}=\sqrt{E_{s}}$ for any $t$. Inserting (35) into (34), the MML
estimator becomes

$\displaystyle(\widehat{\alpha},\widehat{d},\widehat{\vartheta},\widehat{\varphi})=\operatorname*{arg\,min}_{\alpha,d,\vartheta,\varphi}\left\lVert\boldsymbol{y}-\alpha\,{\boldsymbol{Q}}\left(\boldsymbol{p}(d,\vartheta,\varphi)\right)\sqrt{E_{s}}\right\rVert~{},$
(36)

where

$\displaystyle\boldsymbol{p}(d,\vartheta,\varphi)\triangleq\boldsymbol{p}_{\text{RIS}}+d\,[\sin\vartheta\cos\varphi~{}\sin\vartheta\sin\varphi~{}\cos\vartheta]^{\mathsf{T}}$
(37)

denotes the position vector with respect to $\boldsymbol{p}_{\text{RIS}}$ in
spherical coordinates according to the definitions after (5). Since
$\widehat{\alpha}$ can be obtained in closed-form as a function of the other
unknowns as in (23), (36) can be solved via 3-D optimization. In the
following, we describe the steps to solve (36) in an efficient manner.

####  IV-B1 Approximation of Near-Field as Far-Field for Initial Azimuth and
Elevation Estimation

To avoid 3-D search in (36), we approximate the near-field steering vector as
its far-field counterpart via (4):

$[(\boldsymbol{p})]_{m}{\color[rgb]{0,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@gray@stroke{0}\pgfsys@color@gray@fill{0}\approx[(\vartheta,\varphi)]_{m}}~{},$
(38)

which reduces (36) to

$\displaystyle(\widehat{\alpha},\widehat{\vartheta},\widehat{\varphi})=\operatorname*{arg\,min}_{\alpha,\vartheta,\varphi}\left\lVert\boldsymbol{y}-\alpha\,{\boldsymbol{Q}}(\vartheta,\varphi)\sqrt{E_{s}}\right\rVert~{}.$
(39)

Similar to (23), $\widehat{\alpha}$ can be estimated in closed-form as a
function of $\vartheta$ and $\varphi$ in (39), leading to

$\displaystyle(\widehat{\vartheta},\widehat{\varphi})=\operatorname*{arg\,min}_{\begin{subarray}{c}\vartheta\in[0,\,\pi/2]\\\
\varphi\in[0,\,2\pi]\end{subarray}}\left\lVert\boldsymbol{\Pi}^{\perp}_{{\boldsymbol{Q}}(\vartheta,\varphi)}\boldsymbol{y}\right\rVert~{}.$
(40)

In (40), initial azimuth and elevation estimates can be found by conducting
2-D search over $\vartheta$ and $\varphi$.

####  IV-B2 Switching Back to Near-Field for Location Estimation

Starting from the initial estimates $\widehat{\vartheta}$ and
$\widehat{\varphi}$ in the approximated MML estimator (40), location
estimation can be performed by switching back to the original MML estimator
(36) based on the near-field model via the following alternating iterations.

  * •

Update $d$: Given $\widehat{\vartheta}$ and $\widehat{\varphi}$, we estimate
distance $d$ in (36) as

$\displaystyle(\widehat{\alpha},\widehat{d})=\operatorname*{arg\,min}_{\alpha,d}\left\lVert\boldsymbol{y}-\alpha\,{\boldsymbol{Q}}\big{(}\boldsymbol{p}(d,\widehat{\vartheta},\widehat{\varphi})\big{)}\sqrt{E_{s}}\right\rVert~{}.$
(41)

Similar to the solution of (39), distance can be estimated from (41) via

$\widehat{d}=\operatorname*{arg\,min}_{d\in(0,d_{\rm{max}})}\left\lVert\boldsymbol{\Pi}^{\perp}_{{\boldsymbol{Q}}(\boldsymbol{p}(d,\widehat{\vartheta},\widehat{\varphi}))}\boldsymbol{y}\right\rVert~{},$
(42)

which entails a simple line search for a given maximum distance $d_{\rm{max}}$
imposed by near-field conditions in (6).

  * •

Update $\vartheta$ and $\varphi$: Given $\widehat{d}$ from (42), azimuth and
elevation estimates can be updated in (36) via

$\displaystyle(\widehat{\alpha},\widehat{\vartheta},\widehat{\varphi})=\operatorname*{arg\,min}_{\alpha,\vartheta,\varphi}\left\lVert\boldsymbol{y}-\alpha\,{\boldsymbol{Q}}\big{(}\boldsymbol{p}(\widehat{d},\vartheta,\varphi)\big{)}\sqrt{E_{s}}\right\rVert~{},$
(43)

leading to

$\displaystyle(\widehat{\vartheta},\widehat{\varphi})=\operatorname*{arg\,min}_{\begin{subarray}{c}\vartheta\in[0,\,\pi/2]\\\
\varphi\in[0,\,2\pi]\end{subarray}}\left\lVert\boldsymbol{\Pi}^{\perp}_{{\boldsymbol{Q}}(\boldsymbol{p}(\widehat{d},\vartheta,\varphi))}\boldsymbol{y}\right\rVert~{}.$
(44)

After a predetermined number of iterations $I_{\rm{max}}$, the resulting
estimates of elevation, azimuth and distance from (42) and (44) are inserted
into $\boldsymbol{p}(\widehat{d},\widehat{\vartheta},\widehat{\varphi})$ in
(37) to find the AMML estimate for the UE location.

To further reduce the complexity, we next propose a Jacobi-Anger expansion
based estimator that avoids 2-D searches in (40) and (44) for large number of
transmissions $T$.

###  IV-C Jacobi-Anger Expansion Based AMML Estimator for Large Number of
Transmissions

In this part, we develop a low-complexity multi-step approach to estimate the
UE position in the MML estimator (36) by leveraging the Jacobi-Anger expansion
[58], as detailed in the following.

####  IV-C1 Jacobi-Anger Approximation to Decouple Azimuth and Elevation
Parameters in Far-Field

Similar to Sec. IV-B, we begin by invoking the far-field approximation in (4)
and considering the resulting approximated estimator in (39). Using (97), the
far-field steering vector in (4) can be expressed as

$\displaystyle[(\vartheta,\varphi)]_{m}=\exp\left(j\frac{2\pi}{\lambda}q_{m}\sin(\vartheta)\cos(\varphi-\psi_{m})\right)~{},$
(45)

where $q_{m}$ and $\psi_{m}$ are defined in (95). By employing the Jacobi-
Anger expansion, $[(\vartheta,\varphi)]_{m}$ in (45) can be expressed as [58,
Eq. (17.1.7)]

${\color[rgb]{0,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@gray@stroke{0}\pgfsys@color@gray@fill{0}[(\vartheta,\varphi)]_{m}}=\sum_{n=-\infty}^{\infty}j^{n}J_{n}\left(\frac{2\pi}{\lambda}{\color[rgb]{0,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@gray@stroke{0}\pgfsys@color@gray@fill{0}q_{m}}\sin\vartheta\right)e^{jn(\varphi-\psi_{m})}~{},$
(46)

where $J_{n}(\cdot)$ is the $n$th order Bessel function of the first kind. As
$\left|J_{n}(\cdot)\right|$ decays to $0$ as $\left|n\right|$ increases, by
neglecting the terms with $\left|n\right|>N$, for some $N\in\mathbb{N}$, (46)
can be approximated by[57]

${\color[rgb]{0,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@gray@stroke{0}\pgfsys@color@gray@fill{0}[(\vartheta,\varphi)]_{m}}\approx\sum_{n=-N}^{N}j^{n}J_{n}\left(\frac{2\pi}{\lambda}{\color[rgb]{0,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@gray@stroke{0}\pgfsys@color@gray@fill{0}q_{m}}\sin\vartheta\right)e^{jn(\varphi-\psi_{m})}~{},$
(47)

where

$\displaystyle N>\frac{2\pi}{\lambda}q_{\rm{max}}\sin\vartheta$ (48)

enables sufficient precision for high-quality approximation [57], with
$q_{\rm{max}}$ denoting the maximum distance of any RIS element from the RIS
centre. To provide a compact expression for (47), we define
$\boldsymbol{g}_{m}(\vartheta)\in\mathbb{C}^{(2N+1)\times 1}$ and
$\boldsymbol{h}(\varphi)\in\mathbb{C}^{(2N+1)\times 1}$ as

$\displaystyle[\boldsymbol{g}_{m}(\vartheta)]_{n}$
$\displaystyle=j^{n}J_{n}\left(\frac{2\pi}{\lambda}{\color[rgb]{0,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@gray@stroke{0}\pgfsys@color@gray@fill{0}q_{m}}\sin\vartheta\right)e^{-jn\psi_{m}}~{},$
(49) $\displaystyle[\boldsymbol{h}(\varphi)]_{n}$
$\displaystyle=e^{jn\varphi}$ (50)

for $n\in\\{-N,\ldots,N\\}$. Then, inserting (49) and (50) into (47) yields

${\color[rgb]{0,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@gray@stroke{0}\pgfsys@color@gray@fill{0}(\vartheta,\varphi)}\approx\boldsymbol{G}^{\mathsf{T}}(\vartheta)\boldsymbol{h}(\varphi),$
(51)

where

$\boldsymbol{G}(\vartheta)=[\boldsymbol{g}_{1}(\vartheta)\,\ldots\,\boldsymbol{g}_{M}(\vartheta)]\in\mathbb{C}^{(2N+1)\times
M}.$ (52)

As seen from (51), the proposed Jacobi-Anger expansion of the far-field RIS
steering vector in (45) enables decoupling azimuth and elevation parameters in
a matrix-vector multiplication form.

####  IV-C2 Azimuth and Elevation Estimation via Unstructured ML

We can now exploit the structure in (51) to recast the MML estimator in (39)
as

$\displaystyle(\widehat{\alpha},\widehat{\vartheta},\widehat{\varphi})=\operatorname*{arg\,min}_{\alpha,\vartheta,\varphi}\left\lVert\boldsymbol{y}-\alpha\,{\boldsymbol{Q}}\boldsymbol{G}^{\mathsf{T}}(\vartheta)\boldsymbol{h}(\varphi)\sqrt{E_{s}}\right\rVert~{}.$
(53)

To enable decoupled estimation of azimuth and elevation parameters in (53), we
resort to unstructured ML techniques [59]. To this end, let

$\displaystyle\boldsymbol{f}\triangleq\alpha\,\boldsymbol{h}(\varphi)\sqrt{E_{s}}\in\mathbb{C}^{(2N+1)\times
1}$ (54)

denote the unstructured vector where the dependency on $\alpha$ and $\varphi$
is dropped. Substituting (54) into (53) yields the unstructured ML
optimization problem:

$\displaystyle(\widehat{\boldsymbol{f}},\widehat{\vartheta})=\operatorname*{arg\,min}_{\boldsymbol{f},\vartheta}\left\lVert\boldsymbol{y}-{\boldsymbol{Q}}\boldsymbol{G}^{\mathsf{T}}(\vartheta)\boldsymbol{f}\right\rVert~{}.$
(55)

In (55), $\widehat{\boldsymbol{f}}$ can be readily obtained as a function of
$\vartheta$

$\displaystyle\widehat{\boldsymbol{f}}=\left({\boldsymbol{Q}}\boldsymbol{G}^{\mathsf{T}}(\vartheta)\right)^{\dagger}\boldsymbol{y}$
(56)

under the condition $T\geq 2N+1$, noting that
${\boldsymbol{Q}}\boldsymbol{G}^{\mathsf{T}}(\vartheta)\in\mathbb{C}^{T\times(2N+1)}$.
By plugging (56) back into (55), elevation can be estimated via a simple line
search:

$\widehat{\vartheta}=\operatorname*{arg\,min}_{\vartheta\in[0,\,\pi/2]}\left\lVert\boldsymbol{\Pi}^{\perp}_{{\boldsymbol{Q}}\boldsymbol{G}^{\mathsf{T}}(\vartheta)}\boldsymbol{y}\right\rVert~{}.$
(57)

Using the estimated elevation $\widehat{\vartheta}$ in (57), the ML problem in
(53) can be recast as

$\displaystyle(\widehat{\alpha},\widehat{\varphi})=\operatorname*{arg\,min}_{\alpha,\varphi}\left\lVert\boldsymbol{y}-\alpha\,{\boldsymbol{Q}}\boldsymbol{G}^{\mathsf{T}}(\widehat{\vartheta})\boldsymbol{h}(\varphi)\sqrt{E_{s}}\right\rVert~{},$
(58)

where the task of azimuth estimation boils down to a line search:

$\widehat{\varphi}=\operatorname*{arg\,min}_{\varphi\in[0,\,2\pi]}\left\lVert\boldsymbol{\Pi}^{\perp}_{{\boldsymbol{Q}}\boldsymbol{G}^{\mathsf{T}}(\widehat{\vartheta})\boldsymbol{h}(\varphi)}\boldsymbol{y}\right\rVert~{}.$
(59)

####  IV-C3 Distance Estimation Using the Near-Field Model

Having estimated the elevation and azimuth in (57) and (59), respectively,
using the far-field approximation, we can now switch back to the original
near-field based MML estimator in (36) and retrieve distance information via
(42).

###  IV-D Summary of AMML Based Algorithm

In Sec. IV-B and Sec. IV-C, we propose two approaches to implement the MML
estimator in (34). The approach in Sec. IV-B can be used for any number of
transmissions $T$, while the one in Sec. IV-C represents a low-complexity
alternative that can be employed for $T\geq T_{\rm{thr}}=2N+1$ due to the
condition imposed in (56). Here, $N$ can be set according to (48). Therefore,
we can decide on the preferred approach depending on whether $T\geq
T_{\rm{thr}}$ holds. The entire algorithm is summarized in Algorithm 1.

Algorithm 1 AMML Algorithm for RIS-aided Near-Field Localization via Jacobi-
Anger Expansion

1:Input: Observation $\boldsymbol{y}$ in (1), $T_{\rm{thr}}$, $I_{\rm{max}}$.

2:Output: Location estimate $\widehat{\boldsymbol{p}}$.

3:if $T\geq T_{\rm{thr}}$ then

4: Estimate the elevation $\widehat{\vartheta}$ by solving (57).

5: Using $\widehat{\vartheta}$, estimate the azimuth $\widehat{\varphi}$ by
solving (59).

6: Using $\widehat{\vartheta}$ and $\widehat{\varphi}$, estimate the distance
$\widehat{d}$ by solving (42).

7:else

8: Find the initial estimates $\widehat{\vartheta}$ and $\widehat{\varphi}$ by
solving (40).

9: Set $i=0$.

10: while the objective function in (36) does not converge and
$i<I_{\rm{max}}$ do

11: Update $\widehat{d}$ by solving (42).

12: Update $\widehat{\vartheta}$ and $\widehat{\varphi}$ by solving (44).

13: Set $i=i+1$.

14: end while

15:end if

16:Compute the location estimate via (37) as
$\widehat{\boldsymbol{p}}=\boldsymbol{p}(\widehat{d},\widehat{\vartheta},\widehat{\varphi})$.

###  IV-E Complexity and Convergence of Algorithm 1

To evaluate the computational complexity of Algorithm 1, suppose that the
search intervals for distance, azimuth and elevation are discretized into
grids of size $K$ each. We assume that $K,M>T$, which is reasonable given the
large RIS size and a fine search granularity required for high-quality
estimates. As shown in detail in Appendix C, the overall cost of Algorithm 1
for $T<T_{\rm{thr}}=2N+1$ and $T\geq T_{\rm{thr}}$ is given by
$\mathcal{O}(TK^{2}M)$ and $\mathcal{O}\left(TM(2N+1)K\right)$, respectively.
For $T\geq T_{\rm{thr}}$, we have $K>T\geq 2N+1$, leading to $TM(2N+1)K\leq
TK^{2}M$. Thus, it can be concluded that, when $T$ is sufficiently large, by
using the Jacobi-Anger expansion based estimator in Sec. IV-C, we decrease the
computational complexity. Thus, for $T\geq 2N+1$ where $N$ is sufficiently
large (e.g., (48)) to provide a good approximation in (47), the Jacobi-Anger
based approach can be employed to reduce the computational burden.

Regarding the convergence of Algorithm 1, it follows from [60, Prop. 1] that
if the solutions to (42) and (44) are unique, then Algorithm 1 converges to a
stationary point of the original MML estimation problem in (36). Note that the
uniqueness of the solutions to (42) and (44) can be achieved with high
probability using random RIS phase profiles [38, Sec. IV-B].

Next, we analyze how the performance bounds and the estimator structures are
affected when the true RIS amplitude model given in (7) is known.

##  V Scenario-II & Scenario-III: RIS-aided Localization Under Known RIS
Amplitude Model

In this section, we investigate RIS-aided localization under Scenario-II and
Scenario-III, where the UE is assumed to be aware of the RIS amplitude model
in (7).

###  V-A Scenario-II: Known RIS Amplitude Model with Unknown Parameters

In this scenario, in order to parameterize the unknown system parameters, we
will use
$\boldsymbol{\eta}=[\text{Re}(\alpha)\,\text{Im}(\alpha)\,\boldsymbol{p}^{\mathsf{T}}\,\beta_{\text{min}}\,\kappa\,\phi]^{\mathsf{T}}$,
which consists of both the channel parameters and the RIS model parameters.
Then, by [27, Eq. 9], the Fisher Information matrix (FIM),
$\boldsymbol{J}(\boldsymbol{\eta})\in\mathbb{R}^{8\times 8}$, can be expressed
as

$\boldsymbol{J}(\boldsymbol{\eta})=\frac{2}{N_{0}}\text{Re}\left\\{\left(\frac{\partial\boldsymbol{\mu}}{\partial\boldsymbol{\eta}}\right)^{\mathsf{H}}\frac{\partial\boldsymbol{\mu}}{\partial\boldsymbol{\eta}}\right\\}.$
(60)

In order to compute the derivatives of $\boldsymbol{\mu}$ with respect to the
first five entries of $\boldsymbol{\eta}$, we can use the derivatives given in
Appendix E by replacing the $\tilde{w}_{t,m}$ terms with $w_{t,m}$. For the
last three entries of $\boldsymbol{\eta}$, i.e., for the RIS related
parameters, the derivatives used in (60) are provided in Appendix G.

After obtaining the FIM, by computing
$\operatorname{Tr}\\{\boldsymbol{J}^{-1}(\boldsymbol{\eta})\\}_{3:5,3:5}$, we
can obtain the CRB for estimating the UE position. Moreover, the ML estimator
can be stated as

$\hat{\boldsymbol{\eta}}_{\text{ML}}(\boldsymbol{y})=\operatorname*{arg\,max}_{\boldsymbol{\eta}\in\mathbb{R}^{8}}\log
p(\boldsymbol{y}).$ (61)

As discussed in Section III-C, the estimate for $\overline{\alpha}$ can
uniquely be determined for given estimates of $\overline{\boldsymbol{p}}$,
$\overline{\beta}_{{\rm{min}}}$, $\overline{\kappa}$, and $\overline{\phi}$.
That is, this problem can be reduced to a 6-dimensional optimization problem.
Similar to the mismatched scenario (Scenario-I), the initialization is an
important issue for this scenario, as well. For practical implementations, we
propose an approximate version of the ML estimator, called the approximate
maximum likelihood (AML) estimator, in the next section.

###  V-B Scenario-II: AML Estimator

In this part, our goal is to solve the problem of joint localization and
online RIS calibration in (61), which involves estimating the UE location
$\overline{\boldsymbol{p}}$ and the RIS model parameters
$\overline{\beta}_{{\rm{min}}}$, $\overline{\kappa}$, and $\overline{\phi}$
simultaneously. To accomplish this in an efficient manner, we propose a low-
complexity estimator as an alternative to the high-dimensional non-convex
optimization in (61).

Let us write the observations in (1) in a vector form as

$\displaystyle\boldsymbol{y}=\bar{\alpha}\,\boldsymbol{W}^{\mathsf{T}}(\overline{\boldsymbol{\zeta}})(\overline{\boldsymbol{p}})\sqrt{E_{s}}+\boldsymbol{n},$
(62)

where
$\boldsymbol{W}(\overline{\boldsymbol{\zeta}})=[\boldsymbol{w}_{1}(\overline{\boldsymbol{\zeta}})\,\ldots\,\boldsymbol{w}_{T}(\overline{\boldsymbol{\zeta}})]\in\mathbb{C}^{M\times
T}$ is the matrix of RIS profiles as a function of the parameters
$\overline{\boldsymbol{\zeta}}=[\overline{\beta}_{{\rm{min}}}~{}\overline{\kappa}~{}\overline{\phi}]^{\mathsf{T}}$
of the RIS amplitude model in (7) and (8), and
$\boldsymbol{n}=[n_{1}\,\ldots\,n_{T}]^{\mathsf{T}}$ is the additive noise
vector. From (7) and (8), $\boldsymbol{W}(\overline{\boldsymbol{\zeta}})$ can
be expressed as

$\displaystyle\boldsymbol{W}(\overline{\boldsymbol{\zeta}})=\left(\overline{\beta}_{{\rm{min}}}\boldsymbol{\Gamma}_{1}(\overline{\kappa},\overline{\phi})+\boldsymbol{\Gamma}_{2}(\overline{\kappa},\overline{\phi})\right)\odot
e^{j\boldsymbol{\Theta}},$ (63)

where $\boldsymbol{\Theta}\in\mathbb{R}^{M\times T}$ denotes the RIS phase
shifts with $[\boldsymbol{\Theta}]_{m,t}=\theta_{m,t}$,

$\boldsymbol{\Gamma}_{1}(\overline{\kappa},\overline{\phi})\triangleq{{\boldsymbol{1}}}_{M}{{\boldsymbol{1}}}_{T}^{\mathsf{T}}-\left(\frac{\sin(\boldsymbol{\Theta}-\overline{\phi})+1}{2}\right)^{\overline{\kappa}}~{},$
(64)
$\boldsymbol{\Gamma}_{2}(\overline{\kappa},\overline{\phi})\triangleq\left(\frac{\sin(\boldsymbol{\Theta}-\overline{\phi})+1}{2}\right)^{\overline{\kappa}}~{},$
(65)

${{\boldsymbol{1}}}_{M}$ is an all-ones vector of size $M$, and $\sin(\cdot)$
and $(\cdot)^{\overline{\kappa}}$ operations are element-wise. Plugging
$(\overline{\boldsymbol{p}})=\boldsymbol{a}(\overline{\boldsymbol{p}})\odot\boldsymbol{a}(\boldsymbol{p}_{\text{BS}})$
and (63) into (62) yields

$\displaystyle\boldsymbol{y}=\overline{\alpha}\left(\overline{\beta}_{{\rm{min}}}\widetilde{\boldsymbol{\Gamma}}_{1}(\overline{\kappa},\overline{\phi})+\widetilde{\boldsymbol{\Gamma}}_{2}(\overline{\kappa},\overline{\phi})\right)^{\mathsf{T}}\boldsymbol{a}(\overline{\boldsymbol{p}})\sqrt{E_{s}}+\boldsymbol{n},$
(66)

where

$\displaystyle\widetilde{\boldsymbol{\Gamma}}_{1}(\overline{\kappa},\overline{\phi})$
$\displaystyle\triangleq\boldsymbol{\Gamma}_{1}(\overline{\kappa},\overline{\phi})\odot
e^{j\boldsymbol{\Theta}}\odot\boldsymbol{a}(\boldsymbol{p}_{\text{BS}}){{\boldsymbol{1}}}_{T}^{\mathsf{T}},$
(67)
$\displaystyle\widetilde{\boldsymbol{\Gamma}}_{2}(\overline{\kappa},\overline{\phi})$
$\displaystyle\triangleq\boldsymbol{\Gamma}_{2}(\overline{\kappa},\overline{\phi})\odot
e^{j\boldsymbol{\Theta}}\odot\boldsymbol{a}(\boldsymbol{p}_{\text{BS}}){{\boldsymbol{1}}}_{T}^{\mathsf{T}}.$

The ML estimator corresponding to the observation model in (66) is given by

$\displaystyle\min_{\alpha,\boldsymbol{p},\boldsymbol{\zeta}}~{}\left\lVert\boldsymbol{y}-\alpha\left(\beta_{{\rm{min}}}\widetilde{\boldsymbol{\Gamma}}_{1}(\kappa,\phi)+\widetilde{\boldsymbol{\Gamma}}_{2}(\kappa,\phi)\right)^{\mathsf{T}}\boldsymbol{a}(\boldsymbol{p})\sqrt{E_{s}}\right\rVert^{2}.$
(68)

To solve the ML optimization problem in (68), we now propose a three-step
procedure consisting of location initialization, online RIS calibration and
location refinement.

####  V-B1 Step 0: Initialization of UE Location

First, by assuming $\beta_{{\rm{min}}}=1$, the initial location estimate
$\widehat{\boldsymbol{p}}$ is obtained by using the Jacobi-Anger expansion
based algorithm in Algorithm 1. Inserting $\widehat{\boldsymbol{p}}$ into the
ML estimator in (68), the optimization problem becomes

$\displaystyle\min_{\alpha,\boldsymbol{\zeta}}~{}\left\lVert\boldsymbol{y}-\alpha\left(\beta_{{\rm{min}}}\widetilde{\boldsymbol{\Gamma}}_{1}(\kappa,\phi)+\widetilde{\boldsymbol{\Gamma}}_{2}(\kappa,\phi)\right)^{\mathsf{T}}(\widehat{\boldsymbol{p}})\sqrt{E_{s}}\right\rVert^{2}.$
(69)

####  V-B2 Step 1: Online RIS Calibration

As noted from (69), $\overline{\alpha}$ and $\overline{\beta}_{{\rm{min}}}$
can now be estimated in closed-from as a function of the remaining unknown
parameters, while the estimates of $\overline{\kappa}$ and $\overline{\phi}$
can be found via a 2-D search. This motivates an alternating optimization
algorithm where we alternate among updates of $\alpha$, $\beta_{{\rm{min}}}$,
and $(\kappa,\phi)$:

  * •

Update $\alpha$: Given $\boldsymbol{\zeta}$, a closed-form estimate of
$\alpha$ in (69) is given by

$\displaystyle\widehat{\alpha}=\left(\boldsymbol{\Upsilon}^{\mathsf{H}}(\boldsymbol{\zeta})\boldsymbol{\Upsilon}(\boldsymbol{\zeta})\right)^{-1}\boldsymbol{\Upsilon}^{\mathsf{H}}(\boldsymbol{\zeta})\boldsymbol{y},$
(70)

where

$\displaystyle\boldsymbol{\Upsilon}(\boldsymbol{\zeta})$
$\displaystyle\triangleq\left(\beta_{{\rm{min}}}\widetilde{\boldsymbol{\Gamma}}_{1}(\kappa,\phi)+\widetilde{\boldsymbol{\Gamma}}_{2}(\kappa,\phi)\right)^{\mathsf{T}}(\widehat{\boldsymbol{p}})\sqrt{E_{s}}.$
(71)

  * •

Update $\beta_{{\rm{min}}}$: Given $\alpha$, $\kappa$, and $\phi$, under the
constraint of $0\leq\beta_{{\rm{min}}}\leq 1$, the Lagrangian can be expressed
as follows:

$L(\beta_{{\rm{min}}},\lambda_{1},\lambda_{2})=\left\lVert\boldsymbol{z}-\beta_{{\rm{min}}}\boldsymbol{\omega}\right\rVert^{2}+\lambda_{1}(\beta_{{\rm{min}}}-1)-\lambda_{2}\beta_{{\rm{min}}}$

where
$\boldsymbol{z}=\boldsymbol{y}-\alpha\widetilde{\boldsymbol{\Gamma}}_{2}(\kappa,\phi)^{\mathsf{T}}(\widehat{\boldsymbol{p}})\sqrt{E_{s}}$
and
$\boldsymbol{\omega}=\alpha\widetilde{\boldsymbol{\Gamma}}_{1}(\kappa,\phi)^{\mathsf{T}}(\widehat{\boldsymbol{p}})\sqrt{E_{s}}$.
From Karush-Kuhn-Tucker conditions, the closed-form estimate of
$\beta_{{\rm{min}}}$ in (69) can be obtained from the following set of
equations:

$\displaystyle\lambda_{1}-\lambda_{2}+2\widehat{\beta}_{{\rm{min}}}\boldsymbol{\omega}^{\mathsf{H}}\boldsymbol{\omega}$
$\displaystyle=\boldsymbol{z}^{\mathsf{H}}\boldsymbol{\omega}+\boldsymbol{\omega}^{\mathsf{H}}\boldsymbol{z}$
(72) $\displaystyle\lambda_{1}(\widehat{\beta}_{{\rm{min}}}-1)=0,\,~{}$
$\displaystyle\lambda_{2}\widehat{\beta}_{{\rm{min}}}=0.$ (73)

Hence, we can conclude that $\widehat{\beta}_{{\rm{min}}}$ admits one of the
three alternative forms: $\widehat{\beta}_{{\rm{min}}}=1$,
$\widehat{\beta}_{{\rm{min}}}=0$, or
$\widehat{\beta}_{{\rm{min}}}=\text{Re}\\{\boldsymbol{z}^{\mathsf{H}}\boldsymbol{\omega}\\}/(\boldsymbol{\omega}^{\mathsf{H}}\boldsymbol{\omega})$.
Among these three solutions, the one which yields the smallest objective is
chosen.

  * •

Update $\kappa$ and $\phi$: Given $\alpha$ and $\beta_{{\rm{min}}}$, we can
estimate $\kappa$ and $\phi$ via a 2-D search:

$\displaystyle(\widehat{\kappa},\widehat{\phi})=$
$\displaystyle\operatorname*{arg\,min}_{\begin{subarray}{c}\kappa\in[0,{\color[rgb]{0,0,0}\definecolor[named]{pgfstrokecolor}{rgb}{0,0,0}\pgfsys@color@gray@stroke{0}\pgfsys@color@gray@fill{0}\kappa_{\rm{max}}})\\\
\phi\in[0,2\pi)\end{subarray}}\left\lVert\boldsymbol{y}-\alpha\left(\beta_{{\rm{min}}}\widetilde{\boldsymbol{\Gamma}}_{1}(\kappa,\phi)+\widetilde{\boldsymbol{\Gamma}}_{2}(\kappa,\phi)\right)^{\mathsf{T}}(\widehat{\boldsymbol{p}})\sqrt{E_{s}}\right\rVert$
(74)

for some finite $\kappa_{\rm{max}}$.

####  V-B3 Step 2: Refinement of UE Location

As the output of this alternating procedure, we obtain the estimates of
$\overline{\alpha}$, $\overline{\beta}_{{\rm{min}}}$, $\overline{\kappa}$, and
$\overline{\phi}$. By plugging the estimates of
$\overline{\beta}_{{\rm{min}}}$, $\overline{\kappa}$, and $\overline{\phi}$
(representing the calibrated RIS parameters) back into the ML estimator in
(68), the estimate of the UE location $\overline{\boldsymbol{p}}$ can be
refined via Algorithm 1. The overall algorithm for joint UE localization and
online RIS calibration is summarized in Algorithm 2.

Algorithm 2 AML Algorithm for Joint UE Localization and Online RIS Calibration

1:Input: Observation $\boldsymbol{y}$ in (66), $T_{\rm{thr}},J_{\rm{max}}$.

2:Output: Location estimate $\widehat{\boldsymbol{p}}$, channel gain estimate
$\widehat{\alpha}$ and estimates of RIS amplitude model parameters
$\widehat{\boldsymbol{\zeta}}=[\widehat{\beta}_{{\rm{min}}},\widehat{\kappa},\widehat{\phi}]^{\mathsf{T}}$.

3:Step 0: Initialization of UE Location

  1. (a)

Set $\beta_{{\rm{min}}}=1$.

  2. (b)

Compute the initial location estimate $\widehat{\boldsymbol{p}}$ using
Algorithm 1.

4:Step 1: Alternating Iterations for Online RIS Calibration

5:Set $m=0$.

6:while the objective function in (69) does not converge and $m<J_{\rm{max}}$
do

7: Update the channel estimate $\widehat{\alpha}$ via (70).

8: Update $\widehat{\beta}_{{\rm{min}}}$ via (72) and (73).

9: Update $\widehat{\kappa}$ and $\widehat{\phi}$ via (• ‣ V-B2).

10: Set $m=m+1$.

11:end while

12:Step 2: Refinement of UE Location with Calibrated RIS Model

  1. (a)

Use Algorithm 1 to estimate the UE location, $\widehat{\boldsymbol{p}}$, and
the channel gain, $\widehat{\alpha}$, from (68) by plugging the estimates
$\widehat{\beta}_{{\rm{min}}}$, $\widehat{\kappa}$ and $\widehat{\phi}$
obtained at the output of Step 1.

######  Remark 4.

If we skip Step 1 of Algorithm 2 (i.e., online RIS calibration) and choose
$\widehat{\beta}_{{\rm{min}}}=1$ (i.e., uncalibrated, unit-amplitude RIS model
in (11)), the AML algorithm gives the same estimate as the AMML algorithm.

###  V-C Complexity and Convergence of Algorithm 2

We evaluate the complexity of Algorithm 2 by assuming that the search
intervals for $\kappa$ and $\phi$ are discretized into grids of size $L$ each.
If $T<T_{\rm{thr}}$, the overall cost of Algorithm 2 is simply equal to
$\mathcal{O}\left(TM\max\\{K,L\\}^{2}\right)$, where $K$ is defined as in Sec.
IV-E. If $T\geq T_{\rm{thr}}$, the computational cost becomes
$\mathcal{O}\left(TM\max\\{K(2N+1),L^{2}\\}\right)$. The details can be found
in Appendix D.

The convergence of Algorithm 2 can be analyzed by noting that if the solutions
to the subproblems of (69) via the alternating iterations in Step 1 are unique
(i.e., $\alpha$, $\beta_{{\rm{min}}}$ and $(\kappa,\phi)$ are obtained
uniquely in (70), (72)-(73) and (• ‣ V-B2), respectively), then Step 1
converges to a stationary point of (69) [60, Prop. 1]. Due to the closed-form
solution in (70), the uniqueness of $\alpha$ is guaranteed, while for
$\beta_{{\rm{min}}}$ and $(\kappa,\phi)$ the uniqueness is satisfied with high
probability via random RIS phase configurations, following the arguments in
[38, Sec. IV-B].

###  V-D Scenario-III: Known RIS Amplitude Model with Known Parameters

In this scenario, the unknown system parameters are given by
$\boldsymbol{\eta}=[\text{Re}(\alpha)\,\text{Im}(\alpha)\,\boldsymbol{p}^{\mathsf{T}}\,]^{\mathsf{T}}$
and the values of the RIS related parameters are perfectly known. For this
scenario, the FIM, $\boldsymbol{J}(\boldsymbol{\eta})\in\mathbb{R}^{5\times
5}$, can be computed as in (60). In addition, the derivatives presented in
Appendix E can be used by replacing $\tilde{w}_{t,m}$’s with $w_{t,m}$’s.

To estimate the UE location, we can employ the same AML algorithm, Algorithm
2, as used in Scenario-II. As the values of
$\overline{\beta}_{{\rm{min}}},\overline{\kappa}$, and $\overline{\phi}$ are
available, we can skip Step 0 and Step 1 of Algorithm 2 and run Step 2 with
the known values of the RIS amplitude model parameters.

##  VI Numerical Results

In this section, we first present numerical examples for evaluating the
theoretical bounds in three different scenarios, and then compare the
performance of the AMML and AML estimators against the theoretical bounds.

###  VI-A Simulation Setup

We consider an RIS with $M=50\times 50$ elements, where the inter-element
spacing is $\lambda/2$ and the area of each element is $A=\lambda^{2}/4$ [27].
The carrier frequency is equal to $f_{c}=28\,$ GHz and the bandwidth is set to
$1$ MHz. The RIS is modeled to lie in the X-Y plane with
$\boldsymbol{p}_{\text{RIS}}=[0\,0\,0]^{\mathsf{T}}$. Moreover, for the RIS
elements, $\theta_{t,m}$ values are generated uniformly and independently
between $-\pi$ and $\pi$. In accordance with the Fresnel near-field region
defined in (6), whose boundaries are $1.40$ and $26.79$ meters, the BS and UE
are located at $\boldsymbol{p}_{\text{BS}}=5.77\times[-1\,1\,1]^{\mathsf{T}}$
and $\overline{\boldsymbol{p}}=2.89\times[1\,1\,1]^{\mathsf{T}}$ meters,
respectively, leading to $10$ and $5$ meters of distance to the RIS. We set
the number of transmissions to $T=200$, yielding a total duration of $0.2$ ms.
For simplicity, we assume that $s_{t}=\sqrt{E_{s}}$ for any $t$. Also, the SNR
is defined as

$\displaystyle\text{SNR}=\frac{E_{s}\left|\overline{\alpha}\right|^{2}}{TN_{0}}\sum_{t=1}^{T}\left|{}^{\mathsf{T}}(\overline{\boldsymbol{p}})\boldsymbol{w}_{t}\right|^{2}\,.$
(75)

To solve (24) for the LB computation, we employ the GlobalSearch algorithm of
MATLAB by providing $\overline{\boldsymbol{p}}$ as the initial vector. For the
Jacobi-Anger approximation in (47),
$\frac{2\pi}{\lambda}q_{\rm{max}}\sin\vartheta$ in (48) evaluates to $90.7$
for the considered setup, while we set $N=50$, which turns out to be
sufficient for the proposed algorithms to converge to their respective
theoretical bounds. Furthermore, we set $T_{\rm{thr}}=2N+1$,
$\kappa_{\rm{max}}=5$ and $I_{\rm{max}}=J_{\rm{max}}=5$ in Algorithm 1 and
Algorithm 2. Since $T\geq T_{\rm{thr}}$, Algorithm 1 chooses the Jacobi-Anger
based branch. To evaluate the performance of the branch $T<T_{\rm{thr}}$, we
also show simulation results for $T=10$.

###  VI-B Results and Discussions

$0$$0.1$$0.2$$0.3$$0.4$$0.5$$0.6$$0.7$$0.8$$0.9$$1$$10^{-3}$$10^{-2}$$10^{-1}$$10^{0}$$\overline{\beta}_{{\rm{min}}}$Theoretical
Bounds [m]20 dB (Scenario-I)20 dB (Scenario-II)20 dB (Scenario-III)30 dB
(Scenario-I)30 dB (Scenario-II)30 dB (Scenario-III)40 dB (Scenario-I)40 dB
(Scenario-II)40 dB (Scenario-III) Figure 3: Theoretical bounds versus
$\overline{\beta}_{{\rm{min}}}$ for SNR = $20\,$dB, $30\,$dB and $40\,$dB when
the UE distance is $5$ meters, $\overline{\kappa}=1.5$ and
$\overline{\phi}=0$.

####  VI-B1 Theoretical Limits vs. RIS Model Parameters

In Fig. 3, for all the three scenarios, we show the theoretical bounds as a
function of $\overline{\beta}_{{\rm{min}}}$ for SNRs of $20$, $30$, and $40$
dB when the UE distance is $5$ meters from the center of the RIS,
$\overline{\kappa}=1.5$, and $\overline{\phi}=0$. We observe from the figure
that as $\overline{\beta}_{{\rm{min}}}$ decreases, i.e., as the mismatch
between the true and the assumed models increases, the LB increases and
raising the SNR level does not improve the LB values significantly. In
addition, the sensitivity to the model mismatch is more pronounced at higher
SNRs, while for an SNR of $20$ dB, the performance is relatively insensitive
for $\overline{\beta}_{{\rm{min}}}>0.7$. This shows that being unaware of the
true RIS amplitude model can constitute a crucial limiting factor for RIS-
aided localization at high SNRs. Interestingly, we note that when the true
model and the true values of $\overline{\beta}_{{\rm{min}}}$,
$\overline{\kappa}$ and $\overline{\phi}$ are known, the value of
$\overline{\beta}_{{\rm{min}}}$ does not influence the CRB values notably. In
fact, as the CRB values for the Scenario-II and Scenario-III are almost the
same, it can be inferred that once we know the true model, knowing the true
values of $\overline{\beta}_{{\rm{min}}}$, $\overline{\kappa}$ and
$\overline{\phi}$ is not critical.

$0$$0.2$$0.4$$0.6$$0.8$$1$$1.2$$1.4$$1.6$$1.8$$2$$10^{-2}$$10^{-1}$$\overline{\kappa}$Theoretical
Bounds [m]20 dB (Scenario-I)20 dB (Scenario-II)20 dB (Scenario-III)30 dB
(Scenario-I)30 dB (Scenario-II)30 dB (Scenario-III)40 dB (Scenario-I)40 dB
(Scenario-II)40 dB (Scenario-III) Figure 4: Theoretical bounds versus
$\overline{\kappa}$ for SNR = $20\,$dB, $30\,$dB and $40\,$dB when the UE
distance is $5$ meters, $\overline{\beta}_{{\rm{min}}}=0.7$ and
$\overline{\phi}=0$.

In Fig. 4, for all the three scenarios, the theoretical bounds are plotted
versus $\kappa$ for SNRs of $20$, $30$, and $40$ dB when the UE distance is
$5$ meters from the center of the RIS, $\overline{\beta}_{{\rm{min}}}=0.7$,
and $\overline{\phi}=0$. Similar to Fig. 3, the CRB values for Scenario-II and
Scenario-III are almost the same. We also observe that as $\kappa$ approaches
$0$, i.e., as the mismatch between the true and assumed models decreases, the
LB and the CRB values for Scenario-II and Scenario-III become closer to each
other similarly to Fig. 3. In addition, as the SNR increases, the performance
loss due to the mismatch becomes more significant. Moreover, increasing
$\overline{\kappa}$ beyond $\overline{\kappa}=0.4$ does not have any notable
impacts on the LB values.

$1{,}000$$1{,}500$$2{,}000$$2{,}500$$3{,}000$$3{,}500$$4{,}000$$10^{-2}$$10^{-1}$$10^{0}$Number
of RIS elementsTheoretical Bounds [m]$\overline{\beta}_{{\rm{min}}}=0.3$
(Scenario-I)$\overline{\beta}_{{\rm{min}}}=0.3$ (Scenario-
II)$\overline{\beta}_{{\rm{min}}}=0.3$ (Scenario-
III)$\overline{\beta}_{{\rm{min}}}=0.7$
(Scenario-I)$\overline{\beta}_{{\rm{min}}}=0.7$ (Scenario-
II)$\overline{\beta}_{{\rm{min}}}=0.7$ (Scenario-III) Figure 5: Theoretical
bounds versus number of RIS elements and for
$\overline{\beta}_{{\rm{min}}}\in\\{0.3,0.7\\}$ when the UE distance is $5$
meters, SNR = 20 dB, $\overline{\kappa}=1.5$ and $\overline{\phi}=0$.

####  VI-B2 Effect of RIS Size

To investigate the effects of the number of RIS elements, the average LB and
CRB values are plotted versus the RIS size in Fig. 5 for all the three
scenarios by averaging over $200$ different random phase profiles for the RIS
elements, where the SNR is $20\,$dB, the UE distance is $5$ meters,
$\overline{\beta}_{{\rm{min}}}\in\\{0.3,0.7\\}$, $\overline{\kappa}=1.5$, and
$\overline{\phi}=0$. We observe that as the RIS size or
$\overline{\beta}_{{\rm{min}}}$ increases, we obtain lower LB values in
general. In addition, the curves for different $\overline{\beta}_{{\rm{min}}}$
values are almost parallel. We also note the significant price paid due to the
model mismatch: With the perfect knowledge of the RIS model and with $1000$
elements, a similar performance can only be attained using a RIS with $4225$
elements when $\overline{\beta}_{{\rm{min}}}=0.3$ under the model mismatch.

$-10$$-5$$0$$5$$10$$15$$20$$25$$30$$35$$40$$10^{-2}$$10^{-1}$$10^{0}$$10^{1}$SNR
(dB)RMSE [m]LB [m] (Scenario-I)AMML [m] (Scenario-I)CRB [m] (Scenario-II)AML
[m] (Scenario-II)CRB [m] (Scenario-III)AML [m] (Scenario-III) Figure 6:
Performance of the AMML and the AML algorithms along with the corresponding
theoretical bounds versus SNR (dB) when the UE distance is $5$ meters,
$\overline{\kappa}=1.5$, $\overline{\beta}_{{\rm{min}}}=0.5$ and
$\overline{\phi}=0$.

####  VI-B3 Performance of Algorithm 1 and Algorithm 2 vs. SNR

To provide a comparative analysis of the three scenarios, in Fig. 6, the
performances of the AMML algorithm in Algorithm 1 and the AML algorithm in
Algorithm 2 are plotted versus SNR, and compared with the corresponding LB and
CRB values when $\overline{\beta}_{{\rm{min}}}=0.5$. It is noted that the AMML
and AML algorithms achieve the theoretical bounds in the high SNR regime in
all the three scenarios. This indicates that the proposed Jacobi-Anger
expansion based low-complexity approach in Algorithm 1 can successfully
provide near-optimal solutions to the near-field localization problem in (34).
Moreover, by comparing the AMML and the AML curves at high SNRs, we observe
that the AML algorithm completely recovers the performance loss due to model
misspecification, which verifies the effectiveness of the online RIS
calibration in Step 1 and the UE location refinement in Step 2 of Algorithm 2.

$-10$$-5$$0$$5$$10$$15$$20$$25$$30$$35$$40$$10^{-2}$$10^{-1}$$10^{0}$$10^{1}$SNR
(dB)RMSE [m]LB [m] ($\overline{\beta}_{{\rm{min}}}=0.5$)AMML [m]
($\overline{\beta}_{{\rm{min}}}=0.5$)MCRB [m]
($\overline{\beta}_{{\rm{min}}}=0.5$)Bias
[m]($\overline{\beta}_{{\rm{min}}}=0.5$)LB [m]
($\overline{\beta}_{{\rm{min}}}=0.7$)AMML [m]
($\overline{\beta}_{{\rm{min}}}=0.7$)MCRB [m]
($\overline{\beta}_{{\rm{min}}}=0.7$)Bias [m]
($\overline{\beta}_{{\rm{min}}}=0.7$) Figure 7: AMML, LB, MCRB, and Bias term
versus SNR (dB) for $\overline{\beta}_{{\rm{min}}}\in\\{0.5,0.7\\}$ when the
UE distance is $5$ meters, $\overline{\kappa}=1.5$ and $\overline{\phi}=0$.

To explore the asymptotic behavior of the AMML algorithm in Scenario I, its
performance with respect to SNR is illustrated in Fig. 7 for
$\overline{\beta}_{{\rm{min}}}=0.5$ and $0.7$ when the UE distance is $5$
meters. In addition to the performance of the AMML estimator, the LB, the
MCRB, and the bias term values are also plotted. We observe that the AMML
estimator exhibits three distinct regimes: a low-SNR regime where the AMML is
limited by noise peaks and thus far away from the LB; a medium-SNR regime
where the AMML is close to the LB, which itself is dominated by the MCRB; and
a high-SNR regime, where the AMML and LB are limited by the bias term
$(\boldsymbol{\eta}_{0})$.

$0$$0.2$$0.4$$0.6$$0.8$$1$$1.2$$1.4$$1.6$$1.8$$2$$10^{-2}$$10^{-1}$$\overline{\kappa}$RMSE
[m]LB [m] (Scenario-I)AMML [m] (Scenario-I)CRB [m] (Scenario-II)AML [m]
(Scenario-II)CRB [m] (Scenario-III)AML [m] (Scenario-III) Figure 8:
Performance of the AMML and the AML algorithms along with the corresponding
theoretical bounds versus $\overline{\kappa}$ when the UE distance is $5$
meters, SNR = 30 dB, $\overline{\beta}_{{\rm{min}}}=0.7$, and
$\overline{\phi}=0$.

####  VI-B4 Performance of Algorithm 1 and Algorithm 2 vs. RIS Model
Parameters

To investigate the performance of the proposed localization methods under
varying values of RIS model parameters, in Fig. 8, the RMSEs of the AMML and
AML algorithms are evaluated versus $\overline{\kappa}$ when SNR = 30 dB,
$\overline{\beta}_{{\rm{min}}}=0.7$, $\overline{\phi}=0$, and the UE distance
is $5$ meters. Similarly, in Fig. 9, the performances of the AMML and AML
algorithms versus $\overline{\beta}_{{\rm{min}}}$ are shown when SNR = 30 dB,
$\overline{\kappa}=1.5$, $\overline{\phi}=0$, and the UE distance is $5$
meters. From Figs. 8 and 9, it is noted that for Scenario-II and Scenario-III,
the AML algorithm achieves the CRB, which is insensitive to the values of
$\overline{\kappa}$ and $\overline{\beta}_{{\rm{min}}}$. In addition, a
combined evaluation of Fig. 6, Fig. 8 and Fig. 9 demonstrates that both of the
proposed algorithms can attain the corresponding bounds under a wide variety
of settings concerning different SNR levels and RIS model parameters.

$0$$0.1$$0.2$$0.3$$0.4$$0.5$$0.6$$0.7$$0.8$$0.9$$1$$10^{-2}$$10^{-1}$$\overline{\beta}_{{\rm{min}}}$RMSE
[m]LB [m] (Scenario-I)AMML [m] (Scenario-I)CRB [m] (Scenario-II)AML [m]
(Scenario-II)CRB [m] (Scenario-III)AML [m] (Scenario-III) Figure 9:
Performance of the AMML and the AML algorithms along with the corresponding
theoretical bounds versus $\overline{\beta}_{{\rm{min}}}$ when the UE distance
is $5$ meters, SNR = 30 dB, $\overline{\kappa}=1.5$, and $\overline{\phi}=0$.
$0$$1$$2$$3$$4$$5$$6$$7$$8$$9$$10$$10^{-2}$$10^{-1}$$10^{0}$Iterations,
$k$Error Values
[m]$\left\lVert\hat{\boldsymbol{p}}(k)-\overline{\boldsymbol{p}}\right\rVert$
(SNR = 10
dB)$\left\lVert\hat{\boldsymbol{p}}(k)-\overline{\boldsymbol{p}}\right\rVert$
(SNR = 20
dB)$\left\lVert\hat{\boldsymbol{p}}(k)-\overline{\boldsymbol{p}}\right\rVert$
(SNR = 30
dB)$\left\lVert\hat{\boldsymbol{p}}(k)-\overline{\boldsymbol{p}}\right\rVert$
(SNR = 40 dB) Figure 10: Errors of estimates of $\overline{\boldsymbol{p}}$ at
each iteration in Step 1 of Algorithm 2 when
$\overline{\beta}_{{\rm{min}}}=0.5$, $\overline{\kappa}=1.5$,
$\overline{\phi}=0$, and UE distance is 5 meters.

####  VI-B5 Convergence Behavior of Algorithm 2

Finally, for a single realization, Fig. 10 illustrates the errors of the
position estimates at each alternating iteration in Step 1 of Algorithm 2. In
the figure, $\hat{\boldsymbol{p}}(k)$ denotes the estimate of the position
$\overline{\boldsymbol{p}}$ obtained from the Jacobi-Anger approach by using
the estimate of $\overline{\boldsymbol{\zeta}}$ at the $k$-th iteration.

We observe that, starting from the initial location estimate given by
Algorithm 1, Algorithm 2 provides significant performance gains through the
iterations of the online RIS calibration in Step 1. In particular, at an SNR
of 40 dB, Algorithm 2 achieves the error value of $0.0058\,$m, while the error
corresponding to Algorithm 1 is $0.1241\,$m.

####  VI-B6 Numerical Results for Small Number of Observations

In this part, we use the same simulation setup described in Sec. VI-A by only
changing $T$ from $200$ to $10$. In Fig. 11, performances of the AMML and AML
algorithms versus SNR are presented when $\overline{\beta}_{{\rm{min}}}=0.7$,
$\overline{\kappa}=1.5$, $\overline{\phi}=0$. It can be observed that when the
number of transmissions is reduced to $10$, the proposed algorithms are still
capable of achieving the theoretical performance bounds in all three
scenarios.

$-10$$-5$$0$$5$$10$$15$$20$$25$$30$$35$$40$$10^{-2}$$10^{-1}$$10^{0}$$10^{1}$SNR
(dB)RMSE [m]LB [m] (Scenario-I)AMML [m] (Scenario-I)CRB [m] (Scenario-II)AML
[m] (Scenario-II)CRB [m] (Scenario-III)AML [m] (Scenario-III) Figure 11:
Performance of the AMML and the AML algorithms along with the corresponding
theoretical bounds versus SNR (dB) when the UE distance is $5$ meters,
$\overline{\kappa}=1.5$, $\overline{\beta}_{{\rm{min}}}=0.7$,
$\overline{\phi}=0$, and $T=10$.

##  VII Concluding Remarks

We have studied the problem of RIS-aided near-field localization under
amplitude variations of individual RIS elements as a function of the applied
phase shifts, which is a practical model based on equivalent RIS circuit
models of reflecting elements [35]. First, through the MCRB analysis, we have
quantified localization performance losses due to model misspecification when
the UE is unaware of the RIS amplitude model, and developed an algorithm that
achieves the corresponding LB. Second, under a known RIS amplitude model, we
have derived the corresponding CRB and proposed a low-complexity algorithm for
joint UE localization and online calibration of RIS model parameters.
Extensive simulations over a broad range of operating conditions demonstrate
the following key results:

  * •

Significance of the Knowledge of RIS Amplitude Model: Being unaware of the
true RIS amplitude model and assuming conventional unit-amplitude RIS
responses can severely degrade the localization accuracy, with the losses
being more pronounced at higher SNRs and higher amplitude fluctuations (small
$\overline{\beta}_{{\rm{min}}}$ and large $\overline{\kappa}$ in (8)).

  * •

Localization under Model Mismatch: Under the unknown RIS amplitude model, the
proposed Jacobi-Anger expansion based low-complexity method in Algorithm 1 can
provide near-optimal localization performance very close to the corresponding
LB.

  * •

Joint Localization and RIS Calibration: Under the known RIS amplitude model,
it is possible to recover the performance losses incurred by model
misspecification using the proposed algorithm in Algorithm 2, which can
calibrate the RIS model online with the aid of an unknown-location UE and
subsequently refine the UE location with an accuracy that asymptotically
attains the CRB.

Based on these outcomes, future research will focus on localization-optimal
passive beamforming at the RIS under the realistic RIS amplitude model in (8),
considering wideband signals and unobstructed LoS scenarios. In addition,
data-driven approaches will be considered to learn the mapping from RIS phases
to amplitudes in the absence of a specific functional form as in (8), which
would enable generalizing the proposed approach to any type of RIS.

##  Appendix A Proof of Lemma 1

Based on the definition of the KL divergence and the system model in Section
II, (14) can be expressed as

$\displaystyle\boldsymbol{\eta}_{0}$
$\displaystyle=\operatorname*{arg\,min}_{\boldsymbol{\eta}\in\mathbb{R}^{5}}\int
p(\boldsymbol{y})\log\left(\frac{p(\boldsymbol{y})}{\tilde{p}(\boldsymbol{y}|\boldsymbol{\eta})}\right)\,\text{d}\boldsymbol{y}$
(76)
$\displaystyle=\operatorname*{arg\,min}_{\boldsymbol{\eta}\in\mathbb{R}^{5}}-\int
p(\boldsymbol{y})\log\tilde{p}(\boldsymbol{y}|\boldsymbol{\eta})\,\text{d}\boldsymbol{y}$
(77)
$\displaystyle=\operatorname*{arg\,min}_{\boldsymbol{\eta}\in\mathbb{R}^{5}}\int
p(\boldsymbol{y})\left\lVert\boldsymbol{y}-\tilde{\boldsymbol{\mu}}(\boldsymbol{\eta})\right\rVert^{2}\,\text{d}\boldsymbol{y}$
(78)

where the second equality is due to the independence of $p(\boldsymbol{y})$
from $\boldsymbol{\eta}$, and the last equality is obtained from (12). Then,
it can be shown that the following equations hold:

$\displaystyle\int
p(\boldsymbol{y})\left\lVert\boldsymbol{y}-\tilde{\boldsymbol{\mu}}(\boldsymbol{\eta})\right\rVert^{2}\,d\boldsymbol{y}=\sum_{t=1}^{T}\int
p(\boldsymbol{y})\left|y_{t}-\tilde{{\mu}}_{t}(\boldsymbol{\eta})\right|^{2}\,\text{d}\boldsymbol{y}$
$\displaystyle=\sum_{t=1}^{T}\underbrace{\left(\prod_{t^{\prime}\neq t}\int
p(y_{t^{\prime}})\,\text{d}y_{t^{\prime}}\right)}_{=1}\left(\int
p(y_{t})\left|y_{t}-\tilde{{\mu}}_{t}(\boldsymbol{\eta})\right|^{2}\,\text{d}y_{t}\right)$
$\displaystyle=\sum_{t=1}^{T}\int
p(y_{t})\left|y_{t}-\tilde{{\mu}}_{t}(\boldsymbol{\eta})\right|^{2}\,\text{d}y_{t}.$
(79)

We now introduce
$\epsilon_{t}(\boldsymbol{\eta})=\mu_{t}-\tilde{{\mu}}_{t}(\boldsymbol{\eta})$,
so that
$\left|y_{t}-\tilde{{\mu}}_{t}(\boldsymbol{\eta})\right|^{2}=\left|y_{t}-\mu_{t}+\epsilon_{t}(\boldsymbol{\eta})\right|^{2}$,
and the integral expression in (79) can be manipulated as follows:

$\displaystyle\int
p(y_{t})\left|y_{t}-\tilde{{\mu}}_{t}(\boldsymbol{\eta})\right|^{2}\,\text{d}y_{t}=\int
p(y_{t})\left|y_{t}-\mu_{t}\right|^{2}\,\text{d}y_{t}+$
$\displaystyle\left|\epsilon_{t}(\boldsymbol{\eta})\right|^{2}\int
p(y_{t})\,\text{d}y_{t}+2\int
p(y_{t})\text{Re}\left((y_{t}-\mu_{t})^{*}\epsilon_{t}(\boldsymbol{\eta})\right)\,\text{d}y_{t}.$
(80)

Since $y_{t}\sim\mathcal{CN}(\mu_{t},N_{0})$ and $\int
p(y_{t})\,\text{d}y_{t}=1$, the expression in (80) can be simplified as

$\int
p(y_{t})\left|y_{t}-\tilde{{\mu}}_{t}(\boldsymbol{\eta})\right|^{2}\,\text{d}y_{t}=N_{0}+\left|\epsilon_{t}(\boldsymbol{\eta})\right|^{2}.$
(81)

By combining (78), (79) and (81), we finally obtain that

$\displaystyle\bar{\boldsymbol{\eta}}$
$\displaystyle=\operatorname*{arg\,min}_{\boldsymbol{\eta}\in\mathbb{R}^{5}}\sum_{t=1}^{T}\left(N_{0}+\left|\epsilon_{t}(\boldsymbol{\eta})\right|^{2}\right)=\operatorname*{arg\,min}_{\boldsymbol{\eta}\in\mathbb{R}^{5}}\sum_{t=1}^{T}\left|\epsilon_{t}(\boldsymbol{\eta})\right|^{2},$

which completes the proof.

##  Appendix B Proof of Lemma 2

Let $\boldsymbol{\mu}^{(k)}=\\{\mu_{t}^{(k)}\\}_{t=1}^{T^{(k)}}$ and
$\tilde{\boldsymbol{\mu}}^{(k)}(\boldsymbol{\eta})=\\{\tilde{\mu}_{t}^{(k)}(\boldsymbol{\eta})\\}_{t=1}^{T^{(k)}}$
be the set of the noiseless transmitted signals for the $k$-th set of
observations under the true model and assumed model, respectively for a given
parameter $\boldsymbol{\eta}$. (32) implies that
$\mu_{t}^{(2)}=\mu_{\left(t\text{ mod }T^{(1)}\right)}^{(1)}$ for any $1\leq
t\leq T^{(2)}$. Hence, it can be stated that

$\displaystyle\left\lVert\boldsymbol{\mu}^{(2)}-\tilde{\boldsymbol{\mu}}^{(2)}(\boldsymbol{\eta})\right\rVert^{2}$
$\displaystyle=\sum_{t=1}^{T^{(2)}}\left|\mu_{t}^{(2)}-\tilde{\mu}_{t}^{(2)}(\boldsymbol{\eta})\right|^{2}~{},$
(82)
$\displaystyle=K\left\lVert\boldsymbol{\mu}^{(1)}-\tilde{\boldsymbol{\mu}}^{(1)}(\boldsymbol{\eta})\right\rVert^{2}~{},$
(83)

which implies $\boldsymbol{\eta}_{0}^{(1)}=\boldsymbol{\eta}_{0}^{(2)}$. This
means that the Bias term in (20) remains the same even though the number of
transmissions is increased from $T^{(1)}$ to $T^{(2)}$. That is, if
${\rm{Bias}}\big{(}T^{(k)},\boldsymbol{\eta}_{0}^{(k)}\big{)}$ denotes the
corresponding Bias for the $k$-th set of observations, we have
${\rm{Bias}}\big{(}T^{(1)},\boldsymbol{\eta}_{0}^{(1)}\big{)}={\rm{Bias}}\big{(}T^{(2)},\boldsymbol{\eta}_{0}^{(2)}\big{)}$.

Now, let us compare the MCRB expressions for both cases. To stress the
dependence on the number of observations, we will replace
$\boldsymbol{A}_{\boldsymbol{\eta}_{0}}$ and
$\boldsymbol{B}_{\boldsymbol{\eta}_{0}}$ in (17) and (18) with
$\boldsymbol{A}_{T,\boldsymbol{\eta}_{0}}$ and
$\boldsymbol{B}_{T,\boldsymbol{\eta}_{0}}$ when the number of transmissions is
equal to $T$. By using (29), for any $i,j$, it can be seen that

$[\boldsymbol{A}_{T^{(2)},\boldsymbol{\eta}_{0}^{(2)}}]_{i,j}=K[\boldsymbol{A}_{T^{(1)},\boldsymbol{\eta}_{0}^{(1)}}]_{i,j}~{}.$
(84)

For $k\in\\{1,2\\}$ and any $i,j$, we define
$\boldsymbol{R}_{T^{(k)},\boldsymbol{\eta}_{0}^{(k)}}$ and
$\boldsymbol{S}_{T^{(k)},\boldsymbol{\eta}_{0}^{(k)}}$ as follows:

$\displaystyle[\boldsymbol{R}_{T^{(k)},\boldsymbol{\eta}_{0}^{(k)}}]_{i,j}$
$\displaystyle\triangleq\frac{4}{N_{0}^{2}}\Bigg{[}\text{Re}\left\\{\boldsymbol{\epsilon}^{(k)}(\boldsymbol{\eta})^{\mathsf{H}}\frac{\partial\tilde{\boldsymbol{\mu}}^{(k)}(\boldsymbol{\eta})}{\partial\eta_{i}}\right\\}$
$\displaystyle\text{Re}\left\\{\boldsymbol{\epsilon}^{(k)}(\boldsymbol{\eta})^{\mathsf{H}}\frac{\partial\tilde{\boldsymbol{\mu}}^{(k)}(\boldsymbol{\eta})}{\partial\eta_{j}}\right\\}\Bigg{]}\Bigg{|}_{\boldsymbol{\eta}=\boldsymbol{\eta}_{0}^{(k)}},$
(85)
$\displaystyle[\boldsymbol{S}_{T^{(k)},\boldsymbol{\eta}_{0}^{(k)}}]_{i,j}$
$\displaystyle\triangleq\frac{2}{N_{0}}\Bigg{[}\text{Re}\left\\{\left(\frac{\partial\tilde{\boldsymbol{\mu}}^{(k)}(\boldsymbol{\eta})}{\partial\eta_{i}}\right)^{\mathsf{H}}\frac{\partial\tilde{\boldsymbol{\mu}}^{(k)}(\boldsymbol{\eta})}{\partial\eta_{j}}\right\\}\Bigg{]}\Bigg{|}_{\boldsymbol{\eta}=\boldsymbol{\eta}_{0}^{(k)}}.$
(86)

It can easily be verified that both
$\boldsymbol{R}_{T^{(k)},\boldsymbol{\eta}_{0}^{(k)}}$ and
$\boldsymbol{S}_{T^{(k)},\boldsymbol{\eta}_{0}^{(k)}}$ are positive-definite
matrices for any $k\in\\{1,2\\}$. Based on (85) and (86), we can write

$\displaystyle[\boldsymbol{B}_{T^{(2)},\boldsymbol{\eta}_{0}^{(2)}}]$
$\displaystyle=[\boldsymbol{R}_{T^{(2)},\boldsymbol{\eta}_{0}^{(2)}}]+[\boldsymbol{S}_{T^{(2)},\boldsymbol{\eta}_{0}^{(2)}}]$
$\displaystyle=K^{2}[\boldsymbol{R}_{T^{(1)},\boldsymbol{\eta}_{0}^{(1)}}]+K[\boldsymbol{S}_{T^{(1)},\boldsymbol{\eta}_{0}^{(1)}}]$
(87)

By using (84) and (87), it is possible to express
${\rm{MCRB}}\big{(}T^{(2)},\boldsymbol{\eta}_{0}^{(2)}\big{)}$ as follows:

$\displaystyle{\rm{MCRB}}\big{(}T^{(2)},\boldsymbol{\eta}_{0}^{(2)}\big{)}=\frac{1}{K^{2}}\big{(}\boldsymbol{A}_{T^{(1)},\boldsymbol{\eta}_{0}^{(1)}}\big{)}^{-1}$
(88)
$\displaystyle\times\big{(}K^{2}[\boldsymbol{R}_{T^{(1)},\boldsymbol{\eta}_{0}^{(1)}}]+K[\boldsymbol{S}_{T^{(1)},\boldsymbol{\eta}_{0}^{(1)}}]\big{)}\big{(}\boldsymbol{A}_{T^{(1)},\boldsymbol{\eta}_{0}^{(1)}}\big{)}^{-1}.$
(89)

Since $\boldsymbol{R}_{T^{(1)},\boldsymbol{\eta}_{0}^{(1)}}$,
$\boldsymbol{S}_{T^{(1)},\boldsymbol{\eta}_{0}^{(1)}}$ and
$\boldsymbol{A}_{T^{(1)},\boldsymbol{\eta}_{0}^{(1)}}$ are positive-definite
matrices,
$\operatorname{Tr}\big{\\{}\big{(}[\boldsymbol{R}_{T^{(1)},\boldsymbol{\eta}_{0}^{(1)}}]\big{)}\big{(}\boldsymbol{A}_{T^{(1)},\boldsymbol{\eta}_{0}^{(1)}}\big{)}^{-2}\big{\\}}\geq
0$ and
$\operatorname{Tr}\big{\\{}\big{(}[\boldsymbol{S}_{T^{(1)},\boldsymbol{\eta}_{0}^{(1)}}]\big{)}\big{(}\boldsymbol{A}_{T^{(1)},\boldsymbol{\eta}_{0}^{(1)}}\big{)}^{-2}\big{\\}}\geq
0$. This implies that for $K\geq 2$,

$\frac{1}{K}<\frac{\operatorname{Tr}\big{\\{}{\rm{MCRB}}\big{(}T^{(2)},\boldsymbol{\eta}_{0}^{(2)}\big{)}\big{\\}}}{\operatorname{Tr}\big{\\{}{\rm{MCRB}}\big{(}T^{(1)},\boldsymbol{\eta}_{0}^{(1)}\big{)}\big{\\}}}<1~{}.$
(90)

Furthermore, since
${\rm{Bias}}\big{(}T^{(1)},\boldsymbol{\eta}_{0}^{(1)}\big{)}={\rm{Bias}}\big{(}T^{(2)},\boldsymbol{\eta}_{0}^{(2)}\big{)}$,
the latter conclusion for the ratio of the trace of the LBs, is evident from
(90). For the CRB calculation, as stated in Remark 3, when there is no
mismatch between the assumed model and the true model, we can write

${\rm{CRB}}\big{(}T^{(k)}\big{)}=\big{(}\boldsymbol{A}_{T^{(k)},\overline{\boldsymbol{\eta}}}\big{)}^{-1}$
(91)

for $k\in\\{1,2\\}$. It is evident from (84) and (91) that

$\frac{\operatorname{Tr}\big{\\{}{\rm{CRB}}\big{(}T^{(2)}\big{)}\big{\\}}}{\operatorname{Tr}\big{\\{}{\rm{CRB}}\big{(}T^{(1)}\big{)}\big{\\}}}=\frac{\operatorname{Tr}\big{\\{}\big{(}\boldsymbol{A}_{T^{(2)},\overline{\boldsymbol{\eta}}}\big{)}^{-1}\big{\\}}}{\operatorname{Tr}\big{\\{}\big{(}\boldsymbol{A}_{T^{(1)},\overline{\boldsymbol{\eta}}}\big{)}^{-1}\big{\\}}}=\frac{1}{K}$
(92)

as we desired to prove.

##  Appendix C Computational Complexity of Algorithm 1

First assume that $T<T_{\rm{thr}}$. It is clear that complexity of Algorithm 1
is dominated by the 2-D search for estimating azimuth and elevation angles. In
the algorithm we equate $I_{\text{max}}$ to $5$. That is, for Algorithm 1, it
is sufficient to analyze the computational complexity of the 2-D search given
in (39). Let us define
$\boldsymbol{x}(\vartheta,\varphi)\triangleq{\boldsymbol{Q}}(\vartheta,\varphi)\sqrt{E_{s}}$.
The computational cost of $\boldsymbol{x}(\vartheta,\varphi)$ is simply equal
to $\mathcal{O}(TM)$. One should note that, (39) is equivalent to the
following problem

$(\widehat{\vartheta},\widehat{\varphi})=\operatorname*{arg\,max}_{\vartheta,\varphi}\frac{\boldsymbol{x}(\vartheta,\varphi)^{\mathsf{H}}\boldsymbol{y}}{\left\lVert\boldsymbol{x}(\vartheta,\varphi)\right\rVert^{2}}~{}.$
(93)

Hence after computing $\boldsymbol{x}(\vartheta,\varphi)$, we need to search
over $\vartheta$ and $\varphi$. Therefore, the overall cost of Algorithm 1 for
$T\leq T_{\rm{thr}}$ is $\mathcal{O}(TK^{2}M)$.

When $T\geq T_{\rm{thr}}$, the complexity of Algorithm 1 is dominated by the
estimation of $\vartheta$. To estimate $\vartheta$, we need to compute
$\boldsymbol{X}(\vartheta)\triangleq{\boldsymbol{Q}}\boldsymbol{G}^{\mathsf{T}}(\vartheta)$
first. The computational cost of $\boldsymbol{X}(\vartheta)$ is
$\mathcal{O}\left(TM(2N+1)\right)$. Then, we need to compute the pseudo-
inverse of $\boldsymbol{X}(\vartheta)$, whose computational cost is given by
$\mathcal{O}\left(T(2N+1)^{2}\right)$ since $T\geq 2N+1$. After computing the
pseudo-inverse of $\boldsymbol{X}(\vartheta)$, we need to search $\vartheta$
over $[0,\pi/2]$ to find the minimum of
$\left\lVert\boldsymbol{y}-\boldsymbol{X}(\vartheta)\boldsymbol{X}^{\dagger}(\vartheta)\boldsymbol{y}\right\rVert$.
That is, the overall cost of Algorithm 1 when $T\geq T_{\rm{thr}}$ is given by
$\mathcal{O}\left(T^{2}(2N+1)K\right)+\mathcal{O}\left(TM(2N+1)K\right)=\mathcal{O}\left(TK(2N+1)\text{max}\\{T,M\\}\right)=\mathcal{O}\left(TM(2N+1)K\right)$.

##  Appendix D Computational Complexity of Algorithm 2

Similar to Algorithm 1, the computational complexity of Algorithm 2 is
dominated by the 2-D search for $\kappa$ and $\phi$. We need to compute
$\left\lVert\boldsymbol{y}-\alpha\left(\beta_{{\rm{min}}}\widetilde{\boldsymbol{\Gamma}}_{1}(\kappa,\phi)+\widetilde{\boldsymbol{\Gamma}}_{2}(\kappa,\phi)\right)^{\mathsf{T}}(\widehat{\boldsymbol{p}})\sqrt{E_{s}}\right\rVert$,
whose computational cost is $\mathcal{O}(TM)$, for a given
$\boldsymbol{\zeta}$ and $\alpha$. Since we search over $\kappa$ and $\phi$’s,
the total computational complexity becomes $\mathcal{O}(TML^{2})$.

##  Appendix E Derivation of Entries in the MCRB

Let $\boldsymbol{\eta}$ be given by
$\boldsymbol{\eta}=[\alpha_{r}\,\alpha_{i}\,\mathrm{x}\,\mathrm{y}\,\mathrm{z}]^{\mathsf{T}}$.
Also, define
$\boldsymbol{p}\triangleq[\mathrm{x}\,\mathrm{y}\,\mathrm{z}]^{\mathsf{T}}$,
$b_{m}\triangleq[(\boldsymbol{p})]_{m}$, and
$\alpha\triangleq\alpha_{r}+j\alpha_{i}$. We also introduce
$\boldsymbol{u}=\frac{\boldsymbol{p}-\boldsymbol{p}_{\text{RIS}}}{\left\lVert\boldsymbol{p}-\boldsymbol{p}_{\text{RIS}}\right\rVert}$and
for any $1\leq m\leq M$,
$\boldsymbol{u}_{m}=\frac{\boldsymbol{p}-\boldsymbol{p}_{m}}{\left\lVert\boldsymbol{p}-\boldsymbol{p}_{m}\right\rVert}$,
where $\boldsymbol{u}=[u_{x}\,u_{y}\,u_{z}]^{\mathsf{T}}$ and
$\boldsymbol{u}_{m}=[u_{m,x}\,u_{m,y}\,u_{m,z}]^{\mathsf{T}}$.Then, the first
and second derivatives of $\tilde{{\mu}}_{t}(\boldsymbol{\eta})$ with respect
to $\boldsymbol{\eta}$ are given as follows:

$\displaystyle\frac{\partial\tilde{{\mu}}_{t}(\boldsymbol{\eta})}{\partial\alpha_{r}}$
$\displaystyle=\sum_{m=1}^{M}b_{m}\tilde{w}_{t,m}s_{t},\,\frac{\partial\tilde{{\mu}}_{t}(\boldsymbol{\eta})}{\partial\alpha_{i}}=j\sum_{m=1}^{M}b_{m}\tilde{w}_{t,m}s_{t}.$

For $\nu\in\\{\mathrm{x}\,\mathrm{y}\,\mathrm{z}\\}$, we can write

$\displaystyle\frac{\partial\tilde{{\mu}}_{t}(\boldsymbol{\eta})}{\partial\nu}$
$\displaystyle=-j\frac{2\pi}{\lambda}\alpha\sum_{m=1}^{M}b_{m}\left(u_{m,\nu}-u_{x}\right)\tilde{w}_{t,m}s_{t},$
$\displaystyle\frac{\partial^{2}\tilde{{\mu}}_{t}(\boldsymbol{\eta})}{\partial\alpha_{r}\partial\nu}$
$\displaystyle=-j\frac{2\pi}{\lambda}\sum_{m=1}^{M}b_{m}\left(u_{m,\nu}-u_{\nu}\right)\tilde{w}_{t,m}s_{t},$
$\displaystyle\frac{\partial^{2}\tilde{{\mu}}_{t}(\boldsymbol{\eta})}{\partial\alpha_{i}\partial\nu}$
$\displaystyle=j\frac{\partial^{2}\tilde{{\mu}}_{t}(\boldsymbol{\eta})}{\partial\alpha_{r}\partial\nu},$
$\displaystyle\frac{\partial^{2}\tilde{{\mu}}_{t}(\boldsymbol{\eta})}{\partial\nu\partial\nu}=-\alpha\frac{4\pi^{2}}{\lambda^{2}}\sum_{m=1}^{M}b_{m}\left(u_{m,\nu}-u_{\nu}\right)^{2}\tilde{w}_{t,m}s_{t}$
$\displaystyle-j\frac{2\pi}{\lambda}\alpha\sum_{m=1}^{M}b_{m}\left(\frac{1-u^{2}_{m,\nu}}{\left\lVert\boldsymbol{p}-\boldsymbol{p}_{m}\right\rVert}-\frac{1-u^{2}_{\nu}}{\left\lVert\boldsymbol{p}-\boldsymbol{p}_{\text{RIS}}\right\rVert}\right)\tilde{w}_{t,m}s_{t}.$

Moreover, if $\nu_{1},\nu_{2}\in\\{\mathrm{x}\,\mathrm{y}\,\mathrm{z}\\}$ and
they correspond to different coordinates, it is possible to express

$\displaystyle\frac{\partial^{2}\tilde{{\mu}}_{t}(\boldsymbol{\eta})}{\partial\nu_{1}\partial\nu_{2}}=-\alpha\frac{4\pi^{2}}{\lambda^{2}}\sum_{m=1}^{M}b_{m}\left(u_{m,\nu_{1}}-u_{\nu_{1}}\right)\left(u_{m,\nu_{2}}-u_{\nu_{2}}\right)\tilde{w}_{t,m}s_{t}$
$\displaystyle+j\frac{2\pi}{\lambda}\alpha\sum_{m=1}^{M}b_{m}\left(\frac{u_{m,\nu_{1}}u_{m,\nu_{2}}}{\left\lVert\boldsymbol{p}-\boldsymbol{p}_{m}\right\rVert}-\frac{u_{\nu_{1}}u_{\nu_{2}}}{\left\lVert\boldsymbol{p}-\boldsymbol{p}_{\text{RIS}}\right\rVert}\right)\tilde{w}_{t,m}s_{t}.$

##  Appendix F Far-Field Approximation of the RIS Steering Vector in (3)

In this part, we will show that the near-field steering vector in (3)
degenerates to its standard far-field counterpart when
$\left\lVert\boldsymbol{p}-\boldsymbol{p}_{\text{RIS}}\right\rVert\gg\left\lVert\boldsymbol{p}_{m}-\boldsymbol{p}_{\text{RIS}}\right\rVert$.
Specifically, using the geometrical relations based on the definitions before
(4), we can write

$\displaystyle
d_{m}^{2}=d^{2}+q_{m}^{2}-2dq_{m}\sin(\vartheta)\cos(\varphi-\psi_{m})~{},$
(94)

where $d_{m}=\left\lVert\boldsymbol{p}-\boldsymbol{p}_{m}\right\rVert$,
$d=\left\lVert\boldsymbol{p}-\boldsymbol{p}_{\text{RIS}}\right\rVert$,
$q_{m}=\left\lVert\boldsymbol{p}_{m}-\boldsymbol{p}_{\text{RIS}}\right\rVert$
and $\psi_{m}$ is the angle between
$\boldsymbol{p}_{m}-\boldsymbol{p}_{\text{RIS}}$ and the X-axis, i.e.,

$\displaystyle\boldsymbol{p}_{m}-\boldsymbol{p}_{\text{RIS}}=q_{m}[\cos(\psi_{m})~{}\sin(\psi_{m})~{}0]^{\mathsf{T}}~{}.$
(95)

Re-arranging (94) and assuming $d\gg q_{m}$ yields

$\displaystyle d_{m}$
$\displaystyle=d\sqrt{1+\frac{q_{m}^{2}}{d^{2}}-2\frac{q_{m}}{d}\sin(\vartheta)\cos(\varphi-\psi_{m})}~{},$
$\displaystyle\approx
d\left(1-\frac{q_{m}}{d}\sin(\vartheta)\cos(\varphi-\psi_{m})\right)~{},$ (96)

where the approximation in (96) is obtained via first-order Taylor expansion
of $f(x)=\sqrt{1+x^{2}-2x\kappa}$ around $x=0$ for constant $\kappa$ [48, Eq.
(6)], [61, Eq. (3)], [47, Eq. (12)]. Using the approximation in (96), the
phase term in (3) can be written as

$\displaystyle\left\lVert\boldsymbol{p}-\boldsymbol{p}_{m}\right\rVert-\left\lVert\boldsymbol{p}-\boldsymbol{p}_{\text{RIS}}\right\rVert$
$\displaystyle=d_{m}-d~{},$ $\displaystyle\approx-
q_{m}\sin(\vartheta)\cos(\varphi-\psi_{m})~{},$ (97)

which leads to the standard far-field steering vector [47, Eq. (9)]:

$\displaystyle[(\boldsymbol{p})]_{m}$
$\displaystyle=\exp\left(-j\frac{2\pi}{\lambda}\left(\left\lVert\boldsymbol{p}-\boldsymbol{p}_{m}\right\rVert-\left\lVert\boldsymbol{p}-\boldsymbol{p}_{\text{RIS}}\right\rVert\right)\right)~{},$
$\displaystyle\approx\exp\left(-j(\boldsymbol{p}_{m}-\boldsymbol{p}_{\text{RIS}})^{\mathsf{T}}\boldsymbol{k}(\vartheta,\varphi)\right)~{},$
(98)

where $\boldsymbol{k}(\vartheta,\varphi)$ is defined in (5).

##  Appendix G Derivatives for FIM Computation in (60)

The derivatives of $\mu_{t}$ with respect to the RIS model parameters
$\beta_{{\rm{min}}}$, $\kappa$ and $\phi$, used for FIM computation in (60),
are given by

$\displaystyle\frac{\partial\mu_{t}(\boldsymbol{\eta})}{\partial\beta_{\text{min}}}=\alpha\sqrt{E_{s}}\sum_{m=1}^{M}$
$\displaystyle[(\boldsymbol{p})]_{m}e^{j\theta_{t,m}}$
$\displaystyle\times\left(1-\left(\frac{\sin(\theta_{t,m}-\phi)+1}{2}\right)^{\kappa}\right),$
$\displaystyle\frac{\partial\mu_{t}(\boldsymbol{\eta})}{\partial\kappa}$
$\displaystyle=\alpha\sqrt{E_{s}}\sum_{m=1}^{M}[(\boldsymbol{p})]_{m}e^{j\theta_{t,m}}(1-\beta_{{\rm{min}}})$
$\displaystyle\times\left(\frac{\sin(\theta_{t,m}-\phi)+1}{2}\right)^{\kappa}\log\left(\frac{\sin(\theta_{t,m}-\phi)+1}{2}\right),$
$\displaystyle\frac{\partial\mu_{t}(\boldsymbol{\eta})}{\partial\phi}=$
$\displaystyle-\alpha\sqrt{E_{s}}\sum_{m=1}^{M}[(\boldsymbol{p})]_{m}e^{j\theta_{t,m}}(1-\beta_{\text{min}})$
$\displaystyle\times\kappa\left(\frac{\sin(\theta_{t,m}-\phi)+1}{2}\right)^{\kappa-1}\left(\frac{\cos(\theta_{t,m}-\phi)}{2}\right).$

## References

  * [1] W. Saad _et al._ , “A vision of 6G wireless systems: Applications, trends, technologies, and open research problems,” _IEEE Netw._ , vol. 34, no. 3, pp. 134–142, 2019.
  * [2] T. S. Rappaport _et al._ , “Wireless communications and applications above 100 GHz: Opportunities and challenges for 6G and beyond,” _IEEE Access_ , vol. 7, pp. 78 729–78 757, 2019.
  * [3] H. Tataria _et al._ , “6G wireless systems: Vision, requirements, challenges, insights, and opportunities,” _Proc. IEEE_ , vol. 109, no. 7, pp. 1166–1199, 2021.
  * [4] A. R. Chiriyath _et al._ , “Radar-communications convergence: Coexistence, cooperation, and co-design,” _IEEE Trans. Cogn. Commun. Netw._ , vol. 3, no. 1, pp. 1–12, 2017.
  * [5] F. Liu _et al._ , “Integrated sensing and communications: Towards dual-functional wireless networks for 6G and beyond,” 2021. [Online]. Available: https://arxiv.org/abs/2108.07165
  * [6] C. De Lima _et al._ , “Convergent communication, sensing and localization in 6G systems: An overview of technologies, opportunities and challenges,” _IEEE Access_ , vol. 9, pp. 26 902–26 925, 2021.
  * [7] H. Wymeersch _et al._ , “Integration of communication and sensing in 6G: a joint industrial and academic perspective,” 2021. [Online]. Available: https://arxiv.org/abs/2106.13023
  * [8] D. K. Pin Tan _et al._ , “Integrated sensing and communication in 6G: Motivations, use cases, requirements, challenges and future directions,” in _Proc. 1st IEEE Int. Online Symp. Joint Commun. Sens. (JC &S)_, 2021, pp. 1–6.
  * [9] Q. Wu _et al._ , “Intelligent reflecting surface-aided wireless communications: A tutorial,” _IEEE Trans. Commun._ , vol. 69, no. 5, pp. 3313–3351, 2021.
  * [10] A. Elzanaty _et al._ , “Towards 6G holographic localization: Enabling technologies and perspectives,” 2021. [Online]. Available: https://arxiv.org/abs/2103.12415
  * [11] H. Wymeersch _et al._ , “Radio localization and mapping with reconfigurable intelligent surfaces: Challenges, opportunities, and research directions,” _IEEE Veh. Technol. Mag._ , vol. 15, no. 4, pp. 52–61, 2020.
  * [12] E. Basar _et al._ , “Wireless communications through reconfigurable intelligent surfaces,” _IEEE Access_ , vol. 7, pp. 116 753–116 773, 2019\.
  * [13] C. Pan _et al._ , “Reconfigurable intelligent surfaces for 6G systems: Principles, applications, and research directions,” _IEEE Commun. Mag._ , vol. 59, no. 6, pp. 14–20, 2021.
  * [14] X. Yuan _et al._ , “Reconfigurable-intelligent-surface empowered wireless communications: Challenges and opportunities,” _IEEE Wireless Commun._ , vol. 28, no. 2, pp. 136–143, 2021.
  * [15] C. Huang _et al._ , “Reconfigurable intelligent surfaces for energy efficiency in wireless communication,” _IEEE Trans. Wireless Commun._ , vol. 18, no. 8, pp. 4157–4170, 2019.
  * [16] D. Dardari _et al._ , “LOS/NLOS near-field localization with a large reconfigurable intelligent surface,” _IEEE Transactions on Wireless Communications_ , vol. 21, no. 6, pp. 4282–4294, 2022.
  * [17] Z. Yang _et al._ , “Energy-efficient wireless communications with distributed reconfigurable intelligent surfaces,” _IEEE Trans. Wireless Commun._ , vol. 21, no. 1, pp. 665–679, 2022.
  * [18] B. Di _et al._ , “Hybrid beamforming for reconfigurable intelligent surface based multi-user communications: Achievable rates with limited discrete phase shifts,” _IEEE J. Sel. Areas Commun._ , vol. 38, no. 8, pp. 1809–1822, 2020.
  * [19] C. Huang _et al._ , “Reconfigurable intelligent surface assisted multiuser MISO systems exploiting deep reinforcement learning,” _IEEE J. Sel. Areas Commun._ , vol. 38, no. 8, pp. 1839–1850, 2020.
  * [20] H. Guo _et al._ , “Weighted sum-rate maximization for reconfigurable intelligent surface aided wireless networks,” _IEEE Trans. Wireless Commun._ , vol. 19, no. 5, pp. 3064–3076, 2020.
  * [21] Z. Zhou _et al._ , “Joint transmit precoding and reconfigurable intelligent surface phase adjustment: A decomposition-aided channel estimation approach,” _IEEE Trans. Commun._ , vol. 69, no. 2, pp. 1228–1243, 2021.
  * [22] Q. Wu _et al._ , “Intelligent reflecting surface enhanced wireless network via joint active and passive beamforming,” _IEEE Trans. Wireless Commun._ , vol. 18, no. 11, pp. 5394–5409, 2019.
  * [23] M.-M. Zhao _et al._ , “Outage-constrained robust beamforming for intelligent reflecting surface aided wireless communication,” _IEEE Trans. Signal Process._ , vol. 69, pp. 1301–1316, 2021.
  * [24] S. Hu _et al._ , “Beyond massive MIMO: The potential of positioning with large intelligent surfaces,” _IEEE Trans. Signal Process._ , vol. 66, no. 7, pp. 1761–1774, 2018.
  * [25] K. Keykhosravi _et al._ , “SISO RIS-enabled joint 3D downlink localization and synchronization,” in _IEEE Int. Conf. Commun._ , 2021, pp. 1–6.
  * [26] A. Elzanaty _et al._ , “Reconfigurable intelligent surfaces for localization: Position and orientation error bounds,” _IEEE Trans. Signal Process._ , vol. 69, pp. 5386–5402, 2021.
  * [27] Z. Abu-Shaban _et al._ , “Near-field localization with a reconfigurable intelligent surface acting as lens,” in _IEEE Int. Conf. Commun._ , 2021, pp. 1–6.
  * [28] O. Rinchi _et al._ , “Compressive near-field localization for multipath RIS-aided environments,” _IEEE Communications Letters_ , pp. 1–1, 2022\.
  * [29] F. Guidi _et al._ , “Radio positioning with EM processing of the spherical wavefront,” _IEEE Trans. Wireless Commun._ , vol. 20, no. 6, pp. 3571–3586, 2021.
  * [30] M. Rahal _et al._ , “RIS-enabled localization continuity under near-field conditions,” in _Proc. IEEE 22nd Int. Workshop Signal Process. Adv. Wireless Commun. (SPAWC)_ , 2021, pp. 436–440.
  * [31] A. Guerra _et al._ , “Near-field tracking with large antenna arrays: Fundamental limits and practical algorithms,” _IEEE Transactions on Signal Processing_ , vol. 69, pp. 5723–5738, 2021.
  * [32] M. Rahal _et al._ , “Constrained RIS phase profile optimization and time sharing for near-field localization,” 2022. [Online]. Available: https://arxiv.org/abs/2203.07269
  * [33] Z. Wang _et al._ , “Location awareness in beyond 5G networks via reconfigurable intelligent surfaces,” _IEEE J. Sel. Areas Commun._ , pp. 1–1, 2022.
  * [34] K. Keykhosravi _et al._ , “Multi-RIS discrete-phase encoding for interpath-interference-free channel estimation,” 2021. [Online]. Available: https://arxiv.org/abs/2106.07065
  * [35] S. Abeywickrama _et al._ , “Intelligent reflecting surface: Practical phase shift model and beamforming optimization,” _IEEE Trans. Commun._ , vol. 68, no. 9, pp. 5849–5863, 2020.
  * [36] P. Xu _et al._ , “Reconfigurable intelligent surfaces-assisted communications with discrete phase shifts: How many quantization levels are required to achieve full diversity?” _IEEE Wireless Commun. Lett._ , vol. 10, no. 2, pp. 358–362, 2021.
  * [37] G. Gradoni _et al._ , “End-to-end mutual coupling aware communication model for reconfigurable intelligent surfaces: An electromagnetic-compliant approach based on mutual impedances,” _IEEE Wireless Commun. Lett._ , vol. 10, no. 5, pp. 938–942, 2021.
  * [38] W. Wang _et al._ , “Joint beam training and positioning for intelligent reflecting surfaces assisted millimeter wave communications,” _IEEE Trans. Wireless Commun._ , vol. 20, no. 10, pp. 6282–6297, 2021.
  * [39] J. He _et al._ , “Channel estimation for RIS-aided mmWave MIMO systems via atomic norm minimization,” _IEEE Transactions on Wireless Communications_ , vol. 20, no. 9, pp. 5786–5797, 2021.
  * [40] Y. Zhang _et al._ , “Performance analysis of RIS-aided systems with practical phase shift and amplitude response,” _IEEE Trans. Veh. Technol._ , vol. 70, no. 5, pp. 4501–4511, 2021.
  * [41] S. Fortunati _et al._ , “Performance bounds for parameter estimation under misspecified models: Fundamental findings and applications,” _IEEE Signal Process. Mag._ , vol. 34, no. 6, pp. 142–157, 2017.
  * [42] C. D. Richmond _et al._ , “Parameter bounds on estimation accuracy under model misspecification,” _IEEE Trans. Signal Process._ , vol. 63, no. 9, pp. 2263–2278, 2015.
  * [43] C. Ozturk _et al._ , “On the impact of hardware impairments on RIS-aided localization,” in _IEEE Int. Conf. Commun._ , 2022. [Online]. Available: www.ee.bilkent.edu.tr/%7Egezici/ICC.pdf
  * [44] S. Fortunati _et al._ , “Chapter 4: Parameter bounds under misspecified models for adaptive radar detection,” in _Academic Press Library in Signal Processing, Volume 7_ , R. Chellappa _et al._ , Eds. Academic Press, 2018, pp. 197–252.
  * [45] H. Zhang _et al._ , “Towards ubiquitous positioning by leveraging reconfigurable intelligent surface,” _IEEE Commun. Lett._ , vol. 25, no. 1, pp. 284–288, 2021.
  * [46] T. A. Milligan, _Modern antenna design_. John Wiley & Sons, 2005.
  * [47] B. Friedlander, “Localization of signals in the near-field of an antenna array,” _IEEE Transactions on Signal Processing_ , vol. 67, no. 15, pp. 3885–3893, 2019.
  * [48] J.-W. Tao _et al._ , “Joint DOA, range, and polarization estimation in the Fresnel region,” _IEEE Transactions on Aerospace and Electronic Systems_ , vol. 47, no. 4, pp. 2657–2672, 2011.
  * [49] V. R. Gowda _et al._ , “Wireless power transfer in the radiative near field,” _IEEE Antennas and Wireless Propagation Letters_ , vol. 15, pp. 1865–1868, 2016.
  * [50] B. O. Zhu _et al._ , “Active impedance metasurface with full 360 reflection phase tuning,” _Scientific reports_ , vol. 3, no. 1, pp. 1–6, 2013.
  * [51] L. Dai _et al._ , “Reconfigurable intelligent surface-based wireless communications: Antenna design, prototyping, and experimental results,” _IEEE Access_ , vol. 8, pp. 45 913–45 923, 2020.
  * [52] S. Sun _et al._ , “Gradient-index meta-surfaces as a bridge linking propagating waves and surface waves,” _Nature materials_ , vol. 11, no. 5, pp. 426–431, 2012.
  * [53] C. L. Holloway _et al._ , “An overview of the theory and applications of metasurfaces: The two-dimensional equivalents of metamaterials,” _IEEE Antennas and Propagation Magazine_ , vol. 54, no. 2, pp. 10–35, 2012.
  * [54] K. Zhi _et al._ , “Uplink achievable rate of intelligent reflecting surface-aided millimeter-wave communications with low-resolution ADC and phase noise,” _IEEE Wireless Communications Letters_ , vol. 10, no. 3, pp. 654–658, 2021.
  * [55] T. T. Le _et al._ , “Misspecified Cramer-Rao bounds for blind channel estimation under channel order misspecification,” _IEEE Trans. Signal. Process._ , pp. 1–1, 2021.
  * [56] F. Roemer, “Misspecified Cramer-Rao bound for delay estimation with a mismatched waveform: A case study,” in _IEEE Int. Conf. Acoustics, Speech Signal Process._ , 2020, pp. 5994–5998.
  * [57] Y. Wang _et al._ , “Super-resolution channel estimation for arbitrary arrays in hybrid millimeter-wave massive MIMO systems,” _IEEE Journal of Selected Topics in Signal Processing_ , vol. 13, no. 5, pp. 947–960, 2019.
  * [58] A. A. Cuyt _et al._ , _Handbook of Continued Fractions for Special Functions_ , 1st ed. Springer Publishing Company, Incorporated, 2008.
  * [59] A. Swindlehurst _et al._ , “Maximum likelihood methods in radar array signal processing,” _Proceedings of the IEEE_ , vol. 86, no. 2, pp. 421–441, 1998.
  * [60] A. Aubry _et al._ , “A new sequential optimization procedure and its applications to resource allocation for wireless systems,” _IEEE Transactions on Signal Processing_ , vol. 66, no. 24, pp. 6518–6533, 2018.
  * [61] E. Grosicki _et al._ , “A weighted linear prediction method for near-field source localization,” _IEEE Transactions on Signal Processing_ , vol. 53, no. 10, pp. 3651–3660, 2005.

  *[ISAC]: integrated sensing and communication
  *[ISLAC]: integrated sensing, localization, and communication
  *[SNR]: signal-to-noise ratio
  *[LoS]: line-of-sight
  *[BS]: base station
  *[RISs]: reconfigurable intelligent surface
  *[RIS]: reconfigurable intelligent surface
  *[AoA]: angle-of-arrival
  *[AoD]: angle-of-departure
  *[UE]: user equipment
  *[MCRB]: misspecified Cramér-Rao bound
  *[LB]: lower bound
  *[SNRs]: signal-to-noise ratio
  *[MML]: mismatched maximum-likelihood
  *[ML]: maximum-likelihood
  *[CRB]: Cramér-Rao bound