Comprehensive Performance Analysis of Hovering UAV-Based FSO Communication System

Unmanned-aerial-vehicle (UAV)-based communications are expected to play an important role in the future generation wireless communication networks. It is a promising solution to enhance the wireless connectivity of devices without infrastructure. As compared to the terrestrial communications, UAVs offer various advantages such as line-of-sight (LoS) connectivity, dynamic deployment and flexible reconfiguration. Further, free space optics (FSO) communication is considered as a possible solution to enable UAV-based communication links due to its cost effective and high bandwidth nature. However, despite offering large bandwidth, UAV-based FSO links are marred by atmospheric path loss, atmospheric turbulence, non-zero boresight pointing errors, and angle-of-arrival (AoA) fluctuations. In this paper, the performance of a hovering UAV-based FSO communication system is investigated. The closed-form expressions for outage probability, average symbol error rate (SER), and ergodic capacity are derived taking into account both heterodyne (HD) and direct detection (DD) techniques for ground-to-UAV (G2U), UAV-to-UAV (U2U), and UAV-to-ground (U2G) links over the generalized Málaga distribution. Moreover, the asymptotic expressions for the above performance metrics are also derived to get the diversity gain of the system.

UAVs can be deployed closer to IoT devices enabling them to connect to the network with minimum transmit power [2]. In addition, designing adaptive communication systems along with mobility control of UAVs can enhance the system performance. For example, when good channel conditions exist between UAV and ground terminal, apart from transmitting with higher data rates, UAV can also reduce its speed to maintain good wireless connectivity so that more data can be transmitted to the ground terminals [3]. Thus, UAV-aided wireless communication is an essential component of next-generation wireless systems.
Further, it is expected that future wireless communication will have an enormous bandwidth requirement due to the dataintensive applications. However, the current radio frequency (RF) spectrum is already scarce and hence, cannot cater to the ever increasing spectrum demands. In this regard, free space optics (FSO) communication, which is an optical wireless communication technology, due to its salient features such as large unlicensed spectrum, low-cost deployment, security, high bandwidth, etc., has recently drawn attention as a possible solution for satellite, UAV and terrestrial communications, especially for establishing backhaul/fronthaul communication links [4]. Nevertheless, due to its narrow optical beam, FSO link gets easily blocked and is vulnerable to random atmospheric effects such as atmospheric turbulence, pointing errors, and atmospheric attenuation [5]. The major disadvantage of FSO communication is the strict line-of-sight (LoS) requirement between the transmitter and the receiver especially in an urban environment, where due to tall buildings establishing a LoS link is quite challenging for a long distance backhaul connectivity. On the contrary, UAVs have more possibility of enabling LoS connectivity, as they are deployed at a high altitude in the air. Therefore, use of UAVs can eliminate the strict LoS requirement for FSO transceivers. Further, UAV-based FSO communication is capable of providing wide coverage, very-high bandwidths, and seamless connectivity, which is a significant requirement for 6G communication. It is to be noted that there is an alternative solution for providing wireless connectivity to a larger geographical area via high-altitude platform station (HAPS), which is usually deployed in the stratosphere layer of the atmosphere (i.e. around 17 to 32 km). However, compared to HAPS, UAVs are more economical, agile, and can be installed quickly, making them suitable for critical and unplanned missions.
In spite of various advantages, the UAV-based FSO links are impaired by atmospheric turbulence-induced fading, pointing errors due to position deviations, atmospheric attenuation, and angle-of-arrival (AoA) fluctuations because of orientation deviations of hovering UAVs. In addition, the UAV channel model is characterized by various tunable parameters like optical beam width and receiver's field-of-view (FOV). Hence, it is important to choose the optimum values for these parameters to improve the performance of UAV-based FSO systems. For a UAV-based wireless network, accurate channel modeling plays an important role, since any movement or vibration can affect the channel characteristics significantly. The air-to-ground (A2G) average path loss of UAVs in urban environments has been studied in several papers, wherein it is written in terms of LoS probability and excess path loss [6], [7], [8]. In [7], the authors showed that the probability of LoS is affected by the mobile user's elevation angle as well as other environment-dependent characteristics. As a result, the variation in path loss as a function of elevation angle will lead to the drone's optimal height. In [9], the authors proposed an altitude-dependent performance model to analyze the power and sum-rate capacity gain of an aerial base station considering Rician fading model and compared it with the terrestrial base station. In [10], the performance metrics in terms of outage probability, bit error rate (BER), and outage capacity was calculated to achieve the optimal drone height that maximizes the system performance.
In [11], a comprehensive performance analysis of FSO link over generalized Málaga distribution was presented. The unified closed-form expressions are derived for outage probability, average SER, and ergodic capacity. In [12], the authors carried out the performance analysis of a multiple-input-multiple-output (MIMO) FSO system over Málaga turbulence channel considering both transmit and receive diversity schemes. Alamouti space-time block-coding (STBC) was applied at the transmitter side and switch-and-examine combining (SEC) was applied at the receiver side. In [13], the authors proposed a receiver beam selection (RBS) scheme to improve the performance of optical wireless communication systems and analysed the effect of fog on average signal-to-noise ratio (SNR), ergodic rate, and energy performance of the proposed system. Recently, in [14], the performance of FSO communication system was studied over Fisher-Snecdecor F fading channel with zero boresight pointing errors. In [15], an alternate method to demodulate the quadrature amplitude modulation-multipulse pulse position modulation (QAM-MPPM) signal was proposed for the non-turbulent FSO channel. Moreover, analytical expressions were derived for average symbol and bit error probabilities. In [16], the performance of FSO communication using weak turbulent FSO channel models was investigated using an experimental setup. Moreover, a new model was proposed based on the obtained data set for which the outage probability was calculated under the combined effects of weak turbulence and fog attenuation. In [17], the authors studied the performance of FSO communication system by employing Alamouti encoding scheme over generalized Málaga distribution.
In [18], the authors carried out the performance analysis of MIMO FSO system utilizing the equal gain combining (EGC) scheme assuming lognormal-Rician fading model with pointing errors. Further, the closed-form expressions for outage probability, BER, and ergodic capacity were derived. In [19], performance analysis of FSO systems over lognormal-Rician fading channel was carried out in terms of outage probability and ergodic capacity using generalized pointing errors model. In [20], hybrid FSO/FSO-RF scheme was proposed, wherein FSO link is used in case of clear LoS path and a backup FSO-RF link is used otherwise. By utilizing Rayleigh and Gamma-Gamma fading models for RF and FSO links, respectively, analytical expressions were derived for outage probability, average BER, and ergodic capacity. The authors in [21] carried out the ergodic capacity analysis of the hybrid FSO/RF system by applying an adaptive-combining based switching over the generalized Málaga and κ-μ distributions.
In [22], the authors carried out the outage performance analysis of a UAV-based FSO communication system considering both Gamma-Gamma and log-normal distributions and introduced the AoA fluctuations to study the impact of UAV jitters on the proposed system. However, the expressions obtained were quite complicated and cannot be used effectively for performance analysis. In [23], the outage performance of ground-to-HAPS FSO communication system was presented over both log-normal and Gamma-Gamma fading channels. Moreover, optimization of the transmitted laser beam and the receiver's field of view (FOV) was carried out to improve the system performance. In [24], a more simplified channel model was proposed and the closed-form expressions for outage probability and average BER were derived. Recently in [25], the authors have investigated the performance of a UAV-based FSO system with decode-and-forward (DF) relaying having multiple sources. The closed-form expression for outage probability was derived and joint optimization of the location of UAVs and number of source nodes was performed to maximize the system performance and minimize the system cost. The authors in [26] carried out the performance analysis of intelligent reflecting surface (IRS)-aided DF UAV communication systems considering Beaulieu-Xie fading model between UAV-to-relay station (RS) and Rician fading between RS-to-IRS. The closed-form expressions were derived for outage probability, average BER, and ergodic capacity. In addition, the asymptotic analysis was also provided. In [27], the performance of a UAV-based FSO system employing prepare and measure continuous-variable quantum key distribution (CV-QKD) protocol based on Gaussian modulation of quantum coherent states (GMCS) under collective attacks was investigated in terms of outage probability, quantum bit error rate (QBER), and secret key rate (SKR). In [28] and [29], the authors carried out the comprehensive performance analysis of UAV-based mixed FSO/RF system models for internet of vehicles (IoV) and space ground integrated network (SAGIN) scenarios, respectively. The atmospheric turbulence of FSO link in [28] and [29] is modeled using Málaga distribution and the RF link is modeled using κ-μ and shadowed Rician distributions, respectively.

A. Motivations
r We have assumed the generalized Málaga distribution for modeling atmospheric turbulence in FSO links. On the other hand, the modeling of atmospheric turbulence is restricted to non-generalized log-normal and Gamma-Gamma distributions in [22], [24], [30], [31].
r We have derived the closed form asymptotic expressions for outage probability, average SER, and ergodic capacity to obtain the diversity gain, outage floor, and symbol error floor. In none of the previous work [22], [24], [30], [31], the asymptotic analysis was considered.
r We have considered the effect of non-zero boresight pointing error in our UAV-based FSO channel model for three different types of links i.e G2U, U2U, and U2G. However, [22], [24], and [31] have considered only zero boresight pointing error scenario, which is only a special case of generalized non-zero boresight scenario. In [30], the effect of non-zero boresight error was considered only for U2U link.
r Though there are many existing works [11], [12], [32] related to comprehensive performance analysis of FSO systems over generalized Málaga channel model, the system models proposed in these works are restricted only to a terrestrial communication scenario without considering UAV. It is also to be noted by considering UAV, the combined channel gain and its statistics such as probability density function (PDF) and cumulative distribution function (CDF) will be entirely different.
r Moreover, in recent works [28], [29] related to UAV-based mixed FSO/RF communication systems, non-zero boresight pointing error and the link interruption due to AoA fluctuations have been ignored in the FSO channel model and analysis.
r Further, it is of practical significance to carry out the asymptotic analysis to derive the diversity gain and get more insights into the system performance. To further enhance the performance of UAV-based FSO communication, beamwidth and FOV need to be optimized.

B. Contributions
The major contributions are given as follows: r We derive the unified closed-form expressions for the PDF and CDF of hovering UAV-based FSO channel coefficient by taking atmospheric attenuation, atmospheric turbulence-induced fading modeled using Málaga distribution, non-zero boresight pointing errors, and AoA fluctuations into account.
r Based on the statistical functions (i.e. PDF and CDF), the closed-form expressions for outage probability, average SER, and ergodic capacity are derived and the derived expressions are unified for G2U, U2U, and U2G links.
r The closed-form asymptotic expressions for outage probability, average SER, and ergodic capacity are also derived r In addition, the effect of various parameters such as link distances, atmospheric turbulence strengths, pointing errors severity, weather conditions, beam width, receiver's field of view (FOV), and inherent position and orientation deviations of hovering UAVs on the performance of UAVbased FSO communication is also studied.
r Finally, optimal values of beamwidth and receiver's FOV, which minimizes average SER and maximizes ergodic capacity, are also obtained to enhance the system performance. The rest of the paper is structured as follows: The UAV-based FSO communication system and channel models are introduced in Section II. In Section III, the performance analysis is presented. The numerical and simulations results are provided in Section IV and followed by the concluding remarks in Section V.

A. System Model
In this work, we consider a UAV-based FSO communication system, which includes three types of links, i.e., ground-to-UAV (G2U), UAV-to-UAV (U2U), and UAV-to-ground (U2G). Fig. 1 shows the 2-D schematic representation of a U2U communication scenario, where the transmitter and receiver apertures are installed on hovering UAVs. We represent the U2U link parameters in 3-D space by assuming that in the Cartesian coordinate system, the mean positions of transmitter and receiver UAVs are at [0,0,0] and [0,0,Z], respectively. We also assume that the transmitter and receiver UAVs mean orientation vectors are located on the z axis. Moreover, the transmitter and receiver UAVs instantaneous position and orientations are deviated to a smaller extent from their means due to the influence of various random effects associated with hovering UAVs. The instantaneous transmitter and receiver UAVs misalignment orientation in [x, z] and [y, z] Cartesian coordinates are denoted by θ tx , θ rx , θ ty , and θ ry , respectively. We consider sub-carrier intensity modulation (SIM) with M -ary phase-shift-keying (MPSK) modulation at the   transmitter and direct detection (DD) and heterodyne detection (HD) technique at the receiver. Note that SIM-MPSK scheme is different from optical phase modulation. In case of SIM-MPSK scheme, a single RF sub-carrier is first pre-modulated with the information sequence in the electrical domain using MPSK signaling scheme. After that the pre-modulated electrical signal modulates the intensity of the laser beam or optical carrier.
The expression for received unified FSO signal assuming both HD and DD techniques is given by [32] where b denotes the unifying parameter, which takes value b = 1 for HD scheme and b = 2 for IM/DD scheme, η e denotes the responsitivity, P F denotes the FSO transmit power, x r denotes the transmitted symbol corresponding to MPSK constellation, h u denotes the FSO channel coefficient, and n r represents the signal independent additive white Gaussian noise (AWGN).

B. Channel Model
The considered system has three different links i.e. U2U, G2U, and U2G links as shown in Figs. 2, 3, and 4, respectively. The combined channel gain for all the links can be written as the product of four key impairments i.e., where h ul denotes the atmospheric path loss, h ua is the atmospheric turbulence-induced fading, h ue is the pointing errors, and h uo denotes the link interruption due to AoA fluctuations. The statistical characteristics of the four impairments are explained as follows: 1) Atmospheric Path Loss: The atmospheric path loss for an optical link with length Z is modeled using Beer's-Lambert law [22] as h ul = exp(−ζ 1 Z), where ζ 1 denotes the attenuation parameter and Z denotes the distance of G2U, U2U, and U2G links.
2) Atmospheric Turbulence: To model the atmospheric turbulence-induced fading, we use generalized Málaga distribution, which can be used to model other statistical distributions as its special cases and it is valid for all turbulence regimes. The PDF of Málaga distribution is given by [11, (1)]. where K v is the modified Bessel function of the second kind of vthorder, and α and β are large scale and small scale scattering parameters, respectively [33, (3)], which mainly depend on Rytov variance, link distance Z, and refractive index structure parameter C 2 n . The remaining parameters are given in Table I.

3) Pointing Errors:
By considering a Gaussian beam footprint at the receiver aperture of radius r a as shown in Fig. 5, the power loss due to an instantaneous radial displacement r d between the center of beam and receiver aperture can be written as [34] where A 0 denotes the fraction of power collected at the detector when there is no pointing errors (i.e r d = 0) and is given by where erf(·) represents the error function, w zeq denotes the equivalent beamwidth, and w z is the Gaussian beamwaist, which is given by w oz denotes the beamwidth at Z = 0, λ is the optical wavelength, and Θ is given by ρ(Z) is the coherence length, C 2 n is the refractive index structure parameter, k = 2π/λ is the optical wave number. Further, the radial displacement vector from the center of beam and receiving aperture i.e. r d = [x d , y d ] is a resultant of following three error vectors: i) Displacement vector due to transmitter's orientation deviation r θ t = [x θ t , y θ t ], ii) Displacement vector due to transmitter's position deviation r t = [x t , y t ], and iii) Displacement vector due to receiver's position deviation r r = [x r , y r ]. Hence, the total displacements along the x and y axes are, respectively, given by where x θ t and y θ t represent the beam position deviations at the receiver along the x and y axes, respectively. In this system model, we consider multi-rotor (MR) UAVs, which provide high angular stability (in mrad). Therefore, assuming that θ tx and θ ty are sufficiently small and using small angle approximation, we can write, x θ t = Ztan(θ tx ) ≈ Zθ tx and y θ t = Ztan(θ ty ) ≈ Zθ ty . Hence, we can write (8) as x d = x t + x r + Zθ tx , y d = y t + y r + Zθ ty . As the position and orientation deviations occur due to several random events, they are assumed to follow Gaussian distribution as per central limit theorem. Therefore, x t , x r , y t , and y r are zero-mean Gaussian random variables . It is to be noted that σ txp and σ typ represent the standard deviation (SD) of transmitter UAV/Ground position in x − z and y − z plane, respectively, whereas σ rxp and σ ryp represent the SD of receiver UAV/Ground position in x − z and y − z plane, respectively.
In this work, we have considered a non-zero boresight pointing errors model 1, 2 because of the UAVs non-zero boresight angle. In UAV-based communication, the position and orientation fluctuations of hovering UAVs lead to a misalignment between transmitter and receiver apertures, due to which there is a fixed displacement in UAVs orientation, which is known as boresight or bias angle. This boresight leads to significant degradation in the system performance. The non-zero boresight or bias angles of the transmitter and receiver UAVs, as shown in Fig. 1 are denoted as θ tx , θ ty , θ rx , and θ ry , which are Gaussian distributed RVs such that θ tx ∼ N (θ tx , σ 2 txo ), θ ty ∼ N (θ ty , σ 2 tyo ), θ rx ∼ N (θ rx , σ 2 rxo ), and θ ry ∼ N (θ ry , σ 2 ryo ). Here, θ tx , θ ty , θ rx , and θ ry denote the UAVs boresight angle. If we take θ tx = θ ty = θ rx = θ ry = 0, then it is reduced to zero boresight case. Further, σ txo and σ tyo is the SD of transmitter UAV orientation in x − z and y − z plane, respectively, whereas σ rxo and σ ryo denote the SD of receiver UAV orientation in x − z and y − z plane, respectively. Therefore, . For G2U communication scenario as shown in Fig. 3 in which the transmitter is mounted on a tall building, we assume that orientation deviation of the transmitter due to building sway i.e. θ tx and θ ty are very small and assumed to be zero i.e. θ tx = θ ty = 0. As a result, . For U2G communication scenario as shown in Fig. 4 for which the receiver is mounted on a tall building, θ rx and θ ry are very small and assumed to be zero i.e. θ rx = θ ry = 0. Consequently, x d ∼ N (Zθ tx , Z 2 σ 2 txo + σ 2 txp + σ 2 rxp ) and y d ∼ N (Zθ ty , Z 2 σ 2 tyo + σ 2 typ + σ 2 ryp ). Now, under the assumption that the variables in (8) are independent, the total radial displacement can be written as r d = x 2 d + y 2 d , which follows Beckmann distribution [33, (5)]. Since the PDF of Beckmann distribution is not available in closed-form, an approximation for Beckmann distribution using a modified Rayleigh distribution [33, (10)] is utilized and the PDF of r d is given by where the total displacement variance σ 2 m for different links can be expressed as Using (4) and (9), the PDF of pointing errors h ue can be written as [30] where ζ mod = w zeq 2σ m denotes the pointing error coefficient. 4) Link Interruption Due to AoA Fluctuations: Due to the transceiver vibrations introduced by building sways and hovering UAVs, the following two phenomena can be observed: (a) Pointing errors due to misalignment between the received Gaussian beam footprint and the center of the receiver aperture (b) AoA fluctuations due to receiver vibrations, which degrade the performance of UAV-based FSO communication systems due to limited FOV. In FSO systems, the incoming optical light is focused on the surface of the photodiode with the help of the converging lens. But due to random orientation deviations of the UAVs, AoA of the received beam is deviated from the normal line to the detector area. In fact, it is important to compensate and stabilize the orientation fluctuations of hovering UAVs to establish the reliable G2U, U2U, and U2G FSO links. To model the AoA fluctuations 3 , we assume that the link interruption coefficient h uo takes two discrete values "1" or "0". It takes value "0" when AoA of the received signal is outside the receiver's FOV (i.e. θ F OV ) and no signal power is detected, whereas it takes value "1" when maximum signal power is detected i.e, The AoA for different links can be defined as Since θ tx , θ ty , θ rx , and θ ry are independent Gaussian RVs with non-zero means and variances as discussed earlier, the PDF of θ a follows Beckmann distribution, which is approximated using modified Rayleigh distribution as where Note that (14) is the PDF of θ a for G2U and U2G links. However, for U2U link, since RVs X = θ tx + θ rx and Y = θ ty + θ ry are independent Gaussian RVs with non-zero means μ x = θ tx + θ rx and μ y = θ ty + θ ry as well as variances σ 2 x = σ 2 txo + σ 2 rxo and σ 2 y = σ 2 tyo + σ 2 ryo , the RV θ a follows Beckmann distribution [33, (5)]. Similar to r d , modified Rayleigh distribution is used to approximate Beckmann distribution and the PDF of θ a for U2U link is given by where σ 2 a = 3μ 2 x σ 4 x +3μ 2 y σ 4 y +σ 6 x +σ 6 y 2 1 3 . The PDF of AoA fluctuations h uo can be obtained using (12), (14) and (16) as where , n = 2 for G2U and U2G link, n = 4 for U2U link, and δ(·) is the Dirac delta function.
All the four impairments in (2) are assumed to be independent of each other. Though the orientation deviations of the transmitter UAV causes both pointing errors and AoA fluctuations simultaneously, the correlation between them is weak when θ F OV σ a . As a result, the four impairments (i.e. RVs) can be treated as independent. The PDF of combined channel state of UAV-based FSO link is approximated as [22] where the PDF of h = h ul h ua h ue can be calculated as where G m,n p,q (·) represents Meijer G-function [36, (07.34.02.0001.01)]. The instantaneous signal-to-noise ratio (SNR) of FSO link assuming both HD and DD schemes is given by where γ r represents the average SNR of FSO link and k = ζ 2 mod ζ 2 mod +1 . After applying the transformation of RVs technique, the unified PDF expression in terms of Meijer G-function for the instantaneous SNR of FSO link γ r can be written as where b m = a m (αβ/(gβ + Ω )) −(α+m)/2 and B = k(g+Ω ) (1 − a 1 )αβ/(gβ +Ω ). From the PDF, using [36, (07.34.21.0084.01)], the unified CDF expression for γ r is given by where D=

III. PERFORMANCE ANALYSIS
This section provides a detailed discussion on deriving the closed-form expressions for outage probability, average SER and ergodic capacity. In addition, asymptotic expressions for outage probability, average SER, and ergodic capacity are also derived.

A. Outage Probability
An outage is said to have occurred if the received instantaneous SNR falls below a threshold SNR value γ th . So the outage probability is given by [33] P out (γ th ) = P out (γ r < γ th ) = F γ r (γ th ) , where F γ r (γ th ) denotes the CDF of the instantaneous SNR of FSO link, which is given by (23), calculated at γ th .

C. Normalized Ergodic Capacity
It is to noted that the atmospheric turbulence over FSO link is a slow fading process [11], [34]. Since the coherence time of the channel is in the order of milliseconds (ms), the turbulence induced fading remains constant over a large number of transmitted bits. Moreover, the use of interleaving to achieve independent fading samples in consecutive symbol intervals is impractical in FSO channel. However, due to the presence of pointing errors and AoA fluctuations, the signal fluctuates at a very high rate. Therefore, ergodic capacity analysis can be carried out over the presence of pointing errors and AoA fluctuations and under the assumption that the information symbol is long enough to ensure the long-term ergodic properties of the turbulence process. The ergodic capacity analysis of FSO systems has been carried out in many existing works [11], [35], [38], [39].

D. Asymptotic Analysis
In this section, the closed-form asymptotic expressions are derived for outage probability, average SER, and ergodic capacity under high-SNR conditions. Further, the diversity gain G d is also obtained from the derived expressions.
1) Outage Probability: We derive the asymptotic expressions for outage probability assuming that the average SNR of the FSO link tends to infinity. The asymptotic expression for outage probability of the hovering UAV-based FSO communication system can be written as where F ∞ γ r (γ th ) is the asymptotic expression for the CDF of UAV-based FSO link. By applying [36, (07.34.06.0040.01)] on (23), F ∞ γ r (γ th ) can be expressed as where and K i,j represents the jth term of K i . It is also noticed that P ∞ out asymptotically approaches to a fixed outage floor value, which is given by Further, it is observed from (33) that P ∞ out ∝ (γ r ) −G d , where G d indicates the diversity gain, which is the slope of the performance curve, and is given by Analogous to outage probability, P ∞ e also asymptotically approaches to a fixed symbol error floor value and the same is given by Before asymptotically approaching to a fixed value of average SER, it is observed from (35) that P ∞ e ∝ (γ r ) −G d , where G d indicates the diversity gain, which is the slope of the performance curve, and is given by G d = min(ζ 2 mod /b, α/b, 1/b).

3) Normalized Ergodic Capacity:
The asymptotic capacity of a hovering UAV-based FSO system can be obtained using the method of moments. Thus, we need to calculate the first order derivative of n th order moment of f γ r (γ) at n = 0. The n th order moment of FSO link can be obtained as After taking the first-order derivative of (37) at n = 0, we obtain the asymptotic capacity of UAV-based FSO link as where ψ(·) denotes the psi function [37, (8.360)].

IV. NUMERICAL RESULTS
In this section, the numerical results are given for the analysis presented in the previous sections. Monte-Carlo simulations are also carried out to validate the closed-form expressions. The default system parameters used for simulations are mentioned in Table II. We assume C 2 n = 1.7 × 10 −13 m −2/3 (i.e. strong turbulence) [41] and the following Málaga distribution parameters ρ = 0.596, Ω = 1.3265, b 0 = 0.1079 in our simulations, unless and otherwise stated [11]. Further, we assume Z = 250 m, σ txp = σ rxp = 40 cm, σ typ = σ ryp = 30 cm, σ txo = 3 mrad, σ tyo = 4 mrad, σ rxo = 3 mrad, σ ryo = 2 mrad, θ tx = 2 mrad, θ ty = 3 mrad, θ rx = 2 mrad, and θ ry = 3 mrad [22], [30]. In addition, we have calculated w z by assuming w oz = 3 m [22], [31] and Z based on (6). In Table III, we have shown the values of optical beamwidth at transmitter w oz and optical beamwidth at receiver w z , which are calculated based on (6), for different values of link distance Z. Moreover, all the average SER performance curves are obtained by assuming BPSK modulation (i.e. Modulation order M = 2), unless and otherwise stated. It is to be noted that due to the limited payload capacity of UAVs, we consider receiver lens radius as r a = 5 cm. However, it causes higher geometrical losses as compared to terrestrial FSO systems with the lens radius in the range of 10-25 cm. In addition, it is also to be noted that UAV-based FSO communication systems have higher orientation fluctuations due to the mounted FSO systems on UAVs compared to a fixed ground-based station. Thus, we have considered a wide range of beamwidth (i.e. w z ∈ [1, 12 m]) for our analysis. Similar to our work, the existing works [22], [31], [42] on UAV-based FSO systems have also considered w z around the same range. On the other hand, the beamwidth of ground-based FSO systems is assumed around 1 m [5], which is less than the w z values assumed for UAV-based FSO systems. This is logical due to the fact that for UAV-based FSO systems, if less beamwidth is assumed similar to ground-based FSO systems, then there is a high possibility that the optical beam will be completely misaligned and hence, there will be no reception at the receiver.
In general, FSO communication uses two types of receiver detection techniques i.e. noncoherent (direct detection) and coherent (homodyne or heterodyne). Coherent detection is superior to noncoherent detection in terms of sensitivity level, data rates, and transmission distance. But due to the increased receiver complexity and implementation constraint, coherent detection is not widely used in FSO communication system [40]. Hence, we have considered only DD technique for obtaining the performance curves except Fig. 10, where we have added the performance curves of DD and HD techniques for the sake of comparison. Fig. 6 shows the outage performance of G2U, U2U, and U2G links for different link distances. We consider C 2 n = 1.7 × 10 −13 m −2/3 , θ F OV = 20 mrad, and w z = 3 m. It is evident from the plots that the U2U link performance is worst in terms of P out . This is because, for U2U link both the transmitter and receiver orientation deviations are taken into consideration. Further, it is to be noted that receiver orientations affect h uo , whereas transmitter orientations affect both h ue and h uo . As a result, U2U link has the worst performance. Also, we have neglected transmitter and receiver orientation deviations in case they are installed on a ground station. Therefore, for G2U link, only receiver orientation deviation and for U2G link, only transmitter orientation deviation are taken into account. Consequently, G2U  link performance is better than U2G link. Also, it can be seen from the plots that with increase in link distance, P out increases for all the links i.e. G2U, U2U and U2G. This is because, with the increase in distance, the scattering parameters α and β decrease and makes the UAV-based FSO system vulnerable to turbulence. Fig. 7 shows the effect of atmospheric turbulence and pointing error variations on the outage performance of the hovering UAV-based FSO communication. We assume C 2 n = 1.7 × 10 −13 m −2/3 for strong turbulence, C 2 n = 4 × 10 −15 m −2/3 for weak turbulence, θ F OV = 20 mrad, and w z = 3 m. We have taken the following two different pointing error values at Z = 250 m: i) ζ mod = 1.57 and ii) ζ mod = 0.93. One must note that the pointing error severity is high for low values of pointing error coefficient ζ mod . As observed from the plots, under strong turbulence conditions, at P out = 0.137, an SNR gain of about 8 dB is obtained for ζ mod = 1.57 as compared to ζ mod = 0.93 for U2G link. Similarly, at P out = 0.228, an SNR gain of 6 dB is observed for ζ mod = 1.57 as compared to ζ mod = 0.93 for U2U link. Hence, there is a degradation in the performance under low values of pointing error coefficient and also under strong turbulence scenario.  In Fig. 8, the comparison of outage probability for different links when θ F OV = 10 mrad and Z = 200 m is shown. In addition, the asymptotic outage curves and the outage floor are also plotted. As shown in Fig. 8, the U2U link attains the maximum outage probability and the outage floor value of U2U link is always greater than the G2U and U2G links. It is also noticed that the outage probability value for G2U link at SNR = 24 dB is 1.779 × 10 −2 and 1.130 × 10 −2 at 28 dB. By using these values, we obtain a diversity gain of 0.5, which also agrees with the diversity gain G d = min(ζ 2 mod /b, α/b, 1/b) obtained using analysis in Section III. This validates the derived diversity gain. Finally, the asymptotic curves are also merging with the exact outage curves in the high-SNR region, which validates the derived asymptotic expression.
In Fig. 9, the normalized ergodic capacity of G2U link is plotted with respect to θ F OV for σ a = 3.2, 6.4, and 9.9 mrad. The optimum values of θ F OV for σ a = 3.2 mrad, σ a = 6.4 mrad, and σ a = 9.9 mrad, are 5 mrad, 10 mrad, and 15 mrad, respectively. It can be observed that with the increase in σ a , the optimum value of θ F OV (i.e. θ opt F OV ) also increases. This observation is valid because with the increase in σ a , the receiver's FOV angle i.e. θ F OV should increase to nullify the effect of AoA fluctuations at the receiver. However, with the increase in receiver's FOV,  there is also an increase in the background noise. As a result, the optimum values of θ F OV must be carefully selected due to the trade-off between AoA fluctuations and background noise power. Fig. 10 shows the ergodic capacity performance of G2U, U2U, and U2G links by varying beamwidth at the transmitter. We have assumed Z = 500 m and two different values of w z i.e. 0.8 m and 3 m. It is evident from the plots that by increasing w z , the ergodic capacity increases for all the links. This is due to the fact that widening of beamwidth compensates the pointing error losses and the received signal strength. It can also be noticed that G2U communication link under HD technique performs better than DD technique due to its coherent detection nature.
In Fig. 11, we plot the normalized ergodic capacity as a function of FSO transmit power for different weather conditions with link distance Z = 1200 m. We consider four types of climatic conditions i.e. clear air, haze or light fog, moderate rain, and heavy rain. The respective simulation parameters are mentioned in Table II. It is clear from the plots that there is an increase in the ergodic capacity with the increase in the FSO transmit power. For U2U link, to achieve an ergodic capacity of 1.29 bits/sec/Hz, the transmit power of FSO should be atleast 3 dBm higher in the presence of haze, 6 dBm in the presence of moderate rain, and atleast 9 dBm higher in the presence of heavy rain as compared to clear air scenario. Similarly, for G2U link to achieve a capacity of 1.85 bits/sec/Hz, an additional power of 4 dBm is required for haze as compared to clear air conditions due to increase in the attenuation values. Also, U2G link performance under haze is slightly better than U2U link. This is mainly because, for U2G link, the receiver orientation deviation causes only AoA fluctuations, whereas for U2U link, transmitter and receiver orientation deviations lead to both pointing errors and AoA fluctuations. Fig. 12 shows the normalized ergodic capacity performance of U2U FSO link for various distributions, which are used to model atmospheric turbulence. The parameter values used to obtain Gamma-Gamma and log-normal distributions from Málaga distributions are listed in Table IV. It can be seen from the plots that the analytical results are well agreeing with the simulation results. In addition, the asymptotic curves are tight enough to match the exact ergodic capacity curves, which justify the correctness of our derived analytical expressions. Moreover, the performance of U2U link at σ a = 5.8 mrad is better than the performance at σ a = 17.8 mrad. As the performance of U2U link largely depends on AoA fluctuations owing to orientation deviations of hovering UAVs, there is an increase in the ergodic capacity with the decrease in σ a values.
In Fig. 13, the average SER is plotted for different MPSK modulation schemes. As expected, performance of the system decreases with the increase in modulation order M . It is also  noticed that the analytical SER curves exactly match with the simulation curves for modulation order and serve as an upper bound for M > 2.
In Fig. 14, the average SER performance of different links is compared. It can be seen that the asymptotic curves trace the slope of the performance curves and match the exact SER curve in the high-SNR region. Moreover, the fixed average SER value obtained from (36) also coincides with the error floor value as shown in the plots, which validates the derived symbol error floor expression. The error floor is mainly because, in the high-SNR region, the system performance is bounded by AoA fluctuations and θ F OV . In Fig. 13, it is also noticed that the SER value of 11.8 × 10 −5 is achieved at SNR = 44 dB and 7.416 × 10 −5 at 48 dB. Using these values, a diversity gain of 0.5 is obtained, which agrees with the diversity gain G d = min(ζ 2 mod /b, α/b, 1/b) derived in Section III. This validates the derived diversity gain. Fig. 15(a) and (b) show the U2U link performance plots of average SER with respect to beam waist and FOV for P t = 15 dBm and 20 dBm, respectively, with Z = 500 m. It is noticed that the link performance is highly sensitive to w z and θ F OV . Moreover, with the increase in P t , the optimum value of w z (i.e. w opt z ) increases, which is 5.65 m for P t = 15 dBm, compared to    Table V shows the optimum values of w z and θ F OV , which minimize the average SER of U2U link, for different values of P t . The optimum values are obtained by plotting the average SER with respect to beam waist and FOV. As shown in Table III, the values of the values of w oz ≈ w z for Z ∈ [200, 1200 m]. Therefore, optimizing the beamwidth at the receiver is same as optimizing the beamwidth at the transmitter. Further, it can be noticed from the plot that with the increase in P t , the SER performance improves. As evident from the table, w opt z increases with the increase in P t . Similarly, the range of θ opt F OV values for which the average SER decreases also increases with the increase in P t . This is justifiable because with the increase in w z and θ F OV the effect of pointing errors and AoA fluctuations is reduced and better SER performance can be observed at high values of P t . Fig. 16 shows the average SER performance comparison of U2U FSO link. For the non-optimized plots, we first assume w z = 3 m and θ F OV = 20 mrad and next, we assume w z = 4 m and θ F OV = 22 mrad. The average SER curve of U2U link plotted using optimized values of w z and θ F OV shows better performance as compared to the plots with non-optimized values of w z and θ F OV , as expected. Moreover, it can be seen from the plot that there is an improvement in the performance as the beamwidth and receiver's FOV increase. This is reasonable because, by making the beamwidth more wider and increasing the θ F OV , the effect of AoA fluctuations on the receiver can be minimized.

V. CONCLUSION
In this paper, we presented a comprehensive performance analysis of a UAV-based FSO system considering individual ground-to-UAV (G2U), UAV-to-UAV (U2U) and UAV-toground (U2G) links by taking atmospheric turbulence, non-zero boresight pointing errors, atmospheric attenuation and AoA fluctuations into account. The unified closed-form expressions (unifying all three FSO links and two detection techniques) were derived for performance metrics such as outage probability, average SER, and ergodic capacity over combined channel state of UAV-based FSO system considering the generalized Málaga distribution as atmospheric turbulence-induced fading model.
Log-normal and Gamma-Gamma distributions were obtained as a special case of Málaga distribution. Further, the asymptotic closed-form expressions were also derived and we obtained the diversity gain as well as symbol error floor and outage floor values. The numerical results displayed that the performance metrics is strongly dependent on tunable parameters such as w z (i.e. beamwidth at the receiver) and θ F OV (i.e. receiver's FOV) and the optimal value of these parameters change by varying σ a (i.e. UAV's orientation deviation) and FSO transmit power P t . In addition, we have analyzed the effect of system and link parameters such as link lengths, atmospheric turbulence conditions, weather conditions, and position and orientation deviations of hovering UAVs on the system performance. As a part of future work, we will carry out the analytical optimization to obtain the optimal values of beamwidth and receiver's FOV.