Outage Performance of Interference Cancellation-Aided Two-Way Relaying Cognitive Network with Primary TAS/SC Communication and Secondary Partial Relay Selection

: In this paper, we propose a two-way relaying scheme using digital network coding in an underlay cognitive radio network. In the proposed scheme, the transmit antenna selection and selection techniques are combined using a primary transmitter and a primary receiver, respectively. In the secondary network, two source nodes that cannot directly communicate attempt to exchange their data with each other. As a result, the relaying technique using partial relay selection is applied to assist the data exchange. Particularly, at the ﬁrst time slot, the selected secondary relay applies an interference cancellation technique to decode the data received from the secondary sources. Then, the selected relay uses digital network coding to send XOR-ed data to the sources at the second time slot. We ﬁrst derive the outage probability of the primary network over block the Rayleigh fading channel. Then, the transmit power of the secondary transmitters including the source and relay nodes are calculated to guarantee the quality of service of the primary network. Finally, the exact closed-form formulas of the outage probability of the secondary sources over the block Rayleigh fading channel are derived, and then veriﬁed by computer simulations using the Monte Carlo method.


Introduction
In recent years, cognitive radio networks (CRNs) [1] have become an attractive topic that has gained significant attention among researchers. Underlay spectrum sharing (or underlay CRN) is one efficient technique that allows secondary users (SUs) to access bands licensed to primary users (PUs). To satisfy a pre-determined interference constraint, SUs must adjust the transmit power, using the instantaneous channel state information (CSI) of the interference links from SUs to PUs [2][3][4][5][6]. However, it is difficult to implement spectrumsharing methods in [2][3][4][5][6] due to the requirement of high synchronization between PUs and SUs. In [7][8][9], the transmit power of the secondary transmitters is calculated using the expected values of CSI under the constraint of a target outage probability (OP) of the primary network. Due to the limited transmit power and co-channel interference from the primary operation, the performance of the secondary network is severely degraded [9]. To improve the secondary performance, relaying schemes using intermediate relays (see [10][11][12][13][14][15]) are commonly employed. Particularly, whilst some published works [6,7,10] studied dualhop relaying underlay CNRs, others [2,8] considered multi-hop relaying ones. To further enhance the performance of the secondary network in dual-hop relaying models, relay noises due to the decoding operation. However, the disadvantage of DNC TWR is that this technique must use three time slots for each data exchange. To enhance the data rate for DNC TWR, the published works [33][34][35] applied the interference cancellation technique (ICT) at the common relay, and hence the schemes proposed in [33][34][35] also obtained the data rate of 02/02. This paper proposes the DNC TWR scheme operating in the underlay spectrum sharing mode. In the primary network, the transmit antenna selection (TAS) and selection combining (SC) techniques are used at the transmitter and receiver nodes, respectively. In the secondary network, the DNC TWR approach with PRS and ICT is used to enhance the OP performance.

Related Works
In contrast to [27][28][29][30][31], in this paper, ICT is used to reduce one transmission time slot for the DNC TWR networks. Unlike [33][34][35], our proposed scheme applies PRS to the secondary network. Moreover, this paper considers block fading channels, in which channel coefficients do not change during one data transmission cycle, but independently change after each cycle. Although the published works [27,36,37] were concerned with TWR in the underlay CRNs, these references did not study ICT. Moreover, Ref. [36] studied the two-phase TWR model exploiting a direct link between the sources, while Ref. [37] considered a single-relay model operating on the RF-EH environment. The authors in [38] proposed the underlay TWR scheme using RIS and full-duplex transmission. However, Ref. [38] did not study relay selection as well as ICT.
To the best of our knowledge, the published works [39,40] are the most relevant to the topic of this paper. Indeed, [39,40] both considered the DNC TWR underlay CRNs using ICT. In [39], the secondary relay node was selected to maximize the channel capacity at both sources as well as to minimize the collection time of CSI. However, the main differences between this paper and Ref. [39] are given as follows: (i) different relay selection methods were proposed in this paper and [39]; (ii) in [39], block fading channel was not considered; (iii) the secondary transmitters in [39] used the instantaneous CSI of the crossinterference links to adjust their transmission power. Then, it is worth noting that this paper was developed from our previous work [40], and the main difference between this paper and [40] can be listed as follows: (i) this paper applies PRS for the secondary network; (ii) the block fading channel was not considered in [40]; (iii) the transmit power adjustment method for the secondary transmitters in this paper is different to that in [40]; and (iv) the mathematical derivations in this paper are more challenging because we study the PRS and block fading channel.

Motivation and Main Contribution
The motivation and main contribution of this paper can be summarized as follows: • We propose the TAS/SC technique for the primary network to enhance the OP performance for the primary network as well as to increase the spectrum access possibility of the secondary network. • Based on the exact closed-form expression of the OP of the primary network, we derived the closed-form expressions of the transmit power for the secondary source and relay nodes under the condition that the minimum QoS of the primary network must be guaranteed. • The PRS method is applied to the secondary network to enhance the OP performance at the secondary sources. • We derive new exact closed-form formulas of OP at the source nodes over the block Rayleigh fading channel, which are checked and corrected with Monte Carlo simulations.
We organize this paper as follows: the introduction is in Section 1. The proposed system model is illustrated in Section 2. In Section 3, we analyzed the performance of the primary and secondary networks. The results and discussion are given in Section 4. Finally, the conclusions and useful recommendations are provided in Section 5.

System Model
In Figure 1, we present the system model of the proposed underlay CRN applying TAS/SC for the primary network, and the DNC TWR and PRS techniques for the secondary network. In the primary network, the N T -antenna primary transmitter (PT) uses TAS to serve the N R -antenna primary receiver (PR) using SC. In the secondary network, the secondary sources SS 1 and SS 2 exchange their data (denoted by x 1 and x 2 , respectively) with each other thanks to M secondary relays (denoted by SR m , where m = 1, 2, . . ., M). In addition, only one relay (denoted by SR b ) is selected to assist the SS 1 − SS 2 data exchange. Assume that SS 1 and SS 2 cannot directly communicate with each other due to the great distance between them, and all secondary nodes only have one antenna. As mentioned earlier, the data exchange is performed via two orthogonal time slots: i) SS 1 and SS 2 , at the first time slot send its data to SR b which then uses ICT to decode the received data; ii) if SR b can correctly decode both x 1 and x 2 , it performs the XOR operation, i.e., x ⊕ = x 1 ⊕ x 2 , and then sends the XOR-ed data (x ⊕ ) to SS 1 and SS 2 at the second time slot. If SR b only correctly decodes x 1 (or x 2 ), it will transmit x 1 (or x 2 ) to SS 2 (or SS 1 ) at the second time slot. The proposed scheme can be applied to wireless sensor networks and wireless ad hoc networks. For example, in wireless sensor networks, the secondary nodes are sensors while the primary nodes are base stations and/or mobile users in cellular mobile networks. Because of the limited size, the sensor nodes are only equipped with one antenna. Moreover, the sensor networks have to operate on the USS mode to be able to access the bands licensed to the primary nodes.
Let h AB denote the channel coefficient of the A → B link, where A is a transmitter and B is a receiver, i.e., A ∈ {SS 1 , SS 2 , SR m , PT u }, B ∈ {SS 1 , SS 2 , SR m , PR v }, PT u (u = 1, 2, . . ., N T ) denotes the u − th antenna of PT and PR v (v = 1, 2, . . ., N R ) denotes the v − th antenna of PR. Then, we denote g AB as the corresponding channel gain: g AB = |h AB | 2 , and d AB as a link distance between A and B. We can assume that the secondary relays are close to each other, i.e., they are in one cluster. Hence, we can write that d ASR m ∆ = d ASR and d SR m B ∆ = d SRB , ∀A, B, m. Moreover, we can also assume that the secondary relays are closer to SS 1 than to SS 2 (i.e., d SS 1 SR ≤ d SS 2 SR ), and SS 1 is closer to PR than SS 2 (i.e., d SS 1 PR ≥ d SS 2 PR ).

Remark 1.
In the case where d SS 1 PR < d SS 2 PR , we simply change the role of SS 1 by that of SS 2 , and vice versa. Then, considering ultra-dense wireless networks [41,42] where there are a lot of nodes that are between the radio range of SS 1 and SS 2 , they can be considered the potential relays. Among these relays, we focused on the M nodes which are nearer to SS 1 than SS 2 .
Because all the A-B channels are Rayleigh fading, the probability density function (PDF) and cumulative distribution function (CDF) of g AB can be written, respectively, as where Ω AB = (d AB ) µ and µ (2 ≤ µ ≤ 8) denotes a path-loss exponential.
For the ease of presentation and analysis, we assume that the random variables (RVs) g PT u B (g APR v , g ASR m and g SR m B ) are independent and identical. Therefore, we can use the following notations: (2) Remark 2. This paper considers the block Rayleigh fading channel, where g AB remains unchanged during one data exchange cycle, but changes independently after each cycle. As a result, we have g AB ≡ g BA for all the A and B nodes.
Since d SS 1 SR ≤ d SS 2 SR , we hence apply PRS for the second hop between SS 2 and SR m as (see [31]) Because SS 2 and SR m are in radio range of one another, we can assume that the CSI of the SR m − SS 2 links are available at SS 2 . Therefore, SS 2 can select the best relay SR m as presented in (3).
From (3), and using CDF in (1), we obtain CDF of g SS 2 SR b as where Then, the corresponding PDF of g SS 2 SR b can be expressed as We now describe the operation principle of the proposed scheme. At the first time slot, SS 1 and SS 2 , respectively, send x 1 and x 2 to SR b , and PT uses the t-th antenna to send its data (x P ) to PR. The received signals at the r-th antenna of PR and at SR b , under the impact of the cross interference, can be given, respectively, as In (6) and (7), P A is the transmit power of transmitter A, where A ∈ {PT, SS 1 , SS 2 }, n PR r and n SR b denote Gaussian noises at PR r and SR b , respectively. For the ease of presentation and analysis, we can assume that the Gaussian noises at all receivers B have zero mean and unit variance. In addition, we transmit the power P SS 1 and P SS 2 , which will be derived by closed-form expressions in the next section.
From (6), we can formulate the instantaneous signal-to-interference-plus-noise ratio (SINR) obtained at PR r as From (8), the TAS/SC algorithm can be written as follows: Equation (9) implies that PT and PR cooperate to choose the best transmit and receive antennas to maximize the SINR obtained in this time slot.
For SR b , since d SS 1 SR ≤ d SS 2 SR , and hence P SS 1 ≥ P SS 2 (see Section 3.2), and SR b has to decode x 1 first. From (7), the SINR obtained for decoding x 1 is calculated as Then, if x 1 can be correctly decoded, SR b can be removed [20][21][22][23][24][25]. Then, the signal used to decode x 2 is given as From (11), the SINR obtained for decoding x 2 is written as Remark 3. If SR b only correctly decodes x 1 , it will only send x 1 to SS 2 at the second time slot. It is worth noting that if SR b cannot successfully decode x 1 , it cannot perform ICT to remove x 1 , and hence x 2 is also not decoded. Moreover, in the case where SR b cannot correctly obtain x 1 and x 2 , it will do nothing at the second time slot.
Let us consider the secondary time slot, and assume that SR b can access the licensed band to transmit the data x * (x * ∈ {x ⊕ , x 1 }). In this time slot, assume that PT uses the w-th antenna to send the x P to PR. Then, the received signals at the z-th antenna of PR, at SS 1 and at SS 2 can be written, respectively, as where P SR b is the transmit power of SR b (P SR b which will be derived in the next section), and n B denotes the Gaussian noises at the receiver B whose zero mean and unit variance with B ∈ {PR z , SS 1 , SS 2 }.
From (13), the SINR received at PR z is calculated as Similarly to (9), the TAS/SC algorithm in the second time slot can be written as Remark 4. To realize the TAS/SC algorithms in (9) and (17), in the set-up phase, PT, SS 1 , SS 2 , and SR b send pilot signals to PR. Then, PR estimates the channel coefficients h PT p PR q , h SS 1 PR q , h SS 2 PR q , and h SR b PR q to calculate the instantaneous SINRs ϕ PT p ,PR q . Using (9) and (17), PR can determine the best transmitting antennas at PT and its best receiving antennas, in the first and secondary slots. Finally, PR feedbacks the index of these antennas to PT. Here, we also assume that the CSI estimation at PR is perfect.
It is worth noting that various diversity transmitting/receiving techniques such as TAS/maximal ratio combining (MRC), maximal ratio transmission (MRT)/SC, and MRT/MRC can be used to enhance the OP performance for the primary network. However, the MRT and MRC techniques require both the amplitude and phase information of the channel coefficients. As a result, the implementation of the MRT and MRC techniques is more complex than that of TAS and SC. Moreover, as with using the MRT technique, PT has to use all its transmit antennas, which can cause more co-channel interference on the secondary network.
Next, for SS 1 and SS 2 , the SINRs obtained for decoding x * can be formulated, respectively, as We note from (18) that when x * ≡ x 1 , this means that SR b only sends x 1 to SS 2 at the second time slot, and hence SS 1 is the outage in this case. When x * ≡ x ⊕ , the secondary source SS i (i = 1, 2) attempts to decode x ⊕ so that it can obtain the desired data by using the XOR rule, i.e., x i ⊕ x ⊕ = x j , where j = 1, 2 and j = i. This paper evaluates OP for the primary and secondary networks. For the primary network, OP in the first and second time slots can be formulated, respectively, as where θ Pth is a pre-determined threshold of the primary network. For the secondary network, we consider OP at SS 1 and SS 2 . At first, the OP of SS 1 is formulated as where θ Sth is a pre-determined threshold of the secondary network.
In (20), is the probability that SS 1 can correctly receive the data x 2 , i.e., x 2 is successfully obtained by SR b at the first time slot ψ SR b ,x 1 ≥ θ Sth , ψ SR b ,x 2 ≥ θ Sth , and the transmission from SR b to SS 1 at the second time slot is successful ϕ SS 1 ≥ θ Sth .
Then, the OP of SS 2 can be formulated as where Pr ψ SR b ,x 1 ≥ θ Sth , ϕ SS 2 ≥ θ Sth is the probability that x 1 is successfully decoded by SR b and SS 2 at the first and second time slots, respectively.

Performance Analysis
At first, we evaluate the OP of the primary network, and use this result to calculate the transmit power of SS 1 , SS 2 and SR b .

OP of the Primary Network
Combining (8), (9), and (19), the OP at the first time slot can be formulated as where As marked in (22), the probability I 1 can be expressed in the following form: Substituting CDF F g PTpPRq (ρ 1 x + ρ 2 y + ρ 0 ) and PDFs f g SS 1 PRq (x) and f g SS 2 PRq (y) into (23); after some careful calculation, we obtain an exact closed-form expression of I 1 . Then, substituting this result into (22) yields Similarly, combining (16), (17), and (19), the OP of the primary network at the second time slot can be exactly computed as where Remark 5. We now consider a special case where the secondary users are not currently using the licensed band. Because there is no co-channel interference from the secondary network, the TAS/SC algorithms in (9) and (17) can be re-written, under the following form: From (26), it is straightforward to calculate the OP of the primary network as 3.2. Transmit Power of SS 1 , SS 2 and SR b As proposed in [7][8][9], let ε OP denote the target QoS of the primary network, i.e., OP P1 ≤ ε OP and OP P2 ≤ ε OP . To find the transmit power of SS 1 , SS 2 , and SR b , we have to solve the following equations: OP P1 = ε OP and OP P2 = ε OP . Then, using (25) to solve OP P2 = ε OP , we have where Because P SR b is not negative, Equation (28) is re-written as follows: where [x] + = max(0, x).
Remark 6. Equation (31) implies that the primary network only shares the licensed band with the secondary network if the OP of the primary network without the interference from the secondary network (OP P0 ) is less than the required QoS. Otherwise, if OP P0 ≥ ε OP , then SR b is not allowed to access the licensed band, i.e., P SR b = 0. It is also noted from (30) that the transmit power of the secondary relays is the same.
Then, we consider P SS 1 and P SS 2 . Similarly to the power allocation method proposed in [7,8], we have the following formula: Equation (32) presents that the average interference power at PR (due to the data transmission of SS 1 and SS 2 ) is the same or P SS 1 d SS 1 PR −µ = P SS 2 d SS 2 PR −µ . Therefore, if d SS 1 PR ≥ d SS 2 PR , then P SS 1 ≥ P SS 2 and vice versa. Now, combining (24) and (32), we obtain Then, solving OP P1 = ε OP , we can find P SS 1 and P SS 2 , respectively, as Remark 7. Similarly, the condition for P SS 1 , P SS 2 > 0 is OP P0 < ε OP . Moreover, as P PT → +∞, we have exp(−Ω PTPR ρ 0 ) ≈ 1, and then we can approximate P SR b , P SS 1 , and P SS 2 , respectively, as where . We can observe from (35) that at high transmit power P PT , the transmit power P SR b , P SS 1 , and P SS 2 linearly increases as P PT increases.

OP of the Secondary Network
This sub-section calculates OP SS 2 and OP SS 1 as in Propositions 1 and 2 below. At first, plugging (10), (12), and (18)-(21) together, we can rewrite OP SS 2 and OP SS 1 , respectively, as where

Proposition 1. OP SS 2 can be expressed by an exact closed-form expression as
Proof. Setting U = u, V 2 = v 2 , we can formulate I 2 in (36), conditioned on U = u, V 2 = v 2 , as Substituting the CDF of X 1 in (1) and PDF of X 2 in (5) into (39), after some calculation, we obtain Then, from (40), we obtain an exact closed-form expression of I 2 as follows: Substituting (41) into (36), we obtain OP SS 2 , and finish the proof.

Proposition 2.
OP SS 1 can be expressed as follows: 3 .
Similarly to Case 1, we can formulate I 3 in this case as follows: Similarly to the derivation of J 1 and J 2 , we can obtain J 3 and J 4 in (53), respectively, as Substituting (49), (51), and (52) into (37), and substituting (53)-(55) into (37), we obtain OP SS 1 in Case 1 and in Case 2, respectively. Therefore, we finish the proof here.

Simulation Results
In a simulation environment, we the fix positions of SS 1 , SS 2 , PT, and PR at (0,0), (1,0), (0.65,1), and (0.65,0.5), respectively, while that of the secondary relays is (x R , 0), and where 0 < x R ≤ 0.5. With these positions, we can see that d SS 1 SR ≤ d SS 2 SR and d SS 1 PR > d SS 2 PR . In this section, the system parameters are fixed as follows: the path-loss exponent equals 3 (µ = 3), the outage threshold of the primary network equals 1 (θ Pth = 1), the target QoS of the primary network equals 0.001 (ε OP = 0.001), and the outage threshold of the secondary network equals 0.001 (θ Sth = 0.001). Finally, in the figures presented below, the markers denote the simulated results (Sim), and the solid lines denote the theoretical results (Theory). Figures 2 and 3, respectively, present the OP of the primary network and transmit power of the secondary transmitters as a function of P PT in dB. In these figures, the secondary nodes are located at (0.3,0), i.e., x R = 0.3. At first, we can see from these figures that at low P PT values, the QoS of the primary network is not satisfied (i.e., OP P0 > ε OP ), and hence the secondary transmitters are not allowed to access the spectrum, (i.e., P SS 1 = P SS 2 = P SR b = 0). It is worth noting that without the secondary operation, the OP values at PR equals to OP P0 . Then, let us consider the case where the transmit power P PT is high enough and the QoS of the primary network is satisfied. In this case, SR b , SS 1 and SS 2 can access the licensed band to transmit the data, using the maximum transmit power as given in (30) and (34). Therefore, the OP at PR is equal to ε OP , i.e., OP P1 = OP P2 = ε OP . As seen, when N T = 1 and N R = 3, the secondary network can access the licensed band when P PT ≥ 1(dB), and when N T = N R = 2, the secondary network can access the licensed band when P PT ≥ −1(dB). We also see that N T = N R = 2 provides better OP performance for the primary network as well as increases the spectrum access possibility for the secondary network, as compared with N T = 1 and N R = 3. Moreover, with N T = N R = 2, the transmit power of the secondary transmitters is also higher than those with N T = 1 and N R = 3. Looking at Figure 3, we also see that the transmit power of all secondary transmitters increases as P PT increases. Moreover, as proven in (35), the transmit power of all secondary transmitters linearly increases at high P PT region. From Figure 2, we can observe that the simulation results validate the theoretical ones of OP P1 , OP P2 , and OP P0 derived in Section 3.   Now, we consider an optimization problem for the primary OP performance, where the total number of transmit and receive antennas is fixed by N T + N R = N tot , and N tot is a constant. From (24), (25), and (27), OP P1 , OP P2 , and OP P0 obtain the lowest value when

OP of the Primary Network and Transmit Power of the Secondary Transmitters
For example, in Figures 2 and 3, since N tot = 4, the optimal values of N T and N R are N T = N R = 2.

OP of the Secondary Network
This sub-section studies the OP of the secondary network with N T = N R = 2. As presented in Figures 2 and 3, P PT should be higher than −1 (dB) so that the secondary transmitters are allowed to use the licensed band.
In Figure 4, we present the OP at the secondary sources as a function of P PT in dB with different values of the number of relays (M), and with x R = 0.3. At first, we can see that the simulation results verify the correction of the expressions of OP SS 1 and OP SS 2 derived in Section 3. Then, we can see that OP SS 2 is lower than OP SS 1 because the datum x 1 has not yet been decoded by SR b at the first time slot. It is also seen from Figure 4 that the OP of SS 1 and SS 2 is lower with the increase in the number of relays (M). However, as observed in OP SS 2 , with M = 3 and M = 8, OP SS 2 only changes slightly. Finally, we can observe that OP SS 1 and OP SS 2 decrease with the increase in P PT . However, both OP SS 1 and OP SS 2 rapidly converged to saturation values as P PT is sufficiently high. Moreover, the saturation values do not depend on P PT , which means that the diversity order is equal to zero. To explain the saturation points in Figure 4, we first rewrite the SINRs given in (10), (12), and (18) at a high P PT regime as follows:  From (35), (57), and (58), we can see that SINRs ψ SR b ,x 1 , ψ SR b ,x 2 , ϕ SS 1 , and ϕ SS 2 at high P PT values do not depend on P PT , and this is the reason why OP SS 1 and OP SS 2 converge to the saturation values. Figure 5 presents OP SS 1 and OP SS 2 as functions of the number of relays (M) with different positions of the secondary relays and with P PT = 10 (dB). As seen from Figure 5, OP SS 1 and OP SS 2 are lower with the increase in M. However, when M is high enough, OP SS 1 and OP SS 2 converge to saturation values. For example, when x R = 0.4, OP SS 2 OP SS 1 converges to the constants as M ≥ 2 (M ≥ 6). Figure 5 also illustrates that, as M increases, the performance gap between OP SS 1 and OP SS 2 is smaller. Therefore, an increasing M also provides the performance fairness between SS 1 and SS 2 . Finally, it can be observed that position of the secondary relays significantly affects OP SS 1 and OP SS 2 . As seen from Figure 5, OP SS 1 and OP SS 2 with x R = 0.2 are much lower than those with x R = 0.4. To more clearly show the impact of x R on the OP performance of the secondary sources, in Figure 6, we present OP SS 1 and OP SS 2 as changing x R from 0.1 to 0.5. In this figure, P PT is fixed by 10 (dB). We first see that both OP SS 1 and OP SS 2 increase as x R increases, which means that the proposed scheme performs well when the secondary relays are near the source SS 1 . Figure 6 also shows that OP SS 1 and OP SS 2 are lower with higher values of M, and the simulation results match very well with the analytical ones.

Conclusions
In this paper, we proposed the underlay CRN using TAS/SC to enhance the OP performance for the primary network, and using DNC TWR, ICT, and PRS to enhance the performance of the secondary network, in terms of OP and data rate. Additionally, we derived the closed-form expressions of the transmit power of the secondary transmitters and exact closed-form expressions of OP at the secondary sources over the Rayleigh fading channel. To check the correction of the derived formulas, Monte Carlo simulations were realized. Because all the derived expressions are in closed-form, they can be easily used to design and optimize the considered network. Then, as proven in Section 4, enhancing the primary OP performance with TAS/SC also increased the spectrum access possibility and transmit power of the secondary transmitters as well as increased the second OP performance. However, under the impact of the co-channel interference from the primary network, the secondary network only obtains the coding gain (i.e., the diversity gain equal to zero). The results show that the OP performance of the secondary network could be improved by increasing the number of secondary relays and placing the relays near one of the secondary sources. Finally, it is worth noting that increasing the number of secondary relays also provides performance fairness for the secondary sources.

Conflicts of Interest:
The authors declare no conflict of interest.