Intelligent Reflecting Surface: A Programmable Wireless Environment for Physical Layer Security

In this paper, we introduce an intelligent reflecting surface (IRS) to provide a programmable wireless environment for physical layer security. By adjusting the reflecting coefficients, the IRS can change the attenuation and scattering of the incident electromagnetic wave so that it can propagate in the desired way toward the intended receiver. Specifically, we consider a downlink multiple-input single-output (MISO) broadcast system, where the base station (BS) transmits independent data streams to multiple legitimate receivers and keeps them secret from multiple eavesdroppers. By jointly optimizing the beamformers at the BS and reflecting coefficients at the IRS, we formulate a minimum-secrecy-rate maximization problem under various practical constraints on the reflecting coefficients. The constraints capture the scenarios of both continuous and discrete reflecting coefficients of the reflecting elements. Due to the non-convexity of the formulated problem, we propose an efficient algorithm based on the alternating optimization and the path-following algorithm to solve it in an iterative manner. Besides, we show that the proposed algorithm can converge to a local (global) optimum. Furthermore, we develop two suboptimal algorithms with some forms of closed-form solutions to reduce computational complexity. Finally, the simulation results validate the advantages of the introduced IRS and the effectiveness of the proposed algorithms.


I. INTRODUCTION
A variety of wireless technologies have been proposed to enhance the spectrum-and energy-efficiency due to the tremendous growth in the number of communication devices, such as multiple-input multiple-output (MIMO) [1], cooperative communications [2], cognitive radio (CR) [3] and so on.However, these techniques only focus on the signal processing at the transceiver to adapt the changes of the wireless environment, but cannot eliminate the negative effects caused by the uncontrollable electromagnetic wave propagation environment [4], [5].
Recently, intelligent reflecting surface (IRS) has been proposed as a promising technique due to its capability to achieve high spectrum-/energy-efficiency through controlling the wireless propagation environment [6].Specifically, IRS is a uniform planar array consisting of a large number of composite material elements, each of which can adjust the reflecting coefficients (i.e., phase or amplitude) of the incident electromagnetic wave and reflect it passively.Hence, by smartly adjusting the reflecting coefficients with a preprogrammed controller, the IRS can change the attenuation and scattering of the incident electromagnetic wave so that it can propagate in the desired way before reaching the intended receiver, which is called as programmable and controllable wireless environment.This also inspires us to design the communication systems by jointly considering the signal processing at the transceiver and the optimization of the electromagnetic wave propagation in the wireless environment.
Compared with the existing related techniques, i.e., traditional reflecting surfaces [7], amplify-and-forward (AF) relay [8], active intelligent surface [9], and backscatter communication [10]- [12], IRS has the following advantages [13], [14].Firstly, IRS can reconfigure the reflecting coefficients in real time thanks to the recent breakthrough on micro-electricalmechanical systems (MEMS) and composite material [5], [6] while the traditional reflecting surface only has fixed reflecting coefficients.Secondly, IRS is a green and energyefficient technique which reflects the incident signal passively without additional energy consumption while the AF relay and the active intelligent surface require active radio frequency (RF) components.Thirdly, although both the IRS and the backscatter communication make use of passive communications, IRS can be equipped with a large number of reflecting elements while backscatter devices are usually equipped with a single/few antenna(s) due to the limitations of complexity and cost [15].Besides, IRS only attempts to assist the transmission of the signals between the intended transmitter and receiver pair with no intention for its own information transmission while backscatter communication needs to support the information transmission of the backscatter device [16], [17].
Due to the significant advantages, IRS has been introduced into various wireless communication systems.Specifically, [18]- [22] consider a downlink single user multiple-input single-output (MISO) system assisted by the IRS.In [18], both centralized and distributed algorithms were developed to maximize the signal-to-noise ratio (SNR) of the desired signals considering perfect channel state information (CSI).Then, in [19], the effect of the reflecting coefficients on the ergodic capacity was investigated by considering statistical CSI.Moreover, since achieving continuous reflecting coefficients on the reflecting elements is costly in practice due to the hardware limitation, the SNR maximization problem and transmitter power minimization problem were studied in [20]- [23] by considering discrete reflecting coefficients on the reflecting elements.As for a downlink multi-user MISO system [24]- [26], the spectrum-/energy-efficiency problem under the individual signal-to-interference-plus-noise ratio (SINR) constraints was investigated in [24] and [25] considering continuous or discrete reflecting coefficients on the reflecting elements.In addition, the minimum-SINR maximization problem was formulated in [26] by considering the two cases where the channel matrix between the transmitter and the IRS is of rank-one and of full-rank.
Furthermore, physical layer security is a fundamental issue in wireless communications [27].The basic wiretap channel introduced by Wyner [28] consists of one transmitter, one legitimate receiver, and one eavesdropper.Then, the basic wiretap channel has been extended to broadcast channels [29], Gaussian channels [30], compound wiretap channels [31], and so on.It is worth noting that, in order to ensure secret communications, the transmission rate in the wiretap channel should be lower than the secrecy capacity of the channel.Thus, MIMO beamforming techniques were further introduced to improve the secrecy capacity (improving SNR of legitimate receivers and suppressing SNR of eavesdroppers) [32]- [35].Specifically, both power minimization and secrecy rate maximization were studied in [33] in a single user/eavesdropper MIMO systems considering both perfect and imperfect CSI.Then, the minimum-secrecy-rate of a single-cell multi-user MISO system was studied in [34] with a minimum harvested energy constraint, and it was further extended to a multi-cell network in [35].
However, consider the special case when the legitimate receivers and the eavesdroppers are in the same directions to the transmitter.In this case, the channel responses of the legitimate receivers will be highly correlated with those of the eavesdroppers.The beamformers proposed in [32]- [35] to maximize the SNR of legitimate receivers will also maximize the SNR of eavesdroppers.Hence, it is intractable to guarantee the secret communications with the use of beamforming only at the transceivers.Hence, we want to explore the use of the IRS to provide additional communication links so as to increase the SNR at the legitimate receivers while suppressing the SNR at the eavesdroppers.Hopefully, this will create an effect as if the confidential data streams can bypass the eavesdroppers and reach the legitimate receivers, as shown in Fig. 1, and thus the secrecy rate will be improved.
Motivated by the above reasons, in this paper, we study a programmable wireless environment for physical layer security to achieve high-efficiency secret communication.Specifically, we consider a downlink MISO broadcast system where the base station (BS) transmits multiple independent confidential data streams to each legitimate receivers and keeps them secret from the eavesdroppers through the assistance of the IRS.The contributions of the paper are summarized as follows: • To the best of our knowledge, this is the first work to explore the use of the IRS to enhance the physical layer secret communication.Particularly, we jointly optimize the beamformers at the BS and the reflecting coefficients at the IRS to maximize the minimum-secrecy-rate under various practical constraints on the reflection coefficients.
The constraints capture both the continuous and discrete reflecting coefficients of the reflecting elements on the IRS.However, the objective function is not jointly concave with respect to both the beamformers and the reflecting coefficients, and even worse, they are coupled together.Hence, the formulated problem is non-convex, which is hard to solve and may require high complexity to obtain the optimal solutions.• We solve the formulated problem efficiently in an iterative manner by developing alternating optimization based path-following algorithm [36], [37].Specifically, we use the path-following algorithm to handle the nonconcavity of the objective function and apply the alternating optimization to deal with the coupled optimization variables.Besides, we prove that the proposed algorithm is guaranteed to converge to a local (global) optimum and the corresponding solution will converge to a Karush-Kuhn-Tucker (KKT) point finally.• To further reduce the computational complexity, we develop two suboptimal algorithms to solve the formulated problem for two cases.For the first case with one legitimate receiver and one eavesdropper, we develop an alternating optimization method to solve the formulated problem in an iterative manner, but in each iteration we provide the closed-form solutions, which leads the algorithm to be low complexity.For the second case with multiple legitimate receivers and eavesdroppers, we develop a heuristic closed-form solution based on zeroforcing (ZF) beamforming, which further reduces the computational complexity.• Finally, the simulation results validate the advantages of the introduced IRS and also show the effectiveness of the proposed algorithms.
The rest of this paper is organized as follows: Section II introduces the system model of the downlink MISO broadcast system with multiple eavesdroppers.Section III formulates the minimum-secrecy-rate maximization problem.Section IV develops an efficient algorithm to solve the formulated problem and Section V provides two low-complexity suboptimal algorithms to solve it in two cases, respectively.Section VI shows the simulation results to evaluate the performances of the proposed algorithms.Finally, Section VII concludes the paper.
The notations used in this paper are listed as follows.The scalar, vector, and matrix are lowercase, bold lowercase, and bold uppercase, i.e., a, a, and A, respectively.(•) T , (•) H , Tr (•) and ℜ(•) denote transpose, conjugate transpose, trace, and real dimension, respectively.CN µ, σ 2 denotes the distribution of a circularly symmetric complex Gaussian (CSCG) random variable with mean µ and variance σ 2 .C x×y and R x×y denote the space of x × y complex/real matrices.

II. SYSTEM MODEL
As shown in Fig. 1, we consider a programmable downlink MISO broadcast system which consists of one BS, one IRS, K legitimate receivers, denoted as B 1 , • • • , B K , and N active eavesdroppers, denoted as E 1 , • • • , E N .The BS and the IRS are equipped with M antennas and L reflecting elements, respectively, while the legitimate receivers and eavesdroppers are all equipped with a single antenna each.The BS sends K independent confidential data streams with one stream for each of the K legitimate receivers over the same frequency band, simultaneously.At the same time, the unauthorized eavesdroppers are trying to eavesdrop any of the data streams, independently.
Consider the special case when the legitimate receivers and the eavesdroppers are in the same directions to the BS.In this case, the channel responses of the legitimate receivers will be highly correlated with those of the eavesdroppers.As aforementioned, it is intractable to guarantee the secret communications with the use of beamforming only at the transceivers.Hence, we want to explore the use of the IRS to provide additional communication links so as to increase the SNR at the legitimate receivers while suppressing the SNR at the eavesdroppers.Hopefully, this will create an effect as if the confidential data streams can bypass the eavesdroppers and reach the legitimate receivers, and thus the secrecy rate will be improved.In this paper, we are interested in obtaining the performance limit of such a system.Hence, similarly to [18] and [24], we assume that the CSI of all the channels are perfectly known at the BS 1 .In practical systems where such CSI cannot be obtained perfectly, the results derived in this paper can be considered as the performance upper bound.Note that the optimization (in terms of beamformers and reflecting coefficients) of the system to be presented in the 1 In practice, the optimization processing only requires the CSIs of the composite channels, i.e., H k and Gn, defined in (15) and (16).Hence, we can first turn off the IRS and enable the users to send orthogonal pilot sequences to the BS for estimating the last rows of H k and Gn.Next, we can turn on each reflecting element on the IRS successively in L time slots and keep the other reflecting elements closed.Then, the users send orthogonal pilot sequences to the BS in the each time slot.Finally, the first L rows in H k and Gn can be estimated by subtracting the last rows of H k and Gn from the estimated channel gains.
subsequent sections is done at the BS and that the optimized reflecting coefficients are transmitted to the IRS to reconfigure the corresponding reflecting elements accordingly.

A. Channel Model
The baseband equivalent channel responses from the BS to the IRS, from the BS to B k , from the BS to E n , from the IRS to B k , and from the IRS to E n are denoted by , and g H r,n ∈ C 1×L , respectively, with 1 ≤ k ≤ K and 1 ≤ n ≤ N .Specifically, without loss of generality, we adopt a Rician fading channel model, which consists of LoS and non-LoS (NLoS) components, i.e., , where κ h , h LoS , and h NLoS are the Rician factor, LoS components, and NLoS components of channel h, respectively.The NLoS components h NLoS are i.i.d.complex Gaussian distributed with zero mean and unit variance.We define a vector a , where d is the antenna element separation, λ is the carrier wavelength, X is the dimension of the vector and ϑ is the angle, which can be interpreted as either angle of departure (AoD) or angle of arrival (AoA) depending on the context.We set d/λ = 1/2 for simplicity.Hence, the LoS components in (1) can be modeled as where ϑ d,k , ϑ r,k , θd,n , θr,n are the AoA or AoD of a signal from the BS to B k , from the IRS to B k , from the BS to E n , and from the IRS to E n , respectively.ϑ AoD and ϑ AoA are the AoD from the BS and the AoA to the IRS, respectively.

B. Reflecting Coefficient Model
The reflecting coefficient channel of the IRS [18] is given by where diag(•) denotes a diagonal matrix whose diagonal elements are given by the corresponding vector and Φ denotes the set of reflecting coefficients of the IRS.In this paper, we consider the following three different sets of reflecting coefficients, which lead to three different constraints for the reflecting coefficients.
• Continuous Reflecting Coefficients: In this scenario, we further consider two detailed setups with the optimized or constant amplitude.Specifically, the reflecting coefficient set for the optimized amplitude with continuous phaseshift is denoted by and the reflecting coefficient set for the constant amplitude with continuous phase-shift is denoted by • Discrete Reflecting Coefficients: In this scenario, the reflecting coefficient set has constant amplitude and discrete phase-shift, which is given by where Q is the number of reflecting coefficient values of the reflecting elements on the IRS.Note that, it is costly in practice to achieve continuous reflecting coefficient on the reflecting elements due to the hardware limitation.Hence, applying the discrete reflecting coefficient on the reflecting elements, i.e., Φ 3 , is more practical than applying the continuous reflecting coefficients, i.e., Φ 1 and Φ 2 .But, it is also important to investigate the system performance with Φ 1 and Φ 2 since it serves as the upper bound to that with Φ 3 .

C. Signal Model
Let s k be the confidential message dedicated to B k .It is assumed that all messages transmitted are CSCG, i.e., s k ∼ CN (0, 1) for 1 ≤ k ≤ K.Then, the signal transmitted from the BS can be expressed as where w k is the downlink beamforming vector for s k .The received signals at B k and eavesdropped by E n can be expressed as respectively, where u B k and u E n are the received noises at B k and E n , respectively.It is assumed that all noises are Guassian distributed with zero mean, i.e., u n , respectively.According to (9), the achievable transmission rate of the k-th confidential message received at B k can be written as According to (10), if E n attempts to eavesdrop the k-th confidential message, the achievable wiretapped rate of the k-th message received at E n can be written as Since each eavesdropper can eavesdrop any of the K confidential messages, the achievable secrecy rate (in nats/sec/Hz) for transmitting s k to B k and keeping it confidential from all the N eavesdroppers should be the minimum-secrecy-rate among B k and E n for 1 ≤ n ≤ N , which is given by [35]

III. PROBLEM STATEMENT A. Problem Formulation
In this paper, we attempt to jointly optimize the beamfroming vector, i.e., W = [w 1 , • • • , w k ] ∈ C M×K , and reflecting coefficients, i.e., θ, to maximize the minimumsecrecy-rate among all the legitimate receivers.Mathematically, the optimized problem can be generally formulated as where P denotes the maximum transmit power at the BS and Φ may be set as Φ 1 , Φ 2 , and Φ 3 , respectively.

B. Problem Transformation (P1
) is hard to solve due to the non-concave objective function.In order to find the solution of (P1) efficiently, we will transform it into the following equivalent formulation.
To begin with, denoting (11) and R E k,n in ( 12) can be rewritten as where Thus, it is straightforward to know that (P1) can be transformed into the following equivalent form: (14a).
However, the transformed problem (P2) is still hard to solve since R(W , v) is not jointly concave with respect to W and v, and even worse, they are coupled together.In the next section, we will develop an iterative algorithm to solve (P2) efficiently.

IV. MINIMUM-SECRECY-RATE MAXIMIZATION
In this section, we will propose two techniques to jointly solve the above challenging problem.Firstly, we apply the path-following algorithm to handle the non-concavity of the objective function.Then, we apply the alternating optimization technique to deal with the coupled optimization variables.Finally, we analyze the convergence of the proposed algorithm.

A. Path-Following Algorithm Development
In this part, we will develop path-following iterative algorithm to solve (P2) with the non-concave objective function, i.e., R(W , v).In particular, the basic idea of the pathfollowing is to follow a solution path of a family of the approximated problems of (P2).For example, R(W , v) is approximated by a concave lower bound function, which is obtained by applying linearly interpolating between the non-concave term f B k (W , v) and the non-convex term f E k,n (W , v), respectively.Specifically, the approximated problem has a local (global) optimal value and can be increased in each iteration, which finally leads to a local (global) optimal solution of (P2) [36].
To begin with, let (W (t) , v (t) ) denote the solution of (P2) in the t-th iteration.Then, in order to find the concave lower bound function of R(W , v) to develop path-following algorithm, we can fist find the lower bound function of ).The details are given in the following lemma.
Lemma 4.1: The lower bound function of f B k (W , v) and the upper bound function of f E k,n (W , v) at W (t) , v (t) in the (t + 1)-th iteration of path-following algorithm are given by ) ) ) where Proof: Please refer to Appendix A. Then, from ( 20) and ( 21), we know the lower bound of R(W , v) is given by Note that, according to ( 20) and ( 21), the equality in (23) holds when W = W (t) and v = v (t) .Thus, a family of the approximated problems of (P2) is given as follows: s.t.(14a) and (19a).
However, (P2 − t) is still a non-convex problem due to the following reasons: • First, W and v are coupled in the terms of v H H k w k and v H G n w k , which makes the objective function In subsection IV-B, we will first develop alternating optimization method to deal with the coupled optimization variables in (P2−t) with Φ = Φ 1 , and then we will extend it to the scenarios with Φ = Φ 2 and Φ = Φ 3 , respectively.

B. Alternating Optimization with Continuous and Discrete Reflecting Coefficients
1) The Solution of (P2) with Φ = Φ 1 : In this part, we develop the alternating optimization to solve (P2 − t) when Φ = Φ 1 in constraint (19a), which leads constraint (19a) to be a convex set.Hence, the non-convexity of (P2 − t) only stems from the coupled optimization variables.
In fact, although the objective function ) is non-concave due to the coupled ) is concave both in W with fixed v and in v with fixed W .Similarly, for the domain in ( 21) is a biconvex function with respect to W and v, which leads to a biconvex function t) ) with respect to W and v. Hence, ) is a biconcave function in W and v.
Therefore, we know (P2 − t) with Φ = Φ 1 has convex constraints and concave objective function in W with fixed v and in v with fixed W . Hence, we can apply the alternating optimization method to solve (P2−t) in an alternating manner efficiently.Specifically, the alternating algorithm decouples (P2 − t) into the following two subproblems for the optimization of W and v, respectively, and Note that (P3 − A) is an optimization subproblem for solving W with a given v and (P3−B) is an optimization subproblem for solving v with a given W .
As aforementioned, we know both (P3 − A) and (P3 − B) are convex optimization problems, which can be solved optimally and efficiently by using CVX [38].Thus, problem (P2) with Φ = Φ 1 can be solved efficiently by alternately solving (P3−A) and (P3−B) in an iterative manner of path-following algorithm.In particular, the algorithm steps of the alternating optimization based path-following algorithm are summarized in Algorithm 1.

5:
Set W = W (t) and calculate v (t) by solving the convex optimization problem (P3 − B), converges.
2) The Solutions of (P2) with Φ = Φ 2 : In this part, we extend the above alternating optimization to solve (P2 − t) when Φ = Φ 2 in constraint (19a), which leads constraint (19a) to be a non-convex set.To handle this non-convex constraint, we propose the following two methods: • In the first method, we introduce a positive constant relaxation factor λ to reformulate (P2 − t) with Φ = Φ 2 as the following optimization problem, attempts to force the inequality holds for v l , i.e., |v| l = 1.However, the objective of (P4 − t) is to maximize the summation of concave and convex functions, which belongs to a non-convex problem.To further deal with this challenge, we use the first-order Taylor series expansion to approximates the convex function as an affine function [39].Then, we iteratively solve the approximated convex optimization problem until the convergence is met.Specifically, the approximated problem is s.t.(14a), and (19a) with Φ = Φ 1 .
Finally, the only non-convex term in (P4 − A) stems from the coupled W and v in the objective function R lb (W , v; W (t) , v (t) ), which can be solved efficiently by applying the same alternating optimization method, i.e., Algorithm 1.However, this method has the main drawbacks that we use the approximation in (P4 − t) and there is no beforehand choice for the relaxation factor λ to speed up the convergence [35].Hence, we further propose the direct projection method in the next part.
• In the second method, we can apply the projection method to project the solution of (P2) with Φ = Φ 1 into Φ = Φ 2 directly.Specifically, denote the solutions of (P2) with Φ = Φ 1 and (P2) with Φ = Φ 2 as (W † , v † ) and (W ‡ , v ‡ ), respectively.Thus, the (W ‡ , v ‡ ) can be obtained by solving the following projection problem: From [26], the optimal solution to (P4-B) is given by and W ‡ = W † .Note that, to further improve the performance of this method, we can rerun the following adjusted Algorithm 1 to iteratively update the obtained (W ‡ , v ‡ ): Then, perform the following steps iteratively until the objective function converges. 1)and calculate W (t) by solving the convex optimization problem (P3 − A), -Set W = W (t) , project the solution of (P3 − B) into Φ 2 by ( 27), and denote it as ṽ, -Update v (t) using the following rule: 3) The Solution of (P2) with Φ = Φ 3 : In this part, we develop algorithms to solve (P2) when Φ = Φ 3 in constraint (19a), which leads the optimized problem belongs to a class of combinatorial optimization problem, which is an NP-hard problem in general.Thus, it will cause intractable complexity to obtain the optimal solution.Hence, we will use the similar heuristic projection method in the above to solve this problem efficiently.
To begin with, we denote the solution of Φ = Φ 3 as (W § , v § ).Then, we can directly project v † , the solution of (P2) with Φ = Φ 1 , into Φ 3 to obtain (W § , v § ), i.e., v § l =    e jϕ q , where q = arg min where v § l and v † l are the l-th element of v § and v † , respectively.W § = W † .Note that the rest steps to update (W § , v § ) are similar as the second method in subsection IV-B2, which is omitted here for brevity.

C. Convergence Analysis
In this part, we analyze the convergence of the proposed alternating optimization based path-following algorithm, i.e., Algorithm 1, which is given in the following theorem.
Proof: To begin with, we have where (a) is because the equality in (23) holds when W = W (t) and v = v (t) , (b) and (c) are because W (t+1) and v (t+1) are the optimal solutions of the convex optimization problems of (P3 − A) and (P3 − B), respectively, and ) is the lower bound of the function R(W , v) in (23).Furthermore, due to (14a) and (19a), we know W (t) and v (t) are both bounded.According to Cauchy's theorem [35], we know the sequence of (W (t) , v (t) ) will converge to Hence, we have proved the R(W (t) , v (t) ) ≤ R(W (t+1) , v (t+1) ), which can guarantee to converge to a local (global) optimum.
Proof: Please refer to Appendix B However, although the convergence of the proposed algorithm is guaranteed, it requires solving the convex optimization problems (P3 − A) and (P3 − B) whose complexity are in the order of O((KN + 1)K 2 M 2 ) and O((KN + L + 1)(L + 1) 2 ) [40], respectively.Hence, we will develop the methods to reduce the computational complexity in the next subsection.Note that, since the solutions with Φ 1 can be projected into Φ 2 and Φ 3 directly, thus we only consider Φ = Φ 1 when developing the low-complexity algorithms.

V. SUBOPTIMAL ALGORITHMS WITH LOW-COMPLEXITY
In this section, two suboptimal algorithms are developed to further reduce the complexity.Firstly, we develop an alternating optimization algorithm for the case with one legitimate user and one eavesdropper, where the closed-form solutions are provided in each iteration.Then, we develop an noniterative suboptimal algorithm based on ZF beamforming for the case with multiple legitimate users and eavesdroppers.

A. Alternating Optimization for (P2) with K = 1 and N = 1
In this section, we develop a low-complexity algorithm to solve (P2) for the case with K = 1 and N = 1.Although there is no-interference in the objective function, the problem is still non-convex and hard to solve due to the coupled W and v. Thus, we also need to apply alternating optimization to decouple W and v. Fortunately, we can obtain the closedform solutions in each iteration, which leads it to be a lowcomplexity algorithm.
Specifically, (P2) with K = 1 and N = 1 can be solved by alternately solving the following two subproblems: which is an optimization problem of w 1 for a given v with which is an optimization problem of v for a given w 1 with h1 = H 1 w 1 and ḡ1 = G 1 w 1 .Note that in constraint (33), we have relaxed constraint (19a) due to v L+1 .To make the solution of v in the above problem (P5-B) to satisfy (19a), we need to set v * L+1 as 1 and v * l = v l / exp(j arg(v L+1 )) for 1 ≤ l ≤ L after the convergence.Besides, constraints (33) can be regarded as the per-antenna power constraints with the maximum power of one [41].
In the following two parts, we provide the solutions to (P5-A) and (P5-B), respectively. 1

) The Optimal Solution to (P5-A):
This problem is the downlink MISO beamforming problem for basic wiretap channel, which has been studied in [42].In particular, the optimal solution to (P5-A) is given by where q is the eigenvector of matrix Z corresponding to the largest eigenvalue, and 2) The Solutions to (P5-B) : In this part, we develop the efficient algorithm to solve (P5-B) in an iterative manner 2 , and we provide the closed-form solutions in each iteration.To do so, we first introduce the following lemma Lemma 5.1: Let x be a positive real number, and define f (y) = −xy + ln y + 1, then we have − ln x = max y>0 f (y), and the optimal corresponding solution in the right hand side of this equation is y * = 1/x.
Proof: This proof is similar in [44], which is omitted here for brevity.
According to lemma 5.1, (P5-B) can be equivalently rewritten as This reformulated problem is still non-convex, but it is convex in v or y with the other variable is fixed.Then, we can further apply alternating optimizing to optimize v and y in an iterative manner.Specifically, the alternating optimization subproblems are given as follows: which is a convex optimization problem of y for a given v, and which is a convex optimization problem of V = vv H for a given y, where e l ∈ R (L+1)×1 is a unit vector with the l-th entry being one and other entries being zero.Note that since the rank of the optimal V of (P6-B) must be one, which will be proved in Appendix C, there is no need to add the rank-one constraint for variable V .
In the following, we show the optimal solutions to (P6-A) and (P6-B), respectively.Specifically, according to Lemma 5.1, it is straightforward to know the optimal solution to (P6-A) is given by Next, since (P6-B) is a convex problem, it is straightforward to know that strong duality holds for (P6-B) [45].Hence, we can obtain its optimal solution by solving its dual problem.To begin with, the Lagrangian dual of problem (P6-B) can be written as where is the dual variable and Then, the optimal solution to (P6-B) can be obtained by iteratively solving (40) with fixed χ and updating χ by subgradient methods, e.g., the ellipsoid method.The details for the subgradient methods have been studied in [46], which are omitted here for brevity.Then, we have the following theorem.Theorem 5.1: If the optimal χ * is given, the optimal solution for (P6-B) is given by where Proof: Please refer to Appendix C. The convergence for the above algorithm is also guaranteed, the proof is similar to the proof of theorem 4.1, which is omitted here for brevity.Besides, the detailed steps of the above algorithm are summarized in Algorithm 2.

B. Heuristic Algorithm for (P2) with K ≥ 1 and N ≥ 1
In this subsection, we provide the heuristic algorithm for (P2) with K ≥ 1 and N ≥ 1.Specifically, when L → ∞, we can assume the received signal from the BS to users can be ignored due to the total powers of received signals are dominated by the signals from the BS and through the IRS to the users with asymptotically large L. In addition, according to the Rician channel model introduced in (1) and (4), when κ F → ∞ and κ h r,k → ∞ and κ gr,n → ∞, the channel responses from the BS to the IRS, from the IRS to B k and from the IRS to E n are dominated by LoS components since the NLoS components can be practically ignored.Besides, we also assume all legitimate receivers are in the same directions to the IRS, i.e., ϑ r,k = ϑ r,i holds for 1 ≤ i, k ≤ K. Hence, the total power of received signals at the legitimate receivers can be given by Then, it is straightforward to know the optimal θ * to maximize the total received signal power in ( 42) is given by Substituting ( 43) into ( 11) and ( 12), the throughput of k-th confidential message at B k and E n can be written as respectively, where ). Next, we apply the ZF beamforming scheme 3 , which forces the information leakage to E n to be zero, i.e., ĜH W = 0, where Thus, the ZF beamformer W can be expressed as where where xH k = ĥH k X/σ k .From [47], we know the optimal beamformer in problem (P2) has the following structure where the unique and positive z k4 for 1 ≤ k ≤ K can be obtained by solving the following equations [47]: Note that γ * is the optimal value of the objective function in (P7), and we know γ * k = γ * holds for all 1 ≤ k ≤ K [48].Using this fact, we have the following equation: where Then, we know the optimal power allocation p is given as follows

VI. SIMULATION RESULTS
In this section, we present simulation results to validate the advantages of using the IRS to improve the secret communication of the downlink MISO broadcast system.It is assumed that the noise variances σ 2 k at B k and δ 2 n at E n are the same and normalized to one.The maximum transmit power P is defined in dB with respect to the noise variance.For performance comparison, we also show the performances of two suboptimal baseline schemes.In particular, for the "Rand" baseline, we randomly select the reflecting coefficients of the IRS from Φ 2 with equal probability and apply Algorithm 1 without updating the reflecting coefficients anymore to obtain the beamforming design; and for the "Without IRS" baseline, we assume that the channels from the BS to the IRS, from the IRS to B k , and from the IRS to E n are blocked, i.e., F = 0, h H r,k = 0, and g H r,n = 0, respectively, with 1 ≤ k ≤ K and 1 ≤ n ≤ N , and then we apply Algorithm 1 to obtain the beamforming design.This represents the worst-case scenario to achieve secret communication in the absence of the IRS.In addition, we assume that the legitimate receivers and the eavesdroppers are in the same directions to the BS and the IRS, i.e., ϑ d,k = ϑ d,i and ϑ r,k = ϑ r,i for 1 ≤ i, k ≤ K, and θd,n = θd,i and θr,n = θr,i for 1 ≤ i, n ≤ N .We also assume that ϑ r,k , θr,n , ϑ AoA and ϑ AoD are uniformly distributed between [0, 2π), while ϑ d,k and θd,n are uniformly distributed between [−π/3, π/3].
Figure 2(a) and Fig. 2(b) show the minimum secrecy rate under different values of the maximum transmit power P of the BS for K = N = 2 and K = N = 1, respectively.Note that "Algorithm 1: Φ 2 (1)" and "Algorithm 1: Φ 2 (2)" denote Algorithm 1 with the first method based on Taylor series expansion and second method based on projection for Φ = Φ 2 , respectively, the details of which are given in subsection IV-B2.From the two figures, we can first observe that the minimum secrecy rates of all methods increase as the maximum transmit power increases.Besides, we know the performance gap between the system with the IRS and the system without the IRS increases with the transmit power, which validates the advantages of the introduced IRS.Secondly, in the scenario of Φ = Φ 1 , we observe that Algorithm 1 and Algorithm 2 have the similar performances and that both of them outperform the other baselines.This is because both of them can guarantee to converge to a local (global) optimum.Thirdly, we observe that the performance of the ZF based heuristic algorithm is worse than that of "Rand" baseline with K = 2 and better than that with K = 1.This is acceptable due to the complexity of the "Rand" baseline is still higher than the ZF based heuristic algorithm.It also shows that the heuristic algorithm is more effective when K is small.
Figure 3 plots the minimum secrecy rate versus the number of reflecting elements (antennas) L of the IRS.From this figure, we can observe that the minimum secrecy rates of all methods assisted by the IRS increase as the number of reflecting elements on the IRS increases, while the minimum secrecy rate of the system without the IRS remains constant.This is reasonable since a larger number of reflecting elements of the IRS can achieve higher array gain.This also validates the advantages of the introduced IRS for the studied systems.In addition, the performance gap between Algorithm 1 with Φ = Φ 1 and Φ = Φ 3 increases as Q decreases, especially for a large L.This is because the system with a large L requires a large Q to achieve more precise adjustment for the reflecting coefficients on the IRS.This indicates that in order to better achieve the array again brought by a larger L, we should use  Figure 4 shows the minimum secrecy rate versus the number of discrete reflecting coefficient values Q of the reflecting coefficients on the IRS.We can observe that the performances of the proposed algorithms with Φ = Φ 1 , Φ = Φ 2 and Φ = Φ 3 decrease successively due to the fact Φ 3 ⊆ Φ 2 ⊆ Φ 1 .Furthermore, the performance of the proposed algorithm with Φ = Φ 3 increases as Q increases.This is because a larger Q allows a much finer adjustment to the reflecting coefficients on the IRS.Thus, the minimum secrecy rate can be improved.Finally, we observe that the proposed algorithm with Φ = Φ 3 and Q = 8 or 16 can achieve a similar performance to the proposed algorithm with Φ = Φ 2 .
Figure 5 plots the minimum secrecy rate versus the number of legitimate receivers K. First, we observe that the minimum secrecy rate decrease as K increases, due to the fact that the beamforming gain and array gain need to be shared with more legitimate users.Moreover, its similar to Fig. 2, we can observe that the performance of "Algorithm 1" is better than that of "ZF based Heuristic Algorithm" and other baseline schemes.
In addition, we also know that the low-complexity heuristic algorithm is more effective than the other suboptimal baseline schemes when K is small, especially for K = 1 or 2.
Figure 6 investigates the convergence performances of the proposed algorithms.For convenience, we first define Γ as the normalized performance gap between the values of the objective function in the two successive iterations of Algorithm 1 with Φ = Φ 1 , with Φ = Φ 2 (1), and Algorithm 2. We can first observe that the objective functions in all methods increases with every iteration, which validates the convergence analysis studied in Section IV.Moreover, the convergence performance of Algorithm 1 with Φ = Φ 2 (1) is worse than that with Φ = Φ 1 .This is because Algorithm 1 with Φ = Φ 2 (1) has the main drawback that there is no beforehand choice for the relaxation factor to speed up the convergence [35].Besides, it is worth noting that the number of iterations to achieve convergence in Algorithm 2 is smaller than that in Algorithm 1.This is because in the each iteration of Algorithm 2, we optimize the original problem without approximation and provide the global optimal solution for each subproblem.

VII. CONCLUSIONS
In this paper, we have investigated the joint beamforming and reflecting coefficient designs for a programmable downlink MISO broadcast system with multiple eavesdroppers.In particular, considering the scenario that the channel responses of the legitimate receivers are highly correlated with those of the eavesdroppers, it is intractable to guarantee the secret communications with the use of beamforming only at the transceivers.Hence, we have explored the use of the IRS to create a programmable wireless environment by providing additional communication links to increase the SNR at the legitimate receivers while suppressing the SNR at the eavesdropper.Specifically, we have formulated a minimum-secrecyrate maximization problem under various practical constraints on the reflecting coefficients, which captures the scenarios of both continuous and discrete reflecting coefficients of the reflecting elements.Since the formulated problem is a nonconvex problem, we have proposed an efficient algorithm to solve it in an iterative manner and theoretically analyzed its convergence.In addition, we have developed two suboptimal algorithms with closed-form solutions to further reduce the complexity.Finally, the simulation results have validated the advantages of the IRS and the effectiveness of the proposed algorithms.

A. Proof of Theorem 4.1
We first prove the lower bound function of f B k (W , v), and then prove the upper bound function of f E k,n (W , v) in this part, which is similar to the proof in [35].

FFig. 1 :
Fig.1:A programmable downlink MISO broadcast system with one IRS and multiple eavesdroppers.

KxH k u k 2 K i =k p i xH k u i 2 + 1 s
k=1 p k = P .Therefore, problem (P2) can be changed as the following the minimal-SINR maximization problem, i.e., .t.K k=1 p k = P and u k = 1.

Fig. 4 :
Fig. 4: Minimum secrecy rate versus the number of reflecting coefficients of each reflecting elements of the IRS: M = L = 5, N = 2, P = 10 dB and κ h = 1 with h ∈ H. a larger Q for the proposed scheme with Φ = Φ 3 .Figure4shows the minimum secrecy rate versus the number of discrete reflecting coefficient values Q of the reflecting coefficients on the IRS.We can observe that the performances of the proposed algorithms withΦ = Φ 1 , Φ = Φ 2 and Φ = Φ 3 decrease successively due to the fact Φ 3 ⊆ Φ 2 ⊆ Φ 1 .Furthermore, the performance of the proposed algorithm with Φ = Φ 3 increases as Q increases.This is because a larger Q allows a much finer adjustment to the reflecting coefficients on the IRS.Thus, the minimum secrecy rate can be improved.Finally, we observe that the proposed algorithm with Φ = Φ 3 and Q = 8 or 16 can achieve a similar performance to the proposed algorithm with Φ = Φ 2 .Figure5plots the minimum secrecy rate versus the number of legitimate receivers K. First, we observe that the minimum secrecy rate decrease as K increases, due to the fact that the beamforming gain and array gain need to be shared with more legitimate users.Moreover, its similar to Fig.2, we can observe that the performance of "Algorithm 1" is better than that of "ZF based Heuristic Algorithm" and other baseline schemes.In addition, we also know that the low-complexity heuristic