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

HAL
open science

# SIM-IPS: Stacked Intelligent Metasurface-Based Indoor Positioning System

Aisha Javed, Naveed Ul Hassan, Marco Di Renzo, Chau Yuen

► To cite this version:

Aisha Javed, Naveed Ul Hassan, Marco Di Renzo, Chau Yuen. SIM-IPS: Stacked Intelligent Metasurface-Based Indoor Positioning System. IEEE Open Journal of the Communications Society, 2025, 6, pp.3528-3542. 10.1109/OJCOMS.2025.3559946. hal-05378131

HAL Id: hal-05378131

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

Submitted on 22 Nov 2025

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished 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 Attribution 4.0 International License
Received 5 March 2025; accepted 1 April 2025. Date of publication 11 April 2025; date of current version 29 April 2025.

Digital Object Identifier 10.1109/OJCOMS.2025.3559946

# SIM-IPS: Stacked Intelligent Metasurface-Based Indoor Positioning System

AISHA JAVED<sup>1</sup> (Student Member, IEEE), NAVEED UL HASSAN<sup>1</sup> (Senior Member, IEEE), MARCO DI RENZO<sup>2,3</sup> (Fellow, IEEE), AND CHAU YUEN<sup>4</sup> (Fellow, IEEE)

CORRESPONDING AUTHORS: N. UL HASSAN AND A. JAVED (e-mail: naveed.hassan@lums.edu.pk; a.javed@lums.edu.pk)

This work was supported in part by LUMS Faculty Initiative Fund (FIF). The work of Marco Di Renzo was supported in part by the European Union through the Horizon Europe Project COVER under Grant 101086228; in part by the Horizon Europe Project UNITE under Grant 101129618; in part by the Horizon Europe Project INSTINCT under Grant 101139161; in part by the Horizon Europe Project TWIN6G under Grant 101182794; in part by the Agence Nationale de la Recherche (ANR) through the France 2030 Project ANR-PEPR Networks of the Future under Grant NF-PERSEUS 22-PEFT-004; and in part by the CHIST-ERA Project PASSIONATE under Grant CHIST-ERA-22-WAI-04 and Grant ANR-23-CHR4-0003-01. The work of Chau Yuen was supported in part by the Ministry of Education Singapore Tier 2 under Award T2EP50124-0032, and in part by the Infocomm Media Development Authority under Grant FCP-NTU-RG-2024-025.

**ABSTRACT** In this paper, we introduce a stacked intelligent metasurface-based indoor positioning system (SIM-IPS), which is a novel IPS developed using an SIM, a transmissive metasurface with multiple layers of independently controlled meta-atoms. These layers function analogously to the hidden layers in a deep neural network (DNN) and enable advanced beamforming in the electromagnetic (EM) wave domain, thus improving the control of the power distribution at the receiver plane. The SIM-IPS setup includes a single Wi-Fi access point (AP) dedicated to localization, which transmits all of its power through the SIM for beamforming. This approach utilizes two distinct configurations types for improved performance: zone identification, which determines the zone where the user is located, and precise localization, which uses random radiation patterns to pinpoint the exact location of the user within the identified zone. We employ the gradient descent algorithm and the alternating optimization (AO) technique to optimize the phase shifts of meta-atoms across different SIM layers for zone configuration. The resulting radiation patterns are stored in a database. During the online phase of the IPS, the AP cycles through the available configurations, and the user provides received signal strength indicator (RSSI) measurements to estimate their location. To ensure high localization accuracy, we optimize the selection of configurations and fine-tune system parameters to achieve good performance. Simulations demonstrate a substantial increase in power concentration at target locations within specific zones by incorporating additional SIM layers. This refined power distribution enables precise differentiation between the target zone and surrounding areas, significantly increasing localization accuracy. Furthermore, we present a detailed comparison of localization accuracy improvements across varying numbers of zones and SIM layers, emphasizing the critical importance of parameter optimization for enhancing the overall performance of SIM-IPS. Specifically, we achieve optimal accuracy with an 8 zone system and 5 layers, attaining a localization accuracy of 1.72 m and 1.66 m by considering continuous-valued and discrete-valued phase shifts, respectively.

**INDEX TERMS** Fingerprinting, IPS, SIM, RIS.

## I. INTRODUCTION

THE SIXTH-GENERATION (6G) networks enable advanced applications such as the Internet of Things (IoT), industrial metaverse, and autonomous

systems, necessitating high data rates, low latency, and energy-efficient operations [1], [2], [3], [4]. Despite advancements in massive multiple-input multiple-output (mMIMO), millimeter-wave (mmWave), and terahertz (THz)

<footnote n="1">¹Department of Electrical Engineering, Lahore University of Management Sciences, Lahore 54792, Pakistan</footnote>

<footnote n="2">²Université Paris-Saclay, CNRS, CentraleSupélec, Laboratoire des Signaux et Systemes, 91192 Gif-sur-Yvette, France</footnote>

<footnote n="3">³Centre for Telecommunications Research—Department of Engineering, King's College London, WC2R 2LS London, U.K.</footnote>

<footnote n="4">⁴School of Electrical and Electronics Engineering, Nanyang Technological University, Singapore</footnote>
communication, indoor positioning systems (IPS) still face
challenges due to multipath interference, signal attenuation,
and environmental dynamics [5], [6], [7]. Traditional IPS
methods, such as Wi-Fi fingerprinting, time-of-arrival (ToA),
and angle-of-arrival (AoA), struggle with deployment com-
plexity, infrastructure overhead, and accuracy degradation in
non-line-of-sight (NLOS) environments. Intelligent surfaces
have emerged as a transformative technology for optimizing
electromagnetic (EM) wave propagation, energy use, and
localization accuracy [8], [9], [10], [11]. Reconfigurable
intelligent surfaces (RIS) dynamically manipulate EM waves
via programmable meta-atoms, enhancing signal coverage
and reducing multipath interference [12], [13]. Unlike con-
ventional IPS, RIS-assisted IPS optimizes the received signal
strength indicator (RSSI) at specific grid points through
controlled phase shifting [14], [15], [16].

While RIS enhances localization accuracy by reconfigur-
ing EM waves, its limited ability to precisely control both
phase and amplitude can cause unintended disruptions in the
wavefront. These disruptions lead to phase discontinuities,
diffraction effects, and regions where the EM signal strength
drops significantly, creating areas of signal loss or "black
holes", where localization becomes unreliable. These chal-
lenges primarily arise from the single-layer structure and the
limited number of meta-atoms, which restrict phase gradient
optimization, particularly in complex multipath environ-
ments [17], [18], [19]. The limited phase and amplitude
control in complex environments at each meta-atom results in
suboptimal power distribution, necessitating a higher density
of meta-atoms to mitigate these effects. This increases system
complexity and computational demands, which constrain
scalability and hinder accuracy, particularly in high-density,
dynamic multi-user environments [20], [21], [22].

Moreover, in multi-user RIS-assisted systems, the strategic placement of the RIS is critical to minimizing path loss and optimizing beamforming efficiency. Suboptimal RIS positioning results a significant increase of the path loss, directly degrading the signal-to-noise ratio (SNR) and exacerbating interference [22], [23]. Such placement deficiencies disrupt multi-user link management, leading to performance degradation in localization accuracy, signal quality, and interference suppression. Therefore, precise optimization of RIS placement is essential to mitigate power distribution inefficiencies and ensure robust network performance in dense, multipath-rich environments. Therefore, overcoming these challenges necessitates a shift toward more advanced structures that enhance phase control, optimize power distribution, and improve adaptability to complex propagation conditions.

Stacked intelligent metasurfaces (SIM) extend RIS by employing a multi-layer metasurface architecture inspired by deep neural networks (DNNs) [21], [24], [25], [26]. Unlike RIS, which relies on single-layer phase adjustments, SIM leverages multiple cascaded metasurface layers to progressively transform the wavefront, enhancing spatial power distribution, beamforming control, and

interference suppression. This hierarchical transformation
reduces reliance on external digital computation while
improving the system's accuracy and robustness. By dynam-
ically adjusting transmission coefficients across metasurface
layers, SIM enhances localization performance by reduc-
ing path loss and mitigating multi-user interference. This
optimization leads to better power distribution, improved
signal quality, and greater scalability in dense, multipath
environments [27], [28].

Building on this foundation, we propose a stacked
intelligent metasurface-based indoor positioning system
(SIM-IPS): a novel localization framework that leverages
multi-layer metasurfaces to enhance positioning accuracy
while reducing system complexity. Unlike traditional Wi-
Fi fingerprinting, which relies on static datasets prone to
mismatch, SIM-IPS dynamically adapts to environmental
changes. Through the reconfiguration of SIM meta-atoms
layer by layer, SIM-IPS generates diverse fingerprinting data
even in complex environments with a single access point
(AP), which is a significant advantage over traditional meth-
ods. It overcomes conventional positioning limitations by
optimizing beamforming, interference suppression, and spa-
tial power control through multi-layer transmission, offering
a scalable and energy-efficient alternative to power-intensive
holographic MIMO (HMIMO) systems [19], [21], [23].

SIM-IPS enhances EM wave interactions through multi-
layer iterative optimization, refining localization granularity
without increasing computational complexity. By dynami-
cally reconfiguring meta-atoms layer by layer, SIM generates
a denser and more diverse fingerprinting dataset, which intro-
duces distinct propagation patterns for precise positioning.
This multi-layer structure improves spatial resolution, miti-
gates spatial ambiguities, and ensures highly discriminative
signal distributions, making SIM-IPS a promising solution
for high-precision localization. Additionally, SIM-IPS is
expected to enhance multi-user positioning by mitigating
interference through adaptive spatial filtering and precise
power control [21], [29], [30], [31].

Despite its advantages, implementing SIM for indoor
positioning presents challenges, particularly in channel esti-
mation. The complexity of inter-layer wave propagation and
EM coupling requires accurate modeling to capture the
behavior of signals across metasurfaces. In this context,
the Rayleigh-Sommerfeld diffraction model is essential
for characterizing wave propagation and diffraction across
metasurface layers, providing insights to optimize SIM-IPS
for improved localization accuracy [21], [25], [32], [33].
However, the large number of SIM configurations available
for fingerprint generation significantly increases the com-
putational burden. Generating these configurations requires
substantial computational resources, which can strain system
performance and extend the fingerprint development process.
Additionally, the increased number of configurations adds
complexity to the localization algorithms. Therefore, balanc-
ing model precision and computational efficiency is crucial
for maintaining real-time performance. While SIM has not
yet been implemented in IPS, its multi-layer architecture, once optimized, offers a promising direction for future research and deployment.

In this paper, we explore the deployment of an AP transmitter (Tx) connected to an SIM within an indoor environment for accurate user localization, with the SIM operating in transmissive mode. The indoor space is segmented into indexed grid points, and a zone-based approach is proposed, dividing the space into smaller zones, each with specific grid points. This zoning approach is particularly important in multiuser and complex environments, as it helps to reduce the localization search space and computational complexity. SIM's ability to generate configurations for these zones enables effective handling of the challenges posed by such complex environments. Specifically, SIM can focus and optimize configurations for each zone to enhance localization performance, minimizing interference and reducing localization errors that arise from environmental factors like multipath and multiuser propagation. By efficiently identifying the user's zone, these configurations contribute to improving overall localization accuracy.

To localize the user, unique SIM configurations are generated for each zone, optimizing received power using gradient descent and the alternating optimization (AO) technique, which iteratively refines meta-atom phase shifts across metasurface layers. SIM-IPS employs a two-step localization process: coarse localization followed by fine localization. In the coarse localization phase, zone identification configurations are generated to determine the user's approximate zone by optimizing the phase shifts of the SIM metasurfaces for maximum power delivery to the target zone points. These configurations are critical for reducing the search space and computational overhead in complex environments. The effective identification of the user's zone during this phase improves localization efficiency by narrowing down the potential location area. In the fine localization phase, more precise configurations are applied to pinpoint the user's exact location within the target zone. SIM-IPS utilizes random radiation patterns in the fine localization phase to ensure precise localization, even in dynamic, multipath-rich environments.

To validate SIM-IPS, we develop an offline fingerprinting dataset consisting of RSSI measurements collected at spatial grid points using optimized SIM configurations. These RSSI values are integral to the fingerprinting approach, which maps signal strength measurements to specific locations within the indoor environment. The fingerprinting dataset is stored in a localization database for real-time comparison during user localization. SIM-IPS utilizes the k-nearest neighbors (KNN) algorithm, which is known for its data-efficient approach to localization, in contrast to computationally intensive neural networks (NNs). By leveraging the KNN algorithm, SIM-IPS quickly and efficiently estimates the user's position based on the closest matches from the fingerprinting database. The algorithm selects the best *k* values from the dataset and applies a

defined metric to accurately estimate the user's location. Simulation results show that increasing the number of SIM metasurfaces significantly improves power concentration at target locations, leading to higher localization accuracy compared to RIS-assisted IPS.

Our major contributions in this paper are:

* We introduce SIM-IPS for accurate positioning of users.

* We implement a two-step localization process: first, coarse localization using optimized zone identification configurations to narrow down the user's approximate area, followed by fine localization, where precise configurations are applied to accurately pinpoint the user's exact location within the identified zone, ensuring both efficiency and high accuracy.

* We optimize localization performance by generating unique SIM configurations for each zone using gradient descent and AO techniques, fine-tuning system parameters, and optimizing configuration selection. This improves accuracy while reducing data requirements, ensuring reliable performance across different zone and layer settings.

The rest of this paper is structured as follows: Section II details the system model and SIM-IPS framework. Section III discusses optimization methods for generating SIM configurations. Section IV presents experimental results and performance evaluation. Finally, Section V concludes the paper.

## II. DESIGN OF SIM-IPS

In this paper, we present SIM-IPS, an innovative approach that integrates SIM technology into Wi-Fi based IPS, offering substantial improvements in positioning accuracy. By leveraging SIM technology, a diverse set of fingerprinting datasets can be generated using only one AP and a single multi-layer metasurface. This reduces AP deployment costs and minimizes signal processing overhead, enhancing both sensing and computational performance. While SIM significantly increases the degrees of freedom for fingerprint dataset generation, it also introduces additional computational challenges. The large number of available SIM configurations can escalate fingerprint generation complexity and impose higher computational demands on localization algorithms. Furthermore, generating and optimizing these configurations requires substantial computational resources, which can impact system efficiency. To mitigate these challenges, SIM-IPS employs optimized configurations that balance fingerprint diversity with computational feasibility, ensuring efficient dataset generation without compromising accuracy. Additionally, it integrates localization algorithms designed to pinpoint user locations with minimal computational overhead. The various steps involved in our proposed positioning system are depicted in Fig. 1.

We consider a 2D localization problem on the “localization plane,” with dimensions $X_r$ and $Y_r$ representing the x- and y-axes, respectively, while the z-coordinate is assumed to remain constant for all users. The SIM operates in
<figure><img src="image_3.png" /><figcaption>FIGURE 1. Flow chart of multi-level localization.</figcaption></figure>

transmissive mode, strategically placed between the AP and the localization plane, as illustrated in Fig. 1. The SIM consists of layers denoted by $L = \{L_1, L_2, L_3, ..., L_n\}$, each containing a uniform planar array of meta-atoms sized $M_s \times N_s$. Assuming a square metasurface, both $M_s$ and $N_s$ are equal, implying $s = \{1, 2, 3, ..., M_s\}$. The SIM's total thickness, $T_w$, correlates with the wavelength $\lambda$. Positioning within the system is defined by a 3D coordinate framework that places the origin (0, 0, 0) at the center of the first layer of the SIM, corresponding to the x-y plane, extending to the final layer at (0, 0, $T_w$). Through phase adjustments of the meta-atoms across layers, the SIM aims to control the spatial power distribution to improve positioning within the indoor environment.

The AP is positioned at coordinates $(x_A, y_A, z_A)$, while a generic user's location is expressed as $(x_X, y_X, z_X)$, with $z_A$ negative and $z_X$ positive, reflecting their respective positions relative to the SIM. The SIM modifies the propagation of the transmitted signal, altering the RSSI at each grid point on the localization plane. To mathematically describe the system, we divide the localization plane into discrete grid points $(i, j)$, where $i \in [1, M_r]$ and $j \in [1, N_r]$. Our next task is to build the fingerprinting dataset at the grid points, which involves two main phases: the offline phase and the online phase. In the offline phase, RSSI values are collected at each grid point for various SIM configurations to create a comprehensive

fingerprint dataset. This phase is computationally intensive due to the need to collect data across the entire grid. In the online phase, real-time RSSI measurements are compared against the stored fingerprints in the dataset to estimate the user's location.

## A. OFFLINE PHASE OF SIM-IPS AND ZONE APPROACH

It is crucial to acknowledge that discretizing the plane introduces a potential location estimation error, a factor often overlooked in IPS performance evaluations. To further improve localization accuracy, the indoor space is divided into $m$ zones, each defined by specific grid points and uniformly distributed over the x and y coordinates. This zoning strategy minimizes the search area, enhancing the accuracy of user localization. For each zone, we tailor configurations optimized for its unique characteristics. The localization process begins with the coarse localization step, where zone identification configurations are employed to determine the user's specific zone. These configurations are designed to fine-tune the phase shifts of meta-atoms across different SIM layers, optimizing power delivery and signal quality within each zone.

Once the zone is identified, the system transitions to the fine localization step, where precise localization configurations are applied. These configurations utilize random radiation patterns to pinpoint the user's exact position
within the identified zone, ensuring high accuracy in the IPS. With a total of C configurations, we denote the zone identification configurations as C_R and the precise localization configurations as C_P. Therefore, we can express:

$$C = C_R \cup C_P, \quad (1)$$

where:

$$C_R = \{C_{R_1}, C_{R_2}, \dots, C_{R_m}\}, \quad (2)$$

which represents the set of configurations for m zones to identify the target zone effectively. These configurations are specifically designed to adjust the phase shifts of meta-atoms across SIM layers to optimize power focusing within each zone. This enhances signal strength and reduces interference, making the localization process more efficient.

A detailed fingerprinting database is then constructed, encompassing D radio maps for each configuration in C, denoted as:

$$R_{i,j} = \{R_{i,j}^1, R_{i,j}^2, \dots, R_{i,j}^D\}, \quad (3)$$

for all $i \in [1, M_r]$ and $j \in [1, N_r]$, where $R_{i,j}^d$ represents the RSSI value at grid point $(i, j)$ under the d-th configuration.

These maps capture the RSSI values under various configurations and are recorded during the offline phase. The RSSI values are labeled and systematically stored in a localization server to facilitate fast and accurate localization. Furthermore, random noise is introduced to these RSSI values to model real-world variability and ensure system efficacy even with signal fluctuations. This noise is denoted as:

$$z_{i,j} = \{z_{i,j}^1, z_{i,j}^2, \dots, z_{i,j}^D\}, \quad (4)$$

for all $i \in [1, M_r]$ and $j \in [1, N_r]$, where $z_{i,j}^d$ represents the noise corresponding to the d-th RSSI value at grid point $(i, j)$.

The dataset, which includes the noisy RSSI values, is then stored in the database and serves as the offline localization dataset.

## B. ONLINE PHASE OF SIM-IPS

During the online phase, user u requests the localization service, and the SIM controller initiates a sequence to cycle through the available configurations. The user, at their unknown location, measures the RSSI values of the available configurations $C_q$, represented as:

$$R_u = \{R_u^1, R_u^2, \dots, R_u^q\}, \quad (5)$$

where q is the total number of configurations. These measurements are then transmitted to the server. To simulate real-world conditions and enhance the robustness of the data, random noise $z_u$ is added to these RSSI values:

$$z_u = \{z_u^1, z_u^2, \dots, z_u^q\}. \quad (6)$$

Upon receiving the data, an online algorithm first performs coarse localization by comparing these noisy RSSI values against the fingerprint database constructed during the offline

phase to determine the user's zone. This comparison is crucial for accurately estimating the user's zone. Once the zone has been identified through coarse localization, the system moves to the fine localization step, where the precise location of the user within the identified zone is determined.

A complexity analysis of SIM-IPS is conducted to assess computational efficiency and scalability. Additionally, we compare its performance with benchmark systems to validate its accuracy. The KNN algorithm is employed for user localization, as it is effective for smaller datasets and computationally efficient compared to complex models like NN. The KNN algorithm first identifies the user's zone through coarse localization and then refines localization by determining the optimal number of nearest neighbors k. By averaging the results from these k nearest neighbors, the system achieves precise localization within the identified zone, enhancing positioning accuracy.

## III. STRATEGIC DESIGN AND ALGORITHMIC OPTIMIZATION OF SIM-IPS

In this section, we delve into the structure of SIM and illustrate their optimal deployment in IPS through careful parameter design.

### A. STRUCTURAL DESIGN OF SIM

A thorough understanding of the structure and key performance parameters of SIM is imperative to fully exploit its advantages and enhance the accuracy of the system. These parameters include layer configurations, meta-atom density, and the strategic placement of the SIM for precise beamforming and accurate localization.

As previously explained, the SIM operates in transmissive mode and consists of L uniformly spaced layers, with $M_s$ and $N_s$ unit cells arranged in a regular planar array on each layer. The total thickness of the SIM, denoted as $T_w$, determines the spatial distribution of these layers. The precise positioning of each SIM layer is carefully optimized to facilitate controlled wave manipulation and maximize signal propagation efficiency. The Tx and Rx are strategically placed on opposite sides of the SIM, allowing structured EM wave transmission through the multi-layered metasurface. A single-antenna Tx directs its signal toward the SIM, where each meta-atom within a layer interacts with corresponding meta-atoms in adjacent layers.

According to the Huygens-Fresnel principle, each meta-atom in a given layer functions as a secondary source, radiating spherical wavefronts that propagate to the meta-atoms in the following layer. These interactions cause the wavefront to evolve progressively, enabling structured wave manipulation. By carefully adjusting the transmission coefficients of the meta-atoms, SIM can dynamically control the phase and amplitude of the EM waves, allowing precise shaping of the wavefront as it traverses the layers. This hierarchical modulation enhances the accuracy of signal transmission and optimizes spatial power distribution. These inter-layer wave interactions refine the signal before it
reaches the receiver, granting improved wavefront shaping and controlled EM energy propagation.

The configuration of these meta-atoms is dynamically controlled by an intelligent controller, such as a microcontroller, which distinguishes between continuous and discrete operational settings. The total number of possible SIM configurations increases exponentially with the number of meta-atoms, denoted as $L^N$, resulting in a vast array of potential states. While an exhaustive dataset covering all configurations would be computationally infeasible, selecting a subset of the most effective configurations is critical for achieving precise user localization.

To optimize this selection process, our system prioritizes minimizing the number of required radio maps, $D$, during the offline phase. This ensures that the dataset remains diverse while retaining the most distinctive propagation characteristics, thereby improving localization accuracy during the online phase. To achieve this, we employ gradient descent and the AO technique, tailored to continuous-valued and discrete-valued phase shifts respectively. These algorithms fine-tune the phase shifts of the meta-atoms across different SIM layers, ensuring controlled spatial power distribution and refined signal steering.

Our approach is designed to identify the most effective SIM configurations, maximizing system accuracy while maintaining computational efficiency. By leveraging adaptive optimization strategies, SIM-IPS significantly enhances positioning performance while reducing processing overhead. The robust structural design of SIM, combined with intelligent configuration management, ensures scalability and real-time adaptability, making it a powerful solution for high-accuracy indoor positioning systems.

## B. PATH LOSS MODEL FOR SIM-IPS

In developing our SIM-IPS, we leverage the EM coupling across the layered structure of the SIM to determine the location of an unknown user accurately. This approach not only ensures computational efficiency but also significantly enhances positioning accuracy. A crucial aspect of this method is the development and application of a precise propagation model for the metasurface, which effectively accounts for EM coupling between meta-atoms across different layers. This model enables the generation of a comprehensive fingerprinting dataset for SIM-IPS. When the dataset closely aligns with experimental data, it can substantially reduce the labor and complexity of data collection while simultaneously improving system accuracy. However, the effectiveness of this approach depends on the careful selection and tuning of the propagation model's parameters. Our strategy incorporates an SIM-assisted path loss model that efficiently manages the inter-layer coupling of meta-atoms within the SIM, as detailed in [25].

The transmitted E-field impinging on the first SIM layer is expressed as:

$$ \mathcal{E}_{(A,S)}^{\text{in}} = [\mathcal{E}_{m}^{\text{in}}]_{m=1}^{M_s N_s} \quad (7) $$

where $\mathcal{E}_{(A,S)}^{\text{in}} \in \mathbb{V}_{\mathbb{C}}^{M_s N_s \times 1}$ denotes the vector of the input E-field incident on all meta-atoms of the first layer. The interaction coefficient between the $m'$-th meta-atom in layer $(\ell - 1)$ and the $m$-th meta-atom in layer $\ell$ is given by:

$$ w_{m,m'}^{\ell} = \frac{A_m \cos \Theta_{m,m'}^{\ell}}{r_{m,m'}^{\ell}} \left( \frac{1}{2\pi r_{m,m'}^{\ell}} - \frac{j}{\lambda} \right) e^{j2\pi r_{m,m'}^{\ell}/\lambda} \quad (8) $$

where $A_m$ is the area of each meta-atom, $\Theta_{m,m'}^{\ell}$ is the angle between the propagation direction and the normal to layer $(\ell - 1)$, and $r_{m,m'}^{\ell}$ represents the separation distance between meta-atoms of adjacent layers. The transmission coefficient matrix for each layer is defined as:

$$ \Psi^{\ell} = \text{diag} \left[ |\Psi_{1}^{\ell}| e^{j\alpha_{1}^{\ell}}, |\Psi_{2}^{\ell}| e^{j\alpha_{2}^{\ell}}, \dots, |\Psi_{M_s N_s}^{\ell}| e^{j\alpha_{M_s N_s}^{\ell}} \right] \in \mathbb{V}_{\mathbb{C}}^{M_s N_s \times M_s N_s} \quad (9) $$

$$ |\Psi_{M_s N_s}^{\ell}| e^{j\alpha_{M_s N_s}^{\ell}} \in \mathbb{V}_{\mathbb{C}}^{M_s N_s \times M_s N_s} \quad (10) $$

The complete interaction matrix for SIM is constructed as:

$$ \mathbf{w}^{\text{SIM}} \in \mathbb{V}_{\mathbb{C}}^{M_s N_s \times M_s N_s} = \prod_{\ell=1}^{L_n} \Psi^{\ell} \mathbf{w}^{\ell} \quad (11) $$

where $\mathbf{w}^{L_1}$ is initialized as an identity matrix, i.e., $\mathbf{I}_{M_s N_s}$.

After passing through the SIM, the outgoing electric field from the final SIM layer is:

$$ \mathcal{E}_{(S,X)}^{\text{out}} = \mathbf{w}^{\text{SIM}} \mathcal{E}_{(A,S)}^{\text{in}} \quad (12) $$

The interaction between the last layer and the receiver is defined by the interaction coefficients $w_{m,Rx}$, where the collected values are represented as:

$$ \mathbf{w}^{\text{Rx}} = [w_1^{\text{Rx}}, w_2^{\text{Rx}}, \dots, w_{M_s N_s}^{\text{Rx}}] \in \mathbb{V}_{\mathbb{C}}^{1 \times M_s N_s} \quad (13) $$

Thus, the total received E-field at the Rx is given by:

$$ \mathcal{E}_{X} = \mathbf{w}^{\text{Rx}} \mathcal{E}_{(S,X)}^{\text{out,Rx}} \quad (14) $$

The total received power can be computed from the received electric field as follows:

$$ P_X = \frac{P_A G_A G_X \lambda^2}{(64\pi^3)} \left| \sum_{m=1}^{M_s N_s} \sqrt{F^{\text{XS}}(\theta_m^{\text{XS}}, \varphi_m^{\text{XS}}) F(\theta_m^{\text{X}}, \varphi_m^{\text{X}})} \frac{e^{-j2\pi r_m^{\text{X}}/\lambda}}{r_m^{\text{X}}} \right. \\ \left. \left( \sum_{n=1}^{M_s N_s} w_{m,n}^{\text{SIM}} \sqrt{F^{\text{AS}}(\theta_n^{\text{AS}}, \varphi_n^{\text{AS}}) F(\theta_n^{\text{A}}, \varphi_n^{\text{A}})} \frac{e^{-j2\pi r_n^{\text{A}}/\lambda}}{r_n^{\text{A}}} \right) \right|^2 \quad (15) $$

Inputs such as the AP specifications (position, transmit power, and frequency) and SIM parameters (position, number of layers, inter-layer separation, and configuration) are utilized in (15) to predict the noiseless RSSI at an Rx location. To calculate the received power $P_u$ at a given point for a selected configuration $c \in [1, C]$, we use (16).

$$ R_u = 30 + 10 \log_{10} P_u \quad (16) $$
To enhance accuracy, we introduce a noise component z modeled as additive white Gaussian noise (AWGN), with $N_0 \sim N(0, \zeta)$. This noise affects RSSI measurements and user positioning accuracy. By adjusting the noise power $\zeta$, we improve robustness and align simulations with real-world conditions.

Additionally, we optimize beam steering for target radiation patterns using gradient descent and AO techniques in both continuous-values and discrete-valued phase shifts respectively. This optimized dataset, combined with random configurations, enriches the fingerprinting database and enhances IPS accuracy. Complete details of this model are provided in [25].

### C. CONTINUOUS CONFIGURATION FOR SIM: ZONE-SPECIFIC APPROACH

In our localization system, we segment the indoor environment into R distinct zones, with each zone uniquely delineated by its grid points. Our approach is designed to optimize spatial power distribution within a specific target zone, enhancing the radiation pattern to improve signal quality. This optimization involves configuring the SIM for each zone to maximize the received power, as outlined by (15). The variables are continuously adjusted for continuous optimization to maximize power levels within the targeted zone. This enables precise control over signal enhancement at each grid point, tailoring the configuration to meet the zone's specific needs. The optimization problem formulated for the target radiation pattern in [25] is expressed as follows in (17):

$$ \min_{\alpha_m^l} J = \frac{1}{M_r N_r} \sum_{i=1}^{M_r} \sum_{j=1}^{N_r} (P_{i,j} - P_{i,j}^{\text{targ}})^2 \quad (17) $$

subject to $\alpha_m^l \in [0, 2\pi)$. In this method, the optimization algorithm emphasizes aligning the received power, denoted by $P_{i,j}$, at each grid point $(i, j)$, with the targeted power levels, $P_{i,j}^{\text{targ}}$, within the designated zone. The objective is to minimize the mean square error (MSE) between the observed and desired power levels across the zone.

This optimization is performed through a gradient descent algorithm, which strategically adjusts transmission coefficients to achieve an optimal power distribution. Initially, the algorithm starts with randomly assigned coefficients, and the phases of these coefficients are independently adjusted within the range of 0 to $2\pi$ as part of the optimization process. The algorithm evaluates the MSE during each iteration by comparing the current power distribution against the target levels. Based on this evaluation, it updates the coefficients, specifically the phases, by moving them in the direction most effectively reducing the MSE.

This iterative refinement process continues until the MSE reaches a minimal threshold or the adjustments in the phases no longer result in significant improvements, indicating that the optimal configuration has been achieved. This

method ensures precise alignment of the received power with the target values, enhancing the system's efficiency and effectiveness in controlled power distribution within the specified zone.

Through this optimization problem, we obtain $C_R$ zone identification configurations for the continuous setting. Considering a total of C configurations for our localization problem, the remaining $C_P$ configurations consist of precise localization configurations. For these random configurations, there is no need to run an optimization problem; instead, we simply initialize the meta-atoms of each layer randomly.

After generating the set of C configurations, our next step is constructing an offline dataset using these configurations. To build this offline database, we employ (15) and (16). In addition, we introduce random noise into this dataset and store this offline dataset on the server.

In the online phase, we utilize the available configurations to build an online dataset and apply the KNN algorithm with the k parameter. This enables us to localize the user and assess the localization accuracy.

A comprehensive algorithm for indoor positioning assuming continuous-valued phase shifts is provided in Algorithm 1.

### D. DISCRETE ZONE CONFIGURATION

The optimization problem for discrete-valued phase shifts, as formulated in [25], is represented by (18):

$$ \min_{\alpha_m^l} J = \frac{1}{M_r N_r} \sum_{i=1}^{M_r} \sum_{j=1}^{N_r} (P_{i,j} - P_{i,j}^{\text{targ}})^2 \quad (18) $$

subject to $\alpha_m^l \in Q = \{\alpha_1^{\tilde{\gamma}}, \dots, \alpha_Q^{\tilde{\gamma}}\}, \forall m, l$.

We employ the AO technique, which combines multiple optimization steps iteratively, as detailed in Algorithm 2. This approach differs fundamentally from the process outlined in phase 2 of Algorithm 1. The AO technique works by sequentially optimizing the variables one at a time, starting with random discrete phases assigned to the meta-atoms across each layer. These initial phase assignments form the basis for our $C_R$ zone identification configurations.

The optimization proceeds systematically: for each layer, starting with the first meta-atom, the algorithm sets the phases for all subsequent meta-atoms to their initial values and computes the potential configurations. It then iteratively updates the phase of each meta-atom to the value that minimizes the objective function, which measures the difference between the actual and desired signal power at each point on the grid.

This process repeats for every meta-atom in the layer, and upon completion, the algorithm updates the matrices for the next layer before proceeding. Each full pass through all the layers constitutes one iteration of the AO technique.

With the optimized $C_R$ configurations in place, we then generate additional precise localization configurations to
**Algorithm 1:** Gradient Descent Optimization Problem
in the Setting With Continuous-Valued Phase Shifts for
SIM-IPS

Input: $M_r, N_r, R, C, C_R, C_p$

Output: User location, MSE

1 Start: /* Phase 1: Zone Division */

2 Define indoor space as a grid of size $M_r \times N_r$;

3 Partition the indoor space into R zones;

4 Store grid points for each zone;

5 /* Phase 2: Configuration Setup */

6 **for** *i* = 1 **to** *R* **do**

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

7 /* Phase 3: Offline Dataset */

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

16 /* Phase 4: Online Phase */

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

25 Calculate and report the final location and measure MSE;

27 **end**

build a comprehensive offline dataset. Using the available
configurations, an online dataset is created for real-time
user localization, which is then processed through the KNN
algorithm during the localization phase. This systematic
layer-by-layer optimization, combined with discrete phase
adjustments, ensures a precise and effective localization
process, leveraging both offline and real-time data to achieve
accurate results.

**Algorithm 2:** Alternating Optimization in the Setting With Discrete-Valued Phase Shifts of SIM-IPS

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

2 Compute interaction term of last layer of SIM with all grid points in localization plane.

3 Initialize all phases to discrete values from a specified set $Q$ and compute parameters for all layers[25].

4 **for** *each meta-atom in layer 1 do*

5 Fix phases of other meta-atoms across all layers.

6 Compute objective function $J$ for each discrete value in set $Q$.

7 Select phase minimizing $J$ and update matrix.

8 After optimizing all meta-atoms in layer 1, recalculate its parameters.

9 **for** *each subsequent layer do*

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

11 Complete one iteration by adjusting phases of all meta-atoms across all layers.

12 **repeat**

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

14 **until** *convergence*

15 Repeat phase 3, 4 and 5 as in Algorithm 1

IV. SIMULATION RESULTS AND PERFORMANCE EVALUATION

We begin our analysis of the SIM-IPS by examining the
performance of the system within a three-dimensional (3-D)
coordinate framework (x, y, z), focusing on the interaction
between an AP and Rx facilitated by an SIM. The SIM,
positioned directly in front of the AP, functions as a critical
interface, effectively manipulating EM wavefronts to achieve
precise beamforming and control over the spatial distribution
of the transmitted signals. The SIM structure consists of
multiple layers, with the first layer centered at the origin
(0, 0, 0). Each layer is composed of meta-atoms arranged in
a uniform square grid, separated by a distance equal to the
wavelength $\lambda$, with a total SIM thickness of $5\lambda$. This layered
structure enables the SIM to modulate and direct the signals
generated by the AP effectively.

The AP, located at (0, 0, -0.5), transmits at a frequency of 28 GHz with a power output of 20 dBm. To streamline our analysis and highlight the functionality of the SIM, both the AP and Rx antennas are assumed to be isotropic, providing a uniform radiation pattern. This assumption simplifies the analysis by setting the transmit gain $G_A = 1$ and the receive gain $G_X = 1$. The radiation patterns for both the AP and Rx antennas are denoted by $F^{AS}(\theta_m^{AS}, \phi_m^{AS}) = 1$ and $F^{XS}(\theta_m^{XS}, \phi_m^{XS}) = 1$, respectively. The meta-atoms within the
SIM are also assumed to be isotropic, with a transmission efficiency factor denoted by $\gamma = 1$.

We assume a localization plane of dimensions $7.5 \times 7.5 \times 3 \text{ m}^3$, and the receiving plane is subdivided into a grid with uniform 0.5 m spacing in both dimensions, creating a grid of $M_r = N_r = 16$, for a total of 256 points. This grid setup is crucial for accurately assessing how effectively the SIM directs the transmitted signal across the receiving plane. We adopt a zone-based approach for our SIM-IPS, dividing the indoor space into small zones, each with an equal number of grid points. This approach focuses on optimizing the radiation pattern for specific zone coordinates. This optimization is important because our system operates with only one AP serving all zones. The SIM concentrates power on these points to maximize power delivery, generating a unique zone identification configuration.

To formally represent the target radiation pattern, we define a binary matrix $P_{i,j}^{\text{targ}}$, where each element is assigned a value of 1 if the corresponding grid point $(i, j)$ belongs to the target zone points, ensuring that power is maximized at these zone points. Conversely, all other grid points are assigned a value of 0, indicating areas where power should be minimized. This structured binary allocation enables the SIM to selectively direct energy to the desired zone, ensuring efficient transmission power distribution. The precision of $P_{i,j}^{\text{targ}}$ directly impacts the beamforming efficiency and overall localization accuracy.

We model the signal propagation in two distinct paths: first, from the AP to the SIM, and second, from the SIM to the Rx. To simulate real-world conditions, we introduce zero-mean Gaussian noise Z into each noise-free RSSI value, as described by (16), with a noise power of 9 dBm.

We present the localization error plots by defining meta-atoms on different SIM layers L, setting both $M_s$ and $N_s$ to 20. We establish the learning rate ($\eta$) at 0.01 for the setting with continuous-valued phase shifts, set the maximum iterations for the gradient descent loop at 100. In the setting with discrete-valued phase shifts, we utilize binary meta-atoms capable of inducing 0 and $\pi$ phase shifts. Increasing the number of SIM layers further enhances the concentration of power at target zone points, improving localization accuracy and optimizing received power distribution. We conducted several simulations to evaluate the impact of varying the number of SIM layers and zones on accuracy. The results of these simulations are thoroughly analyzed and discussed herein, providing interesting insights into the relationship between layer and zone variations on the localization accuracy of SIM-IPS.

We also assess the robustness of the positioning system by analyzing its stability under noise variations and changes in system parameters. Our results indicate that the SIM-IPS maintains consistent localization accuracy even in the presence of noise, demonstrating its resilience and reliability in practical deployment scenarios.

The detailed analysis of the impact of varying the number of SIM layers and zones on localization accuracy within an

<figure><img src="image_10.png" /><figcaption>FIGURE 2. Comparison of localization error for different numbers of layers in zones 0, 8, and 32.</figcaption></figure>

IPS reveals significant insights into optimizing such systems for enhanced performance. We present simulation results, as shown in Fig. 3 and Fig. 2, for different numbers of layers and zones. In our simulation experiments, we chose $k = 3$ for the KNN algorithm after evaluating $k$ values of 1, 3, 5, and 7, finding that $k = 3$ performed well in test samples without overfitting. Here is a more detailed explanation of the findings and their implications for both settings in our system.

## A. IMPACT OF INCREASING SIM LAYERS

In this experiment, we focus on optimizing the number of layers in our SIM-IPS, which is a critical factor in enhancing system accuracy. SIM layers play a pivotal role in directing transmitted power toward specific target points within an indoor environment, thereby improving the system's ability to focus and amplify EM waves in targeted areas. Our primary objective is to determine the optimal number of layers required for our SIM-IPS to achieve the best balance between accuracy and complexity. We conducted simulation experiments across zones 0, 8, and 32, progressively increasing the number of layers from 1 to 9 while closely observing localization errors. This experiment aimed to understand how adding layers affects the accuracy of the system in these distinct zones.

As shown in Fig. 2, adding layers improves the accuracy of the system by enhancing the power focus and signal amplification capabilities in the targeted zones. The most noticeable improvement occurs when the number of layers is increased from 1 to 5. Beyond this, the benefits begin to diminish. Specifically, we observed that after layer 5, there is a consistent but marginal reduction in localization errors, particularly between layers 5 and 7, with a decrease of about 0.1 m in the setting continuous-valued phase shifts and 0.2 m in the setting discrete-valued phase shifts, for zone 32. However, as the number of layers increases beyond 5, the localization errors become flat, and no further improvement is observed. This indicates that while adding layers enhances
<figure><img src="image_11.png" /><figcaption>(a) Localization error vs number of zones for the continuous optimization problem</figcaption></figure>

<figure><img src="image_12.png" /><figcaption>(b) Localization error vs number of zones for the discrete optimization problem (1-bit)</figcaption></figure>

<caption>FIGURE 3. Comparison of localization error for different number of zones with L=5.</caption>

accuracy, the system experiences diminishing returns after a certain point. The complexity introduced by more layers outweighs the benefits as algorithmic efficiency and system manageability degrade. Based on these observations, we optimized our SIM-IPS to use 5 layers. This strikes a balance between accuracy and complexity. In our subsequent

discussions, we will continue using this 5 layer configuration, as additional layers do not yield significant improvements. This experiment highlights the importance of identifying the optimal number of layers, ensuring the system remains efficient and practical for real-world deployment without unnecessary complexity.
## B. IMPACT OF NUMBER OF ZONES

A key factor influencing the accuracy of positioning systems is how indoor spaces are divided into zones. In this experiment, we employed a 5 layer SIM, strategically focusing on optimizing signal concentration within the target zone. This targeted division of indoor space, coupled with the concentration of signal power, forms the foundation of our zone-based strategy, optimizing both continuous-valued and discrete-valued phase shifts. The resulting zone identification configuration significantly reduces localization errors, as shown in Fig. 3, where the first zone is always positioned in the top-left corner.

Our empirical analysis reveals a direct inverse relationship between the number of zones and localization error across discrete and continuous optimization settings, as shown in Figs. 3(a) and 3(b). This correlation is observed as we progressively increased the number of zones from 0 to 32. We observed significant reductions in localization error with increasing zones. In the setting with discrete-valued phase shifts, the localization error decreases by approximately 0.615 m when comparing no zones to 2 zones, and similarly, in the setting with continuous-valued phase shifts, the reduction is about 0.619 m. This trend continues up to 16 zones, with significant error reductions of 1.114 m in the setting with discrete-valued phase shifts and 1.098 m in the setting with continuous-valued phase shifts, emphasizing the benefits of zone division for IPS.

Although significant error reduction was observed between zones 0 and 16, further analysis reveals diminishing improvements as the number of zones increases. Specifically, the reduction in localization error from zones 8 to 16 is moderate, and from 16 to 32, the reduction becomes marginal. For example, in the range from 16 to 32 zones, the error reduction is only 0.131 m in the setting with discrete-valued phase shifts and 0.016 m in the continuous setting for layer 5. This minimal improvement indicates that increasing the number of zones beyond 16 adds significant complexity to the optimization algorithm without delivering substantial gains in accuracy.

Based on these findings, the optimal number of zones for our SIM-IPS can be 8 or 16, as both considerably improve error reduction. However, we have selected 8 zones for our SIM-IPS to manage complexity while maintaining system performance. This configuration balances accuracy and system efficiency, ensuring precise localization without introducing unnecessary complexity, making it suitable for practical indoor positioning applications.

## C. COMPARISON OF ZONE-BASED AND BENCHMARK METHODS

To assess the efficacy of the proposed zone-based approach, we compared its performance against two benchmark methods: all-random configurations and heuristic state selection (HSS) [34]. In this comparison, 40 configurations were selected for each approach. Our proposed algorithm uses

<figure><img src="image_13.png" /><figcaption>FIGURE 4. Comparison of localization errors between the proposed zone-based system and benchmark methods (all-random configurations and HSS).</figcaption></figure>

an 8 zone system, while all-random configurations correspond to a 0 zone system, representing completely random configurations without any zoning. Similarly, for HSS, we generated 100 configurations and then selected the best 40 configurations using the HSS algorithm.

The results, as illustrated in Fig. 4, demonstrate that the proposed zone-based system yields significantly lower localization errors than the benchmark methods. Moreover, as shown in Fig. 3, the performance improvement of the proposed zone-based system increases with the number of zones. We also evaluate the performance of the HSS system by increasing the total configuration set and selecting the best 40 configurations. While this leads to a minor improvement in localization error, the proposed zone-based system still outperforms, underscoring its robustness and superior accuracy. In [34], the HSS technique was designed for RIS, focusing on selecting the best configurations for its operation. In this work, we adapt HSS for SIM-IPS, leveraging the inherent advantages of SIM over RIS.

Unlike RIS, which is limited in its ability to concentrate power, SIM can effectively target a larger area and more points, making it ideal for differentiating specific zones. This capability allows us to narrow the search region to a precise zone, significantly reducing localization errors by minimizing the area that needs to be searched. Conversely, the HSS-based positioning algorithm must search the entire system for the user's position, increasing both positioning errors and the computational complexity of the search process. We achieve superior localization accuracy by utilizing zone-based configurations in SIM-IPS while maintaining computational efficiency.

We employ the KNN algorithm in our zone-based system due to its simplicity, efficiency, and suitability for smaller datasets. Unlike NN and other complex machine learning models that require larger training datasets and higher computational resources, KNN provides a computationally efficient solution tailored to the needs of SIM-IPS.
<figure><img src="image_14.png" /><figcaption>FIGURE 5. Impact of different number of configurations for the setting with discrete-valued phase shifts for zone 8 with L=5.</figcaption></figure>

## D. IDENTIFYING THE OPTIMAL NUMBER OF CONFIGURATIONS

In this experiment, we adjusted our settings to utilize a 5 layer SIM in an 8 zone system, as it represents the optimal number of layers and zones for our SIM-IPS to assess the effects of various configuration setups. To evaluate the impact of the number of configurations on localization error within the 8 zone system, we tested the following specified configurations: 8, 20, 40, 60, 80, and 100.

As previously discussed, our zone-based system selects a total of C configurations, comprising $C_R$ zone identification configurations, which are used for the coarse localization step, and the remaining $C_P$ precise localization configurations applied during the fine localization step. Zone identification configurations depend on the number of zones in our system. Since we adopted an 8 zone system for this experiment, we used at least 8 configurations for coarse localization to identify the user's zone. These minimum of 8 configurations are solely zone identification configurations, with no precise localization configurations included. As the number of configurations increases, more precise localization configurations are introduced, enhancing the accuracy within each identified zone.

The results for the setting with discrete-valued phase shifts are illustrated in Fig. 5. These results highlight the importance of both zone identification and precise localization configurations in enhancing the accuracy of the system. A clear trend is observed: increasing the number of configurations reduces localization error. However, an important question arises regarding the optimal number of configurations. Our detailed analysis of the results reveals that while localization error decreases as the configurations increase from 40 to 100, the improvement becomes marginal beyond a certain point. Additionally, the time complexity for generating datasets during the offline phase rises significantly with more configurations, necessitating data collection at

every grid point within the localization plane for each configuration.

Applying 40 configurations across an 8 zones effectively reduces complexity while maintaining accuracy, as further increases in configurations offer diminishing returns. This approach balances performance with system complexity, ensuring effective user localization. The study underscores the importance of identifying an optimal number of configurations that improve accuracy without adding excessive complexity, enabling efficient SIM-IPS deployments.

## E. TIME COMPLEXITY ANALYSIS OF ZONE-BASED SIM-IPS

Zones in SIM-IPS are essential because they naturally correspond to real-world environments like offices or classrooms, which enhances localization accuracy. Custom-built zones can further optimize user localization by narrowing the search space through a two-step process: coarse localization to identify the general area and fine localization to pinpoint the user within a specific zone. This division into zones not only boosts system accuracy but also improves robustness.

In multi-zone systems, complexity arises from generating specific configurations for each zone. Since fingerprinting involves two phases, increasing the number of zones significantly impacts time complexity, particularly during the offline phase when the fingerprinting database is created. The total time for the offline phase of SIM-IPS can be divided into three main components: the time for generating zone identification configurations $T_{zone}$ for coarse localization, the time for generating precise localization configurations $T_{precise}$ for fine localization, and the additional time $T_{additional}$. The general expression for the total time $T_{total}$ can be represented as in (19):

$$T_{total} = T_{zone} + T_{precise} + T_{additional} \quad (19)$$

Here, $T_{zone} = N_z \times t_z$, where $N_z$ is the number of zones and $t_z$ is the time required to generate configurations for each zone. This component dominates the overall time complexity because it scales directly with the number of zones. As the number of zones increases, $T_{zone}$ grows substantially, becoming the primary contributor to the total time. For instance, in a 2 zone system where each zone has a large number of points, the time per zone $t_z$ is higher. However, the overall time $T_{zone}$ remains manageable due to the limited number of zones. Conversely, in a 32 zone system, where each zone contains fewer points, the time per zone $t'_z$ decreases, but the total time increases as more zones are processed. Fig. 6 illustrates this trade-off, showing how increasing the number of zones from 2 to 32 adds time complexity. Therefore, striking the right balance between the number of zones and time complexity is critical to maintaining high accuracy without causing excessive computational load.

The second component, $T_{precise} = N_p \times t_p$, represents the time needed to generate precise localization configurations. Although $T_{precise}$ increases with the number of
<figure><img src="image_15.png" /><figcaption>FIGURE 6. Time complexity for configuration generation across different zones.</figcaption></figure>

configurations $N_p$, its growth is less significant compared to $T_{zone}$, as the time required for each precise configuration is relatively small. The additional time $T_{additional}$ consists of the time required to generate the offline dataset once both configurations are generated. The total number of configurations directly impacts this offline database-building time. As the number of configurations increases, the system must gather data for each configuration at all points, leading to a significant increase in time and complexity during the offline phase.

In the online phase, the controller cycles through the available configurations, and the user reports data for each one. The complexity of the online phase scales linearly with the number of configurations, regardless of whether they are zone-based or randomly generated. This complexity directly affects the time required by the algorithm to localize the user, emphasizing the need to limit the number of configurations and find a balance between accuracy and computational efficiency. Therefore, balancing the number of configurations with processing time is essential for SIM-IPS to efficiently handle both the offline and online phases, ensuring accurate localization while maintaining computational feasibility.

## V. CONCLUSION

In this paper, we developed a comprehensive zone-based SIM-IPS to enhance localization accuracy in indoor environments. We introduced continuous and discrete optimization algorithms designed to generate zone identification configurations that target designated points, effectively increasing power within those areas. Our simulations demonstrated that the proposed optimization algorithms significantly improve the spatial distribution of transmitted power, directly contributing to enhanced accuracy. Furthermore, our analysis revealed that utilizing 5 layers strikes an optimal balance between accuracy and complexity, allowing the system to focus EM waves toward specific targets effectively. By dividing the space into 8 zones, we substantially

reduced localization errors, indicating the effectiveness of the proposed zone-based strategy. The results also showed that our approach, which employs 40 configurations, enhances localization precision while maintaining manageable computational demands.

While our findings highlight the potential of SIM-IPS for IPS applications, further research is needed to evaluate its performance under more practical propagation conditions. In real-world deployments, factors such as environmental variability, user mobility, and hardware imperfections can impact system performance. Future research could explore adaptive SIM configurations that dynamically adjust to environmental changes, ensuring robust localization in dynamic indoor environments. Additionally, real-world experimental validation of SIM-IPS using hardware implementations would be crucial for confirming its feasibility beyond simulation-based results. Another promising direction is the integration of SIM-IPS with existing IPS technologies, such as sensor fusion techniques, RF-optical hybrid positioning, or deep learning-based localization models, to further improve robustness and accuracy in complex, multi-user indoor environments. Moreover, considering the impact of different propagation models, real-time constraints, and computational efficiency, future work could refine the optimization techniques to enhance system scalability while minimizing latency.

Overall, these findings highlight the potential of SIM-IPS for various practical IPS applications, paving the way for future research that focuses on real-world validation, adaptive wave-based configurations, and integration with hybrid localization systems to further optimize its effectiveness in next-generation indoor positioning solutions.

## REFERENCES

[1] S. Zeb, A. Mahmood, S. A. Hassan, M. J. Piran, M. Gidlund, and M. Guizani, "Industrial digital twins at the nexus of NextG wireless networks and computational intelligence: A survey," *J. Netw. Comput. Appl.*, vol. 200, Apr. 2022, Art. no. 103309.

[2] S. Zeb et al., "Industry 5.0 is coming: A survey on intelligent NextG wireless networks as technological enablers," 2022, arXiv:2205.09084.

[3] Y. Lu and X. Zheng, "6G: A survey on technologies, scenarios, challenges, and the related issues," *J. Ind. Inf. Integr.*, vol. 19, Sep. 2020, Art. no. 100158.

[4] L. Bariah et al., "A prospective look: Key enabling technologies, applications and open research topics in 6G networks," *IEEE Access*, vol. 8, pp. 174792-174820, 2020.

[5] D. C. Nguyen et al., "6G Internet of Things: A comprehensive survey," *IEEE Internet Things J.*, vol. 9, no. 1, pp. 359-383, Jan. 2022.

[6] S. M. Asaad and H. S. Maghdid, "A comprehensive review of indoor/outdoor localization solutions in IoT era: Research challenges and future perspectives," *Comput. Netw.*, vol. 212, Jul. 2022, Art. no. 109041.

[7] Z. Wang et al., "Extremely large-scale MIMO: Fundamentals, challenges, solutions, and future directions," *IEEE Wireless Commun.*, vol. 31, no. 3, pp. 117-124, Jun. 2024.

[8] J. Zhang, E. Björnson, M. Matthaiou, D. W. K. Ng, H. Yang, and D. J. Love, "Prospective multiple antenna technologies for beyond 5G," *IEEE J. Sel. Areas Commun.*, vol. 38, no. 8, pp. 1637-1660, Aug. 2020.

[9] Y. Zeng and X. Xu, "Toward environment-aware 6G communications via channel knowledge map," *IEEE Wireless Commun.*, vol. 28, no. 3, pp. 84-91, Jun. 2021.
[10] P. Zheng, H. Chen, T. Ballal, M. Valkama, H. Wymeersch, and T. Y. Al-Naffouri, "JrCUP: Joint RIS calibration and user positioning for 6G wireless systems," *IEEE Trans. Wireless Commun.*, vol. 23, no. 6, pp. 6683-6698, Jun. 2024.

[11] S. E. Trevlakis et al., "Localization as a key enabler of 6G wireless systems: A comprehensive survey and an outlook," *IEEE Open J. Commun. Soc.*, vol. 4, pp. 2733-2801, 2023.

[12] Y. Xu, Y. Li, and T. Q. S. Quek, "Distributed reconfigurable intelligent surfaces-enabled indoor localization based on wireless fingerprinting," *IEEE Wireless Commun. Lett.*, vol. 13, no. 4, pp. 1039-1043, Apr. 2024.

[13] A. Taneja, S. Rani, J. Breñosa, A. Tolba, and S. Kadry, "An improved WiFi sensing based indoor navigation with reconfigurable intelligent surfaces for 6G enabled IoT network and AI explainable use case," *Future Gener. Comput. Syst.*, vol. 149, pp. 294-303, Dec. 2023.

[14] A. Javed, N. U. Hassan, A. Rafique, M. Zubair, M. Di Renzo, and C. Yuen, "Fingerprinting database development methods for reconfigurable intelligent surface assisted indoor positioning system," *IEEE Access*, vol. 12, pp. 85244-85258, 2024.

[15] Y. Ma, M. Li, Y. Liu, Q. Wu, and Q. Liu, "Optimization for reflection and transmission dual-functional active RIS-assisted systems," *IEEE Trans. Commun.*, vol. 71, no. 9, pp. 5534-5548, Sep. 2023.

[16] H. Zhang, H. Zhang, B. Di, K. Bian, Z. Han, and L. Song, "MetaLocalization: Reconfigurable intelligent surface aided multi-user wireless indoor localization," *IEEE Trans. Wireless Commun.*, vol. 20, no. 12, pp. 7743-7757, Dec. 2021.

[17] A. Papazafeiropoulos, P. Kourtessis, S. Chatzinotas, D. I. Kaklamani, and I. S. Venieris, "Near-field beamforming for stacked intelligent metasurfaces-assisted MIMO networks," *IEEE Wireless Commun. Lett.*, vol. 13, no. 11, pp. 3035-3039, Nov. 2024.

[18] Y. Hu et al., "Joint beamforming and power allocation design for stacked intelligent metasurfaces-aided cell-free massive MIMO systems," *IEEE Trans. Veh. Technol.*, vol. 74, no. 3, pp. 5235-5240, Mar. 2025.

[19] M. Nerini and B. Clerckx, "Physically consistent modeling of stacked intelligent metasurfaces implemented with beyond diagonal RIS," *IEEE Wireless Commun. Lett.*, vol. 28, no. 7, pp. 1693-1697, Jul. 2024.

[20] J. An et al., "Stacked intelligent metasurface-aided MIMO transceiver design," *IEEE Wireless Commun.*, vol. 31, no. 4, pp. 123-131, Aug. 2024.

[21] A. Papazafeiropoulos, P. Kourtessis, S. Chatzinotas, D. I. Kaklamani, and I. S. Venieris, "Performance of double-stacked intelligent metasurface-assisted multiuser massive MIMO communications in the wave domain," *IEEE Trans. Wireless Commun.*, early access, Jan. 31, 2025, doi: 10.1109/TWC.2025.3533913.

[22] Y. Zhang et al., "Smart wireless environment enhanced telecommunications: An industrial review on network stabilization," *IEEE Netw.*, vol. 39, no. 1, pp. 21-29, Jan. 2025.

[23] N. S. Perović and L.-N. Tran, "Mutual information optimization for SIM-based holographic MIMO systems," 2024, arXiv:2403.18307.

[24] J. An, M. Di Renzo, M. Debbah, and C. Yuen, "Stacked intelligent metasurfaces for multiuser beamforming in the wave domain," in *Proc. IEEE Int. Conf. Commun. (ICC)*, 2023, pp. 2834-2839.

[25] N. U. Hassan, J. An, M. Di Renzo, M. Debbah, and C. Yuen, "Efficient beamforming and radiation pattern control using stacked intelligent metasurfaces," *IEEE Open J. Commun. Soc.*, vol. 5, pp. 599-611, 2024.

[26] A. Papazafeiropoulos, J. An, P. Kourtessis, T. Ratnarajah, and S. Chatzinotas, "Achievable rate optimization for stacked intelligent metasurface-assisted holographic MIMO communications," *IEEE Trans. Wireless Commun.*, vol. 23, no. 10, pp. 13173-13186, Oct. 2024.

[27] D. Darsena, F. Verde, I. Iudice, and V. Galdi, "Design of stacked intelligent metasurfaces with reconfigurable amplitude and phase for multiuser downlink beamforming," *IEEE Open J. Commun. Soc.*, vol. 6, pp. 531-550, 2025.

[28] H. Niu, X. Lei, J. An, L. Zhang, and C. Yuen, "On the efficient design of stacked intelligent metasurfaces for secure SISO transmission," *IEEE Trans. Inf. Forensics Security*, vol. 20, pp. 60-70, 2025.

[29] S. Li, F. Zhang, T. Mao, R. Na, Z. Wang, and G. K. Karagiannidis, "Transmit beamforming design for ISAC with stacked intelligent metasurfaces," *IEEE Trans. Veh. Technol.*, early access, Dec. 16, 2024, doi: 10.1109/TVT.2024.3517709.

[30] S. Lin, J. An, L. Gan, M. Debbah, and C. Yuen, "Stacked intelligent metasurface enabled leo satellite communications relying on statistical CSI," *IEEE Wireless Commun. Lett.*, vol. 13, no. 5, pp. 1295-1299, May 2024.

[31] T. Gong et al., "Holographic MIMO communications: Theoretical foundations, enabling technologies, and future directions," *IEEE Commun. Surveys Tuts.*, vol. 26, no. 1, pp. 196-257, 1st Quart., 2024.

[32] X. Yao, J. An, L. Gan, M. Di Renzo, and C. Yuen, "Channel estimation for stacked intelligent metasurface-assisted wireless networks," *IEEE Wireless Commun. Lett.*, vol. 13, no. 5, pp. 1349-1353, May 2024.

[33] G. C. Alexandropoulos, G. Lerosey, M. Debbah, and M. Fink, "Reconfigurable intelligent surfaces and metamaterials: The potential of wave propagation control for 6G wireless communications," 2020, arXiv:2006.11136.

[34] C. L. Nguyen, O. Georgiou, G. Gradoni, and M. Di Renzo, "Wireless fingerprinting localization in smart environments using reconfigurable intelligent surfaces," *IEEE Access*, vol. 9, pp. 135526-135541, 2021.

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

**AISHA JAVED** (Student Member, IEEE) received the B.S. degree in electrical engineering from the University of Engineering and Technology, Lahore, Pakistan, in 2016, the M.S. degree from Electrical Engineering Program, National University of Sciences and Technology, Islamabad, Pakistan, in 2019, and the Ph.D. degree from the Lahore University of Management Sciences, Lahore, in 2024. Her Master's thesis was on "Optimization of Access Points Deployment for Enhancing Indoor Localization in a WiFi

Environment." At the Communication Lab, she worked on indoor localization and reconfigurable intelligent surfaces using MATLAB and various EM simulation tools. Her research interests include wireless communication systems, indoor positioning systems, and computer networks.

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

**NAVEED UL HASSAN** (Senior Member, IEEE) received the B.E. degree from the College of Aeronautical Engineering, Risalpur, Pakistan, in 2002, and the M.S. and Ph.D. degrees from Ecole Superieure d'Electricite, Gif-sur-Yvette, France, in 2006 and 2010, respectively. He is an Associate Professor of Electrical Engineering with the Lahore University of Management Sciences, Pakistan. He has completed several impactful research projects and published over 100 research papers at international journals or conferences. His

research interests include wireless communication, smart energy systems, blockchain technology, and indoor positioning systems. He serves as an Associate Editor for *Nature Computer Science* (Springer), *IET Smart Grid*, and the IEEE OPEN JOURNAL OF THE COMMUNICATIONS SOCIETY.
<figure><img src="image_18.png" /></figure>

**MARCO DI RENZO** (Fellow, IEEE) received the Laurea (cum laude) and Ph.D. degrees in electrical engineering from the University of L'Aquila, Italy, in 2003 and 2007, respectively, and the Habilitation à Diriger des Recherches degree from University Paris-Sud (currently Paris-Saclay University), France, in 2013. He is currently a CNRS Research Director (Professor) and the Head of the Intelligent Physical Communications Group, Laboratory of Signals and Systems, CNRS & CentraleSupélec, Paris-Saclay University, Paris, France, as well as a Chair Professor of Telecommunications Engineering with the Centre for Telecommunications Research—Department of Engineering, King's College London, London, U.K. He was a France-Nokia Chair of Excellence in ICT with the University of Oulu, Finland, a Tan Chin Tuan Exchange Fellow of Engineering with Nanyang Technological University, Singapore, a Fulbright Fellow with The City University of New York, USA, a Nokia Foundation Visiting Professor with Aalto University, Finland, and a Royal Academy of Engineering Distinguished Visiting Fellow with Queen's University Belfast, U.K. His recent research awards include the Michel Monpetit Prize conferred by the French Academy of Sciences, the IEEE Communications Society Heinrich Hertz Award, and the IEEE Communications Society Marconi Prize Paper Award in Wireless Communications. He served as the Editor-in-Chief of IEEE COMMUNICATIONS LETTERS from 2019 to 2023. His current main roles within the IEEE Communications Society include serving as a Voting Member of the Fellow Evaluation Standing Committee, as the Chair of the Publications Misconduct Ad Hoc Committee, and as the Director of Journals. He is a Fellow of the IET, EURASIP, and AAIA; an Academician of AIIA; an Ordinary Member of the European Academy of Sciences and Arts, an Ordinary Member of the Academia Europaea; an Ambassador of the European Association on Antennas and Propagation; and a Highly Cited Researcher.

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

**CHAU YUEN** (Fellow, IEEE) received the B.Eng. and Ph.D. degrees from Nanyang Technological University, Singapore, in 2000 and 2004, respectively. He was a Postdoctoral Fellow with Lucent Technologies Bell Labs, Murray Hill, in 2005. From 2006 to 2010, he was with the Institute for Infocomm Research, Singapore. From 2010 to 2023, he was with the Engineering Product Development Pillar, Singapore University of Technology and Design. Since 2023, he has been with the School of Electrical and Electronic Engineering, Nanyang Technological University. He is currently a Provost's Chair of Wireless Communications, an Assistant Dean of Graduate College, and a Cluster Director for Sustainable Built Environment at ER@IN. He received IEEE Communications Society Leonard G. Abraham Prize (2024), IEEE Communications Society Best Tutorial Paper Award (2024), IEEE Communications Society Fred W. Ellersick Prize (2023), IEEE Marconi Prize Paper Award in Wireless Communications (2021), IEEE APB Outstanding Paper Award (2023), and EURASIP Best Paper Award for JOURNAL ON WIRELESS COMMUNICATIONS AND NETWORKING (2021). He currently serves as an Editor-in-Chief for *Nature Computer Science* (Springer), an Editor for IEEE TRANSACTIONS ON VEHICULAR TECHNOLOGY, IEEE TRANSACTIONS ON NEURAL NETWORKS AND LEARNING SYSTEMS, and IEEE TRANSACTIONS ON NETWORK SCIENCE AND ENGINEERING, where he was awarded as IEEE TNSE Excellent Editor Award 2024 and 2022, and a Top Associate Editor for TVT from 2009 to 2015. He is listed as Top 2% Scientists by Stanford University, and also a Highly Cited Researcher by Clarivate Web of Science from 2022. He has four U.S. patents and published over 500 research papers at international journals. He also served as the Guest Editor for several special issues, including IEEE JOURNAL ON SELECTED AREAS IN COMMUNICATIONS, *IEEE Wireless Communications Magazine*, *IEEE Communications Magazine*, *IEEE Vehicular Technology Magazine*, IEEE TRANSACTIONS ON COGNITIVE COMMUNICATIONS AND NETWORKING, and *Applied Energy* (Elsevier).