# Joint Relay Selection and Power Allocation for the Physical Layer Security of Two-Way Cooperative Relaying Networks

Authors: Lei Pan; Zan Li; Zhengyuan Wang; Fenggan Zhang
Journal: Wireless Communications and Mobile Computing
 (2019)

---

## Abstract

In this paper, we investigate the physical layer security of cooperative two-way relay transmission systems using the amplify-and-forward (AF) protocol in the presence of an eavesdropper. A joint relay selection (RS) and power allocation (PA) scheme is proposed to protect the source-destination transmission against the eavesdropper. However, due to the high computational complexity, it is difficult to obtain the optimal solution for the system secrecy rate. Fortunately, an approximate optimal solution by using the particle swarm optimization (PSO) algorithm is derived. In the simulations, we use random relay selection with optimal power allocation (RRS-OPA) and equal power allocation with optimal relay selection (EPA-ORS) as benchmark schemes to verify the effectiveness of the proposed method. The simulation results show that the proposed method outperforms both RRS-OPA and EPA-ORS and significantly improves the system performance with low complexity.


---

## Body

## 1. Introduction

Cooperative relaying is a promising technology for achieving full spatial diversity, improved network coverage, and system capacity [1–3]. There are two popular relaying protocols, namely, the one-way relaying and the two-way relaying [4–6]. The one-way relaying protocol needs four time-slots for the bidirectional transmission from source to destination. By contrast, the two-way relaying protocol requires only two time-slots for the same transmission, which greatly improves the spectral efficiency and system throughput [7–9]. In [10], the joint power allocation (PA) and network beamforming algorithms are proposed to minimize the total transmit power or maximize the sum-rate for a two-way multicarrier multirelay network. In [11], a joint relay selection (RS) and PA algorithm under transmit power and primary use interference constraints is presented in cognitive radio (CR) networks with multiple relays.On the other hand, physical layer security [12–15] has attracted growing attention to enable secure communications. It is different from the traditional cryptographic methods that rely on computational complexity and secret keys. Physical layer security mainly exploits the physical characteristics of wireless channels to enhance the security of the signal transmission. In [16], a cooperative jamming scheme is investigated to improve the system’s secrecy rate for two-way relaying system with an eavesdropper node. In [17], a two-slot cooperative relaying scheme is proposed to maximize the secrecy rate and evaluate the physical-layer security performance. However, under eavesdropping environment, the joint optimization problem of RS and PA in two-way relay transmission is difficult to derive an optimal solution due to the high computational complexity. In the aforementioned works, few researches have been done for the joint optimization problem.In this paper, a joint RS and PA algorithm with an eavesdropper for two-way relay transmission based on particle swarm optimization (PSO) is proposed to reduce the computational complexity and improve the system secrecy rate. The PSO algorithm is a swarm intelligent and evolutionary approach, inspired from birds’ flocking or fishes’ schooling for the solution of nonlinear, nonconvex, or combinatorial optimization problems [18, 19]. Recently, it has been applied to solve many complex optimization problems in communication networks. In [20], a novel relay resource scheme that uses the PSO algorithm to jointly search the transmit/receive antenna combining matrices is proposed in cooperative multiple input multiple output system. In [21], a generalized PSO model is proposed as a low complexity method for adaptive resource allocation to improve the bandwidth efficiency. It is shown that using PSO for subcarrier allocation has a lower complexity than linear and sorted list searches which have been used in the literature. However, few research investigate PSO algorithm in two-way cooperative relaying networks. Therefore, the proposed method based on PSO is investigated to improve the system performance with low complexity under eavesdropping environment.The contributions in this paper are summarized as follows. Firstly, a joint relay selection (RS) and power allocation (PA) scheme is proposed to protect the source-destination transmission against the eavesdropper in the two-way cooperative relaying systems. Secondly, in order to reduce the computational complexity, we propose the optimization algorithm based on PSO to improve the system secrecy rate. And then, the simulation results show that our proposed method outperforms both random relay selection with optimal power allocation (RRS-OPA) and equal power allocation with optimal relay selection (EPA-ORS) and improves the system performance with low complexity significantly.The remainder of this paper is organized as follows. The system model of cooperative two-way relaying protocol, with an eavesdropper, is given in Section2. In Section 3, we present an optimal RS and PA scheme based on PSO. Moreover, in Section 4, simulation results are given to corroborate our study. Finally, Section 5 contains some concluding remarks.


## 2. System and Channel Model

We consider a wireless cooperative relay communication system as shown in Figure1, which includes a pair of transceiver nodes (S1 andS2), an eavesdropper nodeE andL friendly relay nodes Ri (i=1,2,…,L). It is assumed that there is no direct link betweenS1 andS2. In addition,E is assumed to be within the coverage area of all nodes (S1,S2 andRi). All of the nodes are equipped with single antenna and operated in half-duplex mode. We assume that both the main and the wiretap are modeled by Rayleigh fading channels, and the channels are reciprocal.Figure 1
System model.The relays employ amplify-and-forward (AF) two-way relaying, where the communication process between the two transceiver nodes takes place in two time-slots. In the first time-slot, both transceivers transmit their data to the relays simultaneously. Let the transceiver nodes,S1 andS2, transmit the symbols x1 and x2, respectively. Without loss of generality, we assume that E[x12]=E[x22]=1, where E[·] and · denote the expectation operator and the absolute value of a complex number, respectively. The signals received at the relays can be expressed as(1)yRi=P1,ihS1Rix1+P2,ihS2Rix2+μi,1≤i≤L.where P1,i and P2,i are the transmit power from S1 and S2 to the ith relay (Ri) respectively. hS1Ri and hS2Ri denote the channel gain for links S1→Ri and S2→Ri respectively. In addition, μi is an independent and identically distributed (i.i.d) complex Gaussian random variable with zero mean and variance σμi2 representing the additive noise at the ith relay node.At the same time, the signals received atE from S1 and S2 can be expressed as(2)yE1=P1,ihS1Ex1+P2,ihS2Ex2+nE1,1≤i≤L.where hS1E and hS2E denote the channel gain for links S1→E and S2→E respectively. nE1 is an i.i.d complex Gaussian random variable with zero mean and variance σE12 representing the additive noise at the E node.And then, as can be seen from (2), E receives a mixed signal including S1 and S2. The node E can employ the two matched filters corresponding to S1 and S2. So, S2 is treated as interference while eavesdropping S1 at E, and vice versa. The received SNR at E with respect to S1 can be written as(3)SNRE11=P1,ihS1E2P2,ihS2E2+σE12.Similarly, the received SNR atE with respect to S2 can be given by(4)SNRE12=P2,ihS2E2P1,ihS1E2+σE12.In the second time-slot, each relay transmits a scaled version of the signal received in the previous time-slot. And the signals received at theS1, S2, and E are denoted as y1, y2, and yE2 respectively, which can be expressed as(5)y1=P1,iωihS1RihS1Rix1+P2,iωihS1RihS2Rix2+ωihS1Riμi+n1(6)y2=P1,iωihS2RihS1Rix1+P2,iωihS2RihS2Rix2+ωihS2Riμi+n2and(7)yE2=P1,iωihRiEhS1Rix1+P2,iωihRiEhS2Rix2+ωihRiEμi+nE2,1≤i≤Lwhere ωi is the gain factor. hRiE denotes the channel gain for links Ri→E. n1, n2, and nE2 stand for the additive white Gaussian noise (AWGN) at S1, S2, and E, with zero mean and variances σn12, σn22, and σE22, respectively. Through the analysis of the formulas (5) and (6), the first term in (5) and the second term in (6) can be subtracted from y1 and y2, respectively, known as self-interference. Thus, the residual signals y1′ and y2′ can be given by(8)y1′=P2,iωihS1RihS2Rix2+ωihS1Riμi+n1and(9)y2′=P1,iωihS2RihS1Rix1+ωihS2Riμi+n2Therefore, the SNR atS1 and S2 can be written as(10)SNR1,i=P2,iωi2hS1Ri2hS2Ri2σμi2ωi2hS1Ri2+σn12and(11)SNR2,i=P1,iωi2hS1Ri2hS2Ri2σμi2ωi2hS2Ri2+σn22For the same reason as (3) and (4), the SNR at the eavesdropper E equals(12)SNRE21=P1,iωi2hRiE2hS1Ri2P2,iωi2hRiE2hS2Ri2+σμi2ωi2hRiE2+σE22and(13)SNRE22=P2,iωi2hRiE2hS2Ri2P1,iωi2hRiE2hS1Ri2+σμi2ωi2hRiE2+σE22And then, the transmit power of theith relay can be given by(14)PRi=EωiyRi2=P1,iωi2hS1Ri2+P2,iωi2hS2Ri2+ωi2σμi2From (14), it can be derived(15)ωi=PRiP1,ihS1Ri2+P2,ihS2Ri2+σμi2So, substituting (15) into (10), (11), (12), and (13), we obtain (16)-(19), respectively.(16)SNR1,i=P2,iPRihS1Ri2hS2Ri2PRihS1Ri2σμi2+P1,ihS1Ri2σn12+P2,ihS2Ri2σn12+σμi2σn12,(17)SNR2,i=P1,iPRihS1Ri2hS2Ri2PRihS2Ri2σμi2+P1,ihS1Ri2σn22+P2,ihS2Ri2σn22+σμi2σn22,(18)SNRE21=P1,iPRihRiE2hS1Ri2P2,iPRihRiE2hS2Ri2+PRihRiE2σμi2+P1,ihS1Ri2σE22+P2,ihS2Ri2σE22+σμi2σE22(19)SNRE22=P2,iPRihRiE2hS2Ri2P1,iPRihRiE2hS1Ri2+PRihRiE2σμi2+P1,ihS1Ri2σE22+P2,ihS2Ri2σE22+σμi2σE22It is assumed that the eavesdropperE performs maximal-ratio combining of the first and second slot received signals, so its SNR equals(20)SNRE1=SNRE12+SNRE22and(21)SNRE2=SNRE11+SNRE21.


## 3. Optimal Relay Selection and Power Allocation

In this section, we consider the joint optimal RS and PA for the two-way relaying network. RS and PA [11] can be formulated as the following optimization problem,(22)PRi∗,P1,i∗,P2,i∗=arg⁡maxPRi,P1,i,P2,i∈ΩRsiPRi,P1,i,P2,i,(23)i∗=arg⁡maxi∈1,2,…,LRsiPRi∗,P1,i∗,P2,i∗where i∗ is the index of the selected best relay, Rsi is the secrecy rate, and Ω is defined by the transmit power. This is a joint optimization over the relay indexes and the transmit powers. Thus, we first obtain the maximization of the secrecy rate according to the transmit powers of the relay and transceivers.The system secrecy rate [16] can be given by(24)Rsi=12Rs1,i+Rs2,iwhere(25)Rs1,i=log2⁡1+SNR1,i-log2⁡1+SNRE1+and(26)Rs2,i=log2⁡1+SNR2,i-log2⁡1+SNRE2+where x+ denotes max⁡(x,0).Based on (22), (23), and (24), the power allocation problem can be formulated as follows:(27)maxP1,i,P2,i,PRifP=maxP1,i,P2,i,PRi⁡12Rs1,i+Rs2,isubjectto:P1,i+P2,i+PRi≤Usubjectto:P1,i+P2,i+PRi≤Uwhere P=(P1,i,P2,i,PRi). U is the total system power constraint.However, this is a nonconcave and nonconvex problem through analysis. Due to the high computational complexity, it is difficult to derive an optimal solution. In this paper, the PSO algorithm is considered to solve this complex optimization problem and achieve the optimal results. The flowchart of the proposed PSO algorithm is shown in Figure2. It is assumed that there are n particles in the population. Each particle has a corresponding velocity, position, the local optimum, and the global optimum solution in the evolutionary process of the proposed PSO scheme.Figure 2
Flowchart of the PSO algorithm.In the initial step, a swarm is created and initialized. We denote thejth particle’s velocity, position, the local optimum, and the global optimum solution, respectively, as vj(0),Dj(0), Lj(0), and G(0) for the 1st generation.In the second step, the velocity and position of the particle are modified so that the particle is within the effective range. Thejth particle’s velocity vj(k) is checked byif(Dj(k)+vj(k))t≥U or (Dj(k)+vj(k))t≤0, (t=1,2,3),thenvj(k)=vj(k)/2,elsevj(k)=vj(k).wherevj(k), Dj(k) are the jth particle’s velocity and position, respectively, in the kth generation (k=0,1,…,m).In the third step, the corresponding particles’ positions can be updated by(28)Djk+1=Djk+vjkIn the fourth step, the objective value off(Dj(k)) is evaluated in (27). And the corresponding particles’ local optimum solution Lj(k) and global optimum solution G(k), respectively, can be updated by (29)Ljk+1=LjkfLjk≥fDjkDjkother(30)Gk+1=GkfGk≥max⁡fLjk∣j=1,2,…,nLj∗kj∗=arg⁡max⁡fLjkAnd then, updating the velocities of the particles for the next generation can be given by(31)vjk+1=0.5vjk+2.05r1Ljk-Djk+2.05r2Gk-Djkwhere r1 and r2 are random variables uniformly distributed in the range [0,1].The steps in Figure2 are repeated until the number of iterations is m, i.e., k=m. Finally, the optimal power allocation problem in (27) can be achieved. After determining the solution, the best relay can be selected, i.e.,, i∗=arg⁡maxi∈{1,2,…,L}⁡Rsi∗(PRi∗,P1,i∗,P2,i∗). Rsi∗ is the secrecy rate of the ith relay with optimal power allocation.


## 4. Simulation Results

In this section, the simulation setting is to confirm the proposed optimal RS and PA scheme. It is assumed that both the main and the wiretap are modeled by Rayleigh fading channels, and the channels are reciprocal. We assume that the channel state information (CSI) is perfectly known. The channels among all of nodes are assumed to be i.i.d, complex Gaussian with zero mean and unit variance. In simulations, the parameter is set as the number of relaysL=10. Further, we set the number of particles n=30 and the number of iterations m=50 in the population.Figure3 shows the system secrecy rate versus the number of relays for the different power allocation scheme. In this simulations, the parameter is set as U = 30dB. There are two situations to be considered: (1) the EPA-ORS and (2) the proposed joint RS and PA scheme. It demonstrates clearly that, compared with two cases, the optimal performance of the system secrecy rate is achieved in the proposed scheme. This can be explained that the power allocation scheme based on PSO can increase the system secrecy rate.Figure 3
System secrecy rate versus the number of relays for the different power allocation scheme.Figure4 illustrates the system secrecy rate versus the number of relays for the different relay selection scheme. These are the RRS-OPA and the proposed optimal PA/RS scheme based on PSO, respectively. It is observed that the proposed method is superior to RRS-OPA scheme. The reason is that potential selection diversity gain is improved. For RRS-OPA scheme, it has nothing to do with the number of relays. And, in Figures 2 and 3, the simulation results clearly show that the PSO algorithm can solve this complex optimal PA/RS problem and achieve the optimal results.Figure 4
System secrecy rate versus the number of relays for the different relay selection scheme.Figure5 illustrates the system secrecy rate versus the number of relays for the different eavesdropping area of eavesdropper. There are three cases to be considered: (1) the nodes R only can be eavesdropped; (2) the nodes R and the partial transceiver nodes (S1 or S2) can be eavesdropped; (3) all of the nodes can be eavesdropped (the proposed model). It is seen clearly that the optimal performance of the system secrecy rate is achieved in the first case. This can be explained that potential spatial diversity gain is different for the different eavesdropping area of eavesdropper. The system secrecy rate decreases with the increases of eavesdropping area. So, it is noteworthy that the eavesdropping area of eavesdropper cannot be ignored.Figure 5
System secrecy rate versus the number of relays for the different eavesdropping area of eavesdropper.Figure6 depicts the system secrecy rate versus the number of relays for three given the total system power constraint U = 10dB, 20dB, 30dB. It is observed that the system secrecy rate increases with the increase of the total system power constraint. The reason is that the higher total power constraint is, the higher transmit powers at the transceiver nodes and the relay nodes are. On the other hand, by comparing with the different number of candidate relays, the system secrecy rate can be enhanced by increasing the number of relays. This is because potential selection diversity gain is increased.Figure 6
System secrecy rate versus the number of relays for the different total power constraint.


## 5. Conclusion

The joint optimization problem of RS and PA with an eavesdropper for two-way relay transmission is a complex optimization problem. And it is difficult to derive an optimal solution. In this paper, we investigate an optimal RS and PA scheme based on PSO in two-way relaying systems to solve this problem. RRS-OPA and EPA-ORS as benchmark schemes are used to verify the effectiveness of the proposed method. The simulation results show that the proposed method outperforms both RRS-OPA and EPA-ORS and significantly improves the system performance with low complexity.



---

*Source: 1839256-2019-01-01.xml*