# Best Relay Selection Strategy in Cooperative Spectrum Sharing Framework with Mobile-Based End User
## 3 Performance Analysis  
The outage probability (OP) of the proposed system is defined as the probability that the capacity \(C\) is lower than or equal to a specific data rate \(R_{0}\), where \(C=\frac{1}{2}log_{2}(1+\gamma_{D})\). Hence, the OP can be expressed as:  
\[OP=P_{r}(C\leq R_{0})=P_{r}\Big{(}\gamma_{D}\leq 2^{2R_{0}}-1\Big{)}=F_{\gamma_{D }}(\gamma_{th}) \tag{7}\]  
where \(\gamma_{D}\) is the received SNR at the SU \(D\) using SC technique to select the best relaying path, which is defined as follows:  
\[\gamma_{D}=max_{k=1,2,...,N}\{\gamma_{k}\} \tag{8}\]  
Therefore, the OP can be written as:  
\[OP=P_{r}\Big{[}max_{k=1,2,...,N}(\gamma_{k})\leq 2^{2R_{0}}-1\Big{]} \tag{9}\]  
The relay with the highest SNR is selected and, therefore, the end-to-end SNR \(\gamma_{k}\) can be derived with the help of Equation (2) in [64]. Specifically, the end-to-end SNR \(\gamma_{k}\) can be written as follows:  
\[\gamma_{k}=\bigg{[}\bigg{(}1+\frac{1}{\gamma_{SR_{k}}}\bigg{)}\bigg{(}1+\frac {1}{\gamma_{R_{k}D}}\bigg{)}-1\bigg{]}^{-1} \tag{10}\]  
Hence,  
\[\gamma_{k}=\frac{\gamma_{SR_{k}}\gamma_{R_{k}D}}{\gamma_{SR_{k}}+\gamma_{R_{k }D}+1} \tag{11}\]  
where \(\gamma_{SR_{k}}\) is the instantaneous SNR of the \(S\)\(\rightarrow\)\(R_{k}\) link and \(\gamma_{R_{k}D}\) is the instantaneous SNR of the \(R_{k}\)\(\rightarrow\)\(D\) link, which, respectively, are defined as follows:  
\[\gamma_{SR_{k}}=\frac{\bar{I}|h_{SR_{k}}|^{2}d_{1}}{|h_{SP}|^{2}} \tag{12}\]  
and  
\[\gamma_{R_{k}D}=\frac{\bar{I}|h_{R_{k}D}|^{2}d_{2}}{|h_{R_{k}P}|^{2}} \tag{13}\]  
where \(\bar{I}=\frac{I}{\sigma^{2}}\), \(d_{1}=\bigg{(}\frac{d_{SP}}{d_{SR_{k}}}\bigg{)}^{\beta}\) and \(d_{2}=\bigg{(}\frac{d_{R_{k}P}}{d_{R_{k}D}}\bigg{)}^{\beta}\). A tight upper bound approximation for the end-to-end SNR is used to simplify the analysis of the OP, which is given as:  
\[\gamma_{k}=min_{k=1,2,...,N}\{\gamma_{SR_{k}},\gamma_{R_{k}D}\} \tag{14}\]  
Specifically, the existence of the common random variable \(h_{SP}\) for all \(k,k=1,2,...,N\), results in a statistical dependence problem [65]. Hence, the CDF of the SNR at the SU destination, \(F_{\gamma_{D}}(\gamma)\), is conditioned on \(h_{SP}\), which can be expressed as follows:  
\[F_{\gamma_{D}}(\gamma/Y_{SP})=\prod_{k=1}^{N}F_{\gamma_{k}}(\gamma/Y_{SP}) \tag{15}\]  
where \(Y_{SP}=|h_{SP}|^{2}\). Hence, the CDF of \(F_{\gamma_{k}}\) can be given as:  
\[F_{\gamma_{k}}(\gamma/Y_{SP})=1-\Big{[}1-F_{\gamma_{SR_{k}}}(\gamma/Y_{SP}) \Big{]}\Big{[}1-F_{\gamma_{R_{k}D}}(\gamma/Y_{SP})\Big{]} \tag{16}\]  
As a result, \(F_{\gamma_{D}}(\gamma/Y_{SP})\) can be represented as follows:  
\[\gamma_{D}=max_{k=1,2,...,N}\{\gamma_{k}\} \tag{8}\]0  
On the other hand, the conditional CDF of the first hop \(F_{\gamma_{SR_{k}}}(\gamma/Y_{SP})\) can be written as follows:  
\[\gamma_{D}=max_{k=1,2,...,N}\{\gamma_{k}\} \tag{8}\]1  
Substituting Equation (18) into Equation (4), the conditional CDF of the first hop can be obtained as follows:  
\[\gamma_{D}=max_{k=1,2,...,N}\{\gamma_{k}\} \tag{8}\]2  
The same procedure can be followed to obtain the conditional CDF of the second hop as follows:  
\[\gamma_{D}=max_{k=1,2,...,N}\{\gamma_{k}\} \tag{8}\]3  
However, Equation (20) can be simplified as follows:  
\[\gamma_{D}=max_{k=1,2,...,N}\{\gamma_{k}\} \tag{8}\]4  
where \(\psi_{\gamma_{R}P_{r}d_{r}}\) is defined as follows:  
\[\gamma_{D}=max_{k=1,2,...,N}\{\gamma_{k}\} \tag{8}\]5  
where \(\bar{I}=\frac{I}{\sigma^{2}}\), \(d_{2}=\bigg{(}\frac{d_{R_{k}P}}{d_{R_{k}D}}\bigg{)}^{2}\), \(\bar{\gamma}\) is the average SNR and \({}_{2}F_{1}(.,.;.;. )\) is the Gauss hypergeometric function given by Equation (9.100) [63]. Please refer to Appendix B for more details. Substituting Equations (19) and (21) into Equation (17) yields:  
\[\gamma_{D}=max_{k=1,2,...,N}\{\gamma_{k}\} \tag{8}\]6  
number of links between the SU source and SU destination as a virtual MIMO system, thus reducing the impact of any obstacles when the SU source propagates the signal toward the SU destination.