# Modeling and Spatial Diversity-Based Receiving Improvement of In-Flight UAV FSO Communication Links
## 2 Theoretical Model of the In-Flight UAV FSO Communication Link
The position deviation between the spot center and the lens \(\mathbf{r}_{d}\) is expressed as:  
\[\mathbf{r}_{d}=\mathbf{r}_{d_{r}}+\mathbf{r}_{d_{t}}+Z\hat{\theta}_{t} \tag{13}\]  
where \(\mathbf{r}_{d_{r}}=x_{r}+y_{r}\) is the position deviation of the receiving end, \(\mathbf{r}_{d_{t}}=x_{t}+y_{t}\) is the position deviation of the transmitting end, \(Z\) is the transmission distance, and \(\hat{\theta}=\theta_{tx}+\theta_{ty}\) is the angle deviation of the transmitting end. Therefore, the geometric and pointing error coefficients can be expressed as:  
\[ \begin{array}{c}h_{g}=\iint_{A}\frac{2}{\pi w_{z}^{2}}exp\left[-2\frac{(\mathbf{ r}+\mathbf{r}_{d})^{2}}{w_{z}^{2}}\right]\,dS\\ =\int_{-a}^{a}\int_{-\sqrt{\frac{2^{-2}-y^{2}}{\xi^{2}}}}^{\sqrt{\frac{2^{-2} -y^{2}}{\xi^{2}}}}\frac{2}{\pi w_{z}^{2}}exp\left[-2\frac{(x+x_{r}+x_{t}+Z \theta_{tx})^{2}+\left(y+y_{r}+y_{t}+Z\theta_{ty}\right)^{2}}{w_{z}^{2}} \right]\,dydx\end{array}  \tag{14}\]  
Equation (12) can be approximated as [20]:  
Figure 3: Geometry and pointing error diagram of the UAV optical communication in the flight state. \[h_{g}\simeq\frac{1}{\xi^{2}}A_{0}exp\left(\frac{-2\mathbf{r}_{d}^{2}}{w_{zeq}^{2}}\right) \tag{15}\]  
where \(A_{0}=\left[\text{erf}(v)\right]^{2}\) is the ratio of the energy received by the lens to the total energy when \(\mathbf{r}_{d}=0\), and the equivalent beam waist can be expressed as:  
\[w_{zeq}^{2}=w_{z}^{2}\frac{\sqrt{\pi}erf(v)}{2 vexp(-v^{2})} \tag{16}\]  
where \(v=\sqrt{\pi}a/\sqrt{2}w_{z}\) and \(erf(\cdot)\) is the error function. According to the kinetic characteristic of the UAV, \(\mathbf{r}_{d_{r}}\), \(\mathbf{r}_{d_{t}}\), \(\theta_{t}\), and \(\alpha\) all obey Gaussian distributions with zero mean value. They can be expressed as \(\mathbf{r}_{d_{t}}\sim N\left(0,\sigma_{tp}^{2}\right)\), \(\mathbf{r}_{d_{t}}\sim N\left(0,\sigma_{tp}^{2}\right)\), \(\theta_{t}\sim N\left(0,\sigma_{tp}^{2}\right)\), and \(\alpha\sim N\left(0,\sigma_{\alpha}^{2}\right)\) respectively, where \(\sigma_{tp}^{2}\) and \(\sigma_{rp}^{2}\) are the variances of the position deviation of the UAV at the transmitting and receiving end, \(\sigma_{tp}^{2}\) is the variance of the pointing angle deviation of the UAV at the transmitting end and \(\sigma_{\alpha}^{2}\) is the variance of the jitter angle of the UAV at the receiving end caused by the horizontal lateral wind resistance. Accordingly, \(\mathbf{r}_{d}\) conditioned on \(\theta_{tx}\) and \(\theta_{ty}\) has a Rician distribution, which can be expressed as:  
\[f(\mathbf{r}_{d}|\theta_{t})=\frac{\mathbf{r}_{d}}{\sigma_{tp}^{2}}exp\left(-\frac\mathbf{{r}_{d}^{2}+\theta_{t}^{2}Z^{2}}{2\sigma_{to}^{2}}\right)I_{0}\left(\frac{ \theta_{t}Z\mathbf{r}_{d}}{\sigma_{to}^{2}}\right) \tag{17}\]  
where \(I_{0}(\cdot)\) is the modified Bessel function of the first kind with order zero. The PDF of \(\theta_{t}\) can be written as:  
\[f(\theta_{t})=\frac{\theta_{t}}{\sigma_{to}^{2}}exp\left(-\frac{\theta_{t}^{2 }}{2\sigma_{to}^{2}}\right) \tag{18}\]  
According to Equations (13) and (15), the PDF of \(h_{g}\) that conditioned on \(\theta_{t}\) can be expressed as:  
\[f(h_{g}|\theta_{t})=\frac{w_  
\[P_{e}=\frac{1}{2}\int_{0}^{\infty}erfc\Bigg{(}\sqrt{\frac{\gamma^{th}}{2}}\Bigg{)}f _{h}(h)dh \tag{23}\]  
where \(erfc(\cdot)\) is the complementary error function, \(\gamma\) is the SNR at the transmitter. According to the above discussion, all of \(h_{t}\), \(h_{a}\), and \(h_{g}\) can affect the signal intensity of the receiver, and further affect the SNR of the receiver, and ultimately the BER and the outage probability will be affected. In this paper, the influence of \(h\) on the average BER and the outage probability is simulated by numerical Monte Carlo method.