## 3 System Model
\begin{array}{l}F_{\text{optimal}}=\Pr(\max\limits_{1\leq i\leq\text{N}_{ \text{r}},1\leq j\leq\text{N}_{\text{r}}}(\gamma_{ij})<\gamma_{\text{th}})\\ =\Big{(}\Pr(\gamma_{\text{SD}}<\gamma_{\text{th}})\Pr(\gamma_{\text{up}}<\gamma _{\text{th}})\Big{)}^{\text{N}_{\text{r}}\times\text{N}_{\text{r}}}\\ =(V_{1}V_{2})^{\text{N}_{\text{r}}\times\text{N}_{\text{r}}}\end{array}  \tag{13}\]  
where \(\gamma_{\text{th}}\) is a given threshold\({}_{j}\)\(\gamma_{\text{up}}\) is the upper bound of\(\gamma_{\text{SRD}}\). The \(V_{1}\) is evaluated as:  
\[\begin{array}{l}V_{1}=\Pr(\gamma_{\text{SD}}<\gamma_{\text{th}})\\ =\frac{1}{\prod\limits_{d=1}^{N}\Gamma(m_{d})}G_{1,N+1}^{N,1}\bigg{[}\frac{ \gamma_{\text{th}}}{\gamma_{\text{SD}}}\prod\limits_{d=1}^{N}\frac{m_{d}}{ \Omega_{d}}\big{|}\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!where the \(G[\cdot]\) is the Meijer G function, which is given as [19]. \[ \begin{split}& G_{p,q}^{m,n}\bigg{[}z_{\begin{subarray}{c}|b_{1}, \ldots,b_{q}\\ b_{1},\ldots,b_{q}\end{subarray}}^{\begin{subarray}{c}|a_{1},\ldots,a_{p}\\ b_{1},\ldots,b_{q}\end{subarray}}\\ &=\frac{1}{|2\pi}\int\limits_{\xi}\frac{\prod\limits_{i=1}^{m} \Gamma(b_{i}+s)\prod\limits_{i=1}^{m}\Gamma(1-a_{i}-s)}{\prod\limits_{i=n+1}^{ n}\Gamma(a_{i}+s)\prod\limits_{i=n+1}^{q}\Gamma(1-b_{i}-s)}z^{-s}\mathrm{d}s\end{split}  \tag{16}\]  
Next, \(V_{2}\) is evaluated as:  
\[ \begin{split} V_{2}&=\Pr(\gamma_{\text{up}}<\gamma_ {\text{th}})\\ &=\Pr(\max\limits_{1\leq l\leq L}(\min(\gamma_{\text{SR}},\gamma_ {\text{RD}}))<\gamma_{\text{th}})\\ &=\Pr(\min(\gamma_{\text{SR}},\gamma_{\text{RD}})<\gamma_{\text{ th}})^{L}\end{split}  \tag{17}\]  
where \(\overline{\gamma_{\text{SR}}}=KG_{\text{SR}}\overline{\gamma}\), \(\overline{\gamma_{\text{RD}}}=(1-K)G_{\text{RD}}\overline{\gamma}\), and  
\[ \begin{split}&\Pr(\min(\gamma_{\text{SR}},\gamma_{\text{RD}})< \gamma_{\text{th}})\\ &=1-\Pr(\min(\gamma_{\text{SR}},\gamma_{\text{RD}})>\gamma_{\text {th}})\\ &=1-\Pr(\gamma_{\text{SR}}>\gamma_{\text{th}},\gamma_{\text{RD}}> \gamma_{\text{th}})\\ &=1-(1-\Pr(\gamma_{\text{SR}}<\gamma_{\text{th}}))(1-\Pr(\gamma_ {\text{RD}}<\gamma_{\text{th}}))\\ &=\Pr(\gamma_{\text{SR}}<\gamma_{\text{th}})+\Pr(\gamma_{\text{ RD}}<\gamma_{\text{th}})-\Pr(\gamma_{\text{SR}}<\gamma_{\text{th}})\Pr(\gamma_{\text{ RD}}<\gamma_{\text{th}})\\ &=\frac{1}{\prod\limits_{i=1}^{N}\Gamma(m_{i})}G_{1,N+1}^{N,1} \bigg{[}\frac{\gamma_{\text{th}}}{\gamma_{\text{SR}}}\prod\limits_{t=1}^{N} \frac{m_{i}}{\Omega_{t}}\bigg{]}_{m_{1},\ldots,m_{N,0}}\bigg{]}+\frac{1}{\prod \limits_{i=1}^{N}\Gamma(m_{i})}G_{1,N+1}^{N,1}\bigg{[}\frac{\gamma_{\text{th}} }{\gamma_{\text{RD}}}\prod\limits_{t=1}^{N}\frac{m_{\text{th}}}{\Omega_{t}} \bigg{|}_{m_{1},\ldots,m_{N,0}}\bigg{]}\\ &-\frac{1}{\prod\limits_{i=1}^{N}\Gamma(m_{i})\prod\limits_{t=1}^ {N}\Gamma(m_{i})}G_{1,N+1}^{N,1}\bigg{[}\frac{\gamma_{\text{th}}}{\gamma_{ \text{SR}}}\prod\limits_{t=1}^{N}\frac{m_{\text{th}}}{\Omega_{t}}\bigg{|}_{m_ {1},\ldots,m_{N,0}}\bigg{]}\times G_{1,N+1}^{N,1}\bigg{[}\frac{\gamma_{\text{ th}}}{\gamma_{\text{RD}}}\prod\limits_{t=1}^{N}\frac{m_{\text{th}}}{\Omega_{t}} \bigg{|}_{m_{1},\ldots,m_{N,0}}\bigg{]}\end{split} \]