Intelligent Reflecting Surface Assisted Secure Wireless Communications With Multiple- Transmit and Multiple-Receive Antennas

In this paper, we propose intelligent reflecting surfaces (IRS) assisted secure wireless communications with multi-input and multi-output antennas (IRS-MIMOME). The considered scenario is an access point (AP) equipped with multiple antennas communicates with a multi-antenna enabled legitimate user in the downlink at the present of an eavesdropper configured with multiple antennas. Particularly, the joint optimization of the transmit covariance matrix at the AP and the reflecting coefficients at the IRS to maximize the secrecy rate for the IRS-MIMOME system is investigated, with two different assumptions on the phase shifting capabilities at the IRS, i.e., the IRS has the continuous reflecting coefficients and the IRS has the discrete reflecting coefficients. For the former case, due to the non-convexity of the formulated problem, an alternating optimization (AO)-based algorithm is proposed, i.e., for given the reflecting coefficients at the IRS, the successive convex approximation (SCA)-based algorithm is used to solve the transmit covariance matrix optimization, while given the transmit covariance matrix at the AP, alternative optimization is used again in individually optimizing of each reflecting coefficient at the IRS with other fixed reflecting coefficients. For the individual reflecting coefficient optimization, the closed-form or an interval of the optimal solution is provided. Then, the proposed algorithm is extended to the discrete reflecting coefficient model at the IRS. Finally, some numerical simulations have been done to demonstrate that the proposed algorithm outperforms other benchmark schemes.


I. INTRODUCTION
Due to the broadcast nature of the wireless media, wireless communications are vulnerable to eavesdropping.In order to provide the wireless communications with sound and solid security, physical layer security based technologies, such as the artificial noise (AN), cooperative jamming (CJ) and friendly jamming, have been studied for the recent years [1], [2].However, these techniques only focus on the signal processing at the transceiver to adaptive the changes of the wireless environments, but cannot eliminate the negative effects caused by the uncontrollable electromagnetic wave propagation environments [3], [4].Meanwhile, recently, a new technology following the development of the Micro-Electro-Mechanical Systems (MEMS) named as intelligent reflecting surfaces (IRS) has been proposed, which can reconfigure the wireless propagation environment via software-controlled reflection [3]- [5] and shows tremendous potentials in enhancing the wireless communication performance, such as the transmission rate and security, with low cost and significant performance gain, and has received considerable attentions.
One the one hand, for the IRS assisted wireless communications, in [6], the problem of jointly optimizing the access point (AP) active beamforming and IRS passive beamforming with AP transmission power constraint to maximize the received signal power for one pair of transceivers was discussed.Based on the semidefinite relaxation and the alternate optimization, both the centralized algorithm and distributed algorithm were proposed therein.The work [7] extended the previous work to the multi-users scenario but with the individual signal-to-noise ratio (SNR) constraints, where the joint optimization of the AP active beamforming and IRS passive beamforming was discussed to minimize the total AP transmission power, and two suboptimal algorithms with different performance-complexity tradeoff were presented.Huang et al. considered the IRSbased multiple-input single-output (MISO) downlink multi-user communications for an outdoor environment, where [8] studied optimizing the base station (BS) transmission power and IRS phase shift with BS transmission power constraint and user signal-to-interference-and-noise-ratio (SINR) constraint to maximize sum system rate.Since the formulated resource allocation problem is non-convex, Majorization-Minimization (MM) and alternating optimization (AO) was jointly used, and the convergence of this algorithm was analyzed.Different from the continuous phase shift assumption of the IRS reflecting elements in existing studies, [9] considered that each IRS reflecting element can only achieve discrete phase shift and the joint optimization of the multiantenna AP beamforming and IRS discrete phase shift was discussed under the same scenario as [6].Then the performance loss caused by the IRS discrete phase shift was quantitatively analyzed via comparing with the IRS continuous phase shift.It is surprised that, the results have shown that as the number of IRS reflecting elements approaches infinity, the system can obtain the same square power gain as IRS with continuous phase shift, even based on 1-bit discrete phase shift.Furthermore, [10] and [11] discussed the joint AP power allocation and IRS phase-shift optimization to maximize system energy and spectrum efficiency, where the user has a minimum transmission rate constraint and the AP has a total transmit power constraint.Due to the presented problem is non-convex, the gradient descent based AP power allocation algorithm and fractional programming (FP) based IRS phase shift algorithm were proposed therein.For the IRS assisted wireless communication system, Han and Tang et al. [12] analyzed and obtained a compact approximation of system ergodic capacity and then, based on statistical channel information and approximate traversal capacity, the optimal IRS phase shift was proved.The authors also derived the required quantized bits of the IRS discrete phase shift system to obtain an acceptable ergodic capacity degradation.In [13], a new IRS hardware architecture was presented and then, based on compressed sensing and deep learning, two reflection beamforming methods were proposed with different algorithm complexity and channel estimation training overhead.Similar to [13], Huang and Debbah et al. [14] proposed a deep learning based algorithm to maximize the received signal strength for IRS-assisted indoor wireless communication environment.Some recently studies about the IRS assisted wireless communications could be found in [15]- [18], and they were focused on the IRS assisted millimeter band or non-orthogonal multiple access (NOMA) based wireless communications.
On the other hand, for the IRS assisted secure wireless communications, in [19], the authors studied the problem in jointly optimizing the beamforming at the transmitter and the IRS phase shifts to maximize the system secrecy rate, based on the block coordinate descent (BCD) and the MM techniques, two suboptimal algorithms were proposed to solve the resulted non-convex optimization problem for small-and large-scale IRS, respectively.In [20], Chen and Liang studied the minimum-secrecy-rate maximizing problem for a downlink MISO broadcast system, based on the AO and the path-following (PF) algorithm, an iterative algorithm was proposed for the joint optimization problem.In addition, the authors also extended the proposed approach to the case with discrete reflecting coefficients at the IRS.To maximize the MISO system secrecy rate subject to the source transmit power constraint and the unit modulus constraints imposed on the phase shifts at the IRS, [21] proposed an AO algorithm for the scenario that the eavesdropper is configured with single antenna, then the study was extended to the scenario where the eavesdropper is equipped with multiple antennas.[22] investigated the secure transmission framework with an IRS to minimize the system energy consumption in cases of rank-one and full-rank AP-IRS links.In particular, since the beamforming vector and phase shift design are independent in the rank-one channel model, thus a closed-form expression of beamforming vector was derived.However, since beamforming and phase shift depend on each other in the full-rank model, then an eigenvalue-based algorithm for conventional wiretap channel was used to obtain beamforming vector.Different from [19]- [22], [23] considered the scenario that the eavesdropping channel is stronger than the legitimate channel and they are also highly correlated in space, then to maximize the secrecy rate of the legitimate communication link, an algorithm based on the AO and semidefinite relaxation was proposed.Moreover, in [24] and [25], for the IRS assisted MISO secure communications with AN transmission at the transmitter, an alternate optimization algorithm to jointly optimize active beamforming, AN interference vector and reflection beamforming with the goal of maximizing system secrecy rate was presented.The difference between these two papers is that, [24] focused on the scenario with a single legitimate user and multiple eavesdroppers, while [25] considered the scenario with multiple legitimate users but single eavesdropper.
Although lots of research works have been done for the IRS assisted secure communications, they all have assumed that the legitimate receiver is equipped with only one antenna [19]- [25].
However, in order to further improve the communication performance of the mobile users in the next generation wireless local networks (WLANs) such as the IEEE 802.11ax, or the fifth generation (5G) mobile communication networks, multi-antenna enabled mobile device designs have been widely adopted in the current mobile terminals, such as the Phones, laptops and the tablets.Therefore, it is necessary to study the IRS assisted secure communications with multiple-transmit and multiple-receive antennas enabled networks.In this paper, IRS assisted secure communications with multiple-transmit and multiple-receive antennas are studied, where, an AP equipped with multiple antennas has the secure communications demands with a multipleantennas enabled legitimate user in the downlink at the present of an eavesdropper configured with multiple antennas, referring to it as the IRS assisted multi-input, multi-output, multi-eavesdropper (IRS-MIMOME) system.Particularly, we discuss the joint optimization of the transmit covariance matrix at the AP and the reflecting coefficients at the IRS to maximize the secrecy rate for the IRS-MIMOME system, with two different assumptions on the phase shifting capabilities at the IRS, i.e., the IRS has the continuous reflecting coefficients and the IRS has the discrete reflecting coefficients.For the former case, due to the non-convexity of the formulated problem, an AO based algorithm is proposed, i.e., for given the reflecting coefficients at the IRS, the successive convex approximation (SCA)-based algorithm is used to solve the transmit covariance matrix optimization, while given the transmit covariance matrix at the AP, alternative optimization is used again in the individually optimizing of each reflecting coefficient at the IRS with fixing the other reflecting coefficients.For the individual reflecting coefficient optimization, the close-form or an interval of the optimal solution is provided.Then, the overall algorithm was extended to the discrete reflecting coefficient model at the IRS.Finally, some numerical simulations have been done to demonstrate the performance of the proposed algorithms.
The rest parts of this paper are organized as follows.In Section II, the system model and the considered optimization problem are presented.In Section III, we discuss and solve the formulated optimization problem, and an AO based algorithm is proposed.The simulation results are presented in Section IV and then we conclude this paper.
Notation: We use uppercase boldface letters for matrices and lowercase boldface letters for vectors.p‚q T , p‚q ˚, and p‚q H denote the transpose, conjugate, and conjugate transpose, respectively.T rp‚q and Et‚u stand for the trace of a matrix and the statistical expectation for random variables, respectively.A ě 0 and A ą 0 indicate that A are positive semidefinite and positive definite matrix.I and p‚q ´1 denote the identity matrix with appropriate size and the inverse of a matrix, respectively.| ‚ |, argp‚q and t‚u stand for the absolute value, the argument and the real part of a complex number, respectively, whereas detpAq denotes the determinant of A. The notation diagp‚q represents a diagonal matrix where the diagonal elements are from a vector, and r‚s `represents maxp0, ‚q.

II. SYSTEM MODEL AND THE PROBLEM
In this section, firstly, we present the system model of the IRS assisted secure communications with multiple antennas at both the legitimate transceiver and the eavesdropper, referring to it as the IRS-MIMOME system.Then, we illustrate the IRS reflecting model and signal model for our considered system.Finally, we formulate the discussed optimization problem.

A. System Model
Consider the IRS assisted MIMOME system, as shown in Fig. 1, where an AP equipped with N T antennas serves a legitimate user at the present of an eavesdropper.Both the legitimate user and the eavesdropper are equipped with multi-antenna and the number of the antennas at these two users are N R and N E , respectively.In addition, an IRS composed of M passive elements is installed on a surrounding wall to assist the secure communications between the AP and the legitimate user.The IRS has a smart controller, who has the capability of dynamically adjusting the phase shift of each reflecting element based on the propagation environment learned through periodic sensing [6].In particular, the IRS controller coordinates the switching between two working modes, i.e., receiving mode for environment sensing (e.g., channel state information (CSI) estimation) and reflecting mode for scattering the incident signals from the AP [26].

B. IRS Reflecting Coefficient Model
Following [27], the phase shift matrix of the IRS can be defined as Θ " diagpθq P C M ˆM , where θ " rθ 1 , θ 2 , ¨¨¨, θ M s T P C M ˆ1 and θ m P Φ for 1 ď m ď M , and diagp‚q 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, two different sets of reflecting coefficients are considered as below.
1) Continuous Reflecting Coefficients: That is, the reflecting coefficient with the constant amplitude and continuous phase shift is characterized as 2) Discrete Reflecting Coefficients: In this model, the reflecting coefficient has constant amplitude but discrete phase shift and is defined as where Q is the number of quantized reflection coefficient values of the element of the IRS.
Note that, due to the limitations of the hardware, the realization of the continuous reflecting model Φ 1 is difficult or even impossible [20].Therefore, the discrete model Φ 2 is more practical from the perspective of application.However, the continuous reflecting model is still discussed herein for the obtained performance can be regarded as the upper bound of the system.
Furthermore, our algorithm for the discrete model is based on the algorithm of the continuous model.

C. Signal Model
For our considered system, as [6], the signals that are reflected by the IRS multi-times are ignored due to significant path loss.Therefore, combined with IRS reflecting coefficient model, the signals received at the legitimate user and the eavesdropper can be expressed as where H T R P C N R ˆNT and H T E P C N E ˆNT represent the complex baseband channels from AP to the legitimate user and the eavesdropper, respectively, H SR P C N R ˆM and H SE P C N E ˆM denote the complex baseband channels from the IRS to the legitimate user and the eavesdropper, respectively, and H T S P C M ˆNT defines the complex baseband channel from AP to the IRS.
G T R pΘq " H T R `HSR ΘH T S and G T E pΘq " H T E `HSE ΘH T S are used to characterize the equivalent channel from AP to the legitimate user and the eavesdropper, respectively.n R " CN p0, σ 2 R I N R q and n E " CN p0, σ 2 E I N E q denote the independent circularly symmetric complex Gaussian (CSCG) noise vectors at the legitimate user and the eavesdropper, respectively.In which, σ 2 R and σ 2 E denote the average noise power at the legitimate user and the eavesdropper, respectively.I N R and I N E represent the identity matrix with N R ˆNR and N E ˆNE dimensions, respectively.As in [28], the quasi-static flat-fading channel model is adopted herein and all the CSI are perfectly known at the AP.
For the above established IRS-MIMOME system, following [29], [30] and [31], we know that its achievable secrecy rate is where rxs `" max p0, xq.And R R and R E represent the achievable transmission rates from AP to the legitimate user and from AP to the eavesdropper, respectively, and they are defined as follows, where is the transmit signal covariance matrix at the AP and Q s ě 0.
Hence, the achievable secrecy rate for the legitimate user is characterized by Note that dropping the operator r‚s `has no impact on the optimization of the secrecy rate, thus this operator is removed in the sequel analysis.

D. Problem Formulation
As mentioned earlier, in this paper, we discuss the joint optimization of the transmit covariance matrix at the AP and the reflection coefficients at the IRS to maximize the system secrecy rate subjected to the transmit power constraint at the AP and the reflection coefficient constraint at the IRS.Thus we have the following optimization problem OP1, In which, C1 characterizes the total transmit power constraint at the AP, C2 defines the positive semi-define constraint on transmit covariance matrix, and C3 represents the IRS reflecting coefficient model.It is obvious that OP1 is a non-convex nonlinear programming with nonconvex objective function and the uni-modular constraint on each reflection coefficient θ m , which makes it difficult to be solved.Therefore, in the sequel, we pursue the suboptimal approach to handle OP1.

III. ALTERNATING OPTIMIZATION BASED JOINT OPTIMIZATION ALGORITHM
In this section, a suboptimal algorithm is proposed to solve OP1.As aforementioned that, our formulated problem OP1 is a non-convex nonlinear programming.However, our analysis indicates that, given the reflecting coefficients at the IRS and by leveraging the SCA [32], a convex approach can be used to solve the transmit covariance matrix optimization at the AP, while for given the transmit covariance matrix at the AP, we can use the alternative optimization to find the suboptimal solution for the reflecting coefficients at the IRS.Based on that, we present an alternative suboptimal algorithm for OP1.In addition, we also discuss the extension of the algorithm to the case with discrete reflecting coefficients at the IRS at the end of this section.

A. Optimization of the transmit covariance matrix
In this subsection, we discuss the transmit covariance matrix optimization at the AP for given the reflecting coefficients at the IRS.Hence, we have the following problem OP2, Herein, given the reflection coefficient matrix Θ at the IRS, G T R pΘq and G T E pΘq are simplistically denoted as G T R and G T E , respectively.One may note that, now, the formulated problem OP2 is the secrecy rate maximization problem for the MIMOME system which has been discussed in [32], [33] and [34], and various algorithms have been proposed therein.In this paper, following [32], the SCA-based suboptimal algorithm is used to handle OP2.And the key point is to obtain a tight concave lower bound of R sec pQ s q, which can be achieved by retaining the concave part R R pQ s q in (10) and linearizing the concave function R E pQ s q [35], [36].That is, at Qs , we have the concave approximation of R sec pQ s q as follows, where W E, Qs " Based on the above approximation and given Qs , the problem OP2 can be transformed into the following formulation, Then this problem is convex and can be easily solved using standard interior-point methods [32].
That is, the KarushCKuhnCTucker (KKT) conditions [37] for the above convex approximation problem are, namely, Herein, W R " . λ ě 0 and Z ě 0 are the dual variables associated with the transmission power constraint and the positive semi-definite constraint on the Q s , respectively.
Correspondingly, the Lagrangian function of ( 12) can be written as L pQ s , λ, Zq " ´R sec `λ rT r pQ s q ´Pmax s ´T r rZQ s s Since problem ( 12) is convex and satisfies the Slater's condition, the duality gap is zero between (12) and its dual problem.Thus, the optimal solution of ( 12) can be determined via solving the following Lagrange dual problem Herein, To sum up, we have the SCA based suboptimal algorithm for OP2 which is summarized as the Algorithm 1 as below.To meet the transmission power constraint at the AP and the positive semi-definite constraint of the transmit covariance matrix Q s at the beginning of the algorithm, we set Qs " pP max {N T q I N T .

B. Optimize the IRS reflecting coefficients
In this subsection, given the transmit covariance matrix Q s at the AP, the optimization the reflecting coefficient matrix Θ at IRS with the continuous model is discussed.Particularly, we have the following problem OP3.
It is obvious that OP3 is a non-convex programming with both non-convex constraints and nonconcave objective function, which makes it is difficult to be solved.However, we prove that, given tθ i u M i"1,i‰m , the formulated optimization problem with respect to θ m can be solved with the close-form optimal solution or to have an interval about the optimal solution.Therefore, the alternative optimization approach is used here again to solve OP3, i.e., we alternatively solve OP3 in variable θ m with given θ i , i " 1, ..., M, i ‰ m until the procedure is converged.The details are illustrated as follows.
1) Objective function transformation: In order to use the alternative optimization approach to solve OP3, we should first make an objective function transformation for OP3.Note that, the relationship of the objective function with tθ m u M m"1 is rather implicit.Thus, we rewrite the objective function as an explicit function over θ m , @m.That is [38], Herein, let are unitary matrix and diagonal matrix, respectively, and all the diagonal elements in Σ Q are non-negative real numbers.Also, in (18), we define h SE,m P C N E ˆ1, h T S,m P C N T ˆ1, m " 1, 2, ...M .Now, R sec is represented in an explicit form of the reflection coefficients tθ m u M m"1 .Therefore, given Q s and tθ i u M i"1,i‰m , R sec can be rewritten as a function of θ m as, where, We denote ĤR " and A E,m are the sum of identity matrix and the two positive semi-define matrixes, thus we have A R,m ą 0, A E,m ą 0, rank pA R,m q " N R and rank pA E,m q " N E .Moreover, for B R,m and B E,m we have rank pB R,m q ď rank ´hSR,m h H T S,m ¯ď 1 and rank pB E,m q ď rank ´hSE,m h H T S,m ¯ď 1, respectively.Therefore, R sec pθ m q can be rewritten as Hence, the maximization of R sec is equivalent to maximize the R sec , namely, Herein, R R pθ m q " log 2 detpI N R `θm J R `θm J H R q and R E pθ m q " log 2 detpI N E `θm J E `θm J H E q.In addition, due to both A R,m and A E,m are full-rank, we have rank pJ R q " rank pB R,m q ď 1 and rank pJ E q " rank pB E,m q ď 1.
2) Deriving the tractable expressions for R R pθ m q and R E pθ m q [38]: Following the above, herein, according to the value of rank pJ R q (or rank pJ E q), i.e., rank pJ R q " 1 (rank pJ E q " 1) or rank pJ R q " 0 (rank pJ E q " 0), we separately derive the tractable expressions of R R pθ m q and R E pθ m q which are then used to analyze the corresponding optimal solution of θ m .
Case rank pJ R q " 1: At first, we present a lemma as below.
Lemma 1 ( [38]): J R is diagonalizable if and only if T r pJ R q ‰ 0 .
Based on the Lemma 1, then we can derive the expression of R R pθ m q under T r pJ R q " 0 and T r pJ R q ‰ 0, separately.
Hence, the expression of R R pθ m q can be transformed into in which, the last equation is hold with , where, U R,m P C N R ˆNR and Σ R,m " diag tλ R,m , 0, ..., 0u with λ R,m denoting the sole non-zero eigenvalue and the first row of V R,m .Note that it follows that v T R,m v R,m " 1; moreover, let v R,m1 and v R,m1 denote the first element in v R,m and v T R,m , respectively, we have v R,m1 v R,m1 P R since both V R,m and V ´1 R,m are Hermitian matrices.Hence, R R pθ m q can be further simplified as [38], Case rank pJ E q " 1: Similarly, if T r pJ E q " 0, we have And if T r pJ E q ‰ 0, the EVD of J E can be expressed as , where, U E,m P C N E ˆNE and Σ E,m " diag tλ E,m , 0, ..., 0u with λ E,m denoting the sole non-zero the first column of V ´1 E,m and the first row of V E,m and let v E,m1 and v E,m1 denote the first element in v E,m and v T E,m , respectively.Hence, R E pθ m q can be further simplified as, Case rankpJ R q " 0 or rankpJ E q " 0: In fact, if rankpJ R q " 0, we always have J R " 0 and " 0, which is equivalent to the case T r pJ R q " 0 under rank pJ R q " 1.Similarly, the case rank pJ E q " 0 is equivalent to the case T r pJ E q " 0 under rank pJ E q " 1.Therefore, no matter whether rankpJ R q " 1 or rankpJ R q " 0 (rankpJ E q " 1 or rankpJ E q " 0), a tractable expression of R R pθ m q (R E pθ m q) only depends on the value of T rpJ R q (T rpJ E q), i.e., T rpJ R q " 0 or T rpJ R q ‰ 0 (T rpJ E q " 0 or T rpJ E q ‰ 0).
3) Solving problem (22): Based on the deriving of the tractable expressions for R R pθ m q and R E pθ m q, we know that problem (22) should be discussed and solved by considering four different conditions, i.e., T rpJ R q " 0 and T rpJ E q " 0, T rpJ R q ‰ 0 and T rpJ E q " 0, T rpJ R q " 0 and T rpJ E q ‰ 0, and T rpJ R q ‰ 0 and T rpJ E q ‰ 0, as follows.
Case T r pJ R q " T r pJ E q " 0: Namely, both J R and J E are non-diagonalizable.In this case, R sec pθ m q is defined as That is, R sec pθ m q is independent of θ m .Hence, we can directly obtain the optimal solution for (22) and it is characterized by the following proposition.Since the proof is simply thus it is omitted here for simplification.
Proposition 2: If T r pJ R q " T r pJ E q " 0, any θ m with |θ m | " 1 is the optimal solution for (22) and the corresponding optimal value is Case T r pJ R q ‰ 0 and T r pJ E q " 0: Namely, J R is diagonalizable and J E is non-diagonalizable.
In this case, R sec pθ m q is denoted as Now, for problem (22), maximizing R sec pθ m q is equivalent to maximize tθ m λ E,m u in (28) and the corresponding optimal solution can be characterized by the following Proposition 3.
Proposition 3: If T r pJ R q ‰ 0 and T r pJ E q " 0, the optimal solution to ( 22) is θm " e ´j argpλ R,mq , and the corresponding optimal value is Proof: The proof is provided in Appendix A.
Case T r pJ R q " 0 and T r pJ E q ‰ 0: Namely, J R is non-diagonalizable and Now, for problem (22), maximizing R sec pθ m q is equivalent to minimize tθ m λ E,m u in ( 29) and the corresponding optimal solution can be characterized by the following Proposition 4.
Proposition 4: If T r pJ R q " 0 and T r pJ E q ‰ 0, the optimal solution for ( 22) is θm " e jpπ´argpλ E,mqq , and the corresponding optimal value is Case T r pJ R q ‰ 0 and T r pJ E q ‰ 0: Namely, both J R and J E are diagonalizable.Before presenting the optimal solution conclusion for this case, we firstly introduce a lemma as below.
Proof: The proof is provided in Appendix C.

Based on the Lemma 5, let α
Now, for problem (22), maximizing R sec pθ m q is equivalent to maximize f pϕ m q.Moreover, in (30), we have Hence, the corresponding optimal solution can be characterized by the Proposition 6 as below and the proof is omitted for it can be easily proved from the Lemma 5.
In which, mod px, yq represents the remainder of variable x over y.
Based on the Proposition 6, we can then perform the linear search to obtain the optimal solution for problem (22) under the condition T r pJ R q ‰ 0 and T r pJ E q ‰ 0.
To summarize the above analysis, for problem (22), its optimal solution can be characterized as below where θ m is obtained by linear search.Therefore, we formulate the algorithm for OP3 as below, i.e., the Algorithm 2. , n " n `1, go back to S2; else set denotes the solution obtained in the nth iteration.The core idea of the algorithm is that, we alternatively optimize θ m for given θ i , i " 1, ..., M, i ‰ m.In addition, the optimization of θ m is following the rule of (31).Furthermore, since the original problem is bounded and the progress of the alternative optimization is monotonically non-decreasing, thus the above algorithm is surely convergent.

C. Overall Algorithm
In this subsection, the overall algorithm for OP1 is provided.As mentioned, the algorithm is based on alternating optimization, which optimize the objective function with respect to different subsets of optimization variables in each iteration while the other subsets are fixed.Therefore, it is summarized as the Algorithm 3 as follows.with Qn s by Algorithm 2; S4: and Qs " Qn s ; and Qs.
where Qn s and denote the stationary points obtained by the Algorithm 1 and Algorithm 2 in the nth iteration of the Algorithm 3, respectively.The procedures of the algorithm are as follows: firstly, we randomly generate a set of tθ 0 m u M m"1 with |θ 0 m | " 1, @m and the phases of θ 0 m are following the uniform distribution over r0, 2πq.Secondly, for given the reflecting coefficients at the IRS and based on the Algorithm 1, we optimize the transmit covariance matrix at the AP.
Thirdly, with the optimized transmit covariance matrix at the AP and based on the Algorithm 2, we optimize the reflecting coefficients at the IRS.Finally, the above two steps are iteratively performed until it is converged.Apparently, duo to the monotonic non-decreasing properties of the Algorithm 1 and the Algorithm 2, and also the objective function in OP1 is bounded, then the overall algorithm is surly converged.

D. Extended to discrete model
In the previous discussion, we assume that the phase of IRS reflecting element is continuously adjustable, which is too ideal to achieve in practical.And existing studies showed that [3], [20], the IRS only can adjust the phase with limited accuracy due to the hardware limitations.To ensure the practicability of the proposed algorithm in more practical application scenarios, the IRS discrete reflecting coefficient model is discussed briefly.In particular, replacing the Φ 1 with Φ 2 in OP1, which formulates the problem OP4 as below.
Note that, OP4 belongs to the mixed integer nonlinear programming (MINLP), which is an NP-hard problem and difficult to handle.Hence, the heuristic projection method is used here to solve this problem [20].That is, we denote the solution of IRS reflecting coefficients for OP1 and OP4 are v s " rθ s,1 , θ s,2 , ..., θ s,M s and v d " rθ d,1 , θ d,2 , ..., θ d,M s, respectively.Then v d is provided by Therefore, we obtain the suboptimal algorithm for the discrete model, i.e., solving the OP4.
In fact, the algorithm for OP4 is the same as that for OP1, i.e., the Algorithm 3, except that right now, after the Algorithm 3 is convergent, we have to perform the projection operation via following (33) to obtain the achievable discrete IRS reflecting coefficients.

IV. SIMULATION ANALYSIS
In this section, the performance of the proposed algorithms are evaluated by numerical simulation.Considering two scenarios, they are, the strength of legitimate channel is superior or inferior to the eavesdropping channel.In the former case, the AP, legitimate user, eavesdropper and the IRS are located at (0, 0), (45, 0), (55, 0) and (50, 5) in meter (m) in a two-dimensional plane, respectively.And the latter exchanges the coordinates of the legitimate user with the eavesdropper.The other system parameters used in the simulations are following [39] and [40], that is, we set the antenna number of all nodes as 4, namely, N T " N R " N E " 4. The noise power at both the legitimate receiver and the eavesdropper is set as σ 2 R " σ 2 E " ´40dBm and the maximum total transmitted power is set as P max " 30dBm.Without loss of generality, all the channels are modeled as where κ is the Rician factor, while H LOS and H N LOS represent the deterministic line-of-sight (LoS) and Rayleigh fading/non-LoS (NLoS) components, respectively.β represents the path loss, and is given by β " β 0 ´10αlog 10 pd{d 0 q.Herein, β 0 denotes the path loss at the reference distance d 0 " 1m, α and d represent the path loss exponent and the distance between the corresponding nodes, e.g., between AP and the IRS, or between AP and the legitimate user.
Similarly to [24], we assume that the channels from IRS to legitimate user and the eavesdropper have LoS component and experience Rayleigh fading, simultaneously, however, the channels from AP to legitimate user, eavesdropper and IRS, only experience Rayleigh fading.Hence, the Rician factors are set as κ SR " κ SE " 1 and κ T R " κ T E " κ T S " 0. In addition, path loss exponents of all channels are set as α T R " α T E " α T S " α SR " α SE " 2.
Furthermore, in order to better understand the positive effects of the IRS in improving the secure communication performance for the MIMOME system and the performance gain of the proposed algorithms, some benchmark schemes are introduced in the simulation based performance comparison and analysis, thus we have the following four algorithms, i.e., no-IRS, random-IRS, AO-based-IRS with Q " 2 (or 8, 32) and the AO-based-IRS continues.
no-IRS: That is, no IRS is used in the system and the secrecy rate is obtained by directly optimizing (9) under the conditions G T R pΘq " H T R and G T E pΘq " H T E .
random-IRS: That is, the reflecting coefficients of the IRS are randomly generated via following the rules that |θ m | " 1, m " 1, .., M and θ m follows an independent uniform distribution over r0, 2πq. is superior to the eavesdropper channel (from AP to the eavesdropper), the achievable secrecy rate of different algorithms are evaluated by varying the available transmission power constraint at the AP, i.e., the P max P r0.2, 2sW and M " 20, and the result is shown in Fig. 2. One can note that, with the increase of the available transmission power at the AP, the achievable secrecy rates for all these algorithms are increased.This phenomenon is reasonable and it is consistent with the traditional MIMOME system [32]- [34].In addition, we note that among these algorithms, as expected, the algorithm 'AO-based-IRS continues' obtains the best secrecy rate performance, then are those AO-based algorithm for IRS but with different quantization accuracy about the reflecting coefficients, i.e., 'AO-based-IRS with Q " 2', 'AO-based-IRS with Q " 8' and 'AO-based-IRS with Q " 32', and the algorithm 'no-IRS' and 'random-IRS' obtain the worst performance and are pretty close.Moreover, one can note that, on the one hand, with the increasing of the available transmission power at the AP, the performance gap between the algorithm 'AO-based-IRS with Q " x' and the algorithm 'AO-based-IRS continues' becomes larger, one the other hand, through increasing the quantization accuracy of the reflecting coefficients at the IRS, the performance gap between the algorithm 'AO-based-IRS with Q " x' and the algorithm 'AO-based-IRS continues' could be significantly reduced.It is indicated that taking Q " 8 is sufficient for the system to obtain an acceptable secrecy rate with ignorable performance loss, i.e., less than 0.02bits{s{Hz even at P max " 2W , via comparing with the algorithm 'AO-based-IRS continues'.Therefore, in the following, for the algorithm 'AO-based-IRS with Q " x', we only consider the case Q " 8.Then, with the same simulation parameters but under the condition that the legitimate channel is inferior to the eavesdropper channel, the achievable secrecy rate of different algorithms are evaluated again through changing the available transmission power constraint at the AP and the result is shown in Fig. 3.We can observe that, as expected, all the algorithms' obtained average secrecy rate is significantly reduced, however, the tendencies of the secrecy rate performance obtained by these algorithms are the same as that the legitimate channel is superior to the eavesdropper channel shown in Fig. 2, i.e., the algorithm 'AO-based-IRS continues' obtains the largest secrecy rate, then it is the algorithm 'AO-based-IRS with Q " 8', and still the algorithm 'no-IRS' and 'random-IRS' have the similar performance with the least secrecy rate.
In Fig. 4, we further analyze how the system achievable secrecy rate performance is affected by the number of IRS elements in the system, i.e., from M " 10 to 50.Herein, still based This increment comes from the factor more IRS elements in the system, more signal paths and energy could be reflected by the IRS to enhance the signal quality at the legitimate user but to reduce the signal quality at the eavesdropper.In addition, as expected, the performance of the algorithm 'no-IRS' and 'random-IRS' are not affected by the number of the IRS elements in the system.
Finally, in Fig. 5, the system achievable secrecy rate performance of the proposed algorithms are evaluated through changing the number of the legitimate receiving antennas, i.e., from N R " 3 to 10, with given N T " 10 and N E " 6.As expected, with the increase of the number of the legitimate receiving antennas, the secrecy rate of all the algorithm are increased.This phenomenon comes from the following fact: the increase of the number of the legitimate receiving antennas can bring greater spatial diversity gain to the legitimate user, moreover, the rate of the legitimate user is increasing, as a result, the secrecy rate is increasing simultaneously.In addition,  is quite close, as well as the performance of the algorithms 'no-IRS' and 'random-IRS', which further verifies the above conclusion.

V. CONCLUSION
In this paper, the joint optimization of the transmit covariance matrix at the AP and the reflecting coefficients at the IRS to maximize the secrecy rate for the IRS-MIMOME system has been proposed and solved, with two different assumptions on the phase shifting capabilities at the IRS, i.e., the IRS has the continuous reflecting coefficients and the IRS has the discrete reflecting coefficients.For the former, due to the non-convexity of the formulated problem, an AO based algorithm has been proposed, i.e., for given the reflecting coefficients at the IRS, the SCA-based algorithm has been used to solve the transmit covariance matrix optimization, while given the transmit covariance matrix at the AP, alternative optimization has been used again in individually optimizing of each reflecting coefficient (i.e., θ m ) at the IRS with the fixed of the other reflecting coefficients (i.e., θ i , i " 1, ..., M, i ‰ m).For the individual reflecting coefficient optimization, the close-form or an interval of the optimal solution has been provided.
Then, the overall algorithm has been extended to the discrete reflecting coefficient model at the IRS.Finally, from the numerical simulation evaluation, we have demonstrated that the proposed AO-based algorithm outperforms the other benchmark schemes.It has been also indicated that, for the IRS-MIMOME system, for practical IRS system with the discrete reflecting coefficient, taking Q " 8 is sufficient for the system to experience less than 0.02bits{s{Hz performance loss even at P max " 2W and with more than 20 IRS elements.
It is important to note that, in this paper, only one legitimate user and one eavesdropper are considered in the system, in the future, the more practical scenario with multiple legitimate users and multiple eavesdroppers would be concerned.In addition, in the system, the AP may use the AN to further improve the secrecy rate performance for the legitimate users.It is interesting and worth further studying the transmission strategies for these systems.
APPENDIX A PROOF OF PROPOSITION 3 Proof: Since T r pJ R q ‰ 0 and T r pJ E q " 0, then the objective function in ( 22) is transformed to (28) and the problem is equivalent to maximize tθ m λ E,m u in (28).In addition, only if θm " e ´j argpλ R,mq , thus we have the optimal solution conclusion for (22).Furthermore, the corresponding optimal value can be obtained by substituting θm " e ´j argpλ R,mq into (21).
That is, we have the proposition.

APPENDIX B
PROOF OF PROPOSITION 4 Proof: Since T r pJ R q " 0 and T r pJ E q ‰ 0, then the objective function in if θm " e jpπ´argpλ E,mqq , thus we have the optimal solution conclusion for (22).Furthermore, the corresponding optimal value can be obtained by substituting θm " e jpπ´argpλ E,mqq into (21).
Therefore, we have this proposition.

APPENDIX C
PROOF OF LEMMA 5 Proof: Herein, for the Lemma 5, we only present the proof of the conclusion (i) and the conclusion (ii) could be proved in the same manner thus it is omitted here for simplification.At first, we have f pxq " a `b cos x c `d cospx `ωq , x P r0, 2πq Since a ą b ą 0, c ą d ą 0 and ω P r0, πq, we know that f 1 pxq " a `b cos x takes extremum at x " 0, π, 2π and f 2 pxq " c `d cospx `ωq takes extremum at x " π ´ω, 2π ´ω over x P r0, 2πq.
Case @x P D 2 : Let x1 " π ´ω P D 1 , then for ω P r0, πq we always have cos x ă cos x1 and cospx `ωq ą cospx 1 `ωq, due to a ą b ą 0 and c ą d ą 0, then from the definition of f pxq we know that f pxq ă f px 1 q.
Case @x P D 3 Ť D 4 : Let x2 " 2π ´x P r0, πs, then for ω P r0, πq we always have cos x " cos x2 and cospx `ωq ą cospx 2 `ωq due to cos x " cos x2 and sin x ă sin x2 ; also since a ą b ą 0 and c ą d ą 0, then we have f pxq ă f px 2 q from the definition of f pxq.
To sum up the case @x P D 2 and case @x P D 3 Ť D 4 , we have the conclusion that the optimal solution x P D 1 .Therefore, the conclusion (i) of the Lemma 5 is proved and in the same manner, we can also prove the conclusion (ii) of the Lemma 5. Finally, we have the Lemma 5.

Fig. 4
Fig. 4 Average secrecy rate VS number of IRS elements

Fig. 5
Fig. 5 Average secrecy rate VS number of legitimate receiving antennas tθ m λ R,m u ď |θ m λ R,m | " |θ m | |λ R,m | " |λ R,m |,and the inequality holds with equality if and (22) is transformed to(29) and the problem is equivalent to minimize tθ m λ E,m u in(29).Sincetθ m λ E,m u ě ´|θ m λ E,m | " ´|θ m | |λ E,m | " ´|λ E,m |, where the inequality holds with equality if and only AO-based-IRS with Q " 2 (or 8, 32): It is based on the Algorithm 3, except that right now, the reflecting coefficients can only take finitely discrete value and Q determines the number of quantized reflection coefficient values of the IRS elements, i.e., Q " 2, 8 or 32.Average secrecy rate VS P max (superior) At first, under the condition that the legitimate user channel (from AP to the legitimate user)