# Optimal Element Allocation for RIS-Aided Physical Layer Security

Authors: Ying Zhang; Guoan Zhang; Siyu Chen; Jaeho Choi; Pin-Han Ho
Journal: Wireless Communications and Mobile Computing
 (2022)

---

## Abstract

In this paper, we investigate an innovative physical layer security (PLS) scheme for an uncertain reconfigurable intelligent surface- (RIS-) assisted communication system under eavesdropping attack. Specifically, in our proposed system, we consider that the uncertain RIS is known to the legitimate user while not to the eavesdropper (Eve). In this manner, the reflective elements of the uncertain RIS are adjusted to strengthen the keen signals for the legitimate user while suppressing the signals for Eve via jamming. We analyze the system by assuming legitimate and wiretap channels, respectively, where the secrecy capacity maximization problem is formulated and its exact closed-form expression is derived. Simulation results verifying the accuracy of our analysis demonstrate the validity and superiority of the uncertain RIS-assisted communication system against its counterparts.


---

## Body

## 1. Introduction

Due to the fast development of the mobile communication network, the continuous emergence of new services, and the fulminic growth of information interaction, the fifth-generation (5G) wireless communications are anticipated to provide massive data transmissions and wide-area coverage as a new type of communication network [1]. For the upcoming applications of 5G, future wireless communication systems are anticipated to support more efficient, lower latency, more reliable, and secure designs. With the rapid evolution of science, lots of technologies have been implemented in 5G communication network to satisfy its diverse application scenarios, e.g., multiple access technology [2], deep learning (DL) [3], and beamforming [4]. Meanwhile, due to the explosive growth of information dissemination and massive information interaction, public communication networks and private communication networks are often mixed, which makes information security issues more important [5].Physical layer security (PLS) enhancement has aroused extensive attentions in both industry and academia thanks to its superb capability of light-weight authentication on received signals against eavesdropping attacks [6]. Since the PLS takes advantage of the natural peculiarities and physical properties of propagation environment to promote the security performance of 5G communication network and secure the data transmission, it has attracted extensive attention in the academia and industry circles [7]. Several dimensions of designing PLS schemes have been identified in the literature, via nonorthogonal multiple access (NOMA) [8], artificial noise (AN), and cooperative interference [9]. Although effective, they may consume extra power and/or incur additional hardware cost, thus forming significant barriers in the real implementations.Fortunately, with the rapid evolution of metamaterial technology, a low cost and energy efficient device named reconfigurable intelligent surface (RIS) offers an available way to strengthen the PLS [10]. The RIS is an artificial electromagnetic surface consisting a great many cheap passive reflecting elements governed by a preprogrammed controller, which can skillfully change the amplitude and/or phase shift of arriving galvanomagnetic signals to make the direction and strength of the signal greatly controllable at the destination. Thus, the RIS cannot only strengthen the required signals and restrain the undesirable signals by befittingly tuning the phase shifts of all reflecting components but also effectively improves the radio transmission environment leading to the random channel state information (CSI) controllable [11, 12]. Therefore, it can be anticipated that the RIS will occupy an important position in the 5G wireless communication network [13].With such characteristics, RIS has recently been considered to enable the PLS of wireless communication system to promote the secrecy capacity [14–18]. In [14], the minimum secrecy rate maximization problem of one downlink multiple-input single-output (MISO) broadcasting communication model was formulated and optimized via alternating optimization (AO) and path tracing algorithm. The authors in [15] introduced an RIS-based secure transmission framework aiming to obtain the minimum value of its communication network energy consumption within the scenarios of two different access point- (AP-) RIS channel models. In [16], the joint optimization of transmitter beamforming and RIS phase shifts by block coordinate descending (BCD) and majorization-minimization (MM) methods was studied to maximize the system security capacity for the secure wireless communication assisted with RIS. Cui et al. [17] considered a stronger eavesdropping channel than the legal one, where the AO and semidefinite relaxation (SDR) algorithms were explored to derive the maximum value of the security capacity in the secure wireless communication system. Wang et al. [18] investigated an RIS-aided MISO communication network with the unknown eavesdropping CSI, where the oblique manifold (OM) and MM algorithms were designed to promote the security of the communication network.Note that the above mentioned studies [14–18] simply focused their attention on one function of RIS, i.e., enhancing or jamming, but the unknown situation of RIS was not considered. This paper investigates RIS-assisted secure wireless communication with the main contributions listed as follows:
(i)
We propose a novel PLS communication system with an uncertain RIS aiming to enhance the secrecy rate, where the components of RIS are separated into two functional parts, one assisting the legitimate user and the other suppressing the achievable rate of eavesdropper as a jammer.(ii)
The optimal result of elements allocation for RIS is analyzed, and its exact closed-form expression is concluded to confirm the superiority of our proposed scheme.(iii)
Numerical results verifying the correctness of the derived expression show the advantage and validity of the designed scheme compared with its counterparts, especially under a great many reflecting elements.


## 2. System Model

An uncertain RIS-assisted secure communication system is considered, which consists of a source (S), a legitimate user (B), an eavesdropper (Eve), and an RIS, as depicted in Figure 1. To improve the secure wireless communication, the RIS with N reflecting elements is placed near by S, B, and Eve which are equipped with a single antenna. For the uncertain RIS, the size of each element is considered a lot smaller than the wavelength of RF signals resulting in that the reflecting element scatters the received signal in whole directions with approximately constant gain [19], and the phase shift of each passive units is controlled dynamically by RIS via an intelligent controller. It is also supposed that both S and B have the knowledge of the location information of RIS, while Eve is unable to acquire the location information of RIS, and that the CSI of the uncertain RIS is entirely known to S and B, but not for the Eve.Figure 1
The uncertain RIS-assisted PLS system.The direct links ofS⟶B and S⟶Eve are considered, which are expressed by hSB∈ℂ and hSE∈ℂ, respectively. Considering that the number of components is fixed to N, we divide the surface of RIS into two sectors, in which the one with η elements is used to serve as a jammer to Eve and the other with N−η elements is applied to promote the information signals from S to B via high-quality virtual links. The source transmits the signal to legitimate user via the RIS to promote the information transmission for the legitimate user, and the channel coefficients of the links S⟶RIS and RIS⟶B are expressed by hSR1∈ℂη×1 and hR1B∈ℂη×1, respectively. Since the eavesdropper attempts to wiretap the signal from S, it is assumed that the eavesdropper does not know the location of RIS, and hence, the reflected signals from RIS will be treated as jamming signals for the Eve, with the available links S⟶RIS and RIS⟶Eve denoted as hSR2∈ℂN−η×1 and hR2E∈ℂN−η×1, respectively. Furthermore, it is assumed that each channel of the system follows independent Rayleigh fading distribution. Thus, the received signals at B and Eve are separately expressed as
(1)yB=PhSB+hR1BHΘ1hSR1s+n1,(2)yE=PhSEs+PhR2EHΘ2hSR2s+n2,where s and P mean the data symbol and the transmit power for S and Es2=1. Θ1=αdiagejψ1,⋯,ejψN−η and α∈0,1 stand for the channel coefficient matrix of the RIS sector serving B and the amplitude of the reflection coefficient, where α=1 represents the lossless reflection; ψi∈0,2π is the phase-shift produced by the i-th element for i=1,⋯,N−η. Θ2=αdiagejϕ1,⋯,ejϕη stands for the channel coefficients matrix of the RIS sector allocated for Eve, ϕj∈0,2π is the phase-shift produced by the j-th element for j=1,⋯,η. In addition, n1 and n2~CN0,σ2 are the additive white Gaussian noise (AWGN).Since the signal from RIS will be treated as interference by the Eve because of the unknown CSI of RIS, the achievable SNR atB and SINR at Eve can be, respectively, obtained from
(3)γB=Pσ2hSB+hR1BHΘ1hSR12,(4)γE=PhSE2PhR2EHΘ2hSR22+σ2.For any givenΘ1 and Θ2, the data rate expressions for B and Eve can be achieved from the Shannon theory as RB=log21+γB and RE=log21+γE.From above observations, the secrecy capacity (SC) in our proposed scheme can be expressed as(5)CS=RB−RE+,where x+=max0,x. Considering that the deterministic channels for B and Eve are fully known for S, with the optimized phase shift variables, the SC optimization of the proposed uncertain RIS-assisted communication system is formulated as
(6a)P1:maxΘ1,Θ2CS,s.t.Θ1=diagejψ1,⋯,ejψN−η,(6b)ejψi=1,ψi∈0,2π,∀i∈1,N−η,Θ2=diagejϕ1,⋯,ejϕη,(6c)ejϕj=1,ϕj∈0,2π,∀j∈1,η.Clearly, it is quite challenging to solve this optimization problem straightforwardly. Thus, we turn to analyze its security performance with optimal elements allocation and derive the corresponding optimal solutions.


## 3. Performance Analysis

In the section, the optimization problem of maximizing SC for the proposed system is analyzed under the optimal elements allocation of RIS, and then we derive the optimal solution for such problem. Since the maximum SC must be nonnegative, the·+ operation can be omitted without loss of optimality. With the monotonic function log·, the objective function in P1 is reexpressed as
(7)R=maxΘ1,Θ21+γB1+γE.For simplicity, the reflective passive beamforming with perfect CSI of RIS is taken into account, and we also assume entire elements of the RIS are with the same reflection amplitude [20]. Thus, we have hR1BHΘ1hSR1=α∑i=1N−ηejψihSR1ihR1Bi and hR2EHΘ2hSR2=α∑j=1ηejϕjhSR2jhR2Ej. In the case that S knows the CSI of all channels completely, the optimal reflection phase shift can be obtained through channels. In addition, the optimal phase shift can be derived via the proposition as follows.Proposition 1.
The optimal RIS phase shift of the communication network is expressed as(8)θn=arghSU−arghSRnhRUn,n=1,⋯,N,where hSRn and hRUn represent the n-th element of hSR and hRU, respectively. hSU and hRU represent the links from BS and RIS to user, respectively, and arg· denotes the phase operator.Proof.
Note that the functionhSU+hRUHΘhSR2,U∈B,E can be rewritten as
(9)hSU+hRUHΘhSR2=hSU2+hRUHΘhSR2+2hRUHΘhSRhSUcosarghSU−arghRUHΘhSR,U∈B,E.
From Equation (9), it can be easily verified that hSU+hRUHΘhSR2 achieves its maximum value for cosarghSU−arghRUHΘhSR=1, which means that the phase shifts of both direct and cascaded links between the U and S are identical, i.e. arghSU=arghRUHΘhSR. Therefore, Equation (8) can be derived, which completes this proof.As a result, the maximum achievable SNR can be obtained if the phase shifts satisfyψi=arghSB−arghSR1ihR1Bi and ϕj=arghSE−arghSR2jhR2Ej, which means that the cascaded links via RIS are with the same phase as the corresponding direct links [21]. Therefore, we have
(10)γB=Pσ2hSB+α∑i=1N−ηhSR1ihR1Bi2,(11)γE=PhSE2Pα∑j=1ηhSR2jhR2Ej2+σ2.From Equations (10) and (11), it is easy to see that the SNR of B and SINR of Eve only rely on the amplitudes of the reflective elements, not on their phases. Therefore, we can reformulate the optimization problem as
(12a)P2:maxη1+γB1+γE,(12b)s.t.0≤η≤N.Clearly,P2 is nonconvex and hard to obtain its optimal result. Therefore, we turn to derive its closed form in an approximate way. Assuming the equivalent size for each RIS element, thus, it follows that all elements in hSR, hR1B, and hRE have the same magnitude, respectively. For brevity, we have hSB=βSB, hSE=βSE, 1/N−η∑i=1N−ηhSR1ihR1Bi=βRB, and 1/N∑j=1ηhSR2jhR2Ej=βRE. In addition, βRB=hSRhRB and βRE=hSRhRE, where hSR, hRB, and hRE are the channel coefficients of S, B, and Eve related to a single element of RIS, respectively [22]. It is known that, for a small number of components, the channel gain provided by RIS should be smaller than that of the direct channel. However, as the amount of reflective components grows, the channel gain provided by RIS significantly improves and becomes much larger than that of direct channel. Then, we can reformulate Equations (10) and (11) in the more compact forms as
(13)γB=Pσ2βSB+N−ηαβRB2,(14)γE=PβSEPα2βREη2+σ2.SinceγB≫1, letting 1+γB≈γB and with Equations (13) and (14), the secrecy capacity maximization problem can be obtained from
(15)γB1+γE=P/σ2βSB+N−ηαβRB21+PβSE/PβREα2η2+σ2=Pσ2αSB+N−ηαRB21−PαSE2PαSE2+PαRE2η2+σ2,where αSB=βSB, αRB=αβRB, αSE=βSE, and αRE=αβRE. Since the term P/σ2 has no influence on solving the optimization problem in Equation (15) and the approximation PαSE2+σE2≈PαSE2 holds due to PαSE2≫σE2, the above maximization problem can be simplified as
(16)Rη=αSB+αRBN−η21−αSE2αSE2+αRE2η2.Since the function in Equation (16) is continuous, we can derive the following expression by its first-derivations as
(17)∂Rη∂η=2αSE2αSB+αRBN−ηαSE2+αRE2η22αRBαSE2+αSB+NαRBαRE2η−2αRBαSB+αRBN−η.It is quite difficult to analyze its trend directly from the above formula; then, the second-derivation is derived and simplified as(18)∂2Rη∂η2=2αSE2+αRE2η23αSE2αRE2αSB+αRBN−2η−αRBαRE4η3αRBαRE2η22η−3N−3αSBαRE2η2+αRBαSE2N−2η+αSBαSE2−αSB+αRBN−ηαSE2+αRE2η22αRBαSE2αRE2η+3αRBαRE4η3.Through the positive and negative judgment in Equation (18), we can acquire the monotonicity of the first-derivation expression and further determine whether it has a zero point in the value range. For simplicity let G1η=αSE2αRE2αSB+αRBN−2η−αRBαRE4η3, G2η=αRBαRE2η22η−3N−3αSBαRE2η2+αRBαSE2N−2η+αSBαSE2, and G3η=−αSB+αRBN−ηαSE2+αRE2η22αRBαSE2αRE2η+3αRBαRE4η3. Due to the positive characteristic of 2/αSE2+αRE2η23, Equation (18) can be simplified as
(19)∂2Rη∂η2=G1ηG2η+G3η.Clearly,G1η, G2η, and G3η are monotonically decreasing with η, where G10>0, G1N<0, G20>0, G2N<0, and G3η are always smaller than 0 with the increase of η. Therefore, one can conclude that G1η and G2η have zero points in their effective domain, which are denoted by ξ1 and ξ2, respectively. For the sake of illustration, letting ξ1<ξ2, we have
(20)G1ηG2η>0,for0≤η<ξ1,<0,forξ1≤η<ξ2,>0,forξ2≤η≤N.SinceG3η is always smaller than 0 with the increase of η, it can be regarded as a constant and has no effect on the trend of G1ηG2η, but it determines their zero points. According to Equation (18), ∂2Rη/∂η2η=0=0. However, the positive or negative of Equation (18) cannot be determined; thus we discuss each case separately. For the case ∂2Rη/∂η2η=N>0, the monotonicity of Equation (18) is similar to that of G1ηG2η. However, when ∂2Rη/∂η2η=N<0, the zero point of Equation (18) denoted by ζ exists, and hence, we can conclude
(21)∂2Rη∂η2>0,for0≤η<ζ,<0,forζ≤η<N.Through observing the positive and negative of∂2Rη/∂η2, we know that the first-derivation of Rη tends to increase and then decreases and then maybe increase again with the increase of η, where ∂Rη/∂ηη=0=0 and ∂Rη/∂ηη=N<0. Therefore, there exists a maximum value of the secrecy rate for the formulated optimization problem, within the scope of its first derivative in solving extreme result. Thus, we can derive the optimal solution by calculating the equation of ∂Rη/∂η=0, and the maximum secrecy capacity is also determined. Letting ∂Rη/∂η=0, the objective function can be simplified as
(22)αRBαRE2η3+2αRBαSE2η−αSE2αSB+NαRB=0.SinceαRBαRE2≠0, we can eliminate the coefficient of the first term in Equation (22) and obtain the following equation:
(23)η3+2αSE2αRE2η−αSE2αRBαRE2αSB+NαRB=0.Clearly, Equation (23) is a special cubic equation, which can be solved by the Cardano formula method. From Equation (23), we can find that αSE2/αRE2≥0 and αSE2/αRBαRE2αSB+NαRB≥0, it can be converted into the form of
(24)η3+pη+q=0,where p=2αSE2/3αRE2 and q=−αSE2/αRBαRE2αSB+NαRB. In addition, due to p≠0 and q≠0, letting η=u+v, we have
(25)η3=u+v3=u3+v3+3uvu+v=u3+v3+3uvη.Comparing the coefficients of Equations (24) and (25) and after some mathematical manipulations, we can obtain
(26)u3+v3=−q,u3v3=−p33.According toq2+4p3/27>0, u3 and v3 are two roots of the equation x2+qx−p/33=0, which can be found by the root formula; the corresponding closed-form expressions can be obtained from
(27)u∗=−q2+q22+p333,v∗=−q2−q22+p333.In this manner, the optimal solution of Equation (15) can be finally expressed as
(28)η∗=u∗+v∗,where · is the ceiling function. Thus, from the closed-form expression of η∗, N−η∗ can thus be obtained as the optimal number of elements allocated for serving B.


## 4. Numerical Result Comparison

In the section, we validate the expression of the analysis and evaluate the performance of our considered system with the assistance of the uncertain RIS via simulation results. All links in the system are assumed to follow independent Rayleigh fading with the path loss exponent of 2.2, and the noise variance is -94 dBm. For simplicity, the following node locations are considered:xS,yS=0,0, xR,yR=40,10, xB,yB=50,0, and xE,yE=45,−5.Figure2 illustrates the variation of achieved rate as the number of elements for Eve with the fixed transmit power P=1W varies, and the total number of elements is set to 1,000. The achievable rates of B and Eve are decreasing when the number of the elements for Eve increases, as shown in the figure. However, the achievable rate at Eve decreases significantly than that of the one at B. It also illustrates that the achievable secrecy rate is first increasing and then decreasing with an increasing number of elements for Eve. Thus, there exits an optimal value of elements for B and Eve as the result of 10.0392 bps/Hz. Through observation, it is known that 450 is the optimal value in the simulation results which are equal to the optimal value obtained from our analysis in Equation (28).Figure 2
Achievable rate vs. the number of elements for jamming Eveη.In Figure3, we compare different schemes of elements allocation versus the transmit power with the power from 1 W to 30 W. By means of the simulation, we compare several models including the proposed scheme, all elements of RIS to enhance secure communication at B, all elements of RIS to interfere Eve, and the model without RIS. For the system without RIS, its achievable secrecy rate is 0 since the achievable rate at Eve is higher than that at B. And when all the components of RIS are used to improve the legitimate communication, the secrecy rate is determined by the CSI instead of the transmission power of base station; thus, the secrecy rate keeps constant under varying transmit power. The achievable secrecy capacity for our considered scheme and the one that all elements to interfere Eve monotonically increase with the increasing transmit power, and our proposed scheme achieves better results. Moreover, it also verifies that our proposed scheme has a higher secrecy capacity than other schemes, which makes it superior compared with than other schemes.Figure 3
Comparisons of the proposed scheme and other schemes.Figure4 demonstrates the variation of achievable secrecy rate with total number of elements for RIS, in which N is set to be 500, 1,000, and 1,500. According to the figure, the achievable secrecy capacity is increasing as the transmit power increases. In addition, it reveals that the secrecy rate in the uncertain RIS-assisted communication network increases with an increasing number of components.Figure 4
Secrecy rate vs. transmission powerP with N=500,1000,1500.


## 5. Conclusions

This paper investigated uncertain RIS-assisted PLS, with the presence of an eavesdropper. The uncertain RIS can enhance the signal for the legitimate user while jamming the eavesdropper by separating the components of RIS into two functional sections. The optimal element allocation and achievable secrecy rate can be obtained in their closed forms by solving the formulated problem. Numerical results verifying the accuracy of the derived expression show the advantage of our considered scheme compared with its counterparts.



---

*Source: 4617366-2022-09-21.xml*