Secrecy Performance of TAS/SC-Based Multi-Hop Harvest-to-Transmit Cognitive WSNs Under Joint Constraint of Interference and Hardware Imperfection

In this paper, we evaluate the secrecy performance of multi-hop cognitive wireless sensor networks (WSNs). In the secondary network, a source transmits its data to a destination via the multi-hop relaying model using the transmit antenna selection (TAS)/selection combining (SC) technique at each hop, in the presence of an eavesdropper who wants to receive the data illegally. The secondary transmitters, including the source and intermediate relays, have to harvest energy from radio-frequency signals of a power beacon for transmitting the source data. Moreover, their transmit power must be adjusted to satisfy the quality of service (QoS) of the primary network. Under the joint impact of hardware imperfection and interference constraint, expressions for the transmit power for the secondary transmitters are derived. We also derive exact and asymptotic expressions of secrecy outage probability (SOP) and probability of non-zero secrecy capacity (PNSC) for the proposed protocol over Rayleigh fading channel. The derivations are then verified by Monte Carlo simulations.


Introduction
Security is one of the important issues in wireless sensor networks (WSNs) due to the broadcast nature of wireless medium. Conventionally, encryption/decryption algorithms that generate public/private keys are used to guarantee security [1,2]. Recently, a security framework for the physical layer, called the wiretap channel or physical-layer security (PLS) [3][4][5][6][7], has been introduced as a potential solution. In PLS, the difference between the channel capacity of the data link and the channel capacity of the eavesdropping link, named secrecy capacity, is commonly used to evaluate secrecy performance such as average secrecy capacity (ASC), secrecy outage probability (SOP), and probability of non-zero secrecy capacity (PNSC). Hence, to enhance the secrecy performance, the quality of the data and eavesdropping links should be increased and decreased, respectively. To enhance the transmits its data to a secondary destination using the multi-hop mode in the presence of a secondary eavesdropper. To support the reliable communication at each hop, the TAS/SC technique is used to forward the source data. Operating on the underlay spectrum sharing method, the transmit power of the secondary source and relay nodes must be adjusted to satisfy the required QoS of the primary network. Moreover, the secondary transmitters have to harvest energy from PB deployed in the secondary network for the data transmission. The main contribution of this paper can be summarized as follows: • We propose a simple multi-hop MIMO relaying protocol using the TAS/SC technique for PB-UCR WSNs. The proposed protocol can obtain energy efficiency and spectrum usage efficiency, enhance the reliability of data transmission, and improve the secrecy performance.

•
In almost published works related to EH and UCR (see [23][24][25]), the transmitters adjust their transmit power following the instantaneous channel state information. As a result, the transmit power is a random variable (RV), which is not feasible. In this paper, the secondary source and relay nodes are assumed to transmit the source data at fixed transmit power levels. In addition, we derive an exact closed-form expression of the average transmit power of the secondary transmitters under the joint impacts of the energy harvested, the interference constraint, and the maximum transmit power level.

•
We investigate the impact of hardware impairments on the end-to-end SOP and PNSC of the proposed scheme. Indeed, the obtained results presented that the hardware imperfection has a significant impact on the secrecy performance. Moreover, the analytical results showed that different values of the hardware impairment levels of the data and eavesdropping links lead to different secrecy performance trend. Finally, it is worth noting that the proposed scheme is a generalized case of the existing schemes in which the transceiver hardware is assumed to be perfect [11,[41][42][43].

•
We derive new exact and asymptotic expressions of the end-to-end SOP and PNSC over Rayleigh fading channels, which are then verified by Monte Carlo simulations.
The rest of this paper is organized as follows. The system model of the considered protocol is described in Section 2. In Section 3, the expressions of SOP are derived. The simulation results are shown in Section 4. Finally, this paper is concluded in Section 5. Figure 1 illustrates the system model of the proposed scheme, in which a secondary source (T 0 ) wants to transmit its data to a destination (T K ) via K − 1 intermediate nodes denoted by T 1 , T 2 , . . . , T K−1 . The data transmission between T 0 and T K is realized via K orthogonal time slots, exploiting the TAS/SC technique. In particular, at the (k + 1)-th hop, the node T k selects an antenna to transmit the source data to the node T k+1 , which uses the SC technique to combine the signals received from T k , where k = 0, 1, . . . , K. We assume that all of the nodes including the source, the destination and the relays are equipped with N D antennas. The transmitter T k has to harvest energy from wireless signals of a single-antenna power beacon (PB) deployed in the secondary network. Moreover, T k must adjust the transmit power to satisfy a maximal interference threshold (I th ) required by a single-antenna primary user (PU). Also in the secondary network, there exists an N E -antenna eavesdropper (E) who uses the SC technique to decode the source data obtained at each hop. Similar to [16], the secondary transmitters randomly generate code-book to confuse the eavesdropper. Comment 1: Due to the size limitation and complexity constraint, it is assumed that all of the receivers can only use the SC combiner for decoding the data. In addition, the secrecy performance of the proposed protocol is same with that of the corresponding one with multiple non-colluding single-antenna eavesdroppers [44,45]. Finally, in the case where the eavesdropper can employ the MRC technique, the expressions derived in this paper can be used as bound expressions of the secrecy performance. Let us denote γ X,Y as the channel gain of the link, where X, Y ∈ {T k , E, PB, PU}. Assume that all of the channels are Rayleigh fading; hence the channel gain γ X,Y is an exponential RV. The cumulative distribution function (CDF) and probability density function (PDF) of γ X,Y can be expressed, respectively, as

System Model
where λ X,Y is parameter of the exponential RV γ X,Y , i.e., λ X,Y = 1/E {γ X,Y } = 1/ Var {γ X,Y }, where E is expected operator and Var {X} is variance of X. To take path-loss into account, we can model λ X,Y as λ X,Y = d β X,Y [46], where d X,Y is the distance between X and Y, and β is the path-loss exponent. We denote γ T k,m ,Y as the channel gain between the m-th antenna of T k and Y, where m = 1, 2, . . . , N D . Assume that RVs γ T k,m ,Y are independent and identical, i.e., λ T k,m ,Y = λ T k ,Y for all m. Also, let γ X,T k+1,n and γ X,E p as channel gain between X and the n-th antenna of T k+1 , and that between X and the p-th antenna of E, respectively, where n = 1, 2, . . . , N D and p = 1, 2, . . . , N E . Similarly, γ X,T k+1,n and γ X,E p are independent and identically distributed (i.i.d.) RVs, i.e., λ X,T k+1,n = λ X,T k+1 and λ X,E p = λ X,E for all n and p.
Let T denote the total transmission time between T 0 and T K , and hence the time allocated for each time slot is given as τ = T /K. Considering the (k + 1)-th hop; a duration of ετ is used for T k to harvest energy, and the remaining duration, i.e., (1 − ε) τ, is spent for the data transmission between T k and T k+1 , where 0 ≤ ε ≤ 1. Then, the amount of energy that T K can harvest is given by where η (0 ≤ η ≤ 1) is energy conversion efficiency, and P B is transmit power of PB. From (2), we can formulate the transmit power that T k can use in the data transmission phase by where χ = ηε/ (1 − ε) and ϕ sum,k = Considering the data transmission between the transmitter A and the receiver B; under the impact of the hardware impairments, the instantaneous SNR received at B can be expressed as in [30,33,34,47,48]: where A, B ∈ {T, E, PB, PU}, P A is transmit power of the transmitter A, γ A,B is channel gain between A and B, σ 2 is the variance of additive white Gaussian noise (AWGN), κ 2 A and κ 2 B are constants characterizing the level of the hardware impairments at A and B, respectively, and κ 2 A,B = κ 2 A + κ 2 B is the total hardware impairment level. The values of κ 2 A , κ 2 B , κ 2 A,B , which depend on the structure of the transceiver hardware at A and B, can be determined by practical experiments.
Moreover, in the URC network, if T k uses the m-th antenna to transmit the data, the transmit power must satisfy the interference constraint required by PU as in [25,49]: where κ 2 P is total hardware impairment level at T k and PU (see [25,49]). Let P S denote the maximum transmit power of each antenna; by combining (3) and (6), the transmit power of the m-th antenna at T k can be formulated by P k,m = min (Q EH,k , Q IN,k,m , P S ) = P S min µ 1 ϕ sum,k , We can observe from (7) that when min µ 1 ϕ sum,k , µ 2 /γ T k,m ,PU < 1, then P k,m = P S min µ 1 ϕ sum,k , µ 2 /γ T k,m ,PU is a RV, which is not feasible (although this assumption was widely used in many published literature, e.g., [23][24][25] and references therein). In practice, the transmit power P k,m should be fixed at pre-determined levels. Indeed, assume that there are W + 1 fixed levels denoted by L v (v = 0, 1, . . . , W) with L v = vP S /W. For example, L 0 = 0 is the lowest level, and L W = P S is the highest one. Now, by combining with (7), we can write the expression of P k,m as Now, we consider the data transmission between T k and T k+1 . Employing the TAS/SC technique, the transmit antenna at T k and the receive antenna at T k+1 are selected by the following strategy (see [9]): where b and c are the selected antennas at T k and T k+1 , respectively, b ∈ {1, 2, . . . , With the presence of hardware impairments, the channel capacity of the T k → T k+1 link is calculated as where κ 2 D is the total hardware impairment level at T k and T k+1 , which is assumed to be the same for all values of k.
Let us consider the eavesdropping link at the (k + 1)-th hop; the channel capacity of the T k → E link can be obtained by where κ 2 E is the total hardware impairment level at T k and E. In addition, since E uses the SC combiner, the channel gain γ T k,b ,E g can be written as where g ∈ {1, 2, . . . , N E }. In addition, CDF of γ T k,b ,E g can be expressed by From (14), we obtain PDF of γ T k,b ,E g as Next, from (11) and (12), the secrecy capacity at the (k + 1)-th hop is obtained by . (16) With the random-and-forward strategy, the end-to-end secrecy capacity of the proposed protocol is given as in [37]:

Performance Analysis
In this section, we analyze the average transmit power of the secondary transmitters and the secrecy performance of the proposed protocol in terms of SOP and PNSC.

Average Transmit Power of the Secondary Transmitters
From (8), the average transmit power of T k can be given by the following formula: where E {.} is an expectation operator. To calculate E P k,b , we attempt to find CDF of min µ 1 ϕ sum,k , µ 2 /γ T k,b ,PU . Setting Z min,k = min µ 1 ϕ sum,k , µ 2 /γ T k,b ,PU , the CDF of Z min,k is obtained by Substituting (4) into (19) yields Therefore, the average transmit power of T k is written by

Secrecy Outage Probability (SOP)
The end-to-end SOP of the proposed protocol can be calculated by where C th (C th > 0) is a predetermined outage threshold, and SOP k = Pr (C Sec,k < C th ) is the secrecy outage probability at the k-th hop. Using (8) and (16), we can formulate SOP k by where It is noted from (23) that the secrecy outage event is only considered in the cases where the transmit power P k,b is higher than zero, i.e., P k,b = L v and v ≥ 1.
For the probability Pr (P k,b = L v ) in (23), it can be calculated by Next, let us consider the SOP conditioned on P k,b = L v as marked in (23); we have where We can observe from (25) that if α 0 ≤ 0 (or κ 2 D ≥ 1/ (ρ − 1)), SOP k (L v ) always equals 1 for all values of k and v.
In the following, we derive the exact expressions of SOP k (L v ) as given in Lemmas 1-3 below.

Lemma 1.
When α 0 > 0 and α 3,v > 0 or κ 2 D > κ 2 E / ρ + (ρ − 1) κ 2 E , the exact expression of SOP can be given as Proof. At first, when α 0 > 0 and α 3,v > 0, we can rewrite SOP k (L v ) as By substituting the CDF of γ T k,b ,T k+1,c in (10), and the PDF of γ T k,b ,E g in (15) into (28), after some manipulations, we arrive at By changing variable With α 1,v α 3,v + α 0 α 2 = ρ, we can rewrite (30) as where We finish the proof of Lemma 1 here. We note that the integrals in (27) can be easily calculated by computer software such as Matlab or Mathematica.

Comment 2:
We can observe from (27) that the exact expression of SOP k (L v ) is still in integral form, which does not provide any insights into the system performance. Therefore, our next objective is to find an asymptotic expression at high transmit SNR as given in Corollary 1 below. Corollary 1. When α 0 > 0 and α 3,v > 0, we can approximate SOP k (L v ) at high transmit SNR P S /σ 2 → +∞ by a closed-form expression as Proof. At high transmit SNR, we can approximate (25) in this case as follows: Substituting (14) into (34), we obtain (33).

Lemma 2.
When α 0 > 0 and α 3,v < 0, an exact expression of SOP k (L v ) can be given as Proof. Similar to (28), SOP k (L v ) in this case can be written by With the same manner as deriving SOP k (L v ) in (28), we can obtain (35).

Corollary 2.
At high transmit SNR, SOP k (L v ) in (35) can be approximated by Proof. Similar to the proof of Corollary 1, we have Substituting (10) into (38), we then obtain (37).  (37), we obtain exact and asymptotic expressions of the end-to-end SOP when α 0 > 0 and α 3,v < 0. Equation (37) also shows that at high transmit SNR, SOP k (L v ) (and the end-to-end SOP) decreases as P S /σ 2 increases. Lemma 3. When α 0 > 0 and α 3,v = 0, SOP k (L v ) is given by an exact closed-form expression as Proof. In this case, we have Substituting CDF of γ T k,b ,T k+1,c in (10), and PDF of γ T k,b ,E g in (15) into (40), after some manipulations, we can obtain (39), and finish the proof.

Corollary 3.
When α 0 > 0 and α 3 = 0, SOP k (L v ) can be approximated by Proof. In this case, we have the following approximation: Substituting CDF of γ T k,b ,T k+1,c , and PDF of γ T k,b ,E g into (42), after some manipulations, we can obtain (41).
Comment 5: Equation (41) shows that SOP k (L v ), as well as the end-to-end SOP at high transmit SNR, do not depend on P S /σ 2 . It is worth noting that this paper considers a generalized system model where the hardware impairment levels on the data links and eavesdropping links can be different or the same. Moreover, we can observe from Lemmas 1-3 that the secrecy outage probability of the proposed protocol is only expressed by an exact closed-form formula when α 3 = 0.

Probability of Non-Zero Secrecy Capacity (PNSC)
In this subsection, we analyze the end-to-end PNSC of the proposed protocol, which can be formulated by where PNSC k = Pr (C Sec,k > 0) is the probability of non-zero secrecy capacity at the k-th hop.

Comment 6:
Similar to [37], the end-to-end PNSC can be obtained with three different cases, i.e., κ 2 D > κ 2 E , κ 2 D < κ 2 E , and κ 2 D = κ 2 E . Moreover, when κ 2 D = κ 2 E , we obtain the exact closed-form expression of the end-to-end PNSC. Finally, with κ 2 D = κ 2 E , the end-to-end PNSC value does not depend on the transmit SNR as well as the hardware impairment levels.

Simulation Results
In this section, we present Monte Carlo simulations to verify the theoretical results obtained in Section 3 by using MATLAB 2014a. For Monte Carlo experiments, we perform 10 5 -5 * 10 6 independent trials, and in each trial, the Rayleigh channel coefficients for all of the links are generated to obtain the end-to-end secrecy performance. For the theoretical results, the expressions derived in Section 3 are used to present them.
In the simulation environment, a two-dimensional Oxy plane is considered, where the primary user (PU), the power beacon (PB), the secondary eavesdropper (E), and the secondary node (T k ) are located at (x P , y P ), (x B , y B ), (x E , y E ), and (k/K, 0), respectively, where k = 0, 1, . . . , K. In all of the simulations, we fix the path-loss exponent (β) by 3, the number of transmit power levels (W) by 8, the variance of Gaussian noises σ 2 by 1, and the block time (T ) by 1. Moreover, we assume that P B = 2P S = 4I th , and the total hardware impairment level κ 2 P equals 0. It is noted from figures that simulation results (Sim) are presented by markers, while the theoretical results including exact ones (Exact) and asymptotic ones (Asym) are presented by solid and dash lines, respectively.
In Figure 2, we present the average transmit power of the secondary transmitters as a function of P S . In this simulation, the number of hops (K) is 3, the number of antennas at the node T k (N D ) equals 3, the energy conversion efficiency (η) by 0.25, and the fraction of time spent for the EH phase (ε) is 0.25. In addition, the co-ordinates of PB and PU are (0.4, 0.3) and (0.6, −0.5), respectively. We can observe from Figure 2 that the average transmit power of the source (T 0 ) is highest because the Euclidean distance between T 0 and PU is farthest. We also see that the average transmit power of T 0 , T 1 , and T 2 linearly increases as P S increases. It is worth noting that the simulation results match very well with the theoretical ones, which validates our derivations.  In this case, the average transmit power of T 2 is lowest because this node is nearest to PU. For another example, x B = 0.5, the distances between T 1 and PU, and between T 2 and PU are the same, and hence the average transmit power of T 1 and T 2 is almost the same. For the nodes T 1 and T 2 , we see that there exist positions of PB and PU at which their average transmit power is lowest. However, the average transmit power of T 0 always decreases as x B increases. Figure 4 presents the end-to-end SOP as a function of P S with different number of antennas at E. In this simulation, the total hardware impairment levels of the data and eavesdropping links are given as κ 2 D = 0.01 and κ 2 E = 0, respectively, and hence the conditions in Lemma 1 are satisfied, i.e., α 0 > 0 and α 3,v > 0. It can be seen from this figure that simulation results match very well with theoretical ones. Moreover, we see that the exact end-to-end SOP converges to the approximate one at high P S values, which verifies the derived expressions obtained in Lemma 1 and Corollary 1. As proved in Corollary 1, the end-to-end SOP at high P S regime increases with the increasing of P S . In addition, Figure 4 shows that there exists an optimal value of P S at which the SOP value is lowest. Finally, we can see that the secrecy performance of the proposed protocol is worse with higher number of antennas at E.
In Figure 5, we present the end-to-end SOP as a function of P S with various number of hops (K). In this figure, we assume that the transceiver hardware of the authorized nodes is better than that of the eavesdropper, i.e., κ 2 D = 0 and κ 2 E = 0.01, which satisfy the conditions in Lemma 2, i.e., α 0 > 0 and α 3,v < 0. It is seen from Figure 5 that the end-to-end SOP rapidly decreases as P S increases. Moreover, the secrecy performance significantly enhances with higher number of hops. Finally, the simulation results again validate the theoretical results obtained from Lemma 2 and Corollary 2.
In Figure 6, we consider the cases where α 3,v = 0 or (ρ − 1) κ 2 D κ 2 E + κ 2 D ρ − κ 2 E = 0. As proved in Lemma 3 and Corollary 3, we can see from Figure 6 that the exact end-to-end SOP rapidly converges to the asymptotic one which does not depend on P S . It is also seen that the hardware impairment levels κ 2 D and κ 2 E significantly impact on the secrecy performance. In this figure, the value of SOP is lowest when the transceiver hardware of the authorized nodes and the eavesdropper is perfect, i.e.,  Figure 7 presents the SOP performance of the proposed protocol as a function of the fraction of time spent for the EH process (ε). As illustrated in this figure, the end-to-end SOP increases with higher value of ε. Moreover, when ε is very small, the probability Pr (P k,b = L v ) in (23) (v ≥ 1) converges to zero, and hence the end-to-end SOP also goes to zero. Next, similar to Figure 5, the secrecy performance significantly enhances when the hardware impairment level of the data links κ 2 D is lower than that of the eavesdropping links κ 2 E . In Figure 8, we investigate the impact of the number of hops (K) on the end-to-end SOP. In this simulation, we assume that the number of antennas at the T k and E nodes is same, i.e., N D = N E , and the transceiver hardware of these nodes is perfect, i.e., κ 2 D = κ 2 E = 0. As we can see, the values of SOP almost decrease as increasing the number of hops. However, in the case that N D = N E = 1, the end-to-end SOP is highest when the number of hops equals 2. When K ≥ 2, it is seen that the SOP performance in case that N D = N E = 3 is best. Moreover, the value of SOP in this case rapidly decreases with the increasing of K.  Figure 8. End-to-end secrecy outage probability as a function of K when P S = 0 dB, ε = 0.1, η = 0.1, In Figure 9, we present the end-to-end PNSC as a function of P S with various values of κ 2 D as κ 2 E is fixed by 0.05. As observed, the PNSC performance is better with the decreasing of κ 2 D . Moreover, as κ 2 D < κ 2 E κ 2 D > κ 2 E , the value of PNSC increases (decreases) with higher value of P S , and in the case that κ 2 D = κ 2 E , this value does not depend on P S . It is worth noting that the simulation and theoretical results match very well with each other, which validates the formulas derived in Lemma 4. Figure 10 presents the end-to-end PNSC as a function of κ 2 D with different number of hops (K). As shown in this figure, the PNSC performance significantly decreases when the hardware impairment level of the data link increases. Moreover, at high κ 2 D values, the end-to-end PNSC is worse with high number of hops.   Figure 10. End-to-end probability of non-zero secrecy capacity as a function of κ 2 D when K = 3, ε = 0.1, η = 0.25, x B = 0.5, y B = 0.3, x P = 0.5, y P = −0.5, x E = 0.5, y E = 0.5, κ 2 E = 0.2, N D = 2, and N E = 2.

Conclusions
This paper proposed and evaluated the secrecy performance of the TAS/SC-based multi-hop harvest-to-transmit cognitive WSNs under the joint impact of the interference constraint, the limited-energy source, and the hardware impairments. The main contribution of this paper is to derive new exact and asymptotic expressions of the end-to-end SOP and PNSC over Rayleigh fading channel, which can be used to design and optimize the performance of the considered networks, with any hardware impairment levels, as well as other system parameters, in the practical considerations. The interesting results obtained in this paper can be listed as follows: • The hardware impairments have a significant impact on the secrecy performance. Particularly, when the transceiver hardware of the authorized nodes is better than that of the eavesdropper, the proposed protocol obtains high secrecy performance. Otherwise, the SOP and PNSC performance is significantly degraded.

•
The secrecy performance of the proposed protocol can be enhanced with higher number of antennas equipped at the authorized nodes.

•
By optimally designing the number of hops and the fraction of time spent for the energy harvesting phase, the secrecy performance of the proposed protocol can be significantly improved. Funding: This research received no external funding.