## 4 Performance Evaluation
### Average BER  
The average BER \(B\) is calculated by averaging the conditional BER:  
\[B=\int_{0}^{\infty}P_{e}f_{h}(h)\text{d}h, \tag{48}\]where the \(P_{e}\) is the conditional probability, and \(f_{h}(h)\) is the PDF of the channel coefficient. For the FSO link with OOK modulation and IM/DD detection, the conditional probability is given by [21]  
\[P_{e}^{fso,j}=Q\left(\sqrt{\frac{\gamma_{j}^{FSO}}{2}}\right)=\frac{1}{2}\text{ erfc}\left(\frac{P_{f,j}\eta h_{j}}{\sqrt{2}\sigma_{f}}\right),j=SR_{i},R_{i}D, \tag{49}\]  
where \(Q(\cdot)\) is the Gaussian Q function and related to the error function by \(\text{erfc}(x)=2Q\left(\sqrt{2}x\right)\). Using Equation 07.34.03.0619.01 in [18], the \(\text{erfc}(\cdot)\) can be expressed as  
\[\text{erfc}\left(\sqrt{z}\right)=1/\sqrt{\pi}G_{1,2}^{2,0}\left[ \begin{array}[] {cc}1&\\ &0,1/2\end{array} \right] \tag{50}\]  
After substituting Equations (49), (50), and (27) in Equation (48), the average BER of the FSO link can be derived by  
\[ \begin{array}{rl}B_{j}^{FSO}=&\frac{1}{2}\exp\left(-\frac{\theta_{FeV,j}^{ 2}}{2\sigma_{g}^{2}}\right)+\frac{2^{j}+\hat{p}_{j}-\hat{q}_{j}^{2}}{\pi^{3/2 }\Gamma(x)\Gamma(\beta_{j})}\left[1-\exp\left(-\frac{\theta_{FeV,j}^{2}}{2 \sigma_{g}^{2}}\right)\right]\\ &\times G_{6,3}^{2,5}\left[\begin{array}{cc}\frac{8\left(A_{0}j_{h}^{R}P_{ f}j\right)^{2}}{\left(a_{j}\beta_{f}\sigma_{f}\right)^{2}}\end{array}\right]^{ \frac{2}{2}}\frac{2-\hat{q}_{j}^{2}}{2},\frac{1-\hat{q}_{j}}{2},\frac{2-\hat{ q}_{j}}{2},\frac{1-\hat{p}_{j}}{2},\frac{2-\hat{p}_{j}}{2},1\\ &0,\frac{1}{2},\frac{-\hat{q}_{j}^{2}}{2}\end{array} \right],j=SR_{i},R_{i}D\\ \end{array} \tag{51}\]  
For the RF link, the signal uses the MPSK modulation, and the conditional probability is given by \(P_{e}^{rf,j}=\frac{A}{2}erfc\left(\sqrt{\gamma_{j}^{RF}}B\right)\), where \(A=1\) and \(B=1\) when \(M=2\) (BPSK) and where \(A=2/\log_{2}M\) and \(B=\sin(\pi/M)\) when \(M>2\). We substitute (29) and \(P_{e}^{rf,j}\) into (48). Using Equation 07.34.21.0088.01 in [18] after some simple algebraic manipulations, the closed form of the BER can be expressed as  
\[ \begin{array}{rl}B_{j}^{RF}&=\int_{0}^{\infty}\frac{A}{2\sqrt{\pi}}G_{1,2}^{ 2,0}\left[\gamma_{j}^{RF}B^{2}\left|\begin{array}{cc}1&\\ &0,1/2\end{array}\right.\right]\frac{\gamma_{j}^{RFm-1}}{\Gamma(m)}\left(\frac {m}{\widehat{\gamma}_{j}^{RF}}\right)^{m}\exp\left(-\frac{m\gamma_{j}^{RF}}{ \widehat{\gamma}_{j}^{RF}}\right)d\gamma_{j}^{RF}\\ &=\frac{A}{2\sqrt{\pi}\Gamma(m)}G_{2,2}^{2,1}\left[\frac{B^{2} \widehat{\gamma}_{j}^{RF}}{m}\left|\begin{array}{cc}1-m,1\\ &0,1/2\end{array}\right.\right],j=SR_{i},R_{i}D\\ \end{array}  \tag{52}\]  
The average BER of a parallel FSO/RF link is  
\[B_{j}=P_{j}^{FSO}B_{j}^{FSO}+P_{j}^{RF}B_{j}^{RF},j=SR_{i},R_{i}D, \tag{53}\]  
where \(P_{j}^{FSO}\) is the probability that the FSO link is selected, and \(P_{j}^{RF}\) is the probability of using the RF link. The link selection probability can be formulated as  
\[P_{j}=\left\{ \begin{array}{l}P_{j}^{FSO}=\frac{1-\Gamma_{\gamma_{j}^{FSO}} \left(\gamma_{n_{FSO}}\right)}{1-\Gamma_{\gamma_{j}^{FSO}}\left(\gamma_{n_{FSO}} \right)F_{\gamma_{j}^{RF}}\left(\gamma_{n_{RF}}\right)}\\ \\ P_{j}^{RF}=\frac{\Gamma_{\gamma_{j}^{FSO}}\left(\gamma_{n_{FSO}}\right)\left(1- \Gamma_{\gamma_{j}^{RF}}\left(\gamma_{n_{RF}}\right)\right)}{1-\Gamma_{\gamma_ {j}^{FSO}}\left(\gamma_{n_{RFSO}}\right)F_{\gamma_{j}^{RF}}\left(\gamma_{n_{ RF}}\right)}\end{array} ,j=SR_{i},R_{i}D\\ \end{array}\right. \tag{54}\]  
It is worth noting that in a parallel UAV relay system, when each path state is distributed independently, the average BER of the system is equal to the average BER of a single path, which can be expressed as \(B_{SR}=B_{SR_{i}}\) and \(B_{RD}=B_{R_{i}D}\). In this case, the four relay selection modes have the same average BER.