###### Abstract  
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 first 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 first 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 verified by computer simulations using the Monte Carlo method. interference cancellation; two-way relaying network; digital network coding; underlay cognitive radio; outage probability; partial relay selection 202202  
selection methods were investigated in [3; 16; 17; 18]. The authors in [16; 17] proposed partial relay selection (PRS) methods, where the best relay was selected using the CSI of the source-relay links. In contrast to PRS, the full-relay selection (FRS) method in [18] used the CSI of the source-relay and relay-destination links to find the best relay. Therefore, the implementation of PRS is much simpler than that of FRS, and hence, in this paper, the PRS is employed to enhance the OP performance for the secondary network. However, published works [2; 3; 6; 7; 8; 9; 10; 16; 17; 18] have not studied the non-orthogonal multiple access (NOMA) technique which can significantly increase the data rate for the secondary network. In [4; 5; 19; 20; 21; 22; 23; 24; 25], the underlay CRNs using NOMA were reported. Applying NOMA, a secondary source can communicate with different secondary destinations at the same time and the same frequency, and the secondary destinations have to perform the interference cancellation technique (ICT) to extract their desired signals. As a result, NOMA provides a much higher data rate and multiplexing gain for the underlay CRNs, as compared with conventional orthogonal multiple access (OMA). In [19], a dual-hop underlay CRN using NOMA was introduced, where a secondary source could send its data to two secondary destinations thanks to an amplify-and-forward (AF) secondary relay. Compared to the corresponding OMA scheme, the scheme proposed in [19] obtained better performance, in terms of OP and throughput. The published works [4; 5] proposed that dual-hop cooperative decode-and-forward (DF) underlay CRNs adopted NOMA. The authors in [20] evaluated the throughput of a multi-user underlay CRN using the user selection method. In addition, the published work [20] proposed an intelligent switching strategy between NOMA and OMA. In [21], the authors proposed a CSI-based power control for an adaptive NOMA/OMA switching scheme in the uplink underlay CRNs. In [22], PRS was applied for the NOMA-assisted underlay CRNs to increase the reliability of data transmission between a secondary base station and multiple secondary users. In addition, the authors in [22] also studied the impact of the imperfect SIC on pairwise error probability (PEP). In [23], the OP of a cooperative NOMA scheme with the imperfect SIC in the underlay CRNs was evaluated. Th published work [24] proposed the cognitive NOMA scenario for Internet of Things (IoTs) networks using short-packet communications under joint impact of imperfect CSI and SIC problems.