## 2 System Model
### Transmit Power Formulation  
In underlay CR, the nodes S and \(R_{m}\) must adjust their transmit power to satisfy the interference constraint (see [39]), i.e.,  
\[\mathrm{I}_{\mathrm{S}}\leq\frac{I_{\mathrm{th}}}{\left(1+\tau_{1}^{2}\right) \max\limits_{n=1,2,\ldots N}\left(\gamma_{\mathrm{S}\mathrm{P}_{n}}\right)}= \frac{I_{\mathrm{th}}}{\left(1+\tau_{1}^{2}\right)Y_{0}^{\mathrm{max}}}, \tag{10}\]  
\[\mathrm{I}_{\mathrm{R}_{m}}\leq\frac{I_{\mathrm{th}}}{\left(1+\tau_{1}^{2} \right)\max\limits_{n=1,2,\ldots N}\left(\gamma_{\mathrm{R}_{m}\mathrm{P}_{n }}\right)}=\frac{I_{\mathrm{th}}}{\left(1+\tau_{1}^{2}\right)Y_{m}^{\mathrm{max }}}, \tag{11}\]  
where \(I_{\mathrm{th}}\) is the interference constraint threshold required by the primary users, and:  
\[Y_{0}^{\mathrm{max}}=\max\limits_{n=1,2,\ldots N}\left(\gamma_{\mathrm{S} \mathrm{P}_{n}}\right),\,Y_{m}^{\mathrm{max}}=\max\limits_{n=1,2,\ldots N}\left( \gamma_{\mathrm{R}_{m}\mathrm{P}_{n}}\right). \tag{12}\]  
From Equations (7)-(8), and (10)-(11), the maximum transmit power of S and \(R_{m}\) can be formulated, respectively, as  
\[P_{0}=\min\left(\mathrm{E}_{\mathrm{S}},\mathrm{I}_{\mathrm{S}}\right)=P_{ \mathrm{B}}\min\left(\kappa X_{0}^{\mathrm{sum}},\frac{\delta}{Y_{0}^{\mathrm{ max}}}\right), \tag{13}\]  
\[P_{m}=\min\left(\mathrm{E}_{\mathrm{R}_{m}},\mathrm{I}_{\mathrm{R}_{m}}\right)= P_{\mathrm{B}}\min\left(\kappa X_{m}^{\mathrm{sum}},\frac{\delta}{Y_{m}^{\mathrm{ max}}}\right), \tag{14}\]  
where \(\delta=I_{\mathrm{th}}/P_{\mathrm{B}}/\left(1+\tau_{1}^{2}\right).\) In addition, we denote \(\mu=I_{\mathrm{th}}/P_{\mathrm{B}}\) that is assumed to be a constant.  
Then, under the impact of the hardware impairments, the instantaneous SNR obtained at the first and second hops across the relay can be given, respectively, by  
\[\Psi_{1m}=\frac{P_{0}\gamma_{\mathrm{S}\mathrm{R}_{m}}}{\tau_{\mathrm{D}}^{2}P _{0}\gamma_{\mathrm{S}\mathrm{R}_{m}}+N_{0}}=\frac{\Delta\min\left(\kappa X_{ m}^{\mathrm{sum}},\delta/Y_{m}^{\mathrm{max}}\right)\gamma_{\mathrm{S}\mathrm{R}_{m}}}{ \tau_{\mathrm{D}}^{2}\Delta\min\left(\kappa X_{0}^{\mathrm{sum}},\delta/Y_{m}^ {\mathrm{max}}\right)\gamma_{\mathrm{S}\mathrm{R}_{m}}+1}, \tag{15}\]  
\[\Psi_{2m}=\frac{P_{m}\gamma_{\mathrm{S}\mathrm{R}_{m}}D}{\tau_{\mathrm{D}}^{2}P _{m}\gamma_{\mathrm{R}\mathrm{R}_{m}}+N_{0}}=\frac{\Delta\min\left(\kappa X_{ m}^{\mathrm{sum}},\delta/Y_{m}^{\mathrm{max}}\right)\gamma_{\mathrm{R}\mathrm{R}_{m}}D}{ \tau_{\mathrm{D}}^{2}\Delta\min\left(\kappa X_{m}^{\mathrm{sum}},\delta/Y_{m}^ {\mathrm{max}}\right)\gamma_{\mathrm{R}\mathrm{R}_{m}}D+1}, \tag{16}\]  
where \(\Delta=P_{\mathrm{B}}/N_{0}\), \(N_{0}\) is the additive white Gaussian noise (AWGN) variance.  
With the DF relaying technique, the e2e channel capacity of the \(\mathrm{S}\to\mathrm{R}_{m}\to\mathrm{D}\) path is formulated by  
\[C_{m}=\tfrac{(1-\alpha)\mathrm{T}}{2}\mathrm{log}_{2}\left(1+\min\left(\Psi_{1m},\Psi_{2m}\right)\right). \tag{17}\]  
From (17), the e2e outage probability is defined as the probability that the end-to-end capacity is lower than a positive threshold, i.e., \(C_{\mathrm{th}}\) as follows:  
\[\mathrm{OP}=\mathrm{Pr}\left(C_{m}<C_{\mathrm{th}}\right), \tag{18}\]  
where \(C_{\mathrm{th}}\) is the target data rate of the secondary network.  
Then, the e2e throughput (TP) can be formulated as in [11]:  
\[\mathrm{TP}=\left(1-\alpha\right)\mathrm{TC}_{\mathrm{th}}\left(1-\mathrm{OP} \right), \tag{19}\]  
where \(\left(1-\alpha\right)T\) is the total transmission time, i.e., \(\mathrm{S}\to\mathrm{R}_{m}\to\mathrm{D}\).