# Broad and Spectral-Efficient Beamforming for the Uni-polarized
Reconfigurable Intelligent Surfaces

Mohammad Javad-Kalbasi, Student Member, IEEE, Mohammed Saif, Member, IEEE, and
Shahrokh Valaee, Fellow, IEEE Mohammad Javad-Kalbasi, Mohammed Saif, and
Shahrokh Valaee are with the Department of Electrical and Computer
Engineering, University of Toronto, Toronto, Canada, Email:
<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>This work was supported in part by funding from the
Innovation for Defence Excellence and Security (IDEaS) program from the
Department of National Defence (DND).

###### Abstract

A reconfigurable intelligent surface (RIS) is composed of low-cost elements
that manipulate the propagation environment from a transmitter by
intelligently applying phase shifts to incoming signals before they are
reflected. This paper explores a uni-polarized RIS with linear shape aimed at
transmitting a common signal to multiple user equipments (UEs) spread across a
wide angular region. To achieve uniform coverage, the uni-polarized RIS is
designed to emit a broad and spectral-efficient beam featuring a spatially
flat-like array factor, diverging from the conventional narrow beam approach.
To achieve this objective, we start by deriving probabilistic lower and upper
bounds for the average spectral efficiency (SE) delivered to the UEs.
Leveraging the insights from the lower bound, we focus on optimizing the
minimum value of the power domain array factor (PDAF) across a range of
azimuth angles from $-\frac{\pi}{2}$ to $\frac{\pi}{2}$. We employ the
continuous genetic algorithm (CGA) for this optimization task, aiming to
improve the SE delivered to the UEs while also creating a wide beam. Extensive
simulation experiments are carried out to assess the performance of the
proposed code, focusing on key metrics such as the minimum and average values
of the PDAF and the SE delivered to the UEs. Our findings demonstrate that the
proposed code enhances the minimum SE delivered to the UEs while maintaining
the desired attribute of a broad beam. This performance is notably superior to
that of established codes, including the Barker, Frank, and Chu codes.

###### Index Terms:

Reconfigurable intelligent surface, power domain array factor, spectral
efficiency, continuous genetic algorithm, Barker code, Frank code, Chu code.

##  I Introduction

A reconfigurable intelligent surface (RIS) is a key enabling technology for a
smarter radio environment [1, 2, 3], which can control the propagation
environment by smartly tuning phase shifts to direct impinging signals in a
desired way. Since its envision, RIS has been widely studied in the literature
to improve different metrices in various ways, e.g., energy efficiency [2],
user equipment (UE) localization [4], network connectivity [5], and coverage
[1, 6].

In the context of beamforming, the deployment of RIS plays a crucial role in
achieving both broad and spectral-efficient communication. Traditional
beamforming techniques often face limitations in coverage and efficiency due
to the fixed nature of conventional antenna arrays. However, the dynamic
reconfigurability of RIS offers a transformative solution. Specifically, by
intelligently adjusting the phase shifts of its elements, RIS can form highly
directional beams that enhance signal strength and reduce interference, thus
improving spectral efficiency (SE). Moreover, RIS can create multiple
simultaneous beams, broadening coverage and serving multiple UEs efficiently.
This dual capability of enhancing SE and broadening coverage makes RIS an
indispensable technology for next-generation wireless networks, promising
significant improvements in data rates, energy consumption, and overall
network performance.

###  I-A Motivation and Related Works

The previous works on RIS-assisted communications consider enhancing the
performance of individual UEs by configuring phase shifts of a RIS to form
narrow beams towards them [6, 5]. Such narrow beams are effective at targeting
specific areas or directions with high precision. It has been observed that
there are many practical applications where multiple UEs, located in a wide
angular area and possibly at unknown locations, tend to receive a common
signal, necessitating an efficient broad beams approach. Some cases of such
practical situations where broad beams approach is needed are: (i) when a
sender transmits cell-specific signals to receivers, such as primary
synchronization signal, secondary synchronization signal, or cell-specific
reference signal via RIS [7]; (ii) UEs have a common interest in downloading
popular files, especially videos [8]; (iii) small-packet transmission, low-
latency transmission, and high mobility scenarios [9]. For instance,
autonomous vehicles operate in highly dynamic environments that require
continuous and reliable communication for safety and efficient navigation.
This wide coverage and dynamic system requires an efficient broad beams
approach, which is essential for detecting and interacting with other
vehicles, roadside infrastructure, and non-vehicular obstacles. The
implementation of this broad beamforming can significantly enhance vehicular
safety. For example, in situations where an autonomous vehicle must rapidly
communicate emergency braking due to sudden obstacles, the RIS-enabled system
can broadcast this critical information across a broad beam, covering all
directions. This ensures that all nearby vehicles, regardless of their
position relative to the sender, receive the warning promptly and can react
accordingly. Such reliable and efficient communication capabilities also
facilitate better traffic management, allowing vehicles to share information
about traffic conditions and optimal routes in real-time. For such practical
situations, one might use a beam sweeping approach along with a RIS forming
narrow beams towards possible angular directions. This approach is inefficient
in terms of resource utilization, since it needs to continuously sweep across
the area and sequentially directing beams towards different angular
directions. Consequently, it requires rapid reconfiguration of the RIS to
ensure coverage across all desired angles. In addition, each change in
direction might require recalibration and realignment, consuming significant
time and computational resources.

In the literature, several methods for broadening the beam reflected by the
RIS have been proposed in different RIS-assisted systems, e.g., [10, 11, 7,
15]. In particular, the study by [10] aims to achieve quasi-static broad
coverage by minimizing the difference between a predefined pattern and the
power pattern reflected by the RIS. Concurrently, [11] explores the creation
of a wide beam codebook while imposing constraints on the sidelobe levels.
Despite their contributions, these proposed methods fall short in generating a
perfectly broad beam, even within a confined angular range. As will be
elaborated upon later in this paper, a perfectly broad beam is characterized
by a power domain array factor (PDAF) that remains constant across the entire
range of interest.

Achieving an efficient flat beam using conventional RIS that deploys uni-
polarized beamforming is not possible, unless only a single element is
activated [7]. Recently, a dual-polarized beamforming is studied in [12, 13]
to exploit the polarization degree of dual-polarized array antennas. The main
idea is to design beamforming weights of dual-polarized antennas such that
different polarization beams complement each other, yielding an overall broad
radiated beam. The work in [7] utilizes linear dual-polarized RIS to propose a
phase shift design that enables flat beamforming from RIS. It is shown that
the phase shift vectors of RIS elements in horizontal and vertical
polarizations should form a Golay complementary sequence pairs [14] for
generating a flat beam. The authors extend the results to the case of plannar
dual-polarized RISs in [15], and show that a perfectly uniform radiated beam
is only achievable if the auto-correlation function (ACF) of the RIS
configuration matrices add up to a Kronecker delta function, a property
possessed by the so-called Golay complementary array pairs [14, 16]. Although
dual-polarized RISs offer the flexibility to control and manipulate both
horizontal and vertical polarizations, which can be crucial for applications
requiring polarization diversity to enhance channel capacity or to mitigate
polarization-dependent fading and interference, the choice between uni-
polarized and dual-polarized RIS should be guided by the specific requirements
of the deployment scenario and the desired balance between complexity, cost,
and performance. Thus, one may be tempted to use a uni-polarized RIS for broad
beamforming instead of a dual-polarized RIS for the following reasons.

  * •

Simplicity in Design and Fabrication: Uni-polarized RISs are generally simpler
to design and manufacture compared to dual-polarized RISs. This simplicity
arises from the need to manage only one polarization state, which reduces the
complexity of the elements and the control mechanisms required to manipulate
the incident electromagnetic waves.

  * •

Cost Effectiveness: Since they are less complex, uni-polarized RISs tend to be
more cost-effective in terms of both production and maintenance. The reduced
complexity in the electronic and structural design translates into lower
production costs and potentially higher reliability due to fewer components
that could fail.

  * •

Efficiency in Specific Applications: For applications where only one
polarization is relevant or required, a uni-polarized RIS can be more
efficient. This is because it focuses all its resources on optimizing the
manipulation of electromagnetic waves in one polarization state, potentially
achieving better performance in that state than a dual-polarized RIS, which
must split its capabilities between two polarizations [17].

  * •

Reduced Interference: In scenarios where interference is a concern,
controlling only one polarization can help in minimizing the interference
effects. A uni-polarized RIS can be designed to be less susceptible to cross-
polarization interference, which can be advantageous in densely populated
frequency environments [18].

Motivated by the above-mentioned main advantages of using a uni-polarized RIS
over a dual-polarized RIS, this paper is interested in broad beamforming for
the uni-polarized RIS.

###  I-B Contribution

Building on the advantages previously discussed, this paper introduces a novel
code for configuring phase shifts in a uni-polarized, linear-array RIS to
generate a wide and spectrally efficient beamform. Utilizing continuous
genetic algorithm (CGA), this code optimizes the minimum value of the PDAF
across all azimuth angles from $-\frac{\pi}{2}$ to $\frac{\pi}{2}$.
Furthermore, we examine both the average PDAF and the SE delivered to the UEs.
To highlight the importance of optimizing PDAF for achieving high SE levels,
we derive probabilistic lower and upper bounds for the average SE, which are
based on both the minimum and the average PDAF values.

We benchmark our proposed code against established codes, such as the Barker
code [19], the Frank code [20], and the Chu code [21]. These codes are known
for their delta-like ACFs and are ideal for generating broad beams. To
demonstrate the efficacy of our proposed code, we conduct Markov-Chain Monte-
Carlo (MCMC) simulations to assess the minimum and average values of SE
delivered to the UEs. The results show that our proposed code outperforms
traditional codes in terms of minimum PDAF and minimum SE while maintaining
satisfactory average values. This significant improvement in the minimum
values highlights the robustness and reliability of the proposed code,
ensuring better performance under worst-case conditions and proving its
viability for applications requiring broad and spectrally efficient beamforms.

Next, in Section II, the system model is presented. Then flat beam condition
and well-known codes are reviewed in Section III. In Section IV, we establish
the probabilistic lower and upper bounds on the average SE. In Section V, the
proposed code is formally derived and important metrics for evaluating the
performance of a broadbeam are introduced. The numerical results are given in
Section VI. Finally, Section VII concludes the paper.

##  II System Model

In this paper, we consider a downlink RIS-assisted communication system with
one transmitter and a set $\mathcal{K}=~{}\\{1,2,\ldots,K\\}$ of $K$ UEs. The
transmitter intends to transmit a common signal to the UEs through a uni-
polarized RIS with linear shape. Assuming a dense urban scenario, where direct
links between the transmitter and the UEs are blocked, and communication can
only occur through the RIS, RIS can establish reliable communication with the
blocked UEs to deliver this common message over broad beamforming.111Although
we do not consider direct links between the transmitter and the UEs, the
proposed framework still holds for the scenario where direct links exist. With
a minor adaptation, our proposed code can then be incorporated with the direct
links, demonstrating the robustness and applicability of our code. Similar to
[7], we assume that the transmitter and the UEs are equipped with one antenna
each, while the RIS has $M$ elements with a horizontal uniform linear array
(ULA) topology. In an RIS, each meta-atom consists of a reflector that
reflects signals, and can independently modify the phase of the impinging
wireless signals.

Let $\mathbf{h}\in\mathbb{C}^{M}$ and $\mathbf{g}\in\mathbb{C}^{M}$ represent
the transmitter-RIS and RIS-UE channels, respectively. We consider a simple
yet reasonably accurate line-of-sight (LoS) channel between the transmitter
and the RIS. The LoS channels can be expressed as
$\mathbf{h}=~{}\sqrt{\beta_{h}G_{0}(\theta_{h})}\mathbf{a}(\theta_{h})$ and
$\mathbf{g}=\sqrt{\beta_{g}G_{0}(\theta)}\mathbf{a}{(\theta)}$, where
$\beta_{h}$ and $\beta_{g}$ denote the path-loss at the reference RIS,
$\theta_{h}$ denotes the angle of arrival (AoA) from the transmitter to the
RIS, which is assumed to be known and fixed at the deployment stage, $\theta$
is the angle of departure (AoD) from the RIS to a typical UE, $G_{0}(\cdot)$
is the radiation power pattern of a single RIS element, and
$\mathbf{a}(\cdot)$ is the RIS array response vector. Further, we denote
$\mathbf{\Phi}=[\phi_{1},\ldots,\phi_{m},\ldots,\phi_{M}]$ as the phase shift
configuration vector of the RIS, where $\phi_{m}$ denotes the phase shift
applied by the $m$-th RIS element to the incident signal. Let us define the
vector $\mathbf{\Psi}=[\psi_{1},\ldots,\psi_{m},\ldots,\psi_{M}]$, where
$\psi_{m}=e^{j\phi_{m}}$. Thus, the received signal at an arbitrary UE can be
written as222We assume a LoS channel between the transmitter and the RIS,
which is the most practical scenario [22]. We intentionally consider LoS
between the RIS and the UEs because we want to achieve flat-like array gain in
all LoS directions.

$y=\sqrt{P}\mathbf{g}^{T}\text{diag}\left(\mathbf{\Psi}\right)\mathbf{h}s+n,$
(1)

where $\text{diag}\left(\mathbf{\Psi}\right)$ is a diagonal matrix with
diagonal elements $\mathbf{\Psi}$, $s\backsim\mathcal{N}_{\mathbb{C}}(0,1)$ is
the transmitted signal, $P$ is the transmit power, and
$n\backsim\mathcal{N}_{\mathbb{C}}(0,\sigma^{2})$ is the receiver noise, where
$\sigma^{2}$ denotes the noise power. The array response vector can be
expressed as [23]

$\mathbf{a}(x)=[1,e^{-j\frac{2\pi\Delta}{\lambda}\sin{x}},\ldots,e^{-j\frac{(M-1)2\pi\Delta}{\lambda}\sin{x}}]^{T},$

where $\Delta$ is the inter-element spacing between adjacent RIS elements and
$\lambda$ is the wavelength of the transmitted signal. We can alternatively
rewrite (1) as

$y=\sqrt{PG_{0}(\theta_{h})G_{0}(\theta)\beta_{h}\beta_{g}}\mathbf{\Psi}(\mathbf{a}(\theta_{h})\odot\mathbf{a}(\theta))s+n,$

where the notation $\mathbf{a}(\theta_{h})\odot\mathbf{a}(\theta)$ represents
the element-wise product between the vectors $\mathbf{a}(\theta_{h})$ and
$\mathbf{a}(\theta)$. Then, the signal-to-noise ratio (SNR) at a typical UE
can be written as

$\text{SNR}=\frac{P\beta_{h}\beta_{g}}{\sigma^{2}}G_{0}(\theta_{h})G_{0}(\theta)A(\mathbf{\Phi},\theta),$

where

$\displaystyle A(\mathbf{\Phi},\theta)$ $\displaystyle=$
$\displaystyle\left|\mathbf{\Psi}(\mathbf{a}(\theta_{h})\odot\mathbf{a}(\theta))\right|^{2}$
(2) $\displaystyle=$
$\displaystyle\left|\sum\limits_{m=1}^{M}e^{j\phi_{m}}e^{-j\frac{2\pi\Delta(m-1)}{\lambda}\left(\sin{\theta_{h}}+\sin{\theta}\right)}\right|^{2}$

represents the PDAF of the RIS. The total radiation power pattern observed by
a typical UE is given by
$G(\mathbf{\Phi},\theta)=~{}G_{0}(\theta_{h})G_{0}(\theta)A(\mathbf{\Phi},\theta)$.

Our aim in this paper is to design a coding scheme that ensures the RIS
radiated signal forms a broad and spectrally efficient beam, covering the
entire angular range where potential UEs may be located. Before presenting our
proposed code in Section V, we will first derive a condition necessary for
generating a flat-like beam and then review several well-known coding schemes
in the next section.

##  III Flat-like beamforming

First, we derive a condition for radiating a flat-like beam from the RIS. Let
us define

$\alpha=\frac{2\pi\Delta}{\lambda}\left(\sin{\theta_{h}}+\sin{\theta}\right).$
(3)

Then, the PDAF can be written as

$A(\mathbf{\Phi},\alpha)={\left|\sum_{m=1}^{M}e^{j\phi_{m}}e^{-j(m-1)\alpha}\right|}^{2}.$
(4)

The term represented in (4) corresponds to the squared (spatial) discrete-time
Fourier transforms of the sequence $\mathbf{\Psi}$, when this sequence is
zero-padded. Given that the power spectral density (PSD) of a sequence is
equal to the square of its Fourier transform [24], (4) can be rephrased as

$A(\mathbf{\Phi},\alpha)=S_{\mathbf{\Psi}}(\alpha),$

where $S_{\mathbf{\Psi}}(\alpha)$ denotes the PSD of $\mathbf{\Psi}$. Noting
Wiener-Khinchin theorem, the PSD and ACF form Fourier transform pairs [24].
Thus, we have

$F\\{R_{\mathbf{\Psi}}[\tau]\\}=S_{\mathbf{\Psi}}(\alpha),$

where $R_{\mathbf{\Psi}}[\tau]$ indicates the ACF of the vector
$\mathbf{\Psi}\in\mathbb{C}^{M}$, which is given by

$R_{\mathbf{\Psi}}[\tau]=\begin{cases}\sum\limits_{m=1}^{M-\tau}\psi_{m}\psi_{m+\tau}^{\star},&\text{if}~{}\tau=0,\ldots,M-1\\\
\\\
\sum\limits_{m=1}^{M+\tau}\psi_{m-\tau}\psi_{m}^{\star},&\text{if}~{}\tau=-M+1,\ldots,-1\\\
\\\ 0,&\text{otherwise.}\end{cases}$ (5)

It is straightforward to see that the peak value of the ACF occurs at zero
lag, expressed as

$R_{\mathbf{\Psi}}[0]=\sum\limits_{m=1}^{M}|\psi_{m}|^{2}=\sum\limits_{m=1}^{M}|e^{j\phi_{m}}|^{2}=M.$

Moreover, noting (5), we conclude that

$R_{\mathbf{\Psi}}[M-1]=R^{\star}_{\mathbf{\Psi}}[-M+1]=\psi_{1}\psi_{M}^{\star}=e^{j(\phi_{1}-\phi_{M})}\neq
0.$

This indicates that achieving zero for all sidelobes of the ACF is unfeasible.
Consequently, the ACF cannot perfectly mimic a delta function, leading to the
conclusion that the PDAF cannot be uniformly flat. Although it is not possible
to create a perfectly flat beam, we can produce a beam that approximates
flatness by reducing the sidelobe levels in the ACF, thus achieving flat-like
beams. To accomplish this, given that the PDAF and ACF are Fourier transform
pairs, it is essential that $R_{\mathbf{\Psi}}[\tau]$ behaves like a delta
function with respect to $\tau$, implying minimal sidelobes in the function.
Notable codes that meet this criterion include the Barker, Frank, and Chu
codes [19], [20], [21]. Next, we briefly review the structure of these well-
known codes.

###  III-A Barker Code

In telecommunications, the Barker code refers to a finite string of digital
values possessing the optimal autocorrelation characteristic. It serves as a
synchronization pattern, facilitating alignment between the sender and the
receiver in a bitstream. It is established that the absolute value of
sidelobes in the Barker code is limited to at most $1$ [19], rendering it a
favorable choice for generating a broad PDAF. There are only nine known Barker
codes, with each having a maximum length of $M$ up to $13$. These known Barker
codes are given in Table I. The sidelobe level ratio is calculated as
$20\log_{10}\left(\frac{1}{M}\right)$ in dB.

TABLE I: Known Barker Codes Length ($M$) | Codes ($\mathbf{\Phi}^{\text{Barker}}$) | Sidelobe Level Ratio
---|---|---
$2$ |  $(0,\pi)$ , $(0,0)$ |  $-6$ dB
$3$ | $(0,0,\pi)$ |  $-9.5$ dB
$4$ |  $(0,0,\pi,0)$, $(0,0,0,\pi)$ |  $-12$ dB
$5$ | $(0,0,0,\pi,0)$ |  $-14$ dB
$7$ | $(0,0,0,\pi,\pi,0,\pi)$ |  $-16.9$ dB
$11$ | $(0,0,0,\pi,\pi,\pi,0,\pi,\pi,0,\pi)$ |  $-20.8$ dB
$13$ | $(0,0,0,0,0,\pi,\pi,0,0,\pi,0,\pi,0)$ |  $-22.3$ dB

###  III-B Frank Code

Another family of codes that has delta-like ACF is called the Frank code [20],
which represents a polyphase code modulation format utilized for pulse
compression. It employs harmonically related phases derived from specific
fundamental phase increments. Let us define the square $N\times N$ matrix as

$\Omega=\left[\frac{2\pi}{N}(i-1)(j-1)~{}(\text{mod}~{}2\pi)\right],$

for $i=1,2,\ldots,N$ and $j=1,2,\ldots,N$. Then the Frank code with length
$M=N^{2}$ is given by [20]

$\mathbf{\Phi}^{\text{Frank}}=\left(\Omega^{(1)},\Omega^{(2)},\ldots,\Omega^{(N)}\right),$
(6)

where $\Omega^{(i)}$ is the $i$-th row of matrix $\Omega$ for
$i=1,2,\ldots,N$. For instance, in the case of the Frank code with $N=4$, the
matrix $\Omega$ is

$\Omega=\begin{bmatrix}0&0&0&0\\\ 0&\frac{\pi}{2}&\pi&\frac{3\pi}{2}\\\
0&\pi&0&\pi\\\ 0&\frac{3\pi}{2}&\pi&\frac{\pi}{2}\end{bmatrix}$

Thus, the Frank code with length $16$ is expressed by the sequence

$\mathbf{\Phi}^{\text{Frank}}=\left(0,0,0,0,0,\frac{\pi}{2},\pi,\frac{3\pi}{2},0,\pi,0,\pi,0,\frac{3\pi}{2},\pi,\frac{\pi}{2}\right).$

###  III-C Chu Code

Frank codes are constrained by the requirement that their lengths should be
perfect squares. In contrast, Chu codes [21], renowned for their beneficial
autocorrelation characteristics, do not have this limitation on code lengths.
The definition of this family of codes is as follows

$\phi_{m}^{\text{Chu}}=\begin{cases}\frac{q\pi{(m-1)}^{2}}{M}~{}(\text{mod}~{}2\pi),&\text{if}~{}M~{}\text{is
even,}\\\ \\\ \frac{q\pi
m(m-1)}{M}~{}(\text{mod}~{}2\pi),&\text{if}~{}M~{}\text{is odd},\end{cases}$
(7)

where $m=1,2,\ldots,M$ and $q$ is a positive integer relatively prime to $M$.
The Chu code is essential to the 3GPP Long Term Evolution (LTE) air interface,
being employed in several key components, including the Primary
Synchronization Signal (PSS), the random access preamble (PRACH), the uplink
control channel (PUCCH), the uplink traffic channel (PUSCH), and the sounding
reference signals (SRS). The Chu code is employed to design the phase shift of
RIS elements, aiming to produce a PDAF with a flat-like appearance.

Figure 1: ACF of different codes.

In Fig. 1, the real and imaginary parts of the ACF for the discussed codes are
depicted for various values of $M$ and different lag values. As it can be
observed, for the Barker code, the imaginary part of the sidelobes in the ACF
is zero, and the absolute value of real component is constrained to a maximum
of one. When comparing the Frank code to the Chu code, it is evident that the
Frank code exhibits a slightly higher imaginary part of the sidelobes in the
ACF. However, the real part of the sidelobes in the Frank code is lower than
in the Chu code. Overall, these codes are characterized by a delta-like ACF,
where the sidelobe levels are markedly lower than the peak. Consequently, the
resulting PDAF have a flat-like characteristic. In our simulations, the above-
mentioned codes are employed to generate a flat-like PDAF.

##  IV Spectral-efficient beamforming

In this section, we derive the probabilistic lower and upper bounds on the
average SE delivered to the UEs. These bounds are crucial for both the design
and performance analysis of the proposed code.

We assume that $K$ UEs are uniformly distributed over a half-ring coverage
area

$\begin{cases}R_{1}\leq r\leq R_{2}\\\ \\\
\frac{-\pi}{2}\leq\theta\leq\frac{\pi}{2}.\\\ \end{cases}$ (8)

Defining $v:=\frac{P}{\sigma^{2}}\beta_{h}(r_{h})G_{0}(\theta_{h})$, the SE of
the $k$-th UE is given by

$S_{k}=\log_{2}\left(1+v\beta_{g}(r_{k})G_{0}(\theta_{k})A(\mathbf{\Phi},\theta_{k})\right),$

where $\beta_{h}(r_{h})$ and $\beta_{g}(r_{k})$ denote the path-loss terms at
the reference RIS; $r_{h}$ and $r_{k}$ are the distances between the
transmitter and the RIS and between the RIS and the $k$-th UE, respectively.
Furthermore, $\theta_{k}$ is the AoD from the RIS to the $k$-th UE. We assume
that the UEs are uniformly distributed such that $r_{k}\sim~{}U[R_{1},R_{2}]$,
$\theta_{k}\sim U\left[-\frac{\pi}{2},\frac{\pi}{2}\right]$, and $\theta_{k}$
is independent of $r_{k}$. To streamline our notation, let us define
$G_{0}^{\text{min}}:=\min\limits_{\theta\in\left[-\frac{\pi}{2},\frac{\pi}{2}\right]}G_{0}(\theta)$,
$G_{0}^{\text{max}}:=~{}\max\limits_{\theta\in\left[-\frac{\pi}{2},\frac{\pi}{2}\right]}G_{0}(\theta)$,
and
$A^{\text{min}}(\mathbf{\Phi}):=\min\limits_{\theta\in\left[-\frac{\pi}{2},\frac{\pi}{2}\right]}A(\mathbf{\Phi},\theta)$.
In the following Proposition, we establish the probabilistic lower and upper
bounds for $\overline{S}\triangleq\frac{1}{K}\sum\limits_{k=1}^{K}S_{k}$ which
represents the average SE delivered to the UEs.

######  Proposition 1.

For any $\epsilon>0$, there exists a positive integer $N_{\epsilon}$ such that
when $K\geq N_{\epsilon}$, the following holds with probability $1$

$E_{r}\left\\{\log_{2}\left(1+vG_{0}^{\text{min}}A^{\text{min}}(\mathbf{\Phi})\beta_{g}(r)\right)\right\\}-\epsilon<\overline{S}\\\
\overline{S}<\log_{2}\left(1+vG_{0}^{\text{max}}E_{r}\\{\beta_{g}(r)\\}E_{\theta}\\{A(\mathbf{\Phi},\theta)\\}\right)+\epsilon.$
(9)

###### Proof.

Please refer to Appendix A.∎

Although the bounds derived in the Proposition 1 may not be tight, they offer
valuable insights into the key metrics that should be considered when
designing the phase shifts of RIS elements. It can be noted that the lower
bound increases with $A^{\text{min}}(\mathbf{\Phi})$. Thus, by addressing the
optimization task $\max\limits_{\mathbf{\Phi}}A^{\text{min}}(\mathbf{\Phi})$,
we can enhance this lower bound, leading to improved average SE. Similarly,
the upper bound rises with $E_{\theta}\\{A(\mathbf{\Phi},\theta)\\}$. As such,
a code with a higher value of $E_{\theta}\\{A(\mathbf{\Phi},\theta)\\}$ allows
for a greater potential increase in average SE.

##  V Broad Beamforming

In this section, we introduce a novel code designed to optimize the phase
shifts of RIS elements to achieve a flat-like PDAF. Motivated by the derived
lower bound in Proposition 1, this code maximizes the minimum value of the
PDAF across all azimuth angles from $\frac{-\pi}{2}$ to $\frac{\pi}{2}$.
Additionally, we derive a closed-form expansion for the average PDAF as a
secondary metric for comparing the performance of different codes. As noted in
Proposition 1, a code that has higher value of
$E_{\theta}\\{A(\mathbf{\Phi},\theta)\\}$ allows for a greater potential
increase in average SE.

###  V-A Proposed Code

Contrary to the previous codes that design phase shifts in the time domain by
minimizing the sidelobes of the ACF, our proposed code seeks to design the
phase shifts in the frequency domain, with the objective of rendering the PDAF
flat-like. To accomplish this, we address the following optimization problem

$\max_{\mathbf{\Phi}}\min_{\theta\in\left[-\frac{\pi}{2},\frac{\pi}{2}\right]}A(\mathbf{\Phi},\theta).$
(10)

Considering that the UEs are uniformly distributed around the RIS, we propose
to maximize the worst case PDAF in problem (10). For a fixed phase shift
vector $\mathbf{\Phi}$, the function $A(\mathbf{\Phi},\theta)$ is highly non-
convex. Therefore, it is not possible to optimally solve the optimization
problem
$\min\limits_{\theta\in\left[-\frac{\pi}{2},\frac{\pi}{2}\right]}A(\mathbf{\Phi},\theta)$.
To tackle this optimization problem, the continuous domain
$\left[-\frac{\pi}{2},\frac{\pi}{2}\right]$ is discretized into a finite set
of points defined as $\theta_{i}=\frac{-\pi}{2}+\frac{\pi i}{D}$, where
$i=0,1,2,\ldots,D$. This discretization simplifies the problem by transforming
an infinite set of possible values of $\theta$ into a finite set, making the
problem more tractable computationally.

As $D$ increases, the resolution of the discretization improves, and the
difference between adjacent discrete points, $\Delta\theta=\frac{\pi}{D}$,
becomes smaller. This finer discretization allows for a more thorough
exploration of the objective function $A(\mathbf{\Phi},\theta)$ within the
given range. Hence, we use the following approximation

$\min_{\theta\in\left[-\frac{\pi}{2},\frac{\pi}{2}\right]}A(\mathbf{\Phi},\theta)\approx\min_{i=0,1,\ldots,D}A\left(\mathbf{\Phi},\frac{-\pi}{2}+\frac{\pi
i}{D}\right),$ (11)

where $D$ is a large integer value. Let us define the approximation error $e$
as

$e\triangleq\left|\min_{\theta\in\left[-\frac{\pi}{2},\frac{\pi}{2}\right]}A(\mathbf{\Phi},\theta)-\min_{i=0,1,\ldots,D}A\left(\mathbf{\Phi},\frac{-\pi}{2}+\frac{\pi
i}{D}\right)\right|.$

In what follows, we derive an asymptotic upper bound for the approximation
error $e$. To begin, we present a lemma that establishes an important property
of the PDAF function.

######  Lemma 1.

Given any phase shift vector $\mathbf{\Phi}$, the function
$A(\mathbf{\Phi},\theta)$ is Lipschitz continuous333A function $f(\cdot)$ is
called Lipschitz continuous on $[a,b]$ with Lipschitz constant $C$ if the
inequality $|f(x_{2})-f(x_{1})|\leq C|x_{2}-x_{1}|$ holds for any
$x_{1},x_{2}\in[a,b]$. in $\theta$ with a Lipschitz constant of
$\frac{(M-1)M^{2}\pi\Delta}{\lambda}$. Specifically, for any
$\theta_{1},\theta_{2}\in\left[-\frac{\pi}{2},\frac{\pi}{2}\right]$, the
following inequality holds

$\left|A(\mathbf{\Phi},\theta_{2})-A(\mathbf{\Phi},\theta_{1})\right|\leq\frac{(M-1)M^{2}\pi\Delta}{\lambda}|\theta_{2}-\theta_{1}|.$

###### Proof.

Please refer to Appendix B.∎

We emphasize that Lipschitz continuity is a property that quantifies how
smoothly a function behaves. Specifically, it provides a bound on how much the
function can change when its input changes. The Lipschitz constant given in
Lemma 1 is $\frac{(M-1)M^{2}\pi\Delta}{\lambda}$. This constant depends on the
number of RIS elements $M$ and ratio $\frac{\Delta}{\lambda}$. The form of
this constant suggests that as the number of elements $M$ increases or the
ratio $\frac{\Delta}{\lambda}$ becomes larger, the bound on how fast
$A(\mathbf{\Phi},\theta)$ can change with $\theta$ becomes larger. Lemma 1
provides the foundational basis necessary for proving the following theorem.

######  Theorem 1.

For a discretization with $D+1$ points, where $D$ is sufficiently large444In
the proof, we precisely specify how large $D$ needs to be., we have

$e<\frac{(M-1)M^{2}\pi^{2}\Delta}{\lambda D}.$ (12)

###### Proof.

Please refer to Appendix C.∎

Although the obtained upper bound on the approximation error is not
necessarily tight, it offers insights into the key parameters that influence
the accuracy of the approximation. From the given upper bound (12), we observe
that the approximation error decreases as $D$ increases. Conversely, this
upper bound increases with the number of elements $M$, suggesting that higher
values of $M$ can lead to greater approximation errors.

By applying the discussed approximation, our goal optimization problem can be
rewritten as

$\max_{\mathbf{\Phi}}\min_{i=0,1,\ldots,D}A\left(\mathbf{\Phi},\frac{-\pi}{2}+\frac{\pi
i}{D}\right).$

• Generate the initial population
$\mathbb{P}^{(0)}={\left[\mathbf{\Phi}_{1}^{(0)},\mathbf{\Phi}_{2}^{(0)},\ldots,\mathbf{\Phi}_{2L}^{(0)}\right]}^{T}$.

• Let
$\eta\left({\mathbf{\Phi}_{\ell}^{(0)}}\right)=\min\limits_{i=0,1,\ldots,D}A\left(\mathbf{\Phi}_{\ell}^{(0)},\frac{-\pi}{2}+\frac{\pi
i}{D}\right)$ be the fitness value for $\ell=1,2,\ldots,2L$.

• Define the selection random variable $Q^{(0)}$ on the set
$\\{1,2,\ldots,2L\\}$ with probability mass function
$Pr\\{Q^{(0)}=k\\}=\frac{\eta\left({\mathbf{\Phi}_{k}^{(0)}}\right)}{\sum\limits_{\ell=1}^{2L}\eta\left({\mathbf{\Phi}_{\ell}^{(0)}}\right)}$.

for $i=1:N$ do

• Select $2L$ individuals from the set $\mathbb{P}^{(i-1)}$ according to the
distribution defined by the selection random variable $Q^{(i-1)}$.

• Randomly select $L$ pairs of individuals from $\mathbb{P}^{(i-1)}$ for
crossover. Replace each selected pair with the two offsprings generated from
their crossover.

• Add a small random perturbation to each element of the generated offsprings
(mutation).

• Determine the updated population $\mathbb{P}^{(i)}$ and the corresponding
selection random variable $Q^{(i)}$.

end for

Algorithm 1 Proposed Code

To address this optimization problem, we employ the CGA. The CGA is an
optimization technique designed for finding optimal solutions within
continuous parameter spaces [26]. It draws inspiration from the principles of
natural selection and evolutionary processes, evolving a pool of potential
solutions across successive generations to refine them progressively. The key
phases of the CGA are as follows:

  * •

Initialization: A population of initial candidate solutions is generated
randomly, with the population size determined by the complexity of the
problem. Each candidate is represented by a vector of continuous values.

  * •

Selection: Solutions are assessed using a fitness function that evaluates
their performance on the problem. In this study,
$\eta\left({\mathbf{\Phi}}\right)\triangleq\min\limits_{i=0,1,\ldots,D}A\left(\mathbf{\Phi},\frac{-\pi}{2}+\frac{\pi
i}{D}\right)$ serves as the fitness function. The most effective solutions are
chosen as parents for the subsequent generation.

  * •

Crossover: Offspring solutions are produced by combining pairs of parent
solutions. This is achieved by calculating the weighted sum of the parent
vectors, resulting in new solution vectors that embody characteristics from
both parents. The crossover process aids in exploring the search space more
comprehensively and generating a variety of candidate solutions.

  * •

Mutation: To diversify the search and avoid local optima, random alterations
are made to the offspring solutions. This involves adding a small random value
to each element of the solution vector. If the mutation step results in a
variable falling outside the interval $[0,2\pi]$, we automatically adjust the
value to the nearest boundary. Specifically, if the mutation causes the value
to drop below the lower bound $0$, we reset it to $0$. Conversely, if the
value exceeds the upper bound $2\pi$, we reset it to $2\pi$. This clamping
mechanism ensures that all variables remain within the defined range
throughout the optimization process.

The CGA iterates through selection, crossover, and mutation until it meets a
specified termination criterion. We provide detailed implementation of the CGA
for optimizing the phase shifts of RIS elements in Algorithm 1. Finally, we
point out that a rough estimate of the time complexity of a CGA can be
expressed as $\mathcal{O}\left(N\times 2L\times(D+1)\times a\right)$, where
$N$ is the number of generations, $2L$ is the population size, $D+1$ is the
number of discrete points for approximating the value of
$\min\limits_{\theta\in\left[-\frac{\pi}{2},\frac{\pi}{2}\right]}A(\mathbf{\Phi},\theta)$,
and $a$ is the complexity of finding the value of $A(\mathbf{\Phi},\theta)$.
While the time complexity of Algorithm 1 may initially appear high, it can be
executed offline as it does not rely on real-time data. This allows for the
optimized phase shifts to be precomputed and stored. When broad beamforming is
needed, the RIS elements can be adjusted to these pre-stored values, ensuring
efficient and rapid deployment.

Figure 2: Convergence of Algorithm 1 for $M=64$.

$U_{\frac{1}{2}}(\mathbf{\Phi})=\frac{M+2\sum\limits_{n=1}^{M-1}\sum\limits_{m=n+1}^{M}J_{0}((m-n)\pi)\cos{\left(\phi_{m}-\phi_{n}-(m-n)\pi\sin{\theta_{h}}\right)}}{M+2\sum\limits_{n=1}^{M-1}\sum\limits_{m=n+1}^{M}{(-1)}^{m-n}J_{0}((m-n)\pi)}$
(13)

###  V-B Second Metric: Average Value of PDAF

So far, we have proposed a code for designing the phase shift of RIS elements
with the aim of maximizing the minimum value of PDAF over azimuth angle
$\theta\in\left[-\frac{\pi}{2},\frac{\pi}{2}\right]$. Comparing the average
PDAF value across various codes is also important. Noting the derived upper
bound on the average SE delivered to the UEs in Section IV, which increases
with $E_{\theta}\\{A(\mathbf{\Phi},\theta)\\}$, utilizing a code with a higher
value of $E_{\theta}\\{A(\mathbf{\Phi},\theta)\\}$ allows for a greater
potential increase in average SE. A closed-form expansion for
$E_{\theta}\left\\{A(\mathbf{\Phi},\theta)\right\\}$ is given in the following
theorem.

######  Theorem 2.

Assuming that $\theta\thicksim U\left[-\frac{\pi}{2},\frac{\pi}{2}\right]$, we
have

$E_{\theta}\left\\{A(\mathbf{\Phi},\theta)\right\\}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}$
$\displaystyle=$ $\displaystyle
2\sum_{n=1}^{M-1}\sum_{m=n+1}^{M}J_{0}(a_{m-n})\cos{\left(\phi_{m}-\phi_{n}-a_{m-n}\sin{\theta_{h}}\right)}$
$\displaystyle+M,$

where $J_{0}(\cdot)$ is the Bessel function of the first kind with order zero
defined as

$J_{0}(x)\triangleq
E_{\theta}\left\\{e^{jx\sin{\theta}}\right\\}=\frac{1}{\pi}\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}}e^{jx\sin{\theta}}\,d\theta,$
(14)

and $a_{k}$ is given by $a_{k}:=2\pi\frac{\Delta}{\lambda}k$ for integer
values of $k$.

###### Proof.

Please refer to Appendix D.∎

As it can be observed, the value of
$E_{\theta}\left\\{A(\mathbf{\Phi},\theta)\right\\}$ depends on the phase
shift vector $\mathbf{\Phi}$ and ratio $\frac{\Delta}{\lambda}$. In this
paper, we assume that $\frac{\Delta}{\lambda}=\frac{1}{2}$, which is more
prevalent in the literature, especially in the field of antenna and array
design [28]. This spacing helps to avoid grating lobes (unwanted radiation
peaks at certain angles) in the far-field radiation pattern of the array when
it is steered away from the broadside direction. It also ensures that the
array can achieve good performance in terms of beamforming and spatial
resolution without unnecessarily increasing the complexity and cost. Hence,
$\frac{\Delta}{\lambda}=\frac{1}{2}$ is considered a standard in many
applications since it balances between performance and practicality.

Now, let us define

$U_{\frac{\Delta}{\lambda}}(\mathbf{\Phi})\triangleq\frac{E_{\theta}\left\\{A(\mathbf{\Phi},\theta)\right\\}}{\max\limits_{\mathbf{\Phi}}E_{\theta}\left\\{A(\mathbf{\Phi},\theta)\right\\}}.$
(15)

Noting that $0<U_{\frac{\Delta}{\lambda}}(\mathbf{\Phi})\leq 1$,
$U_{\frac{\Delta}{\lambda}}(\mathbf{\Phi})$ quantifies the normalized average
PDAF value. Indeed, a high average PDAF value for a particular code implies
that $U_{\frac{\Delta}{\lambda}}(\mathbf{\Phi})$ is closer to $1$ for that
code. We point out that this normalization facilitates easier comparisons
between different codes. In the following Proposition, we derive a closed-form
expansion for the $U_{\frac{1}{2}}(\mathbf{\Phi})$.

######  Proposition 2.

For a given phase shift vector $\mathbf{\Phi}$, the expanded formula for
calculating $U_{\frac{1}{2}}(\mathbf{\Phi})$ is given in (13).

###### Proof.

Please refer to Appendix E.∎

In Section VI, we consider $U_{\frac{1}{2}}(\mathbf{\Phi})$ as a metric for
comparing the performance of different codes.

TABLE II: Table of the Proposed Code for Various $M$ values $M$ | Proposed Code ($\mathbf{\Phi}$)
---|---
$13$ |  (0.9255, 4.6334, 2.0632, 5.6294, 3.0091, 3.3760, 0.8825, 1.4025, 5.3366, 5.9881, 0.4434, 1.0334, 1.6318)
$16$ |  (5.1194, 5.9698, 0.6334, 2.6752, 4.1800, 3.1756, 2.7309, 3.9677, 1.5603, 3.9362, 0.7873, 4.6435, 3.6637, 2.1817, 6.1171, 4.3546)
$36$ |  (2.5458, 5.8091, 4.8406, 6.1005, 0.6850, 3.9223, 3.3962, 4.3150, 1.2969, 0.4361, 2.3980, 1.1877, 0.0314, 4.5914, 3.0137, 4.7279, 0.1981, 6.1708, 0.8647, 4.1516, 2.2116, 1.7623, 2.7874, 2.9865, 4.2146, 2.0956, 3.4289, 1.6303, 3.8954, 1.7463, 3.3191, 4.9514, 1.6416, 3.8338, 6.1454, 2.1315)
$64$ |  (6.2154, 0.9377, 5.9622, 2.3982, 2.0550, 5.2374, 4.6543, 6.1568, 2.0360, 3.3983, 3.2310, 4.6648, 5.7030, 0.2454, 1.3573, 5.7993, 4.0525, 1.7875, 2.6875, 4.6555, 4.1909, 3.3503, 4.3216, 3.1219, 4.1523, 1.4800, 3.9280, 1.8255, 2.5134, 4.4152, 1.4448, 2.7278, 6.0119, 5.6658, 3.4961, 3.4214, 1.3725, 3.1275, 0.9327, 3.4367, 4.3562, 5.5590, 3.9093, 3.5500, 4.7366, 3.0102, 0.2376, 4.6770, 5.2783, 2.3078, 0.3114, 4.7210, 0.4638, 5.7200, 4.5785, 1.8969, 5.5300, 1.3563, 5.1408, 4.0969, 1.8617, 0.9126, 5.7912, 4.1614)

##  VI Numerical Results

In this section, we present numerical results to assess the effectiveness of
the proposed code for broad beamforming. In the simulation, we assume that
$\lambda=10$ cm, $\Delta=\frac{\lambda}{2}$, $\theta_{h}=0$, and
$M\in~{}\\{13,16,36,64\\}$.

Figure 3: *

(a) $M=13$

Figure 4: *

(b) $M=16$

Figure 5: *

(c) $M=36$

Figure 6: *

(d) $M=64$

Figure 7: PDAF versus azimuth angle for various $M$ values. TABLE III: Obtained Numerical Values for the PDAF | $M=13$ | $M=16$
---|---|---
Codes |  $A^{\text{min}}(\mathbf{\Phi})$ dB | $U_{\frac{1}{2}}(\mathbf{\Phi})$ |  $A^{\text{min}}(\mathbf{\Phi})$ dB | $U_{\frac{1}{2}}(\mathbf{\Phi})$
Proposed code | $9.7142$ | $0.3181$ | $10.2373$ | $0.3103$
Chu code | $-0.4627$ | $0.4168$ | $-25.0169$ | $0.2941$
Barker code | $9.5994$ | $0.3634$ | $-$ | $-$
Frank code | $-$ | $-$ | $0.9454$ | $0.2907$
random code | $3.0211$ | $0.3086$ | $2.3690$ | $0.2891$
| $M=36$ | $M=64$
---|---|---
Codes |  $A^{\text{min}}(\mathbf{\Phi})$ dB | $U_{\frac{1}{2}}(\mathbf{\Phi})$ |  $A^{\text{min}}(\mathbf{\Phi})$ dB | $U_{\frac{1}{2}}(\mathbf{\Phi})$
Proposed code | $12.9047$ | $0.1933$ | $14.0971$ | $0.1437$
Chu code | $-9.8148$ | $0.1939$ | $-1.6166$ | $0.1471$
Frank code | $1.2058$ | $0.1959$ | $1.5626$ | $0.1472$
random code | $0.7339$ | $0.1643$ | $-2.9884$ | $0.1414$

For designing the phase shifts of RIS elements, we consider the following
codes.

  * •

Proposed code: We employ Algorithm 1 that utilizes CGA to design the code.
Initially, we set $D$ to $1000$ in the approximation formula given in (11). We
then test various population sizes, setting $2L=1000\ell$ for
$\ell=1,2,\ldots,8$. The algorithm is executed $50$ times for each population
size. We also set the maximum number of generations to $300$. Ultimately, we
select the best solution based on the outcomes from the different population
sizes and runs. In Fig. 2, the best fitness values obtained by Algorithm 1 are
plotted against the generation index for various population sizes when $M=64$.
As it can be observed, the best fitness value is achieved when the population
size ($2L$) is set to $6000$. The list of proposed codes obtained for various
values of $M$ is presented in Table II. Finally, we note that although these
codes are derived when $\theta_{h}=0$, they can be readily updated for a
general $\theta_{h}$ without the need to re-execute the CGA. To illustrate, if
$\phi_{m}$ represents the phase shift of the $m$-th RIS element for the case
of $\theta_{h}=0$, the adjusted phase shift for a general $\theta_{h}$ is

$\phi_{m}+\frac{2\pi\Delta(m-1)}{\lambda}\sin(\theta_{h})~{}(\text{mod}~{}2\pi).$

  * •

Chu code: This code is defined in (7) to design the phase shifts of the RIS
elements. We optimize the parameter $q$ in (7) to maximize
$A^{\text{min}}(\mathbf{\Phi})$, and the optimal values obtained are $3$,
$11$, $13$, and $43$ for $M=~{}13,16,36,\text{and}~{}64$, respectively. We
point out that these optimized values are relatively prime to their
corresponding $M$ values.

  * •

Frank code: We employ the Frank code as specified in (6). Note that this code
is only defined when $M$ is a perfect square integer as mentioned in Section
III.

  * •

Barker code: We use the Barker code with length $13$ as given in Table I.

  * •

Random code: We generate $1000$ random phase shift vectors and select the one
that yields the maximum value of $A^{\text{min}}(\mathbf{\Phi})$.

Fig. 7 displays the PDAF of various coding methods for
$M\in\\{13,16,36,64\\}$. As anticipated by Lemma 1, the PDAF exhibits a more
rapid variation with respect to $\theta$ as the value of $M$ increases. In
addition, the minimum and the normalized average PDAF values of the different
coding methods are presented in Table III for easy comparison.

Figure 8: *

(a) $M=13$

Figure 9: *

(b) $M=16$

Figure 10: *

(c) $M=36$

Figure 11: *

(d) $M=64$

Figure 12: Empirical CDF of spectral efficiency.

For $M=13$, the Frank code is not applicable because $13$ is not a perfect
square. Consequently, we compare the proposed code with the Barker, Chu, and
random codes only when $M=13$. As can be observed from Fig. 7, both the
proposed code and the Barker code are effective in designing a beam with a
flat-like PDAF. As can be seen from Table III, the minimum array factor,
$A^{\text{min}}(\mathbf{\Phi})$, is higher for the proposed code compared to
the Barker code. This difference arises because the phase shift values in the
Barker code are restricted to either $0$ or $\pi$, whereas the phase shift
values of the proposed code can vary across the full range from $0$ to $2\pi$.
It is evident that the Chu code exhibits the highest value of
$U_{\frac{1}{2}}(\mathbf{\Phi})$. Following this, the Barker code has the
second highest value, succeeded by the proposed code, and lastly, the random
code.

For $M\in\\{16,36,64\\}$, we evaluate the performance of the proposed code
against the Chu, Frank, and random codes. As it can be seen in Fig. 7 and
Table III, $A^{\text{min}}(\mathbf{\Phi})$ is significantly higher compared to
those of the Chu, Frank, and random codes. For an instance, for the case of
$M=64$, the values of $A^{\text{min}}(\mathbf{\Phi})$ are $14.0971$ dB,
$1.5626$ dB, $-1.6166$ dB, and $-2.9884$ dB for the proposed code, Frank code,
Chu code, and random code, respectively. As shown in Table III,
$U_{\frac{1}{2}}(\mathbf{\Phi})$ is higher for the proposed code compared to
the other codes when $M=16$. For $M=36$ and $M=64$,
$U_{\frac{1}{2}}(\mathbf{\Phi})$ remains fairly consistent across the proposed
code, Frank code, and Chu code. In summary, the discussion above concludes
that the proposed code generates a superior broad beam compared to other well-
known codes designed for uni-polarized RISs. Therefore, the proposed code is
highly suitable for applications requiring broad beam where a uni-polarized
RIS is employed.

TABLE IV: Obtained Numerical Values for the SE | $M=13$ | $M=16$
---|---|---
Codes | $S^{\text{min}}~{}(\text{bps}/\text{Hz})$ | $\overline{S}~{}(\text{bps}/\text{Hz})$ | $S^{\text{min}}~{}(\text{bps}/\text{Hz})$ | $\overline{S}~{}(\text{bps}/\text{Hz})$
Proposed code | $1.5870$ | $3.1530\begin{subarray}{c}+\\\ -\end{subarray}0.0146$ | $1.3668$ | $3.3671\begin{subarray}{c}+\\\ -\end{subarray}0.0157$
Chu code | $0.2764$ | $2.8877\begin{subarray}{c}+\\\ -\end{subarray}0.0207$ | $7.1792\times 10^{-5}$ | $3.1795\begin{subarray}{c}+\\\ -\end{subarray}0.0228$
Barker code | $1.2734$ | $3.0983\begin{subarray}{c}+\\\ -\end{subarray}0.0150$ | $-$ | $-$
Frank code | $-$ | $-$ | $0.6173$ | $3.3747\begin{subarray}{c}+\\\ -\end{subarray}0.0171$
random code | $0.7650$ | $2.9459\begin{subarray}{c}+\\\ -\end{subarray}0.0206$ | $0.3154$ | $3.2189\begin{subarray}{c}+\\\ -\end{subarray}0.0226$
| $M=36$ | $M=64$
---|---|---
Codes | $S^{\text{min}}~{}(\text{bps}/\text{Hz})$ | $\overline{S}~{}(\text{bps}/\text{Hz})$ | $S^{\text{min}}~{}(\text{bps}/\text{Hz})$ | $\overline{S}~{}(\text{bps}/\text{Hz})$
Proposed code | $1.8994$ | $4.3633\begin{subarray}{c}+\\\ -\end{subarray}0.0186$ | $2.2025$ | $5.1303\begin{subarray}{c}+\\\ -\end{subarray}0.0214$
Chu code | $1.1775\times 10^{-5}$ | $4.3008\begin{subarray}{c}+\\\ -\end{subarray}0.0235$ | $0.0140$ | $5.1536\begin{subarray}{c}+\\\ -\end{subarray}0.0219$
Frank code | $0.7432$ | $4.4398\begin{subarray}{c}+\\\ -\end{subarray}0.0178$ | $0.7140$ | $5.2631\begin{subarray}{c}+\\\ -\end{subarray}0.0175$
random code | $0.3896$ | $3.9691\begin{subarray}{c}+\\\ -\end{subarray}0.0312$ | $0.2507$ | $4.6423\begin{subarray}{c}+\\\ -\end{subarray}0.0325$

###  VI-A MCMC Simulation for Estimating $E_{r,\theta}\\{S\\}$

To compare the achieved spectral-efficiency of different coding methods, we
consider a RIS-assisted downlink setting with $K=10000$ UEs. The SE of the
$k$-th UE is given by
$S_{k}=\log_{2}\left(1+v\beta_{g}(r_{k})G_{0}(\theta_{k})A(\mathbf{\Phi},\theta_{k})\right)$,
where $v=~{}\frac{P}{\sigma^{2}}\beta_{h}(r_{h})G_{0}(\theta_{h})$, and the
radiation pattern of each element is obtained using the 3GPP model [7], which
is given by

$G_{0}(\theta)=8-\min{\left({12\left(\frac{\theta-\theta_{0}}{\Delta\theta}\right)}^{2},30\right)}(\text{dBi}),$

with $\theta_{0}=0$ and $\Delta\theta=\frac{\pi}{2}$. Moreover, the path-loss
is modeled as

$\beta_{h}(r_{h})=-37.5-22\log_{10}\left(r_{h}\right)\text{(dB)}$

and

$\beta_{g}(r_{k})=-37.5-22\log_{10}\left(r_{k}\right)\text{(dB)}.$

We also assume that $r_{h}=50$ m and the UEs are uniformly distributed around
the RIS such that $r_{k}\sim~{}U[50\,\text{m},100\,\text{m}]$ and
$\theta_{k}\sim U\left[-\frac{\pi}{3},\frac{\pi}{3}\right]$. The transmit
power is set to $P=47$ dBm, and the noise power is given by $\sigma^{2}=-90$
dBm.

Since deriving a closed-form expression for the true expected value
$E_{r,\theta}\\{S\\}$ is infeasible, we take advantage of MCMC simulations to
approximate $E_{r,\theta}\\{S\\}$. Each iteration of the MCMC simulation
generates a set of values for $r_{k}$ and $\theta_{k}$ based on their
respective distributions. Using these generated values, $S_{k}$ is computed
for all $k$. The MCMC procedure is repeated for a large number of iterations
to ensure a thorough exploration of the parameter space. The sample average of
$SE$ is given by
$\overline{S}\triangleq\frac{1}{K}\sum\limits_{k=1}^{K}S_{k}$, which provides
an approximation for the true expected value $E_{r,\theta}\\{S\\}$. To assess
the accuracy of our approximation, we calculate an approximate 95% confidence
interval for $E_{r,\theta}\\{S\\}$ using the standard error (se) of MCMC
samples, which is defined as [31]

$se=\frac{1}{\sqrt{K}}\sqrt{\frac{1}{K-1}\sum\limits_{k=1}^{K}{\left(S_{k}-\overline{S}\right)}^{2}}.$

The 95% confidence interval is then approximated as [31]

$\text{CI}=\left(\overline{S}-1.96\times se,\overline{S}+1.96\times
se\right).$

This interval provides an estimate of the range within which the true expected
value of SE, i.e., $E_{r,\theta}\\{S\\}$ is likely to lie, assuming the
normality of the distribution of $\overline{S}$, which is justified by the
central limit theorem (CLT) given a large enough sample size $K$.

In Fig. 12, the empirical CDF of the SE delivered by different codes to the
UEs is presented. For an accurate comparison between codes, the values of the
minimum SE, denoted as $S^{\text{min}}$, and the average SE ($\overline{S}$)
are also presented in Table IV. Specifically, for $M=13$, the average SE
values are $3.1530$ bps/Hz for the proposed code, $3.0983$ bps/Hz for the
Barker code, $2.9459$ bps/Hz for the random code, and $2.8877$ bps/Hz for the
Chu code. A similar pattern is observed for the minimum value of SE delivered
to the UEs, indicating that the proposed code outperforms the Barker code in
terms of SE. As discussed earlier, the value of
$A^{\text{min}}(\mathbf{\Phi})$ is higher for the proposed code compared to
the Barker code, suggesting that the proposed code is more effective in
generating a broad and spectral efficient beam. For $M=16$ and $M=36$, while
the average SE value of the Frank code is marginally higher than that of the
proposed code, the proposed code significantly outperforms the Frank code in
terms of minimum SE. For $M=64$, the minimum SE ($S^{\text{min}}$) of the
proposed code is approximately three times greater than that of the Frank
code, but the average SE ($\overline{S}$) is slightly higher for both the
Frank and Chu codes compared to the proposed code.

In summary, the conducted simulation results clearly demonstrate that the
proposed code outperforms the other codes in terms of the minimum PDAF
($A^{\text{min}}(\mathbf{\Phi})$) and the minimum SE ($S^{\text{min}}$)
delivered to the UEs for various values of $M$. This significant improvement
in the minimum values indicates the robustness and reliability of the proposed
code in maintaining better performance under worst-case conditions.

Moreover, the normalized average value of the PDAF
($U_{\frac{1}{2}}(\mathbf{\Phi})$) and the average SE ($\overline{S}$) for the
proposed code, although not optimized, are slightly lower than those of some
other codes. For instance, compared to the Frank code, our proposed code has
negligible degradation in the average SE, roughly $0.225$% for $M=16$, $1.72$%
for $M=36$, and $2.52$% for $M=64$. This observation highlights that while the
primary focus of our optimization is on enhancing the minimum values, the
average metrics are not adversely affected to a large extent.

##  VII Conclusion

In this paper, we investigate a uni-polarized RIS with a linear shape designed
to transmit a common signal to multiple UEs across a wide angular region. To
ensure uniform coverage, the RIS emits a broad beam with a spatially flat-like
array factor, differing from the traditional narrow beam approach. We first
derive the probabilistic lower and upper bounds on the average SE delivered to
the UEs. Subsequently, motivated by the derived bounds, we propose a novel
code for designing the phase shift of RIS elements based on maximizing the
minimum PDAF across azimuth angles from $-\frac{\pi}{2}$ to $\frac{\pi}{2}$
using CGA to enhance the SE for the UEs. Extensive simulations evaluate the
performance of our proposed code, highlighting key metrics such as the minimum
and the average PDAF values and the SE delivered to the UEs. The results show
that the proposed code improves the minimum SE delivered to the UEs while
maintaining the desired broad beam characteristic, outperforming established
codes like the Barker, Frank, and Chu codes.

##  Appendix A Proof of Proposition 1

We commence with deriving the lower and upper bounds on the true expected
value $E_{r,\theta}\\{S\\}$.

$\displaystyle E_{r,\theta}\\{S\\}$ $\displaystyle=$ $\displaystyle
E_{r,\theta}\left\\{\log_{2}(1+v\beta_{g}(r)G_{0}(\theta)A(\mathbf{\Phi},\theta))\right\\}$
$\displaystyle\stackrel{{\scriptstyle(a)}}{{=}}$ $\displaystyle
E_{r}\left\\{E_{\theta}\left\\{\log_{2}(1+v\beta_{g}(r)G_{0}(\theta)A(\mathbf{\Phi},\theta))\right\\}\right\\}$
$\displaystyle\stackrel{{\scriptstyle(b)}}{{\geq}}$ $\displaystyle
E_{r}\left\\{\log_{2}(1+vG_{0}^{\text{min}}A^{\text{min}}(\mathbf{\Phi})\beta_{g}(r))\right\\},$

where (a) is justified by the fact that $r$ and $\theta$ are independent, and
(b) is deduced from the facts that

$v\beta_{g}(r)G_{0}(\theta)A(\mathbf{\Phi},\theta)>0$

and

$E_{\theta}\left\\{\log_{2}(1+v\beta_{g}(r)G_{0}(\theta)A(\mathbf{\Phi},\theta))\right\\}\geq\\\
\log_{2}(1+vG_{0}^{\text{min}}A^{\text{min}}(\mathbf{\Phi})\beta_{g}(r)).$

Next, we determine the upper bound.

$\displaystyle E_{r,\theta}\\{S\\}$ $\displaystyle=$ $\displaystyle
E_{r,\theta}\left\\{\log_{2}(1+v\beta_{g}(r)G_{0}(\theta)A(\mathbf{\Phi},\theta))\right\\}$
$\displaystyle\stackrel{{\scriptstyle(a)}}{{\leq}}$
$\displaystyle\log_{2}(1+vE_{r,\theta}\\{\beta_{g}(r)G_{0}(\theta)A(\mathbf{\Phi},\theta)\\})$
$\displaystyle\stackrel{{\scriptstyle(b)}}{{=}}$
$\displaystyle\log_{2}(1+vE_{r}\\{\beta_{g}(r)\\}E_{\theta}\\{G_{0}(\theta)A(\mathbf{\Phi},\theta)\\})$
$\displaystyle\stackrel{{\scriptstyle(c)}}{{\leq}}$
$\displaystyle\log_{2}(1+vG_{0}^{\text{max}}E_{r}\\{\beta_{g}(r)\\}E_{\theta}\\{A(\mathbf{\Phi},\theta)\\}),$

where (a) leverages Jensen’s inequality555Jensen’s inequality states that if
$f(\cdot)$ is a concave function and $X$ is a random variable, then
$E\\{f(X)\\}\leq f(E\\{X\\})$. for the concave function $\log_{2}(1+vx)$, (b)
is based on the independence of $\theta$ and $r$, and (c) uses the fact that

$E_{\theta}\\{G_{0}(\theta)A(\mathbf{\Phi},\theta)\\}\leq~{}G_{0}^{\text{max}}E_{\theta}\\{A(\mathbf{\Phi},\theta)\\}.$

Since $r_{k}$ and $\theta_{k}$ are uniformly distributed and independent, as
previously mentioned, $S_{1},S_{2},\ldots$ form a sequence of independent and
identically distributed (i.i.d.) random variables with a finite mean
$E\\{S\\}$ and variance $Var\\{S\\}$. Based on the weak law of large numbers
(WLLN) [30], we infer that for any $\epsilon>0$, there exists a positive
integer $N_{\epsilon}$ such that when $K\geq N_{\epsilon}$, the following
holds with probability $1$

$E_{r,\theta}\\{S\\}-\epsilon<\overline{S}\triangleq\frac{1}{K}\sum\limits_{k=1}^{K}S_{k}<E_{r,\theta}\\{S\\}+\epsilon.$
(16)

Ultimately, by integrating the obtained bounds with (16), we ascertain the
lower and upper limits for $\overline{S}$, as expressed in (9), which
completes the proof of the Proposition.

##  Appendix B Proof of Lemma 1

Noting transformation (3), let

$\alpha_{1}:=\frac{2\pi\Delta}{\lambda}\left(\sin{\theta_{h}}+\sin{\theta_{1}}\right)$

and

$\alpha_{2}:=\frac{2\pi\Delta}{\lambda}\left(\sin{\theta_{h}}+\sin{\theta_{2}}\right).$

Then, we have

$\left|A(\mathbf{\Phi},\theta_{2})-A(\mathbf{\Phi},\theta_{1})\right|~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}$
$\displaystyle\stackrel{{\scriptstyle(a)}}{{=}}$
$\displaystyle\left|{\left|\sum_{m=1}^{M}e^{j\phi_{m}}e^{-j(m-1)\alpha_{2}}\right|}^{2}-{\left|\sum_{m=1}^{M}e^{j\phi_{m}}e^{-j(m-1)\alpha_{1}}\right|}^{2}\right|$
$\displaystyle\stackrel{{\scriptstyle(b)}}{{=}}$
$\displaystyle\left|\sum\limits_{n=1}^{M}\sum\limits_{m=1}^{M}e^{-j\left(\phi_{m}-\phi_{n}\right)}\left(e^{j(m-n)\alpha_{2}}-e^{j(m-n)\alpha_{1}}\right)\right|$
$\displaystyle\stackrel{{\scriptstyle(c)}}{{\leq}}$
$\displaystyle\sum\limits_{n=1}^{M}\sum\limits_{m=1}^{M}\left|e^{-j\left(\phi_{m}-\phi_{n}\right)}\right|\left|e^{j(m-n)\alpha_{2}}-e^{j(m-n)\alpha_{1}}\right|$
$\displaystyle=$
$\displaystyle\sum\limits_{n=1}^{M}\sum\limits_{m=1}^{M}\sqrt{2-2\cos{\left((m-n)(\alpha_{2}-\alpha_{1})\right)}}$
$\displaystyle=$
$\displaystyle\sum\limits_{n=1}^{M}\sum\limits_{m=1}^{M}2\left|\sin{\left(\frac{m-n}{2}(\alpha_{2}-\alpha_{1})\right)}\right|$
$\displaystyle\stackrel{{\scriptstyle(d)}}{{\leq}}$
$\displaystyle\sum\limits_{n=1}^{M}\sum\limits_{m=1}^{M}|m-n||\alpha_{2}-\alpha_{1}|$
$\displaystyle\stackrel{{\scriptstyle(e)}}{{=}}$
$\displaystyle\frac{(M-1)M^{2}\pi\Delta}{\lambda}\left|\sin{\theta_{2}}-\sin{\theta_{1}}\right|$
$\displaystyle\stackrel{{\scriptstyle(f)}}{{\leq}}$
$\displaystyle\frac{(M-1)M^{2}\pi\Delta}{\lambda}\left|\theta_{2}-\theta_{1}\right|,$

where (a) follows from (4), (b) is written from the fact that
${|Z|}^{2}=ZZ^{\star}$ for any complex value $Z$, (c) comes from the triangle
inequality, (d) follows from $|\sin{x}|\leq|x|$, (e) is written from
$\sum\limits_{n=1}^{M}\sum\limits_{m=1}^{M}|m-n|=\frac{(M-1)M^{2}}{2}$, and
(f) follows from the fact that the function $\sin{(x)}$ is Lipschitz
continuous with Lipschitz constant $1$.

##  Appendix C Proof of Theorem 1

The discretization of the interval $\left[-\frac{\pi}{2},\frac{\pi}{2}\right]$
into a finite set of points defined as $\theta_{i}=\frac{-\pi}{2}+\frac{\pi
i}{D}$, where $i=0,1,2,\ldots,D$ results in a step size
$\Delta\theta=\frac{\pi}{D}$. Therefore, the distance from any point $\theta$
within $\left[-\frac{\pi}{2},\frac{\pi}{2}\right]$ to the neighboring
discretization points is at most $\Delta\theta=\frac{\pi}{D}$.

Let $\theta^{\star}$ denote the global minimum, and let
$\theta^{c}\neq\theta^{\star}$ represent the local minimum with the smallest
value in the continuous optimization problem
$\min\limits_{\theta\in\left[-\frac{\pi}{2},\frac{\pi}{2}\right]}A(\mathbf{\Phi},\theta)$.
Since $\theta^{\star}$ is the global minimum, we conclude that there exists an
open interval $(\theta^{\star}-~{}\epsilon_{0},\theta^{\star}+\epsilon_{0})$
such that $A(\mathbf{\Phi},\theta)<A(\mathbf{\Phi},\theta^{c})$ for each
$\theta$ in this interval. Now, if $\Delta\theta=\frac{\pi}{D}<2\epsilon_{0}$,
or equivalently $D>\frac{\pi}{2\epsilon_{0}}$, at least one of the
discretization points near $\theta^{\star}$, say $\theta_{i}^{\star}$, falls
within $(\theta^{\star}-\epsilon_{0},\theta^{\star}+\epsilon_{0})$.
Consequently,
$A(\mathbf{\Phi},\theta_{i}^{\star})<A(\mathbf{\Phi},\theta^{c})$, indicating
that $\theta_{i}^{\star}$ is the optimal discretization point. Therefore, we
have

$\displaystyle e$ $\displaystyle=$
$\displaystyle\left|\min_{\theta\in\left[-\frac{\pi}{2},\frac{\pi}{2}\right]}A(\mathbf{\Phi},\theta)-\min_{i=0,1,\ldots,D}A\left(\mathbf{\Phi},\frac{-\pi}{2}+\frac{\pi
i}{D}\right)\right|$ $\displaystyle=$
$\displaystyle\left|A(\mathbf{\Phi},\theta^{\star})-A(\mathbf{\Phi},\theta_{i}^{\star})\right|$
$\displaystyle\stackrel{{\scriptstyle(a)}}{{\leq}}$
$\displaystyle\frac{(M-1)M^{2}\pi\Delta}{\lambda}|\theta^{\star}-\theta_{i}^{\star}|$
$\displaystyle\stackrel{{\scriptstyle(b)}}{{<}}$
$\displaystyle\frac{(M-1)M^{2}\pi^{2}\Delta}{\lambda D},$

where (a) is written from Lemma 1, and (b) follows from the fact that the
distance between $\theta^{\star}$ and $\theta_{i}^{\star}$ is less than the
step size $\Delta\theta=\frac{\pi}{D}$. This completes the proof of the
Theorem.

##  Appendix D Proof of Theorem 2

Noting (2), we can write

$E_{\theta}\left\\{A(\mathbf{\Phi},\theta)\right\\}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}$
$\displaystyle=$ $\displaystyle
E_{\theta}\left\\{{\left|\sum\limits_{m=1}^{M}e^{j\phi_{m}}e^{-j\frac{2\pi\Delta(m-1)}{\lambda}\left(\sin{\theta_{h}}+\sin{\theta}\right)}\right|}^{2}\right\\}$
$\displaystyle\stackrel{{\scriptstyle(a)}}{{=}}$ $\displaystyle
E_{\theta}\left\\{\sum\limits_{n=1}^{M}\sum\limits_{m=1}^{M}e^{-j\left(\phi_{m}-\phi_{n}\right)}e^{j\frac{2\pi\Delta(m-n)}{\lambda}\left(\sin{\theta_{h}}+\sin{\theta}\right)}\right\\}$
$\displaystyle=$
$\displaystyle\sum\limits_{n=1}^{M}\sum\limits_{m=1}^{M}e^{-j\left(\phi_{m}-\phi_{n}-a_{m-n}\sin{\theta_{h}}\right)}E_{\theta}\left\\{e^{ja_{m-n}\sin{\theta}}\right\\}$
$\displaystyle\stackrel{{\scriptstyle(b)}}{{=}}$
$\displaystyle\sum\limits_{n=1}^{M}\sum\limits_{m=1}^{M}J_{0}(a_{m-n})e^{-j\left(\phi_{m}-\phi_{n}-a_{m-n}\sin{\theta_{h}}\right)}$
$\displaystyle=$ $\displaystyle
M+\sum\limits_{n=1}^{M-1}\sum\limits_{m=n+1}^{M}J_{0}(a_{m-n})e^{-j\left(\phi_{m}-\phi_{n}-a_{m-n}\sin{\theta_{h}}\right)}$
$\displaystyle+\sum\limits_{n=1}^{M-1}\sum\limits_{m=n+1}^{M}J_{0}(a_{m-n})e^{j\left(\phi_{m}-\phi_{n}-a_{m-n}\sin{\theta_{h}}\right)}$
$\displaystyle=$ $\displaystyle
2\sum_{n=1}^{M-1}\\!\sum_{m=n+1}^{M}J_{0}(a_{m-n})\cos{\left(\phi_{m}-\phi_{n}-a_{m-n}\sin{\theta_{h}}\right)}$
$\displaystyle+M,$

where (a) comes from the fact that ${|Z|}^{2}=ZZ^{\star}$ for any complex
value $Z$, and (b) follows from (14).

##  Appendix E Proof of Proposition 2

We begin by finding a closed-form expression for the
$\max\limits_{\mathbf{\Phi}}E_{\theta}\left\\{A(\mathbf{\Phi},\theta)\right\\}$
when $\frac{\Delta}{\lambda}=\frac{1}{2}$. As $x\to+\infty$, the Bessel
function of the first kind with order zero has the asymptotic expression [29]

$J_{0}(x)=\sqrt{\frac{2}{\pi
x}}\cos{\left(x-\frac{\pi}{4}\right)}+\mathcal{O}\left(\frac{1}{x^{\frac{3}{2}}}\right).$

Therefore, we can approximate the value of $J_{0}(a_{k})$ by

$J_{0}(a_{k})=J_{0}(k\pi)\approx\sqrt{\frac{2}{k{\pi}^{2}}}\cos{\left(k\pi-\frac{\pi}{4}\right)}=\frac{{(-1)}^{k}}{\pi\sqrt{k}}.$
(17)

We note that while this approximation may not be precise for small values of
$k$, the sign of $J_{0}(k\pi)$ remains consistent in the approximation across
all $k$ values. That is, $J_{0}(k\pi)$ and $\frac{{(-1)}^{k}}{\pi\sqrt{k}}$
always share the same sign. This sign consistency is crucial for maximizing
$E_{\theta}\left\\{A(\mathbf{\Phi},\theta)\right\\}$. Noting (17),
$E_{\theta}\left\\{A(\mathbf{\Phi},\theta)\right\\}$ can be approximated by

$E_{\theta}\left\\{A(\mathbf{\Phi},\theta)\right\\}\approx~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}$
$2\sum_{n=1}^{M-1}\sum_{m=n+1}^{M}\frac{{(-1)}^{m-n}}{\pi\sqrt{m-n}}\cos{\left(\phi_{m}-\phi_{n}-(m-n)\pi\sin{\theta_{h}}\right)}$
$+M.~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}~{}$

As it can be seen, the amplitude of the cosine terms is positive when $m-n$ is
even and negative when $m-n$ is odd. Hence, we conclude that
$E_{\theta}\left\\{A(\mathbf{\Phi},\theta)\right\\}$ is maximized when

$\displaystyle\cos{\left(\phi_{m}-\phi_{n}-(m-n)\pi\sin{\theta_{h}}\right)}$
$\displaystyle=$ $\displaystyle{(-1)}^{m-n}$ $\displaystyle=$
$\displaystyle\cos{((m-n)\pi)}.$

It is not hard to see that the solution of (E) is

$\phi_{m}^{\text{max-
average}}\equiv\phi_{0}+(m-1)(1+\sin{\theta_{h}})\pi~{}(\text{mod}~{}2\pi),$

where $\phi_{0}\in[0,2\pi]$ is an arbitrary constant value, and $1\leq~{}m\leq
M$.

Finally, noting (15), Theorem 2, and the derived maximum-average code, we can
express the expanded formula for calculating $U_{\frac{1}{2}}(\mathbf{\Phi})$
as shown in (13).

## References

  * [1] M. Obeed and A. Chaaban, “Joint beamforming design for multiuser MISO downlink aided by a reconfigurable intelligent surface and a relay,” in _IEEE Trans. on Wireless Communications_ vol. 21, no. 10, pp. 8216-8229, Oct. 2022.
  * [2] M. Javad-Kalbasi, M. S. Al-Abiad, and S. Valaee, “Energy efficient communications in RIS-assisted UAV networks based on genetic algorithm”, _GLOBECOM 2023 - 2023 IEEE Global Communications Conference,_ Kuala Lumpur, Malaysia, 2023, pp. 5901-5906.
  * [3] M. S. Al-Abiad, M. Javad-Kalbasi, and S. Valaee, “Maximizing network connectivity for UAV communications via reconfigurable intelligent surfaces”, _GLOBECOM 2023 - 2023 IEEE Global Communications Conference,_ Kuala Lumpur, Malaysia, 2023, pp. 6395-6400.
  * [4] M. Ammous and S. Valaee, “Cooperative positioning with the aid of reconfigurable intelligent surfaces and zero access points,” _2022 IEEE 96th Vehicular Tech. Conf. (VTC2022-Fall), London, United Kingdom,_ 2022, pp. 1-5.
  * [5] M. S. Al-Abiad, M. Javad-Kalbasi, and S. Valaee, “Effectiveness of reconfigurable intelligent surfaces to enhance connectivity in UAV networks”, Available at: https://arxiv.org/pdf/2308.10788.pdf
  * [6] Z. Wei et al., “Sum-rate maximization for IRS-assisted UAV OFDMA communication systems,” in _IEEE Trans. on Wireless Communications_ vol. 20, no. 4, pp. 2530-2550, Apr. 2021.
  * [7] P. Ramezani, M. A. Girnyk, and E. Björnson, “Dual-polarized reconfigurable intelligent surface assisted broad beamforming,” _IEEE Communications Letters_ , (2023).
  * [8] M. S. Al-Abiad, A. Douik, S. Sorour, and M. J. Hossain, “Throughput maximization in cloud-radio access networks using cross-layer network coding,” in _IEEE Trans. on Mobile Computing,_ vol. 21, no. 2, pp. 696-711, 1 Feb. 2022.
  * [9] 3GPP R1-1700772, “On forming wide beams,” Ericsson, 2017.
  * [10] M. He, J. Xu, W. Xu, H. Shen, N. Wang, and C. Zhao, “RIS-assisted quasi-static broad coverage for wideband mmwave massive MIMO systems,” in _IEEE Trans. on Wireless Communications,_ vol. 22, no. 4, pp. 2551–2565, 2023.
  * [11] M. Al Hajj, K. Tahkoubit, H. Shaiek, V. Guillet, and D. L. Ruyet, “On beam widening for RIS-assisted communications using genetic algorithms,” in _2023 Joint European Conference on Networks and Communications and 6G Summit (EuCNC/6G Summit)_ , 2023, pp. 24–29.
  * [12] F. Li, Y. Jiang, C. Du, and X. Wang, “Construction of Golay complementary matrices and its applications to MIMO omnidirectional transmission,” _IEEE Trans. Signal Process.,_ vol. 69, pp. 2100-2113, 2021.
  * [13] M. A. Girnyk and S. O. Petersson, “Efficient cell-specific beamforming for large antenna arrays,” _IEEE Trans. Communications,_ vol. 69, no. 12, pp. 8429-8442, 2021.
  * [14] M. J. E. Golay, “Static multislit spectrometry and its application to the panoramic display of infrared spectra,” _J. Opt. Soc. Amer_ , vol. 41, no. 7, pp. 468–472, 1951.
  * [15] P. Ramezani, M. A. Gimyk, and E. Bjornson, “Broad beam reflection for RIS-assisted MIMO systems with planar arrays,” _2023 57th Asilomar Conference on Signals, Systems, and Computers, Pacific Grove, CA, USA,_ 2023, pp. 504-508.
  * [16] J. Jedwab and M. G. Parker, “Golay complementary array pairs,” _Designs, Codes and Cryptography_ , vol. 44, pp. 209–216, 2007.
  * [17] Y. Han, X. Li, W. Tang, S. Jin, Q. Cheng, and T. J. Cui, “Dual-polarized RIS-assisted mobile communications,” _IEEE Trans. Wireless Communications_ vol. 21, no. 1, pp. 591–606, Jan. 2022.
  * [18] V. Eiceg, H. Sampath, and S. Catreux-Erceg, “Dual-polarization versus single-polarization MIMO channel measurement results and modeling,” _IEEE Trans. Wireless Communications_ vol. 5, no. 1, pp. 28–33, Jan. 2006.
  * [19] M. V. Trevorrow and D. M. Farmer, “The use of Barker codes in Doppler sonar measurements,” _J. Atmos. Oceanic Technol._ , 9, 699- 704, 1992
  * [20] R. L. Frank, “Polyphase complementary codes,” _IEEE Trans. on Infomation Theory_ , vol. IT-26, no. 6, 1980\.
  * [21] D. C. Chu, “Polyphase codes with good periodic correlation properties,” _IEEE Trans. on Information Theory_ , vol. IT-18, no. 4, pp. 531–532, Jul. 1972.
  * [22] E. Björnson, H. Wymeersch, B. Matthiesen, P. Popovski, L. Sanguinetti, and E. de Carvalho, “Reconfigurable intelligent surfaces: A signal processing perspective with wireless applications,” _IEEE Signal Process. Mag.,_ vol. 39, no. 2, pp. 135–158, 2022.
  * [23] E. Björnson, J. Hoydis, and L. Sanguinetti, “Massive MIMO networks: Spectral, energy, and hardware efficiency,” _Found. Trends Signal Process.,_ vol. 11, no. 3-4, pp. 154–655, 2017.
  * [24] E. Björnson, Ö. Özdogan, and E. G. Larsson, “Intelligent reflecting surface versus decode-and-forward: How large surfaces are needed to beat relaying?,” _IEEE Wireless Communications Letters_ , vol. 9, no. 2, pp. 244– 248, 2020.
  * [25] W.H. Holzmann and H. Kharaghani, “A computer search for complex Golay sequences,” _Aust. Journ. Comb_ , 10, pp. 251-258, 1994.
  * [26] M. Gen and R. Cheng, ”Genetic algorithms and engineering optimization,” Vol. 7. John Wiley and Sons, 1999.
  * [27] F. W. J. Olver and L. C. Maximon, “Bessel functions” (2010): 215-286.
  * [28] W. L. Stutzman and G. A. Thiele, ”Antenna theory design,” 3rd ed. New York, NY, USA: Wiley, 2012.
  * [29] M. Abramowitz and I. Stegun, Handbook of Mathematical Functions. New York, NY, USA: Dover, 1965.
  * [30] A. Papoulis, “Probability, random variables and stochastic processes,” 3rd ed. New York, NY, USA: McGraw-Hill, 1991.
  * [31] C. Robert and G. Casella, “Monte carlo statistical methods,” Springer Science and Business Media, 2013.


# A Very Forward Hadron Spectrometer for the LHC and Cosmic Ray Physics

Fermi National Accelerator Laboratory, Batavia, IL 60510, USA.
ORCID 0000-0001-7329-4925
E-mail Scientist emeritus

###### Abstract:

Charged hadron production in hadron-hadron collisions with longitudinal
momentum fraction Feynman-x, $x_{F}$, between 0.1 and 0.9 has not been
measured above $\sqrt{s}$ = 63 GeV at the CERN Intersecting Storage Rings. I
discuss a way to measure this at the Large Hadron Collider at $\sqrt{s}$ = 13
TeV, which is 40,000 times higher in equivalent fixed target energy, and
important for understanding cosmic ray showers.

##  1 Introduction

When the first hadron collider, the CERN Intersecting Storage Rings, ISR, came
into operation in 1971 it was known that most produced particles in inelastic
collisions have small transverse momenta, $p_{T}=\sqrt{p_{x}^{2}+p_{y}^{2}}$
less than about 1 GeV/c. Feynman had proposed, based on the idea of parton
constituents of protons, that their longitudinal momenta, $p_{z}$, should
scale with the beam momentum, so the spectra at high energies should be a
function only of $x_{F}$ and $p_{T}$ where Feynman-x,
$x_{F}=p_{z}/p_{BEAM}=2\times p_{z}/\sqrt{s}$. With $p_{BEAM}$ ranging from
11.5 GeV/c to 31.4 GeV/c at the ISR most produced particles would be at very
small angles. The Small Angle Spectrometer, Experiment R201, was designed to
measure the spectra of identified $\pi^{+},\pi^{-},K^{+},K^{-},p,$and
$\bar{p}$ in this region, with $p_{T}<$ 2.5 GeV/c [1, 2]. There are no
measurements at higher $\sqrt{s}$, which is 200 times higher at the LHC than
at the ISR, with the exception of Roman pot devices measuring diffractively
scattered protons with $x_{F}>$ 0.9, and neutral particles, mainly neutrons
and $\pi^{0}\rightarrow\gamma\gamma$, in calorimeters at $\theta$ = 0∘. The
$\pi^{+}$ and $\pi^{-}$ spectra are bound to be very different from each other
(with two u-quarks and only one d-quark in the proton) with $\pi^{0}$ in-
between. Similarly, we expect $K^{+}>K^{-}$ and $p>n>\bar{p}$, etc. We should
measure all of these charged particles at the LHC, and can do so with high
precision with new detectors. Decaying particles such as
$K^{0}_{s}\rightarrow\pi^{+}\pi^{-}$ and $\Lambda\rightarrow p\pi^{+}$ may be
accepted, but especially interesting would be $D^{0}\rightarrow
K^{\pm}\pi^{\mp}$ and $J/\psi\rightarrow\mu^{+}\mu^{-}$.

Figure 1: The flux of cosmic rays multiplied by $E^{2.5}$, showing the “knee”
and the “ankle” vs. primary energy $E$. All this data is based on measuring
showers in the atmosphere. The maximum energy of the CERN ISR and LHC are
indicated.

The flux of hadrons or nuclei in cosmic rays at such high energies is $<$ 1
$m^{-2}$ per year, so direct detection, which would have to be from space, is
impractical. Therefore, all our knowledge of cosmic ray spectra, see Fig. 1,
from below the “knee” at $10^{15}$ \- $10^{16}$ eV to the highest energies at
the GZK cut-off around $10^{20}$ eV, comes from showers in the atmosphere. The
measurements are calorimetric, e.g. detecting the scintillation light
(fluorescence) in the atmosphere (a homogeneous calorimeter) or sampling the
shower with a ground array of scintillation counters or water tanks (which is
a sampling calorimeter with a single sparsely-covered layer). Figure 1 shows
the flux of cosmic ray showers, multiplied by $E^{2.5}$ from the top ISR
energy, far below the “knee”, and well beyond the LHC energy. There have been
speculations that the knee is caused by a change in the nature of the
interactions, even perhaps in the forward direction, the subject of this note.

Understanding the calibration of these “calorimetric” detectors, i.e. the
relation between measured signal and the energy of the incident cosmic ray, is
crucial. The shower process is complicated, from the first interaction on a
nucleus of nitrogen or oxygen, at energies up to a thousand times higher than
those accessible at the LHC, with secondaries, tertiaries, etc. down to low
energies in a cascade. There are many Monte Carlo programs modelling these
inelastic interactions, such as kaskade, dpmjet, epos, qgsjet, pythia and
sybil. When these are used to predict the spectra of high $x_{F}$ neutrons and
$\pi^{0}$ at LHC energies they differ by more than an order of magnitude.
Those are measured [3] with small calorimeters and are not very precise, but
they serve to show that very forward hadron production is poorly understood.
Of course, these simulations assume nothing unexpected occurs in small angle
hadron production over many orders-of-magnitude in energy. Precise
measurements, of order 2% in both momentum and cross-section, of charged
hadron spectra are possible, and will enable these various models to be
rejected, modified or tuned, or they may reveal unexpected phenomena.
Importantly, there are some puzzles in cosmic ray showers such as an anomalous
high content of muons [4]. Muons can come from decays of charm and beauty
hadrons which have never been measured at high $x_{F}$, as well as Drell-Yan
annihilation of very low-$x_{Bjorken}$ antiquarks with quarks.

Figure 2: For $pp$ collisions at $\sqrt{s}$ = 13 TeV, regions of low
transverse momentum $p_{T}$ and all Feynman-x, $x_{F}$, showing lines of
constant pseudorapidity $\eta$. Protons with $x_{F}>$ 0.9 are measured in
Roman pots, and neutral particles in calorimeters around $0^{\circ}$.
Identified charged hadrons have not been measured except at $\eta<$ 4 at LHCb,
so most of this phase space is Terra Incognita.

Figure 2 shows the region of small $p_{T}$ and the full range of $x_{F}$, most
of which is _“Terra Incognita”_ , not measured above $\sqrt{s}=63$ GeV, except
for nearly elastic protons $x_{F}>$ 0.9 and neutral hadrons in calorimeters.

The most conventional mechanism for producing a high-$x_{F}$ low-$p_{T}$
hadron at the LHC is as a product of diffractive excitation. The simplest,
lowest-mass examples are $p^{*}\rightarrow n\pi^{+}$ or $p^{*}\rightarrow
p\pi^{+}\pi^{-}$, where $p^{*}$ is a diffractively excited proton. Such
processes were measured at the ISR in the Split Field Magnet and, at lower
$\sqrt{s}$, in the Omega Spectrometer at the SPS (fixed target). At the LHC
the diffractively scattered proton will have $x_{F}=1-M^{2}(p^{*})/s\approx
1.0$ and could be measured in a Roman pot, only possible with special
high-$\beta^{*}$ running. There will be a very large rapidity gap, with no
hadrons, between that scattered proton and the lowest-rapidity hadron from the
$p^{*}$ fragmentation.

There are many reasons, apart from measurements of diffraction fragments, to
add a Very Forward Hadron Spectrometer, VFHS, to an (existing) collision
region at the LHC. It can cover a large region of parameter space
($p_{T},x_{F},\sqrt{s}$) which is completely unexplored. These are “legacy
measurements” and it would be a serious omission to close the LHC without
having measured them, not only in $pp$ but in $pA$ and $AA$ collisions. They
probe non-perturbative QCD, in a region not yet well understood, in novel
ways. They will greatly improve our understanding of cosmic rays (and hence of
the high-energy cosmos) in terms of their spectra and composition, including
muon content, e.g. from heavy flavours.. And novel and unexpected phenomena
may be revealed.

##  2 A possible spectrometer design

At $\sqrt{s}$ = 13 TeV a hadron with $x_{F}>$ 0.1 and $p_{T}$ = 1 GeV/c has
polar angle $\theta$ ¡ 1/650 = 1.5 mrad. It passes down the vacuum pipe,
through quadrupole fields and then the (MBX) “beam separation dipoles”,
spectrometer magnets with an integral field of $B.dL$ = 30 Tesla-meters.
Charged hadrons are bent out of the beam. Behind these dipoles is a field-free
region from about 80 to 140 m, where the TAN absorber, which protects the
superconducting LHC magnets, is located. At Point 5 (where CMS is located)
this is a simple cylindrical pipe, which transitions to two separate pipes for
the incoming and outgoing beams at 140 m. (Zero-degree calorimeters for
neutral particle measurement are located between these pipes.) This pipe can
be redesigned to allow the deflected hadrons to emerge from the vacuum through
little material. The pipe for the outgoing protons may start at a $z$-position
about 12-15m in front of the TAN, making that much space available for the
detectors. The pipe cross section should be as small as allowable by the
machine operations to maximize the acceptance, with positive hadrons emerging
on one side and negative on the other.

I present the concept with approximate numbers, to show that such a
spectrometer is feasible. Cross sections are relatively high and running with
modest luminosity (pile-up of a few interactions per bunch crossing) is
preferred. The size of the detectors is small, only tens of cm2 per layer.
Immediately outside the vacuum chamber window, precision tracking with silicon
strips or pixels measures the straight tracks, to a precision in
$x,y,\theta_{x},\theta_{y}$ of about 10 $\mu$m and a few $\mu$r. With the
assumption that the track originated in a beam-beam collision, the particle’s
charge is known and its momentum with a resolution of about 2%. Non-primary
tracks coming from interactions in the beam pipes and other material will
generally have forbidden values of $x,y,\theta_{x},\theta_{y}$, and also can
mostly be removed by comparing momentum with the energy measured in a
calorimeter at the back of the spectrometer.

Between the tracker and the calorimeter one can budget about 8 m of
longitudinal space for hadron identification, which is the main technical
challenge of the detectors, discussed later. The calorimeter, about 2.5 m long
and of order 1 m2 in area, should fill the transverse area as closely as
possible around the outgoing beam pipe. Since it is small compared to most LHC
calorimeters it can be of high performance, with longitudinal segmentation
(e.g. 2 EM segments plus 3 HADronic segments) and fine transverse granularity,
as in an “imaging” calorimeter. This should allow a good measurement of more
than one particle, correction for lateral leakage of showers close to the edge
of the fiducial region, and distinction between photons, electrons, hadrons
and muons.

Behind the calorimeter, tracking chambers identify muons and signal any hadron
shower leakage. Note that muons in this 1 - 6 TeV range have radiative energy
losses several times higher than minimum-ionizing particles; they are on the
“relativistic rise”. Good muon measurement is very important, since they can
come from heavy flavours $c$ and $b$; the branching fraction of
$D^{0}\rightarrow\mu+X$ is 6.7%, and leptons also come from $J/\psi$ and
$\Upsilon$ decays. Background muons from $\pi$\- and $K$-decay will be well
known since their spectra will be measured, and $\gamma c\tau(\pi)$ = 340 km
at 2.5 TeV (18.55 km for $K^{\pm}$)!

Between the upstream tracking and the calorimeter about 8 m of space can be
dedicated to charged hadron identification. Cherenkov counters cannot separate
such high momentum $\pi$ and $K$, but transition radiation detectors which
measure $\gamma=E/m$ are the most likely (perhaps the only) techniques. Their
use in high energy experiments is usually to aid in $e/\pi$ separation at low
momenta, in a limited space and difficult environment. Motivated by this vfhs
initiative, R & D is being carried out at CERN [5] to identify these multi-TeV
hadrons. X-radiation from the interface between two materials with different
dielectric properties has a $\gamma$-dependent probability of order 1/137, and
an emission angle $\theta_{X}$ of order 1/$\gamma$. A typical detector has
hundreds of radiator foils separated by gaps, and design parameters (foil
material and thickness, spacing and the gas in the gaps) can be tuned for
different $\gamma$-ranges. We need to cover the range from the slowest
particles accepted (1 TeV protons, $\gamma=E/m$ = 103) to the fastest (5 TeV
$\pi$, $\gamma=3.6\times 10^{4}$). A 10 - 20% $\gamma$ measurement should give
adequate $\pi/K/p$ separation. The “angle-TRD” concept has many short stacks
followed by pixel X-ray detectors, whose superimposed signals form a ring with
radius $\theta_{X}$. (Unlike Cherenkov radiation, the emission angle
_decreases_ as the particle speed increases.) Together with the X-ray energy
measurement, such a detector can minimize the material budget for optimum
particle identification, and provide the tracking information in addition,
alleviating the need for a separate tracker.

The detector elements of the VFHS are accessible in the LHC tunnel and
modular, so detectors can be replaced as techniques improve. We do not have
multi-TeV test beams, so electrons and pions are used for tests, which have
been done at the CERN SPS [5, 6] and compares well with simulations.

Without having a detailed technical design for the spectrometer it appears
feasible, with well-understood state-of-the-art detectors together with an
innovative TRD system that is being developed with very encouraging results.
Beam-line and detector (geant) simulations, and a realistic vacuum chamber
design, are needed for a technical proposal, including acceptances for physics
processes.

Where could such a spectrometer be located? Of the four existing collision
regions, the strongest cases can be made to add the VFHS to ALICE or LHCb (or
even both!). Relatively low luminosity running is an advantage, as the cross
sections are not small. This would give ALICE, whose focus is on heavy-ion
collisions, a programme of $p+p$ physics orthogonal (in more than one sense!)
to the high-$p_{T}$ central physics done well by ATLAS and CMS. The LHC is
capable of making both p-N and N-N collisions (after a short machine study),
and the VLHC can then measure the spectra of very forward showers produced in
the atmosphere by cosmic rays. The physics focus of LHCb is heavy flavors.
Potentially the VLHC can measure very forward charm and beauty, from “direct”
leptons or possibly $D^{0}\rightarrow K^{\pm}\pi^{\mp}$, but acceptance
calculations need to be done for a realistic detector design. Studies of the
central event correlated with leading hadrons may also be interesting.

I apologise for the very incomplete list of citations. I thank Anatoli
Romaniouk and his collaborators developing the TRD systems for VFHS (also
known as Small Angle Spectrometer, SAS). I would like to thank Pierre Petroff
and the organisers of “Exploring the Dark Side of the Universe” for the
invitation.

## References

  * [1] M.G. Albrow _et al._ (CHLM Collaboration), _Negative particle production in the fragmentation region at the CERN ISR_ , Nucl. Phys. B56 (1973) 333 - 345.
  * [2] M.G. Albrow _et al._ (CHLM Collaboration), _Positive particle production in the fragmentation region at the CERN ISR_ , Nucl. Phys. B73 (1974) 40 - 56.
  * [3] O. Adriani _et al._ (LHCf Collaboration), _Measurement of inclusive forward neutron production cross section in proton-proton collisions at $\sqrt{s}$ = 13 TeV with the LHCf Arm2 detector_, e-Print arXiv:1808.09877[hep-ex] CERN-EP-2018-239.
  * [4] A. Aab _et al._ (Auger Collaboration), _Testing hadronic interactions at ultrahigh energies with air showers measured by the Pierre Auger Observatory_ , DOI:10.1103/Phys. Rev. Lett. 117 192001 (2016).
  * [5] N. Belyaev _et al._ , _Test beam studies of possibilities to separate particles with $\gamma$-factors above $10^{3}$ with straw-based transition radiation detectors_, J.Phys - Conf.Ser 934 012053 (2017).
  * [6] V.O. Tikhomirov _et al._ _Some results of test beam studies of transition radiation detector prototypes at CERN_ , J. Phys. Conf. Ser. 798 (2017) 012183.