Secrecy outage analysis and power allocation for decode-and-forward relay systems

: The decode-and-forward multi-relay system with the presence of an eavesdropper is researched in this study. Two widely used transmission schemes are considered, namely, the best-relay selection scheme and the all-relay-based beamforming scheme. To be specific, the former scheme adopts only the single best relay among all the candidate relays that have succeeded in decoding the source signal to assist the transmission, whereas the all-relay-based beamforming scheme allows all the candidates to assist the source simultaneously in a beamforming manner. The authors reveal that in both schemes, if the total transmit power of the two hops is constrained, contradiction exists between the two means of improving physical-layer security: (i) letting more relays succeed in decoding the source signal; (ii) increasing the transmit power of the selected relay(s). The authors thus analyse the secrecy outage behaviour of the two schemes and derive expressions of secrecy outage probability (SOP), based on which, the optimal power allocation solutions are obtained. It is demonstrated that in both schemes, the analysis results match well with the simulation results. Moreover, the proposed power allocation solutions surpass the conventional average power solution in SOP in both schemes.


Introduction
The broadcast nature of wireless medium makes wireless communications susceptible to wiretapping since malicious users can readily overhear messages that are being exchanged between legitimate users. As a result, enhancing system security in wireless communication networks has drawn a lot of attention in recent years. At present, cryptographic techniques are widely used in modern communication systems as the major approach to prevent interception [1,2]. Secret keys are utilised to encrypt messages, without which, the malicious users cannot understand the message even if they have the message. However, with the rapid development of processors, it becomes easier and easier to crack keys even if the long ones. Therefore, the issue of wireless transmission security becomes more and more critical. It is by all means necessary to further enhance system security through physical-layer security (PLS) techniques, which exploit the characteristics of channels to fight against eavesdropping.
Research on PLS was pioneered by Wyner [3] who proved that safe communication without secret keys is possible if the eavesdropping channel (the channel from source to eavesdropper) is a degraded version of the main channel (the channel from source to legitimate destination). Secrecy capacity was developed as the difference between the capacities of the main channel and the eavesdropping channel [4]. Currently, it is a widely used measurement of PLS performance, which indicates the maximal communication rate that can be achieved safely. When secrecy capacity falls below a certain target secrecy rate, secrecy outage happens. The secrecy outage probability (SOP) is also a widely used measurement of PLS performance [5]. Note that the PLS technique can be utilised in various wireless communication systems along with many other techniques, such as the joint use of PLS and interference alignment [6,7], and the joint use of PLS and energy harvesting [8]. Hence, the research of PLS has attracted a lot of attention in recent years.
As a matter of fact, the broadcast nature of wireless medium does not only bring the vulnerability to eavesdropping, it also brings the feasibility of user cooperation where ideal users are adopted as relays to form a virtual multiple-input-multiple-output system. It has been proved to be a promising technique to enlarge signal coverage and improve system capacity and reliability [9,10]. Among all kinds of different relaying methods, amplify-andforward (AF) and decode-and-forward (DF) are the two most popular protocols. In AF protocol, the relays simply forward a scaled version of the signals they received; while in DF protocol, the relays decode the source signal and forward the re-encoded signal.
Recently, user cooperation has also demonstrated its capability of combating eavesdropping [11]. A lot of efforts have been made in this area for better use of relays, such as relay selection [12] and cooperative beamforming [13][14][15][16]. In [12], a best-relay selection strategy was introduced in DF and AF relay networks, where only the single best relay that can achieve the maximal secrecy capacity was adopted to forward the source signal. Beamforming schemes for one-way and two-way relay networks with all available relays adopted were studied in [13,14], respectively, subject to a total power constraint. A beamforming scheme with individual power constraints was proposed in [15]. Robust beamforming design with imperfect channel state information (CSI) was investigated in [16]. Cooperative jamming [17] is also an effective way to enhance PLS, which uses relays to send artificial noises to confuse eavesdroppers. However, for relay systems without direct link between source and destination, relays cannot all act as pure jammers, otherwise no message will be delivered to destination. Hence, cooperative jamming cannot be applied alone in this scenario. Actually, this technique is now usually applied along with relay selection and cooperative beamforming [18][19][20]. In addition to the various means of making better use of relays, the authors of [21] showed that in a cognitive radio network assisted by an AF relay, loosening the requirement of reliability can also improve the transmission security. As a matter of fact, security-reliability tradeoff is also a hot topic recently.
In this paper, we consider a cooperative communication system with multiple relays and an eavesdropper. To avoid noise propagation problem, the DF protocol is adopted. Two transmission schemes are considered, namely the best-relay selection (BRS) scheme and the all-relay-based beamforming (ARB) scheme. The first one selects the single best relay to forward the information bearing signal, while the second one uses multiple relays to forward the source signal in a beamforming manner. These two schemes are classical and have been investigated in some other works, e.g., [12][13][14][15]. However, our work is still different from the previous ones. Most previous works concerning relay selection and multi-relay beamforming with DF protocol do not consider the source transmission rate, thus do not consider whether the relays can successfully decode the source signal. For example, in [12], the proposed relay selection method requires the source to adjust its transmission rate according to the channels of both hops to assure successful decoding at the selected relay and the destination. Similar source transmission rate adjustment is also required in [15]. While in [13], the authors assumed that all the relays can successfully decode. By contrast, in our work, it is taken into consideration that some of the source-torelay (SR) channels may experience severe fading, so that their capacities may fall below the source transmission rate, which leads to decoding failure at these relays. We exploit only the relays that can successfully decode the source signal (called candidate relays) to avoid decoding error propagation. Clearly, the collection of candidate relays (called decoding set) in our work is a random variable depending on the SR channels, while in previous works, the collection of candidate relays is fixed to the collection of all relays in system.
Various works have verified that PLS performance will be improved if more relays can be utilised [12][13][14]. In the system we are considering, having more candidate relays is equivalent to higher transmit power in the first hop. However, if the total transmit power is constrained, it is also equivalent to lower transmit power in the second hop, which affects PLS performance as well. The first contribution of this paper is that we theoretically proved that in both BRS and ARB schemes, secrecy capacity monotonically increases with the transmit power in the second hop, which was only verified by simulation results in previous works [14,20]. This means the aforementioned effect of lower transmit power in the second hop on PLS is negative. Hence, the consequence of considering the decoding set lies in the power allocation between the two hops. To achieve better PLS performance, the transmit powers need to be appropriately allocated. Motivated by this, we propose optimal power allocation solutions for both schemes. The objective is the SOP since secrecy capacity cannot reflect the influence of the transmit power in the first hop. Proposing the optimal power allocation solutions is the second contribution of this paper. As far as we know, no existing work has investigated this power allocation problem.
The remainder of this paper is organised as follows. Section 2 establishes the system model with two different transmission schemes. Section 3 carries out the security performance analysis of the two schemes, based on which, Section 4 proposes to allocate power between the two hops in order to minimise the SOP. Numerical results are presented in Section 5 which validate our theoretical analysis on SOP, and demonstrate the advantage of our proposed power allocation solutions by using the conventional average power allocation as a benchmark solution. Concluding remarks are provided in Section 6.

System model
Consider a DF relay system consisting of a source-destination pair, M relays ℛ = {1, 2, …, M} and an eavesdropper as shown in Fig. 1. Each node is equipped with a single antenna working in half-duplex mode. Let h si ∼ CN(0, σ si 2 ), h id ∼ CN(0, σ id 2 ) and h ie ∼ CN(0, σ ie 2 ) be the fading coefficients of the channels from the source to the ith relay, form the ith relay to the destination and from the ith relay to the eavesdropper, respectively. All the instantaneous CSIs are assumed to be available at the M relays so that they can perform essential tasks like relay selection and beamforming. These CSIs can be by obtained by using channel estimators surveyed in [22].
In the first hop, the source broadcasts P S s where s is normalised as E[ s 2 ] = 1 and P S is the transmit power of the source node. The received signal at the ith relay is expressed as where n i ∼ CN(0, σ n 2 ) is the additive white Gaussian noise (AWGN). The capacity between the source and the ith relay is where γ 1 = P S /σ n 2 is the transmit-power-to-noise ratio in the first hop.
Note that some of the relays may fail to decode the source signal if their channels experience deep fading or the transmit power of the source node is not high enough. Therefore, to avoid the forwarding of decoding error, only the relays that succeed in decoding are considered as candidate relays, the collection of which is defined as decoding set D. Assume the source transmits with rate R s . For the ith relay to successfully decode the source signal, the channel capacity in (2) should be no less than R s , i.e. ∀i ∈ D, C si ≥ R s holds.
Note that D is a random variable and its sample space is where D m = ℛ − D m is the complementary set.

Best-relay selection
In the BRS scheme, if D ≠ ∅, the best candidate in D that can achieve the maximum secrecy capacity is selected to forward the desired signal in the second hop. Without loss of generality, assume i ∈ D is the one. Then the received signals at the destination and the eavesdropper are, respectively, expressed as and where P R is the transmit power in the second hop, n D and n E are, respectively, the AWGNs at the destination and the eavesdropper, both following a CN(0, σ n 2 ) distribution. From (3) and (4), the secrecy capacity is where γ 2 = P R /σ n 2 , (a) + = max {a, 0}. Therefore, the best relay is and the secrecy capacity of this scheme is

All-relay-based beamforming
The BRS scheme is easy to implement. It does not require synchronisation between relays. However using only one relay to assist the transmission causes some loss in PLS performance. Hence, for the purpose of higher security, we also consider to adopt all candidate relays in D and perform relay beamforming.
In the ARB scheme, all the relays in D simultaneously forward the source signal in a beamforming manner in the second hop. Specifically, the transmit signal of the ith relay (if i ∈ D) is where w i * is the beamforming weight of the ith relay. If i ∉ D, it remains silent in the second hop.
Let h RD and h RE denote the channels from the relays in D to the destination and to the eavesdropper, respectively, and w denote the beamforming vector. For example, if D = {1, 3, 4, 6}, The respective received signals at the destination and the eavesdropper can be expressed as and where w H w = 1.
From (9) and (10), the secrecy capacity can be written as Apparently, to maximise C s ARB requires to solve a generalised Rayleigh quotient problem, which can be transformed in to a Rayleigh quotient [23]. The optimal solution to w is where u max ( ⋅ ) represents the unit-norm eigenvector of a matrix corresponding to its largest eigenvalue. Thus, the secrecy capacity of this scheme is shown as

Security performance analysis
As can be noted, higher transmit power in the first hop leads to more relays in the decoding set. It has been verified by previous works that having more candidate relays enhances system security, no matter how many relays are selected to forward the desired signal. In other words, higher transmit power in the first hop yields better PLS performance. However, if the total transmit power is constrained, the effect of higher transmit power in the first hop on PLS performance is twofold. On one hand, it allows more relays to succeed in decoding the source signal, which upgrades system security. On the other hand, it leads to lower transmit power in the second hop, which degrades system security (as will be proved in this section). Since the instantaneous secrecy capacities in (7) and (13) are based on a certain decoding set, they cannot reflect the effect of P S on the overall PLS performance. Hence, SOP will be analysed in this section and used as the optimisation objective in the next section.

Best-relay selection
Using reduction to absurdity, it can be easily proved that for a certain D, if k ∈ D is the best relay when P R = P R (1) , for any P R (2) > P R (1) , it is still the best relay. Let C s BRS P R (1) and C s BRS P R (2) denote the secrecy capacities achieved by P R (1) and P R (2) , respectively. It can be obtained that That is, for a certain D, C s BRS monotonically increases with P R .
As a result, if P S + P R is constrained, a tradeoff between more candidate relays and higher P R is essential in improving PLS performance. Since the secrecy capacity of the BRS scheme cannot reflect the effect of P S , we now calculate the SOP of this scheme.
Pr C s According to the law of total probability, the SOP of the BRS scheme is (see (15)). Since secrecy outage event definitely happens when D = ∅, we have (see (16)). Noting that X si = h si 2 follows an exponential distribution with mean σ si 2 , we derive the probability of an empty decoding set as where Λ 1 = (2 2R s − 1)/γ 1 . Similarly to Pr D = ∅ , the probability of D = D m can be obtained as Pr C s One can also derive that (see (19)) where θ i = σ id 2 /σ ie 2 is the main-to-eavesdropper ratio (MER) [24], Λ 2 = (2 2R s − 1)/γ 2 . The detailed calculation of (19) is given in Appendix 1.

All-relay-based beamforming
The secrecy capacity in (13) equals to C s ARB = (1/2)log 2 λ max Z + where (see (21)) with UΛ ( with associated unit-norm eigenvectors where c 1 = ∥ r ∥ 2 + c 2 2 ∥ s ∥ 2 − 2c 2 r H s , and φ = ∠ r H s is the angle of r H s. This lemma was given in [26] without proof. In [27], the derivation of eigenvalues in case (iii) was provided, but no derivation of the rest. In this paper, the complete proof of this lemma is given in Appendix 2.
Using Lemma 1, we obtain (see (26)) where e = ∥ h RE ∥ 2 , c = h RE H h RD 2 , v = (c/e) − e, f γ 2 = γ 2 /(1 + γ 2 e), and u = ∑ i = 2 |D| u i H h RD with u 2 , …, u |D| being the orthonormal bases of the null space of h RE . It can be observed that λ max Z is a monotone increasing function in γ 2 , thus also in P R . As a consequence, when P S + P R is constrained, enhancing PLS through increasing candidate relays and through increasing P R conflict with each other in the ARB scheme, as well as in the BRS scheme. Thus, it is also important to allocate the transmit powers appropriately in the ARB scheme.
The SOP of the ARB scheme can be expressed as (see (27)).
Substituting (13), (17) and (18) into (27), we have (see (28)). The conditional probability Pr λ max Z < 2 2R s | D = D m represents the probability of secrecy outage under a certain decoding set. To obtain the closed-form expression of it requires to know the cumulative distribution function (CDF) of λ max Z , which is quite challenging. Consequently, it is difficult to derive the general closed-form expression of P out ARB . However, the numerical results of Pr λ max Z < 2 2R s | D = D m can be utilised to obtain the overall SOP in (28).

Optimal power allocation
Section 3 revealed the fact that in both schemes, the power allocation between the two hops needs to be delicately handled. Hence, this section provides power allocation solutions to lower the SOP. Assume the total transmit power is constrained by P S + P R = P. Let P S = αP. Then α is the power splitting ratio that is to be optimised. Apparently, α should satisfy 0 < α < 1.

Best-relay selection
To achieve the minimum SOP of the BRS scheme, the following optimisation problem needs to be solved: Obviously, it is hard to obtain the optimal power allocation solution from the expression of P out BRS in (20). We need to simplify the expression first. Let Λ = σ n 2 2 2R s − 1 /P, then Λ 1 = Λ/α, Λ 2 = Λ/(1 − α). Define the following functions The SOP in (20) is now re-written as However, it is still very difficult to reveal the convexity or monotonicity of SOP from this equation. Therefore, a common assumption is made that the distances between relays are much smaller than the SR, relay-to-destination (RD) and relay-toeavesdropper (RE) distances, i.e. σ si where D m represents the cardinality of D m , h(α) = f (α)g(α), M i is the combinatorial number.
The optimisation problem in (29) can now be solved by setting the first-order derivative of P out BRS over α to 0. The first-order derivative is Obviously, if α ∈ 0, σ d /(σ s + σ d ) , (dP out BRS /dα) < 0, P out BRS is monotonically decreasing; if α ∈ σ d /(σ s + σ d ), 1 , (dP out BRS /dα) > 0, P out BRS is monotonically increasing. Hence, the optimal power splitting ratio is (33) Remark 1: One can note from (20) that as P S and P R both tend to infinity, P out BRS converges to a positive constant P out, floor BRS = lim which is referred to as the SOP floor. This floor indicates that the SOP of BRS scheme has an unbreakable lower bound no matter how high powers the source and the selected relay transmit with. It is the best secrecy outage performance that a relay system with a BRS scheme can achieve. This SOP floor can be found in the simulation results in [20], but the authors of [20] did not provide any theoretical analysis. Remark 2: The location of the eavesdropper only affects the value of the MER, i.e. θ. It can be observed from (32) that θ has no influence on the optimum of α which is determined by the term . However, θ do have influence on the value of dP out BRS /dα, which is the decreasing or increasing speed of P out BRS over α. More specifically, the larger the RE distance is, the faster the SOP drops before α reaches its optimum, and the slower the SOP raises after the optimum.

All-relay-based beamforming
To achieve the minimum SOP of the ARB scheme requires to solve the following optimisation problem: Since the closed-form expression of P out ARB cannot be derived, the optimal power splitting ratio cannot be derived either. However, if α = 0 or 1, P out ARB = 1; if α is a little greater than 0 or lesser than 1, P out ARB will be lesser than 1. Hence, we surmise that P out ARB might be an anti-unimodal function in α. In fact, this surmise can be verified by simulation results, which will be shown in the following section. The ternary search method is utilised in this paper to find the optimal power splitting ratio in the ARB scheme. Since each time of ternary search eliminates at least 1/3 of the search area and (2/3) 18 is already smaller than 0.001, it takes at most 18 times of search to find the optimum of α if the accuracy of it is set to 0.001.

Simulation results
This section verifies the accuracy of our SOP analysis and the effectiveness of the proposed power allocation. Assume σ si 2 RD and d RE denote the distances from the source to the relays, from the relays to the destination and from the relays to the eavesdropper, respectively, and η = 4 is the path loss exponent. All AWGNs follow a CN(0, 1) distribution.

Simulation results of the BRS scheme
We first compare the analysis results with the Monte-Carlo simulation results to validate the SOP analysis of the BRS scheme. We consider two cases of the eavesdropper's location, i.e. two different values of the MER. From Fig. 2, it can be observed that for both cases, the analysis results match well with the simulation results, and as has been pointed out in the previous section, the SOP tends to a constant when the transmit powers tend to infinity. Moreover, the SOP floor in (34) equals 0.0016 when θ = 16, this value also tallies with the simulation results in the case of d RE = 2d RD . Fig. 3 illustrates the relationship between the SOP of the BRS scheme and the power splitting ratio α = P S /P. Comparing the two curves corresponding to d RD = 1 m, we can see that the SOP obtains its minimum value at the same power splitting ratio due to the unchanged d RD /d SR , regardless of the MER. However, the MER affects the slope of the curves, as has been mentioned in  Fig. 3, which verifies the correctness of our derivation. It can be noted from Fig. 3 that the two curves corresponding to the first case (d RD = 1 m, d RE = d RD ) and the fourth case (d RD = 2 m, d RE = 2d RD ) have an intersection point. Compared with the system in the first case, the system in the fourth enjoys the advantage of larger MER, but suffers from the disadvantage of larger RD distance. For a certain α, if it is small, the transmit power of the relays is high, then the advantage of larger MER overcomes the disadvantage of larger RD distance. In other words, although the capacity of the legitimate link in the fourth case is smaller than that in the first case, C s in the fourth case could still be larger than that in the first case, given enough high P R . Meanwhile, if α is large, only few power is allocated to the relays, then the advantage of larger MER cannot be fully exploited and the disadvantage of larger RD distance overwhelms. This yields smaller C s and thus higher SOP. Therefore, it is reasonable that there exists a certain value of α which makes the advantage and the disadvantage of the fourth case cancel out. That is, the system in the fourth case could have the same performance as in the first case when a certain power allocation scheme is applied. Fig. 4 provides the comparison of the optimal power allocation solution with the widely used average power allocation where P S = P R = P/2. One can observe that optimal power allocation outperforms average power allocation in BRS scheme. Meanwhile, as P → ∞, the SOPs of both power allocation solutions converge to the same SOP floor. As a matter of fact, when P = ∞, the transmit powers of both hops will be very high, no matter which power allocation solution is applied. In that case, for both power allocation solutions, secrecy outage happens when max i ∈ ℛ ( h id 2 / h ie 2 ) < 2 2R s , the probability of which can be proved to be equal to the one in (34) after some simple calculation of the CDF of h id 2 / h ie 2 .

Simulation results of the ARB scheme
Let us first compare the analysis results of SOP in the ARB scheme with the simulation results. Since the conditional probability Pr λ max Z < 2 2R s | D = D m does not have a closed-form expression, we obtain its value by Monte-Carlo simulations and substitute the value into (28) to get the analysis results in Fig. 5. While the simulation results in Fig. 5 are obtained purely by Monte-Carlo simulations and each data point was averaged over 1,000,000 independent channel realisations.
From Fig. 5, one can observe that the analysis results of the ARB scheme also match well with the simulation results. Although the SOP is too complicated to do asymptotic analysis on, the simulation results show that there does not exist a SOP floor, thus increasing the transmit powers can always improve PLS in the ARB scheme.
In the BRS scheme, the optimum of α is determined by the SR and RD distances, and is irrelevant with the RE distance. However, in the ARB scheme, it is difficult to draw similar conclusions through theoretical analysis. Hence, we use simulations to reveal the inherent relationship between the optimum of α and the distances between the nodes. The simulation results are shown in Figs. 6 and 7. It can be seen that in ARB scheme, the optimum of α changes with the location of the destination, but does not change with the MER, which means the eavesdropper's location has nothing to do with the optimal power allocation, just as in the BRS scheme.
As a matter of fact, the optimum of α in the BRS scheme is irrelevant with the number of relays, M, either, which can be noted from (33). However we cannot obtain the relevance or irrelevance between them in the ARB scheme through theoretical analysis yet. However, the simulation results in Fig. 8 and Fig. 9 demonstrate a relevance. It can be seen that in the case of d RD = 1 m, the minimum of SOP appears at α = 0.6 when M = 4, but when M = 10, it appears at α = 0.65; whereas in the case of d RD = 2 m, these two minimums appear at 0.3 when M = 4 and 0.4 when M = 10. This implies that as the number of relays increases, more power should The comparison between the optimal power allocation and the conventional average power allocation in the ARB scheme is given in Fig. 10. The power splitting ratio is obtained by utilising the ternary search method and the accuracy is set to 0.05. As shown in this figure, the SOP achieved by the proposed optimal power allocation solution is lesser over the whole power range, thus validates the effectiveness of the proposed power allocation solution.

Conclusion
This paper studied the secrecy outage behaviour of a DF relay system in the presence of an eavesdropper. Two widely used transmission schemes are considered, namely, the best-relay selection scheme and the all-relay-based beamforming scheme. We revealed that in both schemes, enhancing PLS through allowing more relays to succeed in decoding the source signal and through increasing the transmit power of relays conflict with each other. Hence, the SOP minimisation problem was addressed subject to a total transmit power constraint of the two hops. For the BRS scheme, we obtained the closed-form expressions of the SOP and the optimal power splitting ratio. Whilst for the ARB scheme, a general closed-form expression of SOP is difficult to derive, so we draw help from numerical results of the probability of secrecy outage under a certain decoding set to obtain the overall SOP of the ARB scheme, and utilised the ternary search to find the optimal power splitting ratio. Simulation results showed that the theoretical    analysis of SOP in both schemes matches well with the simulation results, and the proposed power allocation solutions outperform the conventional average power allocation.