# Achievable Rate of NOMA-Based Cooperative Spectrum-Sharing CRN over Nakagami-\(m\) Channels
## 4 Achievable Rate Analysis
### Ergodic Achievable Rates  
**Ergodic Achievable Rate at the PR:** Using the instantaneous achievable data rate at the PR (6), the associated ergodic achievable data rate at the PR can then be written as  
\[\bar{R}_{p}^{\rm NOMA}=\mathbb{E}\{R_{p}^{\rm NOMA}\}=\frac{1}{2}\mathbb{E} \bigg{\{}\log_{2}\bigg{(}1+\gamma_{p}+\frac{\gamma_{s}\,\alpha_{0}}{\gamma_{ s}\,\alpha+1}\bigg{)}\bigg{\}}, \tag{16}\]  
where \(\gamma_{p}\)=\(\rho_{p}|h_{p}|^{2}\), \(\gamma_{s}\)=\(\rho_{s}|g_{p}|^{2}\), and \(\alpha\)=\(\sum_{i=1}^{K}\alpha_{i}\). Expression (16) can be written in an integral form as  
\[\bar{R}_{p}^{\rm NOMA} =\frac{1}{2}\bigg{\{}\underset{l}{\int}\underset{l}{\int}\underset {l}{\int}\underset{l}{\int}\underset{l}{\log}\bigg{(}1+\gamma_{p}+\frac{\gamma _{s}\,\alpha_{0}}{\gamma_{s}\,\alpha+1}\bigg{)}f_{\gamma_{l}}\big{(}\gamma_{p} \big{)}d\gamma_{p}\] \[\times f_{\gamma_{s}}(\gamma_{s})d\gamma_{s}. \tag{17}\]  
Let us first evaluate integral \(I\) as  
\[I=\int_{0}^{\infty}\log_{2}\big{(}1+\gamma_{p}+C\big{)}f_{\gamma_{p}}\big{(} \gamma_{p}\big{)}d\gamma_{p}, \tag{18}\]  
where C=\(\frac{\gamma_{s}\,\alpha_{0}}{\gamma_{s}\,\alpha+1}\) is used for the sake of simplicity. Now, \(\log_{2}\big{(}1+\gamma_{p}+C\big{)}=\log_{2}\big{(}1+\gamma_{p}\big{)}+\log_ {2}\Big{(}1+\frac{C}{\Gamma+\gamma_{p}}\big{)}\) is expanded and then substituted in (18) to obtain \[I =\underbrace{\int_{0}^{\infty}\log_{2}(1+\gamma_{p})f_{\gamma_{p}}( \gamma_{p})d\gamma_{p}}_{I_{1}}\] \[+\underbrace{\int_{0}^{\infty}\log_{2}\biggl{(}1+\frac{C}{1+\gamma _{p}}\biggr{)}f_{\gamma_{p}}(\gamma_{p})d\gamma_{p}}_{I_{2}}. \tag{19}\]  
Integral \(I_{1}\) can be re-written by substituting (13) and (15) in it to obtain  
\[I_{1} =\frac{\left(\frac{m_{0}}{\overline{\gamma}_{p}}\right)}{\ln(2) \Gamma(m_{0})}\int_{0}^{\infty}H_{2,2}^{1,2}\biggl{[}\gamma_{p}\biggr{|}\ \begin{array}{c}(1,1),(1,1)\\ (1,1),(0,1)\end{array} \biggr{]}\] \[\times H_{0,1}^{1,0}\Biggl{[}\frac{m_{0}\gamma_{p}}{\overline{ \gamma}_{p}}\biggr{|}\ \begin{array}{c}(m_{0}-1,1)\end{array} \biggr{]}d\gamma_{p}, \tag{20}\]  
where \(m_{0}\) is the fading parameter for the PT-PR link and \(\bar{\gamma}_{p}=\mathbb{E}\{\gamma_{p}\}\). The integral in (20) can now be evaluated using ([25], Equation (2.6.8)) to give  
\[I_{1} =\frac{1}{\ln(2)\Gamma(m_{0})}H_{3,2}^{1,3}\biggl{[}\frac{ \overline{\gamma}_{p}}{m_{0}}\biggr{|} \begin{array}{c}(1,1),(1,1),(1-m_{0}, 1)\\ (1,1),(0,1)\end{array} \biggr{]}\] \[=\frac{1}{\ln(2)\Gamma(m_{0})}G_{3,2}^{1,3}\biggl{(}\frac{ \overline{\gamma}_{p}}{m_{0}}\biggr{|} \begin{array}{c}1,\ 1,\ 1-m_{0}\\ 1,\ 0\end{array} \biggr{)}, \tag{21}\]  
where \(G_{p,d}^{m,n}(\cdot)\) in the second equality is the [PERSON]'s G-function related to [PERSON]'s H-function \(H_{p,d}^{m,n}[\cdot]\) via ([25], Equation (1.7.1)). It may be noted that [PERSON]'s G-function is a sub-class of [PERSON]'s H-function, and it is relatively simpler to evaluate than compared to [PERSON]'s H-function. Another advantage of this function is that there is a built-in function available in most well-known computational software, e.g., MATLAB and MATHEMATICA, etc. Now, integral \(I_{2}\) can be rearranged by using identity ([23], Equation (1.511)) as follows. \[I_{2}=\frac{1}{\ln(2)}\sum_{n=1}^{\infty}\frac{(-1)^{n+1}}{n}(C)^{n}\int_{0}^ {\infty}\bigl{(}1+\gamma_{p}\bigr{)}^{-n}f_{\gamma_{p}}(\gamma_{p})d\gamma_{ p}. \tag{22}\]  
Expression \(\bigl{(}1+\gamma_{p}\bigr{)}^{-n}\) in (22) can be represented in terms of [PERSON]'s H-Function using relation ([25], Equation (1.7.3)) as  
\[\bigl{(}1+\gamma_{p}\bigr{)}^{-n}=\frac{1}{\Gamma(n)}H_{1,1}^{1,1}\biggl{[} \gamma_{p}\biggr{|} \begin{array}{c}(1-n,1)\\ (0,1)\end{array} \biggr{]}. \tag{23}\]  
Substituting (13) and (23) in (22), \(I_{2}\) becomes  
\[I_{2} =\frac{\left(\frac{m_{0}}{\overline{\gamma}_{p}}\right)}{\ln(2) \Gamma(m_{0})}\sum_{n=1}^{\infty}\frac{(-1)^{n+1}}{n\,\Gamma(n)}(C)^{n}\] \[\times\int_{0}^{\infty}H_{1,1}^{1,1}\biggl{[}\gamma_{p}\biggr{|} \begin{array}{c}(1-n,1)\\ (0,1)\end{array}