# Design of Reconfigurable Intelligent Surfaces by Using S-Parameter Multiport Network Theory - Optimization and Full-Wave Validation

Andrea Abrardo, Alberto Toccafondi, Marco Di Renzo

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

## To cite this version:

Andrea Abrardo, Alberto Toccafondi, Marco Di Renzo. Design of Reconfigurable Intelligent Surfaces by Using S-Parameter Multiport Network Theory - Optimization and Full-Wave Validation. IEEE Transactions on Wireless Communications, 2024, 23 (11), pp.17084-17102. 10.1109/TWC.2024.3450722. hal-05378413

HAL Id: hal-05378413

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

Submitted on 23 Nov 2025

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 Attribution 4.0 International License
# Design of Reconfigurable Intelligent Surfaces
by Using S-Parameter Multiport Network Theory
– Optimization and Full-Wave Validation

Andrea Abrardo, *Senior Member, IEEE*, Alberto Toccafondi, *Senior Member, IEEE*, and
Marco Di Renzo, *Fellow, IEEE*

**Abstract**—Multiport network theory has been proved to be a suitable abstraction model for analyzing and optimizing reconfigurable intelligent surfaces (RISs) in an electromagnetically consistent manner, especially for studying the impact of the electromagnetic mutual coupling among radiating elements that are spaced less than half of the wavelength apart and for considering the interrelation between the amplitude and phase of the reflection coefficients. Both representations in terms of Z-parameter (impedance) and S-parameter (scattering) matrices are widely utilized. In this paper, we embrace multiport network theory for analyzing and optimizing the reradiation properties of RIS-aided channels, and provide four new contributions. (i) First, we offer a thorough comparison between the Z-parameter and S-parameter representations. This comparison allows us to unveil that typical scattering models utilized for RIS-aided channels ignore the structural scattering from an RIS, which is well documented in antenna theory. We show that the structural scattering results in an unwanted specular reflection. (ii) Then, we develop an iterative algorithm for optimizing, in the presence of electromagnetic mutual coupling, the tunable loads of an RIS based on the S-parameters representation. We prove that small perturbations of the step size of the algorithm result in larger variations of the S-parameter matrix compared with the Z-parameter matrix, resulting in a faster convergence rate. (iii) Subsequently, we generalize the proposed algorithm to suppress the specular reflection due to the structural scattering, while maximizing the received power towards the direction of interest, and analyze the effectiveness and tradeoffs of the proposed approach. (iv) Finally, we validate the theoretical findings and algorithms with numerical simulations and a commercial full-wave electromagnetic simulator based on the method of moments.

**Index Terms**—Reconfigurable intelligent surface, multiport network theory, impedance matrix, scattering matrix, electromagnetic mutual coupling, optimization, full-wave simulations.

## I. INTRODUCTION

Reconfigurable intelligent surface (RIS) is an emerging technology for future wireless networks [2], [3]. The distinctive feature of RISs compared with other technologies lies in their nearly passive implementation, since no power amplifiers, RF chains, and digital signal processing units are needed for their operation [4]. Recent system-level simulation studies have confirmed the performance benefits of nearly passive RISs when deployed in large-scale cellular networks, provided that the physical size of the surface is sufficiently large [5].

In wireless communications, either for system optimization [3] or signal processing design [6], the RIS elements are often

modeled as ideal scatterers, which are capable of introducing any phase shift to the impinging electromagnetic waves, without attenuation or unwanted reradiations. These models are not always electromagnetically consistent, since they do not consider several aspects that play an important role in characterizing the operation of a realistic RIS, including the electromagnetic mutual coupling between the scattering elements and the interrelation between the phase and amplitude of the reflection coefficient [7], [8], [9]. Recent results highlight the critical need of using realistic reradiation models [10], which result in a strong interplay between the optimization of an RIS from the surface-level standpoint and the design of the scattering elements from the element-level standpoint [11].

Motivated by these considerations, major efforts are currently devoted to develop electromagnetically consistent models for RISs, which are sufficiently tractable and suitable for performance evaluation, and to the design of efficient optimization and signal processing algorithms [7]. In this context, multiport network theory constitutes a suitable approach for modeling and optimizing RIS-aided channels [12]. The motivation for using multiport network theory lies in its inherent capability of modeling the electromagnetic mutual coupling between closely-spaced radiating elements (unit cells), which is a distinguishing feature of an RIS, since a metasurface is usually characterized by sub-wavelength unit cells spaced at sub-wavelength inter-distances [2]. Also, the coupling between the unit cells is often exploited to realize advanced wave transformations at a high power efficiency [13], [14].

The first multiport model for RIS-aided channels has been introduced in [15], under the assumption of minimum scattering radiating elements, and by considering, for analytical tractability and in agreement with the discrete dipole approximation [16], thin wire dipoles as radiating elements. A similar model based on the coupled dipoles formalism is presented in [17], and has recently been further analyzed and experimentally validated in [18], [19], [20]. The analytical analogies between the multiport network theory model and the coupled dipoles formalism are apparent by comparing [15] with [17] and the series representations in [21] and [18].

As far as the multiport network model is concerned, specifically, the authors of [15] model an RIS as a collection of scattering elements that are loaded with tunable impedances, which determine the reradiation properties of the RIS. An end-to-end communication model for the analysis and optimization of RIS-aided channels is formulated and is expressed in terms of the Z-parameter (impedance) matrix. A closed-form expression for the entries of the impedance matrix is available in [22]. The main feature that distinguishes the communication

Manuscript received Nov. 11, 2023; revised Apr. 20, 2024, and July 29, 2024. Parts of this paper were presented at IEEE EuCAP 2024 [1].

A. Abrardo and A. Toccafondi are with the University of Siena, Siena, Italy. (abrardo@unisi.it, albertot@unisi.it). M. Di Renzo is with Université Paris-Saclay, CNRS, CentraleSupélec, Laboratoire des Signaux et Systémes, 91192 Gif-sur-Yvette, France. (marco.di-renzo@universite-paris-saclay.fr).
model in [15] from conventional scattering models utilized for RIS-aided channels is the non-linearity, as a function of the tunable impedances, of the end-to-end system response (the channel) due to the presence of electromagnetic mutual coupling between closely spaced RIS elements. A similar non-linear response is found in the coupled dipoles model [17].

The model in [15] has been subsequently utilized in several research works, including the following. In [21], the authors develop an iterative algorithm for optimizing the tunable impedances of an RIS-aided single-input single-output (SISO) channel, in order to maximize the end-to-end received power. The approach leverages the Neumann series approximation for the inversion of non-diagonal matrices. The Neumann series approach is utilized and generalized in several subsequent research works. In [23], the authors apply it for optimizing the sum-rate in multiple-input multiple-output (MIMO) interference networks. In [24], the authors generalize the RIS-aided multiport channel model in [15] to account for the presence of natural scatterers, i.e., multipath propagation, and propose, using the Neumann series approximation, an optimization algorithm for application to multi-user multiple-input single-output networks. The authors of [24] unveil that the multipath generated by natural scatterers cannot be modeled as an additive term, due to the non-linearity, as a function of the tunable impedances, of the reradiated electromagnetic field from the RIS. This finding is obtained by using the coupled dipoles model as well [17], which further corroborates the analysis and the similarity between the multiport network theory and coupled dipoles models. More recently, the authors of [25] have proposed an iterative algorithm for optimizing the tunable loads in RIS-aided MIMO channels, which overcomes the Neumann series approximation and leverages the Gram-Schmidt orthogonalization method for optimizing one tunable impedance at a time, which results in a simple and computationally efficient method. In addition, the authors of [26] introduce an optimization algorithm, for application to RIS-aided SISO and MIMO channels, that accounts for the power mismatch at the transmitter and receiver; the authors of [27] apply the multiport network model in [15] by modeling the RIS scattering elements as canonical minimum scattering Chu's antennas; the authors of [28] validate the model in [15] by using a simulator based on the method of moments (MoM) and considering a general unit cell structure; the authors of [29] utilize the model in [15] for analyzing the impact of the electromagnetic mutual coupling for channel estimation; and, finally, the authors of [30] utilize the model in [15] for analyzing the impact of the electromagnetic mutual coupling in terms of energy efficiency optimization. More recently, the multiport network theory model has been experimentally validated in [31], [32] and in [33] to model multipath channels.

The aforementioned research works utilize a multiport network model for RIS-aided channels that is based on the Z-parameter representation. An alternative formulation can be expressed in terms of S-parameter representation (scattering matrix) [34]. This is considered in [35] for application to RISs whose scattering properties can be controlled through individual (independent) tunable loads or through a network of interconnected loads, with the objective of enhancing the

control of the reradiated electromagnetic field in the presence of electromagnetic mutual coupling [36]. RISs whose elements are controlled by a network of connected tunable loads are characterized by an impedance matrix and a scattering matrix that are not diagonal. Therefore, they are referred to as beyond-diagonal RISs [37]. The information-theoretic optimality of non-diagonal scattering matrices for nearly passive RISs is proved in [38]. Recent contributions on beyond diagonal RISs include [39], [40], [41], [42]. These research works are focused on evaluating the tradeoff between the performance and the implementation complexity of beyond-diagonal and diagonal RISs. There exist no research works on the optimization of the scattering matrix $S$ in the presence of electromagnetic mutual coupling, either for diagonal or for beyond-diagonal RISs. In this context, the closest research contribution to the present paper is [42]. Therein, however, the optimization algorithm is developed based on the Z-parameter representation, and, more importantly, the impact of the structural scattering (introduced and discussed next) [43] is neither discussed nor considered in the proposed optimization algorithm. Recently, the authors of [44] have conducted a comparative study of the multiport network model for RISs formulated in terms of Z-parameter and S-parameter representations. The analysis ignores the impact of the electromagnetic mutual coupling. The authors prove the equivalence between the two representations, but they unveil major differences in terms of the physical meaning of the individual matrices that constitute the end-to-end channel, especially in terms of the direct transmitter-receiver links. We have conducted a similar study in the companion conference paper [1], by considering the impact of mutual coupling.

The present paper provides a major extension of the three-page companion conference paper [1], with focus on understanding, optimizing, and validating with a full-wave electromagnetic simulator the S-parameter multiport network model for RISs in the presence of electromagnetic mutual coupling. Specifically, the analysis of the aforementioned state-of-the-art shows that (i) the physical understanding of the multiport network model for RISs is often misunderstood, especially when the scattering parameters $S$ are utilized; (ii) as far as the S-parameter representation is concerned, there exists no algorithm that optimizes the RIS elements in the presence of electromagnetic mutual coupling. Also, it is unclear whether any benefits with respect to currently available optimization algorithms based on the Z-parameter representation exist; and (iii) as far as modeling the structural scattering is concerned, recent works have accounted for it and have performed optimizations considering on it [19], [31]. However, the structural scattering was not explicitly singled out from other background scattering components. In the context of multiport network modeling, there exist no prior works in which the structural scattering is mathematically and explicitly formulated, optimization algorithms are developed to mitigate it, and full-wave simulations are used to validate the accuracy of the models and the effectiveness of the optimization algorithms.

Against this background, the present paper provides the following four main and novel contributions:

* We consider the Z-parameter and S-parameter representations for RIS-aided channels, and offer a thorough comparison
between them. Even though these two representations are known to be equivalent from the mathematical point of view [34], we highlight that the physical interpretation of their constituent terms is different. Specifically, we prove that the impedance matrix between the transmitter and the receiver is always zero if this link is physically blocked by the presence of obstacles. We prove, however, that the corresponding matrix expressed in terms of scattering parameters is not equal to zero, as it accounts for the structural scattering from the RIS [45]. This comparison allows us to show that the Z-parameter representation for RISs inherently accounts for the structural scattering from the RIS when the direct link is ignored, as customary done in the literature. The S-parameter representation, on the other hand, accounts for the structural scattering from the RIS provided that the direct link is correctly modeled. We show that the structural scattering from the RIS results in a specular reflection, which is usually ignored when considering the ideal scattering models utilized in communication theory. Even though the structural scattering is well documented in antenna theory [43], it has not been well recognized and appropriately modeled in wireless communications, especially in the context of multiport network models for RISs. This is remarked and recognized in recently published papers too [20].

• We develop the first iterative algorithm for optimizing the tunable loads of the RIS, based on the S-parameter representation, in the presence of electromagnetic mutual coupling. To this end, we utilize the Neumann series approximation, similar to [21]. We prove that optimizing the scattering matrix instead of the impedance matrix results in a faster convergence rate. The reason is that small perturbations of the step size of the algorithm result in larger variations of the S-parameter matrix compared with the variations of the Z-parameter matrix. Since the step size needs to be small for ensuring convergence, and the considered optimization problem is not convex, the use of a different multiport representation is shown to significantly influence the convergence properties of the optimization algorithm and the final optimized variables that it returns.

• To tackle the specular component that originates from the structural scattering from the RIS, we propose an optimization algorithm that considers the twofold objective of maximizing the scattered signal towards the desired direction of reradiation and suppressing the scattered signal towards the specular direction. To this end, we formulate a weighted optimization problem, whose weight allows us to control the intensity of the desired and unwanted reradiated components of the signal. The performance tradeoffs of the proposed approach are analyzed with the aid of numerical simulations, and the suppression of the undesired specular reflection is validated.

• With the aid of a commercial full-wave simulator that implements the MoM, we validate the correctness of the theoretical findings and the effectiveness of the proposed optimization algorithms for maximizing the received power towards the direction of interest while suppressing the undesired specular reflection. To this end, we use a three-step approach: (i) first, we compute the S-parameters matrix with the full-wave simulator; (ii) then, we input the obtained matrix into the proposed optimization algorithms and compute the optimal tunable loads; and (iii) finally, we simulate the entire

<figure><img src="image_3.png" /><figcaption>Fig. 1: Considered N-port network representation.</figcaption></figure>

RIS structure connected to the obtained loads, and obtain the reradiation pattern. By using this approach, we prove the existence of the specular reflection and we show that the multiport network model provides estimates of the reradiation pattern from the RIS that are consistent with those obtained with the full-wave simulator. Specifically, the full-wave simulations are conducted for two practical implementations for the RIS elements: (i) free-standing loaded thin wire dipoles and (ii) loaded rectangular patch antennas on a grounded substrate.

The paper is organized as follows. In Sec. II, we introduce the system model, and compare the Z-parameter and S-parameter representations. In Sec. III, we introduce the optimization algorithms based on the S-parameter representation. In Sec. IV, we illustrate numerical results and compare them against full-wave simulations. Sec. V concludes the paper.

*Notation.* Scalars are denoted by italic letters, and vectors and matrices are denoted by bold-face lower-case and bold-face upper-case letters. $\odot$ is the Hadamard product. $\mathcal{R}\{\cdot\}$ and $\mathcal{F}\{\cdot\}$ are the real and imaginary parts of complex numbers. $\|\mathbf{X}\|$ is the Frobenius norm of $\mathbf{X}$, i.e., $\|\mathbf{X}\|^2 = \text{trace}(\mathbf{X}\mathbf{X}^H)$ with $\mathbf{X}^H$ being the Hermitian of $\mathbf{X}$. The transpose of $\mathbf{X}$ is denoted by $\mathbf{X}^T$. diag($\mathbf{X}$) is a column vector given by the main diagonal of $\mathbf{X}$. diag(diag($\mathbf{X}$)) is a diagonal matrix whose diagonal is the main diagonal of $\mathbf{X}$. The distribution of a complex Gaussian random vector with mean $\mathbf{x}$ and variance $\sigma^2$ is denoted by $\mathcal{CN}(\mathbf{x}, \sigma^2)$, and $\sim$ stands for “distributed as”. $\mathbf{U}$ is the identity matrix. $j$ is the imaginary unit, $(\cdot)^*$ is the complex conjugate. $|\cdot|$ and $\angle \cdot$ are the modulus and phase of complex numbers, $\odot$ is the Hadamard (element-wise) product.

## II. SYSTEM MODEL

In this section, we introduce the multiport network theory model for RIS-aided channels, and compare the Z-parameter and S-parameter representations. Also, we elaborate on the electromagnetic differences between the proposed models and those typically utilized in communication theory. For ease of description, we consider a free space scenario in the absence of multipath propagation. The generalization to multipath channels is elaborated in Sec. III-D based on [24].

### A. Multiport Network Theory Model

We consider a general RIS-aided communication channel that consists of a transmitter with $N_T$ antennas, a receiver with $N_R$ antennas, and an RIS with $K$ scattering elements. Each antenna at the transmitter and receiver, and each RIS element are modeled as a port of an N-port network with $N = N_T + K + N_R$, as illustrated in Fig. 1. The whole N-port network model is characterized by an $N \times N$ scattering matrix $\mathbf{S}$, which relates
the vector **a** of (forward) traveling waves that are incident on the ports to the vector **b** of scattered (reverse) traveling waves that exit from the ports. In mathematical terms, the N-port network model can be formulated as [34, Eq. (4.40)]

$$ \mathbf{b} = \mathbf{S}\mathbf{a} \qquad (1) $$

Specifically, the vectors **a** and **b** of the incident and scattered electromagnetic waves, respectively, are related to the total voltages **V** and currents **I** at the N ports, as follows [45]:

$$ \mathbf{V} = \sqrt{Z_0} (\mathbf{a} + \mathbf{b}), \quad \mathbf{I} = \frac{\mathbf{a} - \mathbf{b}}{\sqrt{Z_0}} \qquad (2) $$

where $Z_0$ is a reference impedance that is assumed, for simplicity, to be the same for all the N ports. Usually, $Z_0 = 50 \Omega$.

The **S** matrix is typically decomposed into block matrices, in order to identify the ports of the transmitter, RIS, and receiver. Specifically, we obtain the following:

$$ \begin{bmatrix} \mathbf{b}_T \\ \mathbf{b}_S \\ \mathbf{b}_R \end{bmatrix} = \begin{bmatrix} \mathbf{S}_{TT} & \mathbf{S}_{TS} & \mathbf{S}_{TR} \\ \mathbf{S}_{ST} & \mathbf{S}_{SS} & \mathbf{S}_{SR} \\ \mathbf{S}_{RT} & \mathbf{S}_{RS} & \mathbf{S}_{RR} \end{bmatrix} \begin{bmatrix} \mathbf{a}_T \\ \mathbf{a}_S \\ \mathbf{a}_R \end{bmatrix} \qquad (3) $$

where $\mathbf{a}_x$ and $\mathbf{b}_x$ for $x \in \{T, S, R\}$ denote the incident and scattered electromagnetic waves at the ports of the transmitter (T), RIS (S) and receiver (R). Accordingly, $\mathbf{S}_{xy}$ for $x, y \in \{T, S, R\}$ is the scattering sub-matrix that relates the vector $\mathbf{b}_x$ of the scattered waves at the ports of $x$ with the vector $\mathbf{a}_y$ of the incident waves at the ports of $y$.

In a general network configuration, the $N_T$ ports of the transmitter are connected to a vector of voltage generators $\mathbf{V}_g = [V_{g,1}, \dots, V_{g,N_T}]^T$ with internal impedances given by the diagonal matrix $\mathbf{Z}_g$ whose ith diagonal element is $Z_{g,i}$. The source wave vector associated with the voltage generators is denoted by $\mathbf{a}_g = [a_{g,1}, \dots, a_{g,N_T}]^T$. The relation between $\mathbf{a}_g$ and $\mathbf{V}_g$ is given next. The $N_R$ ports of the receiver are connected to load impedances given by the diagonal matrix $\mathbf{Z}_R$ whose ith diagonal element is $Z_{R,i}$. Also, the K ports of the RIS are connected to tunable load impedances given by the matrix $\mathbf{Z}_S$. The matrix of impedances connected to the ports of the RIS, $\mathbf{Z}_S$, is an optimization variable, while the matrices $\mathbf{Z}_g$ and $\mathbf{Z}_R$ at the transmitter and receiver are given. Given the voltages and the loads connected to the ports, the sub-vectors in (3) are related through the following expressions:

$$ \mathbf{a}_T = \mathbf{a}_g + \mathbf{\Gamma}_T \mathbf{b}_T, \quad \mathbf{a}_S = \mathbf{\Gamma}_S \mathbf{b}_S, \quad \mathbf{a}_R = \mathbf{\Gamma}_R \mathbf{b}_R \qquad (4) $$

where $\mathbf{\Gamma}_x$ for $x \in \{T, R\}$ is the diagonal matrix of reflection coefficients at the ports of $x$, whose entries are $\mathbf{\Gamma}_{x,i} = (Z_{x,i} - Z_0)/(Z_{x,i}+Z_0)$. If $x = T, Z_{T,i} = Z_{g,i}$ is the internal impedance of the ith voltage generator. In conventional (diagonal) RISs [15], $\mathbf{Z}_S$ is a diagonal matrix, and it holds $\mathbf{\Gamma}_{S,i} = (Z_{S,i} - Z_0)/(Z_{S,i} + Z_0)$, with $Z_{S,i}$ being the impedance connected to the ith port of the RIS. In non-diagonal, in general fully-connected, RISs [35], $\mathbf{Z}_S$ is a full matrix and the reflection coefficient is given by $\mathbf{\Gamma}_S = (\mathbf{Z}_S + Z_0\mathbf{U})^{-1}(\mathbf{Z}_S - Z_0\mathbf{U})$.

Given the multiport network model in (1), the end-to-end RIS-aided channel is defined as the matrix $\mathbf{H}_{e2e}^{(S)}$ that expresses the vector $\mathbf{b}_R$ of the waves at the ports of the receiver as a function of the vector $\mathbf{a}_g$ of the voltage generators at the ports of the transmitter, i.e., $\mathbf{b}_R = \mathbf{H}_{e2e}^{(S)} \mathbf{a}_g$. The analytical expression of $\mathbf{H}_{e2e}^{(S)}$ is derived in Appendix A. The final result, without any restrictions on the parameters, is the following:

$$ \mathbf{H}_{e2e}^{(S)} = (\mathbf{U} - \tilde{\mathbf{S}}_{RR} \mathbf{\Gamma}_R)^{-1} \tilde{\mathbf{S}}_{RT} (\mathbf{U} - \mathbf{\Gamma}_T \tilde{\mathbf{S}}_{TT})^{-1} \qquad (5) $$

where the following definitions hold:

$$ \tilde{\mathbf{S}}_{xy} = \mathbf{S}_{xy} + \mathbf{S}_{xS}(\mathbf{U} - \mathbf{\Gamma}_S \mathbf{S}_{SS})^{-1}\mathbf{\Gamma}_S \mathbf{S}_{Sy} \qquad (6) $$

$$ \tilde{\mathbf{S}}_{TT} = \tilde{\mathbf{S}}_{TT} + \tilde{\mathbf{S}}_{TR} \mathbf{\Gamma}_R (\mathbf{U} - \tilde{\mathbf{S}}_{RR} \mathbf{\Gamma}_R)^{-1} \tilde{\mathbf{S}}_{RT} \qquad (7) $$

with $x \in \{T, R\}$ and $y \in \{T, R\}$.

In the rest of this paper, we assume $\mathbf{\Gamma}_T = \mathbf{0}$ and $\mathbf{\Gamma}_R = \mathbf{0}$. This ensures that the ports of the transmitter and receiver are matched for zero reflection [34, p. 561]. This configuration is obtained by setting $Z_{g,i} = Z_{R,i} = Z_0$, i.e., the transmitter and receiver are “match terminated”. Under this assumption, which is the usual configuration in practice, $\mathbf{H}_{e2e}^{(S)}$ in (5) simplifies to

$$ \mathbf{H}_{e2e}^{(S)} = \tilde{\mathbf{S}}_{RT} = \mathbf{S}_{RT} + \mathbf{S}_{RS}(\mathbf{U} - \mathbf{\Gamma}_S \mathbf{S}_{SS})^{-1}\mathbf{\Gamma}_S \mathbf{S}_{ST} \qquad (8) $$

The expression in (8) is relatively simple and much simpler than the expression in (5). Both expressions can be applied to multiple-antenna transmitters and receivers, and to single-connected (diagonal) or fully-connected (non-diagonal) RISs.

## B. Comparison with the Z-Parameter Representation

In [15], the authors first introduced a multiport network model for RISs based on the Z-parameter representation, which relates the voltages **V** and the current **I** at the ports of the multiport network illustrated in Fig. 1. Similar to the scattering matrix **S** in (3), the impedance matrix **Z** is usually decomposed into block matrices, in order to identify the ports of the transmitter, RIS, and receiver. Specifically, we have

$$ \begin{bmatrix} \mathbf{V}_T \\ \mathbf{V}_S \\ \mathbf{V}_R \end{bmatrix} = \begin{bmatrix} \mathbf{Z}_{TT} & \mathbf{Z}_{TS} & \mathbf{Z}_{TR} \\ \mathbf{Z}_{ST} & \mathbf{Z}_{SS} & \mathbf{Z}_{SR} \\ \mathbf{Z}_{RT} & \mathbf{Z}_{RS} & \mathbf{Z}_{RR} \end{bmatrix} \begin{bmatrix} \mathbf{I}_T \\ \mathbf{I}_S \\ \mathbf{I}_R \end{bmatrix} \qquad (9) $$

where $\mathbf{I}_x$ and $\mathbf{V}_x$ for $x \in \{T, S, R\}$ denote the currents and voltages at the ports of the transmitter (T), RIS (S), and receiver (R). Accordingly, $\mathbf{Z}_{xy}$ for $x, y \in \{T, S, R\}$ is the impedance sub-matrix that relates the vector $\mathbf{V}_x$ of the voltages at the ports of $x$ with the vector $\mathbf{I}_y$ of the currents at the ports of $y$. Specifically, the voltages and the currents at the ports are related through the following Ohm's laws:

$$ \mathbf{V}_T = \mathbf{V}_g - \mathbf{Z}_g \mathbf{I}_T, \quad \mathbf{V}_S = -\mathbf{Z}_S \mathbf{I}_S, \quad \mathbf{V}_R = -\mathbf{Z}_R \mathbf{I}_R \qquad (10) $$

Thanks to the relationships in (2), it is known that the **S** matrix in (3) and the **Z** matrix in (9) are related to each other through the identities [34, Eq. (4.44) and Eq. (4.45)]

$$ \mathbf{S} = (\mathbf{Z} + Z_0\mathbf{U})^{-1} (\mathbf{Z} - Z_0\mathbf{U}) \qquad (11) $$

$$ \mathbf{Z} = (Z_0\mathbf{U} + \mathbf{S}) (Z_0\mathbf{U} - \mathbf{S})^{-1} \qquad (12) $$

Based on the Z-parameter representation in (9), the end-to-end RIS-aided channel is defined as the matrix $\mathbf{H}_{e2e}^{(Z)}$ that expresses the vector $\mathbf{V}_R$ of the voltages at the ports of the receiver as a function of the vector $\mathbf{V}_g$ of the voltage generators at the ports of the transmitter, i.e., $\mathbf{V}_R = \mathbf{H}_{e2e}^{(Z)} \mathbf{V}_g$. By using the approach in [15] or, equivalently, the analytical derivation briefly summarized in Appendix A, the end-to-end RIS-aided channel matrix can be formulated as follows:

$$ \mathbf{H}_{e2e}^{(Z)} = \mathbf{Z}_R (\mathbf{Z}_R + \tilde{\mathbf{Z}}_{RR})^{-1} \tilde{\mathbf{Z}}_{RT} (\mathbf{Z}_g + \tilde{\mathbf{Z}}_{TT})^{-1} \qquad (13) $$

where the following definitions hold:

$$ \tilde{\mathbf{Z}}_{xy} = \mathbf{Z}_{xy} - \mathbf{Z}_{xS}(\mathbf{Z}_S + \mathbf{Z}_{SS})^{-1}\mathbf{Z}_{Sy} \qquad (14) $$
$$ \tilde{Z}_{RR} = \tilde{Z}_{RR} - \tilde{Z}_{RT}(Z_g + \tilde{Z}_{TT})^{-1}\tilde{Z}_{TR} \quad (15) $$

with $x \in \{T, R\}$ and $y \in \{T, R\}$.

Besides the relationship between the matrices $S$ and $Z$ in (11) and (12), it is important to clarify the relationships between the matrices $H_{e2e}^{(S)}$ and $H_{e2e}^{(Z)}$, and the different physical meaning between the sub-matrices that constitute $S$ and $Z$.

**Relationship between $H_{e2e}^{(S)}$ and $H_{e2e}^{(Z)}$** – From Appendix B, we obtain the following two identities:

$$ V_R = 2\sqrt{Z_0}H_{e2e}^{(Z)}(U - \Gamma_T)^{-1}a_g \quad (16) $$

$$ V_R = \sqrt{Z_0}(U + \Gamma_R)H_{e2e}^{(S)}a_g \quad (17) $$

Therefore, the relation between $H_{e2e}^{(S)}$ and $H_{e2e}^{(Z)}$ is as follows:

$$ H_{e2e}^{(Z)} = \frac{1}{2}(U + \Gamma_R)H_{e2e}^{(S)}(U - \Gamma_T) \quad (18) $$

From Appendix B, the relationship between $a_g$ and $V_g$ is

$$ V_g = 2\sqrt{Z_0}(U - \Gamma_T)^{-1}a_g \quad (19) $$

It is worth mentioning that $H_{e2e}^{(S)}$ and $H_{e2e}^{(Z)}$ are not identical because of their slightly different definitions, i.e., $b_R = H_{e2e}^{(S)}a_g$ and $V_R = H_{e2e}^{(Z)}V_g$. In other words, they relate different input and output vectors, which are in turn related to one another. The definitions of $H_{e2e}^{(S)}$ and $H_{e2e}^{(Z)}$ employed in this paper are those typically utilized in multiport network theory based on the S-parameter and Z-parameter representations, respectively.

**Zero reflection at the ports of the transmitter and receiver** – The obtained expressions for the end-to-end RIS-aided channels $H_{e2e}^{(S)}$ and $H_{e2e}^{(Z)}$, and the relationships between them, have general validity. A sensible case study is considering $\Gamma_T = 0$ and $\Gamma_R = 0$, which ensures that the ports of the transmitter and receiver are matched for zero reflection [34, p. 561]. In this case, the matrix $H_{e2e}^{(S)}$ greatly simplifies, as given in (8). By direct inspection of (18) and (19), in fact, we obtain $H_{e2e}^{(Z)} = (1/2)H_{e2e}^{(S)}$ and $V_g = 2\sqrt{Z_0}a_g$, respectively. Therefore, except for a simple scaling factor, the end-to-end channels, and the source waves and voltages are equivalent.

It is instructive to scrutinize $H_{e2e}^{(Z)}$ in (13) under the assumption of zero reflection at the ports of the transmitter and receiver. By definition, the conditions $\Gamma_T = 0$ and $\Gamma_R = 0$ imply $Z_g = Z_0U$ and $Z_R = Z_0U$. By inserting them into (13), we see, however, that the expression of $H_{e2e}^{(Z)}$ does not simplify significantly. This is in contrast with the major simplification that is obtained for $H_{e2e}^{(S)}$, as apparent in (5) and (8). To obtain an expression for $H_{e2e}^{(Z)}$ that resembles $H_{e2e}^{(S)}$, thus offering the same analytical tractability, it is necessary to apply some approximations, as proposed in [15, Corollary 1] and [23].

Specifically, the following approximations can be applied:

$$ Z_g + \tilde{Z}_{TT} \approx Z_g + Z_{TT}, \quad Z_R + \tilde{Z}_{RR} \approx Z_R + Z_{RR} \quad (20) $$

since the internal impedances $Z_g$, the load impedances $Z_R$, and the self-impedances $\tilde{Z}_{TT}$ and $\tilde{Z}_{RR}$ are the dominant terms in the expressions of $\tilde{Z}_{xy}$ in (14).

With this approximation at hand, $H_{e2e}^{(Z)}$ simplifies as follows:

$$ H_{e2e}^{(Z)} \approx Z_R(Z_R + Z_{RR})^{-1}\tilde{Z}_{RT}(Z_g + Z_{TT})^{-1} \quad (21) $$

with $Z_g = Z_0U$ and $Z_R = Z_0U$ if the ports of the transmitter and receiver are matched for zero reflection. However, (21) holds true for any values of the impedances $Z_g$ and $Z_R$.

Even though (8) and (21) are similar to one another, it needs to be kept in mind that, if $\Gamma_T = 0$ and $\Gamma_R = 0$, (8) is exact whereas (21) is, although tight, an approximation. An example is presented in Appendix B, moving from (11) and (12).

**Direct transmitter-receiver link** – A subtle difference between the S-parameter and Z-parameter representations is the physical meaning of the sub-matrices $S_{xy}$ and $Z_{xy}$. Due to its practical relevance and mathematical tractability, we illustrate this, often overlooked aspect, by considering the setting $\Gamma_T = 0$ and $\Gamma_R = 0$. Thus, we compare $H_{e2e}^{(S)}$ and $H_{e2e}^{(Z)}$ in (8) and (21) by assuming $Z_g = Z_0U$ and $Z_R = Z_0U$. Also, we focus on the setting $Z_{TT} = Z_0U$ and $Z_{RR} = Z_0U$, i.e., there is no mutual coupling at the transmitter and receiver, and their self-impedances are matched to the reference impedance $Z_0$. These assumptions simplify the analytical expressions, without jeopardizing the general findings on the impact of the RIS.

Under the considered assumptions, the relationship between the sub-matrices $S_{xy}$ and $Z_{xy}$ was first reported in [42]. Specifically, the following identities hold [42, Eq. (6)]:

$$ S_{ST} = (Z_{SS} + Z_0U)^{-1}Z_{ST} \quad (22) $$

$$ S_{RT} = \frac{Z_{RT}}{2Z_0} - \frac{Z_{RS}}{2Z_0}(Z_{SS} + Z_0U)^{-1}Z_{ST} \quad (23) $$

$$ S_{SS} = (Z_{SS} + Z_0U)^{-1}(Z_{SS} - Z_0U) \quad (24) $$

$$ S_{RS} = \frac{Z_{RS}}{2Z_0}U - \frac{Z_{RS}}{2Z_0}(Z_{SS} + Z_0U)^{-1}(Z_{SS} - Z_0U) \quad (25) $$

The relationships in (22)-(25) are obtained by applying (11), and by noting that the approximation in (21) implies $Z_{TS} = 0$, $Z_{TR} = 0$, and $Z_{SR} = 0$. Then, the corresponding matrix $Z$ in (11) is lower triangular and it is easier to invert.

The RIS-aided channels in (8) and (13) are equivalent, except for simple scaling factors. The block sub-matrices in $H_{e2e}^{(Z)}$ and $H_{e2e}^{(S)}$ are, however, not one-to-one related, since the identity in (11) cannot be applied to each sub-matrix of $Z$, but it needs to be applied to the whole matrix $Z$. Also, (8) and (13) are both useful, since they offer an easier understanding of different aspects that determine the scattering from an RIS.

A major aspect is the different physical meaning between $S_{RT}$ in (8) and $Z_{RT}$ in (13). The sub-matrices $S_{RT}$ and $Z_{RT}$ are usually associated with the direct link between the transmitter and receiver. It is assumed, stated differently, that $S_{RT} = 0$ and $Z_{RT} = 0$ if the direct link is physically blocked by objects. This is not, however, in agreement with (23). Specifically, we see that the condition $Z_{RT} = 0$ does not imply $S_{RT} = 0$. The reason is that the physical direct link between the transmitter and receiver is given by the impedance matrix $Z_{RT}$. Based on [15], in fact, the entries of the impedance matrices correspond to the electric field that is generated by the transmitter and is observed at the receiver. As a result, only the impedance sub-matrices are related to the physical links between pairs of devices. The scattering sub-matrices, on the other hand, are not one-to-one related to the physical links between pairs of devices. As far as the sub-matrix $S_{RT}$ is concerned, we evince from (23) that $S_{RT} \neq 0$ if $Z_{RT} = 0$, i.e., $S_{RT} \neq 0$ even if the physical direct transmitter-receiver link is blocked by an obstacle. The sub-matrix $S_{RT}$ includes an additional term that originates from the scattering of the RIS. It is worth mentioning that this additional term is present in $Z_{RT}$ in
(13) and (21) as well. However, it is hidden in the second addend of $\tilde{Z}_{RT}$ and, hence, it is not explicitly visible. The electromagnetic meaning of the additional addend in $S_{RT}$ when $Z_{RT} = 0$ is discussed in the following sub-section.

### C. Comparison with Conventional Scattering Models

In this sub-section, we elaborate on the electromagnetic differences between the scattering model for RISs that is typically utilized in communication theory, and those obtained in (8) and (13) by utilizing multiport network theory.

**Scattering model employed in communication theory** – The typical end-to-end RIS-aided channel model utilized in communication theory is usually formulated in terms of scattering matrices, and is expressed as follows [3], [10]:

$$H_{e2e}^{(CT)} = H_{RT} + H_{RS}\Gamma_{S}H_{ST} \quad (26)$$

where $H_{RT}$ represents the direct link between the transmitter and the receiver, and $H_{RS}$ and $H_{ST}$ represent the links between the receiver and the RIS, and the transmitter and the RIS, respectively. In typical communication-theoretic models, the channel matrices $H_{RT}$, $H_{RS}$ and $H_{ST}$ represent the physical channels between the network elements. In other words, these matrices are equal to zero when the corresponding links are physically blocked by objects. In addition, $H_{RT}$ is assumed, by definition, to be independent of the RIS structure and of the RIS configuration. Similar to the multiport network theory model, $\Gamma_{S}$ is the matrix of RIS reflection coefficients, and is still defined as $\Gamma_{S} = (Z_{S} + Z_{0}U)^{-1}(Z_{S} - Z_{0}U)$. Since (26) is formulated in terms of the matrix $\Gamma_{S}$ of RIS reflection coefficients, it is natural to compare $H_{e2e}^{(S)}$ with $H_{e2e}^{(CT)}$ in (8). The following fundamental differences can be identified:

* $H_{e2e}^{(CT)}$ in (26) ignores the mutual coupling among the RIS elements. In fact, $H_{e2e}^{(CT)} = H_{e2e}^{(S)}$ if and only if $S_{SS} = 0$.

* In (26), the self-impedances of the RIS elements are assumed to be equal to the reference impedance $Z_{0}$. This immediately follows from the implicit assumption $S_{SS} = 0$ in (26), as well as from (24), which yields $Z_{SS} = Z_{0}U$.

* $H_{e2e}^{(CT)}$ in (26) ignores the interrelation between the phase and the amplitude transformation that an RIS applies to the incident waves. For illustration, consider a diagonal RIS. Based on $H_{e2e}^{(CT)}$, the condition of lossless scattering is usually imposed by setting $|\Gamma_{S,i}| = 1$, for every RIS element from the equation $\Gamma_{S} = (Z_{S} + Z_{0}U)^{-1}(Z_{S} - Z_{0}U)$, this implies that the load impedances $Z_{S}$ are purely imaginary values. Then, it is argued that an RIS is capable of changing the phase of the incident waves without altering their amplitude. Realistic scattering models, however, show that this is not easy to obtain [10]. Even assuming $|\Gamma_{S,i}| = 1$ for every RIS element, the RIS-aided channel in $H_{e2e}^{(S)}$ leads to a different conclusion. For ease of exposition, consider the simple case study in the absence of mutual coupling, i.e., $S_{SS}$ is a diagonal matrix whose $(i, i)$th entry is $S_{SS,ii}$. Then, the matrix $(U - \Gamma_{S}S_{SS})^{-1}$ in (8) is diagonal and its $(i, i)$th entry is $(1 - \Gamma_{S,i}S_{SS,ii})^{-1}$. Therefore, its absolute value is, in general, less than one even if $|\Gamma_{S,i}| = 1$. Also, this absolute value strongly depends on the phase of $\Gamma_{S,i}$. In other words, the matrix $(U - \Gamma_{S}S_{SS})^{-1}$ determines the interrelation between the amplitude and the phase of the

scattered electromagnetic wave from an RIS. The amplitude-phase dependence is even more intricate in the presence of electromagnetic mutual coupling, and for non-diagonal RISs.

**Structural scattering** – In the previous sub-section, we have analyzed the differences between $S_{RT}$ in (8) and $Z_{RT}$ in (13) from the mathematical standpoint. It is instructive, and important for the rest of this paper, to analyze the difference between $S_{RT}$ and $Z_{RT}$ from the electromagnetic standpoint, and to put the findings in relation with $H_{e2e}^{(CT)}$ in (26).

For ease of exposition, we introduce the following matrix:

$$S_{\text{StSc}} = -\frac{Z_{RS}}{2Z_{0}}(Z_{SS} + Z_{0}U)^{-1}Z_{ST} \quad (27)$$

From (23), we obtain, therefore, the following:

$$S_{RT} = \frac{Z_{RT}}{2Z_{0}} + S_{\text{StSc}} \quad (28)$$

In the previous sub-section, we have clarified that $S_{\text{StSc}}$ depends on the RIS, and that it is not related to the transmitter-receiver physical direct link. In antenna theory, the sub-matrix $S_{\text{StSc}}$ is well-known and includes the structural scattering [43], [46]. The structural scattering is always present in RIS-aided channels, regardless of whether the transmitter-receiver direct link is physically blocked. This fundamental electromagnetic aspect is ignored, by assumption, in conventional channel models used in communication theory, i.e., $H_{e2e}^{(CT)}$ in (26).

To better understand the impact of the structural scattering, it is necessary to analyze the origin and meaning of $S_{\text{StSc}}$ from the electromagnetic standpoint. By direct inspection, we evince that $S_{\text{StSc}}$ is the signal scattered from an RIS when $Z_{S} = Z_{0}U$, i.e., when the tunable loads of the RIS are matched to the reference impedance. This follows because $\Gamma_{S} = (Z_{S} + Z_{0}U)^{-1}(Z_{S} - Z_{0}U) = 0$ when $Z_{S} = Z_{0}U$, which, based on (8), results in $H_{e2e}^{(S)} = S_{RT}$. Based on (23), in addition, we see that $S_{RT} = S_{\text{StSc}}$ when the transmitter-receiver direct link is blocked. This has a major implication: An RIS reradiates an electromagnetic wave even if the reflection coefficient $\Gamma_{S}$ is set equal to zero. This is in stark contrast with the conventional channel model $H_{e2e}^{(CT)}$ in (26), which provides no rediaided signal if $\Gamma_{S} = 0$. In simple terms, $H_{e2e}^{(CT)}$ completely ignores the structural scattering from an RIS. By contrast, $S_{\text{StSc}}$ is duly considered in (8) and (21).

**Unwanted specular reradiation** – The presence of the structural scattering in $S_{\text{StSc}}$ has major implications when optimizing an RIS: The term $S_{\text{StSc}}$ in (27) corresponds to a specular reflection, i.e., a signal reradiated according to Snell's law of reflection. This specular reflection may result in undesired/unwanted interference, which is, however, usually ignored in communication theory because the channel model $H_{e2e}^{(CT)}$ does not account for the structural scattering from the RIS, since, as mentioned, $H_{RT}$ is, by definition, independent of the RIS and the RIS reradiates no signal if $\Gamma_{S} = 0$, by definition of $H_{e2e}^{(CT)}$ in (26). This implies that an RIS needs to be optimized for steering the electromagnetic waves towards the desired direction of reradiation, but also for reducing its structural scattering, so as to ensure a sufficient amount of scattered power towards the intended locations and to reduce the interference towards other locations/users. Next, we will show that the structural scattering in $S_{\text{StSc}}$ can be compensated
by appropriately controlling the tunable loads $Z_S$ of the RIS. To the best of the authors' knowledge, this optimization problem has never been considered in the literature. It is interesting to note, in addition, that the structural scattering from an RIS is, in free space channels, known by design to the transmitter. In fact, the structural scattering in $S_{\text{StSc}}$ always corresponds to a specular reflection, which depends only on the location of the transmitter and the RIS, i.e., it is determined by the angle of incidence in the Fraunhofer far-field region. In fading channels, $S_{\text{StSc}}$ depends on the multipath components as well, as elaborated next in Sec. III-D. However, many channel estimation algorithms for RIS-aided channels are available [6], including algorithms for the multiport network model [29].

### III. RIS OPTIMIZATION

In this section, we provide two contributions: (i) we introduce the first algorithm that optimizes an RIS based on the S-parameter representation, and discuss its advantages with respect to utilizing the Z-parameter representation; and (ii) we introduce the first algorithm that optimizes the scattered signal from an RIS, while considering the structural scattering as an optimization constraint. For simplicity, we analyze a SISO ($N_T = N_R = 1$) system and a diagonal RIS ($\Gamma_S$ is a diagonal matrix). We assume that the ports of the transmitter and receiver are matched for zero reflection ($\Gamma_T = 0, \Gamma_R = 0$). Possible generalizations are postponed to future work.

#### A. S-Parameter Based Optimization

In the considered setting, the optimization problem of interest is equivalent to maximize the received power. Moving from (8), the optimization problem is as follows:

$$ \max_{\Gamma} |S_{RT} + S_{RS}\Gamma(U - S_{SS}\Gamma)^{-1}S_{ST}|^2 \quad (29) $$

$$ \text{s.t.} \quad |\Gamma_k| \le 1 \text{ for } k = 1, \dots, K $$

where $\Gamma = \Gamma_S$ and $\Gamma_i = \Gamma_{s,i}$ to simplify the notation, and the identity $(U - \Gamma_S S_{SS})^{-1} \Gamma_S = \Gamma_S (U - \Gamma_S S_{SS})^{-1}$ is utilized. The constraint $|\Gamma_k| \le 1$ accounts for the fact that the tunable impedances of the RIS introduce some losses. The impact of these losses when solving (29) is elaborated next.

The main challenge in solving (29) is that the objective function depends on the inverse of a matrix, which in turn depends on $\Gamma$. This makes the problem non-convex. To circumvent this issue, we propose an iterative algorithm, which provably allows the objective function to increase at each iteration and to converge to a locally optimal solution.

We denote by $X_k$ the kth tunable reactance of the RIS and by $r_0$ a small parasitic resistance ($r_0 \ll Z_0$). Thus, the kth tunable impedance is $Z_{S,k} = Z_k = jX_k + r_0$. The parasitic resistance $r_0$ makes the absolute value of $|\Gamma_k|$ less than one. Thus, the reflection coefficient at the kth port of the RIS is

$$ \Gamma_k = \frac{jX_k - Z_0 + r_0}{jX_k + Z_0 + r_0} = \frac{j\bar{X}_k - 1 + \varepsilon}{j\bar{X}_k + 1 + \varepsilon} \quad (30) $$

where $\bar{X}_k = X_k/Z_0$ and $\varepsilon = r_0/Z_0 \ll 1$.

Since $\varepsilon \ll 1$, we can apply Taylor's series approximation to $\Gamma_k$ at $\varepsilon = 0$. By doing so, we obtain the following:

$$ \begin{aligned} \Gamma_k &\approx \Gamma_k|_{\varepsilon=0} + \varepsilon \frac{d\Gamma_k}{d\varepsilon}|_{\varepsilon=0} \\ &= e^{j\phi_k} + \frac{2}{(j\bar{X}_k + 1)^2} \varepsilon = e^{j\phi_k} \left(1 - \frac{2}{\bar{X}_k^2 + 1}\varepsilon\right) \stackrel{(a)}{\approx} e^{j\phi_k} \end{aligned} \quad (31) $$

where $\phi_k = \angle \frac{j\bar{X}_k - 1}{j\bar{X}_k + 1}$, and the approximation in (a) follows because $\varepsilon$ is small and $\bar{X}_k^2$ is usually large.

From (31), we evince that the phase of $\Gamma_k$ coincides, to the first-order approximation, with the phase of $\phi_k$, which is the phase of $\Gamma_k$ when $\varepsilon = 0$. In addition, the approximation (a) in (31) implies that the impact of $\varepsilon$ on the absolute value of $\Gamma_k$ can be ignored at the optimization stage. The optimization problem in (29) can, therefore, be reformulated as follows:

$$ \begin{aligned} & \max_{\Gamma} |S_{RT} + S_{RS}\Gamma(U - S_{SS}\Gamma)^{-1}S_{ST}|^2 && (32) \\ \text{s.t.} \quad & |\Gamma_k| = 1 \text{ for } k = 1, \dots, K \end{aligned} $$

with $\Gamma_k = e^{j\phi_k}$. Next, we will see, however, that $r_0$ is not completely ignored in the proposed optimization algorithm.

The proposed algorithm works iteratively, by adjusting $\phi_k$ or, equivalently, $\bar{X}_k = \frac{1}{j} \frac{1+e^{j\phi_k}}{1-e^{j\phi_k}}$ at each iteration. Let us assume to be at the mth iteration and that the phase at this iteration is $\phi_k^{(m)}$, i.e., $\Gamma_k^{(m)} \approx e^{j\phi_k^{(m)}}$. Then, we add a small perturbation, which is denoted by $\delta_k^{(m)}$, to $\phi_k^{(m)}$ with $|\delta_k^{(m)}| \ll 1$, so that the solution at the $(m+1)$th iteration is $\phi_k^{(m+1)} = \phi_k^{(m)} + \delta_k^{(m)}$. Thus, the reflection coefficient at the $(m+1)$th iteration is

$$ \Gamma_k^{(m+1)} = e^{j(\phi_k^{(m)} + \delta_k^{(m)})} \stackrel{(a)}{\approx} \Gamma_k^{(m)} + j e^{j\phi_k^{(m)}} \delta_k^{(m)} \quad (33) $$

where (a) follows by applying Taylor's series approximation, since $|\delta_k^{(m)}| \ll 1$, i.e., $e^{j\delta_k^{(m)}} \approx 1 + j\delta_k^{(m)}$.

The main difficulty when solving the optimization problem in (32) is the non-linear dependence of the objective function with the reflection coefficient $\Gamma$, i.e., the term $\Gamma(U - S_{SS}\Gamma)^{-1}$. This is in stark contrast with the conventional RIS-aided channel model in (26), making the considered optimization problem even harder to solve. To tackle the optimization problem in (32), we first use the following identity:

$$ \Gamma(U - S_{SS}\Gamma)^{-1} = (\Gamma^{-1} - S_{SS})^{-1} \quad (34) $$

By using (33), we then obtain

$$ (\Gamma_k^{(m+1)})^{-1} \stackrel{(a)}{\approx} (\Gamma_k^{(m)})^{-1} - j (\Gamma_k^{(m)})^{-2} e^{j\phi_k^{(m)}} \delta_k^{(m)} \quad (35) $$

where (a) follows from Taylor's series approximation, since $|\delta_k^{(m)}| \ll 1$, i.e., $(a_0 + b_0\delta_k^{(m)})^{-1} \approx a_0^{-1} - b_0a_0^{-2}\delta_k^{(m)}$.

Recalling that $\Gamma^{(m)}$ is a $K \times K$ diagonal matrix, and introducing the $K \times K$ diagonal matrices $\phi^{(m)}$ and $\delta^{(m)}$, whose diagonal elements are $\phi_k^{(m)}$ and $\delta_k^{(m)}$, respectively, (34) simplifies to

$$ \begin{aligned} & \Gamma^{(m+1)} (U - S_{SS} \Gamma^{(m+1)})^{-1} \\ & \approx \left( (\Gamma^{(m)})^{-1} - j (\Gamma^{(m)})^{-2} e^{j\phi^{(m)}} \delta^{(m)} - S_{SS} \right)^{-1} \end{aligned} \quad (36) $$

Introducing the notation $Q^{(m)} = (\Gamma^{(m)})^{-1} - S_{SS}$ and $P^{(m)} = j(Q^{(m)})^{-1} (\Gamma^{(m)})^{-2} e^{j\phi^{(m)}}$, (36) can be rewritten as follows:

$$ \Gamma^{(m+1)} (U - S_{SS} \Gamma^{(m+1)})^{-1} \approx (U - P^{(m)} \delta^{(m)})^{-1} (Q^{(m)})^{-1} $$
Therefore, the optimization variable at the mth iterations is the diagonal matrix $\delta^{(m)}$, which is inside the inversion of a matrix. The resulting optimization problem is still not convex in $\delta^{(m)}$. To tackle it, we apply, similar to [21], [23], Neumann's series approximation, which yields the following:

$$ \Gamma^{(m+1)} (\mathbf{U} - \mathbf{S}_{\mathrm{SS}} \Gamma^{(m+1)})^{-1} \approx (\mathbf{Q}^{(m)})^{-1} + \mathbf{P}^{(m)} \delta^{(m)} (\mathbf{Q}^{(m)})^{-1} \quad (37) $$

provided that the following condition is fulfilled:

$$ \|\delta^{(m)}\mathbf{P}^{(m)}\| \ll 1 \quad (38) $$

A simple, but sub-optimal, approach for ensuring that the condition is satisfied consists of applying the same small increment to all the elements of $\delta^{(m)}$. Denoting by $\delta_0^{(m)}$ the value of the small increment at the mth iteration, the condition $\|\delta^{(m)}\mathbf{P}^{(m)}\| = \bar{\delta}_0 \ll 1$ is equivalent to $|\delta_k^{(m)}| = |\delta_0^{(m)}| = \bar{\delta}_0\|\mathbf{P}^{(m)}\|^{-1}$ for $k = 1, 2, \dots, K$ and $\bar{\delta}_0 \ll 1$. This approach is referred to as S-UNI. The possibility of applying different increment values to the elements of $\delta^{(m)}$ is discussed next.

By utilizing (37), the considered optimization problem at the $(m+1)$th iteration can be formulated as follows:

$$ \max_{\delta^{(m)}} \left| a^{(m)} + (\mathbf{b}_1^{(m)})^T \delta^{(m)} \mathbf{b}_2^{(m)} \right|^2 \quad (39) $$

$$ \text{s.t.} \quad |\delta_k^{(m)}| \le \bar{\delta}_0 \|\mathbf{P}^{(m)}\|^{-1}, \quad k = 1, 2, \dots, K $$

where $\bar{\delta}_0 \ll 1$, $a^{(m)} = S_{RT} + S_{RS}(\mathbf{Q}^{(m)})^{-1}\mathbf{S}_{ST}$, and $(\mathbf{b}_1^{(m)})^T = \mathbf{S}_{RS}\mathbf{P}^{(m)}$ and $\mathbf{b}_2^{(m)} = (\mathbf{Q}^{(m)})^{-1}\mathbf{S}_{ST}$ are $K \times 1$ column vectors.

Since $\delta^{(m)}$ is a diagonal matrix, $(\mathbf{b}_1^{(m)})^T \delta^{(m)} \mathbf{b}_2^{(m)} = \sum_{k=1}^K b_{1,k}^{(m)} \delta_k^{(m)} b_{2,k}^{(m)}$, where $b_{1,k}^{(m)}$ and $b_{2,k}^{(m)}$ are the elements of $\mathbf{b}_1^{(m)}$ and $\mathbf{b}_2^{(m)}$, respectively. For ease of writing, we use the notation $c_k^{(m)} = b_{1,k}^{(m)} b_{2,k}^{(m)}$. By virtue of the constraint $\bar{\delta}_0 \ll 1$, the objective function in (39) can be approximated as follows:

$$ \begin{aligned} & \left| a^{(m)} + (\mathbf{b}_1^{(m)})^T \delta^{(m)} \mathbf{b}_2^{(m)} \right|^2 && (40) \\ &= \left| a^{(m)} \right|^2 + 2 \mathfrak{R} \left\{ a^{(m)} \left( (\mathbf{b}_1^{(m)})^T \delta^{(m)} \mathbf{b}_2^{(m)} \right)^* \right\} \\ & \quad + \left| (\mathbf{b}_1^{(m)})^T \delta^{(m)} \mathbf{b}_2^{(m)} \right|^2 \\ & \approx \left| a^{(m)} \right|^2 + 2 \mathfrak{R} \left\{ a^{(m)} \left( (\mathbf{b}_1^{(m)})^T \delta^{(m)} \mathbf{b}_2^{(m)} \right)^* \right\} \\ & \approx \left| a^{(m)} \right|^2 + 2 \sum_{k=1}^K \mathfrak{R} \left\{ a^{(m)} (c_k^{(m)})^* \right\} \delta_k^{(m)} \end{aligned} $$

where (a) follows by ignoring the quadratic term in $\delta^{(m)}$ thanks to the constraint $\bar{\delta}_0 \ll 1$, and (b) follows because $c_k^{(m)} = b_{1,k}^{(m)} b_{2,k}^{(m)}$ and $\delta_k^{(m)}$ are real-valued variables.

By inserting (40) into (39), we see that the optimization problem can be separated in the variables $\delta_k^{(m)}$. In mathematical terms, $\delta_k^{(m)}$ is the solution of the following problem:

$$ \max_{\delta_k^{(m)}} \left\{ \left| a^{(m)} \right|^2 + 2 \mathfrak{R} \left\{ a^{(m)} (c_k^{(m)})^* \right\} \delta_k^{(m)} \right\} \quad (41) $$

$$ \text{s.t.} \quad |\delta_k^{(m)}| \le \bar{\delta}_0^{(m)} $$

### Algorithm 1: S-UNI Optimization Algorithm

**Input:** $S_{RT}$, $S_{RS}$, $S_{ST}$, $Z_0 = 50 \, \Omega$, $r_0 > 0$;

**Initialize:**

Generate the initial values of $X_k$ and evaluate $\bar{X}_k = X_k/Z_0$;

$\Gamma_k \leftarrow \frac{j\bar{X}_k - Z_0 + r_0}{j\bar{X}_k + Z_0 + r_0}$, for $k = 1, \dots, K$;

Set an arbitrarily small value $\eta > 0$, $m \leftarrow 1$, $\bar{\delta}_0 \ll 1$;

$\Gamma^{(m)} \leftarrow 0$, $\Gamma_k^{(m)} \leftarrow \Gamma_k$;

$\phi_k = \angle \frac{j\bar{X}_k - 1}{j\bar{X}_k + 1}, \phi^{(m)} = 0, \phi_k^{(m)} \leftarrow \phi_k$;

**while** $\rho > \eta$ **do**

$$ \begin{array}{l} \mathbf{Q}^{(m)} \leftarrow (\Gamma^{(m)})^{-1} - \mathbf{S}_{\mathrm{SS}}; \\ \mathbf{P}^{(m)} \leftarrow -j (\mathbf{Q}^{(m)})^{-1} (\Gamma^{(m)})^{-2} e^{j\phi^{(m)}}; \\ \delta_0^{(m)} \leftarrow \bar{\delta}_0 / \|\mathbf{P}^{(m)}\|; \\ a^{(m)} \leftarrow S_{RT} + S_{RS} (\mathbf{Q}^{(m)})^{-1} \mathbf{S}_{ST}; \\ (\mathbf{b}_1^{(m)})^T = \mathbf{S}_{RS} \mathbf{P}^{(m)}, \mathbf{b}_2^{(m)} = (\mathbf{Q}^{(m)})^{-1} \mathbf{S}_{ST}; \\ \quad \text{for } k = 1, \dots, K \text{ do} \\ \quad \quad (*) \quad c_k^{(m)} \leftarrow b_{1,k}^{(m)} b_{2,k}^{(m)}; \\ \quad \quad (**) \quad Compute $\delta_k^{(m)}$ according to (42); \\ \quad \quad (***) \quad $\phi_k^{(m+1)} \leftarrow \phi_k^{(m)} + \delta_k^{(m)}$; \\ \quad \quad $X_k^{(m)} = \frac{Z_0}{j} \frac{1+e^{j\phi_k^{(m+1)}}}{1+e^{j\phi_k^{(m)}}}$; \\ \quad \quad $\Gamma_k \leftarrow \frac{jX_k^{(m)}-Z_0+r_0}{jX_k^{(m)}+Z_0+r_0}$; \\ $\Gamma_k^{(m+1)} \leftarrow \Gamma_k$; \\ $\rho \leftarrow \|\Gamma^{(m+1)} - \Gamma^{(m)}\|$; \\ $m \leftarrow m+1$. \end{array} $$

where $\bar{\delta}_0^{(m)} = \bar{\delta}_0 \|\mathbf{P}^{(m)}\|^{-1}$ with $\bar{\delta}_0 \ll 1$.

The optimal solution of the optimization problem in (41) is always at the edge of the interval $[-\bar{\delta}_0^{(m)}, \bar{\delta}_0^{(m)}]$, as follows:

$$ \delta_k^{(m)} = \begin{cases} \bar{\delta}_0^{(m)} & \text{if } \mathfrak{R}\{a^{(m)}(c_k^{(m)})^*\} \ge 0 \\ -\bar{\delta}_0^{(m)} & \text{if } \mathfrak{R}\{a^{(m)}(c_k^{(m)})^*\} < 0 \end{cases} \quad (42) $$

Once the small phase increments $\delta_k^{(m)}$ are obtained for $k = 1, 2, \dots, K$, the phase shift at the $(m+1)$th iteration is computed as $\phi_k^{(m+1)} = \phi_k^{(m)} + \delta_k^{(m)}$. Then, the reactance and reflection coefficient are given by

$$ X_k^{(m)} = \frac{Z_0}{j} \frac{1 + e^{j \phi_k^{(m+1)}}}{1 - e^{j \phi_k^{(m+1)}}}, \quad \Gamma_k^{(m)} = \frac{j X_k^{(m)} - Z_0 + r_0}{j X_k^{(m)} + Z_0 + r_0} \quad (43) $$

respectively. The process is repeated until convergence. The complete algorithm for the proposed S-UNI approach is summarized in Algorithm 1. It is worth mentioning that the parasitic resistance $r_0$ is accounted for when updating $\Gamma_k^{(m)}$ at each iteration of Algorithm 1. The parasitic resistance $r_0$ is ignored only to compute the small phase increment, as a first-order approximation, according to (31).

1) **Sensitivity Analysis:** The proposed approach for optimizing the tunable impedances of an RIS-aided channel is based on the S-parameter representation of the multiport network model for RISs. The available optimization frameworks for multiport network models for RISs are, on the other hand, based on the Z-parameter representation [21], [23], [24], [25]. Here, we intend to motivate, from the analytical standpoint,
the advantages of using the S-parameter representation, in lieu of the Z-parameter representation, for RIS-aided channels.

For both representations, the algorithms available in the literature, i.e., [21], [23], [24], and the proposed Algorithm 1 are iterative, and they update the optimization variables through small increment values that are applied to a linearized version of the objective function, which is obtained by in-voking Neumann's series approximation. The key difference between the Z-parameter and the S-parameter representations is that the tunable load impedances are optimized in the former case, while the reflection coefficients are optimized in the latter case. Even though the tunable impedances and the reflection coefficients at the ports of the RIS are related to one another as given in (30), a small increment applied to an impedance and to a reflection coefficient, which are related but different optimization variables, results in a substantially different impact on the speed of convergence of the algorithms.

To elaborate, let us consider (30) by assuming for simplicity, but no loss of generality, $r_0 = 0$. We obtain

$$X_k = \frac{Z_0}{j} \frac{1 + \Gamma_k}{1 - \Gamma_k} \stackrel{(a)}{=} \frac{Z_0}{j} \frac{1 + e^{j\phi_k}}{1 - e^{j\phi_k}} \quad (44)$$

where (a) follows from $\Gamma_k = e^{j\phi_k}$. Therefore, the derivative of $X_k$ with respect to $\phi_k$ can be formulated as

$$\frac{dX_k}{d\phi_k} = 2Z_0 \frac{e^{j\phi_k}}{(1 - e^{j\phi_k})^2} \stackrel{(a)}{=} 2Z_0 \frac{\Gamma_k}{(1 - \Gamma_k)^2} \stackrel{(b)}{=} -\frac{X_k^2 + Z_0^2}{2Z_0} \quad (45)$$

where (a) follows from $\Gamma_k = e^{j\phi_k}$ and (b) follows from $\Gamma_k = (jX_k + Z_0)^{-1} (jX_k - Z_0)$.

We evince, therefore, the following: (i) if we optimize $X_k^{(m)}$ at the mth iteration, a small increment $dX_k$ results in a small update of the tunable reactance at the next iteration, i.e., $X_k^{(m+1)} \leftarrow X_k^{(m)} + dX_k$; but (ii) if we optimize $\phi_k^{(m)}$ at the mth iteration, a small increment $d\phi_k$ results in a large update of the tunable reactance at the next iteration, i.e.,

$$X_k^{(m+1)} \leftarrow X_k^{(m)} + (2Z_0)^{-1} \left( (X_k^{(m)})^2 + Z_0^2 \right) d\phi_k \quad (46)$$

since $X_k^{(m)}$ and $Z_0$ are large values, even though $d\phi_k$ is a small increment. Optimizing an RIS based on the S-parameter representation is hence expected to provide a faster convergence rate. This is illustrated with numerical results in Sec. IV.

### 2) Step-Size Optimization
The proposed S-UNI algorithm is based on the assumption that the optimization variables at the mth iteration, $\delta^{(m)}$, are updated by applying the same small increment to all of them. In this section, we propose an approach that overcomes this assumption. To this end, we first establish a connection between the maximization of the signal-to-noise-ratio (SNR) in an RIS-aided channel and the minimization of the mean square error (MSE), i.e., with a minimum mean square error (MMSE) equalizer applied to an RIS-aided channel. The departing point is (39) by removing the assumption of equal increments. Specifically, considering the general constraint in (38) for applying Neumann's series approximation, the optimization problem can be written as

$$\max_{\delta_d^{(m)}} \left| a^{(m)} + (\mathbf{c}^{(m)})^T \delta_d^{(m)} \right|^2 \quad (47)$$

$$\text{s.t.} \quad \text{trace} \left( (\delta_d^{(m)})^T \mathbf{\Theta}_d^{(m)} \delta_d^{(m)} \right) \le \bar{\delta}_0^2, \quad k = 1, 2, \dots, K$$

$$\text{where } \delta_d^{(m)} = \text{diag}(\delta_d^{(m)}), \mathbf{\Theta}_d^{(m)} = \mathbf{P}^{(m)}(\mathbf{P}^{(m)})^H, \mathbf{\Theta}_d^{(m)} = \text{diag}(\text{diag}(\mathbf{\Theta}_d^{(m)})), \mathbf{c}^{(m)} = (\mathbf{b}_1^{(m)})^T \odot \mathbf{b}_2^{(m)}, \text{ and } \bar{\delta}_0^2 \ll 1.$$

Similar to the S-UNI case, we are interested in solving the sub-problem at the mth iteration. For ease of writing, we simplify the notation by dropping the iteration index $m$, and by introducing the shorthands $a = a^{(m)}$, $\mathbf{c} = \mathbf{c}^{(m)}$, $\mathbf{x} = \delta_d^{(m)}$, $\mathbf{D} = \mathbf{\Theta}_d^{(m)}$, and $\epsilon = \bar{\delta}_0$. Therefore, we obtain the following:

$$\max_{\mathbf{x}} f(\mathbf{x}) = |a + \mathbf{c}^T \mathbf{x}|^2 \quad (48)$$

$$\text{s.t.} \quad \mathbf{x}^T \mathbf{D} \mathbf{x} \le \epsilon^2, \quad k = 1, 2, \dots, K$$

The problem in (48) is not convex because it aims to maximize a convex objective function. We tackle it as follows. In (48), the signal $h = a + \mathbf{c}^T \mathbf{x}$ is the RIS-aided channel. Consider a transmitted symbol $s \sim \text{CN}(0, \sigma_s^2)$, with $\sigma_s^2$ denoting the transmit power. The received signal is

$$y = hs + n = (a + \mathbf{c}^T \mathbf{x})s + n \quad (49)$$

where $n \sim \text{CN}(0, \sigma_n^2)$ is the additive white Gaussian noise at the receiver, with $\sigma_n^2$ denoting the noise power.

The maximization of $f(\mathbf{x})$ in (48) is hence equivalent to the maximization of the SNR corresponding to (49), as follows:

$$\text{SNR}(\mathbf{x}) = (\sigma_s^2 / \sigma_n^2) |a + \mathbf{c}^T \mathbf{x}|^2 = (\sigma_s^2 / \sigma_n^2) f(\mathbf{x}) \quad (50)$$

Given the received signal in (49), in addition, the corresponding MMSE equalizer is the complex-valued coefficient $w$ that minimizes the following MSE:

$$\begin{aligned} \text{MSE}(w; \mathbf{x}) &= \mathbb{E}\{|wy - s|^2\} \\ &= \sigma_s^2 + |w|^2 (\sigma_s^2|h|^2 + \sigma_n^2) - 2\sigma_s^2 \mathfrak{R}\{wh^*\} \end{aligned} \quad (51)$$

where the expectation is computed with respect to the distributions of the transmitted symbol $s$ and receiver noise $n$.

In an RIS-aided channel, the MSE in (51) needs to be jointly minimized as a function of $w$ and $\mathbf{x}$. For the time being, let us assume that $\mathbf{x}$ is kept fixed. Therefore, the minimization of the MSE in (51) as a function of $w$ leads to

$$w_{\text{opt}}(\mathbf{x}) = \frac{\sigma_s^2 h^*}{\sigma_s^2|h|^2 + \sigma_n^2} = \frac{\sigma_s^2 (a + \mathbf{c}^T \mathbf{x})^*}{\sigma_s^2|a + \mathbf{c}^T \mathbf{x}|^2 + \sigma_n^2} \quad (52)$$

Thus, the corresponding MMSE assuming $\mathbf{x}$ fixed is

$$\text{MSE}(\mathbf{x}) = \text{MSE}(w_{\text{opt}}(\mathbf{x}); \mathbf{x}) \quad (53)$$

$$\begin{aligned} &\stackrel{(a)}{=} \frac{\sigma_s^2 \sigma_n^2}{\sigma_s^2 |a + \mathbf{c}^T \mathbf{x}|^2 + \sigma_n^2} \stackrel{(b)}{=} \frac{\sigma_s^2}{\text{SNR}(\mathbf{x}) + 1} \\ &\stackrel{(c)}{=} \sigma_s^2 (1 - w_{\text{opt}}(\mathbf{x}) (a + \mathbf{c}^T \mathbf{x})) \end{aligned}$$

where (a) follows from (52), (b) from (50), and (c) from (52) expresses the MSE as a function of $w_{\text{opt}}(\mathbf{x})$.

From the equality (b) in (53), we evince that maximizing the SNR (given $\mathbf{x}$) is equivalent to minimizing the MSE (given $\mathbf{x}$). Therefore, the proposed approach to tackle the
maximization problem in (48) consists of solving the following optimization problem, which aims at minimizing the MSE:

$$ \min_{w, \mathbf{x}} \sigma_s^2 + |w|^2 (\sigma_s^2|h(\mathbf{x})|^2 + \sigma_n^2) - 2\sigma_s^2 \Re \{wh(\mathbf{x})^*\} \quad (54) $$

$$ \text{s.t.} \quad \sum_{k=1}^{K} x_k^2 D_k \le \epsilon^2, \quad k = 1, 2, \dots, K $$

where $D_k$ if the $k$th element on the main diagonal of $\mathbf{D}$.

The problem in (54) is not convex. To tackle it, we propose an alternating optimization method applied to the two optimization variables $w$ and $\mathbf{x}$. The approach works as follows:

(1) We start from an initial solution of $\mathbf{x}$, e.g., by choosing a random but feasible initialization point. This solution at the generic $l$th iteration is denoted by $\mathbf{x}^{(l)}$.

(2) Then, we solve the problem in (54) by considering $\mathbf{x} = \mathbf{x}^{(l)}$ as given. The solution is $w_{\text{opt}}(\mathbf{x}^{(l)})$ in (52).

(3) Subsequently, we compute MSE $(w_{\text{opt}}(\mathbf{x}^{(l)}); \mathbf{x})$ in (51). At the $(l+1)$th iteration, therefore, $\mathbf{x}^{(l+1)}$ is the solution of the following optimization problem:

$$ \min_{\mathbf{x}} \sigma_s^2 + |w_{\text{opt}}(\mathbf{x}^{(l)})|^2 (\sigma_s^2|a + \mathbf{c}^T\mathbf{x}|^2 + \sigma_n^2) - 2\sigma_s^2 \Re \{w_{\text{opt}}(\mathbf{x}^{(l)}) (a + \mathbf{c}^T\mathbf{x})^*\} \quad (55) $$

$$ \text{s.t.} \quad \sum_{k=1}^{K} x_k^2 D_k \le \epsilon^2, \quad k = 1, 2, \dots, K $$

In (55), $w_{\text{opt}}(\mathbf{x}^{(l)})$ is fixed and is not an optimization variable. Only $\mathbf{x}$ is an optimization variable. Thus, the objective function in (55) is convex in $\mathbf{x}$, the feasible set is convex, and the problem in (55) is convex. For example, its unique solution can be obtained by utilizing the method of Lagrangian multipliers. Specifically, by computing the gradient of the Lagrangian function corresponding to (55) and setting it equal to zero, we obtain the following:

$$ \mathbf{x}^{(l+1)} = (\mathbf{M}^{(l)} + \mu \mathbf{D}^{(l)})^{-1} \mathbf{m}^{(l)} \quad (56) $$

where the matrix $\mathbf{M}^{(l)}$ and the vector $\mathbf{m}^{(l)}$ are given by

$$ \mathbf{M}^{(l)} = \sigma_S^2 |w_{\text{opt}}(\mathbf{x}^{(l)})|^2 \Re \{\mathbf{c}^* \mathbf{c}^T\} \quad (57) $$

$$ \mathbf{m}^{(l)} = \sigma_S^2 |w_{\text{opt}}(\mathbf{x}^{(l)})|^2 \Re \{a^* \mathbf{c}^T\} - \sigma_S^2 \Re \{w_{\text{opt}}(\mathbf{x}^{(l)}) \mathbf{c}^H\} $$

and $\mu$ is a Lagrange multiplier that is computed ensuring that the constraint in (55) is fulfilled with equality.

The algorithm just introduced is referred to as S-OPT. The difference with S-UNI in Algorithm 1 is that the RIS elements are optimized jointly instead of being optimized one by one. To this end, the line denoted by $(*)$ is deleted, and the line denoted by $(**)$ is moved out of the loop that optimizes the RIS elements and is replaced by the proposed alternating optimization algorithm, which iteratively computes $w_{\text{opt}}(\mathbf{x}^{(l)})$ in (51) and $\mathbf{x}^{(l+1)}$ in (52) until convergence.

## B. Structural Scattering Aware Optimization

In Sec. II-C, we have unveiled that a key difference between the conventional and the multiport network theory models for RIS-aided channels in (26) and (8), respectively, is the structural scattering in (27). Therefore, conventional optimization algorithms ignore the specular reflection due to (27) by design. This is the case of the two algorithms S-UNI and S-OPT

that we have introduced in this paper as well. To the best of the authors' knowledge, there exist no algorithm for RIS-aided communications that optimizes the signal scattered by the RIS while minimizing the structural scattering, which is an undesired effect. In this sub-section, we propose the first approach to this end, which generalizes the S-OPT algorithm.

Using the same notation as in (48), we formulate the following optimization problem to tackle the structural scattering:

$$ \max_{\mathbf{x}} f_{\omega}(\mathbf{x}) = |a + \mathbf{c}^T\mathbf{x}|^2 - \omega |a_{\text{StSc}} + \mathbf{c}_{\text{StSc}}^T\mathbf{x}|^2 \quad (58) $$

$$ \text{s.t.} \quad \mathbf{x}^T \mathbf{D} \mathbf{x} \le \epsilon^2, \quad k = 1, 2, \dots, K $$

where the term $\omega|a_{\text{StSc}} + \mathbf{c}_{\text{StSc}}^T\mathbf{x}|^2$ accounts for the structural scattering. More specifically, $a_{\text{StSc}}$ and $\mathbf{c}_{\text{StSc}}$ are equivalent to $a$ and $\mathbf{c}$, respectively, but they represent a signal that is not evaluated at the location of the intended receiver, as $a$ and $\mathbf{c}$ are. Instead, they correspond to a signal evaluated at the location of a virtual receiver that is deployed in the direction of specular scattering of the RIS and at the same distance as the intended receiver. In other words, we consider an equivalent two-user system, in which one user is the intended receiver and the other user is located in the specular direction and at the same distance from the RIS as the intended receiver. In mathematical terms, $a_{\text{StSc}}$ and $\mathbf{c}_{\text{StSc}}$ can be formulated as $a_{\text{StSc}} = S_{RT}^{(\text{StSc})} + S_{RS}^{(\text{StSc})} (Q^{(m)})^{-1} S_{ST}^{(\text{StSc})}$ and $\mathbf{c}_{\text{StSc}} = (\mathbf{b}_1^{(\text{StSc})})^T \odot \mathbf{b}_2^{(\text{StSc})}$, where $S_{RT}^{(\text{StSc})}$, $S_{ST}^{(\text{StSc})}$ and $S_{RS}^{(\text{StSc})}$ denote the scattering sub-matrices corresponding to the virtual receiver, as well as $(\mathbf{b}_1^{(\text{StSc})})^T = \mathbf{S}_{RS}^{(\text{StSc})} \mathbf{P}^{(m)}$ and $\mathbf{b}_2^{(\text{StSc})} = (Q^{(m)})^{-1} \mathbf{S}_{ST}^{(\text{StSc})}$. In free space channels, as mentioned, these scattering matrices depend only on the location of the transmitter and RIS, as the location of the receiver is that of specular reflection. Therefore, the parameters $a_{\text{StSc}}$ and $\mathbf{c}_{\text{StSc}}$ can be readily computed. Multipath channels are discussed in Sec. III-D. For them, known channel estimation algorithms can be utilized to estimate the scattering parameters [6], [29].

Based on the optimization problem formulated in (58), the RIS is optimized to maximize the reradiated signal towards the intended user, while minimizing the reradiated signal towards the specular direction. This is obtained by controlling the positive real-valued weighting parameter $\omega$: the larger $\omega$, the lower the scattering towards the specular direction, i.e., the structural scattering is reduced. The weighting factor $\omega$ cannot, however, be too large to make sure that the scattering towards the intended direction is not deprioritized. By setting $\omega = \infty$, in fact, the optimizer would attempt to completely eliminate the signal scattered towards the specular direction while ignoring the signal scattered towards the intended direction. The most appropriate value for $\omega$ can be found numerically, based on the specified performance requirements and tradeoffs. By varying $\omega \in [0, \infty]$, specifically, we obtain the Pareto frontier, i.e., the set of solutions for which no RIS configuration can be found that either maximizes the desired beam or minimizes the structural scattering without making the other worse.

To tackle the problem in (58), we utilize the same approach as for S-OPT with the caveat that the equivalence between the maximization of the SNR and the minimization of the MSE
is applied, as in (54), only to the intended receiver. Therefore, the following optimization problem is obtained:

$$ 
\begin{align} 
\min_{\mathbf{w},\mathbf{x}} \quad & \sigma_s^2 + |w|^2 (\sigma_s^2|h(\mathbf{x})|^2 + \sigma_n^2) - 2\sigma_s^2 \mathfrak{R} \{wh(\mathbf{x})^*\} \tag{59} \\ 
& - \omega|a_{\text{StSc}}|^2 - 2\omega \mathfrak{R} \{a_{\text{StSc}}^* \mathbf{c}_{\text{StSc}}^T \mathbf{x}\} - \omega|\mathbf{c}_{\text{StSc}}^T \mathbf{x}|^2 \nonumber \\ 
\text{s.t.} \quad & \sum_{k=1}^K x_k^2 D_k \le \epsilon^2, \quad k = 1, 2, \dots, K \nonumber 
\end{align} 
$$

The optimization problem in (59) can be solved by applying the same alternating optimization algorithm as for (54). At the lth iteration, specifically, $w_{\text{opt}}(\mathbf{x}^{(l)})$ is given by (52), since the term corresponding to the structural scattering is independent of $w$. Also, $\mathbf{x}^{(l+1)}$ at the (l + 1)th iteration is obtained by applying the method of Lagrange multipliers to the $\omega$-weighted objective function, which yields the following:

$$ \mathbf{x}^{(l+1)} = (\mathbf{M}_{\omega}^{(l)} + \mu_{\omega} \mathbf{D}^{(l)})^{-1} \mathbf{m}_{\omega}^{(l)} \quad (60) $$

where the matrix $\mathbf{M}_{\omega}^{(l)}$ and the vector $\mathbf{m}_{\omega}^{(l)}$ are given by

$$ \mathbf{M}_{\omega}^{(l)} = \sigma_S^2 |w_{\text{opt}}(\mathbf{x}^{(l)})|^2 \mathfrak{R} \{\mathbf{c}^* \mathbf{c}^T\} - \omega \mathfrak{R} \{\mathbf{c}_{\text{StSc}}^* \mathbf{c}_{\text{StSc}}^T\} \quad (61) $$

$$ \mathbf{m}_{\omega}^{(l)} = \sigma_S^2 |w_{\text{opt}}(\mathbf{x}^{(l)})|^2 \mathfrak{R} \{a^* \mathbf{c}^T\} - \sigma_S^2 \mathfrak{R} \{w_{\text{opt}}(\mathbf{x}^{(l)}) \mathbf{c}^H\} \\ - \omega \mathfrak{R} \{a_{\text{StSc}}^* \mathbf{c}_{\text{StSc}}^T\} \quad (62) $$

and $\mu_{\omega}$ is a Lagrange multiplier that is computed ensuring that the constraint in (59) is fulfilled with equality.

In the rest of this paper, the algorithm that accounts for the structural scattering at the design stage is referred to us S-OPT($\omega$). By definition, it reduces to S-OPT if $\omega = 0$.

### C. Generalization to a Finite Feasible Set

The proposed approach summarized in Algorithm 1 assumes that the reactances of the tunable loads connected to the ports of the RIS can take arbitrary values, i.e., $X_k \in [-\infty, \infty]$. In turn, this implies that the phases of the reflection coefficients can take arbitrary values, i.e., $\phi_k \in [0, 2\pi]$. In practice, however, the reactances can only take values within some specified sets. This imposes some limitations on the set of phase shifts $\phi_k$. We denote by $\mathcal{Q}$ the set of feasible phase shifts. Algorithm 1 can be generalized to consider $\mathcal{Q}$, by simply replacing the line denoted by (***), with the following:

$$ \phi_k^{(m+1)} \leftarrow \Pi_Q (\phi_k^{(m)} + \delta_k^{(m)}) \quad (63) $$

where $y = \Pi_Q(x)$ denotes the projection of $x$ onto the feasible set $\mathcal{Q}$ according to the minimum distance criterion, i.e., $y = \Pi_Q(x) = \arg \min_{\tilde{x} \in \mathcal{Q}} \{|x - \tilde{x}|\}$.

### D. Generalization to Multipath Channels

The proposed approach can be applied in multipath channels as well, based on the analytical model recently introduced in [24]. The multipath channel is modeled through the presence of scattering clusters distributed throughout the environment. Each cluster is constituted by several scattering objects, and it is modeled as a multipath network whose ports are loaded with impedances that depend on the electromagnetic properties of the physical scatterers. The authors of [24] model each scattering object as a loaded thin wire dipole according to the so-called discrete dipole approximation [16].

Specifically, under the same modeling assumptions and approximations, the end-to-end channel matrix in (21) can be readily generalized in multipath channels, by simply replacing the matrix $\tilde{\mathbf{Z}}_{\text{RT}}$ with the matrix $\tilde{\mathbf{Z}}_{\text{ROT}}$ defined as follows:

$$ \tilde{\mathbf{Z}}_{\text{ROT}} = \mathbf{Z}_{\text{ROT}} - \mathbf{Z}_{\text{ROS}} (\mathbf{Z}_{\text{S}} + \tilde{\mathbf{Z}}_{\text{SOS}})^{-1} \mathbf{Z}_{\text{SOT}} \quad (64) $$

where $\tilde{\mathbf{Z}}_{\text{SOS}} = \mathbf{Z}_{\text{SS}} + \mathbf{Z}_{\text{SOS}}$, and the matrices $\mathbf{Z}_{\text{xOy}}$ account for the presence of the scattering objects besides the transmitter, the receiver, and the RIS. These matrices are defined in [24] and, therefore, are not reported here for brevity.

Comparing (64) with (21), we evince that they are equivalent from point of view of optimizing the matrix $\mathbf{Z}_{\text{S}}$ of tunable loads, as the matrix $\tilde{\mathbf{Z}}_{\text{SOS}}$ is fixed and known. Thus, Algorithm 1 can be applied in multipath channels *mutatis mutandis*.

It is instructive to expand (64) in order to identify the different constituents of the end-to-end channel, which include the direct link, first-order scattering components (i.e., anomalous reflection, structural scattering), and higher-order scattering components caused by the interactions between the RIS and the scattering clusters. For brevity, we analyze the scattering matrices in (22)-(25) with focus on (23), which is of interest in this paper. By inserting the matrices $\mathbf{Z}_{\text{xOy}}$ defined in [24] into (23), we obtain the following $\mathbf{S}_{\text{ROT}}$ matrix:

$$ \mathbf{S}_{\text{ROT}} = \frac{\mathbf{Z}_{\text{ROT}}}{2Z_0} - \frac{\mathbf{Z}_{\text{ROS}}}{2Z_0} (\mathbf{Z}_0 \mathbf{U} + \mathbf{Z}_{\text{SS}} + \mathbf{Z}_{\text{SOS}})^{-1} \mathbf{Z}_{\text{SOT}} \quad (65) $$

$$ = \frac{1}{2Z_0} (\mathbf{Z}_{\text{RT}} - \mathbf{Z}_{\text{RO}}(\mathbf{Z}_{\text{US}} + \mathbf{Z}_{\text{OO}})^{-1}\mathbf{Z}_{\text{OT}}) \quad (66) $$

$$ -\frac{1}{2Z_0} (\mathbf{Z}_{\text{RS}} - \mathbf{Z}_{\text{RO}}(\mathbf{Z}_{\text{US}} + \mathbf{Z}_{\text{OO}})^{-1}\mathbf{Z}_{\text{OS}}) \quad (67) $$

$$ \times (\mathbf{Z}_0 \mathbf{U} + \mathbf{Z}_{\text{SS}} - \mathbf{Z}_{\text{SO}}(\mathbf{Z}_{\text{US}} + \mathbf{Z}_{\text{OO}})^{-1}\mathbf{Z}_{\text{OS}})^{-1} \quad (68) $$

$$ \times (\mathbf{Z}_{\text{ST}} - \mathbf{Z}_{\text{SO}}(\mathbf{Z}_{\text{US}} + \mathbf{Z}_{\text{OO}})^{-1}\mathbf{Z}_{\text{OT}}) \quad (69) $$

$$ = \frac{\mathbf{Z}_{\text{RT}}}{2Z_0} \quad (70) $$

$$ -\frac{\mathbf{Z}_{\text{RO}}(\mathbf{Z}_{\text{US}} + \mathbf{Z}_{\text{OO}})^{-1}\mathbf{Z}_{\text{OT}}}{2Z_0} \quad (71) $$

$$ -\frac{\mathbf{Z}_{\text{RS}}(\mathbf{Z}_0 \mathbf{U} + \mathbf{Z}_{\text{SS}} - \mathbf{Z}_{\text{SO}}(\mathbf{Z}_{\text{US}} + \mathbf{Z}_{\text{OO}})^{-1}\mathbf{Z}_{\text{OS}})^{-1}\mathbf{Z}_{\text{ST}}}{2Z_0} \quad (72) $$

$$ + \Delta \quad (73) $$

where $\mathbf{Z}_{\text{US}}$ is a diagonal matrix containing the loads of the scattering objects that are set to mimic the scattering behavior of natural objects. In detail, (70) corresponds to the direct link, (71) corresponds to the first-order scattering component from the scattering objects in the absence of the RIS, and (72) corresponds to the first-order structural scattering component from the RIS. Specifically, we note that the term in (72) results in a specular reflection as in free space channels, with the only caveat that the presence of scattering objects is equivalent to modifying the matrix of mutual coupling of the RIS from $\mathbf{Z}_{\text{SS}}$ to $\mathbf{Z}_{\text{SS}} - \mathbf{Z}_{\text{SO}}(\mathbf{Z}_{\text{US}} + \mathbf{Z}_{\text{OO}})^{-1}\mathbf{Z}_{\text{OS}}$. Finally, the term $\Delta$ in (73) accounts for all the second-order and higher-order scattering components that originate from the interaction of the RIS with the scattering objects. Let us consider, as an example, the term $\Delta_1 = \mathbf{Z}_{\text{RS}}(\mathbf{Z}_0 \mathbf{U} + \mathbf{Z}_{\text{SS}} - \mathbf{Z}_{\text{SO}}(\mathbf{Z}_{\text{US}} + \mathbf{Z}_{\text{OO}})^{-1}\mathbf{Z}_{\text{OS}})^{-1}$
<figure><img src="image_4.png" /><figcaption>Fig. 2: Considered scenario. The RIS elements can be either free standing thin wire dipoles (as illustrated in the figure) or rectangular patches on a grounded substrate (detailed next and illustrated in Fig. 13). The scenario in the presence of blocking objects is presented in Fig. 3 and is elaborated next.</figcaption></figure>

$\times \mathbf{Z}_{\text{SO}}(\mathbf{Z}_{\text{US}} + \mathbf{Z}_{\text{OO}})^{-1}\mathbf{Z}_{\text{OT}}$. $\Delta_1$ corresponds to the signal that is first emitted by the transmitter, is then scattered by the clusters of scattering objects, and is further reflected by the RIS towards a direction that is specular to that of incidence.

In general, the analysis of $\mathbf{S}_{\text{ROT}}$ reveals that, as in free space channels, the waves that impinge upon the RIS are reflected specularly, whether they originate from the transmitter or are the result of prior interactions with the scattering objects. As in free space channels, each scattering component can be identified and can be either nullified or enhanced depending on the considered scenario, by formulating a multi-objective optimization problem similar to that in Sec. III-B.

### E. Analysis of Computational Complexity and Convergence

In this sub-section, we analyze the computational complexity and the convergence of the proposed algorithms.

**Computational complexity** – The three proposed algorithms are iterative and hence their complexity ultimately depends on the number of iterations to converge. Based on Algorithm 1 and the alternating optimization in (56), we evince the following: (i) the number of iterations for S-UNI is given by the product of the number of iterations of the *while* loop and the number of RIS elements *K*; and (ii) the number of iterations for S-OPT and S-OPT($\omega$) is given by the product of the number of iterations of the *while* loop and the number of iterations of the alternating optimization algorithm in (56). In the following, we consider the computational complexity expressed in terms of complex multiplications per iteration.

From Algorithm 1, we evince that the per-iteration complexity of S-UNI is determined by the inversion of the $K \times K$ matrix $\mathbf{Q}^{(m)}$, whose complexity is $O(K^3)$. It is important to note that the number of times $\mathbf{Q}^{(m)}$ needs to be inverted is equal to the number of iterations of the *while* loop only. This is similar to the complexity of the algorithm proposed in [21], which is based on the Z-parameter representation. As far as S-OPT and S-OPT($\omega$) are concerned, the per-iteration complexity is determined by the inversion of the $K \times K$ matrices in (56) and (60), respectively, as well as the computation of the Lagrange multipliers. The Lagrange multipliers can be computed by utilizing the bisection method. Assuming that $N_\mu$ iterations are needed for the bisection method to converge, the complexity of S-OPT and S-OPT($\omega$) scales with $O(N_\mu K^3)$.

**Convergence** – As far as the convergence of the three proposed algorithms is concerned, they provide optimal solutions

at each iteration step<fnref n="1" />, including the alternating optimization steps for S-OPT and S-OPT($\omega$). Therefore, the objective functions monotonically increase (S-UNI) and decrease (S-OPT and S-OPT($\omega$)) at each iteration step. Since, in addition, the transmitted power is upper bounded, the RIS does not amplify the incident signals, and the MSE is lower bounded, the three proposed algorithms are guaranteed to converge to a local optimum after a sufficient number of iterations.

## IV. NUMERICAL RESULTS

In this section, we illustrate numerical results to evaluate the performance and effectiveness of the proposed algorithms.

a) **Simulation Setup:** The carrier frequency is $f = 28$ GHz. The RIS is modeled as a uniform planar array centered at the origin of a global reference system and is deployed on the $yz$ plane. The number of RIS elements along the $y$-axis and $z$-axis is denoted by $N_y$ and $N_z$, respectively. The transmitter is located at (4, 0, 0) m and the receiver is located at (4 cos($\psi$), 4 sin($\psi$), 0) m, i.e., it is on a circle of radius 4 m and whose center coincides with the center-point of the RIS. We consider four possible locations for the receiver, which are denoted by $\psi_k = \sin^{-1}(k/4)$, with $k = 1, \dots, 4$, and correspond to the locations $P_k$ in Fig. 2. The transmitting and receiving antennas are modeled as identical $z$-oriented metallic thin wire dipoles with radius $\lambda/500$ and length $0.46\lambda$, where $\lambda$ denotes the free space wavelength. The length of the dipoles is chosen to have nearly resonant scattering elements whose self-impedance has a low reactance. Two types of RIS elements (unit cells) are considered: (a) free-standing metallic thin wire dipoles and (b) rectangular patch antennas over a grounded substrate. Free space and multipath channels are considered. The direct link between the transmitter and receiver is assumed to be blocked by obstacles and is ignored. This is considered to better emphasize the impact of the RIS and is detailed next.

b) **Full-Wave Simulations:** To validate the multiport network model, we utilize the commercial full-wave simulator FEKO®<fnref n="2" /> based on the MoM. Given the considered unit cell structure for the RIS elements, the *S*-matrix and *Z*-matrix of the multiport network model are obtained from the full-wave simulator. In the considered simulation environment, the electromagnetic field at any location is given by the sum of two contributions: (a) the direct link from the transmitter, and (b) the scattered field from the RIS. Therefore, the results based on the full-wave simulations assume a free space scenario. The analysis in multipath channels is discussed next.

To focus on the contribution from the RIS, the direct link between the transmitter and receiver is assumed to be obstructed by an obstacle and is then nullified. To make the full-wave simulations computationally affordable, we do not add physical large blocking objects, which obstruct the transmitter-receiver line-of-sight link, in the full-wave simulation environment. We leverage, on the other hand, the superposition principle and utilize the following procedure: (i) we compute the *Z*-matrix in the presence of the RIS; (ii) we compute the *Z*-matrix (a $2 \times 2$ matrix) in the absence of the RIS; and (iii) then, we subtract the off-diagonal entry of the *Z*-matrix

<footnote n="1">¹If the feasible set is a finite set as in Sec. III-C, the solution is not optimal.</footnote>

<footnote n="2">²https://altairengineering.fr/feko/.</footnote>
<figure><img src="image_5.png" /><figcaption>Fig. 3: Considered scenario in the presence of blocking objects (shields) near the transmitter and receiver (position $P_3$).</figcaption></figure>

<figure><img src="image_6.png" /><figcaption>Fig. 4: Scattered field after RIS optimization based on the “No Shield” ($Z_{RT}$ is nullified) and “With Shield” methods.</figcaption></figure>

obtained in (ii) from the entry corresponding to the transmitter-receiver direct link in the Z-matrix obtained in (i). The theoretical justification of this approach is given in Appendix C. To further validate the proposed approach for modeling the blocking of the direct link in a computationally efficient manner, in addition, we present full-wave simulations in the presence of two physical absorbing screens (shields), which are placed near the transmitter and receiver, that attenuate the direct link. In the following text, these two methods are referred to as “No Shield” method and “With Shield” method, respectively.

To validate the effectiveness of the proposed optimization algorithms, the results are obtained by using the following procedure: (i) first, the Z-matrix is obtained from the full-wave simulator; (ii) then, the Z-matrix is input to the proposed algorithms, and the optimal load impedances are obtained; (iii) finally, the RIS elements are loaded with the obtained optimal impedances and electromagnetic simulations of the scattered field are carried out with the full-wave simulator.

### A. RIS Made of Thin Wire Dipoles

The RIS elements are free-standing metallic thin wire dipoles, which are parallel to the z-axis and have the same radius and length as the transmitter and receiver. The inter-distance between adjacent RIS elements is $d_y = \lambda/Q$ along the y-direction and $d_z = 3\lambda/4$ along the z-direction, where Q is an integer that determines the density of dipoles. We set $N_y = 4\lambda/d_y = 4Q$ and $N_z = 8$, so that the RIS is constituted by $32Q$ thin wire dipoles, and is a rectangular surface with area equal to $24\lambda^2$. As an example, Fig. 2 shows a deployment with Q = 8, i.e., the RIS is constituted by 256 dipoles. The parasitic resistance of each RIS element is $r_0 = 0.2$ Ω, while the parameter $\delta_0$, which ensures the accuracy of Neumann's series approximation, is set to $\delta_0 = 0.01$ for ensuring a good tradeoff between convergence speed and approximation accuracy.

<figure><img src="image_7.png" /><figcaption>Fig. 5: Full-wave simulations (the receiver is in $P_4$). Setup: (a) $d_y = \lambda/2$; (b) $d_y = \lambda/4$; (c) $d_y = \lambda/8$; (d) $d_y = \lambda/16$.</figcaption></figure>

a) *Comparison Between “No Shield” and “With Shield” Full-Wave Simulation Methods:* Since the scenario of interest assumes that the direct link is blocked by obstacles and is hence ignored, we commence by comparing the computationally efficient “No Shield” method, in which the direct link is canceled out analytically, against the physics-consistent “With Shield” method, in which the whole physical structure is simulated in the presence of absorbing objects that obstruct the direct link. The scenario is shown in Fig. 3. A free space setting is considered, with two blocking objects deployed near the transmitter and receiver. They are modeled as lossy dielectric screens with a relative permittivity equal to $\epsilon_r = 1.76$ and a dielectric loss tangent equal to $\tan \delta = 5.68$, to significantly attenuate the direct link. In the full-wave simulator, the two screens are square cuboids of dimensions $10\lambda \times 10\lambda$ with thickness $t = \sqrt{2}\lambda$. The screens are positioned at a distance of $10\lambda$ from the transmitter and receiver, and they are located normally to the transmitter-receiver line-of-sight path.

In Fig. 4, we illustrate the reradiation (scattering) pattern of the RIS, when it is illuminated by a plane wave that originates from the transmitter (normal incidence), and the RIS needs to reflect the incident plane wave towards $P_3$ ($\approx 48.6^\circ$), as shown in Fig. 3. The figure showcases that the radiation patterns obtained (i) in the presence of the two shields and (ii) in their absence but canceling out the direct link are very similar to one another. This confirms the mathematical foundation of the “No Shield” method as summarized in Appendix C, and justifies the use of the “No Shield” method in light of its favorable computational efficiency. In the remainder of this paper, only the “No Shield” method is, therefore, considered.

b) *Free Space Scenario:* We start by analyzing the performance of the proposed algorithms in a free space scenario. The S-matrix and Z-matrix are obtained by using the full-wave simulator as detailed previously. Also, the feasible set for the phase shifts of the RIS elements is $Q = [0, 2\pi]$. The three algorithms S-UNI, S-OPT, and S-OPT($\omega$) are initialized to the optimal solution in the absence of mutual coupling. As a benchmark, the optimization algorithm in [21], which is based on the Z-matrix, is considered. This algorithm is referred to as Z-REF. The comparison is given in terms of received power $G = |H_{e2e}|^2$ evaluated at the location of the receiver.

In Fig. 5, we show the convergence of the three algorithms
<figure><img src="image_8.png" /><figcaption>Fig. 6: Full-wave simulations (the receiver is in $P_1-P_4$). Setup: (a) $d_y = \lambda/2$; (b) $d_y = \lambda/4$; (c) $d_y = \lambda/8$; (d) $d_y = \lambda/16$.</figcaption></figure>

<figure><img src="image_9.png" /><figcaption>Fig. 7: Scattered field in $P_3$ (a) and $P_4$ (b) ($d_y = \lambda/8$).</figcaption></figure>

<figure><img src="image_10.png" /><figcaption>Fig. 8: Scattered field in location $P_3$ obtained with S-OPT($\omega$) as a function of $\omega$. Setup: $d_y = \lambda/8$.</figcaption></figure>

based on the scattering parameters obtained from the full-wave simulator. The results confirm the sensitivity analysis in Sec. III-A, i.e. the faster convergence rate of the optimization algorithms applied to the S-matrix. Also, we see that the smaller $d_y$, i.e., the more the RIS elements, the better the receiver power, provided that the mutual coupling is exploited at the design stage. Also, we see that the proposed S-OPT algorithm outperforms all the other algorithms.

In Fig. 6, we show the received power (at convergence) as a function of the location of the receiver. Also, we report the received power when the mutual coupling is ignored. This case study is denoted by S-DIAG. We see that ignoring the mutual coupling leads to a large degradation of the received power.

The numerical results illustrated in Figs. 5 and 6 based on a full-wave simulator confirm the performance trends first obtained in [21] based on a pure mathematical approach. We note, in addition, that the direct link is absent in the considered scenario and that no communication would be possible without the deployment of an RIS. The received power can be further increased by increasing the number of RIS elements.

In Fig. 7, we analyze the impact of structural scattering. To this end, we illustrate the reradiation (scattering) pattern of the RIS, when it is illuminated by a plane wave that originates from the transmitter (normal incidence), and the RIS reflects the wave towards $P_3$ ($\approx 48.6^\circ$) and $P_4$ ($= 90^\circ$), as shown in Fig. 2. The figure confirms the presence of a strong specular component towards the transmitter, i.e., towards $0^\circ$.

In Fig. 8, we analyze the effectiveness of the proposed S-OPT($\omega$) algorithm, which accounts for the presence of structural scattering at the design stage, and aims at minimiz-

ing it while ensuring a sufficient amount of reflected power towards the location of interest. We see that, by appropriately setting the weighing parameter $\omega$, a good trade-off between the structural scattering (specular reflection) and the desired reflection is obtained. Specifically: (i) if $\omega = 0$, i.e., the structural scattering is ignored at the design stage, there is a strong specular reflection; but (ii) if $\omega \neq 0$, i.e., the structural scattering is taken into account at the design stage, the specular reflection is significantly reduced, while a strong non-specular (desired) reflection is obtained. If $\omega = 2$, for example, the specular component is attenuated by 20 dB while the desired beam is attenuated only by 7 dB. For completeness, Fig. 8 reports the reradiation pattern obtained when the ports of the RIS are connected to the reference impedance $Z_0$, i.e., $Z_S = Z_0$U. As predicted by the proposed multiport network model, only the structural scattering exists but there is no anomalous reflection, since the RIS is a homogeneous surface.

c) *Finite Feasible Set:* To further validate the proposed algorithms, we analyze their performance under a more realistic assumption for the phase shifts of the RIS elements. We still assume a free space scenario, and the S-matrix and Z-matrix are obtained by using the full-wave simulator.

Specifically, the feasible set for the allowed phase shifts of the RIS elements is set to $Q_s = [-36^\circ, 36^\circ]$. This setup is obtained by considering that the RIS elements are loaded with a varactor diode whose controllable capacitance lies in the range [$C_{min}, C_{max}$]. Neglecting the parasitic effects, the corresponding reactances lie in the set $X_C \in [-j/(2\pi f C_{max}), -j/(2\pi f C_{min})]$ $\Omega$. Considering, for example, a MACOM's MAVR-011020-1141 gallium arsenide flip chip hyperabrupt varactor diode [48], [49], the minimum and maximum values for the capacitance are $C_{min} = 0.025$ pF and $C_{max} = 0.19$ pF, respectively, by assuming a reverse bias voltage varying between 11 V and 0 V. Hence, at the considered frequency $f = 28$ GHz, we obtain $X_C \in [\approx -227, \approx -30]$ $\Omega$. Then, assuming $Z_0 = 50$ $\Omega$, the phase shifts of the reflection coefficients lie in the range [$\approx -118^\circ, \approx -24^\circ$]. Also, to ensure that the allowed phase shifts are symmetric around the origin, we connect each varactor diode to a 50 $\Omega$ transmission line of length $0.1\lambda$, which introduces a fixed phase shift equal to $\approx 71.5^\circ$. Accordingly, the set of allowed phase shifts is $Q_m \approx [-46.7^\circ, 46.7^\circ]$, which includes the set of phase shifts considered to obtain the simulation results.

In Fig. 9, we compare the performance provided by the S-
<figure><img src="image_11.png" /><figcaption>Fig. 9: Scattered field in $P_3$ (a) and $P_4$ (b) ($d_y = \lambda/8$).</figcaption></figure>

<figure><img src="image_12.png" /><figcaption>Fig. 10: Scattered field in location $P_4$ obtained with S-OPT($\omega$) as a function of $\omega$. Setup: $d_y = \lambda/8$.</figcaption></figure>

<figure><img src="image_13.png" /><figcaption>Fig. 11: Multipath channel with $d_y = \lambda/8$ [15]. Setup: the receiver is in (a) $P_1$; (b) $P_2$; (c) $P_3$; (d) $P_4$.</figcaption></figure>

<figure><img src="image_14.png" /><figcaption>Fig. 12: Scattered field in $P_3$ (a) and $P_4$ (b) ($d_y = \lambda/8$) of the S-OPT algorithm in the presence of multipath.</figcaption></figure>

OPT algorithm when $Q_s = [0, 2\pi]$ (denoted by S-OPT) and when $Q_s = [-36^\circ, 36^\circ]$ (denoted by S-OPT constrained). The same setup as in Fig. 7 is considered. It is observed that the performance loss due to the considered finite feasible set is on the order of 1 dB. More importantly, we note that the shape of the radiation pattern is not significantly altered.

In Fig. 10, we study the impact of considering a finite feasible set in terms of mitigating the structural scattering. The same setup as in Fig. 8 is considered. It is observed that the structural scattering can still be reduced, while minimally altering the whole shape of the reradiation pattern of the RIS.

**d) Multipath Channels:** To validate the proposed algorithms in a realistic wireless scenario, we analyze their performance in a multipath channel. For simplicity, the S-matrix and Z-matrix are obtained by using the analytical framework in [24], as described in Sec. III-D. This case study also allows us to investigate whether the analytical models in [15] and [22] provide results that are consistent with those obtained with the full-wave simulator. The feasible set for the phase shifts of the RIS elements is assumed to be $Q = [0, 2\pi]$. The multipath channel is modeled as described in Sec. III-

D, according to [24]. Specifically, we assume the presence of one multipath cluster, which is constituted by 100 scattering objects that are modeled as short-circuited thin wire dipoles of length $\lambda/2$. The center of the cluster is located at (2, 2, 0) in the middle of the considered area. The results illustrated in Fig. 11 are similar to those in Fig. 5, but in this case we consider a fixed $d_y = \lambda/8$ and we show the convergence analysis for $P_1-P_4$. Comparing with the results in Fig. 5, we observe a slight increase in the received power at the UE due to the presence of the multipath cluster, which creates additional scattered signals between the transmitter and the receiver, the transmitter and the RIS, and the RIS and the receiver. In Fig. 12, in addition, we show the reradiation pattern of the RIS in the presence of multipath. The setting is the same as in Fig. 7, but, for simplicity, only the unconstrained S-OPT algorithm is reported. We see that the presence of multipath slightly deforms the reradiating pattern of the RIS, when compared with that shown in Fig. 7. This is more noticeable when the receiver is in $P_4$. In both cases, a strong specular reflection due to the structural scattering is apparent in the presence of multipath as well, confirming the mathematical analysis in Sec. III-D. The results shown in Figs. 11 and 12 demonstrate that the conclusions drawn in free space channels remain valid in multipath channels when the transmitter-RIS and the RIS-receiver links are in line-of-sight and are hence dominant.

## B. RIS Made of Rectangular Patch Antennas

Finally, we analyze the accuracy of the multiport network theory model for RIS-aided communications and the effectiveness of the proposed optimization algorithms in steering the beam towards the direction of interest and simultaneously suppressing the structural scattering, by considering an RIS whose RIS elements are loaded rectangular patch antennas.

The considered RIS is illustrated in Fig. 13. It operates at $f = 28$ GHz and is constituted by 7 × 7 rectangular patch antennas. The design is based on a Rogers RO3003 grounded substrate with loss tangent equal to $\epsilon_r = 3$ and thickness equal to $t_s = 0.51$ mm. The RIS elements are pin-fed resonant patch antennas whose dimensions are $w_y = 0.36\lambda$ and $w_z = 0.256\lambda$. The RIS elements are spaced by $d_y = d_z = 0.49\lambda$, and the total dimensions of the RIS are $L_y = 3.85\lambda$ and $L_z = 3.58\lambda$, as illustrated in Fig. 13. Similar to the dipole-based RIS, we assume $r_0 = 0.2 \Omega$ and $\delta_0 = 0.05$.

In Fig. 14, we depict the reradiation (scattering) pattern of the RIS, when it is illuminated by a plane wave emitted by the transmitter (normal incidence), and it is designed to
<figure><img src="image_15.png" /><figcaption>Fig. 13: RIS made of 7 × 7 rectangular patch antennas.</figcaption></figure>

<figure><img src="image_16.png" /><figcaption>Fig. 14: Scattered field in location $P_3$ obtained with S-OPT($\omega$) as a function of $\omega$. The RIS in Fig. 13 is considered.</figcaption></figure>

reflect the wave towards $P_3$ ($\approx 48.6^\circ$) shown in Fig. 2. The S-matrix, Z-matrix, and the radiation pattern are obtained by utilizing the full-wave simulator. Similar to the dipole-based RIS, we observe that the considered multiport network model is accurate and the proposed optimization algorithms are effective, as the desired beam is well steered towards the desired direction of reflection while the structural scattering is significantly attenuated when $\omega = 2$.

## V. CONCLUSION

We have put forth a multiport network model for RIS-aided channels, and have discussed its unique features with respect to conventional scattering models for RISs. Moreover, we have investigated the role of the structural scattering in RIS-aided channels, and have validated its impact with the aid of full-wave simulations. In addition, we have proposed new optimization algorithms based on the S-parameter multiport network model, and we have discussed its advantages with respect to its counterpart based on the Z-parameter representation. With the aid of full-wave simulations, finally, we have validated the effectiveness of the proposed algorithms for reducing the structural scattering at the design stage, while optimizing the scattered field towards the direction of interest.

# APPENDIX A – END-TO-END RIS-AIDED CHANNEL

## A. Proof of (5)

From (1), we can write the following:

$$ \mathbf{b}_T = \mathbf{S}_{TT}\mathbf{a}_T + \mathbf{S}_{TS}\mathbf{a}_S + \mathbf{S}_{TR}\mathbf{a}_R \quad (74) $$

$$ \mathbf{b}_S = \mathbf{S}_{ST}\mathbf{a}_T + \mathbf{S}_{SS}\mathbf{a}_S + \mathbf{S}_{SR}\mathbf{a}_R \quad (75) $$

$$ \mathbf{b}_R = \mathbf{S}_{RT}\mathbf{a}_T + \mathbf{S}_{RS}\mathbf{a}_S + \mathbf{S}_{RR}\mathbf{a}_R \quad (76) $$

Inserting $\mathbf{b}_S = \mathbf{\Gamma}_S^{-1}\mathbf{a}_S$ from (4) into (75), we obtain

$$ \mathbf{a}_S = (\mathbf{U} - \mathbf{\Gamma}_S \mathbf{S}_{SS})^{-1} \mathbf{\Gamma}_S (\mathbf{S}_{ST}\mathbf{a}_T + \mathbf{S}_{SR}\mathbf{a}_R) \quad (77) $$

$$ = \mathbf{\Gamma}_S (\mathbf{U} - \mathbf{\Gamma}_S \mathbf{S}_{SS})^{-1} (\mathbf{S}_{ST}\mathbf{a}_T + \mathbf{S}_{SR}\mathbf{a}_R) \quad (78) $$

Substituting (77) into (74) and (76), we obtain the following reduced system of equations:

$$ \mathbf{b}_T = \tilde{\mathbf{S}}_{TT}\mathbf{a}_T + \tilde{\mathbf{S}}_{TR}\mathbf{a}_R, \quad \mathbf{b}_R = \tilde{\mathbf{S}}_{RT}\mathbf{a}_T + \tilde{\mathbf{S}}_{RR}\mathbf{a}_R \quad (79) $$

where (with $x, y \in \{T, R\}$)

$$ \tilde{\mathbf{S}}_{xy} = \mathbf{S}_{xy} + \mathbf{S}_{xS}(\mathbf{U} - \mathbf{S}_{SS}\mathbf{\Gamma}_S)^{-1}\mathbf{\Gamma}_S \mathbf{S}_{Sy} \quad (80) $$

Inserting $\mathbf{a}_R = \mathbf{\Gamma}_R \mathbf{b}_R$ from (4) into (79), we obtain

$$ \mathbf{b}_R = (\mathbf{U} - \tilde{\mathbf{S}}_{RR}\mathbf{\Gamma}_R)^{-1} \tilde{\mathbf{S}}_{RT}\mathbf{a}_T \quad (81) $$

Inserting $\mathbf{b}_R$ in (81) into (79) and using $\mathbf{b}_T = \mathbf{\Gamma}_T^{-1}(\mathbf{a}_T - \mathbf{a}_g)$ from (4), we obtain $(\tilde{\mathbf{S}}_{TT}$ is defined in (7))

$$ \mathbf{a}_T = (\mathbf{U} - \mathbf{\Gamma}_T \tilde{\mathbf{S}}_{TT})^{-1} \mathbf{a}_g \quad (82) $$

Finally, by solving the systems of equations in (81) and (82), we obtain the end-to-end transfer function

$$ \mathbf{b}_R = (\mathbf{U} - \tilde{\mathbf{S}}_{RR}\mathbf{\Gamma}_R)^{-1} \tilde{\mathbf{S}}_{RT}(\mathbf{U} - \mathbf{\Gamma}_T \tilde{\mathbf{S}}_{TT})^{-1} \mathbf{a}_g \quad (83) $$

## B. Proof of (13)

The proof of (13) follows along the same lines as the proof of (5). Specifically, the current $\mathbf{I}_S$ is first expressed as a function of $\mathbf{I}_T$ and $\mathbf{I}_R$, by utilizing the second equation in (9) and $\mathbf{V}_S = -\mathbf{Z}_S \mathbf{I}_S$ from (10). Then, the following reduced system of equations is obtained:

$$ \mathbf{V}_T = \tilde{\mathbf{Z}}_{TT}\mathbf{I}_T + \tilde{\mathbf{Z}}_{TR}\mathbf{I}_R, \quad \mathbf{V}_R = \tilde{\mathbf{Z}}_{RT}\mathbf{I}_T + \tilde{\mathbf{Z}}_{RR}\mathbf{I}_R \quad (84) $$

where $\tilde{\mathbf{Z}}_{xy}$ is defined in (14).

The obtained system of equations is solved by using Ohm's laws $\mathbf{I}_R = -\mathbf{Z}_R^{-1}\mathbf{V}_R$ and $\mathbf{I}_T = -\mathbf{Z}_T^{-1}(\mathbf{V}_T - \mathbf{V}_g)$ from (10).

# APPENDIX B – RELATION BETWEEN $\mathbf{H}_{e2e}^{(S)}$ AND $\mathbf{H}_{e2e}^{(Z)}$

## A. Proof of (16)

Consider $\mathbf{V}_R = \mathbf{H}_{e2e}^{(Z)}\mathbf{V}_g$. We obtain the following:

$$ \begin{align} \mathbf{V}_R &= \mathbf{H}_{e2e}^{(Z)} \mathbf{V}_g \stackrel{(a)}{=} \mathbf{H}_{e2e}^{(Z)} (\mathbf{V}_T + \mathbf{Z}_g \mathbf{I}_T) \tag{85} \\ &\stackrel{(b)}{=} \sqrt{Z_0} \mathbf{H}_{e2e}^{(Z)} [(\mathbf{a}_T + \mathbf{b}_T) + Z_0^{-1} \mathbf{Z}_g (\mathbf{a}_T - \mathbf{b}_T)] \nonumber \\ &\stackrel{(c)}{=} \sqrt{Z_0} \mathbf{H}_{e2e}^{(Z)} [(\mathbf{a}_g + \mathbf{\Gamma}_T \mathbf{b}_T) + \mathbf{b}_T] \nonumber \\ &\qquad + \sqrt{Z_0} Z_0^{-1} \mathbf{H}_{e2e}^{(Z)} \mathbf{Z}_g [(\mathbf{a}_g + \mathbf{\Gamma}_T \mathbf{b}_T) - \mathbf{b}_T] \nonumber \\ &\stackrel{(d)}{=} \sqrt{Z_0} Z_0^{-1} \mathbf{H}_{e2e}^{(Z)} (\mathbf{Z}_g + Z_0 \mathbf{U}) \mathbf{a}_g \nonumber \\ &\stackrel{(e)}{=} 2\sqrt{Z_0} \mathbf{H}_{e2e}^{(Z)} (\mathbf{U} - \mathbf{\Gamma}_T)^{-1} \mathbf{a}_g \nonumber \end{align} $$

where (a) follows from (10), (b) follows from (2), (c) follows from (4), (d) follows from $\mathbf{\Gamma}_T = (\mathbf{Z}_g + Z_0 \mathbf{U})^{-1}(\mathbf{Z}_g - Z_0 \mathbf{U})$, and (e) follows from $\mathbf{U} - \mathbf{\Gamma}_T = 2Z_0(\mathbf{Z}_g + Z_0 \mathbf{U})^{-1}$.

Consider $\mathbf{V}_R = \sqrt{Z_0}(\mathbf{a}_R + \mathbf{b}_R)$ from (2). We obtain

$$ \mathbf{V}_R \stackrel{(a)}{=} \sqrt{Z_0} (\mathbf{U} + \mathbf{\Gamma}_R) \mathbf{b}_R \stackrel{(b)}{=} \sqrt{Z_0} (\mathbf{U} + \mathbf{\Gamma}_R) \mathbf{H}_{e2e}^{(S)} \mathbf{a}_g \quad (86) $$

where (a) follows from (4) and (b) from $\mathbf{b}_R = \mathbf{H}_{e2e}^{(S)}\mathbf{a}_g$ in (5).

## B. Proof of (19)

This follows immediately from the first and the last equality in (85), which gives $\mathbf{H}_{e2e}^{(Z)}\mathbf{V}_g = 2\sqrt{Z_0}\mathbf{H}_{e2e}^{(Z)}(\mathbf{U} - \mathbf{\Gamma}_T)^{-1}\mathbf{a}_g$.
### C. Differences Between (8) and (21)

For ease of understanding, we consider the SISO case study and assume $Z_g = Z_0$ and $Z_R = Z_0$. Then, the reduced system of equations in (79) and (84) correspond to a two-port network model. From (13), we obtain the following $H_{e2e}^{(Z)}$:

$$H_{e2e}^{(Z)} = \frac{Z_0 \tilde{Z}_{RT}}{(Z_0 + \tilde{Z}_{RR})(Z_0 + \tilde{Z}_{TT}) - \tilde{Z}_{RT} \tilde{Z}_{TR}} \quad (87)$$

$$\begin{align} & \stackrel{(a)}{\approx} \frac{Z_0 \tilde{Z}_{RT}}{(Z_0 + \tilde{Z}_{RR})(Z_0 + \tilde{Z}_{TT})} \tag{88} \\ & \qquad - \tilde{Z}_{RT} \tilde{Z}_{TR} \nonumber \end{align}$$

where (a) corresponds to the approximation in (21).

Then, consider the relation between the S-parameter and Z-parameter representations in (11). For a two-port network, we obtain the following end-to-end RIS aided channel:

$$H_{e2e}^{(S)} = \tilde{S}_{RT} = \frac{2Z_0 \tilde{Z}_{RT}}{(Z_0 + \tilde{Z}_{RR})(Z_0 + \tilde{Z}_{TT}) - \tilde{Z}_{RT} \tilde{Z}_{TR}} \quad (89)$$

According to (18), we see that $H_{e2e}^{(S)} = 2H_{e2e}^{(Z)}$, since $\Gamma_T = \Gamma_R = 0$ in the considered case study. Also, the cross-product $\tilde{Z}_{RT}\tilde{Z}_{TR}$ is present not only in the exact expression of $H_{e2e}^{(Z)}$, but in the exact expression of $H_{e2e}^{(S)}$ as well, even though it is not explicitly observable in the S-parameter representation.

## APPENDIX C – MODELING BLOCKING OBJECTS: THE “NO SHIELD” METHOD

In this section, we discuss and prove the electromagnetic consistency of the “No Shield” method, which is based on the superposition principle and has been applied to validate the multiport network model with the aid of full-wave electromagnetic simulations. To ease the mathematical derivation, we consider the case study of two thin wire antennas, which are directed towards the z-axis and whose midpoints (feed points) lie on the z = 0 plane.

For the two considered coupled antennas in free space, Carter’s circuit relations can be written as follows [50]:

$$V_1 = Z_{11}I_1 + Z_{12}I_2 \quad (90)$$

$$V_2 = Z_{21}I_1 + Z_{22}I_2 \quad (91)$$

where $Z_{12} = Z_{21}$ by virtue of reciprocity.

First, we consider that antenna 1 is transmitting and antenna 2 is receiving. If antenna 2 is open-circuited at the reference plane and the tangential electric field generated by antenna 1 along the surface of antenna 2 is $E_{21}(z)$, then, according to Lorentz’s reciprocity theorem [51, ch. 3], [52, ch. 5], [53, ch. 7], the mutual impedance between the two antennas is

$$Z_{21} = - \frac{1}{I_1(0)I_2(0)} \int_{-h_2/2}^{+h_2/2} E_{21}(z)I_2(z)dz \quad (92)$$

where $I_1(0)$ is the current at the port of antenna 1 when antenna 2 is open-circuited, $I_2(0)$ is the current at the port of antenna 2 when antenna 1 is open-circuited, which generates the current $I_2(z)$ along the surface of antenna 2, $h_2$ is the length of antenna 2, and $E_{21}(z)$ is the tangential electric field generated by antenna 1 along the surface of antenna 2 (when the presence of the conductor of antenna 2 is ignored, as required by the reciprocity theorem). Equation (92) can

be obtained by applying the well-known Carter’s induced electromagnetic field method as well [50].

Let us now consider that the two thin wire antennas radiate in presence of a perfectly conducting scattering object with surface $S_o$. Let us denote the electric and magnetic vector fields scattered by the object as $\underline{E}^s$ and $\underline{H}^s$, respectively. According to the field equivalence principle [53, par. 7.10], the scattered electromagnetic field outside $S_o$ can be thought of as the electromagnetic field produced by equivalent electric surface vector currents $J_{es}^o$ along the surface $S_o$ of the scattering object when it radiates in free space, i.e., in the absence of the two thin wire antennas.

In the presence of the considered scattering object, let us consider that antenna 1 is transmitting and antenna 2 is receiving. The total tangential electric field $E_{21}$ that is generated by antenna 1, when radiating in presence of the scattering object and being evaluated along the surface of antenna 2, can be expressed as the sum of the tangential electric field $E_{21}^i$ produced by antenna 1 in the absence of the scattering object and the scattered tangential electric field $E_{21}^s$ produced by the equivalent electric surface vector currents $J_{es}^o$ in the absence of antenna 1 and antenna 2, as follows [54, par. 3.7 eq. 3-24]:

$$E_{21}(z) = E_{21}^{i}(z) + E_{21}^{s}(z) \quad (93)$$

Substituting (93) in (92), the following expression for the mutual impedance $Z_{21}$ is obtained:

$$Z_{21} = - \frac{1}{I_1(0)I_2(0)} \int_{-h_2/2}^{+h_2/2} E_{21}^{i}(z)I_2(z)dz \quad (94)$$

$$- \frac{1}{I_1(0)I_2(0)} \int_{-h_2/2}^{+h_2/2} E_{21}^{s}(z)I_2(z)dz \quad (95)$$

$$= Z_{21}^{i} + Z_{21}^{s} \quad (96)$$

From (96), we obtain

$$Z_{21}^{s} = Z_{21} - Z_{21}^{i} \quad (97)$$

Since $Z_{21}^i$ in (97) corresponds, by definition, to the contribution of the electric field generated by the transmitting antenna 1 when evaluated along the surface of the receiving antenna 2 in the absence of the scattering object, the obtained expression in (97) states that the contribution from the scattering object can be obtained by subtracting the contribution of the whole system (transmitting antenna, receiving antenna, and scattering object) from the contribution generated by the transmitting antenna in the presence of the receiving antenna but in the absence of the scattering object.

This approach can be generalized to systems with multiple scattering objects, since the corresponding term $Z_{21}^i$ is computed in the absence of all the scattering objects. This validates the electromagnetic foundation of the (computationally efficient) “No Shield” method utilized in this paper.

## REFERENCES

[1] A. Abrardo et al., “Analysis and optimization of reconfigurable intelligent surfaces based on S-parameters multiport network theory,” arXiv:2308.16856, 2023.

[2] M. Di Renzo et al., “Smart radio environments empowered by reconfigurable intelligent surfaces: How it works, state of research, and the road ahead,” IEEE J. Sel. Areas Commun., vol. 38, pp. 2450–2525, 2020.
[3] Q. Wu et al., "Intelligent reflecting surface-aided wireless communica-
tions: A tutorial," *IEEE Trans. Commun.*, vol. 69, pp. 3313-3351, 2021.

[4] M. Di Renzo et al., “Reconfigurable intelligent surfaces vs. relaying: Differences, similarities, and performance comparison,” *IEEE Open J. Commun. Soc.*, vol. 1, pp. 798–807, 2020.

[5] B. Sihlbom et al., “Reconfigurable intelligent surfaces: Performance assessment through a system-level simulator,” *IEEE Wirel. Commun.*, vol. 30, no. 4, pp. 98–106, 2023.

[6] C. Pan et al., “An overview of signal processing techniques for ris/irs-aided wireless systems,” *IEEE J. Sel. Top. Signal Process.*, vol. 16, no. 5, pp. 883–917, 2022.

[7] M. Di Renzo et al., “Communication models for reconfigurable in-
telligent surfaces: From surface electromagnetics to wireless networks optimization,” *Proc. IEEE*, vol. 110, no. 9, pp. 1164–1209, 2022.

[8] V. Galdi et al., “Digital reconfigurable intelligent surfaces: On the impact of realistic reradiation models,” *arXiv:2205.09799*, 2022.

[9] S. Abeywickrama et al., “Intelligent reflecting surface: Practical phase shift model and beamforming optimization,” *IEEE Trans. Commun.*, vol. 68, no. 9, pp. 5849–5863, 2020.

[10] M. Di Renzo et al., “Effects of realistic reradiation models in digital reconfigurable intelligent surfaces,” *J. Inform. & Intelligence*, 2023.

[11] A. Rafique et al., “Reconfigurable intelligent surfaces: Interplay of unit cell and surface-level design and performance under quantifiable benchmarks,” *IEEE Open J. Commun. Soc.*, vol. 4, pp. 1583–1599, 2023.

[12] M. T. Ivrlac and J. A. Nossek, “Toward a circuit theory of communica-
tion,” *IEEE Trans. Circuits Syst.*, vol. 57, no. 7, pp. 1663–1683, 2010.

[13] M. Movahediqomi et al., “Comparison between different designs and realizations of anomalous reflectors for extreme deflections,” *IEEE Trans. Antennas Propag.*, pp. 1–1, 2023.

[14] Y. Li et al., “Tunable perfect anomalous reflection using passive aperi-
odic gratings,” *arXiv:2303.05411*, 2023.

[15] G. Gradoni and M. Di Renzo, “End-to-end mutual coupling aware communication model for reconfigurable intelligent surfaces,” *IEEE Wirel. Commun. Lett.*, vol. 10, no. 5, pp. 938–942, 2021.

[16] P. C. Chaumet, “The discrete dipole approximation: A review,” *Mathématiques*, vol. 10, no. 17, 2022.

[17] R. Faqiri et al., “Physfad: Physics-based end-to-end channel modeling of ris-parametrized environments with adjustable fading,” *IEEE Trans. Wirel. Commun.*, vol. 22, no. 1, pp. 580–595, 2023.

[18] A. Rabault et al., “On the tacit linearity assumption in common cascaded models of RIS-parametrized wireless channels,” *IEEE Trans. Wireless Commun.*, pp. 1–1, 2024.

[19] J. Sol et al., “Experimentally realized physical-model-based frugal wave control in metasurface-programmable complex media,” *Nat. Commun.*, vol. 15, pp. 1–1, 2024.

[20] I. Ahmed et al., “Over-the-air emulation of electronically adjustable rician mimo channels in a programmable-metasurface-stirred reverberation chamber,” *arXiv:2312.00199*, 2023.

[21] X. Qian and M. Di Renzo, “Mutual coupling and unit cell aware optimization for reconfigurable intelligent surfaces,” *IEEE Wireless Commun. Lett.*, vol. 10, no. 6, pp. 1183–1187, June 2021.

[22] M. Di Renzo et al., “Modeling the mutual coupling of reconfigurable metasurfaces,” in *European Conf. Antennas Propag.*, 2023, pp. 1–4.

[23] A. Abrardo et al., “MIMO interference channels assisted by reconfigurable intelligent surfaces: Mutual coupling aware sum-rate optimization,” *IEEE Wirel. Commun. Lett.*, vol. 10, no. 12, pp. 2624–2628, 2021.

[24] P. Mursia et al., “SARIS: Scattering aware reconfigurable intelligent surface model and optimization for complex propagation channels,” *IEEE Wirel. Commun. Lett.*, vol. IEEE Early Access, pp. 1–1, 2023.

[25] H. E. Hassani et al., “Optimization of RIS-aided MIMO - A mutually coupled loaded wire dipole model,” *arXiv:2306.09480*, 2023.

[26] N. S. Perovic et al., “Optimization of ris-aided SISO systems based on a mutually coupled loaded wire dipole model,” *arXiv:2305.12735*, 2023.

[27] M. Akrout et al., “Physically consistent models for intelligent reflective surface-assisted communications under mutual coupling and element size constraint,” *arXiv:2302.11130*, 2022.

[28] K. Konno et al., “Generalised impedance model of wireless links assisted by reconfigurable intelligent surfaces,” *arXiv:2306.03761*, 2023.

[29] P. Zheng et al., “On the impact of mutual coupling on RIS-assisted channel estimation,” *arXiv:2309.04990*, 2023.

[30] R. Ma et al., “Energy efficiency optimization for mutual-coupling-aware wireless communication system based on RIS-enhanced SWIPT,” *IEEE Internet Things J.*, vol. IEEE Early Access, pp. 1–1, 2023.

[31] Z. Zhang et al., “Macromodeling of reconfigurable intelligent surface based on microwave network theory,” *IEEE Trans. Antennas Propag.*, vol. 70, no. 10, pp. 8707–8717, 2022.

[32] P. Zheng et al., “Mutual coupling in ris-aided communication: Model training and experimental validation,” *2311.10544*, 2024.

[33] P. Mursia et al., “Empirical validation of the impedance-based RIS channel model in an indoor scattering environment,” 2023.

[34] D. M. Pozar, *Microwave Engineering; 3rd ed.* Wiley, 2005.

[35] S. Shen et al., “Modeling and architecture design of reconfigurable intelligent surfaces using scattering parameter network analysis,” *IEEE Trans. Wirel. Commun.*, vol. 21, no. 2, pp. 1229–1243, 2022.

[36] F. Liu et al., “Reflectarrays and metasurface reflectors as diffraction gratings,” *IEEE Trans. Antennas Propag.*, vol. 65, pp. 21–32, 2023.

[37] H. Li et al., “Reconfigurable intelligent surfaces 2.0: Beyond diagonal phase shift matrices,” *arXiv:2301.03288*, 2023.

[38] G. Bartoli et al., “Spatial multiplexing in near field mimo channels with reconfigurable intelligent surfaces,” *IET Signal Process.*, vol. 17, 2023.

[39] Q. Li et al., “Reconfigurable intelligent surfaces relying on non-diagonal phase shift matrices,” *IEEE Trans. Veh. Technol.*, pp. 6367–6383, 2022.

[40] H. Li et al., “Beyond diagonal reconfigurable intelligent surfaces: From transmitting and reflecting modes to single-, group-, and fully-connected architectures,” *IEEE Trans. Wirel. Commun.*, pp. 2311–2324, 2023.

[41] M. Nerini et al., “Closed-form global optimization of beyond diagonal reconfigurable intelligent surfaces,” *IEEE Trans. Wirel. Commun.*, 2023.

[42] H. Li et al., “Beyond diagonal reconfigurable intelligent surfaces with mutual coupling: Modeling and optimization,” *arXiv:2310.02708*, 2023.

[43] R. Hansen, “Relationships between antennas as scatterers and as radia-
tors,” *Proc. of the IEEE*, vol. 77, no. 5, pp. 659–662, 1989.

[44] J. A. Nossek et al., “Physically consistent modelling of wireless links with RIS using multiport network analysis,” *arXiv:2308.12223*, 2023.

[45] R. E. Collin and F. J. Zucker, *Antenna Theory*. McGraw-Hill, 1969.

[46] E. F. Knott, *Radar Cross Section*, ser. Radar, Sonar and Navigation. Institution of Engineering and Technology, 2004.

[47] A. Abrardo et al., “Design of reconfigurable intelligent surfaces by using s-parameter multiport network theory – optimization and full-wave validation (extended version),” 2024.

[48] [Online]. Available: https://cdn.macom.com/datasheets/MAVR-011020-1141.pdf.

[49] S. Verho and J.-Y. Chung, “Design of a compact and minimalistic intermediate phase shifting feed network for ka-band electrical beam steering,” *Sensors*, vol. 24, no. 4, 2024.

[50] P. Carter, “Circuit relations in radiating systems and applications to antenna problems,” *Proceedings of the Institute of Radio Engineers*, vol. 20, no. 6, pp. 1004–1041, 1932.

[51] R. Harrington, *Time-harmonic Electromagnetic Fields*. McGraw-Hill, 1961.

[52] R. Collin, *Antennas and Radiowave Propagation*. McGraw-Hill, 1985.

[53] C. Balanis, *Advanced Engineering Electromagnetics*. Wiley, 2012.

[54] R. Collin and F. Zucker, *Antenna Theory*, ser. Antenna Theory. McGraw-Hill, 1969, no. pt. 1.