Reciprocally-Benefited Secure Transmission for Spectrum Sensing-Based Cognitive Radio Sensor Networks

The rapid proliferation of independently-designed and -deployed wireless sensor networks extremely crowds the wireless spectrum and promotes the emergence of cognitive radio sensor networks (CRSN). In CRSN, the sensor node (SN) can make full use of the unutilized licensed spectrum, and the spectrum efficiency is greatly improved. However, inevitable spectrum sensing errors will adversely interfere with the primary transmission, which may result in primary transmission outage. To compensate the adverse effect of spectrum sensing errors, we propose a reciprocally-benefited secure transmission strategy, in which SN’s interference to the eavesdropper is employed to protect the primary confidential messages while the CRSN is also rewarded with a loose spectrum sensing error probability constraint. Specifically, according to the spectrum sensing results and primary users’ activities, there are four system states in this strategy. For each state, we analyze the primary secrecy rate and the SN’s transmission rate by taking into account the spectrum sensing errors. Then, the SN’s transmit power is optimally allocated for each state so that the average transmission rate of CRSN is maximized under the constraint of the primary maximum permitted secrecy outage probability. In addition, the performance tradeoff between the transmission rate of CRSN and the primary secrecy outage probability is investigated. Moreover, we analyze the primary secrecy rate for the asymptotic scenarios and derive the closed-form expression of the SN’s transmission outage probability. Simulation results show that: (1) the performance of the SN’s average throughput in the proposed strategy outperforms the conventional overlay strategy; (2) both the primary network and CRSN benefit from the proposed strategy.


Introduction
Wireless sensor networks have been identified as a promising technology for the ongoing developing intelligent world and are widely deployed for different application fields, such as military, environmental monitoring [1], healthcare [2], smart home [3] and other commercial areas [4]. By taking advantage of the characteristics of the self-organization and flexible expansion [5,6], wireless sensor networks are widely utilized for wireless monitoring and controlling, especially for the smart home system. However, thousands of sophisticated, overlapping and coexisting wireless sensor networks burden the limited licensed spectrum, where sensor nodes (SN) suffer from strong interference.
forwarding phases, respectively, to guarantee the security of the primary information. In [29], the primary system would cooperate with either two secondary users or a cluster of secondary users to improve its secrecy rate. The authors in [30] proposed a cooperative jamming scheme in which the secondary system transmitted the jamming signal to acquire some spectrum opportunities as a reward. In CRSN, we can also utilize the physical layer approach to protect the confidential messages. In addition, we notice that in CRSN, the transmission of the SN also interferes with the eavesdropper, which can be employed to enhance the primary secrecy rate. Therefore, in this paper, we will utilize the interference from the SN to protect the primary confidential messages, and as a reward, the limited spectrum sensing error probability of the CRSN is permitted to satisfy the SN's QoS provisioning. To the best of the authors' knowledge, this is the first work that has investigated the secure transmission of the primary system assisted by CRSN by taking into account the spectrum sensing errors.
In this paper, we propose a reciprocally-benefited secure transmission strategy to protect the primary confidential messages and support the QoS requirement of CRSN. In the proposed strategy, the SN opportunistically shares the unutilized licensed spectrum through spectrum sensing. Due to the inevitable spectrum sensing errors, the primary transmission are interfered by the transmission of the SN. In addition, the primary network faces the security threat from an eavesdropper. Since the interference from the SN also interferes with the eavesdropper, which can be employed to increase the primary secrecy rate, the primary network can permit limited spectrum sensing error probability in exchange for the SN's cooperation. Both CRSN and the primary network can benefit from the cooperation. From the primary service perspective, this transmission strategy transforms the possible disturbed SN's service activities into a reciprocally-benefited mode, and the primary confidential messages are protected. From the SN's service perspective, limited spectrum sensing error probability is permitted, and the SN's QoS is satisfied. Specifically, according to the PUs' activities and spectrum sensing results, there are four system states: (I) the spectrum is idle and detected as idle; (II) the spectrum is occupied and detected as idle; (III) the spectrum is idle and detected as busy; and (IV) the spectrum is occupied and detected as busy. For each state, we analyze the SN's transmission rate and the PUs' secrecy rate. Then, we optimally allocate the SN's transmit power for each state to maximize the average transmission rate of CRSN under the constraints of the SN's average transmission power and the PUs' secrecy outage probability requirements. We give a further discussion for the power allocation scheme and investigate the performance tradeoff between the transmission rate of CRSN and the secrecy outage probability of the primary network. In addition, we analyze the PUs' secrecy rate for the asymptotic scenarios and derive closed-form expression of the SN's transmission outage probability. Extensive simulations are implemented to evaluate the proposed strategy. We investigate the effects of the spectrum sensing time, target detection probability and the PUs' secrecy outage probability on the SN's average throughput. Simulation results show that: (1) the performance of the SN's average throughput in the proposed strategy outperforms the conventional overlay strategy; (2) the primary confidential messages will be protected, and the SN can access the licensed spectrum with permitting limited spectrum sensing error probability.
The rest of this paper is organized as follows. Section 2 describes the system model, as well as the four system states. Section 3 interprets the proposed strategy. The optimal power allocation problem is formulated and solved in this section. In Section 4, we give a further discussion for the power allocation scheme and investigate the performance tradeoff between the transmission rate of CRSN and the secrecy outage probability of the primary network. We conduct extensive simulations in Section 5, and Section 6 concludes the paper.

System Model
In this system, a CRSN coexists with a primary network, as shown in Figure 1. The CRSN consists of a SN and a sink node (AN), in which the SN needs to periodically deliver its sensing information to the AN. The primary network consists of a primary transmit (PT) and a primary receiver (PR). In addition, there is an eavesdropper (EV), who eavesdrops on the primary confidential information.
We assume that the eavesdropper is known to the primary network. This assumption is valid when the eavesdropper is a legitimate user that is untrusted by the primary network and can eavesdrop on the confidential messages or transmit and receive its own messages in the different time slots [31][32][33][34][35].
In this system, the CRSN lacks spectrum resources and needs to share the licensed spectrum for its data transmission through spectrum sensing. Due to the inevitable spectrum sensing errors, the SN's transmission will interfere with the EV [36], and we can utilize the interference on the EV to protect the primary confidential messages. Therefore, in the proposed strategy, the confidential messages of the primary network can be protected, and as a reward, the primary network will permit limited spectrum sensing error probability. We assume that the upper layer data packets are divided into equal frames, and the duration of each frame is T. Both the primary network and CRSN experience stationary, ergodic, independent and block Rayleigh fading [37], which indicates that the channel state will be invariant within a frame, but independently vary from one frame to another. The channel power gains of PT → PR, PT → EV, PT → SN, PT → AN, SN → PR, SN → EV and SN → AN are denoted as g tr , g te , g ts , g ta , g sr , g se and g sa , respectively, and they are assumed to follow exponential distributions with parameters σ 2 tr , σ 2 te , σ 2 ts , σ 2 ta , σ 2 sr , σ 2 se and σ 2 sa , respectively. We assume that all noise variables in the system are cyclic symmetry complex Gaussian random variables with zero-mean and unit variance. The power budgets of the PT and SN are denoted as P b and P s , respectively. To guarantee the security of the primary confidential messages, Wyner's wiretap encoding scheme is adopted in this system, which indicates that the transmission rate and secrecy rate of the confidential messages are set as R t and R sec , respectively. The difference between R t and R sec , denoted as R e = R t − R sec , is the information redundancy available against eavesdropping. A secrecy outage event occurs when the wiretap channel rate exceeds the information redundancy R sec . We assume that the channel state information (CSI) associated with the primary network and CRSN can be perfectly estimated by the SN and PR, and this CSI information is reliably fed back to the AN and PT, respectively. In addition, since the eavesdropper is a known user, we assume that the CSI associated with the EV is available. This assumption is valid when the eavesdropper is an active user [38], a subscribed user [39], a jammer or a classical eavesdropper [40]. Even for the passive eavesdropper, it also can estimate the CSI through local oscillator power inadvertently leaked from the eavesdropper's receiver radio frequency front-end [41].
The transmission activities of the primary network can be modeled as a binary-hypotheses problem [42]; the channel idle probability is denoted as P (H 0 ), and the channel busy probability is denoted as P (H 1 ), where H 0 denotes that the spectrum is idle and H 1 denotes that the spectrum is occupied. In this system, the SN firstly senses the licensed spectrum with the energy detection method during the first τ part of each frame [43]. The false alarm probability and the detection probability are given by: where Q (x) = 1 2π +∞ x e − t 2 2 dt, γ is the received signal-to-noise ratio (SNR), f s is the sampling frequency, ε is the detection threshold and σ 2 = 1 is the noise variance.
According to the PT's activities and spectrum sensing results, there are four system states, which are listed as below: State0: the spectrum is idle and detected as idle; State1: the spectrum is occupied and detected as idle; State2: the spectrum is idle and detected as busy; State3: the spectrum is occupied and detected as busy.
In State0 and State2, the spectrum is idle, and the SN can communicate with the AN freely. In State1 and State3, the SN should transmit with optimal power to protect the PT's confidential messages. In return, the primary network tolerates limited spectrum sensing error probability. In the next section, we will carefully interpret the proposed strategy.

The Reciprocally-Benefited Secure Transmission Strategy
In this section, we firstly analyze the SN's transmission rate and the primary secrecy rate for each state. Then, we optimally allocate the SN's transmit power for each state, so that the average transmission rate of the SN is maximized under the constraint of the maximum permitted primary secrecy outage probability.

Problem Formulation
In State0, the SN can correctly detect the spectrum state as idle with probability: Then, the SN accesses the spectrum and transmits with rate R (0) s , which is given by: where p (0) s is the SN's transmit power in this state. Since the PT stops its transmission, the secrecy rate of this state is zero.
In State1, the spectrum is occupied and incorrectly detected as idle with probability: Under the interference from the PT, the SN transmits with power p (1) s and achieves rate R s , which is given by: The SN's transmission will interfere with the EV, and the secrecy rate of the primary network is: where the first and second items in Equation (6) are the secrecy rates during the spectrum sensing phase and data transmission phase in State1, respectively. In State2, the spectrum is idle and incorrectly detected as busy with probability: In this state, the SN will transmit with power p (2) s and achieve rate R s , which is given by: Since the PT stops its transmission, the secrecy rate of this state is zero. In State3, the PT occupies the spectrum, and the SN detects the PT's transmission with probability: To protect the PT's transmission, the SN transmits with power p s and achieves rate R s , which is given by: Then, under the interference from the SN, the secrecy rate of the primary network is: where the first and second items are the secrecy rates during the spectrum sensing phase and data transmission phase in State3, respectively. Therefore, the average transmission rate of the SN is given by: where E (·) is the expectation operation. Under the SN's interference, the secrecy outage probability of the primary network is: To maximize the SN's average transmission rate under the constraint of the primary maximum permitted secrecy outage probability, the optimal power allocation problem is formulated as: where P th is the maximum permitted primary secrecy outage probability, P av is the SN's average power budget and P ave sn is the SN's average power consumption, which is given by:

Optimal Power Allocation
In this section, we will solve the optimization problem given in Equation (14) to acquire the optimal power allocation for each system state. Since the secrecy outage probability constraint in Equation (14) is not convex over p and: (17) respectively. Since the spectrum sensing time is very short compared with the duration of a frame, we ignore the first items of the right side of R [44,45]. Then,Ř respectively. Therefore, the optimal problem P1 can be rewritten as: The optimal problem P2 can be solved through the Lagrange dual method [46]. The Lagrange function of P2 can be derived as: Then, the Lagrange dual function of the maximum problem, denoted by G (λ, µ), can be formulated as: The dual problem is: Since the optimal variables of p s corresponding to the four system states are independent of each other, the Lagrange function can be written as: Then, the problem P3 can be decomposed as: P3b : max and: Therefore, the problem can be decomposed into four optimal problems, corresponding to the s , respectively. For State0 and State2, we firstly derive the partial derivatives of p (0) s and p (2) s as: Applying the Karush-Kuhn-Tucker conditions and setting the partial derivatives equal to zero, we can acquire the SN's transmit power in State0 and State2 as: For p (1) s in State1, the decomposed optimal problem is: Since the value ϕ p (1) s is determined byŘ (1) b and R sec , the optimal p (1) s is derived according to the relationship betweenŘ (1) b and R sec . WhenŘ (1) b = R sec , we can acquire the following equation as: where ν = 2 Rsec (T−τ) T and: Remark 1. In the derivation of Equation (18), we assume thatŘ b is ignored. Next, we will evaluate the effect of this assumption and take State1 for example. When the information can be securely and reliably transmitted to the primary destination, the effect of this assumption can be evaluated by: where in (a), we utilize the approximations of: Since the information can be securely and reliably transmitted to the primary destination, log 2 (1 + g tr P b ) ≥ R t > R sec . Therefore, In addition, as the spectrum sensing time is too short compared with the data transmission time and can be ignored [44,45], therefore θ (1) is very small, and we can ignore the term τ b can be ignored.
b is always less than R sec , which means that the primary network will experience secrecy outage even under the assistance of CRSN. Then, the optimal problem can be rewritten as: Set l p According to the Karush-Kuhn-Tucker conditions, we can derive: Therefore, the optimal p (1) s can be acquired as: . Let the first-order derivative of the optimal problem P6 equal zero; the optimal p (1) * s can be derived as: For this scenario, the optimal transmit power of p (1) s is derived as: is derived with the same method as p (1) s , which is omitted due to the space limitation. Then, the optimal transmit power for four system states is derived by taking into account the SN's average power constraint, spectrum sensing errors, as well as the primary secure requirement. Next, we will briefly analyze the performance of the proposed strategy.

Performance Analysis
In this section, we will give a further discussion for the power allocation strategy. In addition, the performance tradeoff between the transmission rate of CRSN and the secrecy outage probability of the primary network is investigated. Then, we investigate the primary secrecy rate for the asymptotic scenarios and derive the closed-form expression of the SN's transmission outage probability.

Further Discussion of the SN's Transmit Power
In Section 3.2, we have derived the optimal transmit power for four system states. Now, some further discussions about the power allocation strategy will be given in this section.
• In State0 and State2, the channel is idle, and the SN will access the licensed spectrum with power p (0) s and p (2) s , respectively. Under the average transmit power constraint, p (0) s and p (2) s are derived through the optimal water-filling method.
• In State1 and State3, the SN's transmission will affect the secrecy outage probability of the primary network. Since the derivation of p (1) If B 2 − 4AC < 0, the channel quality between the PT and the PR is always worse than the channel quality between the PT and the EV. Under this condition, the primary information security cannot be guaranteed even though the SN optimally allocates its transmit power to interfere with the EV. Therefore, for this case, the SN will access the licensed spectrum with its maximum transmission power as shown in Equation (38). (2) If B 2 − 4AC ≥ 0, there are six cases, which are shown in Appendix A, and we take p , it indicates that the direct transmission channel quality of the primary network is sufficiently good, and the eavesdropper cannot acquire the primary confidential messages even without the assistance of the SN. In this case, the SN will transmit with its maximum power as shown in Equation (38).
≤ P s , it indicates that the channel quality between the PT and the PR is neither sufficiently better nor worse than the channel quality between the PT and the EV. In this scenario, the tradeoff between the CRSN's performance and the primary secrecy outage probability constraint needs to be studied. Set h p , P s . Obviously, if the CRSN refuses the cooperation request from the PT, the CRSN can acquire the maximum transmission rate. We can denote µ as the cost that the CRSN has to pay if the secrecy outage probability of the primary network is caused. If f ( ) + µ < f p (1) * s , the CRSN will transmit with a large power to maximize its own performance and, thus, causes a primary secrecy outage because the CRSN only needs to pay a relatively small cost.
However, if f ( ) + µ ≥ f p (1) * s , the CRSN will use a low power p (1) * s to guarantee the secure transmission of the primary network since the cost due to the secrecy outage is large. Therefore, the performance tradeoff between the transmission rate of the CRSN and the secrecy outage probability of primary network can be acquired.

Asymptotic Secrecy Rate Analysis
In this section, we will give the asymptotic analysis for the primary secrecy rate under the condition that P b → 0 and P s → ∞. In State1 and State3, the secure capacities of the primary network are: where i = 1 and 3 stand for State1 and State3, respectively.
When P b → 0, the secrecy rate of the primary network can be approximately quantified by its first-order derivative with respect to P b at P b = 0. Then, the secrecy rate can be acquired as: whereṘ (i) sec (0) is the first-order derivative at P b = 0 and o (P b ) denotes the high-order item. According to R (i) sec in Section 3.1, the secrecy rate of the primary network can be rewritten as: where the first item of Equation (42) is the first derivative of R (i) sec . Under this condition, the secrecy rate of the primary network is almost zero. The channel quality between the EV and the primary network and between the EV and the CRSN and the power allocation strategy have almost no effect on the secrecy rate.

P s → ∞
When P s → ∞, the average transmit power constraint in P1 can be removed. Then, the optimal problem can be rewritten as: Adopting the same method in Section 3.2, in State0 and State1, we can acquire: In State1 and State3, the optimal power is: into Equation (40), we can derive the secrecy rate of the primary network.

The Outage Probability Analysis of the CRSN
To guarantee the secure transmission of the primary network, the CRSN should dynamically adjust its transmission power. Set the target transmission rate of the SN as R s . In State0 and State2, the SN will transmit without the interference from primary network and acquire the transmission rate as R respectively. In State1 and State3, the SN's transmission will be interfered by the primary network. Then, the outage probabilities corresponding to State1 and State3 are derived as: In State0, the spectrum is idle and correctly detected with probability as P 1 = P (H 0 ) 1 − p f , and the SN transmits with power p (0) s . In State1, the spectrum is occupied and incorrectly detected as idle with probability as P 1 = P (H 1 ) (1 − p d ), and the SN transmits with power p (1) s . In State2, the spectrum is idle and incorrectly detected as busy with probability P 2 = P (H 0 ) p f , and the SN transmits with power p (2) s . In State3, the spectrum is occupied and correctly detected with probability P 3 = P (H 1 ) p d , and the SN transmits with power p (3) s . Therefore, the average outage probability of the sensor network is:

Simulation Results
In this section, we will evaluate the performance of the primary network and CRSN. In the simulation, the frame duration T is set to be 50 ms. The path loss of the channel is set to be three. The SN's average power and peak power are set to be 10 dB and 15 dB, respectively. The peak power of the PT is set to be 15 dB. In the simulation, we choose the simulation parameters according to the previous works on wireless sensor networks [47], cognitive radio networks [48] and CRSN [49][50][51]. In addition, these values are application-specific parameters and will vary according to the demands of the applications and constraints. The simulation assumptions, as well as other previous simulations will contribute to the development of the realistic CRSN architecture. In addition, changing some assumptions, such as the spectrum sensing method, will slightly affect the conclusions in this paper, and therefore, the obtained results in this paper reveal the general effects of the parameters on the performance in CRSN. For the proposed scheme, the critical parameters, such as channel idle probability, the spectrum sensing time, the power budget of the PT and the secrecy outage threshold, which will affect the performance of the proposed strategy, will be investigated in this section.
In Figure 2, we plot the SN's average throughput versus the spectrum idle probability P (H 0 ). In this figure, we can observe that the SN's average throughput is a monotonically increasing function with respect to P (H 0 ). The reason is that the large spectrum idle probability indicates that there will be more interference-free spectrum access opportunities for the SN's transmission, and the throughput of the CRSN will increase. In addition, more time allocated for spectrum sensing will result in less time for the SN's transmission. Therefore, the average throughput of the SN will decrease. The throughput of the CRSN will decrease when a long time is allocated for spectrum sensing even through the detection probability will increase. Moreover, we also plot the traditional overlay scheme for contrast. Since the overlay scheme does not consider the cooperation between the primary network and the CRSN, the CRSN may be interfered by the PT when the occupied spectrum is detected as idle or miss the idle spectrum opportunity when the idle spectrum is detected as busy. Therefore, the throughput of the overlay scheme is lower than our proposed strategy.  In Figure 3, we show the SN's average throughput of the proposed scheme versus the spectrum sensing time and the target detection probability. In this figure, we can observe that SN's rate will decrease when more time is consumed for spectrum sensing. The reason is that when more time is allocated for spectrum sensing, there will be less time for the SN's data transmission. Since p , which is not a function of the target detection probability. Therefore, the SN's average rate will keep the same when the target detection probability changes. . SN's average throughput of the proposed strategy as a function of the spectrum sensing time and target detection probability. The spectrum idle probability is set to P (H 0 ), the transmit power of the PT is set to P b = 15 dB, and the target secure outage probability is set to P th = 0.1.
In Figure 4, we show the SN's average rate versus the spectrum sensing time τ and the spectrum idle probability P (H 0 ). In this figure, we can observe that the SN's average rate is a monotonically-increasing function with respect to P (H 0 ). The reason is that a large value of the spectrum idle probability indicates that there will be more interference-free spectrum access opportunities for the SN's transmission regardless of the security requirement of the primary network. In addition, the long spectrum sensing time indicates that the SN occupies a short time for information transmission, and the throughput will decrease.  In Figure 5, we show the SN's average throughput versus the spectrum idle probability P (H 0 ) and the target secrecy outage probability P th . A small value of P th indicates that the secrecy outage probability constraint is stringent. Then, the SN has to spend more power to interfere with the eavesdropper and guarantee the secure transmission of the primary network. Therefore, the throughput of the SN will decrease. In addition, more power allocated for the SN's data transmission will result in the increasing of the SN's throughput. A large value of P (H 0 ) indicates that there are more interference-free spectrum access opportunities regardless of the security requirement of the primary network. Under this condition, the SN can transmit with large power and achieve high transmission throughput. In Figure 6, we show the SN's average rate versus the PT's transmit power P b and the spectrum idle probability P (H 0 ). A large value P b indicates that there will be more power consumed for the primary network to guarantee its secure transmission. Then, the SN will consume less power to cooperate with the primary network, which contributes to increasing the SN's throughput. In addition, when P b is large, the detection probability will improve, and the CRSN can fully utilize the spectrum and optimally control its transmit power to maximize its throughput. The idle probability is set to P (H 0 ) = 0.8, and the target secrecy outage probability is set to P th = 0.1.

Conclusions
In this paper, we proposed a cooperative secure transmission strategy, which would benefit both the primary network and the CRSN. In this strategy, the SN's transmission would protect primary information security, and as a reward, limited spectrum sensing error probability was permitted. Based on the primary activities and spectrum sensing results, there were four system states in the system. In each state, we analyzed the SN's transmission rate and the primary secrecy rate and, then, optimally allocated the SN's transmit power to maximize the SN's average rate under the constraint of the maximum permitted primary secrecy outage probability. In addition, we gave further discussion for the power allocation strategy and the performance tradeoff between the transmission rate of the CRSN, and the secrecy outage probability of the primary network was investigated. Moreover, we investigated the primary secrecy rate for the asymptotic scenarios and derived closed-form expression of the SN's transmission outage probability. Simulation results showed that: (1) the performance of the SN's average throughput in the proposed strategy outperformed the conventional overlay strategy; (2) the primary confidential messages were protected, and the QoS requirement of the CRSN is satisfied.   , which is shown in Figure A1a. Otherwise, if f p (1)+ s ≤ f (P s ), the optimal transmit power is p (1) s = P s , which is shown in Figure A1b