{'fraction_non_alphanumeric': 0.042837848169006904, 'fraction_numerical': 0.010371804999872582, 'mean_word_length': 4.424661321537186, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Optimal Relay Selection for Physical-Layer Security in Cooperative Wireless Networks

In this paper, we explore the physical-layer security in cooperative wireless networks with multiple relays where both amplify-and-forward (AF) and decode-and-forward (DF) protocols are considered. We propose the AF and DF based optimal relay selection (i.e., AFbORS and DFbORS) schemes to improve the wireless security against eavesdropping attack. For the purpose of comparison, we examine the traditional AFbORS and DFbORS schemes, denoted by T-AFbORS and TDFbORS, respectively. We also investigate a so-called multiple relay combining (MRC) framework and present the traditional AF and DF based MRC schemes, called T-AFbMRC and TDFbMRC, where multiple relays participate in forwarding the source signal to destination which then combines its received signals from the multiple relays. We derive closed-form intercept probability expressions of the proposed AFbORS and DFbORS (i.e., P-AFbORS and P-DFbORS) as well as the T-AFbORS, TDFbORS, T-AFbMRC and T-DFbMRC schemes in the presence of eavesdropping attack. We further conduct an asymptotic intercept probability analysis to evaluate the diversity order performance of relay selection schemes and show that no matter which relaying protocol is considered (i.e., AF and DF), the traditional and proposed optimal relay selection approaches both achieve the diversity order M where M represents the number of relays. In addition, numerical results show that for both AF and DF protocols, the intercept probability performance of proposed optimal relay selection is strictly better than that of the traditional relay selection and multiple relay combining methods.

a promising paradigm to achieve the spatial diversity by enabling user terminals to share their antennas and form a virtual antenna array. Until recently, there has been extensive research on the user cooperation from different perspectives, e.g., cooperative resource allocation [4], performance analysis and optimization [5], [6], and cooperative medium access control (MAC) and routing design [7], [8].
User cooperation not only improves the reliability and throughput of wireless transmissions, but also has great potential to enhance the wireless security against eavesdropping attack. Differing from the conventional encryption techniques relying on secret keys, physical-layer security exploits the physical characteristics of wireless channels to prevent the eavesdropper from intercepting the signal transmission from source to its intended destination. It has been proven in [9] and [10] that in the presence of an eavesdropper, a so-called secrecy capacity is shown as the difference between the channel capacity from source to destination (called main link) and that from source to eavesdropper (called wiretap link). Moreover, if the secrecy capacity is negative, the eavesdropper will succeed in intercepting the source signal and an intercept event occurs in this case. However, due to the fading effect, the secrecy capacity is severely limited in wireless communications. To that end, user cooperation as an emerging spatial diversity technique can effectively combat wireless fading and thus improves the secrecy capacity of wireless transmissions in the presence of eavesdropping attack.
At present, most of existing work on the user cooperation for wireless security is focused on developing the secrecy capacity from an information-theoretic perspective. In [11], the authors studied the secrecy capacity of wireless transmissions in the presence of an eavesdropper with a relay node, where the amplify-and-forward (AF), decode-and-forward (DF), and compress-and-forward (CF) relaying protocols are examined and compared with each other. The cooperative jamming was proposed in [12] and analyzed in terms of the achievable secrecy rate, where multiple users are allowed to cooperate with each other in preventing eavesdropping attack. In [13], the cooperation strategy was further examined to enhance the physical-layer security and a so-called noise-forwarding scheme was proposed, where the relay node attempts to send codewords independent of the source message to confuse the eavesdropper. In [14] and [15], the authors studied the cooperative relays for enhancing physical-layer security and showed the secrecy capacity improvement by using cooperative relays. The physical-layer security was further examined in twoway relay networks in [16] and [17] where multiple two-way relays are exploited to improve the secrecy capacity against eavesdropping attack. In addition, the authors of [18] and [19] investigated the physical-layer security in MIMO relay networks and showed the significant improvement in terms of secrecy capacity through the use of MIMO relays.
In this paper, we consider a cooperative wireless network with multiple relays in the presence of an eavesdropper and examine the optimal relay selection to improve physical-layer security against eavesdropping attack. Differing from the traditional relay selection in [20]- [22] where only the channel state information (CSI) of two-hop relay links (i.e., source-relay and relay-destination) are considered, we here have to take into account additional CSI of the wiretap links, in addition to the two-hop relay links' CSI. The main contributions of this paper are summarized as follows. Firstly, considering AF and DF relaying protocols, we propose the AF and DF based optimal relay selection schemes which are denoted by P-AFbORS and P-DFbORS, respectively. We also examine the traditional AF and DF based optimal relay selection (i.e., T-AFbORS and T-DFbORS) and multiple relay combining (i.e., T-AFbMRC and T-DFbMRC) as benchmark schemes. Secondly, we derive closed-form expressions of intercept probability for the P-AFbORS and P-DFbORS as well as the T-AFbORS, T-DFbORS, T-AFbMRC and T-DFbMRC schemes in Rayleigh fading channels. It is shown that for both AF and DF protocols, the intercept probability of proposed optimal relay selection is always smaller than that of the traditional relay selection and multiple relay combining approaches, which shows the advantage of proposed optimal relay selection. Finally, we evaluate the diversity order performance of optimal relay selection schemes and show that no matter which relaying protocol is considered, the proposed and traditional optimal relay selection schemes both achieve the same diversity order M , where M represents the number of relays.
The remainder of this paper is organized as follows. Section II presents the system model and proposes the conventional direct transmission, T-AFbORS, T-DFbORS, T-AFbMRC, T-DFbMRC, P-AFbORS, and P-DFbORS schemes. In Section III, we derive closed-form intercept probability expressions of the direct transmission, T-AFbORS, T-DFbORS, T-AFbMRC, T-DFbMRC, P-AFbORS, and P-DFbORS schemes in the presence of eavesdropping attack. In Section IV, we analyze the diversity order performance of the traditional and proposed relay selection schemes. Next, in Section V, numerical evaluation is conducted to show the advantage of proposed optimal relay selection over traditional relay selection and multiple relay combining approaches in terms of the intercept probability. Finally, we make some concluding remarks in Section VI.

A. System Model
Consider a cooperative wireless network consisting of one source, one destination, and M relays in the presence of an eavesdropper as shown in Fig. 1, where all nodes are equipped with single antenna and the solid and dash lines represent the main and wiretap links, respectively. The main and wiretap links both are modeled as Rayleigh fading channels and the thermal noise received at any node is modeled as a complex Gaussian random variable with zero mean and variance σ 2 n , i.e., CN (0, σ 2 n ). Following [14], we consider that M relays are exploited to assist the transmission from source to destination and the direct links from source to destination and eavesdropper are not available, e.g., the destination and eavesdropper both are out of the coverage area. For notational convenience, M relays are denoted by R = {R i |i = 1, 2, · · · , M }. Differing from the existing work [14] in which all relays participate in forwarding the source messages to destination, we here consider the use of the optimal relay only to assist the message transmission from source to destination. More specifically, the source node first broadcasts the message to cooperative relays among which only the best relay will be selected to forward its received signal to destination by using either amplify-and-forward (AF) or decode-and-forward (DF) strategies. Meanwhile, the eavesdropper monitors the transmission from the optimal relay to destination and attempts to interpret the source message. Following [11] and [14], we assume that the eavesdropper knows everything about the signal transmission from source via relay to destination, including the encoding scheme at source, forwarding protocol at relays, and decoding method at destination, except that the source signal is confidential.
It is pointed out that in order to effectively prevent the eavesdropper from intercepting, the optimal relay selection not only has to consider the CSI of main links to maximize the channel capacity from source to destination, but also needs to take into account the wiretap links' CSI to minimize the channel capacity from source to eavesdropper. This differs from the traditional relay selection in [20]- [22] where only the two-hop relay links' CSI is considered in performing the best relay selection. Similarly to [14] and [23], we here assume that the global CSI of both main and wiretap links is available, which is a common assumption in the physical-layer security literature. Notice that the wiretaps link's CSI can be estimated and obtained by monitoring the eavesdropper's transmissions as discussed in [23]. Moreover, if the eavesdropper's CSI is unknown, we can consider the use of traditional relay selection [20]- [22] which does not require the CSI of wiretap links. In the following, we first present the conventional direct transmission without relay as a benchmark scheme and then propose the AF and DF based optimal relay selection schemes to improve the physical-layer security against eavesdropping attack.

B. Direct Transmission
For comparison purpose, this subsection describes the conventional direct transmission without relay. Consider that the source transmits a signal s (E(|s| 2 ) = 1) with power P . Thus, the received signal at destination is expressed as where h sd represents a fading coefficient of the channel from source to destination and n d ∼ CN (0, σ 2 n ) represents additive white Gaussian noise (AWGN) at destination. Notice that the channel coefficient h sd is modeled as Rayleigh fading which corresponds to an ideal OFDM subchannel [24] and [25]. Meanwhile, due to the broadcast nature of wireless transmissions, the eavesdropper also receives a copy of the source signal s and the corresponding received signal is written as where h se represents a fading coefficient of the channel from source to eavesdropper and n e ∼ CN (0, σ 2 n ) represents AWGN at eavesdropper. Assuming the optimal Gaussian codebook used at source, the maximal achievable rate (also known as channel capacity) of the direct transmission from source to destination is obtained from Eq. (1) as where σ 2 n is the noise variance. Similarly, from Eq. (2), the capacity of wiretap link from source to eavesdropper is easily given by It has been proven in [10] that the secrecy capacity is shown as the difference between the capacity of main link and that of wiretap link. Hence, the secrecy capacity of direct transmission is given by where C direct sd and C direct se are given in Eqs. (3) and (4), respectively. As discussed in [10], when the secrecy capacity is negative (i.e., the capacity of main link falls below the wiretap link's capacity), the eavesdropper will succeed in intercepting the source signal and an intercept event occurs. Thus, the probability that the eavesdropper successfully intercepts source signal, called intercept probability, is a key metric in evaluating the performance of physical-layer security. In this paper, we mainly focus on how to improve the intercept probability by exploiting cooperative relays for the physical-layer security enhancement. The following subsections propose the optimal relay selection by considering AF and DF protocols, respectively.

C. Amplify-and-Forward
In this subsection, we consider the AF relaying protocol in which the relay will forward a scaled version of its received source signal to destination without any sort of decoding. To be specific, the source node first broadcasts the signal s to M relays. Then, the optimal relay node will be selected to transmit a scaled version of its received signal. Notice that in the AF relaying process, the source signal s is transmitted twice from the source and relay. In order to make a fair comparison with the direct transmission, the total amount of transmit power at source and relay shall be limited to P . By using the equal-power allocation for simplicity, the transmit power at source and relay is given by P/2. Thus, considering that the source node transmits its signal s with power P/2, the received signal at relay R i can be given by where h si represents a fading coefficient of the channel from source to R i and n i ∼ CN (0, σ 2 n ) represents AWGN at R i . Without loss of generality, consider that R i is selected as the optimal relay to forward its received signal to destination. Assuming that the CSI h si is available, R i first performs coherent detection by multiplying r i with h * si and then normalizes h * si r i with a scaling factor . After that, R i transmits the normalized h * si r i with power P/2 to destination, thus the received signal at destination is given by from which the capacity of AF relaying transmission from R i to destination is given by Meanwhile, the received signal at eavesdropper from R i is expressed as Similarly to Eq. (8), we obtain the capacity of AF relaying transmission from R i to eavesdropper as Combining Eqs. (8) and (10), we can easily obtain the secrecy capacity of AF relaying transmission with R i as Next, we discuss how to determine the optimal relay and propose the AF based optimal relay selection scheme denoted by P-AFbORS for notational convenience. For the comparison purpose, the traditional AF based optimal relay selection and multiple relay combining (i.e., T-AFbORS and T-AFbMRC) are also presented.
1) P-AFbORS: Now, let us consider the P-AFbORS scheme in which the relay that maximizes the secrecy capacity of AF relaying transmission is viewed as the optimal relay. Thus, the AF based optimal relay selection criterion can be obtained from Eq. (11) as where R represents a set of M relays. One can observe from Eq. (12) that the P-AFbORS scheme takes into account not only the main links' CSI |h si | 2 and |h id | 2 , but also the wiretap link's CSI |h ie | 2 . Notice that the transmit power P in Eq. (12) is a known parameter and the noise variance σ 2 n is shown as σ 2 n = κT B [26], where κ is Boltzmann constant (i.e., κ = 1.38 × 10 −23 ), T is room temperature, and B is system bandwidth. Since the room temperature T and system bandwidth B both are predetermined, the noise variance σ 2 n can be easily obtained. It is pointed out that using the proposed optimal relay selection criterion in Eq. (12), we can further develop a centralized or distributed relay selection algorithm. To be specific, for a centralized relay selection, the source node needs to maintain a table that consists of M relays and related CSI (i.e., |h si | 2 , |h id | 2 and |h ie | 2 ). In this way, the optimal relay can be easily determined by looking up the table using the proposed criterion in Eq. (12), which is referred to as centralized relay selection strategy. For a distributed relay selection, each relay maintains a timer and sets an initial value of the timer in inverse proportional to , resulting in the optimal relay with the smallest initial value for its timer. As a consequence, the optimal relay exhausts its timer earliest compared with the other relays, and then broadcasts a control packet to notify the source node and other relays [21].
2) T-AFbORS: For the purpose of comparison, we here present the traditional AF based optimal relay selection (T-AFbORS) scheme. Since the wiretap link's CSI |h ie | 2 is not considered in T-AFbORS scheme, the relay with the largest C AF id (i.e., the capacity of AF relaying transmission from R i to destination) is selected as the optimal relay. Therefore, the traditional AF based optimal relay selection criterion is obtained from Eq. (8) as which is the traditional harmonic mean policy as given by Eq.
(2) in [20]. It is shown from Eq. (13) that only the main links' CSI |h si | 2 and |h id | 2 is taken into account in the T-AFbORS scheme, differing from the P-AFbORS scheme that requires the CSI of both main and wiretap links (i.e., |h si | 2 , |h id | 2 and |h ie | 2 ).
3) T-AFbMRC: This subsection presents the traditional AF based multiple relay combining (T-AFbMRC) scheme, where all AF relays participate in forwarding the source signal transmission to destination which combines its received signals from the multiple AF relays. Notice that in the T-AFbMRC scheme, the total amount of transmit power consumed at the source and M relays should be constrained to a fixed value (i.e., P ). With the equal-power allocation, the transmit power for each node (e.g., the source and relays) is given by P/(M + 1). Thus, the source node first transmits the signal s with power P/(M + 1) to M relays that will normalize their received signals with respective scaling factors wherein i = 1, 2, · · · , M . Then, all relays forward their normalized signals to destination with power P/(M + 1). Hence, the received signal at destination from relay R i can be expressed as where n i and n i d represent AWGN received at relay R i and destination, respectively. The destination combines its received signals from multiple AF relays, where the combining coefficient |h si | 2 h * id is considered for the received signal r i d from relay R i . Accordingly, the combined signal denoted by r d at destination is given by from which the transmission capacity from source to destination via M relays with the T-AFbMRC scheme is given by where H(h si , h id ) = |h si | 2 |h id | 4 + |h si | 4 |h id | 2 and σ 2 n represents the noise variance. Also, the transmission capacity from source to eavesdropper with the T-AFbMRC scheme is similarly obtained as where H(h si , h ie ) = |h si | 2 |h ie | 4 + |h si | 4 |h ie | 2 . Hence, the secrecy capacity of T-AFbMRC scheme is shown as where C AFbMRC sd and C AFbMRC se are given by Eqs. (16) and (17), respectively.

D. Decode-and-Forward
This subsection mainly focuses on the DF relaying protocol in which the relay first decodes its received signal from source and then re-encodes and transmits its decoded outcome to the destination. More specifically, the source node first broadcasts the signal s to M relays that attempt to decode their received signals. Then, only the optimal relay is selected to re-encode and transmit its decoded outcome to the destination. Similarly to AF relaying protocol, the total transmit power at source and relay with DF protocol is also limited to P in order to make a fair comparison with the direct transmission. Considering the equal-power allocation, we obtain the transmit power at source and relay as P/2. It has been shown in [2] that the capacity of DF relaying transmission is the minimum of the capacity from source to relay and that from relay to destination, since either source-relay or relay-destination links in failure will result in the two-hop DF transmission in failure. Hence, considering R i as the optimal relay, we can obtain the capacity of DF transmission from source via R i to destination as where C si and C id , respectively, represent the channel capacity from source to R i and that from R i to destination, which are given by and Meanwhile, the eavesdropper can overhear the transmission from R i to destination. Hence, the channel capacity from R i to eavesdropper can be easily obtained as Combining Eqs. (19) and (22), the secrecy capacity of DF relaying transmission with R i is given by In the following subsections, we present the P-DFbORS and T-DFbORS schemes, respectively. For the comparison purpose, the traditional DF based multiple relay combining (T-DFbMRC) scheme is also discussed. 1) P-DFbORS: Let us first consider P-DFbORS scheme. Similarly to P-AFbORS scheme, we consider the relay that maximizes the secrecy capacity of DF relaying transmission as the optimal relay. Thus, the DF based optimal relay selection criterion is easily obtained from Eq. (23) as which shows that the global CSI of both main and wiretap links (i.e., |h si | 2 , |h id | 2 and |h ie | 2 ) is required in determining the optimal relay.
2) T-DFbORS: We now present the traditional DF based optimal relay selection (T-DFbORS) scheme in which the relay that maximizes the capacity of DF relaying transmission C DF sid is selected as the optimal relay. Thus, the traditional DF based optimal relay selection criterion is obtained from Eq. (19) as which is the traditional max-min relay selection criterion as given by Eq.
(1) in [20]. As shown in Eq. (25), only the main links' CSI |h si | 2 and |h id | 2 is taken into account in T-DFbORS scheme without considering the wiretap link's CSI |h ie | 2 .

3) T-DFbMRC:
This subsection presents the T-DFbMRC scheme where multiple DF relays will assist the signal transmission from source to destination. To be specific, the source node first transmits its signal s with power P/2 to M relays which then attempt to decode their received signals. For notational convenience, these relays that succeed in decoding the source signal are represented by a set D, called decoding set, where the sample space of decoding set is given by where ∪ denotes the union operation, ∅ denotes empty set, and D m denotes a non-empty subcollection of M relays. If the decoding set is empty (i.e., all relays fail to decode the source signal), no relay will transmit and thus both the destination and eavesdropper can not interpret the source signal. If the decoding set D is not empty (i.e., D = D m ), all relays in D m are selected to forward their decoded outcomes to destination, where the total transmit power of multiple relays in the decoding set is constrained to P/2. With the equalpower allocation, the transmit power for each relay in decoding set D m is given by P/|D m |, where |D m | represents the cardinality of set D m (i.e., the number of elements in set D m ). Thus, considering that relay R i ∈ D m transmits its decoded result s with power P/|D m |, the received signal at destination is given by Then, the destination combines its received signals from multiple DF relays in decoding set D m with the maximal ratio combining. Thus, the combined signal denoted by r d at destination can be written as from which the transmission capacity from source to destination with the T-DFbMRC scheme in the case of D = D m is given by where σ 2 n represents the noise variance. Similarly, the transmission capacity from source to eavesdropper with the T-DFbMRC scheme can be obtained as Hence, combining Eqs. (28) and (29), the secrecy capacity of T-DFbMRC scheme in the case of D = D m is given by which completes the signal modeling of T-DFbMRC scheme.

III. INTERCEPT PROBABILITY ANALYSIS OVER RAYLEIGH FADING CHANNELS
In this section, we derive closed-form intercept probability expressions of conventional direct transmission, P-AFbORS, P-DFbORS, T-AFbORS, T-DFbORS, T-AFbMRC, and T-DFbMRC schemes over Rayleigh fading channels.

A. Direct Transmission
Let us first analyze the intercept probability of direct transmission as a baseline for comparison purpose. As is known, an intercept event occurs when the secrecy capacity becomes negative. Thus, the intercept probability of direct transmission is obtained from Eq. (5) as where the second equation is obtained by using Eqs. (3) and (4). Since the Rayleigh fading model is used throughout this paper, we can obtain that |h sd | 2 and |h se | 2 follow exponential distributions. Thus, a closed-form intercept probability expression of direct transmission is given by where σ 2 se = E(|h se | 2 ) and σ 2 sd = E(|h sd | 2 ). It is observed from Eq. (32) that the intercept probability of direct transmission is independent of the transmit power P , which implies that the wireless security performance cannot be improved by increasing the transmit power. This also motivates us to exploit cooperative relays to decrease the intercept probability and improve the physical-layer security.

B. P-AFbORS
In this subsection, we present the intercept probability analysis of P-AFbORS scheme. Considering the fact that an intercept event occurs when the secrecy capacity falls below zero, we can obtain the intercept probability of P-AFbORS scheme from Eq. (12) as where the second equation is obtained by using Eq. (11). Considering that |h ie | 2 and |h id | 2 are independent exponentially distributed random variables, we obtain where σ 2 ie = E(|h ie | 2 ) and σ 2 id = E(|h id | 2 ).

C. P-DFbORS
This subsection derives a closed-form intercept probability expression of P-DFbORS scheme. According to the definition of intercept event, an intercept probability of P-DFbORS scheme is obtained from Eq. (24) as where the second equation is obtained by using Eq. (23). Notice that random variables |h si | 2 , |h id | 2 and |h ie | 2 follow exponential distributions with means σ 2 si , σ 2 id and σ 2 ie , respectively. Denoting X = min(|h si | 2 , |h id | 2 ), we can easily obtain the cumulative density function (CDF) of X as wherein x ≥ 0. Using Eq. (36), we have Substituting Eq. (37) into Eq. (35) gives In addition, we can easily prove which theoretically shows that the intercept probability of P-AFbORS scheme is strictly less than that of P-DFbORS scheme, implying the advantage of AF relaying protocol over DF protocol from the physical-layer security perspective.

D. T-AFbORS
In this subsection, we present the intercept probability analysis of T-AFbORS scheme. From Eq. (13), we obtain an intercept probability of T-AFbORS scheme as where C AF oe denotes the channel capacity from the optimal relay to eavesdropper. It is pointed out that the T-AFbORS scheme does not consider the eavesdropper's CSI |h ie | 2 . This means that the traditional relay selection is independent of the eavesdropper's channel information. Using the law of total probability, the intercept probability of T-AFbORS scheme is given by For simplicity, we here consider that fading coefficients h si and h id (i = 1, · · · , M ) are identically and independently distributed, leading to Pr (OptimalRelay = m) = 1/M . Substituting this result and Eq. (13) into Eq. (41) yields It is noted that obtaining a closed-form solution to Eq. (42) is challenging, however numerical intercept probability results of T-AFbORS scheme can be easily obtained through computer simulations.

E. T-DFbORS
This subsection analyzes the intercept probability of T-DFbORS scheme in Rayleigh fading channels. From Eq. (25), we obtain an intercept probability of T-DFbORS scheme as where C DF oe denotes the channel capacity from the optimal relay to eavesdropper with DF relaying protocol. Similarly, assuming that h si and h id (i = 1, · · · , M ) are identically and independently distributed and using the law of total probability, the intercept probability of T-DFbORS scheme is given by Notice that |h si | 2 , |h id | 2 and |h me | 2 follow exponential distributions with means σ 2 si , σ 2 id and σ 2 me , respectively. Letting x = |h me | 2 , we obtain Eq. (45) at the top of following page, where the second equation is obtained by using the binomial expansion, A k represents the k-th non-empty sub-collection of M relays, and |A k | represents the number of elements in set A k .

F. T-AFbMRC
This subsection presents the intercept probability analysis of T-AFbMRC scheme. From Eq. (18), an intercept probability of the T-AFbMRC scheme is obtained as (46) Substituting Eqs. (16) and (17) into Eq. (46) gives where 47), the numerical intercept probability results of T-AFbMRC scheme can be easily determined through computer simulations.

G. T-DFbMRC
In this subsection, the intercept probability analysis of T-DFbMRC scheme is presented. Using the law of total probability, we can obtain an intercept probability of the T-DFbMRC scheme from Eq. (30) as where Pr (D = D m ) represents the probability of occurrence of event D = D m . Notice that if the decoding set is empty, all relays keep silent and nothing is transmitted, implying that the eavesdropper can not intercept the source signal. Substituting Eqs. (28) and (29) into Eq. (48) yields According to Shannon's channel coding theorem, relay R i can succeed in decoding the source signal if no outage event occurs over the channel from source to relay R i . Otherwise, relay R i is deemed to fail to decode the source signal. Thus, the probability of occurrence of event D = D m can be given by

IV. DIVERSITY ORDER ANALYSIS
In this section, we analyze the diversity order performance of the traditional and proposed optimal relay selection schemes including the T-AFbORS, T-DFbORS, P-AFbORS, and P-DFbORS. Let us first recall the traditional definition of diversity gain. As shown in [27], the traditional diversity gain is given by where SNR denotes signal-to-noise ratio (SNR) and P e (SNR) denotes bit error rate. One can observe from the preceding equation that the traditional diversity gain is defined as SNR → ∞. However, the intercept probability expressions as shown in Eqs. (32), (34) and (38) are independent of SNR, resulting in that the traditional diversity gain definition is not applicable here. To that end, we propose a generalized diversity gain as follows where λ de = σ 2 sd /σ 2 se is the ratio of average channel gain from source to destination to that from source to eavesdropper, which is referred to as the main-to-eavesdropper ratio (MER) throughout this paper.

A. Direct Transmission
Let us first analyze the diversity order of direct transmission as a baseline. From Eqs. (32) and (52), the diversity order of direct transmission is obtained as which shows that the direct transmission achieves the diversity order of only one, i.e., the intercept probability of direct transmission scheme behaves as 1 λ de in high main-to-eavesdropper ratio (MER) regions.

B. P-AFbORS
This subsection presents the diversity order analysis of P-AFbORS scheme. Similarly, the diversity order of P-AFbORS scheme is given by where P P-AFbORS intercept is given in Eq. (34). Denoting σ 2 id = α id σ 2 sd and σ 2 ie = α ie σ 2 se , we can rewrite P P-AFbORS intercept from Eq. (34) as where λ de = σ 2 sd /σ 2 se . Substituting Eq. (55) into Eq. (54) gives which shows that the diversity order M is achieved by P-AFbORS scheme. One can see that as the number of relays M increases, the diversity order of P-AFbORS scheme increases accordingly, showing that increasing the number of relays can significantly improve the intercept probability performance.

D. T-AFbORS
We now examine the diversity order of T-AFbORS scheme. The diversity order of T-AFbORS scheme is given by where P T-AFbORS intercept is given in Eq. (42). Denoting X = |h sm | 2 and Y = |h me | 2 and using the conditional probability, we obtain Eq. (61), where f (x, y) represents a joint probability density function (PDF) of (X, Y ). Considering that X and Y are independent exponentially distributed, the joint PDF f (x, y) is given by where σ 2 sm = E(|h sm | 2 ) and σ 2 me = E(|h me | 2 ). Using inequalities 1 ) min(x, y)] and f (x, y) is given by Eq. (62). Proposition 1: Given independent exponential random variables x and y with respective means σ 2 sm and σ 2 me , the following equations hold, for λ de → ∞, where λ de = σ 2 sd /σ 2 se . Proof: See Appendix A for details. Using Proposition 1 and denoting σ 2 si = α si σ 2 sd , σ 2 id = α id σ 2 sd , σ 2 sm = α sm σ 2 sd , σ 2 md = α md σ 2 sd and σ 2 me = α me σ 2 se , we obtain from Eq. (64) as Eq. (65) with λ de → ∞ at the top of following page. Ignoring the higher-order terms in Eq. (65), we have Substituting Eq. (66) into Eq. (60) gives In addition, considering inequalities , we obtain an upper bound on the intercept probability of T-AFbORS scheme as Similarly to Eq. (66), we can obtain for λ de → ∞. Substituting Eq. (69) into Eq. (60) gives Therefore, by combining Eqs. (67) and (70), the diversity order of T-AFbORS scheme is readily obtained as which shows that the diversity order M is achieved by T-AFbORS scheme.

E. T-DFbORS
In this subsection, we present the diversity order analysis of T-DFbORS scheme. Using Eq. (52), we obtain the diversity order of T-DFbORS scheme as where P T-DFbORS intercept is given in Eq. (45). From Proposition 1, we can similarly obtain for λ de → ∞ by using the Taylor series expansion and ignoring higher-order terms, from which P T-DFbORS intercept can be obtained as where α si = σ 2 si /σ 2 sd , α id = σ 2 id /σ 2 sd , and α me = σ 2 me /σ 2 se . Substituting Eq. (73) into Eq. (72) yields

V. NUMERICAL RESULTS AND DISCUSSIONS
This section presents the numerical intercept probability results of conventional direct transmission, T-AFbORS, T-DFbORS, T-AFbMRC, T-DFbMRC, P-AFbORS and P-DFbORS schemes. We show that for both AF and DF protocols, the proposed optimal relay selection outperforms the traditional relay selection and multiple relay combining approaches in terms of intercept probability. Moreover, numerical results also illustrate that as the number of relays increases, the intercept probabilities of P-AFbORS and P-DFbORS schemes significantly decrease, showing the security improvement by exploiting cooperative relays. Fig. 2 shows the intercept probability comparison among the direct transmission, P-AFbORS, T-AFbORS, and T-AFbMRC schemes by plotting Eqs. (32), (34), (42) and (47) as a function of MER. It is shown from Fig. 2 that the T-AFbORS, T-AFbMRC, and P-AFbORS schemes all perform better than the direct transmission in terms of intercept probability, implying the security benefits of exploiting cooperative relays to defend against eavesdropping attack. One can also see from Fig. 2 that the intercept probability performance of T-AFbMRC scheme is worse than that of T-AFbORC scheme which performs worse than the P-AFbMRC scheme, showing the advantage   of proposed optimal relay selection over both the traditional relay selection and multiple relay combining approaches.
In Fig. 3, we show the numerical intercept probability results of various DF based optimal relay selection and multiple relay combining schemes, in which the intercept probability curves of direct transmission, P-DFbORS, T-DFbORS, and T-DFbMRC schemes are plotted by using Eqs. (32), (38), (45), and (49) with Pout i = 10 −3 and α si = α id = α ie = 1. Fig. 3 shows that the intercept probability of P-DFbORS scheme is always smaller than that of T-DFbMRC scheme which further outperforms the T-DFbORS scheme in terms of intercept probability. In other words, the P-DFbORS scheme achieves the best intercept probability performance, further confirming the advantage of proposed optimal relay selection over traditional relay selection and multiple relay combining. Therefore, no matter which relaying protocol (i.e., AF and DF) is considered, the proposed optimal relay selection always performs better than the traditional relay selection and multiple relay combining approaches in terms of intercept probability.  λ de = 3dB and α si = α id = α ie = 1. It is observed from Fig. 5 that the P-AFbORS scheme strictly performs better the P-DFbORS scheme in terms of intercept probability. One can also see from Fig. 5 that as the number of relays M increases, the intercept probabilities of both P-AFbORS and P-DFbORS schemes significantly decrease, showing the wireless security improvement with an increasing number of relays. In addition, as shown in Fig. 5, the intercept probability improvement of P-AFbORS over P-DFbORS becomes more significant as the number of relays increases.

VI. CONCLUSION
In this paper, we explored the relay selection for improving physical-layer security in cooperative wireless networks and proposed the AF and DF based optimal relay selection schemes, i.e., P-AFbORS and P-DFbORS. For the purpose of comparison, we also examined the conventional direct transmission, T-AFbORS, T-DFbORS, T-AFbMRC, and T-DFbMRC schemes. We derived closed-form intercept probability expressions of the direct transmission, T-AFbORS, T-DFbORS, T-AFbMRC, T-DFbMRC, P-AFbORS and P-DFbORS schemes over Rayleigh fading channels. We further analyzed the diversity order performance of the traditional and proposed optimal relay selection schemes and showed that for both AF and DF protocols, the proposed and traditional relay selection schemes achieve the diversity order M , where M is the number of cooperative relays. Numerical results also illustrated that no matter which relaying protocol is considered (i.e., AF and DF), the proposed optimal relay selection strictly outperforms the traditional relay selection and multiple relay combining approaches in terms of intercept probability. In addition, as the number of relays increases, the intercept probability performance of both P-AFbORS and P-DFbORS significantly improves, implying the wireless security enhancement with an increasing number of cooperative relays.
It is worth mentioning that we only investigated the singlesource and single-destination for cooperative relay networks in this paper. In future, we will extend the results of this paper to a general case with multiple-source and multipledestination, for which the opportunistic transmission scheduling may be exploited to defend against eavesdropping attack. More specifically, a source node with the highest secrecy capacity can be opportunistically scheduled to transmit to its destination. Once a source-destination pair is determined with the transmission scheduling policy, we can consider the use of optimal relay selection developed in this paper to assist the transmission between source and destination against the eavesdropping attack. ) min(x, y) and using the joint PDF of (X, Y ) in Eq. (62), we can obtain the mean of z as where α si = σ 2 si /σ 2 sd , α id = σ 2 id /σ 2 sd , α sm = σ 2 sm /σ 2 sd , and α me = σ 2 me /σ 2 se . Considering λ de → ∞ and ignoring the higher-order term, we have which shows that E(z) converges to zero as λ de → ∞. Moreover, using Eq. (62) and letting λ de → ∞, we can obtain E(z 2 ) as E(z 2 ) = ( α me 2α si + α me 2α si ) 2 · One can observe from Eqs. (A.7) and (A.8) that both mean and variance of t approach to zero as λ de → ∞, meaning that t → 0 as λ de → ∞. Hence, considering λ de → ∞ and using Taylor series expansion, we obtain