# Designing IRS-Aided MIMO Systems for Secrecy Enhancement

Saba Asaad, , Yifei Wu, Ali Bereyhi ,
Ralf R. Müller, , Rafael F. Schaefer, , and H. Vincent Poor Saba Asaad, Yifei
Wu, Ali Bereyhi and Ralf R. Müller are with the Institute for Digital
Communications, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany,
{saba.asaad, yifei.wu, ali.bereyhi<EMAIL_ADDRESS>Rafael F. Schaefer
is with the Chair of Communications Engineering and Security, University of
Siegen, Germany<EMAIL_ADDRESS>H. Vincent Poor is with the
Department of Electrical and Computer Engineering, Princeton University, NJ
08544, USA<EMAIL_ADDRESS>work was supported by Deutsche
Forschungsgemeinschaft (DFG) under Grant MU 3735/7-1 Project-No. 409561515,
and in part by the German Federal Ministry for Education and Research (BMBF)
under Grant 16KIS1242.

###### Abstract

Intelligent reflecting surfaces (IRSs) enable multiple-input multiple-output
(MIMO) transmitters to modify the communication channels between the
transmitters and receivers. In the presence of eavesdropping terminals, this
degree of freedom can be used to effectively suppress the information leakage
towards such malicious terminals. This leads to significant potential secrecy
gains in IRS-aided MIMO systems. This work exploits these gains via a
tractable joint design of downlink beamformers and IRS phase-shifts. In this
respect, we consider a generic IRS-aided MIMO wiretap setting and invoke
fractional programming and alternating optimization techniques to iteratively
find the beamformers and phase-shifts that maximize the achievable weighted
secrecy sum-rate. Our design concludes two low-complexity algorithms for joint
beamforming and phase-shift tuning. Performance of the proposed algorithms are
numerically evaluated and compared to the benchmark. The results reveal that
integrating IRSs into MIMO systems not only boosts the secrecy performance of
the system, but also improves the robustness against passive eavesdropping.

###### Index Terms:

Intelligent reflecting surfaces, physical layer security, fractional
programming, block coordinate decent, majorization-maximization method,
alternating optimization.

##  I Introduction

Over the past few years, the unprecedented growth of data traffic due to the
popularity of smart devices has created many challenges in the design of next-
generation wireless networks [1, 2, 3]. To address these challenges, various
advanced technologies have been proposed in recent years. Examples of such
technologies are massive multiple-input multiple-output (MIMO) systems [4, 5,
6], millimeter wave (mmW) communications [7, 8, 9], and ultra-dense
heterogeneous networks [10, 11, 12], just to name a few. Although employing
these key technologies can significantly enhance the spectral efficiency of
wireless networks, practical limits related to energy consumption, hardware
cost, and transceiver complexity are still considered burdensome [13, 14].
intelligent reflecting surface (IRS)-aided MIMO communications has recently
attracted considerable attention as an effective solution to these
implementational issues [15, 16].

Recent advances in the design of reflecting surfaces have introduced IRSs as
efficient components which can help overcoming various challenges of earlier
enabling technologies [17]. In fact, the ability of IRSs in beamforming and
reflecting the received signals with neither noise amplification nor self-
interference make them different from basic relaying components, e.g.,
conventional repeaters, in wireless networks [18]. IRSs are flexibly installed
on room ceiling, interior walls, and building facades [19]. Hence, from the
implementational viewpoint, IRS-aided architectures can significantly reduce
implementation cost without considerable performance degradation.

A primary application of IRSs in wireless communications is to employ them for
realizing a massive MIMO transmitter in a distributed fashion [20, 21]:
Instead of gathering a vast number of antennas at a single base station (BS),
an IRS is placed out of the location of a BS with a limited number of
antennas. Despite conceptual differences to massive MIMO, such settings are
shown to sustain the fundamental features of massive MIMO systems while
enjoying low implementational complexity [22, 23]. IRSs can further enable
cost-efficient realizations of hybrid analog digital architectures [24, 25,
26, 27]. In such architectures, the analog network is implemented via a set of
radio frequency (RF) transmitters illuminating the digitally precoded signals
towards an IRS, and the analog beamforming is performed by proper phase-
shifting at the IRS. As the physical analog network is replaced via a noise-
free wireless channel, these architectures significantly reduce the power-
loss. Interestingly, this gain is obtained at no considerable degradation in
the quality of downlink transmission [24].

In addition to the mentioned applications, IRSs potentially provide benefits
in terms of secrecy [28, 29, 30], network coverage [31] and spectrum
efficiency [32, 33]. A comprehensive overview of IRS-aided wireless
communications is provided in [34] where the authors discuss main
applications, channel estimation, deployment challenges and hardware issues.

###  I-A Secrecy in IRS-aided MIMO Communications

In an IRS-aided wireless network, the phase-shifts of the elements at the IRSs
can be tuned such that the reflected signals from the IRSs will be

  * •

constructively combined with the copy of the transmitted signal received
through the direct links between the BS and the legitimate terminals, and

  * •

destructively added to the signals received by eavesdroppers via their
respective direct links.

This property enables IRSs to greatly enhance the physical layer security of
MIMO settings. This potential however comes at the price of design complexity.
In fact, to employ effectively an IRS, one needs to jointly perform
beamforming and phase-shift tuning. This often lead to a computationally
intractable optimization; see for example discussions in [35]. As a result,
most primary studies consider the design of IRS-aided MIMO systems for
simplified settings; see for instance [35, 36, 37].

A fundamental study on the secrecy performance of IRS-aided settings is given
in [35], where the authors considered a simple wiretap setting with a single
legitimate receiver and a single eavesdropper. The investigations are further
extended to a slightly different setting with a superior eavesdropping channel
in [36]. The study in [38] investigates an IRS-aided multiple-input single-
output (MISO) transmission in a basic wiretap channel with a single-antenna
eavesdropper. Using deep learning for phase-shift tuning and downlink
beamforming is considered in [39], and the performance is compared with the
conventional methods in [35] and [36].

In addition to the passive beamforming gain achieved by IRSs, the extra
degrees of freedom provided by these surfaces lead to secrecy enhancements in
various other respects. For instance, the studies in [40, 41, 30] demonstrate
that generating artificial noise and applying controlled jamming by the BS in
IRS-assisted MISO settings result in significantly better secrecy performance
than in classic settings without IRSs. Another example is the robustness of
IRS-assisted MIMO settings against active eavesdropping reported recently in
[42]. In this study, an IRS-assisted wiretap setting with active eavesdroppers
is considered that contaminate the uplink training pilots of the legitimate
user terminals to increase their received information leakage. The results of
this study reveal that the further degrees of freedom achieved by the IRS
enables us to statistically blind the active eavesdroppers. This is in
contrast to classical massive MIMO settings that are known to be non-robust
against active eavesdropping; see [43, 44, 45] and the references therein.

The basic studies on secrecy performance of IRS-aided MIMO settings are
further extended in multiple directions; see for instance [46, 47, 48]. In
[46], the authors investigate the secrecy performance of a cooperative jamming
strategy applied by multiple eavesdroppers employing an IRS to attack a
single-antenna legitimate UT. Secure downlink transmission in a multiuser IRS-
aided MISO system with multiple legitimate and malicious UTs is further
studied in [47]. Despite extending the basic investigations to multiuser
settings, the work considers a special scenario in which all UTs are located
in the same direction of the transmitter and hence their channels are highly
correlated. The work is extended in [48] with respect to the channel model.
The latter study is still restricted to cases with blocked direct channels
from the transmitter to the IRSs and eavesdroppers.

###  I-B Contributions

As mentioned, the results in the literature imply that integrating IRSs into
MIMO systems can lead to significant enhancements in terms of secrecy
performance. Although this finding is concluded from several recent lines of
work, a design of secure active and passive beamforming in IRS-aided MIMO
systems is yet to be addressed. The main goal of this work is to design a
secure joint active, i.e., precoding at the transmitter, and passive
beamforming, i.e., phase-shift tuning at IRSs, by which the potential secrecy
gains of IRS-aided settings are exploited. This goal is reached through the
following contributions:

  * •

First the secrecy performance of an IRS-aided multiuser MIMO wiretap setting
is described in terms of the achievable weighted secrecy sum-rate. The
beamforming design is then formulated as a non-convex optimization problem. To
cope with the non-convexity, we initially derive a parameterized variational
problem whose solution returns the optimal design. We then invoke fractional
programming (FP) [49, 50] to transform the variational problem into a
quadratic problem. fp has been widely used for throughput maximization in
communication systems. The most relevant instance is the work in [51], in
which the authors use FP for weighted sum-rate maximization in an IRS-aided
MIMO system. Although the derivations in [51] consider a generic IRS-aided
MIMO system, extending them to a wiretap setting is not straightforward. We
address this issue by dividing the variational optimization into multiple
marginal problems and by conditionally bounding the objective of each marginal
problem. The final solution is then found by following the alternating
optimization (AO) strategy.

  * •

Using AO, the final solution is approximated via an iterative algorithm which
deals with multiple inner loops. This leads to high computational complexity.
We hence develop two algorithms with reduced complexity; namely a two-tiers
and a single-loop algorithm. For each of these algorithms, we show that the
weighted secrecy sum-rate increases monotonically as the algorithm iterates.

  * •

To confirm the validity of our derivations, we investigate the performance of
the proposed algorithms by running several numerical experiments. The results
are compared to multiple reference scenarios, e.g., the scenarios with no IRS
and random phase shift, as well as the state-of-the-art. Our investigations
confirm that the proposed scheme exploits the potential secrecy gains of IRS-
aided systems efficiently, while imposing a tractable processing load on to
the system.

###  I-C Notation and Organization

Scalars, vectors and matrices are represented with non-bold, bold lower-case,
and bold upper-case letters, respectively. $\mathbf{H}^{\mathsf{H}}$ indicates
the transposed conjugate of $\mathbf{H}$ and $\mathbf{I}_{N}$ is an $N\times
N$ identity matrix. The $\ell_{2}$-norm of ${\boldsymbol{x}}$ is denoted by
$\left\lVert{\boldsymbol{x}}\right\rVert$, and
$\left\lVert\mathbf{W}\right\rVert_{F}$ represents the Frobenius norm of
matrix $\mathbf{W}$. $\log$ indicates logarithm to the base $2$.
$\mathbbmss{R}$ and $\mathbbmss{C}$ refer to the real axis and the complex
plane, respectively. For $z\in\mathbbmss{C}$, $z^{*}$,
$\Re\left\\{z\right\\}$, and $\Im\left\\{z\right\\}$ denote the complex
conjugate, real part, and imaginary part of $z$, respectively.
$\mathcal{CN}\left(\eta,\sigma^{2}\right)$ represents the complex Gaussian
distribution with mean $\eta$ and variance $\sigma^{2}$. For sake of brevity,
$\left\\{1,\ldots,N\right\\}$ is shown by $\left[N\right]$.

The remaining parts of this manuscript are organized as follows: The system
model is described in Section II. In Section III, the design problem is
formulated and a variational problem with analytic objective is derived.
Section IV gives a quick introduction to FP and the key analytical tools used
in the paper. A class of alternative algorithms based on the AO strategy is
then derived in Section V. Section VI proposes algorithms with reduced
complexity and discusses their convergence. Numerical investigations are
presented in Section VII. Finally, the manuscript is concluded in Section
VIII.

##  II Problem Formulation

Secure downlink transmission in an IRS-aided broadcast setting is considered.
For sake of brevity, we focus on a single cell in which a BS with $M$ transmit
antennas serves $K$ single-antenna legitimate users. $J$ single-antenna
eavesdroppers passively overhear the channel. To improve the downlink
communication links, a passive IRS unit with $N$ programmable phase shifters
is deployed. The elements on this unit receive copies of the signal
transmitted by the BS and reflect them after applying phase shifts. These
phase shifts are adjustable and controlled by a central control unit. A
schematic diagram of the setting is represented in Fig. 1.

BS with $M$ antennasEve $j$IRS with $N$ elementsUT
$k$$\mathbf{T}$$\mathbf{h}_{\mathrm{r},k}$${\mathbf{g}}_{\mathrm{d},j}$${\mathbf{g}}_{\mathrm{r},j}$$\mathbf{h}_{\mathrm{d},k}$
Figure 1: A schematic representation of the system model. In this diagram, the
blue and red UTs denote the legitimate users and eavesdroppers, respectively.
In this model, both the direct and reflection paths are available between the
BS and a UT.

We consider transmission over a quasi-static slow fading channel which models
either a narrow-band single-carrier system or a particular sub-channel of a
wide-band multi-carrier system. The system operates in the time division
duplexing (TDD) mode. This means that the uplink and downlink transmissions
are performed at the same carrier frequency. As the result, the uplink and
downlink channels are reciprocal. Following this property, the BS acquires the
channel state information (CSI) in the uplink training phase and directly
applies it to the downlink signal transmission.

For channel estimation, we assume that the transmitter uses a classic channel
estimation algorithm for an IRS-aided MIMO system, e.g., [52, 53]. It is
further assumed that the eavesdroppers are registered users in the system.
This means that during the uplink training phase, the BS also acquires the CSI
of the eavesdroppers. To keep the analysis tractable, we further ignore the
channel estimation error and accordingly assume that the CSI of the receive
terminals are perfectly available at the BS.

######  Remark 1.

It is worth mentioning that in this work we focus on passive eavesdropping.
Such a setting models broadcast scenarios with confidential messages in which
the eavesdroppers are registered UTs. These UTs are supposed to receive the
common messages broadcasted in the network, but should receive no information
regarding the confidential messages; see for example studies in [54, 55] and
references therein. The act of eavesdropping in such networks is conceptually
different from overhearing the common message. In the latter case,
eavesdroppers are not registered users and are purely employed to eavesdrop
upon a message which is supposed to be received only by the registered users.
In such a scenario, the eavesdroppers either do not participate in the uplink
training phase111Hence, their CSI is not available at the BS. or perform an
active attack222And hence, they contaminate the acquired CSI., e.g., the
active pilot attack; see for instance the system model in [42].

###  II-A System Model

To model the downlink transmission in this setting, we note that each UT
receives a superposition of two signals:

  1. 1.

A signal which is received through the direct path333Note that the direct path
is not necessarily the line-of-sight. It merely refers to the channel between
the BS and a UT which may include a line-of-sight path and/or scatterings.
between the BS and the UT, and

  2. 2.

a signal which is reflected via the IRS.

Let $\mathbf{x}\in\mathbbmss{C}^{M}$ contain the signal samples being
transmitted in a particular symbol interval via the transmit antennas at the
BS. The received signal at legitimate UT $k\in\left[K\right]$ is hence given
by

$\displaystyle\mathrm{y}_{k}=\mathbf{h}_{\mathrm{d},k}^{\mathsf{H}}\mathbf{x}+\mathbf{h}_{\mathrm{r},k}^{\mathsf{H}}\mathbf{\Phi}^{\mathsf{H}}\mathbf{r}+\vartheta_{k}.$
(1)

In (1), $\mathbf{\Phi}$, $\mathbf{r}$, $\vartheta_{k}$,
$\mathbf{h}_{\mathrm{d},k}$ and $\mathbf{h}_{\mathrm{r},k}$ are defined as
follows:

  * •

$\mathbf{\Phi}\in\mathbbmss{C}^{N\times N}$ is a diagonal matrix modeling the
phase-shifts applied by the elements on the IRS-unit,

  * •

$\mathbf{r}$ is the signal received by the IRS-unit from the BS,

  * •

$\vartheta_{k}$ is complex Gaussian noise with zero mean and variance
$\sigma_{k}^{2}$, i.e.,
$\vartheta_{k}\sim\mathcal{CN}\left(0,\sigma_{k}^{2}\right)$,

  * •

$\mathbf{h}_{\mathrm{d},k}\in\mathbbmss{C}^{M}$ represents the conjugate of
direct uplink channel between UT $k$ and the BS444Representing the uplink
channel vectors via conjugated vectors is for sake of simplicity.,

  * •

$\mathbf{h}_{\mathrm{r},k}\in\mathbbmss{C}^{N}$ denotes the conjugate of
uplink channel between UT $k$ and the IRS-unit.

Following the fact that the reflecting elements are passive, we can write
$\mathbf{\Phi}={\mathrm{diag}}\left\\{{\boldsymbol{\phi}}\right\\}$, for some
${\boldsymbol{\phi}}=\left[\phi_{1},\cdots,\phi_{N}\right]^{\mathsf{T}}$ where
$\phi_{n}$ is of the form

$\displaystyle\phi_{n}=\beta_{n}e^{-\mathrm{j}\theta_{n}}$ (2)

for some $\beta_{n}\in\left[0,1\right]$ and $\theta_{n}\in\left[0,2\pi\right)$
denoting the attenuation coefficient and the phase shift applied by the $n$-th
reflecting element, respectively. We assume that the attenuation coefficients
of all IRS elements are identical. In other words, we consider a case in which
$\beta_{n}$ for $n\in\left[N\right]$ are not tunable555This means that the
control unit which controls the IRS does not update the attenuation
coefficients.. Such an assumption follows from the following two facts:

  1. 1.

Current technology suggests that implementationally efficient IRSs consist of
elements whose attenuation characteristics are not tunable [56]. As the
result, practical designs for IRS-assisted communications ignore this degree
of freedom666Although it is theoretically possible to be considered..

  2. 2.

Due to the long distance between the BS and IRS, the so-called tapering effect
is negligible in our setting and can be included in the path-loss model: The
tapering effect refers to the non-uniform distribution of attenuation
coefficients on the elements of an IRS, due to their different distances and
angles of arrival to the transmit array antenna. This effect is tangible in
settings in which the IRS is a part of the transmitter architecture, e.g., the
scenarios in [24, 25, 26]. This is not the case in our setting, as we assume
that the IRS is a passive element located in a long distance out of the BS
site. As the result, the variation of the attenuation coefficients from one
IRS element to another is insignificant. This small tapering effect can be
ignored at the IRS and be incorporated in the channel path-loss.

Following the above discussions, we set $\beta_{n}=1$ for
$n\in\left[N\right]$.

The received signal $\mathbf{r}$ is further given in terms of $\mathbf{x}$ as

$\displaystyle\mathbf{r}=\mathbf{T}^{\mathsf{H}}\mathbf{x},$ (3)

where $\mathbf{T}^{*}\in\mathbbmss{C}^{M\times N}$ contains the coefficients
of the uplink channels from the IRS elements to the BS. Consequently, the
input-output relation in (1) can be represented as

$\displaystyle\mathrm{y}_{k}=\tilde{\mathbf{h}}_{k}^{\mathsf{H}}\left({\boldsymbol{\phi}}\right)\mathbf{x}+\vartheta_{k},$
(4) where
$\tilde{\mathbf{h}}_{k}\left({\boldsymbol{\phi}}\right)\in\mathbbmss{C}^{M}$
describes the effective end-to-end uplink channel between the $k$-th
legitimate UT and the BS, and is given by
$\displaystyle\tilde{\mathbf{h}}_{k}\left({\boldsymbol{\phi}}\right)$
$\displaystyle=\mathbf{h}_{\mathrm{d},k}+\mathbf{T}\mathbf{\Phi}\mathbf{h}_{\mathrm{r},k}$
(5a)
$\displaystyle=\mathbf{h}_{\mathrm{d},k}+\mathbf{T}\;{\mathrm{diag}}\\{\mathbf{h}_{\mathrm{r},k}\\}\;{\boldsymbol{\phi}}$
(5b)
$\displaystyle=\mathbf{h}_{\mathrm{d},k}+\mathbf{H}_{k}{\boldsymbol{\phi}}$
(5c)

with
$\mathbf{H}_{k}=\mathbf{T}\;{\mathrm{diag}}\\{\mathbf{h}_{\mathrm{r},k}\\}$.
$\mathbf{H}_{k}$ can be regarded as the cascaded effective uplink channel
between UT $k$ and the BS through the IRS. We further define the following
notation:

$\displaystyle\tilde{\mathbf{H}}\left({\boldsymbol{\phi}}\right)$
$\displaystyle=\left[\tilde{\mathbf{h}}_{1}\left({\boldsymbol{\phi}}\right),\cdots,\tilde{\mathbf{h}}_{K}\left({\boldsymbol{\phi}}\right)\right]$
(6)

and refer to it as the legitimate channel matrix.

With a similar approach, the signal received by eavesdropper $j$ is written as

$\displaystyle\mathrm{z}_{j}=\tilde{{\mathbf{g}}}_{j}^{\mathsf{H}}\left({\boldsymbol{\phi}}\right)\mathbf{x}+\xi_{j}$
(7) where $\xi_{j}\sim\mathcal{CN}\left(0,\mu_{j}^{2}\right)$ is Gaussian
noise, and
$\tilde{{\mathbf{g}}}_{j}\left({\boldsymbol{\phi}}\right)\in\mathbbmss{C}^{M}$
describes the effective end-to-end uplink channel from eavesdropper $j$ to the
BS being given by
$\displaystyle\tilde{{\mathbf{g}}}_{j}\left({\boldsymbol{\phi}}\right)$
$\displaystyle={\mathbf{g}}_{\mathrm{d},j}+\mathbf{T}\mathbf{\Phi}{\mathbf{g}}_{\mathrm{r},j}$
(8a)
$\displaystyle={\mathbf{g}}_{\mathrm{d},j}+\mathbf{T}\;{\mathrm{diag}}\\{{\mathbf{g}}_{\mathrm{r},j}\\}\;{\boldsymbol{\phi}}$
(8b)
$\displaystyle={\mathbf{g}}_{\mathrm{d},j}+\mathbf{G}_{j}{\boldsymbol{\phi}}.$
(8c)

In (8c), ${\mathbf{g}}_{\mathrm{d},j}$ and ${\mathbf{g}}_{\mathrm{r},j}$ are
the conjugates of the channels corresponding to the path from eavesdropper $j$
to the BS and the IRS-unit, respectively. $\mathbf{G}_{j}$ further represents
the effective uplink channel between the $j$-th eavesdropper and the BS
through the IRS and is defined as

$\displaystyle\mathbf{G}_{j}=\mathbf{T}\;{\mathrm{diag}}\left\\{{\mathbf{g}}_{\mathrm{r},j}\right\\}$
(9)

For sake of brevity, we further define the notations

$\displaystyle\tilde{\mathbf{G}}\left({\boldsymbol{\phi}}\right)$
$\displaystyle=\left[\tilde{{\mathbf{g}}}_{1}\left({\boldsymbol{\phi}}\right),\cdots,\tilde{{\mathbf{g}}}_{J}\left({\boldsymbol{\phi}}\right)\right],$
(10a) $\displaystyle\mathbf{\Upsilon}_{\mathrm{e}}$
$\displaystyle={\mathrm{diag}}\left\\{\frac{1}{\mu_{1}},\cdots,\frac{1}{\mu_{J}}\right\\}$
(10b)

and refer to them as the eavesdropping channel and precision matrix,
respectively.

###  II-B Linear Precoding at the BS

The BS constructs the transmit signal from the encoded information symbols of
the legitimate UTs, i.e, $s_{1},\cdots,s_{K}$, via linear precoding. Let
${\mathbf{w}}_{k}$ denote the precoding vector for UT $k$. The transmit signal
in this case is given by

$\displaystyle\mathbf{x}=\sum_{k=1}^{K}s_{k}{\mathbf{w}}_{k}.$ (11)

We assume that the encoded information symbols are independent and identically
distributed (i.i.d.) standard complex Gaussian random variables, i.e.,
$\mathbf{s}\sim\mathcal{CN}\left(\boldsymbol{0},\mathbf{I}_{K}\right)$, where
$\mathbf{s}=\left[s_{1},\cdots,s_{K}\right]$.

In order to restrict the transmit power to the maximum allowed power
$P_{\mathrm{max}}$, precoding vectors are scaled, such that

$\displaystyle\mathbb{E}\left\\{\left\lVert\mathbf{x}\right\rVert^{2}\right\\}\leq
P_{\mathrm{max}}.$ (12)

Defining $\mathbf{W}=\left[{\mathbf{w}}_{1},\cdots,{\mathbf{w}}_{K}\right]$ as
the precoding matrix, the transmit signal is compactly written as
$\mathbf{x}=\mathbf{W}\mathbf{s}$. The power constraint can then be written as

$\displaystyle\mathbb{E}\left\\{\left\lVert\mathbf{W}\mathbf{s}\right\rVert^{2}\right\\}\leq
P_{\mathrm{max}}.$ (13)

Noting that
$\mathbb{E}\left\\{\mathbf{s}\mathbf{s}^{\mathsf{H}}\right\\}=\mathbf{I}_{K}$,
the power constraint reduces to

$\displaystyle\sum_{k=1}^{K}\|{\mathbf{w}}_{k}\|^{2}\leq P_{\mathrm{max}}$
(14)

or equivalently $\left\lVert\mathbf{W}\right\rVert_{F}^{2}\leq
P_{\mathrm{max}}$.

###  II-C Secrecy Performance Metric

The downlink transmission is considered to be secure, if the BS reliably
transmits the encoded symbols to the legitimate UTs without allowing any
information leakage to the malicious terminals. A rate tuple
$\left(R_{1},\ldots,R_{K}\right)$ at which secure transmission is guaranteed
is called an achievable tuple of secrecy rates, and the convex hull of all
achievable tuples is defined as the secrecy capacity region.

In general, the capacity region is not a tractable performance metric for a
practical system design. An alternative metric is given by considering a
classical inner bound of the secrecy capacity region: A rate tuple
$\left(R_{1},\ldots,R_{K}\right)$ is achievable with precoding matrix
$\mathbf{W}$ and vector of phase-shifts ${\boldsymbol{\phi}}$, if for
$k\in\left[K\right]$ we have
$R_{k}\leq\mathcal{R}_{k}^{\mathrm{s}}\left(\mathbf{W},{\boldsymbol{\phi}}\right)$
[57]. The lower bound
$\mathcal{R}_{k}^{\mathrm{s}}\left(\mathbf{W},{\boldsymbol{\phi}}\right)$ is
given by

$\displaystyle\mathcal{R}_{k}^{\mathrm{s}}\left(\mathbf{W},{\boldsymbol{\phi}}\right)=\left[\mathcal{R}_{k}^{\mathrm{m}}\left(\mathbf{W},{\boldsymbol{\phi}}\right)-\mathcal{R}_{k}^{\mathrm{e}}\left(\mathbf{W},{\boldsymbol{\phi}}\right)\right]^{+}$
(15)

where
$\mathcal{R}_{k}^{\mathrm{m}}\left(\mathbf{W},{\boldsymbol{\phi}}\right)$ and
$\mathcal{R}_{k}^{\mathrm{e}}\left(\mathbf{W},{\boldsymbol{\phi}}\right)$ are
defined as follows:

  * •

$\mathcal{R}_{k}^{\mathrm{m}}\left(\mathbf{W},{\boldsymbol{\phi}}\right)$ is a
lower bound on the maximum achievable rate to legitimate UT $k$ and is given
by

$\displaystyle\mathcal{R}_{k}^{\mathrm{m}}\left(\mathbf{W},{\boldsymbol{\phi}}\right)=\log\left(1+\mathrm{SINR}_{k}\left(\mathbf{W},{\boldsymbol{\phi}}\right)\right),$
(16)

where $\mathrm{SINR}_{k}\left(\mathbf{W},{\boldsymbol{\phi}}\right)$ is the
signal-to-interference-plus-noise ratio (SINR) at UT $k$ and is determined as

$\displaystyle\mathrm{SINR}_{k}\left(\mathbf{W},{\boldsymbol{\phi}}\right)=\frac{|\tilde{\mathbf{h}}_{k}^{\mathsf{H}}({\boldsymbol{\phi}}){\mathbf{w}}_{k}|^{2}}{\displaystyle\sum_{i=1,i\neq
k}^{K}|\tilde{\mathbf{h}}_{k}^{\mathsf{H}}({\boldsymbol{\phi}}){\mathbf{w}}_{i}|^{2}+\sigma_{k}^{2}}.$
(17)

  * •

$\mathcal{R}_{k}^{\mathrm{e}}\left(\mathbf{W},{\boldsymbol{\phi}}\right)$ is
an upper bound on the maximum information leakage to the eavesdroppers and is
expressed as

$\displaystyle\mathcal{R}_{k}^{\mathrm{e}}\left(\mathbf{W},{\boldsymbol{\phi}}\right)=\log\left(1+\mathrm{ESNR}_{k}\left(\mathbf{W},{\boldsymbol{\phi}}\right)\right)$
(18)

with $\mathrm{ESNR}_{k}\left(\mathbf{W},{\boldsymbol{\phi}}\right)$ being
defined as

$\displaystyle\mathrm{ESNR}_{k}\left(\mathbf{W},{\boldsymbol{\phi}}\right)=\left\lVert\mathbf{\Upsilon}_{\mathrm{e}}\mathbf{\tilde{G}^{\mathsf{H}}}({\boldsymbol{\phi}}){\mathbf{w}}_{k}\right\rVert^{2}.$
(19)

By plugging (16) and (18) into (15),
$\mathcal{R}_{k}^{\mathrm{s}}\left(\mathbf{W},{\boldsymbol{\phi}}\right)$ is
compactly written as

$\displaystyle\mathcal{R}_{k}^{\mathrm{s}}\left(\mathbf{W},{\boldsymbol{\phi}}\right)=\left[\log\left(\dfrac{1+\mathrm{SINR}_{k}\left(\mathbf{W},{\boldsymbol{\phi}}\right)}{1+\mathrm{ESNR}_{k}\left(\mathbf{W},{\boldsymbol{\phi}}\right)}\right)\right]^{+}.$
(20)

The above inner bound is derived by considering the worst-case scenario in
which all eavesdroppers cooperate to overhear the secure transmission and are
able to cancel out the interference of other legitimate UTs. It is hence clear
that larger secrecy rates are also achievable in a practical setting, since
such worst-case assumptions are not necessarily fulfilled.

In the sequel, we utilize this inner bound to quantify the secrecy throughput
of the system. To this end, we define the weighted secrecy sum-rate as

$\displaystyle\mathcal{R}^{\mathrm{ssr}}\left(\mathbf{W},{\boldsymbol{\phi}}\right)=\sum_{k=1}^{K}\omega_{k}\mathcal{R}_{k}^{\mathrm{s}}\left(\mathbf{W},{\boldsymbol{\phi}}\right)$
(21)

for some non-negative real weights $\omega_{1},\ldots,\omega_{K}$
corresponding to the quality-of-services desired for the UTs.

##  III Jointly Optimal Precoding and Phase-Shifting

Considering the problem formulation, the design parameters in this system are
the precoding vectors at the BS and phase-shifts applied by the IRS-unit. As a
result, the ultimate goal of this work is to design a joint precoding and
phase-shifting algorithm that maximizes the weighted secrecy sum-rate.

With respect to the given performance metric, the optimal design for the
precoding matrix and phase shifts is given via the following constrained
optimization $\mathcal{P}_{1}$:

$\displaystyle\max_{\mathbf{W},{\boldsymbol{\phi}}}\left.\mathcal{R}^{\mathrm{ssr}}\left(\mathbf{W},{\boldsymbol{\phi}}\right)\right.$
($\mathcal{P}_{1}$) $\displaystyle\text{subject to
}\left\lVert\mathbf{W}\right\rVert_{F}^{2}\leq P_{\mathrm{max}}$ (22a)
$\displaystyle\phantom{\text{subject to }}\lvert\phi_{n}\rvert=1,~{}\forall
n\in\left[N\right].$ (22b)

Here, (22a) ensures that the maximum transmit power is kept below the BS power
budget $P_{\mathrm{max}}$, and (22b) restricts the unit modulus constraints
imposed by the physical characteristics of the IRS elements.

The optimization problem $\mathcal{P}_{1}$ contains two analytical challenges:

  * (a)

The objective function is not differentiable with respect to the optimization
variables. This follows from the fact that the non-negative operator, i.e.,
$f\left(x\right)=\left[x\right]^{+}$, is not differentiable.

  * (b)

Even by replacing the non-negative operators with their arguments in
$\mathcal{R}^{\mathrm{ssr}}\left(\mathbf{W},{\boldsymbol{\phi}}\right)$,
$\mathcal{P}_{1}$ is still non-convex. This is due to non-convexity of the
objective function and the unit modulus constraints in (22b).

The above challenges indicate that the global optimum of $\mathcal{P}_{1}$ can
not be computed via classical convex programming techniques. In fact, it
requires a brute-force search that is not a computationally tractable option
even for not-so-large dimensions.

We address these issues as follows: First, a variational optimization problem
is derived whose objective is differentiable and whose solution coincides with
the solution of $\mathcal{P}_{1}$. We then develop a two-tiers algorithm that
uses block coordinate descent (BCD) and FP to approximate the solution of the
variational problem.

### The Variational Problem

Theorem 1 gives an alternative optimization problem with a differentiable
objective function whose solution lies on the solution of $\mathcal{P}_{1}$.

######  Theorem 1 (The variational problem).

Let $\mathcal{R}^{\star}$ be the maximum of the optimization problem
$\mathcal{P}_{1}$. Then, we have

$\displaystyle\mathcal{R}^{\star}=$
$\displaystyle\max_{\mathbf{W},{\boldsymbol{\phi}},\mathbf{b}}\left.\mathcal{R}^{\mathrm{ssr}}_{\mathrm{q}}\left(\mathbf{W},{\boldsymbol{\phi}},\mathbf{b}\right)\right.$
($\mathcal{P}_{2}$) $\displaystyle\text{subject to
}\left\lVert\mathbf{W}\right\rVert_{F}^{2}\leq P_{\mathrm{max}}$ (23a)
$\displaystyle\phantom{\text{subject to }}\lvert\phi_{n}\rvert=1,~{}\forall
n\in\left[N\right],$ (23b) $\displaystyle\phantom{\text{subject to
}}\mathbf{b}\in\left[0,1\right]^{K}$ (23c)

where the objective function
$\mathcal{R}^{\mathrm{ssr}}_{\mathrm{q}}\left(\mathbf{W},{\boldsymbol{\phi}},\mathbf{b}\right)$
is given by

$\displaystyle\mathcal{R}^{\mathrm{ssr}}_{\mathrm{q}}\left(\mathbf{W},{\boldsymbol{\phi}},\mathbf{b}\right)=\sum_{k=1}^{K}\omega_{k}b_{k}\log\left(\dfrac{1+\mathrm{SINR}_{k}\left(\mathbf{W},{\boldsymbol{\phi}}\right)}{1+\mathrm{ESNR}_{k}\left(\mathbf{W},{\boldsymbol{\phi}}\right)}\right)$
(24)

with $b_{k}$ denoting the $k$-th entry of $\mathbf{b}$.

###### Proof.

The equivalency of $\mathcal{P}_{1}$ and $\mathcal{P}_{2}$ is justified by
showing that the maximum of $\mathcal{P}_{1}$ bounds the maximum of
$\mathcal{P}_{2}$ from below and above. The simultaneous validity of both
bounds hence concludes the equivalence of the maxima. The detailed proof is
given in Appendix A. ∎

Theorem 1 addresses the non-differentiability issue of the objective function
in $\mathcal{P}_{1}$. Nevertheless, the alternative form in $\mathcal{P}_{2}$
is still non-convex. We address this latter issue in the sequel by developing
an iterative algorithm which approximates the solution of $\mathcal{P}_{2}$.

##  IV Analytical Tools From Fractional Programming

FP is the key analytical tool used in this work. We hence give a quick
overview on the main concepts in FP in this section. To this end, we introduce
the Lagrangian dual transform for a sum of logarithmic ratios problem and the
quadratic transform for a multiple-ratio problem [49, 50]. These are the key
results which help us tackling the optimization $\mathcal{P}_{2}$.

###  IV-A Lagrangian Dual and Quadratic Transforms

The generic form of a sum of logarithmic ratios is given by

$\displaystyle
S\left(\mathbf{x}\right)=\sum_{k=1}^{K}\omega_{k}\log\left(1+\dfrac{A_{k}\left(\mathbf{x}\right)}{B_{k}\left(\mathbf{x}\right)}\right).$
(25)

where $\omega_{k}$ is a non-negative real,
$A_{k}\left(\cdot\right):\mathbbmss{C}^{N}\mapsto\mathbbmss{R}^{+}_{0}$ is a
non-negative function, and
$B_{k}\left(\cdot\right):\mathbbmss{C}^{N}\mapsto\mathbbmss{R}^{+}$ is a
strictly positive function, for $k\in\left[K\right]$.

Consider the following optimization problem

$\displaystyle\max_{\mathbf{x}}\left.S\left(\mathbf{x}\right)\right.$ (26a)
$\displaystyle\text{subject to }\mathbf{x}\in\mathbbmss{X}$ (26b) for some
$\mathbbmss{X}\subseteq\mathbbmss{C}^{N}$ which is non-empty. The Lagrangian
dual transform gives an equivalent optimization problem whose both maximum and
maximizer recover those given by (26) [50].

######  Definition 1 (Lagrangian dual objective).

For auxiliary vector
${\mathbf{t}}=\left[t_{1},\ldots,t_{K}\right]\in\mathbbmss{R}_{0}^{+K}$, the
Lagrangian dual objective of the sum of logarithmic ratios
$S\left(\mathbf{x}\right)$ is given by

$\displaystyle
L\left(\mathbf{x},{\mathbf{t}}\right)=\sum_{k=1}^{K}\omega_{k}\left(\Xi\left(t_{k}\right)+\dfrac{\left(1+t_{k}\right)A_{k}\left(\mathbf{x}\right)}{A_{k}\left(\mathbf{x}\right)+B_{k}\left(\mathbf{x}\right)}\right)$
(27)

where the function
$\Xi\left(\cdot\right):\mathbbmss{R}_{0}^{+}\mapsto\mathbbmss{R}$ is defined
as

$\displaystyle\Xi\left(x\right)=\log\left(1+x\right)-x.$ (28)

In [50, Theorem 3], it is shown that the maximum value of the objective
function in (26), as well as the point at which the objective is maximized,
are given by the following equivalent optimization problem:

$\displaystyle\max_{\mathbf{x},{\mathbf{t}}}\left.L\left(\mathbf{x},{\mathbf{t}}\right)\right.$
(29a) $\displaystyle\text{ subject to }\mathbf{x}\in\mathbbmss{X}\text{ and
}{\mathbf{t}}\in\mathbbmss{R}_{0}^{+K}.$ (29b)

We refer to this transformed version, as the Lagrangian dual transform of the
optimization problem in (26).

Similar to the Lagrangian dual transform, the quadratic transform provides an
equivalent optimization problem, when a multiple-ratio function is to be
maximized [49]. To illustrate this transform, consider a multiple-ratio
function

$\displaystyle M\left(\mathbf{x}\right)=\sum_{k=1}^{K}\dfrac{\lvert
C_{k}\left(\mathbf{x}\right)\rvert^{2}}{D_{k}\left(\mathbf{x}\right)},$ (30)

in which $C_{k}\left(\cdot\right):\mathbbmss{C}^{N}\mapsto\mathbbmss{C}$, and
$D_{k}\left(\cdot\right):\mathbbmss{C}^{N}\mapsto\mathbbmss{R}^{+}$ is a
strictly positive function, for $k\in\left[K\right]$. We now focus on the
following target optimization problem

$\displaystyle\max_{\mathbf{x}}\left.M\left(\mathbf{x}\right)\right.$ (31a)
$\displaystyle\text{subject to }\mathbf{x}\in\mathbbmss{X}$ (31b) for some
non-empty $\mathbbmss{X}\subseteq\mathbbmss{C}^{N}$. An equivalent
optimization problem in this case is given by the quadratic transformed [49].

######  Definition 2 (Quadratic equivalent objective).

For auxiliary vector
$\boldsymbol{\beta}=\left[\beta_{1},\ldots,\beta_{K}\right]\in\mathbbmss{C}^{K}$,
the quadratic equivalent objective of the multiple-ratio function
$M\left(\mathbf{x}\right)$ is given by

$\displaystyle
Q\left(\mathbf{x},\boldsymbol{\beta}\right)=\sum_{k=1}^{K}2\left.\Re\left\\{\beta_{k}^{*}C_{k}\left(\mathbf{x}\right)\right\\}\right.-\lvert\beta_{k}\rvert^{2}D_{k}\left(\mathbf{x}\right).$
(32)

Theorem 2 in [49] states that the solution of (31) is given by solving the
following equivalent optimization problem:

$\displaystyle\max_{\mathbf{x},\boldsymbol{\beta}}\left.Q\left(\mathbf{x},\boldsymbol{\beta}\right)\right.$
(33a) $\displaystyle\text{ subject to }\mathbf{x}\in\mathbbmss{X}\text{ and
}\boldsymbol{\beta}\in\mathbbmss{C}^{K}.$ (33b)

We refer to (33) as the quadratic transform of (31).

##  V Developing an Iterative Algorithm

Starting from $\mathcal{P}_{2}$, we now develop an iterative algorithm which
approximates the maximum weighted secrecy sum-rate tractably. The algorithm
consists of two tiers: In the first tier, the BCD technique is used to
approximate the solution of the joint optimization problem $\mathcal{P}_{2}$
by a cyclic alternation among multiple marginal optimization problems. In the
second tier, we use FP and the majorization-maximization (MM) algorithm [58]
to address each of these marginal sub-problems.

We start the derivations with the first tier: Considering the optimization
problem $\mathcal{P}_{2}$, we group the optimization variables into three
blocks; namely, $\mathbf{W}$, ${\boldsymbol{\phi}}$, and $\mathbf{b}$. Noting
that these blocks are not coupled via the constraints of $\mathcal{P}_{2}$, we
use a BCD-type algorithm to approximate the maxima by cyclically alternating
among the three marginal problems [59]. In each of these problems, a marginal
optimization with respect to one of the blocks is performed while the other
two blocks are treated as fixed variables. The alternation among these
marginal problems ends when all the blocks converge.

Despite the complexity reduction achieved via the AO technique in the first
tier, there exists still a challenge: Two marginal problems deal with a non-
convex optimizations. We address this issue in the second tier, where we use
the FP and the MM algorithm to approximate the solution of each marginal
problem tractably.

###  V-A First Marginal Problem

The first marginal optimization finds the precoding matrix that maximizes the
objective
$\mathcal{R}^{\mathrm{ssr}}_{\mathrm{q}}\left(\mathbf{W},{\boldsymbol{\phi}},\mathbf{b}\right)$
while treating ${\boldsymbol{\phi}}$ and $\mathbf{b}$ as fixed variables in
$\mathcal{P}_{2}$, i.e., it finds $\mathbf{W}^{\star}$ as
$\displaystyle\mathbf{W}^{\star}=$
$\displaystyle\operatorname*{argmax}_{\mathbf{W}}\left.\mathcal{R}^{\mathrm{ssr}}_{\mathrm{q}}\left(\mathbf{W},{\boldsymbol{\phi}}_{0},\mathbf{b}_{0}\right)\right.$
($\mathcal{M}_{1}$) $\displaystyle\text{subject to
}\left\lVert\mathbf{W}\right\rVert_{F}^{2}\leq P_{\mathrm{max}},$ (34a)

for some fixed ${\boldsymbol{\phi}}_{0}$ and $\mathbf{b}_{0}$.

It is straightforwardly seen from (24) that the marginal problem
$\mathcal{M}_{1}$ is non-convex. Considering the logarithmic form of the
objective function, we use the Lagrangian dual transform to tackle this
problem. To this end, we note that the objective function can be decomposed as

$\displaystyle\mathcal{R}^{\mathrm{ssr}}_{\mathrm{q}}\left(\mathbf{W},{\boldsymbol{\phi}}_{0},\mathbf{b}_{0}\right)=S_{1}^{\rm
m}\left(\mathbf{W}\right)+S_{1}^{\rm e}\left(\mathbf{W}\right)$ (35)

where the functions $S_{1}^{\rm m}\left(\mathbf{W}\right)$ and $S_{1}^{\rm
e}\left(\mathbf{W}\right)$ are sums of logarithmic ratios and are defined as

$\displaystyle S^{\rm m}_{1}\left(\mathbf{W}\right)$
$\displaystyle=\sum_{k=1}^{K}\omega_{k}b_{0k}\log\left(1+\frac{A_{1k}^{\rm
m}\left(\mathbf{W}\right)}{B_{1k}^{\rm m}\left(\mathbf{W}\right)}\right)$
(36a) $\displaystyle S_{1}^{\rm e}\left(\mathbf{W}\right)$
$\displaystyle=\sum_{k=1}^{K}\omega_{k}b_{0k}\log\left(\frac{1}{B_{1k}^{\rm
e}\left(\mathbf{W}\right)}\right).$ (36b)

with $A_{1k}^{\rm m}\left(\mathbf{W}\right)$, $B_{1k}^{\rm
m}\left(\mathbf{W}\right)$ and $B_{1k}^{\rm e}\left(\mathbf{W}\right)$ being

$\displaystyle A_{1k}^{\rm m}\left(\mathbf{W}\right)$
$\displaystyle=\lvert\tilde{\mathbf{h}}^{\mathsf{H}}_{k}\left({\boldsymbol{\phi}}_{0}\right){\mathbf{w}}_{k}\rvert^{2},$
(37a) $\displaystyle B_{1k}^{\rm m}\left(\mathbf{W}\right)$
$\displaystyle=\sum_{i=1,i\neq
k}^{K}\lvert\tilde{\mathbf{h}}^{\mathsf{H}}_{k}\left({\boldsymbol{\phi}}_{0}\right){\mathbf{w}}_{i}\rvert^{2}+\sigma_{k}^{2},$
(37b) $\displaystyle B_{1k}^{\rm e}\left(\mathbf{W}\right)$
$\displaystyle=1+\left\lVert\mathbf{\Upsilon}_{\mathrm{e}}\mathbf{\tilde{G}^{\mathsf{H}}}\left({\boldsymbol{\phi}}_{0}\right){\mathbf{w}}_{k}\right\rVert^{2}.$
(37c)

Although $S_{1}^{\rm m}\left(\mathbf{W}\right)$ is of the standard form given
in (25), the function $S_{1}^{\rm e}\left(\mathbf{W}\right)$ does not fulfill
the non-negativity constraint of the nominator: One can rewrite $S_{1}^{\rm
e}\left(\mathbf{W}\right)$ as

$\displaystyle S_{1}^{\rm e}\left(\mathbf{W}\right)$
$\displaystyle=\sum_{k=1}^{K}\omega_{k}b_{0k}\log\left(1+\frac{1-B_{1k}^{\rm
e}\left(\mathbf{W}\right)}{B_{1k}^{\rm e}\left(\mathbf{W}\right)}\right).$
(38)

However, in this case $1-B_{1k}^{\rm e}\left(\mathbf{W}\right)\leq 0$ which
violates the necessary condition of having a non-negative nominator. To
overcome this issue, we note that

$\displaystyle B_{1k}^{\rm e}\left(\mathbf{W}\right)$ $\displaystyle\leq
1+\left\lVert\mathbf{\Upsilon}_{\mathrm{e}}\mathbf{\tilde{G}^{\mathsf{H}}}\left({\boldsymbol{\phi}}_{0}\right)\right\rVert_{F}^{2}\left\lVert{\mathbf{w}}_{k}\right\rVert^{2}.$
(39)

Since the power constraint enforces
$\left\lVert{\mathbf{w}}_{k}\right\rVert^{2}\leq P_{\mathrm{max}}$, we could
conclude that $B_{1k}^{\rm e}\left(\mathbf{W}\right)\leq B_{1U}^{\rm e}$
with777Note that the upper bound is fixed in terms of $\mathbf{W}$.

$\displaystyle B_{1U}^{\rm
e}=1+\left\lVert\mathbf{\Upsilon}_{\mathrm{e}}\mathbf{\tilde{G}^{\mathsf{H}}}\left({\boldsymbol{\phi}}_{0}\right)\right\rVert_{F}^{2}P_{\mathrm{max}}.$
(40)

Using this upper bound, we can rewrite $S_{1}^{\rm m}\left(\mathbf{W}\right)$
as

$\displaystyle S_{1}^{\rm e}\left(\mathbf{W}\right)$
$\displaystyle=\sum_{k=1}^{K}\omega_{k}b_{0k}\log\left(\frac{1}{B_{1k}^{\rm
e}\left(\mathbf{W}\right)}\right)$ (41a)
$\displaystyle=\sum_{k=1}^{K}\omega_{k}b_{0k}\log\left(\frac{B_{1U}^{\rm
e}}{B_{1k}^{\rm e}\left(\mathbf{W}\right)}\right)-\log B_{1U}^{\rm e}$ (41b)
$\displaystyle=\sum_{k=1}^{K}\omega_{k}b_{0k}\log\left(1+\frac{A_{1k}^{\rm
e}\left(\mathbf{W}\right)}{B_{1k}^{\rm e}\left(\mathbf{W}\right)}\right)-\log
B_{1U}^{\rm e}$ (41c)

where we define

$\displaystyle A_{1k}^{\rm e}\left(\mathbf{W}\right)=B_{1U}^{\rm
e}-B_{1k}^{\rm e}\left(\mathbf{W}\right).$ (42)

In this alternative representation, $A_{1k}^{\rm e}\left(\mathbf{W}\right)\geq
0$ which satisfies the non-negativity constraint required for using the
Lagrangian dual transform.

By defining $\hat{S}_{1}^{\rm e}\left(\mathbf{W}\right)$ as

$\displaystyle\hat{S}_{1}^{\rm e}\left(\mathbf{W}\right)$
$\displaystyle=\sum_{k=1}^{K}\omega_{k}b_{0k}\log\left(1+\frac{A_{1k}^{\rm
e}\left(\mathbf{W}\right)}{B_{1k}^{\rm e}\left(\mathbf{W}\right)}\right),$
(43)

we could conclude that

$\displaystyle\mathbf{W}^{\star}=$
$\displaystyle\operatorname*{argmax}_{\mathbf{W}}\left.S_{1}^{\rm
m}\left(\mathbf{W}\right)+\hat{S}_{1}^{\rm e}\left(\mathbf{W}\right)\right.$
($\hat{\mathcal{M}}_{1}$) $\displaystyle\text{subject to
}\left\lVert\mathbf{W}\right\rVert_{F}^{2}\leq P_{\mathrm{max}}.$ (44a)

The optimization problem $\hat{\mathcal{M}}_{1}$ is of the standard form given
in (26). Using the Lagrangian dual transform, we have

$\displaystyle\left(\mathbf{W}^{\star},{\mathbf{t}}^{\star},\boldsymbol{\alpha}^{\star}\right)=$
$\displaystyle\operatorname*{argmax}_{\mathbf{W},{\mathbf{t}},\boldsymbol{\alpha}}\left.L_{1}^{\rm
m}\left(\mathbf{W},{\mathbf{t}}\right)+L_{1}^{\rm
e}\left(\mathbf{W},\boldsymbol{\alpha}\right)\right.$ ($\mathcal{L}_{1}$)
$\displaystyle\text{subject to }\left\lVert\mathbf{W}\right\rVert_{F}^{2}\leq
P_{\mathrm{max}}$ (45a) $\displaystyle\phantom{\text{subject to }}\
{\mathbf{t}},\boldsymbol{\alpha}\in\mathbbmss{R}_{0}^{+K}$ (45b)

where $L_{1}^{\rm m}\left(\mathbf{W},{\mathbf{t}}\right)$ and $L_{1}^{\rm
e}\left(\mathbf{W},\boldsymbol{\alpha}\right)$ are the Lagrangian dual
objectives of $S_{1}^{\rm m}\left(\mathbf{W}\right)$ and $\hat{S}_{1}^{\rm
e}\left(\mathbf{W}\right)$, respectively, and are given by

$\displaystyle L_{1}^{\rm m}\left(\mathbf{W},{\mathbf{t}}\right)$
$\displaystyle=\sum_{k=1}^{K}\omega_{k}b_{0k}\left(\Xi\left(t_{k}\right)+\dfrac{\left(1+t_{k}\right)A_{1k}^{\rm
m}\left(\mathbf{W}\right)}{A_{1k}^{\rm m}\left(\mathbf{W}\right)+B_{1k}^{\rm
m}\left(\mathbf{W}\right)}\right)$ (46a) $\displaystyle L_{1}^{\rm
e}\left(\mathbf{W},\boldsymbol{\alpha}\right)$
$\displaystyle=\sum_{k=1}^{K}\omega_{k}b_{0k}\left(\Xi\left(\alpha_{k}\right)+\dfrac{\left(1+\alpha_{k}\right)A_{1k}^{\rm
e}\left(\mathbf{W}\right)}{B_{1U}^{\rm e}}\right)$ (46b) with $t_{k}$ and
$\alpha_{k}$ being the $k$-th entry of ${\mathbf{t}}$ and
$\boldsymbol{\alpha}$, respectively.

The Lagrangian dual transform of the marginal problem is a joint optimization
with a non-convex objective function. To tackle this issue, we note that the
constraints on block variable $\mathbf{W}$ and
$\left({\mathbf{t}},\boldsymbol{\alpha}\right)$ decouple in $\mathcal{L}_{1}$.
We hence utilize BCD once again and solve the Lagrangian dual transform by
cyclically alternating between the following sub-problems:

  1. 1.

Update $\mathbf{W}$ for fixed ${\mathbf{t}}=\bar{{\mathbf{t}}}$ and
$\boldsymbol{\alpha}=\bar{\boldsymbol{\alpha}}$ as

$\displaystyle\bar{\mathbf{W}}=$
$\displaystyle\operatorname*{argmax}_{\mathbf{W}}\left.L_{1}^{\rm
m}\left(\mathbf{W},\bar{{\mathbf{t}}}\right)+L_{1}^{\rm
e}\left(\mathbf{W},\bar{\boldsymbol{\alpha}}\right)\right.$
($\mathcal{L}_{1}^{{\rm A}}$) $\displaystyle\text{subject to
}\left\lVert\mathbf{W}\right\rVert_{F}^{2}\leq P_{\mathrm{max}}.$ (47a)

  2. 2.

Update ${\mathbf{t}}$ and $\boldsymbol{\alpha}$ for a fixed
$\mathbf{W}=\bar{\mathbf{W}}$ as

$\displaystyle\left(\bar{{\mathbf{t}}},\bar{\boldsymbol{\alpha}}\right)=$
$\displaystyle\operatorname*{argmax}_{{\mathbf{t}},\boldsymbol{\alpha}}\left.L_{1}^{\rm
m}\left(\bar{\mathbf{W}},{\mathbf{t}}\right)+L_{1}^{\rm
e}\left(\bar{\mathbf{W}},\boldsymbol{\alpha}\right)\right.$
($\mathcal{L}_{1}^{{\rm B}}$) $\displaystyle\text{subject to
}{\mathbf{t}},\boldsymbol{\alpha}\in\mathbbmss{R}_{0}^{+K}.$ (48a)

The sub-problem $\mathcal{L}_{1}^{\rm A}$ optimized the objective with respect
to $\mathbf{W}$. By dropping those terms which are constant in $\mathbf{W}$,
we can rewrite $\mathcal{L}_{1}^{\rm A}$ as

$\displaystyle\bar{\mathbf{W}}=$
$\displaystyle\operatorname*{argmax}_{\mathbf{W}}\left.\sum_{k=1}^{K}\frac{\lvert
C_{1k}^{\rm m}\left(\mathbf{W}\right)\rvert^{2}}{D_{1k}^{\rm
m}\left(\mathbf{W}\right)}+\lvert C_{1k}^{\rm
e}\left(\mathbf{W}\right)\rvert^{2}\right.$ ($\hat{\mathcal{L}}_{1}^{{\rm
A}}$) $\displaystyle\text{subject to
}\left\lVert\mathbf{W}\right\rVert_{F}^{2}\leq P_{\mathrm{max}}$ (49a)

where $C_{1k}^{\rm m}\left(\mathbf{W}\right)$, $D_{1k}^{\rm
m}\left(\mathbf{W}\right)$, and $C_{1k}^{\rm e}\left(\mathbf{W}\right)$ are
defined as

$\displaystyle C_{1k}^{\rm m}\left(\mathbf{W}\right)$
$\displaystyle=\sqrt{\omega_{k}b_{0k}\left(1+\bar{t}_{k}\right)}\left.\tilde{\mathbf{h}}^{\mathsf{H}}_{k}\left({\boldsymbol{\phi}}_{0}\right){\mathbf{w}}_{k}\right.,$
(50a) $\displaystyle D_{1k}^{\rm m}\left(\mathbf{W}\right)$
$\displaystyle=A_{1k}^{\rm m}\left(\mathbf{W}\right)+B_{1k}^{\rm
m}\left(\mathbf{W}\right),$ (50b) $\displaystyle C_{1k}^{\rm
e}\left(\mathbf{W}\right)$
$\displaystyle=\sqrt{\frac{\omega_{k}b_{0k}\left(1+\bar{\alpha}_{k}\right)}{B_{1U}^{\rm
e}}}\sqrt{A_{1k}^{\rm e}\left(\mathbf{W}\right)}.$ (50c)

The optimization problem $\hat{\mathcal{L}}_{1}^{{\rm A}}$ is a multiple-ratio
maximization whose quadratic transform is given by

$\displaystyle\max_{\mathbf{W},\boldsymbol{\beta},\boldsymbol{\gamma}}\left.Q_{1}^{\rm
m}\left(\mathbf{W},\boldsymbol{\beta}\right)+Q_{1}^{\rm
e}\left(\mathbf{W},\boldsymbol{\gamma}\right)\right.$ ($\mathcal{Q}_{1}$)
$\displaystyle\text{subject to }\left\lVert\mathbf{W}\right\rVert_{F}^{2}\leq
P_{\mathrm{max}}$ (51a) $\displaystyle\phantom{\text{subject to }}\
\boldsymbol{\beta},\boldsymbol{\gamma}\in\mathbbmss{C}^{K}$ (51b)

with quadratic equivalent objectives

$\displaystyle Q_{1}^{\rm m}\left(\mathbf{W},\boldsymbol{\beta}\right)$
$\displaystyle=\sum_{k=1}^{K}2\left.\Re\left\\{\beta_{k}^{*}C_{1k}^{\rm
m}\left(\mathbf{W}\right)\right\\}\right.-\lvert\beta_{k}\rvert^{2}D_{1k}^{\rm
m}\left(\mathbf{W}\right)$ (52a) $\displaystyle Q_{1}^{\rm
e}\left(\mathbf{W},\boldsymbol{\gamma}\right)$
$\displaystyle=\sum_{k=1}^{K}2\left.\Re\left\\{\gamma_{k}^{*}C_{1k}^{\rm
e}\left(\mathbf{W}\right)\right\\}\right.-\lvert\gamma_{k}\rvert^{2}.$ (52b)

Here, $\beta_{k}$ and $\gamma_{k}$ denote the $k$-th entry of
$\boldsymbol{\beta}$ and $\boldsymbol{\gamma}$, respectively.

The quadratic transform $\mathcal{Q}_{1}$ can be directly solved.
Alternatively, one can use the BCD approach once again. In this case, we
consider two blocks of variables:
$\left(\mathbf{W},\boldsymbol{\gamma}\right)$ and $\boldsymbol{\beta}$. The
solution is then found by alternating between the following two sub-problems:

  * (A)

Find optimal $\boldsymbol{\beta}$ for $\mathbf{W}=\bar{\mathbf{W}}$ and
$\boldsymbol{\gamma}=\bar{\boldsymbol{\gamma}}$ as

$\displaystyle\bar{\boldsymbol{\beta}}=$
$\displaystyle\operatorname*{argmax}_{\boldsymbol{\beta}}\left.Q_{1}^{\rm
m}\left(\bar{\mathbf{W}},\boldsymbol{\beta}\right)+Q_{1}^{\rm
e}\left(\bar{\mathbf{W}},\bar{\boldsymbol{\gamma}}\right)\right.$
($\mathcal{Q}_{1}^{\rm A}$) $\displaystyle\text{subject to
}\boldsymbol{\beta}\in\mathbbmss{C}^{K}.$ (53a)

$\mathcal{Q}_{1}^{\rm A}$ is a standard quadratic optimization with solution

$\displaystyle\bar{\beta}_{k}$ $\displaystyle=\frac{C_{1k}^{\rm
m}\left(\bar{\mathbf{W}}\right)}{D_{1k}^{\rm
m}\left(\bar{\mathbf{W}}\right)}.$ (54)

  * (B)

Find optimal $\mathbf{W}$ and $\boldsymbol{\gamma}$ for
$\boldsymbol{\beta}=\bar{\boldsymbol{\beta}}$ as

$\displaystyle\left(\bar{\mathbf{W}},\bar{\boldsymbol{\gamma}}\right)=$
$\displaystyle\operatorname*{argmax}_{\mathbf{W},\boldsymbol{\gamma}}\left.Q_{1}^{\rm
m}\left(\mathbf{W},\bar{\boldsymbol{\beta}}\right)+Q_{1}^{\rm
e}\left(\mathbf{W},{\boldsymbol{\gamma}}\right)\right.$ ($\mathcal{Q}_{1}^{\rm
B}$) $\displaystyle\text{subject to
}\left\lVert\mathbf{W}\right\rVert_{F}^{2}\leq P_{\mathrm{max}}\text{ and
}\boldsymbol{\gamma}\in\mathbbmss{C}^{K}.$ (55a)

Similar to $\mathcal{Q}_{1}^{\rm A}$, $\mathcal{Q}_{1}^{\rm B}$ is a standard
quadratic optimization whose solution is given by

$\displaystyle\bar{\mathbf{W}}$
$\displaystyle=\left[\bar{{\mathbf{w}}}_{1},\ldots,\bar{{\mathbf{w}}}_{K}\right],$
(56a) $\displaystyle\bar{\boldsymbol{\gamma}}$
$\displaystyle=\left[C_{11}^{\rm
e}\left(\bar{\mathbf{W}}\right),\ldots,C_{1K}^{\rm
m}\left(\bar{\mathbf{W}}\right)\right].$ (56b)

In (56a), $\bar{{\mathbf{w}}}_{k}$ for $k\in\left[K\right]$ is

$\displaystyle\bar{{\mathbf{w}}}_{k}=\rho_{k}\left.\mathbf{\Gamma}_{k}^{-1}\right.\tilde{\mathbf{h}}_{k}\left({\boldsymbol{\phi}}_{0}\right)$
(57)

where $\mathbf{\Gamma}_{k}$ and $\rho_{k}$ are given by

$\displaystyle\mathbf{\Gamma}_{k}$
$\displaystyle={\tilde{\mathbf{H}}\left({\boldsymbol{\phi}}_{0}\right)\mathbf{\Upsilon}_{\rm
m}^{2}\tilde{\mathbf{H}}^{\mathsf{H}}\left({\boldsymbol{\phi}}_{0}\right)+\tau_{k}\tilde{\mathbf{G}}\left({\boldsymbol{\phi}}_{0}\right)\mathbf{\Upsilon}_{\mathrm{e}}^{2}\tilde{\mathbf{G}}^{\mathsf{H}}\left({\boldsymbol{\phi}}_{0}\right)}+\lambda_{P}\mathbf{I}_{M},$
(58a) $\displaystyle\rho_{k}$
$\displaystyle=\sqrt{\omega_{k}b_{0k}\left(1+\bar{t}_{k}\right)}\bar{\beta}_{k}$
(58b)

with $\mathbf{\Upsilon}_{\rm m}$ and $\tau_{k}$ being defined as

$\displaystyle\mathbf{\Upsilon}_{\rm m}$
$\displaystyle={\mathrm{diag}}\left\\{\lvert\bar{\beta}_{1}\rvert,\ldots,\lvert\bar{\beta}_{k}\rvert\right\\},$
(59a) $\displaystyle\tau_{k}$
$\displaystyle=\frac{\omega_{k}b_{0k}\left(1+\bar{\alpha}_{k}\right)}{B_{1U}^{\rm
e}},$ (59b)

and some $\lambda_{P}$ being calculated according to the power
constraint888$\lambda_{P}$ can be tuned optimally via various algorithms,
e.g., bi-section search [60, 16]. Alternatively, one can solve
$\mathcal{Q}_{1}^{\rm B}$ directly via a convex programming solver, e.g., the
CVX package in MATLAB [61, 62]..

Noting that $\bar{\mathbf{W}}$ is fixed in terms of
$\bar{\boldsymbol{\gamma}}$, the auxiliary vector $\bar{\boldsymbol{\gamma}}$
can be ignored in the BCD algorithm. Hence, the solution to
$\mathcal{L}_{1}^{\rm A}$ is given by alternating between (56a) and (54).

######  Remark 2.

The precoding matrix $\bar{\mathbf{W}}$ inverts the main channels while
aligning the nulls of the beams with the eavesdropping channels. This is the
so-called  secure regularized zero-forcing (SRZF) precoding technique which
has been proposed and studied in [63]. Unlike the generic form of SRZF
precoding, $\bar{\mathbf{W}}$ does not need to be tuned. This is due to the
fact that $\bar{\mathbf{W}}$ is directly derived from secrecy sum-rate
maximization.

We now discuss the solution to the sub-problem $\mathcal{L}_{1}^{\rm B}$.
Following the concavity of the objective function and its decoupled form, it
is straightforward to show that

$\displaystyle\bar{t}_{k}$ $\displaystyle=\frac{A_{1k}^{\rm
m}\left(\bar{\mathbf{W}}\right)}{B_{1k}^{\rm
m}\left(\bar{\mathbf{W}}\right)},$ (60a) $\displaystyle\bar{\alpha}_{k}$
$\displaystyle=\frac{A_{1k}^{\rm e}\left(\bar{\mathbf{W}}\right)}{B_{1k}^{\rm
e}\left(\bar{\mathbf{W}}\right)}.$ (60b)

Consequently, the solution to the dual problem $\mathcal{L}_{1}$ is given by
alternating between the solution of the sub-problem $\mathcal{L}_{1}^{\rm A}$
and the updates in (60). Once the alternations converge, the solution to the
first marginal problem is given by $\bar{\mathbf{W}}$.

###  V-B Second Marginal Problem

In the second marginal optimization, we determine a vector of phase-shifts
which maximizes the objective
$\mathcal{R}^{\mathrm{ssr}}_{\mathrm{q}}\left(\mathbf{W},{\boldsymbol{\phi}},\mathbf{b}\right)$
assuming that $\mathbf{W}$ and $\mathbf{b}$ are fixed. Hence, the
corresponding optimization is

$\displaystyle{\boldsymbol{\phi}}^{\star}=$
$\displaystyle\operatorname*{argmax}_{{\boldsymbol{\phi}}}\left.\mathcal{R}^{\mathrm{ssr}}_{\mathrm{q}}\left(\mathbf{W}_{0},{\boldsymbol{\phi}},\mathbf{b}_{0}\right)\right.$
($\mathcal{M}_{2}$) $\displaystyle\text{subject to
}\lvert\phi_{n}\rvert=1,~{}\forall n\in\left[N\right],$ (61a)

for some fixed $\mathbf{W}_{0}$ and $\mathbf{b}_{0}$.

In its initial form, the marginal problem $\mathcal{M}_{2}$ is intractable due
to the following issues:

  1. 1.

The objective function is non-convex.

  2. 2.

The constraint is unit-modulus.

Considering the fractional form of the objective function, the first issue is
addressed by transforming the marginal problem $\mathcal{M}_{2}$ to a
quadratic optimization using the Lagrangian dual and the quadratic transforms.
Given the transformed optimization, we further overcome the second issue via
the MM method. The detailed derivations are presented in the sequel.

We start the derivations by rewriting the objective function as a sum of
logarithmic ratios. Similar to the marginal problem $\mathcal{M}_{1}$, we can
write

$\displaystyle\mathcal{R}^{\mathrm{ssr}}_{\mathrm{q}}\left(\mathbf{W}_{0},{\boldsymbol{\phi}},\mathbf{b}_{0}\right)=S_{2}^{\rm
m}\left({\boldsymbol{\phi}}\right)+S_{2}^{\rm
e}\left({\boldsymbol{\phi}}\right)$ (62)

where the functions $S_{2}^{\rm m}\left({\boldsymbol{\phi}}\right)$ and
$S_{2}^{\rm e}\left({\boldsymbol{\phi}}\right)$ are defined as

$\displaystyle S^{\rm m}_{2}\left({\boldsymbol{\phi}}\right)$
$\displaystyle=\sum_{k=1}^{K}\omega_{k}b_{0k}\log\left(1+\frac{A_{2k}^{\rm
m}\left({\boldsymbol{\phi}}\right)}{B_{2k}^{\rm
m}\left({\boldsymbol{\phi}}\right)}\right),$ (63a) $\displaystyle S_{2}^{\rm
e}\left({\boldsymbol{\phi}}\right)$
$\displaystyle=\sum_{k=1}^{K}\omega_{k}b_{0k}\log\left(\frac{1}{B_{2k}^{\rm
e}\left({\boldsymbol{\phi}}\right)}\right).$ (63b)

Here, $A_{2k}^{\rm m}\left({\boldsymbol{\phi}}\right)$, $B_{2k}^{\rm
m}\left({\boldsymbol{\phi}}\right)$, and $B_{2k}^{\rm
e}\left({\boldsymbol{\phi}}\right)$ are given by

$\displaystyle A_{2k}^{\rm m}\left({\boldsymbol{\phi}}\right)$
$\displaystyle=\lvert\tilde{\mathbf{h}}^{\mathsf{H}}_{k}\left({\boldsymbol{\phi}}\right){\mathbf{w}}_{0k}\rvert^{2},$
(64a) $\displaystyle B_{2k}^{\rm m}\left({\boldsymbol{\phi}}\right)$
$\displaystyle=\sum_{i=1,i\neq
k}^{K}\lvert\tilde{\mathbf{h}}^{\mathsf{H}}_{k}\left({\boldsymbol{\phi}}\right){\mathbf{w}}_{0i}\rvert^{2}+\sigma_{k}^{2},$
(64b) $\displaystyle B_{2k}^{\rm e}\left({\boldsymbol{\phi}}\right)$
$\displaystyle=1+\mathrm{ESNR}_{k}\left(\mathbf{W}_{0},{\boldsymbol{\phi}}\right)$
(64c)

where ${\mathbf{w}}_{0k}$ denotes the $k$-th column of $\mathbf{W}_{0}$.

In order to use the Lagrangian dual transform, we need to convert $S_{2}^{\rm
e}\left({\boldsymbol{\phi}}\right)$ to the standard form given in (25). To
this end, we substitute
${\mathbf{g}}_{j}\left({\boldsymbol{\phi}}\right)={\mathbf{g}}_{\mathrm{d},j}+\mathbf{G}_{j}{\boldsymbol{\phi}}$
into (19) and write

$\displaystyle\mathrm{ESNR}_{k}\left(\mathbf{W},{\boldsymbol{\phi}}\right)$
$\displaystyle=\sum_{j=1}^{J}\dfrac{1}{\mu_{j}^{2}}\lvert{\mathbf{g}}_{\mathrm{d},j}^{\mathsf{H}}{\mathbf{w}}_{k}+{\boldsymbol{\phi}}^{\mathsf{H}}\mathbf{G}_{j}^{\mathsf{H}}{\mathbf{w}}_{k}\rvert^{2}$
(65a)
$\displaystyle\stackrel{{\scriptstyle\star}}{{\leq}}\sum_{j=1}^{J}\dfrac{1}{\mu_{j}^{2}}\left(\lvert{\mathbf{g}}_{\mathrm{d},j}^{\mathsf{H}}{\mathbf{w}}_{k}\rvert+\lvert{\boldsymbol{\phi}}^{\mathsf{H}}\mathbf{G}_{j}^{\mathsf{H}}{\mathbf{w}}_{k}\rvert\right)^{2}$
(65b)
$\displaystyle\leq\sum_{j=1}^{J}\dfrac{1}{\mu_{j}^{2}}\left(\lvert{\mathbf{g}}_{\mathrm{d},j}^{\mathsf{H}}{\mathbf{w}}_{k}\rvert+\left\lVert{\boldsymbol{\phi}}\right\rVert\left\lVert\mathbf{G}_{j}^{\mathsf{H}}{\mathbf{w}}_{k}\right\rVert\right)^{2}$
(65c)
$\displaystyle\stackrel{{\scriptstyle\dagger}}{{=}}\sum_{j=1}^{J}\dfrac{1}{\mu_{j}^{2}}\left(\lvert{\mathbf{g}}_{\mathrm{d},j}^{\mathsf{H}}{\mathbf{w}}_{k}\rvert+\sqrt{N}\left\lVert\mathbf{G}_{j}^{\mathsf{H}}{\mathbf{w}}_{k}\right\rVert\right)^{2}$
(65d)

where $\star$ comes from the triangle inequality, and $\dagger$ follows from
the fact that $\lvert\phi_{n}\rvert=1$. Defining the upper-bound $B_{2Uk}^{\rm
e}$ for $B_{2k}^{\rm e}\left({\boldsymbol{\phi}}\right)$ as

$\displaystyle B_{2Uk}^{\rm
e}=1+\sum_{j=1}^{J}\dfrac{1}{\mu_{j}^{2}}\left(\lvert{\mathbf{g}}_{\mathrm{d},j}^{\mathsf{H}}{\mathbf{w}}_{0k}\rvert+\sqrt{N}\left\lVert\mathbf{G}_{j}^{\mathsf{H}}{\mathbf{w}}_{0k}\right\rVert\right)^{2},$
(66)

we can rewrite $S_{2}^{\rm e}\left({\boldsymbol{\phi}}\right)$ as

$\displaystyle
S_{2}^{\mathrm{e}}\left({\boldsymbol{\phi}}\right)=\hat{S}_{2}^{\rm
e}\left({\boldsymbol{\phi}}\right)-\sum_{k=1}^{K}\omega_{k}b_{k}\log
B_{2Uk}^{\rm e}$ (67)

where $\hat{S}_{2}^{\rm e}\left({\boldsymbol{\phi}}\right)$ is given by

$\displaystyle\hat{S}_{2}^{\rm
e}\left({\boldsymbol{\phi}}\right)=\sum_{k=1}^{K}\omega_{k}b_{k}\log\left(1+\frac{A_{2k}^{\rm
e}\left({\boldsymbol{\phi}}\right)}{B_{2k}^{\rm
e}\left({\boldsymbol{\phi}}\right)}\right)$ (68)

with $A_{2k}^{\rm e}\left({\boldsymbol{\phi}}\right)=B_{2Uk}^{\rm
e}-B_{2k}^{\rm e}\left({\boldsymbol{\phi}}\right)\geq 0$.

Given this alternative representation of the objective, the marginal problem
$\mathcal{M}_{2}$ is rewritten as

$\displaystyle{\boldsymbol{\phi}}^{\star}=$
$\displaystyle\operatorname*{argmax}_{{\boldsymbol{\phi}}}\left.S_{2}^{\rm
m}\left({\boldsymbol{\phi}}\right)+\hat{S}_{2}^{\rm
e}\left({\boldsymbol{\phi}}\right)\right.$ ($\hat{\mathcal{M}}_{2}$)
$\displaystyle\text{subject to }\lvert\phi_{n}\rvert=1,~{}\forall
n\in\left[N\right]$ (69a)

which is of the standard form in (26). Using the Lagrangian dual transform, we
could find ${\boldsymbol{\phi}}^{\star}$ from the transformed version

$\displaystyle\left({\boldsymbol{\phi}}^{\star},\mathbf{q}^{\star},\boldsymbol{\psi}^{\star}\right)=$
$\displaystyle\operatorname*{argmax}_{{\boldsymbol{\phi}},\mathbf{q},\boldsymbol{\psi}}\left.L_{2}^{\rm
m}\left({\boldsymbol{\phi}},\mathbf{q}\right)+L_{2}^{\rm
e}\left({\boldsymbol{\phi}},\boldsymbol{\psi}\right)\right.$
($\mathcal{L}_{2}$) $\displaystyle\text{subject to
}\lvert\phi_{n}\rvert=1,~{}\forall n\in\left[N\right]$ (70a)
$\displaystyle\phantom{\text{subject to
}}\mathbf{q},\boldsymbol{\psi}\in\mathbbmss{R}_{0}^{+K}$ (70b)

where the Lagrangian dual objectives are

$\displaystyle L_{2}^{\rm m}\left({\boldsymbol{\phi}},\mathbf{q}\right)$
$\displaystyle=\sum_{k=1}^{K}\omega_{k}b_{0k}\left(\Xi\left(q_{k}\right)+\dfrac{\left(1+q_{k}\right)A_{2k}^{\rm
m}\left({\boldsymbol{\phi}}\right)}{A_{2k}^{\rm
m}\left({\boldsymbol{\phi}}\right)+B_{2k}^{\rm
m}\left({\boldsymbol{\phi}}\right)}\right),$ (71a) $\displaystyle L_{2}^{\rm
e}\left({\boldsymbol{\phi}},\boldsymbol{\psi}\right)$
$\displaystyle=\sum_{k=1}^{K}\omega_{k}b_{0k}\left(\Xi\left(\psi_{k}\right)+\dfrac{\left(1+\psi_{k}\right)A_{2k}^{\rm
e}\left({\boldsymbol{\phi}}\right)}{B_{2Uk}^{\rm e}}\right)$ (71b) with
$q_{k}$ and $\psi_{k}$ denoting entry $k$ of $\mathbf{q}$ and
$\boldsymbol{\psi}$, respectively.

To address the Lagrangian dual problem, we follow the same BCD-based approach
as for the first marginal problem: Starting from an initial point, we
alternate between the following two sub-problems:

  1. 1.

Update ${\boldsymbol{\phi}}$ for fixed $\mathbf{q}=\bar{\mathbf{q}}$ and
$\boldsymbol{\psi}=\bar{\boldsymbol{\psi}}$ as

$\displaystyle\bar{{\boldsymbol{\phi}}}=$
$\displaystyle\operatorname*{argmax}_{{\boldsymbol{\phi}}}\left.L_{2}^{\rm
m}\left({\boldsymbol{\phi}},\bar{\mathbf{q}}\right)+L_{2}^{\rm
e}\left({\boldsymbol{\phi}},\bar{\boldsymbol{\psi}}\right)\right.$
($\mathcal{L}_{2}^{\rm A}$) $\displaystyle\text{subject to
}\lvert\phi_{n}\rvert=1,~{}\forall n\in\left[N\right].$ (72a)

  2. 2.

Update $\mathbf{q}$ and $\boldsymbol{\psi}$ for fixed
${\boldsymbol{\phi}}=\bar{{\boldsymbol{\phi}}}$ as

$\displaystyle\left(\bar{\mathbf{q}},\bar{\boldsymbol{\psi}}\right)=$
$\displaystyle\operatorname*{argmax}_{\mathbf{q},\boldsymbol{\psi}}\left.L_{2}^{\rm
m}\left(\bar{{\boldsymbol{\phi}}},\mathbf{q}\right)+L_{2}^{\rm
e}\left(\bar{{\boldsymbol{\phi}}},\boldsymbol{\psi}\right)\right.$
($\mathcal{L}_{2}^{\rm B}$) $\displaystyle\text{subject to
}\mathbf{q},\boldsymbol{\psi}\in\mathbbmss{R}_{0}^{+K}.$ (73a)

Noting that the sub-problem $\mathcal{L}_{2}^{\rm A}$ is to maximize a
multiple-ratio term, we use the quadratic transform to find the equivalent
quadratic problem. After dropping the constant terms and some standard lines
of derivation the equivalent quadratic problem becomes

$\displaystyle\max_{{\boldsymbol{\phi}},\mathbf{f},\boldsymbol{\varpi}}\left.Q_{2}^{\rm
m}\left({\boldsymbol{\phi}},\mathbf{f}\right)+Q_{2}^{\rm
e}\left({\boldsymbol{\phi}},\boldsymbol{\varpi}\right)\right.$
($\mathcal{Q}_{2}$) $\displaystyle\text{subject to
}\lvert\phi_{n}\rvert=1,~{}\forall n\in\left[N\right]$ (74a)
$\displaystyle\phantom{\text{subject to
}}\mathbf{f},\boldsymbol{\varpi}\in\mathbbmss{C}^{K}$ (74b)

for the quadratic equivalent objectives

$\displaystyle Q_{2}^{\rm m}\left({\boldsymbol{\phi}},\mathbf{f}\right)$
$\displaystyle=\sum_{k=1}^{K}2\left.\Re\left\\{f_{k}^{*}C_{2k}^{\rm
m}\left({\boldsymbol{\phi}}\right)\right\\}\right.-\lvert
f_{k}\rvert^{2}D_{2k}^{\rm m}\left({\boldsymbol{\phi}}\right),$ (75a)
$\displaystyle Q_{2}^{\rm
e}\left({\boldsymbol{\phi}},\boldsymbol{\varpi}\right)$
$\displaystyle=\sum_{k=1}^{K}2\left.\Re\left\\{\varpi_{k}^{*}C_{2k}^{\rm
e}\left({\boldsymbol{\phi}}\right)\right\\}\right.-\lvert\varpi_{k}\rvert^{2},$
(75b)

where $f_{k}$ and $\varpi_{k}$ are entry $k$ of $\mathbf{f}$ and
$\boldsymbol{\varpi}$, respectively, and $C_{2k}^{\rm
m}\left({\boldsymbol{\phi}}\right)$, $D_{2k}^{\rm
m}\left({\boldsymbol{\phi}}\right)$, and $C_{2k}^{\rm
e}\left({\boldsymbol{\phi}}\right)$ are defined as

$\displaystyle C_{2k}^{\rm m}\left({\boldsymbol{\phi}}\right)$
$\displaystyle=\sqrt{\omega_{k}b_{0k}\left(1+\bar{q}_{k}\right)}\left(\mathbf{h}^{\mathsf{H}}_{\mathrm{d},k}{\mathbf{w}}_{0k}+{\boldsymbol{\phi}}^{\mathsf{H}}\mathbf{H}^{\mathsf{H}}_{k}{\mathbf{w}}_{0k}\right),$
(76a) $\displaystyle D_{2k}^{\rm m}\left({\boldsymbol{\phi}}\right)$
$\displaystyle=\left\lVert\mathbf{h}^{\mathsf{H}}_{\mathrm{d},k}\mathbf{W}_{0}+{\boldsymbol{\phi}}^{\mathsf{H}}\mathbf{H}^{\mathsf{H}}_{k}\mathbf{W}_{0}\right\rVert^{2}+\sigma_{k}^{2},$
(76b) $\displaystyle C_{2k}^{\rm e}\left({\boldsymbol{\phi}}\right)$
$\displaystyle=\sqrt{\frac{\omega_{k}b_{0k}\left(1+\bar{\psi}_{k}\right)}{B_{2Uk}^{\rm
e}}}\sqrt{A_{2k}^{\rm e}\left({\boldsymbol{\phi}}\right)}.$ (76c)

As the constraints in $\mathcal{Q}_{2}$ decouple, we find the solution via
alternation between the following two steps

  * (A)

Find optimal $\mathbf{f}$ for ${\boldsymbol{\phi}}=\bar{{\boldsymbol{\phi}}}$
and $\boldsymbol{\varpi}=\bar{\boldsymbol{\varpi}}$ as

$\displaystyle\bar{\mathbf{f}}=$
$\displaystyle\operatorname*{argmax}_{\mathbf{f}}\left.Q_{2}^{\rm
m}\left(\bar{{\boldsymbol{\phi}}},\mathbf{f}\right)+Q_{2}^{\rm
e}\left(\bar{{\boldsymbol{\phi}}},\bar{\boldsymbol{\varpi}}\right)\right.$
($\mathcal{Q}_{2}^{\mathrm{A}}$) $\displaystyle\text{subject to
}\mathbf{f}\in\mathbbmss{C}^{K}.$ (77a) The solution to this marginal
optimization is $\displaystyle\bar{f}_{k}$ $\displaystyle=\frac{C_{2k}^{\rm
m}\left(\bar{{\boldsymbol{\phi}}}\right)}{D_{2k}^{\rm
m}\left(\bar{{\boldsymbol{\phi}}}\right)}.$ (77b)

  * (B)

Find optimal ${\boldsymbol{\phi}}$ and $\boldsymbol{\varpi}$ for
$\mathbf{f}=\bar{\mathbf{f}}$ as

$\displaystyle\left({\boldsymbol{\phi}}^{\star},\bar{\boldsymbol{\varpi}}\right)=$
$\displaystyle\operatorname*{argmax}_{{\boldsymbol{\phi}},\boldsymbol{\varpi}}\left.Q_{2}^{\rm
m}\left({\boldsymbol{\phi}},\bar{\mathbf{f}}\right)+Q_{2}^{\rm
e}\left({{\boldsymbol{\phi}}},{\boldsymbol{\varpi}}\right)\right.$
($\mathcal{Q}_{2}^{\rm B}$) $\displaystyle\text{subject to
}\lvert\phi_{n}\rvert=1,~{}\forall n\in\left[N\right]$ (78a)
$\displaystyle\phantom{\text{subject to
}}\boldsymbol{\varpi}\in\mathbbmss{C}^{K}.$ (78b)

It is straightforward to show that the variable $\boldsymbol{\varpi}$ in
$\mathcal{Q}_{2}^{\rm B}$ does not participate in the update of step (A), and
hence $\mathcal{Q}_{2}^{\rm B}$ can be replaced with

$\displaystyle{\boldsymbol{\phi}}^{\star}=$
$\displaystyle\operatorname*{argmax}_{{\boldsymbol{\phi}}}\left.Q_{2}^{\rm
m}\left({\boldsymbol{\phi}},\bar{\mathbf{f}}\right)+{\frac{\omega_{k}b_{0k}\left(1+\bar{\psi}_{k}\right)}{B_{2Uk}^{\rm
e}}}{A_{2k}^{\rm e}\left({\boldsymbol{\phi}}\right)}\right.$
($\hat{\mathcal{Q}}_{2}^{\rm B}$) $\displaystyle\text{subject to
}\lvert\phi_{n}\rvert=1,~{}\forall n\in\left[N\right].$ (79a)

Despite the quadratic objective of $\hat{\mathcal{Q}}_{2}^{\rm B}$, the
optimization is still intractable due to the unit-modulus constraint. There
are various approaches by which ${\boldsymbol{\phi}}^{\star}$ can be
approximated tractably; see for instance [64, 58], and [65]. In the following,
we consider the algorithm $Q_{\rm MM}\left(\cdot\right)$ which uses MM method
to determine the approximation

$\displaystyle\bar{{\boldsymbol{\phi}}}=Q_{\rm
MM}\left(\bar{\mathbf{f}},\bar{\mathbf{q}},\bar{\boldsymbol{\psi}},\mathbf{W}_{0}\right)$
(80)

iteratively. The algorithm is illustrated in Algorithm 1. In this algorithm,
$\mathbf{U}$ and $\mathbf{v}$ are determined in terms of $\bar{\mathbf{f}}$ as

$\displaystyle\mathbf{U}$
$\displaystyle=\sum_{k=1}^{K}\lvert\bar{f}_{k}\rvert^{2}\mathbf{H}_{k}^{\mathsf{H}}\mathbf{W}_{0}\mathbf{W}_{0}^{\mathsf{H}}\mathbf{H}_{k}+\sum_{k=1}^{K}\left.\sum_{j=1}^{J}\frac{\kappa_{k}}{\mu_{j}^{2}}\mathbf{G}_{j}^{\mathsf{H}}{\mathbf{w}}_{0k}{\mathbf{w}}_{0k}^{\mathsf{H}}\mathbf{G}_{j}\right.,$
(81a) $\displaystyle\mathbf{v}$
$\displaystyle=\sum_{k=1}^{K}\lvert\bar{f}_{k}\rvert^{2}\mathbf{H}_{k}^{\mathsf{H}}\mathbf{W}_{0}\mathbf{W}_{0}^{\mathsf{H}}\mathbf{h}_{\mathrm{d},k}-\eta_{k}\mathbf{H}_{k}^{\mathsf{H}}{\mathbf{w}}_{0k}+\sum_{k=1}^{K}\left.\sum_{j=1}^{J}\frac{\kappa_{k}}{\mu_{j}^{2}}\mathbf{G}_{j}^{\mathsf{H}}{\mathbf{w}}_{0k}{\mathbf{w}}_{0k}^{\mathsf{H}}{\mathbf{g}}_{\mathrm{d},j}\right.,$
(81b)

where $\kappa_{k}$ and $\eta_{k}$ are given by

$\displaystyle\kappa_{k}$
$\displaystyle=\frac{\omega_{k}b_{0k}\left(1+\bar{\psi}_{k}\right)}{B_{2Uk}^{\rm
e}},$ (82a) $\displaystyle\eta_{k}$
$\displaystyle=\bar{f}_{k}^{*}\sqrt{\omega_{k}b_{0k}\left(1+\bar{q}_{k}\right)}.$
(82b)

Furthermore, $\mathbf{u}^{\mathsf{H}}_{n}$ and $\mathrm{v}_{n}$ denote the
$n$-th row of $\mathbf{U}$ and $\mathbf{v}$, respectively, and
$\lambda_{\max}$ represents the maximum eigenvalue of $\mathbf{U}$. The
detailed derivations are given in Appendix B. Following the classical
approach, e.g., the approach in [66], the convergence of Algorithm 1 can be
shown. This means that Algorithm 1 in each iteration updates the phase-shift,
such that the objective in $\hat{\mathcal{Q}}_{2}^{\rm B}$ evolves in a non-
decreasing fashion999More precisely, the objective at the end of each
iteration is larger or equal to the objective value in the previous iteration.
Noting that the objective has a bounded maximum, this concludes that the
algorithm converges to a fixed-point.. Due to the similarity, we drop the
convergence analysis, and refer the interested reader to [66] and the
references therein.

Algorithm 1 The MM-based algorithm $Q_{\rm MM}\left(\cdot\right)$

0: $\bar{\mathbf{f}}$, $\bar{\mathbf{q}}$, $\bar{\boldsymbol{\psi}}$ and
$\mathbf{W}_{0}$

0: Set a feasible initial point ${{\boldsymbol{\phi}}}$, and define
$\displaystyle\mathcal{R}_{\rm
M}^{\mathrm{ssr}}\left({\boldsymbol{\phi}}\right)=Q_{2}^{\rm
m}\left({\boldsymbol{\phi}},\bar{\mathbf{f}}\right)+{\frac{\omega_{k}b_{0k}\left(1+\bar{\psi}_{k}\right)}{B_{2Uk}^{\rm
e}}}{A_{2k}^{\rm e}\left({\boldsymbol{\phi}}\right)}.$ Calculate $\mathbf{U}$
and $\mathbf{v}$ from (81), and let $\lambda_{\max}$ be the maximum eigenvalue
of $\mathbf{U}$.

1: if $\mathcal{R}_{\rm M}^{\mathrm{ssr}}\left({\boldsymbol{\phi}}\right)$ has
not converged then

2: Set
$\hat{\phi}_{n}={\mathbf{u}_{n}^{\mathsf{H}}{\boldsymbol{\phi}}+\mathrm{v}_{n}-\lambda_{\max}\phi_{n}}$
for $n\in\left[N\right]$

3: Update
$\displaystyle{\phi}_{n}=-\frac{\hat{\phi}_{n}}{\lvert\hat{\phi}_{n}\rvert}$
for $n\in\left[N\right]$, and go back to line 1

4: end if

######  Remark 3.

It is worth mentioning that $Q_{\rm MM}\left(\cdot\right)$ does not
necessarily results in the best approximation possible to be determined
tractably. One can hence also consider other possible approaches for
approximating ${\boldsymbol{\phi}}^{\star}$. An example of an alternative
algorithm based on the BCD method is given in Appendix C.

By alternating between (80) and (77b), the solution to the sub-problem
$\mathcal{L}_{2}^{\rm A}$ is determined. It is further straightforward to show
that the solution to $\mathcal{L}_{2}^{\rm B}$, when
${\boldsymbol{\phi}}=\bar{{\boldsymbol{\phi}}}$, is given by

$\displaystyle\bar{q}_{k}$ $\displaystyle=\frac{A_{2k}^{\rm
m}\left(\bar{{\boldsymbol{\phi}}}\right)}{B_{2k}^{\rm
m}\left(\bar{{\boldsymbol{\phi}}}\right)},$ (83a)
$\displaystyle\bar{\psi}_{k}$ $\displaystyle=\frac{A_{2k}^{\rm
e}\left(\bar{{\boldsymbol{\phi}}}\right)}{B_{2k}^{\rm
e}\left(\bar{{\boldsymbol{\phi}}}\right)}.$ (83b)

###  V-C Third Marginal Problem

The third marginal optimization determines the auxiliary vector $\mathbf{b}$
which maximizes
$\mathcal{R}^{\mathrm{ssr}}_{\mathrm{q}}\left(\mathbf{W},{\boldsymbol{\phi}},\mathbf{b}\right)$
for fixed $\mathbf{W}$ and $\mathbf{b}$. The corresponding optimization is
thus given by

$\displaystyle\mathbf{b}^{\star}=$
$\displaystyle\operatorname*{argmax}_{\mathbf{b}}\left.\mathcal{R}^{\mathrm{ssr}}_{\mathrm{q}}\left(\mathbf{W}_{0},{\boldsymbol{\phi}}_{0},\mathbf{b}\right)\right.$
($\mathcal{M}_{3}$) $\displaystyle\text{subject to
}\mathbf{b}\in\left[0,1\right]^{K}$ (84a)

for some fixed $\mathbf{W}_{0}$ and ${\boldsymbol{\phi}}_{0}$.

$\mathcal{M}_{3}$ is a linear program whose solution is given by

$\displaystyle\bar{b}_{k}=\begin{cases}1&\mathrm{SINR}_{k}\left(\mathbf{W}_{0},{\boldsymbol{\phi}}_{0}\right)>\mathrm{ESNR}_{k}\left(\mathbf{W}_{0},{\boldsymbol{\phi}}_{0}\right)\\\
0&\text{Otherwise}\end{cases}.$ (85)

This means that in each iteration, the objective includes only those UTs whose
achievable secrecy rates are non-zero.

##  VI Iterative Algorithms with Reduced Complexity

The BCD method developed in Section V approximates the jointly optimal design
using a multi-tier BCD-based algorithm: The algorithm alternates among three
marginal problems. The solution to each marginal problem is further determined
via the BCD method in which some inner loops alternate among multiple sub-
problems. Some of these sub-problems are further solved via alternation among
multiple other sub-problems. For instance, the solution to the first marginal
problem is given by alternating between the two sub-problems
$\mathcal{L}_{1}^{\mathrm{A}}$ and $\mathcal{L}_{1}^{\rm B}$, and the solution
of $\mathcal{L}_{1}^{\rm A}$, is given by alternating between the update rules
in (56a) and (54). Consequently, in each iteration of the first inner
loop101010By the first inner loop, we mean alternating between
$\mathcal{L}_{1}^{\mathrm{A}}$ and $\mathcal{L}_{1}^{\rm B}$., the second
inner loop111111By the second inner loop, we mean alternating between (56a)
and (54). should run for several iterations, such that the inner BCD-based
algorithm converges.

The multi-tier nature of the proposed algorithm yields high computational
complexity. In this section, we address this issue by proposing two iterative
algorithms with reduced complexity. These algorithms reduce the computational
complexity by merging multiple inner loops of different BCD tiers. We show
that these algorithms converge to their fixed-points in a non-decreasing
fashion, meaning that the updated objective in each iteration is necessarily
greater than or equal to the objective calculated in the previous iteration.

###  VI-A Two-Tiers Algorithm

The first iterative algorithm comprises of two tiers. The inner tier
corresponds to the marginal problems and contains the merged version of inner
loops. The algorithm uses the decoupling of sub-problems and perform the
updates in parallel. The inner loop of iterations in the second marginal
problem, by which the phase-shifts are updated, is however not merged. This
leads to a moderate computational complexity.

####  VI-A1 Statement of the Algorithm

The algorithm is represented in Algorithm 2. This algorithm follows the
standard BCD approach by alternating among the marginal problems. Here,
$\mathcal{A}_{1}\left(\cdot\right)$ and $\mathcal{A}_{2}\left(\cdot\right)$
refer to inner loops which approximate the solution of first and second
marginal problems, respectively. These loops are presented in Algorithms 3 and
4.

Algorithm 2 Two-Tiers Algorithm for Precoding and Phase-Shift Tuning

0: Set $\mathbf{W}$ and ${\boldsymbol{\phi}}$ to some initial values.

1: if $\mathcal{R}^{\mathrm{ssr}}\left(\mathbf{W},{\boldsymbol{\phi}}\right)$
has not converged then

2: Update $\mathbf{W}$ as
$\mathbf{W}=\mathcal{A}_{1}\left({{\boldsymbol{\phi}}},{\mathbf{b}}\right)$

3: Update ${\boldsymbol{\phi}}$ as
${\boldsymbol{\phi}}=\mathcal{A}_{2}\left(\mathbf{W},\mathbf{b}\right)$

4: Update
$b_{k}=\mathbf{1}\left\\{\mathrm{SINR}_{k}\left(\mathbf{W},{\boldsymbol{\phi}}\right)>\mathrm{ESNR}_{k}\left(\mathbf{W},{\boldsymbol{\phi}}\right)\right\\}$
for $k\in\left[K\right]$

5: Go back to line 1

6: end if

Algorithm 3 illustrates the inner loop for the first marginal problem. In this
algorithm, the inner loops of the sub-problems are merged following the
intuitive decoupling of these problems. The convergence of this algorithm is
discussed in Lemma 1 in Section VI-A2.

Algorithm 3 Inner Loop for the First Marginal Problem
$\mathcal{A}_{1}\left(\cdot\right)$

0: ${\boldsymbol{\phi}}$ and $\mathbf{b}$

0: Set $\bar{\mathbf{W}}$ to some initial value and define marginal
$\mathcal{R}_{\rm
M}^{\mathrm{ssr}}\left(\mathbf{W}\right)=\mathcal{R}_{\mathrm{q}}^{\mathrm{ssr}}\left(\mathbf{W},{{\boldsymbol{\phi}}},{\mathbf{b}}\right)$.

1: if $\mathcal{R}_{\rm M}^{\mathrm{ssr}}\left(\mathbf{W}\right)$ has not
converged then

2: Update $\bar{\beta}_{k}$ via (54) for $k\in\left[K\right]$

3: Update $\bar{t}_{k}$ via (60a) for $k\in\left[K\right]$

4: Update $\bar{\alpha}_{k}$ via (60b) for $k\in\left[K\right]$

5: Update $\bar{{\mathbf{w}}}_{k}$ via (57) for $k\in\left[K\right]$

6: Set ${\mathbf{W}}_{\rm
new}=\left[\bar{{\mathbf{w}}}_{1},\ldots,\bar{{\mathbf{w}}}_{K}\right]$

7: Update $\bar{\mathbf{W}}=\mathbf{W}_{\rm new}$ and go back to line 1

8: end if

The inner loop $\mathcal{A}_{2}\left(\cdot\right)$ is presented in Algorithm
4. Here, all the BCD loops are merged into a single loop. The MM loop, by
which the phase-shifts are updated is however not merged. This means that
$\mathcal{A}_{2}\left(\cdot\right)$ contains another inner loop, i.e., $Q_{\rm
MM}\left(\cdot\right)$. As the result, Algorithm 2 yields moderate
computational complexity $Q_{\rm MM}\left(\cdot\right)$ requires larger number
of iterations to converge. The convergence of Algorithm 4 is discussed in
Lemma 2 in Section VI-A2.

Algorithm 4 Inner Loop for the Second Marginal Problem
$\mathcal{A}_{2}\left(\cdot\right)$

0: $\mathbf{W}$ and $\mathbf{b}$

0: Set $\bar{{\boldsymbol{\phi}}}$ to some initial value and define marginal
$\mathcal{R}_{\rm
M}^{\mathrm{ssr}}\left({\boldsymbol{\phi}}\right)=\mathcal{R}_{\mathrm{q}}^{\mathrm{ssr}}\left(\mathbf{W},{{\boldsymbol{\phi}}},{\mathbf{b}}\right)$

1: if $\mathcal{R}_{\rm M}^{\mathrm{ssr}}\left({\boldsymbol{\phi}}\right)$ has
not converged then

2: Update $\bar{f}_{k}$ via (77b) for $k\in\left[K\right]$

3: Update $\bar{q}_{k}$ via (83a) for $k\in\left[K\right]$

4: Update $\bar{\psi}_{k}$ via (83b) for $k\in\left[K\right]$

5: Set ${{\boldsymbol{\phi}}}_{\rm new}=Q_{\rm
MM}\left(\bar{\mathbf{f}},\bar{\mathbf{q}},\bar{\boldsymbol{\psi}},\mathbf{W}\right)$

6: Update $\bar{{\boldsymbol{\phi}}}={\boldsymbol{\phi}}_{\rm new}$ and go
back to line 1

7: end if

####  VI-A2 Convergence Analysis

We now discuss the convergence of Algorithm 2. We show that using this two-
tiers algorithm, the original objective, i.e.,
$\mathcal{R}^{\mathrm{ssr}}\left(\mathbf{W},{\boldsymbol{\phi}}\right)$,
evolve non-decreasingly. This means that the value of the objective function
after each iteration would be greater or equal to its value in the previous
iteration. Since the objective has a bounded maximum, this result indicates
that this algorithm converges to a fixed-point after a certain number of
iterations121212This fixed-point is however not necessarily the global or a
local maximum and is only an approximation..

We start our analysis by showing the convergence of the inner loops
$\mathcal{A}_{1}\left(\cdot\right)$ and $\mathcal{A}_{2}\left(\cdot\right)$ in
the following lemmas:

######  Lemma 1.

For the inner loop
$\mathcal{A}_{1}\left(\bar{{\boldsymbol{\phi}}},\bar{\mathbf{b}}\right)$, we
have

$\displaystyle\mathcal{R}^{\mathrm{ssr}}_{\mathrm{q}}\left(\bar{\mathbf{W}},\bar{{\boldsymbol{\phi}}},\bar{\mathbf{b}}\right)\leq\mathcal{R}^{\mathrm{ssr}}_{\mathrm{q}}\left(\mathbf{W}_{\rm
new},\bar{{\boldsymbol{\phi}}},\bar{\mathbf{b}}\right).$ (86)

###### Proof.

The proof is given in Appendix D. ∎

Lemma 1 indicates that in each iteration, the updated precoding matrix
returned a larger value of the transformed objective function
$\mathcal{R}^{\mathrm{ssr}}_{\mathrm{q}}\left(\cdot\right)$. As the result,
one can conclude that after a certain number of iterations,
$\mathcal{A}_{1}\left(\cdot\right)$ must converge. This result is further
stated for $\mathcal{A}_{2}\left(\cdot\right)$ in Lemma 2.

######  Lemma 2.

Assume that in iteration $t\geq 1$ of the inner loop
$\mathcal{A}_{2}\left(\bar{\mathbf{W}},\bar{\mathbf{b}}\right)$, $Q_{\rm
MM}\left(\cdot\right)$ iterates for $T_{Q}\left(t\right)$ iterations. For any
positive integer sequence of $T_{Q}\left(t\right)$, we have

$\displaystyle\mathcal{R}^{\mathrm{ssr}}_{\mathrm{q}}\left(\bar{\mathbf{W}},\bar{{\boldsymbol{\phi}}},\bar{\mathbf{b}}\right)\leq\mathcal{R}^{\mathrm{ssr}}_{\mathrm{q}}\left(\bar{\mathbf{W}},{\boldsymbol{\phi}}_{\rm
new},\bar{\mathbf{b}}\right).$ (87)

This inequality further holds for any alternative of $Q_{\rm
MM}\left(\cdot\right)$ which converges to its fixed-point in a non-decreasing
fashion.

###### Proof.

The proof is given in Appendix E. ∎

Using Lemmas 1 and 2, we state the following result on the convergence of
Algorithm 2:

######  Theorem 2.

Let $\mathbf{W}^{\left(t\right)}$ and ${\boldsymbol{\phi}}^{\left(t\right)}$
be the precoding matrix and vector of phase-shifts updated at the end of
iteration $t$ in Algorithm 2. Assume that $\mathcal{A}_{1}\left(\cdot\right)$
and $\mathcal{A}_{2}\left(\cdot\right)$ iterate for $T_{1}\left(t\right)$ and
$T_{2}\left(t\right)$, respectively, in iteration $t$ of Algorithm 2. For any
positive integer sequence of $T_{1}\left(t\right)$ and $T_{2}\left(t\right)$,
we have

$\displaystyle\mathcal{R}^{\mathrm{ssr}}\left(\mathbf{W}^{\left(t\right)},{\boldsymbol{\phi}}^{\left(t\right)}\right)\leq\mathcal{R}^{\mathrm{ssr}}\left(\mathbf{W}^{\left(t+1\right)},{\boldsymbol{\phi}}^{\left(t+1\right)}\right).$

The inequality holds for any alternative of $Q_{\rm MM}\left(\cdot\right)$ in
the inner loop $\mathcal{A}_{2}\left(\cdot\right)$ which converges to its
fixed-point in a non-decreasing fashion and iterates in each iteration of
$\mathcal{A}_{2}\left(\cdot\right)$ for $T\geq 1$ iterations.

###### Proof.

Let $\mathbf{b}^{\left(t\right)}$ denote the updated auxiliary variable in
iteration $t$. Considering Algorithm 2, we can write

$\displaystyle
b_{k}^{\left(t\right)}=\begin{cases}1&\mathrm{SINR}_{k}\left(\mathbf{W}^{\left(t\right)},{\boldsymbol{\phi}}^{\left(t\right)}\right)>\mathrm{ESNR}_{k}\left(\mathbf{W}^{\left(t\right)},{\boldsymbol{\phi}}^{\left(t\right)}\right)\\\
0&\text{Otherwise}\end{cases}.$ (88)

This concludes that

$\displaystyle\mathcal{R}^{\mathrm{ssr}}_{\mathrm{q}}\left(\mathbf{W}^{\left(t\right)},{\boldsymbol{\phi}}^{\left(t\right)},\mathbf{b}^{\left(t\right)}\right)$
$\displaystyle=\sum_{k=1}^{K}\omega_{k}b^{\left(t\right)}_{k}\log\left(\dfrac{1+\mathrm{SINR}_{k}\left(\mathbf{W}^{\left(t\right)},{\boldsymbol{\phi}}^{\left(t\right)}\right)}{1+\mathrm{ESNR}_{k}\left(\mathbf{W}^{\left(t\right)},{\boldsymbol{\phi}}^{\left(t\right)}\right)}\right)$
(89a)
$\displaystyle=\sum_{k=1}^{K}\omega_{k}\left[\log\left(\dfrac{1+\mathrm{SINR}_{k}\left(\mathbf{W}^{\left(t\right)},{\boldsymbol{\phi}}^{\left(t\right)}\right)}{1+\mathrm{ESNR}_{k}\left(\mathbf{W}^{\left(t\right)},{\boldsymbol{\phi}}^{\left(t\right)}\right)}\right)\right]^{+}$
(89b)
$\displaystyle=\mathcal{R}^{\mathrm{ssr}}\left(\mathbf{W}^{\left(t\right)},{\boldsymbol{\phi}}^{\left(t\right)}\right).$
(89c)

As the result, we can write

$\displaystyle\mathcal{R}^{\mathrm{ssr}}\left(\mathbf{W}^{\left(t\right)},{\boldsymbol{\phi}}^{\left(t\right)}\right)$
$\displaystyle=\mathcal{R}^{\mathrm{ssr}}_{\mathrm{q}}\left(\mathbf{W}^{\left(t\right)},{\boldsymbol{\phi}}^{\left(t\right)},\mathbf{b}^{\left(t\right)}\right)$
(90a)
$\displaystyle\stackrel{{\scriptstyle\dagger}}{{\leq}}\mathcal{R}^{\mathrm{ssr}}_{\mathrm{q}}\left(\mathbf{W}^{\left(t+1\right)},{\boldsymbol{\phi}}^{\left(t\right)},\mathbf{b}^{\left(t\right)}\right)$
(90b)
$\displaystyle\stackrel{{\scriptstyle\star}}{{\leq}}\mathcal{R}^{\mathrm{ssr}}_{\mathrm{q}}\left(\mathbf{W}^{\left(t+1\right)},{\boldsymbol{\phi}}^{\left(t+1\right)},\mathbf{b}^{\left(t\right)}\right)$
(90c)

where $\dagger$ and $\star$ follow from Lemmas 1 and 2, respectively. Note
that for $T_{1}\left(t+1\right)=1$ and $T_{2}\left(t+1\right)=1$,
$\mathbf{W}^{\left(t\right)}=\mathbf{W}^{\left(t+1\right)}$ and
${\boldsymbol{\phi}}^{\left(t\right)}={\boldsymbol{\phi}}^{\left(t+1\right)}$.
Moreover, $T_{2}\left(t\right)\geq 1$, Lemma 2 indicates that $\star$ holds
for any alternative of $Q_{\rm MM}\left(\cdot\right)$ in
$\mathcal{A}_{2}\left(\cdot\right)$ which converges in a non-decreasing
fashion and iterates for $T\geq 1$ iterations. Therefore, the inequality holds
for any $T_{1}\left(t\right)=1$ and $T_{2}\left(t\right)\geq 1$, and for any
alternative of $Q_{\rm MM}\left(\cdot\right)$ with positive integer sequence
of iterations.

Let us now define the expression

$\displaystyle
R_{k}^{\left(t+1\right)}=\log\left(\dfrac{1+\mathrm{SINR}_{k}\left(\mathbf{W}^{\left(t+1\right)},{\boldsymbol{\phi}}^{\left(t+1\right)}\right)}{1+\mathrm{ESNR}_{k}\left(\mathbf{W}^{\left(t+1\right)},{\boldsymbol{\phi}}^{\left(t+1\right)}\right)}\right).$
(91)

From (88), we conclude that for $k\in\left[K\right]$ at which
${b}_{k}^{\left(t\right)}\neq{b}_{k}^{\left(t+1\right)}$, we have

$\displaystyle\begin{cases}R_{k}^{\left(t+1\right)}>0&\text{if
}{b}_{k}^{\left(t+1\right)}=1\\\ R_{k}^{\left(t+1\right)}\leq 0&\text{if
}{b}_{k}^{\left(t+1\right)}=0\\\ \end{cases}.$ (92)

This indicates that

$\displaystyle\mathcal{R}^{\mathrm{ssr}}_{\mathrm{q}}\left(\mathbf{W}^{\left(t+1\right)},{\boldsymbol{\phi}}^{\left(t+1\right)},\mathbf{b}^{\left(t\right)}\right)$
$\displaystyle=\sum_{k=1}^{K}\omega_{k}b^{\left(t\right)}_{k}R_{k}^{\left(t+1\right)}$
(93a)
$\displaystyle\leq\sum_{k=1}^{K}\omega_{k}b^{\left(t+1\right)}_{k}R_{k}^{\left(t+1\right)}$
(93b)
$\displaystyle=\mathcal{R}^{\mathrm{ssr}}_{\mathrm{q}}\left(\mathbf{W}^{\left(t+1\right)},{\boldsymbol{\phi}}^{\left(t+1\right)},\mathbf{b}^{\left(t+1\right)}\right)$
(93c)
$\displaystyle=\mathcal{R}^{\mathrm{ssr}}\left(\mathbf{W}^{\left(t+1\right)},{\boldsymbol{\phi}}^{\left(t+1\right)}\right).$
(93d)

We can hence conclude the proof from (90c). ∎

###  VI-B Single-Loop Algorithm

The complexity of the two-tiers algorithm can be further reduced by merging
the second tier also in the main loop. This complexity reduction intuitively
degrades the performance of the algorithm. However, it can boost the speed of
the algorithm significantly. The numerical simulations given in the next
section show that despite the existence of such a trade-off, the performance
degradation in comparison to the speed gain is essentially negligible.

####  VI-B1 Statement of the Algorithm

The algorithm is represented in Algorithm 5. In this algorithm, all inner
loops of the two-tiers algorithm, i.e., $\mathcal{A}_{1}\left(\cdot\right)$,
$\mathcal{A}_{2}\left(\cdot\right)$ and the MM loop in Algorithm 1, are merged
with the outer loop. In this respect, this algorithm can be observed as the
special case of the two-tiers algorithm in which all the inner loops iterate
only of a single iteration.

Algorithm 5 Single-Loop Algorithm for Precoding and Phase-Shift Tuning

0: Set $\mathbf{W}$ and ${\boldsymbol{\phi}}$ to some initial values.

1: if $\mathcal{R}^{\mathrm{ssr}}\left(\mathbf{W},{\boldsymbol{\phi}}\right)$
has not converged then

2: Calculate $\bar{\beta}_{k}$, $\bar{t}_{k}$, $\bar{\alpha}_{k}$ and
$\bar{{\mathbf{w}}}_{k}$ via (54), (60a), (60b) and (57), respectively, for
$k\in\left[K\right]$

3: Update
${\mathbf{W}}=\left[\bar{{\mathbf{w}}}_{1},\ldots,\bar{{\mathbf{w}}}_{K}\right]$

4: Calculate $\bar{f}_{k}$, $\bar{q}_{k}$ and $\bar{\psi}_{k}$ via (77b),
(83a) and (83b), respectively, for $k\in\left[K\right]$

5: Calculate
$\hat{\phi}_{n}={\mathbf{u}_{n}^{\mathsf{H}}{\boldsymbol{\phi}}_{0}+\mathrm{v}_{n}-\lambda_{\max}\phi_{0n}}$
with $\mathbf{u}_{n}$ and $\mathrm{v}_{n}$ given in (81)

6: Update for $n\in\left[N\right]$
$\displaystyle\displaystyle{\phi}_{n}=-\frac{\hat{\phi}_{n}}{\lvert\hat{\phi}_{n}\rvert}$

7: Update
$b_{k}=\mathbf{1}\left\\{\mathrm{SINR}_{k}\left(\mathbf{W},{\boldsymbol{\phi}}\right)>\mathrm{ESNR}_{k}\left(\mathbf{W},{\boldsymbol{\phi}}\right)\right\\}$
for $k\in\left[K\right]$

8: Go back to line 1

9: end if

####  VI-B2 Convergence Analysis

The convergence of the single-loop algorithm is directly concluded from
Theorem 2. In fact, Algorithm 5 is a special case of Algorithm 2 in which
$\mathcal{A}_{1}\left(\cdot\right)$, $\mathcal{A}_{2}\left(\cdot\right)$, and
$Q_{\rm MM}\left(\cdot\right)$ are run for a single iteration. Noting that
Theorem 2 holds for any number of inner loop iterations, we conclude that
Algorithm 5 converges in a non-decreasing fashion to its fixed-point with
respect to the original objective
$\mathcal{R}^{\mathrm{ssr}}\left(\mathbf{W},{\boldsymbol{\phi}}\right)$.

##  VII Numerical Investigations

We investigate the performance of the proposed approach by performing several
numerical experiments. A schematic view of the setting considered in
simulations is shown in Fig. 2 for $K=4$ legitimate UTs and $J=6$
eavesdroppers. In this setting, an IRS is located at distance $D=25$ m from
the BS. $K$ legitimate UTs are located uniformly and randomly around the IRS
in a circle of radius $r_{\rm IRS}=10$ m. There are $J$ eavesdroppers with
uniformly generated random distances located in a circle of radius $r_{\rm
BS}=10$ m around the BS. To calculate the noise power, a typical GSM channel
with bandwidth $200$ kHz has been considered. Assuming the noise spectral
density to be $\log N_{0}=-147$ dB/Hz, the noise power at the receiving
terminals is set to $\log\sigma_{k}^{2}=\log\mu_{j}^{2}=-147$ dB.

$D$$r_{\rm IRS}$$r_{\rm BS}$ Figure 2: A schematic representation of the
simulation setting for $K=4$ legitimate UTs and $J=6$ eavesdroppers.

The channel coefficients for a given UT $k$ and eavesdropper $j$ are generated
according to

$\displaystyle\mathbf{h}_{i,k}$ $\displaystyle=\varrho^{\rm
L}_{i,k}\mathbf{h}^{0}_{i,k},$ (94) $\displaystyle{\mathbf{g}}_{i,j}$
$\displaystyle=\varrho^{\rm E}_{i,j}{\mathbf{g}}^{0}_{i,j},$ (95)

respectively, where the index $i\in\left\\{\mathrm{d},\mathrm{r}\right\\}$
refers to the direct and reflection paths. Here, $\varrho^{\rm L}_{i,k}$ and
$\varrho^{\rm E}_{i,k}$ model path-loss and $\mathbf{h}^{0}_{i,k}$ and
${\mathbf{g}}^{0}_{i,j}$ take into account the impact of small-scale fading.
Similarly, the channel between the BS and the IRS is written as

$\displaystyle\mathbf{T}$ $\displaystyle=\varrho_{\rm BI}\mathbf{T}^{0}$ (96)

where $\varrho_{\rm BI}$ and $\mathbf{T}^{0}$ model path-loss and small-scale
fading effects, respectively. Throughout the simulations, we consider the
standard Rayleigh fading model. This means that the entries of
$\mathbf{h}^{0}_{i,k}$ and ${\mathbf{g}}^{0}_{i,j}$ for $i\in\left[K\right]$
and $j\in\left[J\right]$, as well as the entries of $\mathbf{T}^{0}$ are
generated i.i.d. according to a zero-mean unit-variance Gaussian distribution.

The path-loss coefficients are generated according to the following model

$\displaystyle\varrho\left(d,\varsigma\right)=\frac{\varrho_{\rm
ref}}{d^{\varsigma}}.$ (97)

In this model, $\varrho_{\rm ref}$ denotes the path-loss at the reference
distance $d=1$ m which depends on the operating wave-length and antenna gains.
Throughout the simulations, we set it to $\log\varrho_{\rm ref}=-30$ dB. As
the result, $\varrho^{\rm L}_{i,k}=\varrho\left(d^{\rm L}_{i,k},\varsigma^{\rm
L}_{i,k}\right)$ where $d^{\rm L}_{i,k}$ for $i=\rm d$ and $i=\rm r$ denotes
the distance from legitimate UT $k$ to the BS and the distance from legitimate
UT $k$ to the IRS, respectively. $\varsigma^{\rm L}_{i,k}$ further denotes the
path-loss exponent for the link specified by index $i$. Similarly, we set

  * •

$\varrho^{\rm E}_{i,k}=\varrho\left(d^{\rm E}_{i,j},\varsigma^{\rm
E}_{i,j}\right)$, where $d^{\rm E}_{i,j}$ and $\varsigma^{\rm E}_{i,j}$ denote
the distance to the eavesdropper $j$ and its corresponding path-loss exponent
for the link specified with index $i$, respectively.

  * •

$\varrho_{\rm BI}=\varrho\left(D,\varsigma_{\rm BI}\right)$, where $D$ and
$\varsigma_{\rm BI}$ represent the distance between the BS and the IRS and the
corresponding path-loss exponent respectively.

Throughout the simulations, the distances are calculated from the realization
of the randomized setting, and the path-loss exponents are set to
$\varsigma^{\rm L}_{\mathrm{d},k}=\varsigma^{\rm E}_{\mathrm{d},k}=3.5$ and
$\varsigma^{\rm L}_{\mathrm{r},k}=\varsigma^{\rm
E}_{\mathrm{r},k}=\varsigma_{\rm BI}=2.3$. The weighted secrecy sum-rate is
evaluated for multiple realizations of the channel and then averaged
numerically. To indicate this point, we denote the averaged secrecy sum-
rate131313This is in fact the ergodic secrecy sum-rate. with
$\bar{\mathcal{R}}^{\mathrm{ssr}}$. The weights are further set to be all
equal to one, i.e., $\omega_{k}=1$ for $k\in\left[K\right]$.

###  VII-A Reference Scenarios and Benchmark

For each experiment, we evaluate the performance for the both iterative
algorithms proposed in Sections VI-A and VI-B. To illustrate the performance
gain obtained by employing IRSs, we consider a reference scenario in which the
IRS is set off. This means that $\beta_{n}=0$ for all $n\in\left[N\right]$.
The BS in this case determines the precoding vectors via the SRZF precoding
scheme proposed in [63]. We refer to this scenario as Ref. 1.

To compare the performance of the proposed algorithms with a reference point,
we further consider the reference scenario Ref. 2 in which phase-shifts at the
IRS are set randomly and uniformly. The linear precoding vectors are further
found by applying SRZF precoding to the end-to-end equivalent channel [63]. As
the state-of-the-art performance, we also compare the proposed phase-tuning
algorithms with the algorithm proposed in [28]. This latter algorithm is
refereed to as the benchmark throughout the investigations.

We further consider an enhanced form of the setting in which the magnitudes of
the signals reflected by IRS elements are also allowed to be modified. Here,
we assume that the $\beta_{n}$ is a tunable parameter whose value is taken
from $\beta_{n}\in\left[0,1\right]$ and is updated at the same rate as the
phase141414This means that the constraint $\lvert\phi_{n}\rvert=1$ is replaced
by $\lvert\phi_{n}\rvert\leq 1$ in the optimization problems. $\theta_{n}$. As
a result, tuning of the IRS reduces to a convex program which is solved
tractably via a convex programming algorithm. It is worth mentioning that this
is only an enhanced form of the system which we simulate for sake of
comparison. In fact, due to the larger degrees of freedom, this enhanced form
is expected to outperform the proposed algorithms, since in the system,
amplitude modifications are not performed at the IRS. For this enhanced
setting, we simulate two algorithms: The first algorithm performs alternating
optimization, such that the IRS in each iteration is tuned via convex
programming. This algorithm is referred to as C-Ref. 1 and can be seen as the
enhanced form of the two-tiers algorithm. The second algorithm follows the
single-loop algorithm with this minor modification that in each iteration the
IRS tuning is performed directly via convex programming. This algorithm is
referred to as C-Ref. 2 and is considered as the enhanced version of the
single-loop algorithm. The convex programs in these algorithms are solved via
the CVX toolbox in MATLAB [61].

###  VII-B Numerical Simulations

We start the investigations by setting $K=4$, and $J=6$ in the
setting151515Similar to what is shown in Fig. 2.. The number of transmit
antennas at the BS is set to $M=8$, and the IRS is assumed to be equipped with
$N=128$ elements. Fig. 3 shows the weighted secrecy sum-rate against the
transmit power $P_{\max}$. The figure shows significant gains achieved by the
proposed algorithms, when the performance is compared with the reference
scenarios Ref. 1 and Ref. 2. From the figure, it is further observed that the
two-tiers algorithm considerably outperform the benchmark. This is however not
the case with the single-loop algorithm. Although this algorithm always
outperform the benchmark, its gain becomes negligible, as the transmit power
increases.

$-38$$-34$$-30$$-26$$-22$$4$$8$$12$$16$$20$$\log P_{\max}$ in
[dB]$\bar{\mathcal{R}}^{\mathrm{ssr}}$Ref. 1Ref. 2Two-tiersSingle-
loopBenchmarkC-Ref. 1C-Ref. 2 Figure 3: Weighted secrecy sum-rate against the
transmit power $P_{\max}$.

An interesting conclusion is further given by comparing the performance of
convex reference algorithms C-Ref. 1 and C-Ref. 2 with the proposed
algorithms. As we observe, the performance improvement achieved by replacing
the unit-modulus constraints with enhanced convex ones is negligible. This is
very significant for the two-tiers algorithm in which the algorithm performs
almost identical in both the enhanced and the original settings161616Note that
for the single-loop setting, there is no guarantee that the algorithm
outperforms in the enhanced setting. In fact, by merging multiple loops the
algorithm may stick to a local minimum at very first iterations. This is also
observed in the figure for small values of $P_{\max}$ where the algorithm in
the original setting outperforms slightly the enhanced setting.. These tight
tracks of performance in both settings confirm the efficiency of the proposed
algorithms.

We now set the transmit power to $\log P_{\max}=-30$ dB, and let the number of
transmit antennas at the BS vary between $4$ and $12$. The results are plotted
in Fig. 4 where the weighted secrecy sum-rate is sketched against the number
of BS antennas. As the figure demonstrates, the deployment of an IRS
significantly boosts the secrecy performance of the system. For instance, the
secrecy sum-rate achieved in the reference scenario without an IRS, i.e., Ref.
1, with $M=12$ transmit antennas is achieved in the IRS-aided scenario with
only $M=7$ antennas. Comparing the performance of the two tuning algorithm, it
is observed from Fig. 4, that the single-loop algorithm performs slightly
degraded compared to the two-tiers algorithm. This degradation is due to the
inner loop merging, and is the cost we pay to reduce the computational
complexity.

$4$$6$$8$$10$$12$$0$$5$$10$$15$$20$$M$$\bar{\mathcal{R}}^{\mathrm{ssr}}$Ref.
1Ref. 2Two-tiersSingle-loop Figure 4: Weighted secrecy sum-rate against the
number of transmit antennas $M$.

As the next experiment, we consider the setting in Fig. 4 and set the number
of transmit antennas to $M=8$. We now vary the number of reflecting elements
at the IRS between $N=16$ and $N=256$. Fig. 5 shows the secrecy sum-rate
against the number of elements on the IRS. As the reference point, we have
further plotted the result for Ref. 2 in which the IRS elements are tuned
randomly. From the figure, one can observe that using either of the proposed
algorithms, the achievable secrecy sum-rate increases linearly in terms of the
number of reflecting elements with the same slope of growth. For the case with
random phase-shifts, the increase in the number of IRS elements does not lead
to a perceptible growth in rate.

$50$$100$$150$$200$$250$$5$$10$$15$$20$$N$$\bar{\mathcal{R}}^{\mathrm{ssr}}$Ref.
2Two-tiersSingle-loop Figure 5: Weighted secrecy sum-rate against the number
of IRS elements $N$.

We now investigate the resistance of the proposed algorithms against the
number of eavesdroppers in the system. To this end, we keep the settings as in
Fig. 5 and set the number of elements on the IRS to $N=128$. The number of
eavesdroppers is then varied from $J=1$ to $J=8$, and the secrecy sum-rate is
plotted against $J$ in Fig. 7. For sake of comparison, we further plot the
results for SRZF precoding, i.e., the reference scenarios. It is worth
mentioning that from the literature, SRZF precoding is known to be highly
robust against passive eavesdropping, due to the fact that it imposes
explicitly the leakage suppression as a constraint in the precoder design
[63]. From Fig. 7, it is observed that the secrecy sum-rate drops for the both
proposed algorithms in terms of $J$ similar to the SRZF precoding scheme. This
identical behavior follows the fact that the proposed algorithms consider the
secrecy rate as the objective function. This objective function implicitly
constrains the information leakage in the design and leads to a behavior
identical to SRZF precoding. The performance gain compared to the reference
scenarios, which is observed in Fig. 7, is due to the efficient phase-shift
tuning.

$50$$100$$150$$200$$250$$5$$10$$15$$20$$N$$\bar{\mathcal{R}}^{\mathrm{ssr}}$ 6
Two-tiers 6 $B=2$ 6 $B=3$ 6 $B=4$ 6 Single-loop 6 $B=4$ Figure 6: Weighted
secrecy sum-rate against $N$ for the ideal case without phase-shift
quantization at the IRS, as well as cases with quantized phase-shifts.

The proposed implementations for IRSs suggest that the phase-shifts are
realized discretely by a finite resolution. This means that the phase-shifts
determined by the proposed algorithms are in practice quantized with a certain
number of bits. Doing so, the proposed algorithms perform degraded due to the
distortion introduced after phase-shift quantization. To investigate this
performance degradation, we further plot the secrecy sum-rate against the
number of IRS elements for the scenario of Fig. 5 in Fig. 6 considering phase-
shift quantization with $B$ bits. As the figure shows, with a resolution of
$B=4$, both algorithms perform close to the ideal case without quantization
and the performance degradation is negligible.

$2$$4$$6$$8$$0$$5$$10$$15$$20$$J$$\bar{\mathcal{R}}^{\mathrm{ssr}}$Ref. 1Ref.
2Two-tiersSingle-loop Figure 7: Weighted secrecy sum-rate against the number
of eavesdroppers $J$.

For the last experiment, we consider the setting in Fig. 7, and set $J=6$. The
number of legitimate terminals is then increased from $K=1$ to $K=8$ and the
secrecy sum-rate is plotted against $K$ in Fig. 8. As the figure shows, the
secrecy sum-rate grows in terms of $K$. The order of growth however decreases
at large choices of $K$ which is due to the higher multiuser interference in
the system. Similar behavior is observed for the reference scenarios with a
certain gap in the achievable rate which is due to the efficiency of phase-
shift tuning in the proposed algorithms.

$2$$4$$6$$8$$4$$8$$12$$16$$K$$\bar{\mathcal{R}}^{\mathrm{ssr}}$Ref. 1Ref.
2Two-tiersSingle-loop Figure 8: Weighted secrecy sum-rate against the number
of legitimate UTs $K$.

###  VII-C Computational Complexity

The computational complexity of both proposed algorithms shows quadratic
growth in terms of the IRS dimension, i.e., $N$: In both algorithms, the
dominant computational task is the update of IRS phase-shifts, i.e.,
$\bar{{\boldsymbol{\phi}}}=Q_{\rm
MM}\left(\bar{\mathbf{f}},\bar{\mathbf{q}},\bar{\boldsymbol{\psi}},\mathbf{W}_{0}\right)$.
The computational complexity of this task for each $\phi_{n}$ is
$\mathcal{O}\left(N\right)$. As the update is performed entry-wise, we need
$N$ iterations to determine the updated $\bar{{\boldsymbol{\phi}}}$. This
means that the computational complexity of both algorithms grows
$\mathcal{O}\left(N^{2}\right)$ in $N$.

Fig. 9 plots the average runtime against the number of IRS elements $N$ for
the proposed algorithms considering the same scenario as the one considered in
Figs. 5 and 6. As it shows, despite having the same order of complexity, the
single-loop algorithm runs significantly faster than the two-tiers algorithm.
This follows from the fact that both inner and outer loops of the two-tiers
algorithm are merged in the single-loop algorithm. To have a quantitative
comparison, we further use curve-fitting to model the runtime by the quadratic
polynomial function

$\displaystyle Q_{2}\left(N|a,b\right)=aN^{2}+b.$ (98)

The fitted curves are further plotted in the figure. From the figure, it is
observed that the single-loop approach approximately reduces the computational
complexity by a factor of $100$. This factor is however fixed and does not
scale with the system dimensions. Comparing Figs. 9 and 5, one can observe
that this complexity reduction comes at the cost of performance degradation.

$50$$100$$150$$200$$250$$0$$1$$2$$N$Runtime in [sec]Two-
tiers$Q_{2}\left(N|3.3\times 10^{-5},0.07\right)$Single-
Loop$Q_{2}\left(N|2.7\times 10^{-7},0.06\right)$ Figure 9: Runtime against the
number of IRS elements $N$.

##  VIII Conclusion

In this work, two major iterative algorithms for secure precoding and phase-
shift tuning in IRS-aided MIMO systems were proposed, and their applications
were investigated through multiple numerical experiments. The proposed
algorithms determine the system parameters in terms of the CSI. This means
that the proposed algorithms are required to be run, once per a coherence time
interval. From the computational viewpoint, this is a tractable task in many
practical scenarios.

Since the proposed algorithms consider the weighted secrecy sum-rate as the
objective, the information leakage suppression is implicitly applied. This is
confirmed by the numerical investigations which show similar behavior as the
one observed in SRZF precoding [63]. The results further indicate that IRSs
can boost the secrecy performance of the system significantly. These two
findings, along with the cost-efficiency of integrating IRSs, suggest that IRS
ia a good candidate for establishing secure communications in MIMO systems.

The results of this study are given under several idealistic assumptions and
can be extended in various aspects. A natural direction is to extend the
derivations to more realistic scenarios with imperfect CSI acquisition. In
this respect, one can adopt the proposed scheme to more realistic settings,
e.g., by considering the study in [67]. Robustness of the proposed scheme
against the unavailability of eavesdroppers’ CSI is also an interesting
direction for future work. Another line of work is to develop the proposed
approach for settings in which the eavesdroppers increase their obtained
leakage rate by actively contaminating the uplink pilots.

##  Appendix A Proof of Theorem 1

The proof follows two steps: In the first step, we show that for
$\mathbf{b}\in\left[0,1\right]^{K}$

$\displaystyle\max_{\mathbf{W},{\boldsymbol{\phi}}}\mathcal{R}^{\mathrm{ssr}}\left(\mathbf{W},{\boldsymbol{\phi}}\right)\geq\max_{\mathbf{W},{\boldsymbol{\phi}},\mathbf{b}}\mathcal{R}^{\mathrm{ssr}}_{\mathrm{q}}\left(\mathbf{W},{\boldsymbol{\phi}},\mathbf{b}\right).$
(99)

To show the validity of this inequality, we define the function

$\displaystyle\mathcal{R}^{\mathrm{ssr}}_{\mathrm{t}}\left(\mathbf{W},{\boldsymbol{\phi}},\mathbf{b}\right)=\sum_{k=1}^{K}\omega_{k}b_{k}\textbf{}\left[\log\left(\dfrac{1+\mathrm{SINR}_{k}\left(\mathbf{W},{\boldsymbol{\phi}}\right)}{1+\mathrm{ESNR}_{k}\left(\mathbf{W},{\boldsymbol{\phi}}\right)}\right)\right]^{+}.$
(100)

Since for $x\in\mathbbmss{R}$ $\log x\leq\left[\log x\right]^{+}$, it is
straightforward to write

$\displaystyle\mathcal{R}^{\mathrm{ssr}}_{\mathrm{q}}\left(\mathbf{W},{\boldsymbol{\phi}},\mathbf{b}\right)\leq\mathcal{R}^{\mathrm{ssr}}_{\mathrm{t}}\left(\mathbf{W},{\boldsymbol{\phi}},\mathbf{b}\right).$
(101)

Now, we define the difference term

$\displaystyle\Delta$
$\displaystyle=\mathcal{R}^{\mathrm{ssr}}\left(\mathbf{W},{\boldsymbol{\phi}}\right)-\mathcal{R}^{\mathrm{ssr}}_{\mathrm{t}}\left(\mathbf{W},{\boldsymbol{\phi}},\mathbf{b}\right)$
(102a)
$\displaystyle=\sum_{k=1}^{K}\omega_{k}\left(1-b_{k}\right)\mathcal{R}_{k}^{\mathrm{s}}\left(\mathbf{W},{\boldsymbol{\phi}}\right).$
(102b)

Noting that $\omega_{k}\geq 0$ and $b_{k}\in\left[0,1\right]$, we further can
write

$\displaystyle\Delta\geq 0.$ (103)

From (101) and (103), we can write

$\displaystyle\mathcal{R}^{\mathrm{ssr}}_{\mathrm{q}}\left(\mathbf{W},{\boldsymbol{\phi}},\mathbf{b}\right)\leq\mathcal{R}^{\mathrm{ssr}}_{\mathrm{t}}\left(\mathbf{W},{\boldsymbol{\phi}},\mathbf{b}\right)\leq\mathcal{R}^{\mathrm{ssr}}\left(\mathbf{W},{\boldsymbol{\phi}}\right),$
(104)

which concludes that

$\displaystyle\max_{\mathbf{W},{\boldsymbol{\phi}},\mathbf{b}}\mathcal{R}^{\mathrm{ssr}}_{\mathrm{q}}\left(\mathbf{W},{\boldsymbol{\phi}},\mathbf{b}\right)\leq\max_{\mathbf{W},{\boldsymbol{\phi}}}\mathcal{R}^{\mathrm{ssr}}\left(\mathbf{W},{\boldsymbol{\phi}}\right).$
(105)

In the second step, we show that for $\mathbf{b}\in\left[0,1\right]^{K}$

$\displaystyle\max_{\mathbf{W},{\boldsymbol{\phi}}}\mathcal{R}^{\mathrm{ssr}}\left(\mathbf{W},{\boldsymbol{\phi}}\right)\leq\max_{\mathbf{W},{\boldsymbol{\phi}},\mathbf{b}}\mathcal{R}^{\mathrm{ssr}}_{\mathrm{q}}\left(\mathbf{W},{\boldsymbol{\phi}},\mathbf{b}\right).$
(106)

To this end, let us define the $\mathbbmss{K}\subseteq\left[K\right]$ as the
subset of UTs for which we have

$\displaystyle\mathrm{SINR}_{k}\left(\mathbf{W},{\boldsymbol{\phi}}\right)\geq\mathrm{ESNR}_{k}\left(\mathbf{W},{\boldsymbol{\phi}}\right)$
(107)

when $\mathbf{W}$ and ${\boldsymbol{\phi}}$ are set to the optimal values. We
hence have

$\displaystyle\max_{\mathbf{W},{\boldsymbol{\phi}}}\mathcal{R}^{\mathrm{ssr}}\left(\mathbf{W},{\boldsymbol{\phi}}\right)=\max_{\mathbf{W},{\boldsymbol{\phi}}}\sum_{k\in\mathbbmss{K}}w_{k}\mathcal{R}_{k}^{\mathrm{s}}(\mathbf{W},{\boldsymbol{\phi}}).$
(108)

Noting that for $k\in\mathbbmss{K}$,

$\displaystyle\log\left(\dfrac{1+\mathrm{SINR}_{k}\left(\mathbf{W},{\boldsymbol{\phi}}\right)}{1+\mathrm{ESNR}_{k}\left(\mathbf{W},{\boldsymbol{\phi}}\right)}\right)\geq
0,$ (109)

we can write

$\displaystyle\mathcal{R}_{k}^{\mathrm{s}}(\mathbf{W},{\boldsymbol{\phi}})=\log\left(\dfrac{1+\mathrm{SINR}_{k}\left(\mathbf{W},{\boldsymbol{\phi}}\right)}{1+\mathrm{ESNR}_{k}\left(\mathbf{W},{\boldsymbol{\phi}}\right)}\right)$
(110)

and hence conclude that

$\displaystyle\max_{\mathbf{W},{\boldsymbol{\phi}}}\mathcal{R}^{\mathrm{ssr}}\left(\mathbf{W},{\boldsymbol{\phi}}\right)=\max_{\mathbf{W},{\boldsymbol{\phi}}}\mathcal{R}^{\mathrm{ssr}}_{\mathrm{q}}\left(\mathbf{W},{\boldsymbol{\phi}},\mathbf{b}_{\mathbbmss{K}}\right)$
(111)

where
$\mathbf{b}_{\mathbbmss{K}}=\left[b_{\mathbbmss{K}1},\ldots,b_{\mathbbmss{K}K}\right]^{\mathsf{T}}$
with

$\displaystyle b_{\mathbbmss{K}k}=\begin{cases}1&k\in\mathbbmss{K}\\\
0&k\notin\mathbbmss{K}\end{cases}.$ (112)

Noting that $\mathbf{b}_{\mathbbmss{K}k}\in\left[0,1\right]^{K}$, we have

$\displaystyle\max_{\mathbf{W},{\boldsymbol{\phi}},\mathbf{b}}\mathcal{R}^{\mathrm{ssr}}_{\mathrm{q}}\left(\mathbf{W},{\boldsymbol{\phi}},\mathbf{b}\right)\geq\max_{\mathbf{W},{\boldsymbol{\phi}}}\mathcal{R}^{\mathrm{ssr}}_{\mathrm{q}}\left(\mathbf{W},{\boldsymbol{\phi}},\mathbf{b}_{\mathbbmss{K}}\right).$
(113)

This concludes (106). Considering the inequalities in (99) and (106), Theorem
1 is proved.

##  Appendix B Derivation of the MM-Based Algorithm

The MM method approximates the solution with the limit of a sequence of
feasible points. This sequence is derived by optimizing sequentially an
objective function which majorizes171717The concept of majorization is defined
in the sequel. the original objective at the feasible point derived in the
previous optimization. We illustrate the method through the derivations. More
details on the MM method can be followed in [68, 69, 70, 66, 58].

We start the derivations by rewriting the optimization problem
$\hat{\mathcal{Q}}_{2}^{\rm B}$. Let $Q_{2}\left({\boldsymbol{\phi}}\right)$
denote the negative objective of $\hat{\mathcal{Q}}_{2}^{\rm B}$, i.e.,

$\displaystyle Q_{2}\left({\boldsymbol{\phi}}\right)=-Q_{2}^{\rm
m}\left({\boldsymbol{\phi}},\bar{\mathbf{f}}\right)-{\frac{\omega_{k}b_{0k}\left(1+\bar{\psi}_{k}\right)}{B_{2Uk}^{\rm
e}}}{A_{2k}^{\rm e}\left({\boldsymbol{\phi}}\right)}.$ (114)

By standard derivations, one can rewrite
$Q_{2}\left({\boldsymbol{\phi}}\right)$ as

$\displaystyle
Q_{2}\left({\boldsymbol{\phi}}\right)={\boldsymbol{\phi}}^{\mathsf{H}}\mathbf{U}{\boldsymbol{\phi}}+2\Re\left\\{{\boldsymbol{\phi}}^{\mathsf{H}}\mathbf{v}\right\\}+C$
(115)

for some $C$ which is fixed in ${\boldsymbol{\phi}}$ and $\mathbf{U}$ and
$\mathbf{v}$ as defined in Algorithm 1. As the result,
$\hat{\mathcal{Q}}_{2}^{\rm B}$ is rewritten as

$\displaystyle\min_{{\boldsymbol{\phi}}}{\boldsymbol{\phi}}^{\mathsf{H}}\mathbf{U}{\boldsymbol{\phi}}+2\Re\left\\{{\boldsymbol{\phi}}^{\mathsf{H}}\mathbf{v}\right\\}$
(116a) $\displaystyle\text{subject to }\lvert\phi_{n}\rvert=1,\forall
n\in\left[N\right].$ (116b)

In order to address this problem via the MM method, we need to follow two
steps:

  1. 1.

Define a sequence of majorizations for the objective in (116).

  2. 2.

Determine the sequence of the solutions to the majorizations series.

Before we start with the first step, let us define the concept of
majorization.

######  Definition 3 (Majorization).

Consider $f\left(\cdot\right):\mathbbmss{X}\to\mathbbmss{R}$. The function
$m\left(\cdot|\mathbf{x}_{0}\right):\hat{\mathbbmss{X}}\to\mathbbmss{R}$ with
$\mathbf{x}_{0}\in\mathbbmss{X}$ and
$\mathbbmss{X}\subseteq\hat{\mathbbmss{X}}$ majorizes $f\left(\cdot\right)$ at
$\mathbf{x}_{0}$, if the following constraints are satisfied:

$\displaystyle f\left(\mathbf{x}\right)$ $\displaystyle\leq
m\left(\mathbf{x}|\mathbf{x}_{0}\right),\forall\mathbf{x}\in\mathbbmss{X},$
(117a) $\displaystyle f\left(\mathbf{x}_{0}\right)$
$\displaystyle=m\left(\mathbf{x}_{0}|\mathbf{x}_{0}\right).$ (117b)

To find majorization functions of the objective in (116), we invoke the
following lemma whose proof can be followed in [66, Lemma 1].

######  Lemma 3 (Lemma 1 of [66]).

Let $\mathbf{U}\in\mathbbmss{C}^{N\times N}$ and
$\mathbf{M}\in\mathbbmss{C}^{N\times N}$ be Hermitian matrices satisfying
$\mathbf{M}\succeq\mathbf{U}$. At any point
$\mathbf{x}_{0}\in\mathbbmss{C}^{N}$, the quadratic function
$f\left(\mathbf{x}\right)=\mathbf{x}^{\mathsf{H}}\mathbf{U}\mathbf{x}$ is
majorized by

$\displaystyle\Omega\left(\mathbf{x}|\mathbf{x}_{0}\right)=\mathbf{x}^{\mathsf{H}}\mathbf{M}\mathbf{x}+2\left.\Re\left\\{\mathbf{x}^{\mathsf{H}}\left(\mathbf{U}-\mathbf{M}\right)\mathbf{x}_{0}\right\\}\right.+\mathbf{x}_{0}^{\mathsf{H}}\left(\mathbf{M}-\mathbf{U}\right)\mathbf{x}_{0}$
(118)

Let $\mathbf{M}=\lambda_{\max}\mathbf{I}_{N}$ in Lemma 3, where
$\lambda_{\max}$ denotes the maximum eigenvalue of $\mathbf{U}$. Hence, at a
feasible point ${\boldsymbol{\phi}}_{0}$, we can write

$\displaystyle{\boldsymbol{\phi}}^{\mathsf{H}}\mathbf{U}{\boldsymbol{\phi}}+2\Re\left\\{{\boldsymbol{\phi}}^{\mathsf{H}}\mathbf{v}\right\\}\leq\hat{\Omega}\left({\boldsymbol{\phi}}|{\boldsymbol{\phi}}_{0}\right),$
(119)

where $\hat{\Omega}\left({\boldsymbol{\phi}}|{\boldsymbol{\phi}}_{0}\right)$
is given by

$\displaystyle\hat{\Omega}\left({\boldsymbol{\phi}}|{\boldsymbol{\phi}}_{0}\right)=\lambda_{\max}\left(\left\lVert{\boldsymbol{\phi}}\right\rVert^{2}+\left\lVert{\boldsymbol{\phi}}_{0}\right\rVert^{2}\right)+2\left.\Re\left\\{{\boldsymbol{\phi}}^{\mathsf{H}}\left(\mathbf{U}{\boldsymbol{\phi}}_{0}+\mathbf{v}-\lambda_{\max}{\boldsymbol{\phi}}_{0}\right)\right\\}\right.-{\boldsymbol{\phi}}_{0}^{\mathsf{H}}\mathbf{U}{\boldsymbol{\phi}}_{0}.$
(120)

Noting that for any feasible point ${\boldsymbol{\phi}}$, we have
$\left\lVert{\boldsymbol{\phi}}\right\rVert^{2}=N$, we can further write

$\displaystyle\hat{\Omega}\left({\boldsymbol{\phi}}|{\boldsymbol{\phi}}_{0}\right)=2N\lambda_{\max}+2\left.\Re\left\\{{\boldsymbol{\phi}}^{\mathsf{H}}\left(\mathbf{U}{\boldsymbol{\phi}}_{0}+\mathbf{v}-\lambda_{\max}{\boldsymbol{\phi}}_{0}\right)\right\\}\right.-{\boldsymbol{\phi}}_{0}^{\mathsf{H}}\mathbf{U}{\boldsymbol{\phi}}_{0}.$
(121)

Given the majorization function
$\hat{\Omega}\left({\boldsymbol{\phi}}|{\boldsymbol{\phi}}_{0}\right)$, the MM
method starts from a feasible point ${{\boldsymbol{\phi}}^{\left(0\right)}}$
and constructs the sequence $\\{{\boldsymbol{\phi}}^{\left(t\right)}\\}$ for
$t\in\mathbbmss{Z}^{+}$ iteratively as

$\displaystyle{\boldsymbol{\phi}}^{\left(t+1\right)}=$
$\displaystyle\operatorname*{argmin}_{{\boldsymbol{\phi}}}\left.\hat{\Omega}\left({\boldsymbol{\phi}}|{\boldsymbol{\phi}}^{\left(t\right)}\right)\right.$
(122a) $\displaystyle\text{subject to }\lvert\phi_{n}\rvert=1,~{}\forall
n\in\left[N\right].$ (122b)

The limit of this sequence, as the algorithm converges, is considered to be
the solution. Unlike the original problem, the solution to (122) is easily
given by

$\displaystyle\phi_{n}^{\left(t+1\right)}=-\frac{\mathbf{u}_{n}^{\mathsf{H}}{\boldsymbol{\phi}}^{\left(t\right)}+\mathrm{v}_{n}-\lambda_{\max}\phi_{n}^{\left(t\right)}}{\lvert\mathbf{u}_{n}^{\mathsf{H}}{\boldsymbol{\phi}}^{\left(t\right)}+\mathrm{v}_{n}-\lambda_{\max}\phi_{n}^{\left(t\right)}\rvert}$
(123)

with $\mathbf{u}_{n}^{\mathsf{H}}$ denoting the $n$-th row of the matrix
$\mathbf{U}$. This concludes the derivation of Algorithm 1.

##  Appendix C A BCD-Type Phase-Shift Update Algorithm

In this appendix, we tackle the non-convex unit modulus optimization
$\hat{\mathcal{Q}}_{2}^{\rm B}$ via the BCD method. Starting from an initial
vector of phase-shifts, i.e., ${\boldsymbol{\phi}}^{\left(0\right)}$, we
alternately update each phase-shift in iteration $t$, i.e., each entry of
${\boldsymbol{\phi}}^{\left(t\right)}$, by marginally optimizing it while
treating the other phase-shifts as fixed variables whose values are calculated
in iteration $t-1$. This means that in the $t$-th iteration,
$\phi_{n}^{\left(t\right)}$ is found as

$\displaystyle\phi_{n}^{\left(t\right)}=\operatorname*{argmin}_{\lvert\varphi\rvert=1}Q_{2}\left(\mathbf{x}^{\left(t\right)}_{n}\left(\varphi\right)\right)$
(124)

where $Q_{2}\left(\cdot\right)$ is given in (115), and
$\mathbf{x}^{\left(t\right)}_{n}\left(\cdot\right)$ is defined as

$\displaystyle\mathbf{x}^{\left(t\right)}_{n}\left(\varphi\right)=\left[\phi_{1}^{\left(t-1\right)},\ldots,\phi_{n-1}^{\left(t-1\right)},\varphi,\phi_{n+1}^{\left(t-1\right)},\ldots,\phi_{N}^{\left(t-1\right)}\right]^{\mathsf{T}}$
(125)

with $\phi_{n}^{\left(t-1\right)}$ denoting the $n$-th entry of
${\boldsymbol{\phi}}^{\left(t-1\right)}$.

Defining the function
$f^{\left(t\right)}\left(\varphi\right)=Q_{2}\left(\mathbf{x}^{\left(t\right)}_{n}\left(\varphi\right)\right)$,
we can use the Hermitian symmetry of $\mathbf{U}$ to show that

$\displaystyle
f^{\left(t\right)}\left(\varphi\right)=\left[\mathbf{U}\right]_{nn}\lvert\varphi\rvert^{2}+2\left.\Re\left\\{a_{n}^{\left(t\right)}\varphi^{*}\right\\}\right.+c_{n}^{\left(t\right)}$
(126)

where $a_{1}^{\left(t\right)}$ and $a_{2}^{\left(t\right)}$ are given by

$\displaystyle a_{n}^{\left(t\right)}$
$\displaystyle=\mathrm{v}_{n}+\tilde{\mathbf{u}}_{n}^{\mathsf{H}}\tilde{{\boldsymbol{\phi}}}_{n}^{\left(t-1\right)}$
(127)

with
$\tilde{\mathbf{u}}_{n},\tilde{{\boldsymbol{\phi}}}_{n}^{\left(t-1\right)}\in\mathbbmss{C}^{N-1}$
being constructed from ${\mathbf{u}}_{n}$ and
${{\boldsymbol{\phi}}}^{\left(t-1\right)}$ by excluding their $n$-th entries,
respectively, and $a_{n}^{\left(t\right)}$ is a constant in terms of
$\varphi$. Noting that $\lvert\varphi\rvert=1$, (124) reduces to

$\displaystyle\phi_{n}^{\left(t\right)}=\operatorname*{argmin}_{\lvert\varphi\rvert=1}\left.\Re\left\\{a_{n}^{\left(t\right)}\varphi^{*}\right\\}\right.$
(128)

whose solution is given in a closed form as

$\displaystyle\phi_{n}^{\left(t\right)}=-\frac{a_{n}^{\left(t\right)}}{\lvert
a_{n}^{\left(t\right)}\rvert}.$ (129)

After multiple iterations, the solution of $\hat{\mathcal{Q}}_{2}^{\rm B}$ is
approximated with the converged phase-shifts. The final algorithm is
summarized in Algorithm 6.

Algorithm 6 Phase-Shift Update via the BCD Method

0: $\bar{\mathbf{f}}$, $\bar{\mathbf{q}}$, $\bar{\boldsymbol{\psi}}$ and
$\mathbf{W}_{0}$

0: Set a feasible initial point
${\boldsymbol{\phi}}={\boldsymbol{\phi}}^{(0)}$, and define
$\displaystyle\mathcal{R}_{\rm
M}^{\mathrm{ssr}}\left({\boldsymbol{\phi}}\right)=Q_{2}^{\rm
m}\left({\boldsymbol{\phi}},\bar{\mathbf{f}}\right)+{\frac{\omega_{k}b_{0k}\left(1+\bar{\psi}_{k}\right)}{B_{2Uk}^{\rm
e}}}{A_{2k}^{\rm e}\left({\boldsymbol{\phi}}\right)}$

1: if $\mathcal{R}_{\rm M}^{\mathrm{ssr}}\left({\boldsymbol{\phi}}\right)$ has
not converged then

2: Calculate $\mathbf{U}$ and $\mathbf{v}$ from (81)

3: Update $a_{n}^{\left(t\right)}$ via (127) for $n\in\left[N\right]$

4: Update ${\phi}_{n}^{\left(t\right)}$ via (129) for $n\in\left[N\right]$

5: Set ${\boldsymbol{\phi}}={\boldsymbol{\phi}}^{(t)}$, $t\leftarrow t+1$ and
go back to line 1

6: end if

Algorithm 6 is compared with Algorithm 1 by performing a simple numerical
experiment. This experiment considers a setting consistent to the one
presented in Fig. 2. In this setting, we set the number of eavesdroppers to
$J=6$, the number of legitimate UTs to $K=4$, the number of BS antennas to
$M=8$ and the number of IRS elements to $N=16$. The transmit power is further
set to $\log P_{\max}=0$ dB and the channel parameters are set as described in
Section VII-B. For this setting, we apply the two-tiers algorithm, i.e.,
Algorithm 2 two times: once the inner loop, i.e., Algorithm 4, is performed
via the MM algorithm and once with Algorithm 6. Fig. 10 shows the achievable
secrecy sum-rate against the number of iterations in the main loop of
Algorithm 2. As the figure shows, the algorithms converge to the target rate
almost identical with respect to the number of iterations. To compare the
computational complexity of these algorithms, we further plot the achievable
secrecy sum-rate against the runtime for these two algorithms. The result is
shown in Fig. 11. As the figure shows, using Algorithm 6 leads to a slightly
faster convergence compared to the MM algorithm.

$4$$8$$12$$16$$20$$24$$28$$4.5$$5$$5.5$$6$$6.5$$7$$7.5$Number of
iterations$\mathcal{R}^{\mathrm{ssr}}$MM-based ApproachBCD-based Approach
Figure 10: Comparing the BCD-based phase tuning approach to the one which
performs the MM algorithm.
$0.5$$1$$1.5$$2$$2.5$$3$$3.5$$4$$2$$3$$4$$5$$6$$7$Runtime in
[sec]$\mathcal{R}^{\mathrm{ssr}}$MM-based ApproachBCD-based Approach Figure
11: Comparing the complexity of the BCD-based and MM-based phase tuning
approaches.

##  Appendix D Proof of Lemma 1

Following the notation of Algorithm 3, let
${\boldsymbol{\phi}}_{0}=\bar{{\boldsymbol{\phi}}}$ and
$\mathbf{b}_{0}=\bar{\mathbf{b}}$ denote the vector of phase-shifts and
auxiliary variables fixed as inputs of the algorithm, and let
$\bar{\mathbf{W}}$ and $\mathbf{W}_{\rm new}$ represent the precoding matrix
updated at the end of iteration $t$ and $t+1$, respectively. We define the
following functions:

$\displaystyle
f_{Q}\left(\boldsymbol{\beta},\boldsymbol{\gamma},\mathbf{W}\right)$
$\displaystyle=Q_{1}^{\mathrm{m}}\left(\mathbf{W},\boldsymbol{\beta}\right)+Q_{1}^{\mathrm{e}}\left(\mathbf{W},\boldsymbol{\gamma}\right)+\log
B_{1U}^{\mathrm{e}}$ (130a) $\displaystyle\mathcal{R}_{\rm
M}^{\mathrm{ssr}}\left(\mathbf{W}\right)$
$\displaystyle=\mathcal{R}_{\mathrm{q}}^{\mathrm{ssr}}\left(\mathbf{W},\bar{{\boldsymbol{\phi}}},\bar{\mathbf{b}}\right)$
(130b)

with $Q_{1}^{\mathrm{m}}\left(\mathbf{W},\boldsymbol{\beta}\right)$,
$Q_{1}^{\mathrm{e}}\left(\mathbf{W},\boldsymbol{\gamma}\right)$, and
$B_{1U}^{\mathrm{e}}$ as defined in Section V-A. Moreover, let us define
vectors

$\displaystyle\boldsymbol{\beta}^{\mathrm{F}}\left(\mathbf{W}\right)$
$\displaystyle=\left[\beta_{1}^{\mathrm{F}}\left(\mathbf{W}\right),\ldots,\beta_{K}^{\mathrm{F}}\left(\mathbf{W}\right)\right],$
(131a) $\displaystyle\boldsymbol{\gamma}^{\mathrm{F}}\left(\mathbf{W}\right)$
$\displaystyle=\left[\gamma_{1}^{\mathrm{F}}\left(\mathbf{W}\right),\ldots,\gamma_{K}^{\mathrm{F}}\left(\mathbf{W}\right)\right]$
(131b)

for a given precoding matrix $\mathbf{W}$, where

$\displaystyle\beta_{k}^{\mathrm{F}}\left(\mathbf{W}\right)$
$\displaystyle=\frac{\displaystyle\sqrt{\omega_{k}\bar{b}_{k}\left(1+\frac{A_{1k}^{\rm
m}\left({\mathbf{W}}\right)}{B_{1k}^{\rm
m}\left({\mathbf{W}}\right)}\right)}\left.\tilde{\mathbf{h}}^{\mathsf{H}}_{k}\left(\bar{\boldsymbol{\phi}}\right){\mathbf{w}}_{k}\right.}{A_{1k}^{\rm
m}\left(\mathbf{W}\right)+B_{1k}^{\rm m}\left(\mathbf{W}\right)},$ (132a)
$\displaystyle\gamma_{k}^{\mathrm{F}}\left(\mathbf{W}\right)$
$\displaystyle=\sqrt{\frac{\displaystyle\omega_{k}\bar{b}_{k}\left(1+\frac{A_{1k}^{\rm
e}\left({\mathbf{W}}\right)}{B_{1k}^{\rm
e}\left({\mathbf{W}}\right)}\right)}{B_{1U}^{\rm e}}}\sqrt{A_{1k}^{\rm
e}\left(\mathbf{W}\right)}.$ (132b)

By substitution, it is straightforward to show that in iteration $t$ of
Algorithm 3,
$\bar{\boldsymbol{\beta}}=\boldsymbol{\beta}^{\mathrm{F}}\left(\bar{\mathbf{W}}\right)$
and
$\bar{\boldsymbol{\gamma}}=\boldsymbol{\gamma}^{\mathrm{F}}\left(\bar{\mathbf{W}}\right)$
and that

$\displaystyle\mathcal{R}_{\rm
M}^{\mathrm{ssr}}\left(\mathbf{W}\right)=f_{Q}\left(\boldsymbol{\beta}^{\mathrm{F}}\left(\mathbf{W}\right),\boldsymbol{\gamma}^{\mathrm{F}}\left(\mathbf{W}\right),\mathbf{W}\right).$
(133)

To start the proof, we note that for a fixed $\mathbf{W}$, the marginal
function $f_{Q}\left(\boldsymbol{\beta},\boldsymbol{\gamma},\mathbf{W}\right)$
is a concave function in terms of $\boldsymbol{\beta}$ and
$\boldsymbol{\gamma}$ whose maximum is at
${\boldsymbol{\beta}}=\boldsymbol{\beta}^{\mathrm{F}}\left(\mathbf{W}\right)$
and
${\boldsymbol{\gamma}}=\boldsymbol{\gamma}^{\mathrm{F}}\left(\mathbf{W}\right)$.
As a result, for a given $\mathbf{W}$, we have

$\displaystyle
f_{Q}\left(\bar{\boldsymbol{\beta}},\bar{\boldsymbol{\gamma}},\mathbf{W}\right)$
$\displaystyle\leq
f_{L}\left(\boldsymbol{\beta}^{\mathrm{F}}\left(\mathbf{W}\right),\boldsymbol{\gamma}^{\mathrm{F}}\left(\mathbf{W}\right),\mathbf{W}\right)$
(134a) $\displaystyle=\mathcal{R}_{\rm
M}^{\mathrm{ssr}}\left(\mathbf{W}\right).$ (134b)

Furthermore, the marginal function
$f_{Q}\left(\bar{\boldsymbol{\beta}},\bar{\boldsymbol{\gamma}},\mathbf{W}\right)$
is a concave function in $\mathbf{W}$. The quadratic problem
$\mathcal{Q}_{1}^{B}$ indicates that the maximum of this marginal function is
at $\mathbf{W}=\mathbf{W}_{\rm new}$, when we set
$\boldsymbol{\beta}=\bar{\boldsymbol{\beta}}$ and
$\boldsymbol{\gamma}=\bar{\boldsymbol{\gamma}}$. Thus, for a given
$\mathbf{W}$, we have

$\displaystyle
f_{Q}\left(\bar{\boldsymbol{\beta}},\bar{\boldsymbol{\gamma}},\mathbf{W}\right)$
$\displaystyle\leq
f_{Q}\left(\bar{\boldsymbol{\beta}},\bar{\boldsymbol{\gamma}},\mathbf{W}_{\rm
new}\right).$ (135)

Considering the above inequalities, we can write

$\displaystyle\mathcal{R}_{\mathrm{q}}^{\mathrm{ssr}}\left(\bar{\mathbf{W}},\bar{{\boldsymbol{\phi}}},\bar{\mathbf{b}}\right)$
$\displaystyle=\mathcal{R}_{\rm
M}^{\mathrm{ssr}}\left(\bar{\mathbf{W}}\right)$ (136a)
$\displaystyle\stackrel{{\scriptstyle\dagger}}{{=}}f_{Q}\left(\bar{\boldsymbol{\beta}},\bar{\boldsymbol{\gamma}},\bar{\mathbf{W}}\right)$
(136b)