# Performance of RIS-aided near-field localization under beams approximation from real hardware characterization

Moustafa Rahal, Benoît Denis, Kamran Keykhosravi, Musa Furkan Keskin, Bernard Uguen, George C Alexandropoulos, Henk Wymeersch

<figure><img src="image_1.png" /></figure>

## To cite this version:

Moustafa Rahal, Benoît Denis, Kamran Keykhosravi, Musa Furkan Keskin, Bernard Uguen, et al. Performance of RIS-aided near-field localization under beams approximation from real hardware characterization. EURASIP Journal on Wireless Communications and Networking, 2023, 2023 (1), pp.86. 10.1186/s13638-023-02294-9. hal-04226009

HAL Id: hal-04226009

https://hal.science/hal-04226009v1

Submitted on 3 Oct 2023

HAL is a multi-disciplinary open access archive for the deposit and dissemination of scientific research documents, whether they are published or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d'enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

<figure><img src="image_2.png" /></figure>

Distributed under a Creative Commons CC BY 4.0 - Attribution - International License
REVIEW

Open Access

<figure><img src="image_3.png" /></figure>

Check for
updates

# Performance of RIS-aided near-field localization under beams approximation from real hardware characterization

Moustafa Rahal<fnref n="1" />,<fnref n="2" />* , Benoît Denis<fnref n="1" />, Kamran Keykhosravi<fnref n="3" />, Musa Furkan Keskin<fnref n="3" />, Bernard Uguen<fnref n="2" />, George C. Alexandropoulos<fnref n="4" /> and Henk Wymeersch<fnref n="3" />

**Abstract**

The technology of reconfigurable intelligent surfaces (RISs) has been showing promising potential in a variety of applications relying on Beyond-5G networks. RIS can indeed provide fine channel flexibility to improve communication quality of service (QoS) or restore localization capabilities in challenging operating conditions, while conventional approaches fail (e.g., due to insufficient infrastructure, severe radio obstructions). In this paper, we tackle a general low-complexity approach for optimizing the precoders that control such reflective surfaces under hardware constraints. More specifically, it allows the approximation of any desired beam pattern using a pre-characterized lookup table of feasible complex reflection coefficients for each RIS element. The proposed method is first evaluated in terms of beam fidelity for several examples of RIS hardware prototypes. Then, by means of a theoretical bounds analysis, we examine the impact of RIS beams approximation on the performance of near-field downlink positioning in non-line-of-sight conditions, while considering several RIS phase profiles (including directional, random and localization-optimal designs). Simulation results in a canonical scenario illustrate how the introduced RIS profile optimization scheme can reliably produce the desired RIS beams under realistic hardware limitations. They also highlight its sensitivity to both the underlying hardware characteristics and the required beam kinds in relation to the specificity of RIS-aided localization applications.

**Keywords:** Reconfigurable intelligent surfaces, Nearfield localization, Beam approximation, Lookup table, Hardware characterization

# 1 Introduction

RISs, which consist of (semi-)passive controllable electromagnetic mirrors or sensing surfaces, have been identified as a key enabling technology for the upcoming sixth (6G) generation of wireless systems [1, 2]. They are indeed expected to reinforce both the service continuity and the QoS of communication networks, or even to locally boost their performance on demand, while limiting the need for additional costly elements of infrastructure (e.g., active (BS)). Although they were mostly intended to extend coverage under severe radio blockages, they have also shown fine capabilities to purposely shape

<figure><img src="image_4.png" /></figure>

<footnote>*Correspondence:
moustafa.rahal@cea.fr</footnote>

<footnote n="1">¹ CEA-Leti, Université Grenoble
Alpes (UGA), 38000 Grenoble,
France</footnote>

<footnote n="2">² IETR - UMR 6164, Université
Rennes 1, 35000 Rennes, France</footnote>

<footnote n="3">³ Department of Electrical
Engineering, Chalmers
University of Technology, 412
96 Gothenburg, Sweden</footnote>

<footnote n="4">⁴ Department of Informatics
and Telecommunications,
National and Kapodistrian
University of Athens (NKUA),
15784 Athens, Greece</footnote>
the wireless propagation channel in a variety of location-dependent applications, such as (UE) localization (in both geometric (NF) and (FF) regimes), physical environment mapping and distributed spectrum sensing, or limitation of unintentional radio emissions (e.g., for improved communication security or reduced field exposure) [3, 4].

The different unit elements of a RIS can be optimized, for instance in order to concentrate the reflected energy in the UE direction, similar to phased array systems [5]. Many models have already been proposed accordingly, including phase control [1], quantized phase control [6], amplitude-dependent phase control [7], and joint amplitude and phase control [8], which all require a dedicated optimization procedure. However, as RISs are usually made of low-cost hardware, they may be naturally subject to imperfections, impairments, nonlinearity effects, dispersed characteristics, etc. [9, 10]. If not properly taken into account, these phenomena can significantly alter the result of the RIS optimization and hence ultimately, the RIS behavior itself, compared to the idealized case (i.e., with an unconstrained RIS profile). One unified way to address the various control models above while accounting for hardware characteristics is to use a lookup table. For a reflective RIS, the latter typically contains all the feasible complex reflection coefficients at each of the surface elements (i.e., in terms of amplitude and phase) for a certain RIS hardware. In addition, such lookup tables can account for extra coupling effects, which are very complex to model analytically otherwise.

In this paper, we present a computationally efficient method initially introduced in [11], which can optimize the configuration of a reflective RIS from an a priori imposed lookup table with the aim of approximating complex beam patterns. This method proposes a grid with a discrete set of positions (i.e., grid resolution can be increased with complexity trade-off) and then defines an error metric to measure the similarity between the generated beams under hardware impairments and the optimal unconstrained ones. However, this grid does not directly correspond to the UE's location which is instead fixed. Although the previous approach is generic and applicable to any type of RISs or beams, as a concrete and practical study case, we herein consider applying it into the specific context of RIS-aided NF localization, which somehow requires combining particular RIS beams to reach optimality. Localization-optimal RIS phase configurations can indeed be determined through (PEB) optimization, assuming prior positional information about the UE [12, 13]. During the design phase, it is a common practice to make the latter assumption. This serves as a foundation for gaining fundamental insights into the system. However, in later stages, one can incorporate UE's position uncertainty. It can be achieved by extending the design to incorporate a robust solution that utilizes the same set of beams while accounting for such uncertainty. The aim is hence to improve positioning performance in (NLoS) situations, while relying on a unique RIS-reflected path (i.e., as estimated at the UE) over a sequence of (SISO) downlink transmissions [14, 15] (see Fig. 1). Aiming more specifically at improving NF localization performance in [13], it has been shown that such optimization would necessitate the use of four distinct types of beams at the reflective RIS (i.e., one steering beam and its three derivatives (w.r.t.) spherical coordinates). Those four desired beams will be taken here as references into the proposed synthesis process and compared to directional or random designs. Thus, it is important to point out that the knowledge of the UE's location is not used to select a beam for a certain location but instead, the beams are designed
<figure><img src="image_5.png" /><figcaption>**Fig. 1** Typical NF NLoS positioning scenario over single-input single-output downlink transmissions with one single reflective RIS and related problem geometry with respect to the RX point *p*, where the RIS center serves as the origin of both the spherical and Cartesian coordinates systems</figcaption></figure>

to optimize the performance for a certain location. This is not the same as maximizing the (SNR) via directional beams. Overall, the main paper contributions are as follows: (1) Leveraging the recent results from [11, 13] recalled above, we apply a low-complexity RIS beams approximation technique to RIS-aided NLoS localization with several a priori RIS design assumptions (including random, directional and localization-optimal options). (2) Accordingly, our analysis now includes not only a qualitative assessment of the fidelity of approximated RIS beams w.r.t. the desired beams (by means of a 1D/2D beam shape analysis), but also a quantitative assessment of the practical performance degradation induced by such beams approximation in comparison with their respective unconstrained configurations and that is by deriving the (FIM) and accordingly performing a PEB analysis. (3) Regarding input hardware constraints, we also extend the use of lookup tables (resulting from experimental characterization) to that of four distinct real RIS prototypes [16–18] and we study their impact on localization performance, via the devised theoretical lower bounds, in light of their respective design specificity.

## 1.1 Notations

Vectors and matrices are, respectively, denoted by lower-case and upper-case bold letters (e.g., $\mathbf{x}, \mathbf{X}$). The notation $[\mathbf{a}]_i$ is used to point at the $i$-th element of vector $\mathbf{a}$, and similarly, $[\mathbf{A}]_{i,j}$ represents the element in the $i$-th row and $j$-th column of matrix $\mathbf{A}$, while $i:j$ is used to specify all the elements between indices $i$ and $j$. The Hadamard product is denoted by $\odot$, and $\dot{\mathbf{a}}_x = \partial\mathbf{a}/\partial x$ is the partial derivation of $\mathbf{a}$ w.r.t. $x$. Moreover, the notations $(.)^\top, (.)^*$ and $(.)^\dagger$ denote the matrix transposition, conjugation, and Hermitian conjugation, respectively. Finally, $(.)^r$ denotes the $r$-th iteration in a loop and $\text{proj}_V(\mathbf{x})$ represents the projection of vector $\mathbf{x}$ onto a set $V$. The operator $\text{tr}(\mathbf{X})$ denotes the trace of matrix $\mathbf{X}$, and $\text{diag}(\mathbf{x})$ denotes a diagonal matrix with diagonal elements defined by vector $\mathbf{x}$. Finally, $\| \cdot \|$ is the $l_2$-norm operator, and $(.)^*$ denotes the solution of an optimization problem.
## 2 Related state of the art

The optimization of RIS profiles (i.e., the fine tuning of their element-wise reflection coefficients and/or phases) is a particularly challenging task in itself which can be seen as a beam design problem. This has been extensively studied for phased arrays, in both communication and radar literature [19]. The main difference, however, between a reflective RIS and a phased array radar is that in order to create azimuth- and elevation-difference beams in reception via the latter, separate beamforming architectures are commonly employed [20, 21], while on the other hand, a reflective RIS is only able to passively reflect the impinging signals through optimized phase control and does not produce receive beams via dedicated hardware.

In a pure RIS-aided communication context, the usual approach is to aim at increasing SNR at the receiver, relying on the estimated cascaded channel responses (i.e., between BS and RIS, and between RIS and UE), or possibly simply based on the prior UE location information (exact or more likely just estimated) [22]. The corresponding problem can hence be solved out by maximizing recovery performance, based on the (DFT) and Hadamard matrices, or by leveraging location information from an external system [23].

As for RIS-aided localization specifically, a variety of control solutions have also been put forward recently, depending on the corresponding positioning strategy and operating context. In [24] for instance, based on prior UE location, simple directional reflection beams are applied at a few RISs, which are down-selected to maximize the amount of available location information (in a Fisher Information sense) while avoiding multipath interference. In [14], even simpler random RIS phase profiles are used to jointly enable downlink SISO positioning and synchronization, relying on (MC) transmissions, without necessitating prior information. In [12], RIS phases and beamformers are jointly optimized with respect to both the PEB and the (OEB) in a generic (MIMO) MC context. To overcome both the high number of real optimization variables and the problem non-convexity (resulting from the joint optimization of coupled variables), a simpler approach is then proposed that maximizes the sum of the SNRs for the central subcarrier at each BS antenna. An upper bound on the SNR is first maximized, before applying additional constant phase shifts to the RIS profile so that both direct and reflective paths are quasi-coherently summed up at each receiving antenna.

Focusing on the specific case of NF localization, many other RIS optimization schemes have been put forward, such as SNR maximization in [25, 26] and DFT matrices in [27]. On the other hand, a traditional randomized RIS phase design was considered in [28] to achieve bi-static localization of the RIS. In [15], random profiles are also utilized and the authors showed, theoretically, that this profile design can ensure localization continuity in NLoS conditions through direct positioning out of one single RIS-reflected path, relying on NF properties. However, random profiles are still clearly suboptimal in terms of localization performance. In [13], based on PEB optimization in the same NF NLoS context, it is shown that four distinct beams must be applied (i.e., one steering beam and its three derivatives as a function of spherical coordinates), while adjusting their relative weights (in the power or time domain, indifferently) depending on prior UE location. Finally, in [29], RIS phase design and quantization are ruled by hardware and its effect is studied on the NF focusing performance, but no practical constrained beam generation method is proposed.
Additionally, various works have considered beam design and optimization as [30] which presents a fast alignment algorithm for the phase shifts of the RIS and the transceiver beam-former, which uses a variable-width hierarchical phase-shift codebook. Another recent study [31] proposes a far-field beam-based beam training scheme, where a deep residual network is utilized to estimate the optimal near-field RIS codeword. In [32], the authors present a beamwidth adaptation technique during the beam training process, and an atomic norm channel estimation method for the cascaded channel. The paper [33] proposes the use of differential data to determine the best beam for the RIS. Furthermore, [34] explores a joint design of the reflection coefficients of multiple RISs and the precoding strategy of a single BS to optimize the tracking of the position and velocity of a single UE with an iterative block coordinate descent algorithm.

One major difficulty while optimizing RIS beams under such hardware constraints is that the latter may be difficult to handle analytically. As an example, unit-norm constraints are usually non-convex and shall necessitate specific iterative approaches [35]. In some other cases, the addressable RIS configurations may be quantized [17], subject to phase-dependent amplitude variations (wanted or unwanted) [7], or only characterized experimentally as a lookup table derived from real measurements [16]. Under realistic hardware limitations, RIS profile optimization can hence be performed either (1) by directly optimizing the constrained RIS configuration with respect to the considered objective (e.g., minimize the PEB in the localization context) [1, 2, 7, 36] or (2) by carrying out an unconstrained optimization of the RIS configuration first and then determining the best approximation that could be practically supported by the RIS. These two options can be referred to as “constrain, then optimize” or “optimize, then constrain” (e.g., [13]), respectively. For the former, low-complexity numerical methods offering good fidelity with respect to the desired (i.e., unconstrained) beam patterns are still needed, which is one of the purposes of this paper.

# 3 Methods

## 3.1 System model and general problems formulation

### 3.1.1 Overall system model and localization scenario

Following [37], we first consider a single-antenna (TX), which is communicating in NLoS with a single-antenna (RX). The transmission is hence enabled through an M-element reflective RIS, over two (LoS) links (i.e., TX-RIS and RIS-RX links). In case of narrowband transmissions, and static and known RIS location, the corresponding baseband received signal is then expressed as follows [15, 38]:

$$ 
\begin{aligned}
y &= \alpha \boldsymbol{a}^{\top}(\boldsymbol{p}_{\text{RX}}) \boldsymbol{\Omega} \boldsymbol{a}(\boldsymbol{p}_{\text{TX}})x + n \\
&= \alpha \boldsymbol{\omega}^{\top} \boldsymbol{b}(\boldsymbol{p}_{\text{RX}}, \boldsymbol{p}_{\text{TX}})x + n,
\end{aligned} 
\quad (1) $$

where $\boldsymbol{p}_{\text{TX}}$ and $\boldsymbol{p}_{\text{RX}}$ are, respectively, the TX and RX positions, $\alpha$ is the complex channel gain, $\boldsymbol{\Omega} \triangleq \text{diag}(\omega)$ with $\omega \in \mathbb{C}^{M \times 1}$ accounting for the RIS complex configuration, $x$ is the transmitted signal of energy $E_s$, $n \sim \mathcal{CN}(0, N_0)$ is the additive white Gaussian noise of power spectral density $N_0$, and $\boldsymbol{a}(\cdot) \in \mathbb{C}^{M \times 1}$ indicates the RIS response. Considering
a point $\mathbf{p}$, the m-th ($m = 1, 2, \dots, M$) entry of $\mathbf{a}(\mathbf{p})$, corresponding to the m-th RIS element located at $\mathbf{p}_m$, is given by<fnref n="1" />

$$[\mathbf{a}(\mathbf{p})]_m = \exp\left(-J \frac{2\pi}{\lambda} (\|\mathbf{p} - \mathbf{p}_m\| - \|\mathbf{p} - \mathbf{p}_{\text{RIS}}\|)\right), \quad (2)$$

where $\mathbf{p}_{\text{RIS}}$ is the RIS center location and $\lambda$ is the wavelength. Finally, in (1), we have used the definition $\mathbf{b}(\mathbf{p}_{\text{RX}}, \mathbf{p}_{\text{TX}}) \triangleq \mathbf{a}(\mathbf{p}_{\text{RX}}) \odot \mathbf{a}(\mathbf{p}_{\text{TX}})$.

Figure 1 illustrates a millimeter wave (mmWave) downlink NLoS localization scenario, where a BS in $\mathbf{p}_{\text{TX}} = \mathbf{p}_{\text{BS}}$ broadcasts a narrowband pilot signal $x_t \in \mathbb{C}$ over $T$ transmissions, with a bandwidth $W$, a transmit power $P_{\text{tx}}$, and a total transmit energy $E_{\text{tot}} = E_s MT = (P_{\text{tx}}MT)/W$. From (1), the complex signal $y_t \in \mathbb{C}$ received by a UE in $\mathbf{p}_{\text{RX}} = \mathbf{p}_{\text{UE}}$ at time $t$ after RIS reflection can be written as

$$y_t = \alpha \mathbf{a}^{\top}(\mathbf{p}_{\text{UE}}) \mathbf{\Omega}_t \mathbf{a}(\mathbf{p}_{\text{BS}}) x_t + n_t, \quad (3)$$

where $\mathbf{\Omega}_t = \text{diag}(\omega_t)$ with $\omega_t \in \mathbb{C}^{M \times 1}$, which can vary as a function of time. This received signal can also be vectorized over the $T$ transmissions into $\mathbf{y} \in \mathbb{C}^{T \times 1}$ as follows<fnref n="2" />

$$\mathbf{y} = \sqrt{E_s \alpha \mathbf{F}^{\top} \mathbf{a}(\mathbf{p}_{\text{UE}})} + \mathbf{n}, \quad (4)$$

where $\mathbf{F} = [\mathbf{f}_1, \dots, \mathbf{f}_T] \in \mathbb{C}^{M \times T}$ with $\mathbf{f}_t = \mathbf{\Omega}_t \mathbf{a}(\mathbf{p}_{\text{BS}}) \in \mathbb{C}^{M \times 1}$.

In the absence of LoS and at reasonably short RIS-UE distances and/or with large surfaces, one can leverage properties of the NF RIS response (i.e., location-dependent information conveyed by radio wavefront curvature) to estimate the position of the UE based on the observed received signals over time. Here, it is assumed that the position of the TX and the RIS, the orientation of the RIS, and the RIS profiles are known, where the RIS profiles may be optimized to improve the accuracy of estimation.

### 3.1.2 RIS beam approximation problem

Due to RIS hardware limitations and/or design specificity [6], all element-wise reflection coefficients are assumed to take values among a few discrete complex values only. In other words, for the m-th element of the vector $\omega$ in (1), it holds that $\omega_m \in \mathcal{V}$, where $\mathcal{V}$ is a finite set of complex numbers, whose magnitude cannot exceed unity as the RIS is passive. For instance in [16, Table I], for a particular hardware prototype, the individual RIS element response has been experimentally characterized, and the corresponding set $\mathcal{V}$ has the cardinality of 14. Leveraging the model in (1), we first tackle a generic optimization framework that aims at approximating any desired beam pattern for a reflective RIS, i.e.

$$G(\mathbf{p}) = \omega^{\top} \mathbf{b}(\mathbf{p}, \mathbf{p}_{\text{TX}}) \quad (5)$$

for an arbitrary RX point $\mathbf{p}$ in the coverage area $G$. Without loss of generality, $\mathbf{p}_{\text{TX}}$ is assumed to be static.

<footnote n="1">¹ Note that the model converges to the standard far-field model when the distance $\|\mathbf{p} - \mathbf{p}_{\text{RIS}}\|$ becomes large.</footnote>

<footnote n="2">² Without loss of generality, we assume a constant pilot $x_t = \sqrt{E_s}$ is transmitted.</footnote>
As already alluded in the previous sections, concrete examples of usual canonical beam patterns to be synthesized in RIS-aided applications include steering beams (such as DFT beams) [38], derivative beams (e.g., difference beams just like in monopulse radar [19], MIMO radar [39], or even localization [40]), or even multiple concurrent beams [11, 41]. As seen in the following, localization-optimal RIS configurations may request a combination of the latter canonical beams, jointly or sequentially depending on the implementation (typically, a steering beam pointing to the UE, and its derivatives w.r.t. the three spherical coordinates). So one more goal here is to assess the theoretical performance degradation induced by such beam approximations directly at the application level (i.e., typically, in terms of PEB), beyond beam fidelity issues.

## 3.2 Proposed RIS beam synthesis methodology

### 3.2.1 Least squares precoder design

Leveraging the approach in [35], the desired beam pattern in (5) is first discretized into a $N_G$-element vector $g$. Each element of $g$ corresponds to a specific point in $G$. $N_G$ hence refers to the number of such discrete locations sampled from $G$. Accordingly, it comes that $[g]_k = G(p_k)$, with $k = 1, 2, \dots, N_G$. After defining the $N_G \times M$ complex-valued matrix $B \triangleq [b^T(p_1, p_{TX}); \dots; b^T(p_{N_G}, p_{TX})]$, the RIS configuration optimization problem can be formulated as follows, like in [35, eq. (12)]:

$$ \min_{s, \omega} \|g - sB\omega\|^2 \qquad (6a) $$

$$ \text{s.t.} \quad \omega_m \in \mathcal{V}, m = 1, 2, \dots, M, \qquad (6b) $$

where $s \in \mathbb{C}$ is a normalization factor enabling to solve the scaling issue for $g$ while designing the beam pattern [35]. The optimization approach in (6) represents a RIS beam pattern synthesis problem aiming to determine the optimal RIS phase profile $\omega$ that best matches a given desired beam pattern $g$.

To deal with the RIS configuration problem exposed above, a simple projected gradient descent algorithm is used (see Algorithm 1), inheriting from [35, Alg. 2]. First of all, one gradient descent step is performed w.r.t. scaling variable $s$ (see Line 2 of Algorithm 1). Then, we apply an unconstrained gradient descent step w.r.t. RIS configuration (see Line 3), whose result is subsequently projected onto the set $\mathcal{V}$ (see Line 4) so as to satisfy the lookup table constraint in (6b). Note that $\beta$ is just a design parameter that enables to adjust the step size, while $\lambda_{\max}(\cdot)$ refers to the largest eigenvalue of the matrix argument. Algorithm 2 summarizes the projection step. Accordingly, the complexity of Algorithm 1 (per iteration) is $O(M(N_G + |\mathcal{V}|))$.
**Algorithm 1 RIS Configuration Design**

Initialize: $\beta \in (0, 1)$ and $\omega^{(0)} = \text{proj}_{\mathcal{V}}(B^\dagger g)$.

1: **for** $r = 1, 2, \dots$ **do**

2: Compute $s^{(r)} = \frac{(\omega^{(r-1)})^H B^H g}{\|B\omega^{(r-1)}\|^2}$.

3: Set $\omega_u^{(r)} = \omega^{(r-1)} + \frac{\beta B^H (g-s^{(r)}) B\omega^{(r-1)}}{\lambda_{\max}(|s^{(r)}|^2 B^H B)}$.

4: Calculate $\omega^{(r)} = \text{proj}_{\mathcal{V}}(\omega_u^{(r)})$ using Algorithm 2.

5: **end for**

**Algorithm 2 Projection onto set $\mathcal{V}$: $\omega_{\text{out}} = \text{proj}_{\mathcal{V}}(\omega_{\text{in}})$**

1: **for** $m = 1, \dots, M$ **do**

2: Find $[\omega_{\text{out}}]_m = \arg \min_{\omega \in \mathcal{V}} [|\omega_{\text{in}}]_m - \omega|^2$.

3: **end for**

### 3.2.2 Reduced-complexity solution

As the definition domain of $G(\boldsymbol{p})$ may coincide with the full 3D space, $N_G$ can become tremendously large, and even prohibitive, resulting in very high computational complexity for Algorithm 1. To relax this burden, one can express the beams at stake in terms of spherical coordinates and redefine accordingly the optimization objective from (6), with $\rho$ the distance, $\theta$ the azimuth angle and $\phi$ the elevation angle, all defined w.r.t. the RIS coordinates system (see Fig. 1), like in [14, Fig.1b].

Let $\boldsymbol{p}_{\text{ref}}$ be the reference RX position in spherical coordinates, expressed as $[\rho_{\text{ref}}, \theta_{\text{ref}}, \phi_{\text{ref}}]^\top$. Then, we define the following three beam patterns each time varying only one of the spherical dimensions (instead of covering the entire 3D volume):

$$ \boldsymbol{g}_{\rho} = G([\rho, \theta_{\text{ref}}, \phi_{\text{ref}}]^\top), \rho \in \mathcal{R}, \qquad (7) $$

$$ \boldsymbol{g}_{\theta} = G([\rho_{\text{ref}}, \theta, \phi_{\text{ref}}]^\top), \theta \in \mathcal{T}, \qquad (8) $$

$$ \boldsymbol{g}_{\phi} = G([\rho_{\text{ref}}, \theta_{\text{ref}}, \phi]^\top), \phi \in \mathcal{P}, \qquad (9) $$

where $\mathcal{R}$, $\mathcal{T}$, and $\mathcal{P}$ correspond to the discrete sets of respective spherical coordinates.

Likewise, the different RIS response vectors are also redefined, e.g., w.r.t. the azimuth: $\mathbf{B}_{\theta} = [\mathbf{b}_{\theta,1}^{\top}; \dots; \mathbf{b}_{\theta,|\mathcal{T}|}^{\top}]$ where $\mathbf{b}_{\theta,k}^{\top} = \mathbf{b}([\rho_{\text{ref}}, \theta_k, \phi_{\text{ref}}]^\top)$ for $\theta_k$ being the k-th element ($k = 1, 2, \dots, |\mathcal{T}|$) in $\mathcal{T}$. All in all, the optimization problem can now be reformulated as follows:

$$ \min_{s, \omega} \sum_{p \in \{\rho, \theta, \phi\}} \|\boldsymbol{g}_p - s\mathbf{B}_p\omega\|^2 \qquad (10a) $$

$$ \text{s.t.} \quad \omega_m \in \mathcal{V}, m = 1, \dots, M. \qquad (10b) $$
Just like for Algorithm 1, the optimization problem above is solved through a gradient descent step w.r.t. the scaling factor s (see Line 2 of Algorithm 3) and the vector of RIS phase shifts $\omega$ (see Line 3 of Algorithm 3), before projecting finally the updated vector into the space $\mathcal{V}$ (see Line 4 of Algorithm 3). In this case, it is worth noting that $|\mathcal{R}| + |\mathcal{T}| + |\mathcal{P}| \ll |\mathcal{R}| \times |\mathcal{T}| \times |\mathcal{P}| = N_G$. Accordingly, the complexity (per iteration) is now $O(M(|\mathcal{R}| + |\mathcal{T}| + |\mathcal{P}| + |\mathcal{V}|))$, which is much lower than that of the initial Algorithm 1.

**Algorithm 3 Reduced-Complexity RIS Configuration Design**

Initialize: $\beta \in (0, 1)$, $\omega^{(0)} = \text{proj}_{\mathcal{V}}(\sum_{p \in \{\rho, \theta, \phi\}} B_p^\dagger g_p)$.

1: **for** r = 1, 2, ..., **do**

2: Update the scaling factor as:

$$s^{(r)} = \sum_{p \in \{\rho, \theta, \phi\}} \frac{(\omega^{(r-1)})^H B_p^H g_p}{\|B_p \omega^{(r-1)}\|^2} \quad (11)$$

3: Update the RIS configuration as:

$$\omega_u^{(r)} = \omega^{(r-1)} + \quad (12)$$

$$\beta \sum_{p \in \{\rho, \theta, \phi\}} \frac{(s^{(r)})^H B_p^H (g_p - s^{(r)} B_p \omega^{(r-1)})}{\lambda_{\max}(|s^{(r)}|^2 B_p^H B_p)}$$

4: Perform the projection: $\omega^{(r)} = \text{proj}_{\mathcal{V}}(\omega_u^{(r)})$.

5: **end for**

## 3.3 Application to location oriented RIS beams design

### 3.3.1 FIM and PEB

In our specific localization application context, we first define the vector of UE position and channel parameters in the 3D spherical coordinates system, as $\zeta_{\text{sph}} = [\rho, \theta, \phi, \alpha_r, \alpha_i]^\top \in \mathbb{R}^{5 \times 1}$, and compute the FIM accordingly [42, Chapter 3.7].

$$J_{\text{sph}}(\zeta_{\text{sph}}) = \frac{2E_s}{N_0} \text{Re} \left\{ \left( \frac{\partial \boldsymbol{\mu}}{\partial \zeta_{\text{sph}}} \right)^{\text{H}} \frac{\partial \boldsymbol{\mu}}{\partial \zeta_{\text{sph}}} \right\} \in \mathbb{R}^{5 \times 5}, \quad (13)$$

where $\boldsymbol{\mu} = \alpha F^\top \boldsymbol{a}(\boldsymbol{p}_{\text{UE}})$ refers to the noiseless part of the observation and

$$\left[ \frac{\partial \boldsymbol{\mu}}{\partial \rho}, \frac{\partial \boldsymbol{\mu}}{\partial \theta}, \frac{\partial \boldsymbol{\mu}}{\partial \phi} \right] = \alpha F^\top \left[ \dot{\boldsymbol{a}}_\rho(\boldsymbol{p}_{\text{UE}}), \dot{\boldsymbol{a}}_\theta(\boldsymbol{p}_{\text{UE}}), \dot{\boldsymbol{a}}_\phi(\boldsymbol{p}_{\text{UE}}) \right] \quad (14)$$

$$\left[ \frac{\partial \boldsymbol{\mu}}{\partial \alpha_r}, \frac{\partial \boldsymbol{\mu}}{\partial \alpha_i} \right] = F^\top \boldsymbol{a}(\boldsymbol{p}_{\text{UE}}) [1, J], \quad (15)$$

with $\dot{\boldsymbol{a}}_x(\boldsymbol{p}_{\text{UE}}) = \frac{\partial \boldsymbol{a}(\boldsymbol{p}_{\text{UE}})}{\partial x} \in \mathbb{C}^{M \times 1}$.

After introducing the corresponding set of parameters in the Cartesian coordinates system, that is, $\zeta_{\text{car}} = [\boldsymbol{p}_{\text{UE}}^\top, \alpha_r, \alpha_i]^\top \in \mathbb{R}^{5 \times 1}$ with $\boldsymbol{p}_{\text{UE}}^\top = [x_{\text{UE}}, y_{\text{UE}}, z_{\text{UE}}]^\top$, the Jacobian $C = \partial\zeta_{\text{sph}}/\partial\zeta_{\text{car}}$ is used to recompute the previous FIM as
<table><caption>**Table 1** Peak Gain Distribution of Main and Secondary Lobes Across Different RIS Prototypes</caption><thead><tr><th></th><th>Unconstrained</th><th>K1</th><th>K2</th><th>V</th></tr></thead><tbody><tr><td>Main Lobe Peak Value [dB]</td><td>60.2</td><td>55.2</td><td>58.2</td><td>54.2</td></tr><tr><td>Secondary Lobe Peak Value [dB]</td><td>-</td><td>48.5</td><td>35.36</td><td>50.7</td></tr><tr><td>Position of Secondary Lobe θ [rad]</td><td>-</td><td>0.9</td><td>2.37</td><td>2.3</td></tr></tbody></table>

$$J_{\text{car}}(\zeta_{\text{car}}) = C^{\top} J_{\text{sph}}(\zeta_{\text{sph}}) C. \qquad (16)$$

Computing the FIM in the spherical domain followed by a transformation to the Cartesian domain is a better approach compared to directly calculating it in the latter. This is because the derivative beams used in the computation require access to the spherical positional variables. Finally, the best achievable positioning performance is characterized by means of the following PEB, which represents a lower bound on the accuracy of any unbiased location estimator [43, Chapter 2.4.2]

$$\text{PEB}(\mathbf{F}; \zeta_{\text{car}}) = \sqrt{\text{tr}([J_{\text{car}}^{-1}(\zeta_{\text{car}})]_{(1:3,1:3)})} \qquad (17)$$

$$\leq \sqrt{\mathbb{E}\{||\mathbf{p}_{\text{UE}} - \hat{\mathbf{p}}_{\text{UE}}||^2\}}, \qquad (18)$$

where $\hat{\mathbf{p}}_{\text{UE}}$ stands for any unbiased estimate of $\mathbf{p}_{\text{UE}}$ and we have made the dependence on the precoding matrix $\mathbf{F}$ explicit.

In the following, the use of this PEB is twofold. First, it is exploited as a parametric optimization objective to determine a localization-optimal RIS configuration suited to the stated downlink NF NLoS positioning problem (see the next section). Beyond, the PEB will be used also as a general performance indicator to assess and benchmark the impact of beam approximation on localization for several RIS configurations and different RIS lookup tables (see the numerical results section) (Table 1).

### 3.3.2 PEB minimization

Assuming the UE position to be known a priori, the power-constrained PEB optimization problem, as a function of the RIS configuration, is first formulated as follows

$$\min_{\mathbf{F}} \text{PEB}(\mathbf{F}; \zeta_{\text{car}}) \qquad (19a)$$

$$\text{s.t.} \quad \text{tr}(\mathbf{F}\mathbf{F}^{\text{H}}) = \text{MT}. \qquad (19b)$$

Similar to [13], using the change of variable $X = \mathbf{F}\mathbf{F}^{\text{H}}$ and removing the constraint $\text{rank}(X) = T$ [44, Chapter 7.5.2] [45], it can be shown from [46, Appendix C] that the optimal matrix solution $X^*$ to the equivalent relaxed convex (SDP) problem is of the specific form

$$X^* = U \Lambda U^{\text{H}} \qquad (20)$$
where $\Lambda \in \mathbb{C}^{4 \times 4}$ is a (PSD) matrix with the beam weights to be applied onto—or equivalently, the relative powers allocated to—the columns of $\mathcal{U}$ lying on its diagonal.

$$ \mathcal{U} \triangleq [a^*(\mathbf{p}_{\text{UE}}) \dot{\mathbf{a}}_{\rho}^*(\mathbf{p}_{\text{UE}}) \dot{\mathbf{a}}_{\theta}^*(\mathbf{p}_{\text{UE}}) \dot{\mathbf{a}}_{\phi}^*(\mathbf{p}_{\text{UE}})]. \quad (21) $$

The columns of $\mathcal{U}$ can be physically interpreted as the RIS steering vector and its successive derivatives with respect to the spherical coordinates, similar to that involved in (13). Note that the space spanned by these columns could also be spanned by four orthonormalized vectors, after application of the Gram-Schmidt algorithm, so that $\mathcal{U}^\dagger \mathcal{U} = MI_4$. This step enables us to rewrite the initial optimization constraint $\text{tr}(X) = \text{MT}$ as $\text{tr}(\Lambda) = \text{T}$. After performing the transformation above (i.e., from $X \in \mathbb{C}^{M \times M}$ to $\Lambda \in \mathbb{C}^{4 \times 4}$), and by applying Schur's complement on 19a to eliminate the inverse of the information matrix term, an equivalent low-complexity optimization problem can be simply stated as follows

$$ \min_{\Lambda \succ u} \mathbf{1}^{\top} \mathbf{u} \qquad (22a) $$

$$ \text{s.t.} \quad \left[ \mathbf{J}_{\text{car}} \mathbf{e}_k \right]_{\substack{\mathbf{e}_k^\top \\ u_k}} \geq 0, k = 1, 2, 3, \qquad (22b) $$

$$ \text{tr}(\Lambda) = \text{T}, \qquad (22c) $$

$$ \Lambda \geq 0. \qquad (22d) $$

Furthermore, the problem can be further relaxed by forcing $\Lambda$ to be diagonal, i.e., $\Lambda = \text{diag}(\lambda)$. The entries of vector $\lambda$ can hence be viewed as relative power allocations (or equivalently, as relative transmission periods within a time-sharing approach, depending on the implementation [13]), which must be assigned to the different columns of $\mathcal{U}$. In the following, we consider solving the final optimization problem (22) through CVX [47].

### 3.3.3 Localization-optimal RIS beams approximation

From (21), if $\mathbf{p}_{\text{des}} = \mathbf{p}_{\text{UE}}$ denotes the position of one single UE to be localized (i.e., $I = 1$), it comes that four distinct desired beams must be synthesized in practice so as to optimize localization performance, as follows:

* **1 directional beam:** $G(\mathbf{p}) \propto (\mathbf{b}^*(\mathbf{p}_{\text{des}}, \mathbf{p}_{\text{TX}}))^\top \mathbf{b}(\mathbf{p}, \mathbf{p}_{\text{TX}})$, where $\propto$ indicates proportionality (to avoid normalization issues). Here, $\mathbf{b}(\mathbf{p}_{\text{des}}, \mathbf{p}_{\text{TX}}) = \mathbf{a}(\mathbf{p}_{\text{des}}) \odot \mathbf{a}(\mathbf{p}_{\text{TX}})$, with $\mathbf{a}(\mathbf{p}_{\text{des}})$ representing the desired directional beam pointing toward the UE position.

* **3 derivative beams:** $G_x(\mathbf{p}) \propto (\dot{\mathbf{b}}_x^*(\mathbf{p}_{\text{des}}, \mathbf{p}_{\text{TX}}))^\top \mathbf{b}(\mathbf{p}, \mathbf{p}_{\text{TX}})$, where $\dot{\mathbf{b}}_x(\mathbf{p}_{\text{des}}, \mathbf{p}_{\text{TX}}) = \partial \mathbf{b}(\mathbf{p}_{\text{des}}, \mathbf{p}_{\text{TX}})/\partial x$, in which $x$ represents alternatively the range $\rho$, elevation angle $\theta$, and azimuth angle $\phi$ (see Fig. 1). Here, $\dot{\mathbf{b}}_x(\mathbf{p}_{\text{des}}, \mathbf{p}_{\text{TX}}) = \dot{\mathbf{a}}_x(\mathbf{p}_{\text{des}}) \odot \mathbf{a}(\mathbf{p}_{\text{TX}})$, with $\dot{\mathbf{a}}_x(\mathbf{p}_{\text{des}})$ representing the desired derivative beam pointing toward the UE position.
# 4 Numerical results

## 4.1 Simulation parameters

To assess the performance of the proposed beam synthesis method, we considered actual lookup tables accounting for the RIS response per unit element of distinct hardware prototypes, i.e., distinct sets of feasible complex reflection coefficients per element. These prototypes have been developed and characterized in the frame of the H2020 RISE-6G<fnref n="3" /> project. In particular, we have considered the following sets (see Fig. 2):

* $V$ [16, Table 1]: a first set characterizing a prototype based on a single-diode varactor, with 14 possible complex values per RIS element;

* $K1$ [17]: a second set characterizing a prototype revisiting a transmit-array architecture [17] based on p-i-n diodes and enabling 1-bit phase quantization, hence with 2 possible complex values per RIS element;

* $K2$: a third set similar to $K1$, but with 2-bit phase quantization and hence four possible complex values per RIS element.

The performance obtained with each of the previous sets after beam approximation is compared with that of an idealized variant (so-called unconstrained), where the RIS complex element-wise reflection coefficients all lie on the unit circle with continuous phase values.

In our simulations, the carrier frequency was set at 5.15 GHz for $V$ and 28 GHz for the other sets, reflecting the actual operating frequency of each RIS hardware prototype. And to make sure that the localization performance comparison is fair, we ensured that the propagation loss of the BS-RIS RIS-UE paths is equal disregarding the operating frequency effect.

In terms of addressed scenario, without loss of generality, we focus on a canonical configuration, where $p_{TX}$ is set to $[3, 3, 0]^\top$ m and the RIS is placed at the origin, i.e., $p_{RIS} = [0, 0, 0]^\top$ m. For beam patterns visualization and beam fidelity analysis (see Figs. 3, 4, 5, 6 and 7), we first consider a desired point $p_{des} \equiv p_{UE}$ located in $[0, 2, 0]^\top$ m for both steering and derivative beam patterns. The 1D visualizations are intended to show the performance in terms of maximum power gain and width, allowing us to evaluate the designed beams in the desired direction, whereas the 2D illustrations showcase the beam pattern in terms of both the azimuth and elevation angles, hence focusing on the overall angular behavior, as well as on the potential presence of harmful grating lobes. These visualizations include the magnitude $|G(p)|$ in 1D or 2D slices in spherical dimensions. In Fig. 9, the PEB is evaluated as a function of the RIS-UE distance and accordingly, the UE position is set to $[-r, r, r]^\top$ m where $r$ varies between 0.2 and 10 m. However, in Fig. 10, we set the spherical coordinates of the user in a different way where the RIS-UE distance is set to a constant value $\rho = 2$ m, the elevation angle is also set to a constant $\phi = \frac{\pi}{2}$ rad, whereas $\theta$, the azimuth component, varies across the entire defined range, i.e., $[0 \cdots \pi]$ rad (excluding the first and last values where the UE is co-planar with the RIS). Similarly, in Fig. 11, the range is set to $\rho = 2$ m, $\theta = \frac{\pi}{2}$ rad and now the elevation angle $\phi$ varies across the $[0 \cdots \pi]$ rad range. For this positioning performance

<footnote n="3">³ See https://RISE-6G.eu for more information.</footnote>
<table><caption>**Table 2** General simulation parameters</caption><thead><tr><th>Parameter</th><th>Value</th><th>Parameter</th><th>Value</th></tr></thead><tbody><tr><td>f<sub>c</sub></td><td>5.15–28 GHz</td><td>E<sub>tot</sub></td><td>(P<sub>tx</sub>/W)MT</td></tr><tr><td>W</td><td>120 kHz</td><td>P<sub>tx</sub></td><td>20 dBm</td></tr><tr><td>noise figure n<sub>f</sub></td><td>8 dB</td><td>RIS size</td><td>M = 32 × 32 elements</td></tr><tr><td>N<sub>0</sub></td><td>– 174 dBm/Hz</td><td>transmissions</td><td>T = 40</td></tr></tbody></table>

assessment, we compare the PEB when applying ideal localization-optimal RIS beams with those obtained via the proposed approximation method. For benchmark purposes, similar PEB evaluations are also carried out with random and directional RIS configurations where we adopted a Monte Carlo approach and we averaged the PEB over all the random trials. In the former case, the complex RIS element-wise reflection coefficients are simply drawn randomly from the corresponding set for each prototype, with no further projection.

The main simulation parameters (system model and scenario) are summarized in Table 2.

## 4.2 Results and discussion

### 4.2.1 Qualitative analysis of approximated RIS beams

#### 1D Visualization

In Figs. 3 and 4, we show approximated patterns for both 1D steering and derivative beams, as a function of the azimuth parameter $\theta$, while maintaining the other coordinates at their true (i.e., desired) values. These patterns have been generated without imposing any constraint on the RIS precoder (unconstrained) or by utilizing realistic hardware limitations derived from the lookup tables (sets $K1$, $K2$, and $V$). It is important to note that the projection onto any set can be achieved through a single step or can be improved through iterative refinement. The latter approach has been adopted to achieve a higher level of precision.

In Fig. 3, we notice at first that the main lobe of the unconstrained steering beam (red curve) has a peak of 60.2dB, which is in line with the beamforming gain offered by the considered RIS of $M = 32 \times 32$ elements. Moreover, comparing the beam projected onto the set $K1$ (i.e., with 1-bit unit cells; green curve) with the unconstrained one, we see a significant loss, which can be mitigated by about 3 dB, by projecting the beam onto $K2$ instead (2-bit unit cells; blue curve). Furthermore, projecting the beam onto set $V$ results in, as expected, more degradation in the beam peak value. Beyond, if we take a look at the entire beam shape across $\theta$, we notice that constraining into real sets leaves the beam with unwanted secondary lobes, explaining also the power loss experienced at the peak of the main lobe. Table 1 summarizes the main indicators regarding beam fidelity issues, in terms of power loss in the desired direction and the presence of unwanted secondary lobes aside. It simply indicates the peak power value of the main lobe as well as the position and the peak value of the secondary lobes, across different prototypes, which are defined by the highest peaks breaking the unconstrained envelope.
<figure><img src="image_6.png" /><figcaption>**Fig. 2** The sets $V$, $K1$, and $K2$ with the values for the RIS elements responses, as well as the unit modulus set, plotted in the complex plane</figcaption></figure>

<figure><img src="image_7.png" /><figcaption>**Fig. 3** Steering beam patterns as a function of the azimuth angle $\theta$ for various beam synthesis methods under gradual RIS hardware constraints, including the realistic RIS element responses of [16, 17]</figcaption></figure>
<figure><img src="image_8.png" /><figcaption>**Fig. 4** Derivative beam patterns as a function of the azimuth angle $\theta$ for various beam synthesis methods under gradual RIS hardware constraints, including the realistic RIS element responses of [16, 17]</figcaption></figure>

<figure><img src="image_9.png" /><figcaption>**Fig. 5** Example of the unconstrained steering RIS beam visualization in 2D</figcaption></figure>

Figure 4 shows that the generated derivative beam patterns exhibit very similar trends to that observed with the steering ones. Additionally, as the figure displays the derivative with respect to the azimuth angle, a null is present when $\theta$ corresponds to the desired direction, as already pointed out in [40].

## 2D Visualization

The heatmaps in Figs. 5, 6, 7 and 8 display, as a function of the direction of departure from the RIS (i.e., of both azimuth and elevation angles) and a specified desired direction (red circle), the *unconstrained* steering beam, as well as its projections onto sets $K1$, $K2$, and $V$, respectively. In Fig. 5, we can see that only one main lobe is present in
<figure><img src="image_10.png" /><figcaption>**Fig. 6** Designed RIS beam resulting from the projection to $\mathcal{K}1$ (same example as in Fig. 5)</figcaption></figure>

<figure><img src="image_11.png" /><figcaption>**Fig. 7** Designed RIS beam resulting from the projection to $\mathcal{K}2$ (same example as in Fig. 5)</figcaption></figure>

the desired direction, as expected. Note that this is used as a reference for comparing
the beams constrained with realistic RIS hardware.

Figure 6, visualizes the beam projection onto set $\mathcal{K}1$, where the main lobe is still observed in the desired direction, even though clearly attenuated in comparison with the unconstrained beam from Fig. 5. The presence of a strong and systematic secondary grating lobe is also noted, which turns out to be a standard reflection, regardless of the desired beam direction, number of RIS elements, or inter-elements spacing. This kind of grating lobe arises due to the severe quantization of the RIS element
<figure><img src="image_12.png" /><figcaption>**Fig. 8** Designed RIS beam resulting from the projection to $V$ (same example as in Fig. 5)</figcaption></figure>

phase, creating some kind of spatial aliasing. However, as shown in Fig. 7, this problem of grating lobe can be mitigated after adding only one more bit of phase quantization. In this case, a higher peak value (by about +3 dB) is also achieved for the main lobe in the desired direction, even if the levels of all the other secondary lobes remain globally high and comparable to those in the 1-bit phase quantization case. Lastly, Fig. 8 depicts the beam pattern gain resulting from the projection onto $V$. Regardless of the high number of quantization levels (i.e., 14) shown in Fig. 2, a secondary lobe is also still present pointing toward a fixed unwanted direction, which corresponds to a natural specular reflection. This grating lobe comes from the fact that set $V$ is not centered at the origin of the complex plane (see Fig. 2), but shifted and significantly down-scaled in comparison with the unit circle, due to amplitude losses. Accordingly, the $2\pi$ rad phase domain is not entirely covered by the feasible reflection coefficients per element. Indeed, given the span of valid phases observed in $V$ (say, reflection coefficients experiencing attenuations lower that 5 dB), which covers less than $\pi$ rad in practice (i.e., less than what would be feasible with a 1-bit quantization of the RIS element phase in $\mathcal{C}1$), this unwanted reflection was hence expected with $V$ too. In addition to the main grating lobe, the intensity of all the secondary lobes is also generally higher throughout the entire 2D area.

### 4.2.2 Quantitative analysis of positioning performance with approximated RIS beams

In Fig. 9, we show that PEB increases globally as a function of the RIS-UE distance, as expected. We hence first note that the localization-optimal RIS phase design outperforms the random designs [13]) for both *constrained* and *unconstrained* beam patterns, whatever the considered range. Then, among the random phase designs more specifically, the performance of the so-called *unconstrained* beam is only slightly better than that of all the *constrained* beams, which are very close to each other, even if $V$
<figure><img src="image_13.png" /><figcaption>**Fig. 9** PEB as a function of RIS-UE distance for ideal and designed localization-optimal RIS beams, constrained by the real lookup tables/projection sets of the four characterized hardware prototypes</figcaption></figure>

looks slightly worse at very first sight (for the same reasons of unfavorable reflection coefficients distribution as before). Overall, this means in practice that the localization performance is not that sensitive to beam fidelity issues caused by beam patterns approximation under real hardware limitations, as long as all the feasible phases/ amplitudes of the reflection coefficients are all visited within random RIS configuration designs. Regarding the localization-optimal phase design, which requires a weighted combination of four distinct beams, performance now seems much more sensitive to beam pattern approximation (and hardware impairments) than that in the random design case, while experiencing much higher performance degradation in comparison with the unconstrained case. This performance gap looks relatively constant as the RIS-UE distance increases though. Moreover, as expected, set $\mathcal{K}_2$ seems relatively better than $\mathcal{K}_1$ which is also better than $\mathcal{V}$. Finally, another set of two curves related to directional RIS profile design are shown with different uncertainty sphere radii (0.5 m and 2 m). We notice that in general, the PEB of the directional design lies in between the localization-optimal and the random once. Furthermore, distributing the positions in a smaller uncertainty sphere yields a PEB close to that projected onto sets $\mathcal{K}_1$ and $\mathcal{K}_1$ in the localization-optimal design only at short distances but then degrades quickly as the RIS-UE distance increases. On the other hand, using the bigger sphere gives the opposite behavior; this is in line with the results presented in [13].

Figure 10 shows the PEB evolution as a function of the azimuth angle (i.e., the RIS-UE distance and elevation being fixed), where one can observe the same trends and ranking as before with the RIS-UE range. Whatever the setting, the PEB is also mainly better in the inner part of the spanned angular interval, illustrating typical geometric effects as we get away from the boresight, regardless of beam approximation. Since the RIS-UE
<figure><img src="image_14.png" /><figcaption>**Fig. 10** PEB as a function of RIS-UE azimuth angle for ideal and designed localization-optimal RIS beams, constrained by the real lookup tables/projection sets of the four characterized hardware prototypes</figcaption></figure>

<figure><img src="image_15.png" /><figcaption>**Fig. 11** PEB as a function of RIS-UE elevation angle for ideal and designed localization-optimal RIS beams, constrained by the real lookup tables/projection sets of the four characterized hardware prototypes</figcaption></figure>
distance is short, utilizing a directional phase design with a smaller sphere yields a better performance than a bigger one which in turn almost performs as the random design.

Likewise, Fig. 11 shows similar PEB curves as a function of the elevation angle (i.e., the RIS-UE distance and azimuth being fixed), where performance is still better in the inner part of the spanned angular intervals, illustrating typical effects as we get away from the boresight. The gap between the PEB performance achieved with an *unconstrained* beam pattern and its *constrained* approximated variants seems all the more critical in those outer angular zones.

## 5 Conclusion and future work

In this study, we presented a low-complexity technique for optimizing the complex configuration of RISs so as to create various beam patterns, while considering real hardware limitations. The proposed method utilizes a predetermined lookup table of possible RIS element reflection coefficients, characterized out of real measurements. Applying the proposed beam generation strategy into the concrete context of NF NLoS localization, the performance degradation induced by beams approximation has then been evaluated in terms of both beam fidelity and PEB, and further benchmarked for different a priori RIS control strategies (including random, directional and localization-optimal designs). First numerical simulations regarding beam fidelity emphasize the dominating influence of both phase quantization levels (and the span of practically valid phases) and power losses regarding the element-wise complex reflection coefficients on the power gain of the RIS beam peak in the desired UE direction, as well as on the existence of unwanted secondary lobes. The results show up to 50–75% peak power attenuation in the main lobe when switching from *unconstrained* RIS design to hardware *constrained* ones. Another artifact is the appearance of secondary lobes with high peak power directed in unintended directions. Other simulations performed in a canonical scenario also reveal the effects of beam synthesis and their relative power losses on the localization performance of different RIS prototypes. The PEB metric was utilized for that manner and the positioning was evaluated versus both RIS-UE distance and angles (i.e., both azimuth and elevation) to ensure that the study covers all the possible dimensions. As expected, constraining the beam synthesis to RIS designs with certain limits degrade the positioning performance across all dimensions with various RIS profile designs. In general, a gain of one order of magnitude is realized when adopting the location-optimal profile design compared with the random one. In the former, the performance varies from mm levels in NF up to m, whereas the latter starts at cm at short distances. Furthermore, utilizing a realistic constrained hardware design degrades the performance by around 40% as the UE moves away from the RIS. This degradation is still clear in the angular study with its value changing w.r.t. the RIS-UE angle.

In a practical localization scenario, it is possible to obtain prior information about the UE's location from previous time steps (e.g., a Kalman filter), from which an optimal beam design problem can be formulated. In particular, as a fundamental special case, we have considered the scenario where a single user position is known, and based on this, we have derived the structure of the beams in the RIS codebook. To accommodate position uncertainty in the codebook, robust designs can be employed, building upon the proposed design framework. This future extension allows for the incorporation of
position uncertainty while maintaining the overall structure and principles of the initial
design [40].

Other future works should investigate more RIS prototypes by testing their different
design characteristics based on localization performance. Extending the results to state-
of-the-art as well as novel localization algorithms is also a possible path where the gaps
in the performance of the RIS devices can be analyzed and fixed.

**Abbreviations**

<table><tr><td>BS</td><td>Base station</td></tr><tr><td>DoD</td><td>Direction of departure</td></tr><tr><td>FIM</td><td>Fisher information matrix</td></tr><tr><td>LoS</td><td>Line-of-sight</td></tr><tr><td>LMI</td><td>Linear matrix inequalities</td></tr><tr><td>MC</td><td>Multi-carrier</td></tr><tr><td>MIMO</td><td>Multiple-input multiple-output</td></tr><tr><td>NF</td><td>Near-field</td></tr><tr><td>NLoS</td><td>Non-line-of-sight</td></tr><tr><td>OEB</td><td>Orientation error bound</td></tr><tr><td>PEB</td><td>Position error bound</td></tr><tr><td>PSD</td><td>Positive semi-definite</td></tr><tr><td>RIS</td><td>Reconfigurable intelligent surface</td></tr><tr><td>QoS</td><td>Quality of service</td></tr><tr><td>RX</td><td>Receiver</td></tr><tr><td>SDP</td><td>Semi-definite program</td></tr><tr><td>S(I)NR</td><td>Signal-to-(interference-and-)noise ratio</td></tr><tr><td>SISO</td><td>Single-input single-output</td></tr><tr><td>SRE</td><td>Smart radio environment</td></tr><tr><td>UE</td><td>User equipment</td></tr><tr><td>TDoA</td><td>Time difference of arrival</td></tr><tr><td>TX</td><td>Transmitter</td></tr></table>

**Acknowledgements**

The authors would like to warmly thank Dr. Antonio Clemente, from CEA-Leti, and France, Dr. Philippe Ratajczak, from Orange Innovation Networks, France, for sharing the lookup tables associated to their R-RIS hardware prototypes in the context of RISE-6G project, as well as for the fruitful technical discussions and the relevant advice regarding this paper.

**Author contributions**

MR, BD, KK, MFK, BU, GCA and HW contributed to the formulation of the research problem, development of algorithms, numerical simulations and writing of the paper. All authors read and approved the manuscript.

**Funding**

This work has been supported, in part, by the EU H2020 RISE-6G project under Grant 101017011 and by the MSCA-IF Grant 888913 (OTFS-RADCOM).

**Availability of data and materials**

The datasets used and/or analyzed during the current study are available from the corresponding author on reasonable request.

**Declarations**

**Competing interests**

The authors declare that they have no competing interests.

Received: 28 February 2023 Accepted: 16 August 2023

Published online: 29 August 2023

**References**

1. C. Huang, A. Zappone, G.C. Alexandropoulos, M. Debbah, C. Yuen, Reconfigurable intelligent surfaces for energy efficiency in wireless communication. IEEE Trans. Wirel. Commun. **18**(8), 4157–4170 (2019). https://doi.org/10.1109/TWC.2019.2922609

2. Q. Wu, R. Zhang, Intelligent reflecting surface enhanced wireless network via joint active and passive beamforming. IEEE Trans. Wirel. Commun. **18**(11), 5394–5409 (2019). https://doi.org/10.1109/TWC.2019.2936025
3. E. Calvanese Strinati, G.C. Alexandropoulos, H. Wymeersch, B. Denis, V. Sciancalepore, R. D'Errico, A. Clemente, D.-T. Phan-Huy, E.D. Carvalho, P. Popovski, Reconfigurable, intelligent, and sustainable wireless environments for 6G smart connectivity. IEEE Commun. Mag. 59 (10), 99–105 (2021)

4. K. Keykhosravi, B. Denis, G.C. Alexandropoulos, Z.S. He, A. Albanese, V. Sciancalepore, H. Wymeersch, Leveraging RIS-Enabled Smart Signal Propagation for Solving Infeasible Localization Problems (2022). https://doi.org/10.48550/arXiv.2204.11538

5. A.F. Molisch, V.V. Ratnam, S. Han, Z. Li, S.L.H. Nguyen, L. Li, K. Haneda, Hybrid beamforming for massive MIMO: a survey. IEEE Commun. Mag. 55 (9), 134–141 (2017). https://doi.org/10.1109/MCOM.2017.1600400

6. G.C. Alexandropoulos, N. Shlezinger, P. del Hougne, Reconfigurable intelligent surfaces for rich scattering wireless communications: Recent experiments, challenges, and opportunities. IEEE Commun. Mag. 59 (6), 28–34 (2021). https://doi.org/10.1109/ICC40277.2020.9148961

7. S. Abeywickrama, R. Zhang, Q. Wu, C. Yue, Intelligent reflecting surface: practical phase shift model and beamforming optimization. IEEE Trans. Commun. 68 (9), 5849–5863 (2020). https://doi.org/10.1109/ICC40277.2020.9148961

8. R. Long, Y.-C. Liang, Y. Pei, E.G. Larsson, Active reconfigurable intelligent surface-aided wireless communications. IEEE Trans. Wirel. Commun. 20 (8), 4962–4975 (2021)

9. S. Hu, F. Rusek, O. Edfors, Capacity degradation with modeling hardware impairment in large intelligent surface. In: Proceedings of the IEEE global communications conference (GLOBECOM) (2018). https://doi.org/10.1109/GLOCOM.2018.8647606

10. H. Shen, W. Xu, S. Gong, C. Zhao, D.W.K. Ng, Beamforming optimization for IRS-aided communications with transceiver hardware impairments. IEEE Trans. Commun. 69 (2), 1214–1227 (2020). https://doi.org/10.1109/TCOMM.2020.3033575

11. M. Rahal, B. Denis, K. Keykhosravi, M.F. Keskin, B. Uguen, G.C. Alexandropoulos, H. Wymeersch, Arbitrary beam pattern approximation via riss with measured element responses. In: Joint European Conference on Networks and Communications & 6G Summit (EuCNC/6G Summit), pp. 506–511 (2022). https://doi.org/10.1109/EuCNC/6GSummit.54941.2022.9815624

12. A. Elzanaty, A. Guerra, F. Guidi, M.-S. Alouini, Reconfigurable intelligent surfaces for localization: position and orientation error bounds. IEEE Trans. Signal Process. 69, 5386–5402 (2021). https://doi.org/10.1109/TSP.2021.3101644

13. M. Rahal, B. Denis, K. Keykhosravi, M.F. Keskin, B. Uguen, H. Wymeersch, Constrained ris phase profile optimization and time sharing for near-field localization. In: IEEE 95th Vehicular Technology Conference (VTC-Spring), pp. 1–6 (2022). https://doi.org/10.1109/VTC2022-Spring54318.2022.9860413

14. K. Keykhosravi, M.F. Keskin, G. Seco-Granados, H. Wymeersch, SISO RIS-enabled joint 3D downlink localization and synchronization. In: Proceedings of the IEEE International Conference on Communications (ICC) (2021). https://doi.org/10.1109/ICC42927.2021.9500281

15. M. Rahal, B. Denis, K. Keykhosravi, B. Uguen, H. Wymeersch, RIS-enabled localization continuity under near-field conditions. In: Proceedings of the IEEE 22nd International Workshop on Signal Processing Advances in Wireless Communications (SPAWC) (2021). https://doi.org/10.1109/SPAWC51858.2021.9593200

16. R. Fara, P. Ratajczak, D.-T.P. Huy, A. Ourir, M. Di Renzo, J. De Rosny, A prototype of reconfigurable intelligent surface with continuous control of the reflection phase (2021). https://doi.org/10.48550/arXiv.2105.11862

17. L. Di Palma, A. Clemente, L. Dussopt, R. Sauleau, P. Potier, P. Pouliquen, Circularly-polarized reconfigurable transmi-tarray in Ka-band with beam scanning and polarization switching capabilities. IEEE Trans. Antennas Prop. 65 (2), 529–540 (2017). https://doi.org/10.1109/TAP.2016.2633067

18. J.-B. Gros, V. Popov, M.A. Odit, V. Lenets, G. Lerosey, A reconfigurable intelligent surface at mm wave based on a binary phase tunable meta surface. IEEE Open J. Commun. Soc. 2, 1055–1064 (2021). https://doi.org/10.1109/OJCOMS.2021.3076271

19. U. Nickel, Overview of generalized monopulse estimation. IEEE Trans. Aerosp. Electron. Syst. 21 (6), 27–56 (2006). https://doi.org/10.1109/MAES.2006.1662039

20. A.K. Agrawal, E.L. Holzman, Beamformer architectures for active phased-array radar antennas. IEEE Trans. Antennas Prop. 47 (3), 432–442 (1999). https://doi.org/10.1109/8.768777

21. S.H. Talisa, K.W. O'Haver, T.M. Comberiate, M.D. Sharp, O.F. Somerlock, Benefits of digital phased array radars. Proc. IEEE 104 (3), 530–543 (2016). https://doi.org/10.1109/JPROC.2016.2515842

22. A. Abrardo, D. Dardari, M. Di Renzo, Intelligent reflecting surfaces: sum-rate optimization based on statistical position information. IEEE Trans. Commun. (2021). https://doi.org/10.1109/TCOMM.2021.3096549

23. X. Hu, C. Zhong, Y. Zhang, X. Chen, Z. Zhang, Location information aided multiple intelligent reflecting surface systems. IEEE Trans. Commun. 68 (12), 7948–7962 (2020). https://doi.org/10.1109/TCOMM.2020.3020577

24. H. Wymeersch, B. Denis, Beyond 5G Wireless Localization with Reconfigurable Intelligent Surfaces. In: IEEE International Conference on Communications (ICC), pp. 1–6 (2020). https://doi.org/10.1109/ICC40277.2020.9148744

25. O. Rinchi, A. Elzanaty, M.-S. Alouini, Compressive near-field localization for multipath ris-aided environments. IEEE Commun. Lett. 26 (6), 1268–1272 (2022). https://doi.org/10.1109/LCOMM.2022.3151036

26. S. Palmucci, A. Guerra, A. Abrardo, D. Dardari, RIS-aided user tracking in near-field MIMO systems: joint precoding design and RIS optimization (2022). https://doi.org/10.48550/arXiv.2212.07333

27. Y. Pan, C. Pan, S. Jin, J. Wang, RIS-Aided Near-Field Localization and Channel Estimation for the Sub-Terahertz System. arXiv:2208.11343 (2022). https://doi.org/10.48550/arXiv.2208.11343

28. R. Ghazalian, K. Keykhosravi, H. Chen, H. Wymeersch, R. Jántti, Bi-static sensing for near-field ris localization. In: IEEE Global Communications Conference (GLOBECOM), pp. 6457–6462 (2022). https://doi.org/10.1109/GLOBECOM48.0992022.10001209

29. P. Mei, Y. Cai, K. Zhao, Z. Ying, G.F. Pedersen, X.Q. Lin, S. Zhang, On the study of reconfigurable intelligent surfaces in the near-field region. IEEE Trans. Antennas Propag. 70 (10), 8718–8728 (2022). https://doi.org/10.1109/TAP.2022.3147533

30. G.C. Alexandropoulos, V. Jamali, R. Schober, H.V. Poor, Near-field hierarchical beam management for RIS-enabled millimeter wave multi-antenna systems. In: Proceedings of the IEEE SAM, pp. 460–464 (2022). https://doi.org/10.1109/SAM53842.2022.9827873
31. W. Liu, C. Pan, H. Ren, F. Shu, S. Jin, J. Wang, Low-overhead Beam Training Scheme for Extremely Large-Scale RIS in Near-field. arXiv:2211.15910 (2022). https://doi.org/10.48550/arXiv.2211.15910

32. H. Chung, S. Kim, Location-aware Channel Estimation for RIS-aided mmWave MIMO Systems via Atomic Norm Minimization. arXiv:2107.09222 (2021). https://doi.org/10.48550/arXiv.2107.09222

33. K. Chen-Hu, G.C. Alexandropoulos, A.G. Armada, Differential data-aided beam training for RIS-empowered multi-antenna communications. IEEE Access **10**, 113200–113213 (2022). https://doi.org/10.1109/ACCESS.2022.3217204

34. S. Palmucci, A. Guerra, A. Abrardo, D. Dardari, RIS-aided User Tracking in Near-Field MIMO Systems: Joint Precoding Design and RIS Optimization. arXiv:2212.07333 (2022). https://doi.org/10.48550/arXiv.2212.07333

35. J. Tranter, N.D. Sidiropoulos, X. Fu, A. Swami, Fast unit-modulus least squares with applications in beamforming. IEEE Trans. Signal Process. **65**(11), 2875–2887 (2017). https://doi.org/10.1109/TSP.2017.2666774

36. C. Huang, G.C. Alexandropoulos, A. Zappone, M. Debbah, C. Yuen, Energy efficient multi-user MISO communica-
tion using low resolution large intelligent surfaces. In: Proceedings of the IEEE Global Communications Conference (GLOBECOM) (2018). https://doi.org/10.1109/GLOCOMW.2018.8644519

37. E. Basar, M. Di Renzo, J. De Rosny, M. Debbah, M.-S. Alouini, R. Zhang, Wireless communications through reconfigurable intelligent surfaces. IEEE Access **7**, 116753–116773 (2019). https://doi.org/10.1109/ACCESS.2019.2935192

38. Z. Abu-Shaban, K. Keykhosravi, M.F. Keskin, G.C. Alexandropoulos, G. Seco-Granados, H. Wymeersch, Near-field locali-
zation with a reconfigurable intelligent surface acting as lens. In: Proceedings of the IEEE International Conference
on Communications (ICC) (2021). https://doi.org/10.1109/ICC42927.2021.9500663

39. J. Li, L. Xu, P. Stoica, K.W. Forsythe, D.W. Bliss, Range compression and waveform optimization for MIMO radar: a Cramér–Rao bound based study. IEEE Trans. Signal Process. **56**(1), 218–232 (2008). https://doi.org/10.1109/TSP.2007.901653

40. F. Keskin, F. Jiang, F. Munier, G. Seco-Granados, H. Wymeersch, Optimal spatial signal design for mm wave position-
ing under imperfect synchronization. IEEE Trans. Veh. Technol. (2022). https://doi.org/10.1109/TVT.2022.3149974

41. J.A. Zhang, X. Huang, Y.J. Guo, J. Yuan, R.W. Heath Jr., Multibeam for joint communication and radar sensing using steerable analog antenna arrays. IEEE Trans. Veh. Technol. **68**(1), 671–685 (2019). https://doi.org/10.1109/TVT.2018.2883796

42. S.M. Kay, *Fundamentals of Statistical Signal Processing: Practical Algorithm Development* (Prentice-Hall, Hoboken, 2013)

43. H.L. Van Trees, *Detection, Estimation, and Modulation Theory, Part 1: Detection, Estimation, and Linear Modulation Theory*, vol. 1 (Wiley, New York, 2004)

44. S. Boyd, L. Vandenberghe, *Convex Optimization* (Cambridge University Press, Cambridge, 2004)

45. N. Garcia, H. Wymeersch, D. Slock, Optimal Precoders for Tracking the AoD and AoA of a mm-Wave Path. IEEE Trans. Signal Process. **66**(21), 5718–5729 (2018). https://doi.org/10.1109/TSP.2018.2870368

46. J. Li, L. Xu, P. Stoica, K.W. Forsythe, D.W. Bliss, Range compression and waveform optimization for MIMO radar: a Cramér–Rao bound based study. IEEE Trans. Signal Process. **56**(1), 218–232 (2008). https://doi.org/10.1109/TSP.2007.901653

47. M. Grant, S. Boyd, CVX: Matlab Software for Disciplined Convex Programming, version 2.1. http://cvxr.com/cvx (2014)

**Publisher's Note**

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Submit your manuscript to a **SpringerOpen**
journal and benefit from:

► Convenient online submission

► Rigorous peer review

► Open access: articles freely available online

► High visibility within the field

► Retaining the copyright to your article

Submit your next manuscript at ► springeropen.com