# RIS Position and Orientation Estimation via Multi-Carrier Transmissions and
Multiple Receivers

Reza Ghazalian1, Hui Chen2, George C. Alexandropoulos34,
Gonzalo Seco-Granados5, Henk Wymeersch2, and Riku Jäntti1
1Aalto University, Finland, 2Chalmers University of Technology, Sweden,
3National and Kapodistrian University of Athens, Greece, 4Technology
Innovation Institute, UAE,
5Universitat Autònoma de Barcelona, Spain
e-mails: {reza.ghazalian<EMAIL_ADDRESS>{hui.chen,
<EMAIL_ADDRESS>
<EMAIL_ADDRESS><EMAIL_ADDRESS>
###### Abstract

Reconfigurable intelligent surfaces (RISs) are considered as an enabling
technology for the upcoming sixth generation of wireless systems, exhibiting
significant potential for radio localization and sensing. An RIS is usually
treated as an anchor point with known position and orientation when deployed
to offer user localization. However, it can also be attached to a user to
enable its localization in a semi-passive manner. In this paper, we consider a
static user equipped with an RIS and study the RIS localization problem (i.e.,
joint three-dimensional position and orientation estimation), when operating
in a system comprising a single-antenna transmitter and multiple synchronized
single-antenna receivers with known locations. We present a multi-stage
estimator using time-of-arrival and spatial frequency measurements, and derive
the Cramér-Rao lower bounds for the estimated parameters to validate the
estimator’s performance. Our simulation results demonstrate the efficiency of
the proposed RIS state estimation approach under various system operation
parameters.

###### Index Terms:

Localization, reconfigurable intelligent surfaces, orientation, multi-carrier
transmission, OFDM, time of arrival.

##  I Introduction

Reconfigurable intelligent surfaces (RISs) are recently considered as a
promising paradigm shift for 6G wireless systems [1, 2]. An RIS is a thin
planar surface comprising multiple low-cost metamaterials whose response when
excited from impinging electromagnetic waves is dynamically programmable [3].
This feature renders RISs as enablers of programmable signal propagation,
motivating the concept of smart wireless environments [4], which can be
exploited for offering coverage extension as well as localization and mapping
[5]. In most cases, RISs are deployed as anchors with known locations and
orientations, and can support or enable user localization; this is called RIS-
aided or RIS-enabled localization [6]. In addition, RISs can be carried by a
user to enable its semi-passive localization [7]. In this case, the RIS state
is unknown and needs to be estimated; this problem is known as RIS
localization or RIS state estimation.

In terms of RIS-aided and RIS-enabled localization, a large number of studies
have been conducted ranging from two-dimensional (2D) [8] to three-dimensional
(3D) [9] cases, far-field (FF) [10] to near-field (NF) [11] propagation
conditions, as well as from indoor [12] to outdoor [13] scenarios. In [8], the
authors proposed a method to discriminate the FF from NF targeting the
minimization of the user localization error in an RIS-assisted positioning
setup. In [9], the Cramér-Rao lower bounds (CRBs) on the 3D position and
orientation of a user for both the NF and FF cases were derived for an RIS-
assisted joint communication and localization system. Considering user
mobility and the spatial-wideband effect, an efficient localization method was
presented for the FF scenario in [10]. An RIS-aided multi-user localization
method for an indoor scenario was proposed in [12], where a particle swarm
optimization was deployed for the RIS phase profile design. Joint
communication and user localization with an RIS mounted on an unmanned aerial
vehicle was presented in [13], where the vehicle’s trajectory and the RIS
phase shifts were jointly optimized. Collectively, all the above works
showcase that RISs can boost, or even enable in certain cases, localization,
offering improved estimation accuracy with reduced infrastructure cost.

In contrast to RIS-aided or RIS-enabled localization, the problem of _RIS
state estimation_ is more challenging as a typical passive RIS has no local
estimation capabilities, and the problem has received only limited attention.
As shown in [7, 14], the localization of an RIS can be formulated as a bi-
static sensing problem. In [14], an RIS localization method was developed for
a 2D scenario. By using measurements for the time of arrival (TOA), a 3D RIS
localization algorithm was proposed in [7]. However, the RIS orientation
cannot be estimated from TOA measurements. Note that an RIS contains a planar
array of metamaterials, hence, the angle of arrival (AOA) and/or the angle of
departure (AOD) information can be exploited for the surface’s orientation
estimation. However, for an RIS without sensing capabilities and unknown
position and orientation, these angles are hard to estimate.

In this paper, we study the RIS joint 3D position and orientation estimation
problem under a generic FF channel for the case of a static RIS in the
vicinity of multi-carrier transmissions from a single-antenna transmitter (TX)
to multiple synchronized single-antenna receivers (RXs). We present a low-
complexity estimator based on the measurements at RXs, including the TOA and
spatial frequencies at the RIS. To validate its efficiency, we derive the
theoretical CRBs for the estimated parameters, which are shown to be achieved
under certain operating conditions. We compare the proposed method with that
in [7] that only uses TOA measurements to show the benefits of exploiting the
spatial frequency at the RIS for its orientation estimation.

#### Notation

Vectors and matrices are indicated by lowercase and uppercase bold letters,
respectively. The element in the $i$th row and $j$th column of matrix
$\mathbf{A}$ is denotes by $\left[\mathbf{A}\right]_{i,j}$. The sub-index
$i:j$ determines all the elements between $i$ and $j$. The complex conjugate,
Hermitian, transpose, and Moore–Penrose inverse operators are represented by
$\left(.\right)^{*}$, $\left(.\right)^{\mathsf{H}}$, $\left(.\right)^{\top}$,
and $\left(.\right)^{\dagger}$, respectively. $\|.\|$ calculates the norm of
vectors or Frobenius norm of matrices. By $\odot$ and $\otimes$, we indicate
the element-wise and Kronecker products, respectively. $\jmath=\sqrt{-1}$ and
$\mathbf{1}_{K}$ is a column vector comprising all ones with length $K$. The
functions $\text{atan2}(y,x)$ and $\text{acos}(x)$ are the four-quadrant
inverse tangent and inverse cosine functions, respectively.

##  II System Model

Figure 1: The considered system model comprising a single-antenna TX, $M$
single-antenna RXs (here, $M=2$ for illustrational simplicity), and an RIS
with unknown 3D position and 1D orientation $\alpha$ (w.r.t. the $z$ axis).

In this section, we present the considered wireless system and signal model
for the proposed RIS localization problem.

###  II-A System Setup

We consider the multi-carrier downlink transmission system illustrated in Fig.
1, which comprises a single-antenna TX with a known location
$\mathbf{p}_{\text{tx}}$, $M$ RXs with known locations
$\mathbf{p}_{1},\dots,\mathbf{p}_{M}$, and an RIS with an unknown state,
defined as its 3D position $\mathbf{p}_{\text{ris}}$ together with its 1D
orientation angle $\alpha$. Note that in this work, We assumed that the RIS
only has one orientation degree of freedom. By considering the following
rotation matrix:

$\mathbf{R}_{\alpha}\triangleq\begin{bmatrix}\cos{\alpha}&\sin{\alpha}&0\\\
-\sin{\alpha}&\cos{\alpha}&0\\\ 0&0&1\end{bmatrix},$ (1)

the direction vectors from the RIS to the TX and to each $m$th RX in the RIS
local coordinate system can be obtained as follows:

$\mathbf{a}_{\text{tr}}=\mathbf{R}_{\alpha}\frac{\mathbf{p}_{\text{tx}}-\mathbf{p}_{\text{ris}}}{\|\mathbf{p}_{\text{tx}}-\mathbf{p}_{\text{ris}}\|},\quad\text{and}\quad\mathbf{a}_{\text{rm}}=\mathbf{R}_{\alpha}\frac{\mathbf{p}_{m}-\mathbf{p}_{\text{ris}}}{\|\mathbf{p}_{m}-\mathbf{p}_{\text{ris}}\|}.$
(2)

The RIS is a uniform planar array with $K_{r}$ and $K_{c}$ elements in each
row and column, respectively. The inter-element space should be less than
half-wavelength $\Delta\leq\lambda/2$, with $\lambda$ being the signal
wavelength. By assuming that the TX and RXs are synchronized under LOS
blockage conditions 111Note that, when the LOS path is present, the
requirement on TX-RX synchronization can be removed and the approach in [7]
can be used for separating the LOS and RIS paths, resulting in this paper’s
simplified LOS-blockage assumption. However, for the considered synchronized
TX and RXs, the LOS path does not convey any information., each RX receives
the signals from the TX via the RIS. We assume that the RXs send their
measurements to a fusion center [4] to estimate the 3D position and 1D
orientation of the RIS.

###  II-B Signal and Channel Models

The TX transmits $T$ orthogonal frequency division multiplexing (OFDM) symbols
over time via $N_{c}$ sub-carriers. We select $T$ sufficiently small such that
the considered channel is constant during each transmission interval. Without
loss of generality, we assume that all the transmitted symbols over all sub-
carriers have unit power. In addition, RIS is programmed to change its phase
profile randomly during each discrete time instant $t$. The RIS phase profile
is denoted by vector $\boldsymbol{\gamma}_{t}\in\mathbb{C}^{K\times 1}$, where
$|[\boldsymbol{\gamma}_{t}]_{k}|=1$ $\forall$$k$ and $K\triangleq K_{r}K_{c}$.

After removing the cyclic prefix and computing the fast Fourier transform
(FFT), the baseband received signal $\mathbf{Y}_{m}\in\mathbb{C}^{N_{c}\times
T}$ can be mathematically expressed as:222For convenience, we don’t consider
the LOS path, which, if it is present and resolvable, can be removed from the
observation. Since TX and RXs are synchronized, the LOS path provides no
additional information.

$\mathbf{Y}_{m}\triangleq
g_{m}\sqrt{P_{t}}\mathbf{d}(\,\tau_{m})\,\mathbf{b}^{\top}(\,\boldsymbol{\theta}_{m},\boldsymbol{\phi})\,\boldsymbol{\Gamma}+\mathbf{W}_{m},$
(3)

where $g_{m}\triangleq\rho_{m}e^{\jmath\varphi_{m}}$ is an unknown channel
gain, and
$\boldsymbol{\theta}_{m}\triangleq[[\boldsymbol{\theta}_{m}]_{\text{el}},[\boldsymbol{\theta}_{m}]_{\text{az}}]^{\top}$
and
$\boldsymbol{\phi}\triangleq[[\boldsymbol{\phi}]_{\text{el}},[\boldsymbol{\phi}]_{\text{az}}]^{\top}$
are the AOD from the RIS to the $m$th RX and the AOA at the RIS from the TX,
respectively. In fact, $\boldsymbol{\theta}_{m}$ is the angle in the direction
of vector $\mathbf{a}_{\text{rm}}$, where

$\displaystyle[\boldsymbol{\theta}_{m}]_{\text{el}}$
$\displaystyle=\text{acos}([\mathbf{a}_{\text{rm}}]_{3})$ (4)
$\displaystyle[\boldsymbol{\theta}_{m}]_{\text{az}}$
$\displaystyle=\text{atan2}([\mathbf{a}_{\text{rm}}]_{2},[\mathbf{a}_{\text{rm}}]_{1}).$
(5)

Similarly, $\boldsymbol{\phi}$ is the angle associated with vector
$\mathbf{a}_{\text{tr}}$. In addition, $P_{t}$ denotes the transmission power
and $\mathbf{W}_{m}\in\mathbb{C}^{N_{c}\times T}$ is the noise matrix
containing zero-mean circularly-symmetric independent and identically
distributed Gaussian elements with variance333We assume that the noise
variances at the all RXs are the same. The extension to distinct values for
the variances is straightforward. $\sigma^{2}$. The delay steering vector
$\mathbf{d}(\cdot)$ is defined as follows:

$\mathbf{d}(\,\tau_{m})\,\triangleq[1,e^{-\jmath 2\pi\Delta
f\tau_{m}}\dots,e^{-\jmath 2\pi(\,N_{c}-1)\,\Delta f\tau_{m}}\,]\,^{\top},$
(6)

where $\Delta f$ is the sub-carrier spacing. The delay of the propagation path
is
$\tau_{m}\triangleq(\|\mathbf{p}_{\text{tx}}-\mathbf{p}_{\text{ris}}\|+\|\mathbf{p}_{m}-\mathbf{p}_{\text{ris}}\|)/c$
with $c$ being the speed of light. In (3),
$\boldsymbol{\Gamma}\triangleq[\boldsymbol{\gamma}(0),\dots,\boldsymbol{\gamma}(T)]^{\top}$
and $\mathbf{b}(\cdot)\in\mathbb{C}^{K\times 1}$ is the Hadamard product of
the RIS array responses from both propagation sides, which is defined as:

$\mathbf{b}(\,\boldsymbol{\theta}_{m},\boldsymbol{\phi})\,\triangleq\boldsymbol{a}(\,\boldsymbol{\theta}_{m})\odot\boldsymbol{a}(\,\boldsymbol{\phi}\,)\,,$
(7)

where for an arbitrary elevation and azimuth pair $\boldsymbol{\psi}$, we
define
$\boldsymbol{a}(\boldsymbol{\psi})\triangleq\boldsymbol{a}_{r}(\boldsymbol{\psi})\otimes\boldsymbol{a}_{c}(\boldsymbol{\psi})$.
The $n$th element of vectors $\mathbf{a}_{r}$ and $\mathbf{a}_{c}$ are defined
as follows:

$[\boldsymbol{a}_{r}(\boldsymbol{\psi})]_{n}\triangleq e^{-\jmath\frac{2\pi
n\Delta}{\lambda}\sin{[\boldsymbol{\psi}]_{\text{el}}}\cos{[\boldsymbol{\psi}]_{\text{az}}}},n=0,\ldots,K_{r}-1$
(8a) $[\boldsymbol{a}_{c}(\boldsymbol{\psi})]_{n}\triangleq
e^{-\jmath\frac{2\pi
n\Delta}{\lambda}\sin{[\boldsymbol{\psi}]_{\text{el}}}\sin{[\boldsymbol{\psi}]_{\text{az}}}},n=0,\ldots,K_{c}-1.$
(8b)

Considering the latter definition of $\boldsymbol{a}(\boldsymbol{\psi})$ and
given (7)–(8), the following expression is deduced:

$\mathbf{b}(\,\boldsymbol{\theta}_{m},\boldsymbol{\phi})\,=\mathbf{a}_{0}(\,\boldsymbol{\theta}_{m},\boldsymbol{\phi})\otimes\mathbf{a}_{1}(\,\boldsymbol{\theta}_{m},\boldsymbol{\phi})\,,$
(9)

where the $n$th element of $\mathbf{a}_{0}(\cdot)$ and $\mathbf{a}_{1}(\cdot)$
can be expressed as:

$[\,\mathbf{a}_{0}(\,\boldsymbol{\theta}_{m},\boldsymbol{\phi})\,]\,_{n}=e^{-\jmath\frac{2\pi
n\Delta}{\lambda}\omega_{0}(\,\boldsymbol{\theta}_{m},\boldsymbol{\phi})\,},$
(10a)
$[\,\mathbf{a}_{1}(\,\boldsymbol{\theta}_{m},\boldsymbol{\phi})\,]\,_{n}=e^{-\jmath\frac{2\pi
n\Delta}{\lambda}\omega_{1}(\,\boldsymbol{\theta}_{m},\boldsymbol{\phi})\,},$
(10b)

where we have defined the spatial frequencies

$\omega_{0}(\,\boldsymbol{\theta}_{m},\boldsymbol{\phi})\,\triangleq\sin{\boldsymbol{[\phi}]_{\text{el}}}\cos{[\boldsymbol{\phi}]_{\text{az}}}+\sin{\boldsymbol{[\theta}_{m}]_{\text{el}}}\cos{[\boldsymbol{\theta}_{m}]_{\text{az}}}$
(11a)
$\omega_{1}(\,\boldsymbol{\theta}_{m},\boldsymbol{\phi})\,\triangleq\sin{\boldsymbol{[\phi}]_{\text{el}}}\sin{[\boldsymbol{\phi}]_{\text{az}}}+\sin{\boldsymbol{[\theta}_{m}]_{\text{el}}}\sin{[\boldsymbol{\theta}_{m}]_{\text{az}}}.$
(11b)

To ease notation, we hereafter define
$\omega_{0}^{m}\triangleq\omega_{0}(\,\boldsymbol{\theta}_{m},\boldsymbol{\phi})$
and
$\omega_{1}^{m}\triangleq\omega_{1}(\,\boldsymbol{\theta}_{m},\boldsymbol{\phi})$.
Accordingly, $\mathbf{b}(\boldsymbol{\theta}_{m},\boldsymbol{\phi})$ can be
written as a function of
$\boldsymbol{\omega}^{m}=[\omega_{0}^{m},\omega_{1}^{m}]^{\top}$, i.e., as
$\mathbf{b}(\boldsymbol{\omega}^{m})$.

Based on the observations (3), we next present an analysis for the considered
parameter estimation problem (i.e., the RIS’s 3D position and 1D orientation)
together with a low-complexity estimation scheme.

##  III Proposed Estimation Methodology

In this section, we describe how to estimate the RIS position and orientation
from (3), starting with a Fisher information analysis.

###  III-A Fisher Information Analysis

We derive the Fisher information matrix (FIM) and the CRB for the unknown
channel (i.e., $\tau_{m}$, $\omega_{0}^{m}$, $\omega_{0}^{m}$, $\rho_{m}$, and
$\phi_{m}$) and RIS-state parameters (i.e., $\mathbf{p}_{\text{ris}}$ and
$\alpha$). To this end, we introduce the noise-free part of the observation
stacked at the fusion center, say $\boldsymbol{M}\in\mathbb{C}^{N_{c}M\times
T}$ given (3), (9), (11a), and (11b) as
$\boldsymbol{M}\triangleq[\boldsymbol{M}_{\text{1}}^{\top},\dots,\boldsymbol{M}_{M}^{\top}]^{\top}$,
where $\boldsymbol{M}_{m}\triangleq
g_{m}\sqrt{P_{t}}\mathbf{d}(\,\tau_{m})\,\mathbf{b}^{\top}(\,\boldsymbol{\omega}^{m})\,\boldsymbol{\Gamma}\quad\forall
m$. We also introduce the $5M\times 1$ vector with the unknown channel
parameters
$\boldsymbol{\eta_{\text{ch}}}\triangleq[\boldsymbol{\eta}^{\top},\boldsymbol{\rho}^{\top},\boldsymbol{\varphi}^{\top}]^{\top}$,
$\boldsymbol{\eta}\triangleq[\boldsymbol{\tau}^{\top},\boldsymbol{\omega}_{0}^{\top},\boldsymbol{\omega}_{1}^{\top}]^{\top}\in\mathbb{R}^{3M\times
1}$, and the $4\times 1$ vector with the RIS state
$\boldsymbol{\zeta}\triangleq[\mathbf{p}_{\text{ris}}^{\top},\alpha]^{\top}$,
where $\boldsymbol{\tau}\triangleq[\tau_{1},\dots,\tau_{M}]^{\top}$ ,
$\boldsymbol{\omega}_{0}\triangleq[\omega_{0}^{1},\dots,\omega_{0}^{M}]^{\top}$,
$\boldsymbol{\omega}_{1}\triangleq[\omega_{1}^{1},\dots,\omega_{1}^{M}]^{\top}$,
$\boldsymbol{\rho}\triangleq[\rho_{0},\dots,\rho_{M}]^{\top}$, and
$\boldsymbol{\varphi}\triangleq[\varphi_{0},\dots,\varphi_{M}]^{\top}$. Based
on [15, Sec. 3.9], the FIM
$\mathbf{J}_{\boldsymbol{\eta}_{\text{ch}}}\in\mathbb{R}^{\text{5M}\times\text{5M}}$
is defined as follows:

$\mathbf{J}_{\boldsymbol{\eta}_{\text{ch}}}\triangleq\frac{2}{\sigma^{2}}\sum_{t=1}^{T}\Re\Big{\\{}\Big{(}\frac{\partial[\boldsymbol{M}]_{:,t}}{\partial\boldsymbol{\eta}_{\text{ch}}}\Big{)}^{\mathsf{H}}\frac{\partial[\boldsymbol{M}]_{:,t}}{\partial\boldsymbol{\eta}_{\text{ch}}}\,\Big{\\}}.$
(12)

We can then respectively derive the CRB related to $\tau_{m}$,
$\omega_{0}^{m}$, and $\omega_{1}^{m}$ at $m$th RX, namely, the time error
bound ($\text{TEB}_{m}$), the first spatial frequency bound
($\text{WEB}_{0}^{m}$), and the second spatial frequency bound
($\text{WEB}_{1}^{m}$) as:

$\sqrt{\mathbb{E}[\left(\tau_{m}-\hat{\tau}_{m}\right)^{2}]}\geq\text{TEB}_{m}\triangleq\sqrt{[\mathbf{J}_{\boldsymbol{\eta}_{\text{ch}}}^{-1}]_{m,m}}\quad,$
(13)

and for $i\in\\{1,2\\},$

$\displaystyle\sqrt{\mathbb{E}[\left(\omega_{i-1}^{m}-\hat{\omega}_{i-1}^{m}\right)^{2}]}$
$\displaystyle\geq\text{WEB}_{i-1}^{m}\triangleq\sqrt{[\mathbf{J}_{\boldsymbol{\eta}_{\text{ch}}}^{-1}]_{m+iM,m+iM}}$
(14)

where $m\in\\{1,\dots,M\\}$, and $\hat{\tau}_{m}$, $\hat{\omega}_{0}^{m}$, and
$\hat{\omega}_{1}^{m}$ are the estimations of the true parameters $\tau_{m}$,
$\omega_{0}^{m}$, and $\omega_{1}^{m}$, respectively. To derive the FIM of the
RIS state, we apply a transformation from the channel parameter vector
$\boldsymbol{\eta}$ to the variables in the state vector $\boldsymbol{\zeta}$.
Then, we obtain the equivalent FIM (EFIM) of $\boldsymbol{\eta}$ as
$\mathbf{J}_{\boldsymbol{\eta}}=[[\mathbf{J}_{\boldsymbol{\eta}_{\text{ch}}}^{-1}]_{1:3M,1:3M}]^{-1}$.
Accordingly, the FIM of RIS states is defined by means of the transformation
matrix $\mathbf{T}\in\mathbb{R}^{3M\times 4}$ (i.e., the Jacobian) as
$\mathbf{J}_{\boldsymbol{\zeta}}=\mathbf{T}^{\top}\mathbf{J}_{\boldsymbol{\eta}}\mathbf{T}$.
The $\ell$th row and $q$th entry of $\mathbf{T}$ is defined as [15, eq.
(3.30)]:

$[\mathbf{T}]_{\ell,q}\triangleq\frac{\partial[\,\boldsymbol{\eta}]\,_{\ell}}{\partial[\,\boldsymbol{\zeta}]\,_{q}}.$
(15)

The derivations of $\mathbf{J}_{\boldsymbol{\eta}}$ and $\mathbf{T}$ are
provided in the Appendix.

Capitalizing on (12) and (15), the desired position error bound (PEB) and
orientation error bound (OEB) are computed:

$\displaystyle\sqrt{\mathbb{E}[\|\mathbf{p}_{\text{ris}}-\hat{\mathbf{p}}_{\text{ris}}\|^{2}]}$
$\displaystyle\geq\text{PEB}\triangleq\sqrt{\mathrm{tr}([\mathbf{J}_{\boldsymbol{\zeta}}^{-1}]_{1:3,1:3})},$
(16a) $\displaystyle\sqrt{\mathbb{E}[(\alpha-\hat{\alpha})^{2}]}$
$\displaystyle\geq\text{OEB}\triangleq\sqrt{[\mathbf{J}_{\boldsymbol{\zeta}}^{-1}]_{4,4}},$
(16b)

where $\hat{\mathbf{p}}_{\text{ris}}$ and $\hat{\alpha}$ are the estimates of
the true RIS position and orientation, respectively.

###  III-B Maximum Likelihood Estimator

We stack all observations at each RX in the matrix $\mathbf{Y}$, i.e.,
$\mathbf{Y}\triangleq[{\mathbf{Y}_{1}}^{\top},\dots,{\mathbf{Y}_{M}}^{\top}]^{\top}$
and define $\mathbf{g}\triangleq[{g}_{1},\dots,{g}_{M}]^{\top}$. By using the
definition of $\boldsymbol{M}$ and (3)–(11b), we can define the maximum
likelihood estimator (MLE) as follows:

$\displaystyle\left[\hat{\mathbf{g}},\hat{\alpha},\hat{\mathbf{p}}_{\text{ris}}\right]$
$\displaystyle\triangleq\arg\max_{\mathbf{g},\alpha,\mathbf{p}_{\text{ris}}}f\left(\mathbf{Y}|\mathbf{g},\alpha,\mathbf{p}_{\text{ris}}\right)$
(17)
$\displaystyle=\arg\min_{\mathbf{g},\alpha,\mathbf{p}_{\text{ris}}}\|\mathbf{Y}-\boldsymbol{M}(\,\mathbf{g},\alpha,\mathbf{p}_{\text{ris}})\,\|^{2}.$

To solve (17), we can adopt gradient descent methods (e.g., Newton’s method).
However, this is challenging since the objective function is non-convex having
many local optima. In addition, the gradient descent methods are sensitive to
the initial point, i.e., they can get trapped in local optima without
appropriate initial points. To this end, we next present a low-complexity
estimator to find a proper initial guess.

###  III-C Low-Complexity Estimator

The estimator first estimates the TOA and spatial frequencies at each RIS.
Then these estimates are combined to determine the RIS state.

####  III-C1 TOA Estimation at each RX

Let $\mathbf{F}\in\mathbb{C}^{N_{F}\times N_{c}}$ be the inverse FFT matrix,
defined as $[\mathbf{F}]_{\ell,q}=(1/N_{F})e^{\jmath 2\pi\ell q/N_{F}}$ . By
computing $\mathbf{Z}_{m}=\mathbf{F}\mathbf{Y}_{m}$ at each RX, we can
coarsely estimate the TOA as
$\tilde{k}_{m}\triangleq\arg\max_{k}\|\mathbf{f}^{\top}_{k}\mathbf{Z}_{m}\|,$
where $\mathbf{f}_{k}$ is a vector comprising all zeros and a one at its $k$th
entry. Next, by solving
$\tilde{\delta}_{m}\triangleq\arg\max_{\delta_{m}\in\left[0,1/\left(N_{F}\Delta
f\right)\right]}\|\mathbf{f}_{k}^{\top}\mathbf{F}\left(\mathbf{Y}_{m}\odot\mathbf{d}\left(\delta_{m}\right)\mathbf{1}_{T}^{\top}\right)\|$
via the quasi-Newton method using ${\delta_{m}}=0$ as the initial point, a
refined TOA estimate $\tau_{m}$ can be obtained [7]:

$\hat{\tau}_{m}=\frac{\tilde{k}}{N_{F}\Delta f}-\tilde{\delta}_{m}.$ (18)

(a)

(b)

(c)

(d)

Figure 2: The evaluation of the RMSE of the estimated channel parameters and
RIS state versus the transmit power $P_{t}$: (a) RMSE of the RIS position and
PEB; (b) RMSE of the RIS orientation (deg) and OEB; (c) RMSE of the TOA and
TEB; and (d) RMSE of the $\boldsymbol{\omega}^{m}$ and WEB.

(a)

(b)

Figure 3: The effect of the bandwidth (BW) on the estimation accuracy for
$P_{\text{t}}=20\text{dBm}$: (a) RMSE of the RIS position/TOA and PEB; and (b)
RMSE of the RIS orientation (deg) and OEB. Figure 4: The comparison of the PEB
using only TOA and using TOA along with AOA/AOD information to/from the RIS
versus the number of RXs. The RXs are equally distributed on a circle centered
at the TX position with a radius equal to $5\text{m}$; this circle lies on the
plane $z=0$.

####  III-C2 Estimating $\boldsymbol{\omega}^{m}$ at each RX

One can remove the effect of $\tau_{m}$ from $\mathbf{Y}_{m}$ to obtain the
following expression:

$\displaystyle\mathbf{Y}_{m}^{r}$
$\displaystyle=\mathbf{Y}_{m}\odot\left(\mathbf{d}(\,-\hat{\tau}_{m})\,\mathbf{1}_{T}^{\top}\right)$
(19) $\displaystyle\approx
g_{m}\sqrt{P_{t}}\mathbf{1}_{N_{c}}\mathbf{b}^{\top}(\,\boldsymbol{\omega}^{m})\,\boldsymbol{\Gamma}+{\mathbf{W}_{m}^{d}},$

where
$\mathbf{W}_{m}^{d}\triangleq{\mathbf{W}_{m}}\odot\left(\mathbf{d}\left(-\hat{\tau}_{m}\right)\mathbf{1}_{T}^{\top}\right)$.
Next, summing $\mathbf{Y}_{m}^{r}$ over its rows, and then, computing the
transpose, yields:

$\displaystyle\mathbf{y}_{m}^{r}$
$\displaystyle={\mathbf{Y}_{m}^{r}}^{\top}\mathbf{1}_{N_{c}}=N_{c}g_{m}\sqrt{P_{t}}\boldsymbol{\Gamma}^{\top}\mathbf{b}(\,\boldsymbol{\omega}^{m})\,+\mathbf{w}_{m}^{t}.$
(20)

Finally, $\boldsymbol{\omega}^{m}$ can be obtained from the MLE estimator:

$\displaystyle\hat{\boldsymbol{{\omega}}}^{m}$
$\displaystyle=\arg\min_{\boldsymbol{\omega}^{m}}\|\mathbf{y}_{m}^{r}-N_{c}\sqrt{P_{t}}\hat{g}_{m}(\,\boldsymbol{\omega}^{m})\,\mathbf{\Gamma}^{\top}\mathbf{b}(\,\boldsymbol{\omega}^{m})\,\|^{2},$
(21)

where
$\hat{g}_{m}(\,\boldsymbol{\omega}^{m})\,\triangleq\mathbf{y}_{m}^{r}(\mathbf{\Gamma}^{\top}\mathbf{b}(\,\boldsymbol{\omega}^{m}))^{\dagger}/(N_{c}\sqrt{P_{t}})$.
This problem can be solved via a 2D search over the interval $[-2,2]$,
providing a coarse estimation for $\boldsymbol{\omega}^{m}$. The estimation
can be then refined via the quasi-Newton method using the latter coarse
estimate as the initial point.

####  III-C3 RIS 3D Position and 1D Orientation Estimation

Using the estimation $\hat{\tau}_{m}$, the RIS is constrained to lie on the
intersection of $M$ spheroids defined as
$\|\mathbf{p}_{\text{ris}}-\mathbf{p}_{\text{tx}}\|+\|\mathbf{p}_{\text{ris}}-\mathbf{p}_{m}\|=c\hat{\tau}_{m}$.
In the general case, the intersection of $M>2$ spheroids can be found by the
method from [7, eq. (16)–(18)]. However, for $M=2$, this method does not
apply, as there is a one-dimensional manifold of solutions. To characterize
these, we first mesh the surface of one of the spheroids and then calculate
the distances between each of the points on the mesh with the other spheroid,
using the technique given in [16, Sec 3]. We finally select the candidate RIS
points as the intersections, which have a distance less than a threshed
$d_{\text{th}}$, which is manually set. The resulting set of candidate
positions is denoted by $\mathcal{P}$ (where for $M>2$, this set contains a
single point).

By considering that (2) depends on the RIS position and orientation, and
substituting the definitions of elevation and azimuth angles (4), (5) in (11),
we notice that for a given $\tilde{\mathbf{p}}_{\text{ris}}\in\mathcal{P}$,
$\boldsymbol{\omega}^{m}$ is solely a function of $\alpha$. Hence,
$\alpha(\tilde{\mathbf{p}}_{\text{ris}})$ can be found by a line search

$\displaystyle\hat{\alpha}(\tilde{\mathbf{p}}_{\text{ris}})=\arg\min_{\alpha\in[0,2\pi)}\sum_{m=1}^{M}\|\hat{\boldsymbol{{\omega}}}^{m}-{\boldsymbol{{\omega}}}^{m}(\alpha)\|^{2}.$
(22)

For $M=2$, we finally find a unique estimate of the position via solving the
following optimization problem:

$\hat{\mathbf{p}}_{\text{ris}}=\arg\min_{\tilde{\mathbf{p}}_{\text{ris}}\in\mathcal{P}}\|\mathbf{y}^{r}-\boldsymbol{m}_{0}(\,\tilde{\mathbf{p}}_{\text{ris}},\hat{\alpha}(\tilde{\mathbf{p}}_{\text{ris}}))\,\|^{2},$
(23)

where $\mathbf{y}^{r}\triangleq\sum_{m=1}^{M}\mathbf{y}_{m}^{r}$,
$\boldsymbol{m}_{0}({\mathbf{p}}_{\text{ris}},\alpha)\triangleq\sum_{m=1}^{M}N_{c}\hat{g}_{m}(\,{\mathbf{p}_{\text{ris}}},{\alpha})\,\sqrt{P_{t}}\boldsymbol{\Gamma}^{\top}\mathbf{b}(\,{\mathbf{p}_{\text{ris}}},{\alpha})\,$,
$\hat{g}_{m}(\,{\mathbf{p}_{\text{ris}}},{\alpha})\,=\mathbf{y}_{m}^{r}(\mathbf{\Gamma}^{\top}\mathbf{b}({\mathbf{p}_{\text{ris}}},{\alpha}))^{\dagger}/(N_{c}\sqrt{P_{t}})$.
Note that this state estimation can serve as an initial guess the optimization
in (17).

TABLE I: Simulation Parameters. Parameter | Symbol | Value
---|---|---
Wavelength | $\lambda$ | $1~{}\text{cm}$
RIS element spacing | $\Delta$ | $0.25~{}\text{cm}$
Light speed | $c$ | $3\times 10^{8}~{}\text{m}/\text{sec}$
Number of sub-carriers | $N_{c}$ | $128$
Number of transmissions | $T$ | $100$
Sub-carrier spacing | $\Delta f$ | $120~{}\text{kHz}$
Noise PSD | $N_{0}$ | $-174~{}\text{dBm/Hz}$
RX’s noise figure | $n_{f}$ | $5~{}\text{dB}$
IFFT Size | $N_{F}$ | $4096$
The first RX position | $\mathbf{p}_{1}$ | $\left[-3\text{m},5\text{m},-1\text{m}\right]^{\top}$
The second RX position | $\mathbf{p}_{2}$ | $\left[3\text{m},-3\text{m},0\text{m}\right]^{\top}$
TX position | $\mathbf{p}_{\text{tx}}$ | $\left[0\text{m},0\text{m},0\text{m}\right]^{\top}$
RIS position | $\mathbf{p}_{\text{ris}}$ | $\left[4\text{m},1\text{m},-4\text{m}\right]^{\top}$
RIS orientation | $\alpha$ | $\pi/6~{}\text{rad}$

##  IV Numerical Results

In this section, we evaluate the proposed estimator for $M=2$ receivers, and
compare it with the corresponding bound. In particular, we compare the root
mean square error (RMSE) of the estimated parameters with the derived CRBs,
using $500$ noise realizations. The number of RIS elements was set to
$K=17\times 17$, and the phase profile of each of them was drawn from the
uniform distribution $[0,2\pi)$. The channel gain
$g_{m}\triangleq\rho_{m}e^{\jmath\varphi_{m}}$ modeled with
$\varphi_{m}\sim\mathcal{U}[0,2\pi)$ and amplitude [17, eqs. (27) and (29)]:

$\rho_{m}=\frac{\lambda^{2}(\,\cos{[\boldsymbol{\theta}_{m}]_{\text{el}}}\cos{[\boldsymbol{\phi]}_{\text{el}}})\,^{0.285}}{16\pi\|\mathbf{p}_{\text{tx}}-\mathbf{p}_{\text{ris}}\|\|\mathbf{p}_{m}-\mathbf{p}_{\text{ris}}\|}.$
(24)

The rest of the simulation parameters are given in Table I.

###  IV-A Results and Discussion

####  IV-A1 Impact of Transmission Power and Bandwidth

In Fig. 2, we study the effect of the transmitted power $P_{t}$ on the
performance of the proposed estimator. As shown, the RMSE of channel
parameters ($\hat{\tau}_{1}$, $\hat{\tau}_{2}$, $\hat{\omega}_{0}^{m}$, and
$\hat{\omega}_{1}^{m}$) and the RIS state ($\hat{\mathbf{p}}_{\text{ris}}$ and
$\hat{\alpha}$) are decreasing functions of $P_{t}$, and the CRB of the RIS
state estimation is attained when $P_{t}\geq 24$ dBm. It can be also seen that
the bottleneck for the RIS state estimation is the TOA estimation at lower
transmit power, where a small TOA error leads to a large positioning error. To
verify this behavior, we study the effect of the signal bandwidth (BW) in Fig
3. It is observed that, for low BW values, the localization algorithm fails,
whereas more BW yields more accurate TOA estimation.

####  IV-A2 Gain of Spatial Frequency Estimation over [7]

In Fig. 4, we compare with the scenario presented in [7], which only estimates
the RIS 3D location using TOA. As can be seen, using spatial frequency
estimation, which contains AOA/AOD information, along with TOA at RIS, results
in a more accurate RIS localization than that using only the TOA. Besides, the
estimator proposed in [7] cannot estimate the RIS location with only $M=2$
RXs, while the proposed method renders the problem indentifiable and provides
an accurate solution.

(a) $10\text{log}10(\text{PEB})$, $\alpha=0^{\circ}$

(b) $10\text{log}10(\text{OEB})$, $\alpha=0^{\circ}$

(c) $10\text{log}10(\text{PEB})$, $\alpha=30^{\circ}$

(d) $10\text{log}10(\text{OEB})$, $\alpha=30^{\circ}$

Figure 5: The contour plots of the PEB and OEB versus the RIS location for one
random RIS phase profile and $P_{\text{t}}=34~{}\text{dBm}$. The TX, first RX,
and second RX positions are marked by a red ellipse, green square, and black
square, respectively.

####  IV-A3 Coverage Analysis

We assess the RIS localization coverage and performance through contour plots
of the PEB and OEB in Fig. 5, when the $x$ and $y$ coordinates of the RIS are
varying, while its orientation and $z$ coordinate are fixed; we particularly
set $z=-1\text{m}$. Two RIS orientations were considered, namely
$\alpha=0^{\circ}$ and $30^{\circ}$, and the RXs were located on the ceiling
(i.e., the plane $z=0$) in $[0\text{m},-5\text{m},0\text{m}]^{\top}$ and
$[0\text{m},5\text{m},0\text{m}]^{\top}$, respectively. It can be observed
that high accurate localization can be obtained when the RIS is close to the
TX, due to the high signal-to-noise ratio (SNR). However, one can estimate the
RIS orientation with high accuracy when the RIS is located on a line
connecting one of the RXs with the TX.

##  V Conclusion

In this paper, we presented a multi-stage estimator for the 3D position and 1D
orientation estimation of an RIS in a multi-carrier system with a single-
antenna TX and multiple single-antenna RXs. The proposed estimator leverages
the TOA and spatial frequency measurements to estimate the unknown parameters.
We showed that the RMSEs of the estimations attain the corresponding CRBs
within a specific SNR range. We also demonstrated that using additional
measurements, specifically the spatial frequency at the RIS, not only improves
the localization accuracy compared to methods using only TOAs, but makes the
RIS orientation estimation feasible with even two RXs. In future work, we will
investigate the robustness of the estimator to the multipath.

## Acknowledgments

This work has been funded in part by the Academy of Finland Profi-5 under
grant number 326346, the ULTRA project under grant number 328215, the EU H2020
RISE-6G project under grant number 10101701, and in part by the Spanish
Ministry of Science and Innovation Projects under grant PID2020-118984GB-I00.

## Appendix

###  V-A Derivation of FIM $\mathbf{J}_{\boldsymbol{\eta}}$

We calculate the term
$\partial[\boldsymbol{M}]_{:,t}/\partial\boldsymbol{\eta}$, using (12), to
derive $\mathbf{J}$. We first define vector $\mathbf{e}_{(m-1)M+1:mM}$ with
length $M$, whose entries from $(m-1)M+1$ to $mM$ are equal to one and the
others are equal to zero. To ease notation, we express $(m-1)M+1:mM$ via $m$,
i.e., $\mathbf{e}_{m}$. Given the definition of $\boldsymbol{M}$, we have
$\partial[\boldsymbol{M}]_{:,t}/\partial\rho_{m}=e^{\jmath\varphi_{m}}\sqrt{P_{t}}\mathbf{d}(\,\tau_{m})\,\mathbf{b}(\,\boldsymbol{\omega}^{m})\,\boldsymbol{\gamma}_{t}\mathbf{e}_{m}$,
$\partial[\boldsymbol{M}]_{:,t}/\partial\varphi_{m}=\jmath
g_{m}\sqrt{P_{t}}\mathbf{d}(\,\tau_{m})\,\mathbf{b}(\,\boldsymbol{\omega}^{m})\,\boldsymbol{\gamma}_{t}\mathbf{e}_{m}$,
and

$\frac{\partial[\boldsymbol{M}]_{:,t}}{\partial\tau_{m}}=g_{m}\sqrt{P_{t}}\frac{\partial\mathbf{d}(\,\tau_{m})\,}{\partial\tau_{m}}\mathbf{b}(\,\boldsymbol{\omega}^{m})\,\boldsymbol{\gamma}_{t}\mathbf{e}_{m}\quad,$
(25)

where $\partial\mathbf{d}(\,\tau_{m})\,/\partial\tau_{m}=-\jmath 2\pi\Delta
fg_{m}\,(\,\mathbf{L}_{c}\odot\,\mathbf{d}(\,\tau_{m})\,)\,\sqrt{P_{t}}\mathbf{b}(\,\boldsymbol{\omega}^{m})\,\boldsymbol{\gamma}_{t}\mathbf{e}_{m}$
and $\mathbf{L}_{c}\triangleq\big{(}\,[\,0,\dots,M-1]^{\top}$. In addition,
for $i=0$ and $1$, we have the derivatives:

$\displaystyle\frac{\partial[\mathbf{\boldsymbol{M}}]_{:,t}}{\partial\omega_{i}^{m}}$
$\displaystyle=g_{m}\mathbf{d}(\,\tau_{m})\,\sqrt{P_{t}}\frac{\partial\mathbf{b}^{\top}(\,\boldsymbol{\omega}^{m})\,}{\partial\omega_{i}^{m}}\boldsymbol{\gamma}_{t}\mathbf{e}_{m},$
(26)

where
$\partial\mathbf{b}(\,\boldsymbol{\omega}^{m})/\partial\omega_{0}^{m}=-\jmath
2\pi\Delta/\lambda(\,\mathbf{L}\otimes\mathbf{1})\,\odot\mathbf{b}(\,\boldsymbol{\omega}^{m})\,$,
$\partial\mathbf{b}(\,\boldsymbol{\omega}^{m})/\partial\omega_{1}^{m}=-\jmath
2\pi\Delta/\lambda(\,\mathbf{1}\otimes\mathbf{L})\,\odot\mathbf{b}(\,\boldsymbol{\omega}^{m})\,$,
and $\mathbf{L}\triangleq[\,-\frac{M-1}{2},\dots,\frac{M-1}{2}]\,^{\top}$.

###  V-B Derivation of Jacobian Matrix $\mathbf{T}$

To calculate $\mathbf{T}$, we first define the auxiliary variables
$\mathbf{u}_{\mathrm{A}}\triangleq(\mathbf{p}_{\text{tx}}-\mathbf{p}_{\text{ris}})/\|\mathbf{p}_{\text{tx}}-\mathbf{p}_{\text{ris}}\|$
and
$\mathbf{u}_{\mathrm{D},m}\triangleq(\mathbf{p}_{m}-\mathbf{p}_{\text{ris}})/\|\mathbf{p}_{\text{ms}}-\mathbf{p}_{\text{ris}}\|$,
as well as
$\mathbf{R}_{\alpha}=[\mathbf{r}_{1},\mathbf{r}_{2},\mathbf{r}_{3}]^{\top}$ in
(1) with $\mathbf{r}_{1}\triangleq[\cos{\alpha},-\sin{\alpha},0]^{\top}$,
$\mathbf{r}_{2}\triangleq[\sin{\alpha},\cos{\alpha},0]^{\top}$, and
$\mathbf{r}_{3}\triangleq[0,0,1]^{\top}$. Using these variables, we can
rewrite AOA and AODs as follows [18, Appendix A]:

$\boldsymbol{\phi}=[\,\text{atan2}(\,\mathbf{r}_{2}^{\top}\mathbf{u}_{\mathrm{A}},\mathbf{r}_{1}^{\top}\mathbf{u}_{\mathrm{A}})\,,\text{acos}(\,\mathbf{r}_{3}^{\top}\mathbf{u}_{\mathrm{A}})\,]\,^{\top},$
(27a)
$\boldsymbol{\theta}_{m}=[\,\text{atan2}(\,\mathbf{r}_{2}^{\top}\mathbf{u}_{\mathrm{D},m},\mathbf{r}_{1}^{\top}\mathbf{u}_{\mathrm{D},m})\,,\text{acos}(\,\mathbf{r}_{3}^{\top}\mathbf{u}_{\mathrm{D},m})\,]\,^{\top},$
(27b)

In the sequel, we compute the derivatives:

$\frac{\partial\mathbf{u}_{\mathrm{A}}}{\partial\mathbf{p}_{\text{ris}}}=(\,\mathbf{u}_{\mathrm{A}}\mathbf{u}_{\mathrm{A}}^{\top}-\mathbf{I}_{3})\,/\|\mathbf{p}_{\text{tx}}-\mathbf{p}_{\text{ris}}\|,$
(28a)
$\frac{\partial\mathbf{u}_{\mathrm{D},m}}{\partial\mathbf{p}_{\text{ris}}}=(\,\mathbf{u}_{\mathrm{D},m}\mathbf{u}_{\mathrm{D},m}^{\top}-\mathbf{I}_{3})\,/\|\mathbf{p}_{m}-\mathbf{p}_{\text{ris}}\|,$
(28b)
$\frac{\partial[\boldsymbol{\phi}]_{\text{az}}}{\partial\mathbf{u}_{A}}=\frac{(\,\mathbf{r}_{1}^{\top}\mathbf{u}_{\mathrm{A}})\,\mathbf{r}_{2}-(\,\mathbf{r}_{2}^{\top}\mathbf{u}_{\mathrm{A}})\,\mathbf{r}_{1}}{(\,\mathbf{r}_{1}^{\top}\mathbf{u}_{\mathrm{A}})\,^{2}+(\,\mathbf{r}_{2}^{\top}\mathbf{u}_{\mathrm{A}})\,^{2}},$
(28c)
$\frac{\partial[\boldsymbol{\phi}]_{\text{el}}}{\partial\mathbf{u}_{A}}=\frac{-\mathbf{r}_{3}}{\sqrt{(1-\,\mathbf{r}_{3}^{\top}\mathbf{u}_{\mathrm{A}})\,}},$
(28d)
$\frac{\partial[\boldsymbol{\theta}_{m}]_{\text{az}}}{\partial\mathbf{u}_{\mathrm{D},m}}=\frac{(\,\mathbf{r}_{1}^{\top}\mathbf{u}_{\mathrm{D},m})\,\mathbf{r}_{2}-(\,\mathbf{r}_{2}^{\top}\mathbf{u}_{\mathrm{D},m})\,\mathbf{r}_{1}}{(\,\mathbf{r}_{1}^{\top}\mathbf{u}_{\mathrm{D},m})\,^{2}+(\,\mathbf{r}_{2}^{\top}\mathbf{u}_{\mathrm{D},m})\,^{2}},$
(28e)
$\frac{\partial[\boldsymbol{\theta}_{m}]_{\text{el}}}{\partial\mathbf{u}_{\mathrm{D},m}}=\frac{-\mathbf{r}_{3}}{\sqrt{(1-\,\mathbf{r}_{3}^{\top}\mathbf{u}_{\mathrm{D},m})\,}}\quad,$
(28f)
$\frac{\partial[\boldsymbol{\phi}]_{\text{az}}}{\partial\alpha}=\frac{(\,\mathbf{r}_{1}^{\top}\mathbf{u}_{\mathrm{A}})\,{\mathbf{r}^{\prime}_{2}}^{\top}\mathbf{u}_{\mathrm{A}}-(\,\mathbf{r}_{1}^{\top}\mathbf{u}_{\mathrm{A}})\,{\mathbf{r}^{\prime}_{1}}^{\top}\mathbf{u}_{\mathrm{A}}}{(\,\mathbf{r}_{1}^{\top}\mathbf{u}_{\mathrm{A}})\,^{2}+(\,\mathbf{r}_{2}^{\top}\mathbf{u}_{\mathrm{A}})\,^{2}}\quad,$
(28g)
$\frac{\partial[\boldsymbol{\theta}_{m}]_{\text{az}}}{\partial\alpha}=\frac{(\,\mathbf{r}_{1}^{\top}\mathbf{u}_{\mathrm{D},m})\,{\mathbf{r}^{\prime}_{2}}^{\top}\mathbf{u}_{\mathrm{D},m}-(\,\mathbf{r}_{1}^{\top}\mathbf{u}_{\mathrm{D},m})\,{\mathbf{r}^{\prime}_{1}}^{\top}\mathbf{u}_{\mathrm{D},m}}{(\,\mathbf{r}_{1}^{\top}\mathbf{u}_{\mathrm{D},m})\,^{2}+(\,\mathbf{r}_{2}^{\top}\mathbf{u}_{\mathrm{D},m})\,^{2}},$
(28h)

where
$\mathbf{r}^{\prime}_{1}\triangleq[-\sin{\alpha},-\cos{\alpha},0]^{\top}$,
$\mathbf{r}^{\prime}_{2}\triangleq[\cos{\alpha},-\sin{\alpha},0]^{\top}$, and
$\mathbf{r}^{\prime}_{3}\triangleq[0,0,0]^{\top}$. Using (11a) and (11b), we
can easily find
${\partial\omega_{0}^{m}}/{\partial[\boldsymbol{\phi}]_{\text{az}}}$,
${\partial\omega_{0}^{m}}/{\partial[\boldsymbol{\phi}]_{\text{el}}}$,
${\partial\omega_{1}^{m}}/{\partial[\boldsymbol{\phi}]_{\text{az}}}$,
${\partial\omega_{1}^{m}}/{\partial[\boldsymbol{\phi}]_{\text{el}}}$,
${\partial\omega_{0}^{m}}/{\partial[\boldsymbol{\theta}_{m}]_{\text{az}}}$,
${\partial\omega_{0}^{m}}/{\partial[\boldsymbol{\theta}_{m}]_{\text{el}}}$,
${\partial\omega_{1}^{m}}/{\partial[\boldsymbol{\theta}_{m}]_{\text{az}}}$,
and ${\partial\omega_{1}^{m}}/{\partial[\boldsymbol{\theta}_{m}]_{\text{el}}}$
, which we have not brought in the paper due to page limit. Using the
variables in (27a)–(28h), results in:

$\mathbf{T}_{m,1:3}=\frac{\partial{\tau}_{m}}{\partial\boldsymbol{p}_{\text{ris}}}=\frac{\mathbf{u}_{\mathrm{A}}+\mathbf{u}_{\mathrm{D},m}}{c}\quad\forall
m=\\{1,\dots,M\\},$ (29a) $\displaystyle\mathbf{T}_{m,1:3}$
$\displaystyle=\frac{\partial{\omega}_{0}^{m}}{\partial\mathbf{p}_{\text{ris}}}=\left(\,\frac{\partial\omega_{0}^{m}}{\partial[\boldsymbol{\phi}]_{\text{az}}}\frac{\partial[\boldsymbol{\phi}]_{\text{az}}}{\partial\mathbf{u}_{A}}+\frac{\partial\omega_{0}^{m}}{\partial[\boldsymbol{\phi}]_{\text{el}}}\frac{\partial[\boldsymbol{\phi}]_{\text{el}}}{\partial\mathbf{u}_{A}}\right)\,\frac{\partial\mathbf{u}_{\mathrm{A}}}{\partial\mathbf{p}_{\text{ris}}}$
$\displaystyle+\left(\frac{\partial\omega_{0}^{m}}{\partial[\boldsymbol{\theta}_{m}]_{\text{el}}}\frac{\partial[\boldsymbol{\theta}_{m}]_{\text{el}}}{\partial\mathbf{u}_{\mathrm{D},m}}+\frac{\partial\omega_{0}^{m}}{\partial[\boldsymbol{\theta}_{m}]_{\text{el}}}\frac{\partial[\boldsymbol{\theta}_{m}]_{\text{el}}}{\partial\mathbf{u}_{\mathrm{D},m}}\right)\frac{\partial\mathbf{u}_{\mathrm{D},m}}{\partial\mathbf{p}_{\text{ris}}}$
$\displaystyle\qquad\forall m=\\{1+M,\dots,2M\\},$ (29b)
$\displaystyle\mathbf{T}_{m,1:3}$
$\displaystyle=\frac{\partial{\omega}_{1}^{m}}{\partial\mathbf{p}_{\text{ris}}}=\left(\,\frac{\partial\omega_{1}^{m}}{\partial[\boldsymbol{\phi}]_{\text{az}}}\frac{\partial[\boldsymbol{\phi}]_{\text{az}}}{\partial\mathbf{u}_{A}}+\frac{\partial\omega_{1}^{m}}{\partial[\boldsymbol{\phi}]_{\text{el}}}\frac{\partial[\boldsymbol{\phi}]_{\text{el}}}{\partial\mathbf{u}_{A}}\right)\,\frac{\partial\mathbf{u}_{\mathrm{A}}}{\partial\mathbf{p}_{\text{ris}}}$
$\displaystyle+\left(\frac{\partial\omega_{1}^{m}}{\partial[\boldsymbol{\theta}_{m}]_{\text{el}}}\frac{\partial[\boldsymbol{\theta}_{m}]_{\text{el}}}{\partial\mathbf{u}_{\mathrm{D},m}}+\frac{\partial\omega_{1}^{m}}{\partial[\boldsymbol{\theta}_{m}]_{\text{el}}}\frac{\partial[\boldsymbol{\theta}_{m}]_{\text{el}}}{\partial\mathbf{u}_{\mathrm{D},m}}\right)\frac{\partial\mathbf{u}_{\mathrm{D},m}}{\partial\mathbf{p}_{\text{ris}}}$
$\displaystyle\qquad\forall m=\\{1+2M,\dots,3M\\},$ (29c)

Finally, considering (28g)–(28h), we have:

$\displaystyle\mathbf{T}_{m,4}=\frac{\partial{\omega}_{0}^{m}}{\partial\alpha}=\frac{\partial\omega_{0}^{m}}{\partial[\boldsymbol{\phi}]_{\text{az}}}\frac{\partial[\boldsymbol{\phi}]_{\text{az}}}{\partial\alpha}+\frac{\partial\omega_{0}^{m}}{\partial[\boldsymbol{\theta}_{m}]_{\text{az}}}\frac{\partial[\boldsymbol{\theta}_{m}]_{\text{az}}}{\partial\alpha}$
$\displaystyle\quad\forall m=\\{1+M,\dots,2M\\},$ (30a)
$\displaystyle\mathbf{T}_{m,4}=\frac{\partial{\omega}_{1}^{m}}{\partial\alpha}=\frac{\partial\omega_{1}^{m}}{\partial[\boldsymbol{\phi}]_{\text{az}}}\frac{\partial[\boldsymbol{\phi}]_{\text{az}}}{\partial\alpha}+\frac{\partial\omega_{1}^{m}}{\partial[\boldsymbol{\theta}_{m}]_{\text{az}}}\frac{\partial[\boldsymbol{\theta}_{m}]_{\text{az}}}{\partial\alpha}$
$\displaystyle\quad\forall m=\\{1+2M,\dots,3M\\},$ (30b)

and the remaining elements of $\mathbf{T}$ are zero.

## References

  * [1] C. Huang, A. Zappone, G. C. Alexandropoulos, M. Debbah, and C. Yuen, “Reconfigurable intelligent surfaces for energy efficiency in wireless communication,” _IEEE transactions on wireless communications_ , vol. 18, no. 8, pp. 4157–4170, 2019.
  * [2] M. D. Renzo, M. Debbah, D.-T. Phan-Huy, A. Zappone, M.-S. Alouini, C. Yuen, V. Sciancalepore, G. C. Alexandropoulos, J. Hoydis, H. Gacanin _et al._ , “Smart radio environments empowered by reconfigurable AI meta-surfaces: An idea whose time has come,” _EURASIP Journal on Wireless Communications and Networking_ , vol. 2019, no. 1, pp. 1–20, 2019.
  * [3] M. Jian, G. C. Alexandropoulos, E. Basar, C. Huang, R. Liu, Y. Liu, and C. Yuen, “Reconfigurable intelligent surfaces for wireless communications: Overview of hardware designs, channel models, and estimation techniques,” _Intelligent and Converged Networks_ , vol. 3, no. 1, pp. 1–32, 2022.
  * [4] E. C. Strinati, G. C. Alexandropoulos, H. Wymeersch, B. Denis, V. Sciancalepore, R. D’Errico, A. Clemente, D.-T. Phan-Huy, E. De Carvalho, and P. Popovski, “Reconfigurable, intelligent, and sustainable wireless environments for 6G smart connectivity,” _IEEE Communications Magazine_ , vol. 59, no. 10, pp. 99–105, 2021.
  * [5] H. Wymeersch, J. He, B. Denis, A. Clemente, and M. Juntti, “Radio localization and mapping with reconfigurable intelligent surfaces: Challenges, opportunities, and research directions,” _IEEE Vehicular Technology Magazine_ , vol. 15, no. 4, pp. 52–61, 2020.
  * [6] K. Keykhosravi, B. Denis, G. C. Alexandropoulos, Z. S. He, A. Albanese, V. Sciancalepore, and H. Wymeersch, “Leveraging ris-enabled smart signal propagation for solving infeasible localization problems,” _arXiv preprint arXiv:2204.11538_ , 2022.
  * [7] K. Keykhosravi, M. F. Keskin, S. Dwivedi, G. Seco-Granados, and H. Wymeersch, “Semi-passive 3D positioning of multiple RIS-enabled users,” _IEEE Transactions on Vehicular Technology_ , vol. 70, no. 10, pp. 11 073–11 077, 2021\.
  * [8] S. Huang, B. Wang, Y. Zhao, and M. Luan, “Near-field RSS-based localization algorithms using reconfigurable intelligent surface,” _IEEE Sensors Journal_ , vol. 22, no. 4, pp. 3493–3505, 2022.
  * [9] A. Elzanaty, A. Guerra, F. Guidi, and M.-S. Alouini, “Reconfigurable intelligent surfaces for localization: Position and orientation error bounds,” _IEEE Transactions on Signal Processing_ , vol. 69, pp. 5386–5402, 2021.
  * [10] K. Keykhosravi, M. F. Keskin, G. Seco-Granados, P. Popovski, and H. Wymeersch, “Ris-enabled siso localization under user mobility and spatial-wideband effects,” _IEEE Journal of Selected Topics in Signal Processing_ , vol. 16, no. 5, pp. 1125–1140, 2022.
  * [11] Z. Abu-Shaban, K. Keykhosravi, M. F. Keskin, G. C. Alexandropoulos, G. Seco-Granados, and H. Wymeersch, “Near-field localization with a reconfigurable intelligent surface acting as lens,” in _Proc.IEEE ICC_ , 2021\.
  * [12] H. Zhang, H. Zhang, B. Di, K. Bian, Z. Han, and L. Song, “Metalocalization: Reconfigurable intelligent surface aided multi-user wireless indoor localization,” _IEEE Transactions on Wireless Communications_ , vol. 20, no. 12, pp. 7743–7757, 2021.
  * [13] J. Luo, T. Liang, C. Chen, and T. Zhang, “A UAV mounted RIS aided communication and localization integration system for ground vehicles,” in _Proc.IEEE ICC Workshops_ , 2022.
  * [14] R. Ghazalian, K. Keykhosravi, H. Chen, H. Wymeersch, and R. Jäntti, “Bi-static sensing for near-field ris localization,” in _Proc. IEEE GLOBECOM_ , 2022.
  * [15] S. M. Kay, _Fundamentals of statistical signal processing: estimation theory_. Prentice-Hall, Inc., 1993.
  * [16] D. Eberly, “Distance from a point to an ellipse, an ellipsoid, or a hyperellipsoid,” _Preprint, see http://www. geometrictools. com_ , vol. 2, 2013.
  * [17] S. W. Ellingson, “Path loss in reconfigurable intelligent surface-enabled channels,” in _Proc. IEEE PIMRC_ , 2021.
  * [18] M. A. Nazari, G. Seco-Granados, P. Johannisson, and H. Wymeersch, “Mmwave 6D radio localization with a snapshot observation from a single bs,” _arXiv preprint arXiv:2204.05189_ , 2022.