Relay Selection for Security Improvement in Cognitive Radio Networks with Energy Harvesting

This paper selects an unlicensed relay among available self-powered relays to not only remain but also secure information transmission from an unlicensed source to an unlicensed destination. The relays harvest energy in signals of the unlicensed source and the licensed transmitter. Then, they spend the harvested energy for their relaying operation. Conditioned on the licensed outage restriction, the peak transmission power restriction, Rayleigh fading, and the licensed interference, the current paper proposes an exact closed-form formula of the secrecy outage probability to quickly evaluate the secrecy performance of the proposed relay selection method in cognitive radio networks with energy harvesting. The proposed formula is corroborated by computer simulations. Several results illustrate the effectiveness of the relay selection in securing information transmission. Additionally, the security capability is saturated at large peak transmission powers or large preset outage probabilities of licensed users. Furthermore, the security capability depends on many specifications among which the power splitting ratio, the relays’ positions, and the time switching ratio can be optimally selected to obtain the best security performance.


Introduction
In cognitive radio networks, unlicensed users are supported to use opportunistically the allotted frequencies of licensed users to improve significantly the spectrum utilization efficiency, which is currently low [1]. Amidst three typical operation mechanisms of cognitive radios (interweave, underlay, overlay), the underlay one has received more attention because of its low system design complexity [2]. Following this trend, our work also considers this mechanism. The underlay mechanism requires the power allotment for unlicensed users strictly subject to the licensed outage constraint (This paper uses "constraint" and "restriction" interchangeably) inflicted by communication reliability of licensed users and the peak transmission power restriction imposed by hardware design [3]. These power constraints bound the transmission power of unlicensed users, inducing insufficient power to reliably transmit information directly from an unlicensed source to an unlicensed destination. Additionally, severe wave propagation conditions (heavy path-loss, strong shadowing, and severe fading) induce communication outage for the direct channel between the unlicensed sourcedestination pair. Therefore, exploiting unlicensed relays in this direct link can significantly mitigate these severe wave propagation conditions and eliminate the need of large transmission power over a wide coverage range. Consequently, the relays can play a role as a bridge for the source information to reach the destination. Instead of exploiting all available relays which either transmit simultaneously in one orthogonal channel or sequentially in several orthogonal channels, selecting one relay among them according to a certain criterion is considered as an efficient-and-economical solution in terms of complexity, power, and bandwidth [4][5][6][7][8][9][10][11]. However, as an assistant, the selected relay may be unwilling to consume its individual energy for assistant activity. Nowadays, advanced technologies allow wireless users to power their operations by the harvested radio frequency (RF) energy [12][13][14][15]. As a result, the selected relay can extend the coverage range of the unlicensed source with the harvested energy, better maintaining reliable source-todestination communications. Nevertheless, the harvested energy is limited and, thus, the issue is whether the selected relay can ensure secure-and-reliable communication for source data against the eavesdropping of wire-tappers in the viewpoint of information theory. This viewpoint affirms that the positive subtraction of the wire-tap channel capacity from the main channel capacity ensures the secured communications [16]. The current paper solves such an issue.
1.1. Previous Works. While most recent publications focused on securing direct transmission (i.e., without relaying [17][18][19][20][21][22][23]) and relaying transmission (i.e., without relay selection [24][25][26][27][28]) in cognitive radio networks with energy harvesting (CRNwEH) by the physical layer security technique (e.g., [29][30][31][32][33]), to the best of our understanding only three works in [34][35][36] mentioned the relay selection in these networks. To be specific, [34] studied the security capability of the conventional reactive relay selection in CRNwEH in terms of the secrecy outage probability (SOP) through Monte-Carlo simulations under the (peak transmission and interference) power constraints. The conventional reactive relay selection selects one relay which produces the highest signal-to-noise ratio (SNR) to the destination as compared to all remaining relays. Additionally, [34] considered the time switching protocol for energy harvesting, which enables the relay to harvest energy from merely the unlicensed source signal. To improve the security capability, [35] suggested a link selection method in which the link (A link is a multihop communication link through which the unlicensed source transmits information to the unlicensed destination via multiple unlicensed relays) of the largest capacity is adopted. Also, [35] permitted the relays to scavenge the energy in the beacon signals with the time switching protocol. Furthermore, [35] solely analyzed the connection outage probabilities (The connection outage probability indicates the possibility that the received SNR is smaller than a target value) of the wire-tapper and the unlicensed destination. Recently, ([37] is the conference version of [36]. In [37], a part of the results of [36] was briefly presented without any proof. However, the direct link was considered in [37] but not in [36]) [36] suggested a relay selection method where the adopted relay must successfully recover the unlicensed source's information and minimize the SNR at the wire-tapper. In [36], the (peak transmission and interference) power constraints were imposed on the unlicensed transmission power, and the power splitting protocol was considered for energy harvesting. Additionally, [36] only analyzed the intercept outage probability (The intercept outage probability signifies the possibility that the SNR at the wire-tapper is lower than a target value). In addition, [34][35][36] neglected the interference from the licensed transmitter (shortly, licensed interference). In general, the licensed interference should be considered in the underlay mechanism because both licensed and unlicensed users transmit on the same wireless channel. Moreover, the licensed interference is useful for energy harvesting at relays. Furthermore, none of [34][35][36] neither investigated the licensed outage constraint nor analyzed the SOP, a key security capability indicator in the viewpoint of information theory.

1.2.
Motivations. This paper extends [34,36] with the following remarkable differences (Since the system models in [34,36] and ours are completely different, it is impossible to compare their security performance under the same system parameters): (i) The relays work solely as they are able to recover successfully the unlicensed source's information.
Such an operation of the relays avoids the error propagation (e.g., [34]) (ii) The proposed relay selection method (It is obvious that this paper completely differs [35] because the former proposed the relay selection while the latter proposed the link selection) selects one relay which produces the largest maximum secrecy rate (As recommended by the reviewer, "maximum secrecy rate" should be used in this paper instead of "secrecy capacity" which is normally used in the literature) as compared to activated relays. On the contrary, [34] selects one relay which produces the largest SNR to the unlicensed destination as compared to all remaining relays, and [36] selects one relay which produces the smallest SNR to the wire-tapper as compared to activated relays. Therefore, the relay selection method in [34] only concentrated on improving the main (the unlicensed selected relay to the unlicensed destination) channel capacity while that in [36] merely focused on degrading the wire-tap (the unlicensed selected relay to the wiretapper) channel capacity. It is reminded that the subtraction of the wire-tap channel capacity from the main channel capacity is the maximum secrecy rate [16]. Accordingly, our relay selection is more complete than [34,36] in improving and evaluating the security performance in the viewpoint of information theory (iii) The licensed interference is investigated in analyzing the security performance of the relay selection in CRNwEH while [34,36] ignored this interference. Considering this interference complicates the performance analysis but valuable because the licensed interference should not be neglected in the underlay mechanism in general (iv) The relays take advantage of the licensed interference for energy harvesting. Apparently, converting unexpected signals to advantageous energy sources is valuable and this also distinguishes [34,36] where the energy in the licensed interference is not harvested at relays (v) The power splitting based energy harvesting method is employed in this paper while [34] uses the time switching based energy harvesting method (vi) Our work suggests the precise closed-form SOP analysis that distinguishes [34] where merely simulation results were provided and [36] where the intercept outage probability (IOP) was analyzed. It 2 Wireless Communications and Mobile Computing is reminded that the SOP analysis in this paper is more complete than the IOP analysis in [36] because the former considers both the wire-tap and main channels while the latter only investigated the wire-tap channel. Moreover, our SOP analysis considers the licensed outage constraint while [34,36] ignored it 1.3. Contributions. Our work contributes the following: (i) Propose the relay selection method for securing the unlicensed source-to-destination information transmission in case that their direct link is blocked. The proposed method maximizes the maximum secrecy rate in the information processing stage, and the relays are able to scavenge the energy in both signals of the licensed transmitter and the unlicensed source based on the power splitting protocol. Moreover, the relays must correctly restore the unlicensed source's information before relaying it (ii) Propose exact closed-form expressions for principal security capability indicators including the SOP, the intercept probability (IP), the probability of strictly positive maximum secrecy rate (PSPMSR) under both licensed outage restriction and peak transmission power restriction, and the licensed interference to quickly assess the secrecy performance of the relay selection in CRNwEH without the need of exhaustive simulations (iii) Exploit the suggested formulas to optimally select pivotal system parameters (iv) Supply multiple results to achieve helpful insights into the security capability; for example, the minimum SOP accomplishable with reasonable selection of the time switching ratio, the relays' positions, and the power splitting ratio; the secrecy performance saturation at high peak transmission powers or high preset outage probabilities of licensed users 1.4. Paper Structure. The next part describes maximum secrecy rate, signal model, system model, unlicensed power allocation, and relay selection. Part 3 presents the detailed derivation of essential performance indicators including the IP, the SOP, and the PSPMSR. Part 4 shows analytical/simulated results, and Part 5 closes our work.  In Stage I, both the licensed transmitter ðLTÞ and US concurrently transmit their legitimate information to the licensed receiver ðLRÞ and UD, correspondingly, inducing mutual interferences between the unlicensed and licensed networks. The unlicensed interferences (i.e., in the unli-censed to licensed direction) are well investigated in open literature but the licensed interferences (i.e., in the licensed to unlicensed direction) are normally ignored (e.g., [5, 6, 8, 17, 21-26, 28, 34-37]). As such, by integrating these mutual interferences into the system model, the current paper is undoubtedly more general than published ones yet the performance analysis is more complicated. The wire-tapper ðWÞ purposely eavesdrops the US's information. Due to bad propagation conditions, the US's signals are unable to be reliably received by UD and W. Therefore, it is advisable to ask the unlicensed relays ðUR i Þ, i ∈ ½1, K, in the transmission range of US for relaying the US's information to UD. In order to save bandwidth and power, this paper just selects one relay, namely, UR b , from a subset of relays which successfully decodes the US's information. Moreover, in order to avoid the waste of energy for relaying operation, the relays are assumed to relay with the energy scavenged from the RF signals. The energy harvesting is implemented with the power splitting protocol (e.g., [38,39]) as seen in Figure 2(b). More specifically, the signals of LT and US provide the RF energy for UR i to harvest. Accordingly, this paper exploits even the interference from LT as a useful energy supply. The power of UR i 's received signal is split into two portions: one for restoring the US's information (Most previous works (e.g., [5, 12, 17-19, 21-28, 34-39]) omitted the power consumption of the information decoder. The current paper also follows this assumption) and another for harvesting the energy.

System Description
In Stage II, the adopted relay UR b restores the US's information and forwards the decoded information to UD at the same time that LT transmits its information to LR, which again induces mutual interference between the licensed and unlicensed networks. At the end of Stage II, UD attempts to restore while W wire-taps the US's information from UR b 's transmit signal.

Signal
Model. In Figure 1

Wireless Communications and Mobile Computing
is assumably available in this paper, which is similar to [6,8,21]. How to obtain such global channel state information is beyond our scope but rather we focus on the SOP analysis for the proposed relay selection in CRNwEH). Under the assumption of Rayleigh fading, h uv is modelled as a zero-mean μ uv -variance circular symmetric complex Gaussian distribution, i.e., h uv~C N ð0, μ uv Þ. Integrating path-loss into channel characteristics, μ uv , is deputized as μ uv = τ −ω uv with ω symbolizing the path-loss exponent and τ uv symbolizing the transmitter u-receiver v distance. Therefore, it is naturally accepted in the following that the cumulative distribution function (CDF) and the probability density function (PDF) of the channel gain jh uv j 2 are correspondingly represented as F jh uv j 2 ðxÞ = 1 − e −x/μ uv and f jh uv j 2 ðxÞ = e −x/μ uv /μ uv .
In Figure 2, α with α ∈ ð0, 1Þ, λ i with λ i ∈ ð0, 1Þ, and T symbolize the time switching ratio, the power splitting ratio, and the total duration for transmission from US to UD through UR b , respectively. Given these notations in Figure 2, one can model the signals as follows.
UR i and LR receive signals in Stage I, correspondingly, as where x s and x l are respectively the unity-power transmit symbols of US and LT; the receive antennas of UR i and LR generate the noises n r i~C N ð0, σ 2 r i Þ and n l1~C N ð0, σ 2 l Þ, respectively; the transmission powers of US and LT are P s and P l , respectively.
As shown in Figure 2(b), the relay UR i divides the received signal y r i into two portions: one portion of ffiffiffiffi λ i p y r i passes through the energy harvester and another portion of where Ξf·g symbolizes the statistical average and η i with η i ∈ ð0, 1Þ symbolizes the energy conversion efficiency. The UR i consumes the scavenged energy in (3) to transmit information in Stage II with the peak transmission power as According to the operation principle in Figure 2(b), one can represent the input signal of the information decoder as n r i +ñ r i , which creates the SINR (signal-to-interference plus noise ratio) for decoding x s as where b σ 2 r i = σ 2 r i + ðσ 2 r i /ð1 − λ i ÞÞ. Generally, the relay UR i , which is scheduled to transmit in Stage II, will result in the received signals at UD, W, and LR, respectively, as  Wireless Communications and Mobile Computing where the receive antennas of UD, W, and LR create the noises n d~C N ð0, σ 2 d Þ, n w~C N ð0, σ 2 w Þ, and n l2~C N ð0, σ 2 l Þ, correspondingly; P r i is the transmission power of the relay UR i . It is noted that because LT transmits the signal x l at the same time that UR i transmits the signal x l ) are the interferences induced by LT to UD and W, respectively. Furthermore, in order to decrease the number of notations without loss of generality, equations in (1), (2), (6), (7), and (8) supposed that merely one licensed transmitter-receiver pair are communicating to each other in both stages. That is why the same set of notations ðh ll , P l , x l Þ is used for both stages in (1), (2), (6), (7), and (8). The case of different licensed transmitter-receiver pairs in two stages is straightforwardly extended.

Maximum Secrecy Rate.
Assuming that the relay UR i is scheduled to transmit information in Stage II. Then, (6) and (7) yield the SINRs at UD and W as From (9) and (10), channel capacities that UD and W achieve through the assistance of UR i are respectively given by [40] where the duration of Stage II of ð1 − αÞT indicates the prelog factor of ð1 − αÞ.
The subtraction of the (UR i to W) wire-tap channel capacity from the (UR i to UD) main channel capacity is the maximum secrecy rate [16]. Therefore, with the assistance of UR i , the maximum secrecy rate can be achieved as where ½x + denotes max ðx, 0Þ. (2), one can compute the SINR at LR in Stage I as

Licensed Power Allocation. From
from which the channel capacity that LR can obtain in Stage I is Similarly, the SINR at LR in Stage II under the activation of the relay UR i is inferred from (8) as from which the channel capacity that LR can obtain in Stage II under the activation of the relay UR i is In cognitive radio networks, the reliability of the licensed users is of paramount importance. Therefore, the unlicensed transmitters (US and UR i ) must guarantee the reliability of the licensed users while they operate. In this paper, the reliability of the licensed users is represented by the outage probability of the licensed receiver. As such, the transmission powers of the unlicensed users must be controlled for the outage probability of the licensed receiver not to exceed a preset value ε. To be specific, P s and P r i must be subject to where C 2 is the target spectral efficiency of LR.
Restrictions in (17) and (18) are named as the licensed outage restrictions.
The transmission powers of US and UR i are also upperbounded by their peak transmission powers, P sm and P r i m , correspondingly, that are due to the hardware design and the energy harvester, respectively. As such, P s and P r i are constrained by Restrictions in (19) and (20) are named as the peak transmission power restrictions.

Wireless Communications and Mobile Computing
The solution of the equation system (i.e., the qualities hold for (17) and (19)) is the transmission power of P s as where Similarly, the solution of the equation system (i.e., the qualities hold for (18) and (20)) is the transmission power of P r i as where The equations in (21) and (22) are derived similarly as ( [3], eq. (17)) and ( [3], eq. (19)).

Relay
Selection. According to information theory, UR i can achieve the channel capacity in Stage I as C sr i = α log 2 ð1 + γ sr i Þ bps/Hz where the reason for the appearance of the prelog factor α is that the duration of Stage I is αT. Moreover, according to information theory, UR i can recover the US's information as long as C sr i exceeds the target spectral efficiency of SUs, Let D be the set of relays that correctly restored the US's message, i.e., Among relays in D, the relay, namely, UR b , that maximizes the maximum secrecy rate is chosen to relay the US's information in Stage II. According to this relay selection method, the maximum secrecy rate that CRNwEH can achieve is given by which is essential to derive the performance metric for the proposed relay selection method in CRNwEH.

SOP Analysis
In the viewpoint of information theory, the most appropriate performance metric for evaluating the security capability of wireless transmission is the SOP, which is the possibility that C sec is below a target security degree C 3 . Therefore, the lower SOP indicates the more secure wireless transmission. This part derives elaborately the SOP for the suggested relay selection method in CRNwEH. The derived closed-form expression of the SOP facilitates in evaluating the secrecy performance without time-consuming simulations and in deriving other paramount security capability indicators, e.g., the PSPMSR and the IP.
The SOP of the relay selection in CRNwEH is expressed as Because the number of relays which restore correctly the US's message in Stage I varies from 0 to K, according to the total probability principle, (25) can be decomposed as where |· | symbolizes the cardinality of the set. The target security degree C 3 is nonnegative and hence, (26) can be simplified as Wireless Communications and Mobile Computing In (27), K k ! = K!/k!ðK − kÞ! denotes the binomial coefficient and S k m stands for the m th combination among K k ! combinations, each comprising k distinct elements taken from the set of K different elements. For instance, S 2 1 = f1, 2g, S 2 2 = f1, 3g, S 2 3 = f2, 3g for k = 2 and K = 3. In order to represent (27) in closed-form, the triplet ðQ 1 , Q 2 , Q 3 Þ will be solved sequentially as follows.
The quantity Q 1 is the possibility which all relays fail to restore the US's information in Stage I. As such, Q 1 can be computed as Because of the statistical independence of γ sr i , i = f1, ⋯, Kg, one can rewrite (28) as where I i has the precise closed form as with The proof of (30) is presented in Appendix A. The quantity Q 3 is the probability that the relays belonging to the set S k m successfully decode the US's information while the relays not belonging to the set S k m unsuccessfully decode the US's information. Therefore, Q 3 is represented in closed-form as : Because of the statistical independence of γ sr i , i = f1, ⋯, Kg, one can rewrite (33) as where I i is given by (30) while I j is also given by (30) with i being replaced by j.
The last quantity Q 2 is decomposed as Terms ð1 + γ r i d Þ/ð1 + γ r i w Þ are statistically dependent because they contain two common variables (jh ld j 2 and jh lw j 2 ). To decorrelate them, one applies the conditional probability as where The term G i is represented in closed-form as where The proof of (38) is presented in Appendix B. For simplicity, one lets Then, G i in (38) has a compact form as Using the following equality ( [3], eq. (30)) with R = f1, 2, ⋯, Lg and M = fR½v 1 , ⋯, R½v u g to expand (48) as where A = fS k m ½v 1 , ⋯, S k m ½v u g. To obtain the closed form of Q 2 , one needs to evaluate a common expression where W = fA, S k m g.

Inserting (45) into (50), one obtains
The term K can be rewritten in an explicit form as where which is obtained from the partial fraction decomposition.
By exchanging the summation and the integration, one obtains where Eið·Þ is the exponential integral in [41], and the Inserting H i in (53) into (54) and performing simplifications, one reduces K to The term H in (51) can be written in an explicit form as By denoting X = W \ i, one can rewrite H as Using (48) to decompose H as where Z = fX½u 1 , ⋯, X½u q g and One can further simplify (59) as where with B = fZ, Xg.
The following solves Φ ∅ and Φ B in closed forms to finish the computation of H . First of all, Φ ∅ can be represented in terms of two special functions as where Ψðb, c, dÞ and Θðb, c, dÞ are respectively defined as Applying ( [42], eq. (16)) with appropriate substitutions yields the closed form of Θðb, c, dÞ as where Ωð·, · Þ is the function defined in (55).
By exchanging the summation and the integration, (69) is reduced to Path-loss exponent ω = 4 Wireless Communications and Mobile Computing The function Λðb, c, g, lÞ has an accurate closed form as ( [42], eq. (19)) by setting the argument a of ( [42], eq. (19)) to zero. Therefore, the precise closed form of Λðb, c, g, lÞ should not be summarized in this paper for brevity.
Given the exact closed forms of Φ ∅ in (64) and Φ B in (70), it is apparent that H in (61) is solved in a precise closed form. Therefore, Q 2W in (51) is presented in an exact closed form. Consequently, Q 2 in (49) is also presented in an exact closed form.
Because Q 1 in (29), Q 2 in (49), and Q 3 in (34) are all represented in precise closed forms, the SOP of the relay selection in CRNwEH in (27) is found in an exact closed form. The derived SOP formula is helpful to quickly rate the security performance without exhaustive simulations. Upon our knowledge, this formula is novel. Furthermore, some paramount security performance indicators including the PSPMSR and the IP are easily obtained from this formula. To be more specific, the IP indicates the probability of the negative maximum secrecy rate: Moreover, the PSPMSR indicates the possibility of the strictly positive maximum secrecy rate:

Illustrative Results
This part presents analytical/simulated results to rate the secrecy performance of the relay selection in CRNwEH through key specifications where (27) generates analytical results, and the computer simulation produces simulated results. Key specifications under consideration are tabulated in Table 1. To limit case studies, equal noise variances, equal power splitting ratios, and equal energy conversion efficiencies are supposed, i.e., σ 2 Figure 3 shows the SOP versus P sm /N 0 for C 3 = 0:1 bps/Hz, α = 0:6, ε = 0:1, C 1 = 0:2 bps/Hz, P l /N 0 = 15 dB, λ = 0:8, and C 2 = 0:3 bps/Hz. The results confirm the precision of (27) owing to the assortment between the analysis and the simulation. Furthermore, the SOP reduces with the increase in the number of relays (K = 1 reduces our system model to relaying transmission (i.e., without relay selection [24][25][26][27][28]) in CRNwEH.). This exposes the effectuality of the relay selection in securing CRNwEH. Moreover, the SOP reduces with the increase in P sm /N 0 . This originates from the truth that the increase in P sm /N 0 creates UR i more chances to correctly restore the US's data and to harvest more RF energy from the US's signal, ultimately mitigating the SOP in Stage II. However, the SOP is saturated at large P sm /N 0 . Such saturation comes from the power allotment for US and UR i in (21) and (22) in which transmission powers of US and UR i do not depend on P sm /N 0 at high P sm /N 0 (i.e., the peak transmission power restriction is relaxed at high P sm /N 0 ), causing the saturated SOP. Figure 4 shows the SOP versus P l /N 0 for α = 0:6, ε = 0:1, C 1 = 0:2 bps/Hz, P sm /N 0 = 15 dB, C 3 = 0:1 bps/Hz, λ = 0:8, and C 2 = 0:3 bps/Hz. The results corroborate (27) since the simulation coincides with the analysis. Moreover, the SOP reduces with increasing number of relays, again exposing the effectuality of the relay selection in securing CRNwEH. Furthermore, the SOP is minimum at a moderate value of P l for a specific number of relays. Here are reasons for this observation. For low values of P l , the interference from LT is small but the unlicensed users must transmit with low power to guarantee the QoS of LR to be fixed at ε = 0:1. Therefore, the SOP is large. For high values of P l , the interference from LT is large but the unlicensed users must transmit with high power to guarantee the QoS of LR to be fixed at ε = 0:1. The increase in the interference from LT may surpass the increase in the unlicensed users' the  Wireless Communications and Mobile Computing transmission power and thus, the SOP is large for high values of P l . As such, a moderate value of P l creates the minimum SOP. Figure 5 shows the SOP versus ε for P sm /N 0 = 15 dB, α = 0:6, C 1 = 0:2 bps/Hz, P l /N 0 = 17 dB, C 3 = 0:1 bps/Hz, λ = 0:8, and C 2 = 0:3 bps/Hz. The results confirm the precision of (27) owing to the assortment between the simulation and the analysis. In addition, the SOP reduces with increasing number of relays as expected. Furthermore, the SOP decreases with increasing the preset outage probability of licensed receiver. The reason is that the increase in ε permits licensed receivers to tolerate more interference from unlicensed transmitters. Consequently, unlicensed transmitters are able to send signals with larger powers, intimately tempering the outage in Stage II. However, the saturated SOP occurs at large ε (e.g., ε > 0:5). The reason for the SOP saturation is the power allotment in (21) and (22) in which the second term in P s (or P r i ) does not depend on ε. Consequently, large values of ε make P s (or P r i ) unchanged, resulting in the saturated SOP. Figure 6 shows the SOP versus α for P sm /N 0 = 8 dB, ε = 0:1, C 1 = 0:2 bps/Hz, C 3 = 0:1 bps/Hz, P l /N 0 = 12 dB, λ = 0:8, and C 2 = 0:3 bps/Hz. The results verify the accuracy of (27) because the simulation exactly agrees with the analysis. Additionally, the SOP decreases with increasing number of relays as expected. Furthermore, the appropriate selection of α, namely, α opt , minimizes the SOP. Here are the reasons for the existence of α opt . Increasing α extends the duration of the Stage I and hence, UR i scavenges more energy and restores correctly the US's data with a larger possibility. Nonetheless, the increase in α also mitigates the maximum secrecy rate in the Stage II and therefore, the SOP accretes. As a result, the trade-off between the durations of two stages is optimized with α opt for the minimum SOP. Figure 7 demonstrates the SOP versus the power splitting ratio λ for C 3 = 0:1 bps/Hz, P sm /N 0 = 8 dB, C 1 = 0:2 bps/Hz, α = 0:6, C 2 = 0:3 bps/Hz, P l /N 0 = 12 dB, and ε = 0:1. The results expose that the simulation matches the analysis, corroborating (27). In addition, the security capability is enhanced with increasing number of relays as expected. Furthermore, the security performance is optimized by optimally adopting λ. Here are reasons for the existence of the optimum value of λ for the best security performance. The increase in λ allows UR i to harvest more energy and hence, UR i improves its communication reliability in the Stage II, eventually reducing the SOP. However, the increase in λ also mitigates the energy for the message decoder, deteriorating the possibility that UR i decodes successfully the US's data in the Stage I and inducing more secrecy outage in Stage II. As such, λ can be optimally selected to compromise the communication reliability of US and UR i in both stages. Figure 8 illustrates the SOP versus C 1 for P sm /N 0 = 10 dB, λ = 0:8, α = 0:6, C 3 = 0:1 bps/Hz, ε = 0:1, C 2 = 0:3 bps/Hz, and P l /N 0 = 15 dB. The results show the assortment between the analysis and the simulation, corroborating (27).   Wireless Communications and Mobile Computing Additionally, the security performance is enhanced with increasing number of relays as expected. Furthermore, the security performance reduces with the increase in C 1 . This is obvious since the higher target spectral efficiency the unlicensed users expect, the lower the possibility for the relays to exactly recover the US's data and thus, the higher the outage probability in Stage II. Figure 9 demonstrates the SOP versus C 2 for P sm /N 0 = 10 dB, λ = 0:8, α = 0:6, C 3 = 0:1 bps/Hz, ε = 0:1, C 1 = 0:2 bps/Hz, and P l /N 0 = 15 dB. The results verify the agreement between the analysis and the simulation, corroborating the accuracy of (27). Additionally, the SOP reduces with increasing number of relays as expected. Moreover, the security performance is worse with the increase in C 2 . Here are reasons for this. For a certain value of ε in (17) and (18), the larger target spectral efficiency the licensed users expect, the smaller the interference at licensed users induced by unlicensed users must be and thus, the smaller transmission power the unlicensed users must transmit with, causing the larger SOP. However, the system outage always occurs at high values of C 2 . Here are the reasons for this. Relied on (21) and (22), we see that γ 21 and γ 22 (or C 2 ) are inversely proportional to the terms inside ½· + . Therefore, the increase in C 2 up to some value (e.g., 2:13 bps/Hz) induces ½· + = 0 and thus, P s = 0 and P r i = 0 always happen as C 2 is above a threshold, inducing the system outage with the probability of 1. Figure 10 plots the SOP versus C 3 for P sm /N 0 = 10 dB, = 0:6λ = 0:8, ε = 0:1, C 1 = 0:2 bps/Hz, C 2 = 0:1 bps/Hz, and P l /N 0 = 15 dB. The results affirm the preciseness of (27) since the simulation agrees with the analysis. Additionally, the security capability is enhanced with increasing number of relays as expected. Moreover, the security performance is worse with the increase in C 3 . The reason is since conditioned on specifications, and the higher target security degree causes the higher SOP. Figure 11 assumes all relays to be located at ðd, 0Þ to demonstrate the SOP versus the relays' positions for C 3 = 0:1 bps/Hz, P sm /N 0 = 15 dB, ε = 0:1, C 1 = 0:2 bps/Hz, α = 0:6, P l /N 0 = 17 dB, λ = 0:8, and C 2 = 0:3 bps/Hz. The results corroborate (27) owing to the assortment between the simulation and the analysis. Furthermore, the security performance improves with increasing number of relays, again demonstrating the efficacy of the relay selection in securing CRNwEH. Note that the secrecy outage event occurs as UR b is unable to exactly restore the US's data (i.e., US is far away from UR b ) or UR b is unable to transmit reliably the restored source data to UD (i.e., UD is far away from UR b ). Consequently, it is natural that the relays' optimum positions always exist. This optimum position optimally compromises the probability that UR b can precisely decode the US's data with the possibility that UR b is able to transmit reliably the recovered source data to UD to maximize the security performance. Figure 11 verifies this observation that the best security performance is obtained when UR b is d opt = 0:85,0:87,0:91 away from US for K = 1, 3, 5, correspondingly.

Conclusions
The current paper performed the secrecy performance analysis for the relay selection in CRNwEH by deriving the precise closed-form formula of the SOP under investigation of the licensed outage restriction, Rayleigh fading, the licensed interference, and the peak transmission power restriction. The preciseness of the suggested formula was confirmed by computer simulations. Numerous results illustrated that the relay selection dramatically improves the security capability. Furthermore, the secrecy performance is saturated at large peak transmission power or large target outage probability of licensed user. Additionally, the secrecy performance of the relay selection in CRNwEH depends on several key specifications among which the power splitting ratio, the time switching ratio, and the relays' positions can be optimally adopted to achieve the best information security.  Given O i and G i in (31) and (32), respectively, one can reduce (A.1) to (30), finishing the proof.

ðB:1Þ
where C 3 is given in (37). Due to the positive target security degree (i.e., C 3 > 0), (B.1) is simplified as ðB:2Þ Conditioned on jh ld j 2 and jh lw j 2 , γ r i d and γ r i w are uncorrelated and hence, their joint PDF is symbolized as the multiplication of their marginal PDFs, i.e., f γ r i w ,γ r i d ðx, yjjh ld j 2 , jh lw j 2 Þ = f γ r i w ðxjjh lw j 2 Þf γ r i d ðyjjh ld j 2 Þ. Therefore, (B.2) is further decomposed as ðB:3Þ To achieve the closed form for (B.3), the CDF of γ r i d , F γ r i d ðzjjh ld j 2 Þ, and the PDF of γ r i w , f γ r i w ðzjjh lw j 2 Þ, are found first. ðB:4Þ The PDF of γ r i w is straightforwardly obtained from the PDF of jh r i w j 2 by using the variable change and hence, the PDF of γ r i w can be reduced to f γ r i w zj h lw j j 2 À Á = P l h lw j j 2 + σ 2 w À Á  (39), (40), (41), and (42), respectively, one can shorten (B.6) as (38). This completes the proof.

Data Availability
The authors declare that all data used to support the findings of this study are included within the article

Conflicts of Interest
The authors declare that they have no conflicts of interest.