## 4 Outage Performance
\begin{array}{ll}P_{2}&=\frac{\sigma^{2}}{\lambda_{T{\rm{I}}_{1}}{\rm{P}}_{T}} exp\Big{(}\frac{\sigma^{2}}{\lambda_{T{\rm{I}}_{1}}{\rm{P}}_{T}}\Big{)}(Q_{1}-Q_{2}) \Big{[}1-exp\Big{(}-\frac{\sigma^{2}\gamma_{2}}{\lambda_{{\rm{I}}_{1}}{\rm{I}}_ {2}{\rm{P}}_{2}}\Big{)}(1-\\ &\frac{\lambda_{{\rm{I}}_{1}}{\rm{P}}\sigma^{2}\gamma_{2}}{\lambda_{{\rm{I}}_ {1}}{\rm{I}}_{2}{\rm{I}}_{3}+\lambda_{{\rm{I}}_{1}}{\rm{R}}^{2}\gamma_{2}}exp \Big{(}-\frac{I_{{\rm{I}}_{1}}}{\lambda_{{\rm{I}}_{1}}{\rm{R}}^{2}}\Big{)} \Big{)}]\\ &\times\prod\limits_{n=1}^{N}\left[\frac{\sigma^{2}}{\lambda_{T{\rm{R}}_{n}} \sigma^{2}}exp\Big{(}\frac{\sigma^{2}}{\lambda_{T{\rm{R}}_{n}}{\rm{P}}_{T}} \Big{)}(Q_{5}-Q_{6})\Big{(}1-exp\Big{(}-\frac{\sigma^{2}\gamma_{2}}{\lambda_{{ \rm{R}}_{n}}{\rm{I}}_{2}{\rm{I}}_{2}}\Big{)}\Big{(}1-\frac{\lambda_{{\rm{R}}_ {n}}{\rm{R}}\sigma^{2}\gamma_{2}}{\lambda_{{\rm{R}}_{n}}{\rm{I}}_{2}{\rm{I}}_{ 3}+\lambda_{{\rm{R}}_{n}}{\rm{R}}^{2}\gamma_{2}}}exp\Big{(}-\frac{I_{{\rm{I}}_ {1}}}{\lambda_{{\rm{R}}_{n}}{\rm{R}}^{2}}\Big{)}\Big{)}\right)\right]\\ &+\Big{[}1-\frac{\sigma^{2}}{\lambda_{T{\rm{I}}_{1}}{\rm{P}}_{T}}exp\Big{(} \frac{\sigma^{2}}{\lambda_{T{\rm{I}}_{1}}{\rm{P}}_{T}}\Big{)}(Q_{3}-Q_{4}) \Big{]}\\ &\times\prod\limits_{n=1}^{N}\left[\begin{array}{c}1-exp\Big{(}-\frac{ \sigma^{2}\gamma_{0}}{\lambda_{{\rm{R}}_{n}}{\rm{I}}_{2}}\Big{)}\Big{(}1-\frac {\lambda_{{\rm{R}}_{n}}{\rm{R}}\sigma^{2}\gamma_{0}}{\lambda_{{\rm{R}}_{n}}{ \rm{I}}_{2}{\rm{I}}_{3}+\lambda_{{\rm{R}}_{n}}{\rm{R}}^{2}\sigma^{2}\gamma_{0 }}}exp\Big{(}-\frac{I_{{\rm{I}}_{1}}}{\lambda_{{\rm{R}}_{n}}{\rm{R}}{\rm{P}}_{ T}}\Big{)}\\ \times exp\Big{(}-\frac{\sigma^{2}(1+\gamma_{1})\gamma_{1}}{\lambda_{{\rm{R}}_{n}} {\rm{I}}_{2}{\rm{P}}_{2}}\Big{)}\Big{(}1-\frac{\lambda_{{\rm{R}}_{n}}{\rm{R}} \sigma^{2}(1+\gamma_{1})\gamma_{2}}{\lambda_{{\rm{R}}_{n}}{\rm{I}}_{2}{\rm{I} }_{3}+\lambda_{{\rm{R}}_{n}}{\rm{R}}^{2}(1+\gamma_{1})\gamma_{2}}}exp\Big{(}- \frac{I_{{\rm{I}}_{1}}}{\lambda_{{\rm{R}}_{n}}{\rm{R}}{\rm{P}}_{2}}\Big{)} \end{array}\right]\\ &\times\frac{\sigma^{4}}{\lambda_{T{\rm{R}}_{n}}{\rm{P}}_{T}\lambda_{T{\rm{I}} _{1}}{\rm{P}}_{T}}exp\Big{(}\frac{\sigma^{2}}{\lambda_{T{\rm{R}}_{n}}{\rm{P}}_ {T}}+\frac{\sigma^{2}}{\lambda_{T{\rm{I}}_{1}}{\rm{P}}_{T}}\Big{)}(Q_{7}-Q_{8} )(Q_{9}-Q_{10})\end{array} \right]\\ &+\frac{\sigma^{2}}{\lambda_{T{\rm{I}}_{1}}{\rm{P}}_{T}}exp\Big{(}\frac{ \sigma^{2}}{\lambda_{T{\rm{I}}_{1}}{\rm{P}}_{T}}\Big{)}\cdot\big{[}(Q_{2}-Q_{1} )-(Q_{4}-Q_{3})\big{]}\\ &\times\left[\begin{array}{c}1-exp\Big{(}-\frac{\sigma^{2}\gamma_{2}}{\lambda _{{\rm{R}}_{n}}{\rm{I}}_{2}{\rm{P}}_{2}}\Big{)}\Big{(}1-\frac{\lambda_{{\rm{R  
\(d_{R_{n}U_{1}}=0.5d\), \(\zeta=3\), \(\sigma^{2}=1\) and \(P_{1}=P_{2}=P_{0}\), where it is assumed that \(d=10\) for simplicity and all relays have the same average channel gain. Figure 2 illustrates the outage probability of the secondary users (U\({}_{1}\) and U\({}_{2}\)) versus the maximum transmit power \(P_{0}\) of the secondary for different number of relays. Firstly, it can be seen that both U\({}_{1}\) and U\({}_{2}\) have better outage performance as the increase of \(P_{0}\) in secondary. Secondly, one can see that the proposed two-stage adaptive relay selection strategy can achieve better outage performance as the number of relays increases, since the more relays there are, the more decodable relays will be included in the candidate set. Furthermore, it can be observed that the outage probability of U\({}_{1}\) is always lower than that of U\({}_{2}\), mainly because U\({}_{1}\) has both a direct link from the BS and a cooperative link from the optimal relay, while U\({}_{2}\) has only a link from the optimal relay. In addition, we compare the proposed cooperative scheme with the one without the link U\({}_{1}\)\(\rightarrow\)U\({}_{2}\), and the results show that the former has better outage performance.