PSO-Based UAV Deployment and Dynamic Power Allocation for UAV-Enabled Uplink NOMA Network

Department of Telecommunications Engineering, Hijjawi Faculty for Engineering Technology, Yarmouk University, Irbid, Jordan Electrical Engineering Department, Northern Border University, Arar, Saudi Arabia Remote Sensing Unit, Northern Border University, Arar, Saudi Arabia Computer Science Department, Northern Border University, Arar, Saudi Arabia Software Engineering Department, Alfaisal University, Riyadh, Saudi Arabia


Introduction
Nonorthogonal multiple access (NOMA) is regarded as one of the core innovations for future wireless networks to satisfy the exceptional demands on the following aspects: high spectral efficiency, incredibly low latency, very high data performance, super high reliability, and excellent user fairness. The ability of NOMA to support multiple users at the same time or frequency but with different power allocations is its defining attribute. As a result, compared to orthogonal multiple access (OMA) techniques, it yields a substantial spectral efficiency [1]. NOMA can be generally classified into power domain NOMA (PD-NOMA) and code domain NOMA (CD-NOMA). In power domain NOMA, which is the main focus of this paper, it allows several users to be superimposed on the same resource by separating them in the power domain so that they can be separated at the receiving end based on successive interference cancellation (SIC), in which users with higher channel conditions should be able to decode and subtract the messages of users with lower channel conditions prior to decoding their messages [2]. Furthermore, NOMA can be deployed in two directions: Uplink and Downlink. In Uplink-NOMA (UL-NOMA), which was first introduced in [3] and it is the main focus of this paper, the communication takes place from the users (U) to base station (BS), whereas in Downlink-NOMA (DL-NOMA), the direction of communication is from the BS to U.
There has been extensive research on UL-NOMA networks under several system setups and scenarios in terms of achievable ergodic rate and capacity regions, power allocation optimization, outage probability, and other related matrices [4][5][6][7][8][9]. The results collectively demonstrated that NOMA outperforms OMA. For instance, [10] investigated the network capacity, spectrum efficiency, and fairness. The power allocation optimization problem was analyzed and solved in [11]. In [12], the authors introduced the use of energy harvesting (EH) in a UL-NOMA network, and they derived closed-form expressions for the average ergodic rate. Outage probability expressions for Nakagami-m channels were obtained in [13]. In [14], the authors studied the average ergodic capacity and outage probability of a UL-NOMA network under statistical channel state information (CSI) and frequency selective channel. They showed that power allocation coefficients are key parameters to improve the overall network's performance. The authors of [15] studied the rate splitting (RS) between users in the UL-NOMA network to enhance the fairness and outage performance. Readers interested in NOMA are directed to a recent review paper [16] and its references.
Unmanned aerial vehicles (UAVs), on the other hand, have become a hot topic in recent years because they can be handy in a variety of applications, including search and rescue, aerial photography, payload carrying, and data collection from distributed wireless devices such as sensors [17,18]. For instance, if the cellular network goes down due to any cause, UAVs may serve as temporary aerial wireless BSs to provide wireless coverage [19]. They can also be used to assist the ground base station in providing users with increased coverage and data speeds, especially in congested areas [20]. In addition, UAVs can be used as relay nodes that enable and support direct communication between remote wireless devices.
To make the most effective use of the available spectrum resources, enhance the quality of communication of UAVbased networks, and reduce the overall latency, NOMA has been recently grafted into UAV networks under the name of UAV-enabled NOMA networks [21]. In [22], the authors investigated the problem of jointly optimizing the UAV location and power allocation to maximize the sum-rate of the ground users for a DL-NOMA network, i.e., the data is transmitted from an aerial BS to the ground users. However, their work assumed the availability of a dominant line-ofsight (LOS) path, which is a difficult condition to be satisfied in a practical scenario. The issue of maximizing the minimum rate for the UAV-enabled NOMA network under several constraints was introduced in [23]. In [24], the authors investigated the outage probability of two ground users, while in [25], they optimized the outage sum-rate for a multiantenna UAV that is serving multiple users. Ref. [26] proposed a new transmission framework where multi-UAVs are serving multiple groups of ground users with the help of the intelligent reflecting surface principle. In [27], the authors provided a solution for the optimum location of the UAV, bandwidth, and transmit power allocation for the DL-NOMA network.
In 1995, Eberhart and Kennedy proposed the particle swarm optimization (PSO) algorithm based on the movement of bird and fish flocks [28]. The PSO algorithm is a heuristic global optimization method that is rapidly evolving and widely used in many fields, such as function optimization, machine learning, optimizing the body design, signal processing, and many other applications [29]. This is because it is simple, easy to implement, and has fewer parameters. As a result, the PSO algorithm has received widespread attention from researchers to use this algorithm to deploy the UAV efficiently. For instance, in [30], the authors introduced a new UAV assignment model based on the PSO algorithm to reduce the dimension of the solution space. An algorithm for efficiently using a UAV for a searching mission was proposed in [31]. In [32], the authors applied the enhanced genetic-PSO to optimize the flight paths in the case of multiple UAVs. Furthermore, the PSO algorithm has been utilized in UAV-based NOMA networks. For example, the authors of [33] used PSO-based configuration in DL-NOMA networks to optimize the user grouping and subchannels assignments via brute-force analysis. Likewise, a PSO-based approach for user grouping in DL-NOMA networks was presented in [34] but constrained by the required quality of service (QoS) of each user.

Motivation and Contributions.
It is worth noting that all of the above work on UAV-enabled NOMA networks has the following flaws: (i) The majority of study in this field assumes that the UAV is in a given position and then optimizes the network's power allocation and ergodic sum-rate. Nonetheless, because the location of the UAV is critical in distributing power, this assumption may lead to performance reduction (ii) The PSO algorithm, to the best of our knowledge, has only been used to deploy the UAV in DL-NOMA networks. However, because of the predicted increase in wireless devices, UL-NOMA networks are attracting more attention (iii) There is a very limited work on user pairing in UAVenabled NOMA networks. Such a topic is very important and considered one of the main practical limitations of NOMA implementation and plays a crucial role in deciding the overall performance These shortcomings of the existing work motivated us to investigate the problem of efficiently 3D deploying the UAV based on the PSO algorithm in the UL-NOMA network. As a result, the main contributions of this paper can be listed as follows: (1) We first utilize the PSO algorithm to find the optimum 3D location of the UAV. The PSO algorithm calculates the pathloss between every user and the 2 Wireless Communications and Mobile Computing UAV. Then, it decides the 3D location of the UAV such that the sum pathlosses of all users is minimized (2) Once the optimum location of the UAV has been decided. We apply the NOMA technique among users to start sending their symbols to the UAV. In this stage, we study the user pairing problem and propose a dynamic power allocation strategy to guarantee that NOMA achieves a better ergodic sum-rate than OMA. In this strategy, the power allocation coefficients change dynamically with Instantaneous channel gains rather than kept constant all the time as in fixed power allocation strategy, i.e., fixed-NOMA (F-NOMA). Furthermore, equations for individual user rates and the network's ergodic total rate are developed and used for performance analysis (4) To validate our proposed algorithm, i.e., PSO-based UAV deployment and dynamic power allocation, we compare the network's performance in terms of the ergodic sum-rate and fairness under our proposed algorithm with the random deployment and fixed power allocation, which are both adopted widely in the literature to deploy the UAV and distribute the power between the users. Furthermore, we compare the NOMA technique performance with the traditional OMA technique The paper is structured as follows: Section 2 introduces the model system and problem formulation. Section 3 introduces the PSO algorithm and how to deploy UAV efficiently. Section 4 reveals the user pairing problem, ergodic sum-rate analysis, and dynamic power allocation strategy. The simulation results and discussion are offered in Section 5. Section 6 concludes the paper.

System Model and Problem Formulation
Consider a UAV-enabled UL-NOMA network as shown in Figure 1, where a single-antenna I ground users communicate with a single-antenna UAV that hovers at a certain height to cover this service area. The fundamental disadvantage of employing a UAV as an aerial BS is its limited energy capacity. Due to this fact, a UAV must return to a charging station for recharging regularly [35]. Furthermore, to ensure continuous wireless coverage, a drone must perform a handoff process periodically with one of the additional drones available at the charging station [36]. According to [37], the energy consumption during data transmission and reception, including the transfer of data from the UAV BS to the main BS (offloading), is substantially lower than the energy consumption during drone hovering, accounting for only ½10 -20% of the drone's total energy capacity.
Based on the NOMA concept, the received signal at the UAV from all users for such a network can be written as where s i is the symbol transmitted by the ith user, satisfying Efjs i j 2 g = 1, P is the maximum transmission power which is assumed to be equal for all users, α i represents the power allocation coefficient for the ith user, n denotes the additive white Gaussian distributed noise (AWGN) following~C N ð0, σ 2 Þ, and h i is the channel gain between the ith user and UAV. All users are presumed to be completely aware of the channel gain based on the feedback obtained from the UAV. Furthermore, an SIC operation is carried out at the UAV to detect the users' symbols. It is worth noting here that, while the imperfect SIC is considered as one of the key limitations of NOMA implementation, perfect SIC can be achieved under two conditions; NOMA users are grouped into clusters each of which has only two users and the channel gain difference between the users in the same cluster is very distinctive [38][39][40][41][42][43][44][45]. Without loss any generality, based on the knowledge of the channel gains, it can be sorted as It is widely accepted that h i can be written as where g i is a small-scale fading coefficient following Raleigh distribution g i~C N ð0, 1Þ and L a,i is the average pathloss between the ith user and UAV which is given by [46,47].
where L L,i and L N,i are the pathlosses for the line of sight (LOS) and nonline of sight (NLOS) links, respectively. These quantities have the following formulas in which, A L , B L , A N , and B N are the parameters of the line of sight and nonline of sight pathlosses links, and is the 3D distance between the ith user located at ðx i , y i , z i Þ and UAV located at ðx u , y u , z u Þ. Moreover, P L ðr i , z u Þ represents the probability of human body blockage for the ith user and can be modeled as [47].
where r i is the 2D distance between the ith user and UAV, z u is the height of the UAV, λ is the density of human blockers, g B is the diameter of human blockers, h B and 3 Wireless Communications and Mobile Computing h T are the heights of the human blocker and transmitting device, respectively, and z i is the height of the ith user.
The UAV decodes the signals of users orderly according to the power allocation coefficients of users. As a result, the received signal-to-interference-plus-noise-ratio (SINR) at the ith user (1 ≤ i ≤ I − 1) can be written as [48] where ρ = P/σ 2 is the transmit SNR. Moreover, the term ∑ I j=i+1 α j jh j j 2 represents the interuser interference after SIC. For the Ith user, the received SINR is given by Accordingly, the ergodic sum-rate of this network will be as follows where E½· represents the expectation operation.
To maximize the ergodic sum-rate in this network, the deployment of the UAV and the transmit power of each user should be jointly optimized, which can be written as OP maximize subject to The constraint (10) guarantees that the ergodic rate of the ith user is always greater or equal to the rate threshold of that user, whereas constraint (11) ensures that the user's total transmitted power does not exceed its maximum power P. The remaining constraints (12)- (14) represent the constraints on 3D location of the UAV, i.e., x u , y u , and z u .
In fact, the ergodic sum-rate maximization framework OP is nonconvex due to the nonconvexity of the objective function. Therefore, in the following sections, we separate this optimization problem into two subproblems. First, we utilize the PSO algorithm to find an efficient location for the UAV that minimizes the sum pathlosses from users to the UAV. Then, we propose a dynamic power allocation strategy to maximize the ergodic sum-rate.

Efficient Deployment Using Particle Swarm Optimization Algorithm
In this section, we utilize the PSO algorithm to find the best location for the UAV that minimizes the sum pathlosses between the users and UAV. The PSO algorithm belongs to metaheuristic algorithms, which are aimed at determining, produce, or choose a heuristic (partial search algorithm) that may provide a sufficiently excellent solution to an optimization problem. Metaheuristic algorithms employ a global search approach to find the global minimum point instead of a local search that is used to find the local minimum. Thus, the employment of global search metaheuristic overcomes the problem of the search algorithm that tends to trap in local optima [49]. The PSO algorithm, specifically, is based on a population-based method to iteratively improve a set of  Wireless Communications and Mobile Computing candidate solutions known as particles. Each candidate solution must keep two bits of information in mind while exploring the search space: (1) the best solution encountered by the swarm and (2) the best solution encountered by the particle. These pieces of information control the search procedure [50,51]. Algorithm 1 depicts the PSO algorithm's pseudocode. The PSO algorithm starts with several random solutions and iteratively attempts to create candidate solutions based on the best global experience and the best experience of the candidate. The best global location and the best position for each particle are modified, and the particle positions and velocities are determined based on them in each iteration [52]. The velocity value determines how much the deployment can be modified. The velocity is measured in the following manner: where the random positive numbers are rand ðv size Þ, the global and private learning coefficients are c 2 and c 1 , and the weight of inertia is w. Furthermore, the position of each particle is changed per The PSO algorithm's computational complexity depends on the number of iterations (t max ), the number of candidate solutions (W), and the number of iterations to update velocity and position for each particle (Q). As a result, the worst-case complexity of the PSO algorithm is given by OðWQt max Þ. It is worth pointing out here that the PSO algorithm has less complexity and less execution time compared to the other meta-heuristic algorithms, such as Ant Colony, Genetic Algorithm (GA), or Artificial Bees Colony (ABC).
On the other hand, it is crucial to properly select a set of coefficients, such as κ, ϕ 1 , and ϕ 2 so the algorithm can reach a point of convergence and stop the particles from diverging. We, therefore, adopted the guidelines given in [53] to select such coefficients.

Ergodic Sum-Rate Analysis and Power Allocation
Given that the location of the UAV has been optimized based on the PSO algorithm and thus the channel gains of every user, i.e., h i is now available based on (2), we present the ergodic sum-rate and dynamic power allocation strategy to decide the power allocation coefficients for the users in the network. One of the main limitations of NOMA is that it cannot be implemented on all users simultaneously, as this leads to severe interference among them. Instead, we divide the total number of users into pairs, with each pair usually comprising two users with distinct channel gains [38]. Transmissions between user pairs are kept orthogonal through frequency or time division. Hence, before proceeding further with ergodic sum-rate and power allocation analysis, we first investigate the user pairing problem.

User Pairing Schemes.
The user pairing problem has been taking extensive efforts from the researchers. As a result, they proposed several schemes with a primary target to maximize the overall network's rate and minimize the SIC errors. Users in NOMA networks are generally classified into three groups based on their channel gain: low channel gain users who are located far away from the BS (weak users), high channel gain users who are located near the BS (strong users), and average channel gain users who are located between the strong and weak users (midusers). We next describe how these users are paired according to three user pairing schemes: (1) Conventional Near-Far User Pairing (CNFUP). In CNFUP, the pairs are formed between the strong and weak users. However, when users with average channel gain (midusers) are paired in this scheme, the channel gain difference between these in-pair users is very small, resulting in SIC errors. In this scheme, the pairs are as follows: (2) Uniform Channel Gain Difference Pairing (UCGDP). UCGDP pairs midusers with either the strong users or weak users. Hence, UCGDP allows midusers to achieve higher rates by avoiding or minimizing the SIC errors. As a result, the pairs are as follows: (3) Hybrid Pairing (HP). HP follows CNFUP, but when the channel gain gap between users begins to decrease, it switches to the UCGDP scheme. As a result, this scheme maintains the same data rates for weak users and strong users as CNFUP, thus minimizing the miduser problem through certain tradeoffs. Here, the pairs are as follows [54] Pair k = where s represents the point at which the pairing schemes are flipped.

Ergodic Sum-Rate and Power Allocation.
We now proceed to analyze the ergodic sum-rate. We assume that user 5 Wireless Communications and Mobile Computing m and user n are chosen to perform NOMA out of I users in the network, where 1 ≤ m ≤ n ≤ I. As a result, there will be k pairs, k = 1, ⋯, I/2.
Based on (8), the rates of users m and n are given by where a m > a n . Moreover, we assume that α m + α n =1. Such an assumption is crucial to guarantee that SIC is implemented perfectly, i.e., to reduce the interpair interference.
In addition to that, to manage intercell interference for a system with multiple cells [55][56][57].
On the contrary, the rate of user j based on OMA, time or frequency, is given by One way to proceed further with ergodic rate and power allocation analysis is to impose conditions on the individual users' rates such that NOMA achieves a higher rate than OMA. As a result, for user m After some manipulations, we reach at Following the same procedure for user n, we get 1: Input: 2: The lower and upper bounds of decision variable ðv min , v max Þ, Construction coefficients ðk, ϕ 1 , ϕ 2 Þ, Maximum number of iterations ðt max Þ, Population size ðWÞ 3: Initialization: 4: ϕ = ϕ 1 + ϕ 1 , χ = 2κ/j2 − ϕ − ðϕ 2 − 4ϕÞ 0:5 j 5: w = χ, c 1 = χϕ 1 , c 2 = χϕ 2 , C global:best = −inf 6: for i = 1 : W 7: Each particle i starts at a random initial position: QðiÞ = unif ormrandomðv min , v max , v size Þ 8: Each particle i starts with zero velocity: VðiÞ = zerosðv size Þ 9: Find the cost of particle i: CðiÞ = costf unctionðQðiÞÞ 10: Let the best location of particle i equals the currect location: QðiÞ best = QðiÞ 11: Let the best cost of particle i equals the current cost: By combining the results from (23) and (25), we obtain where N = , 0 ≤ γ i ≤ 1, i = 1, 2, and γ 1 + γ 2 = 1. It is worth mentioning that γ 1 and γ 2 are controlling factors to tune the power allocation coefficients, a m and a n . Moreover, we can see that the power allocation strategy is dynamic, i.e., a n is a function of instantaneous channel gains. This strategy is referred to as dynamic NOMA (D-NOMA) in the rest of the paper.
Accordingly, the ergodic rate of user n can be obtained as We can rewrite (28) in terms of (26) as follows: Hence, the ergodic rate of user n has the following formula [7] R where Moreover, Ω = I!/ðm − 1Þ!ðn − m − 1Þ!ðI − nÞ!: On the other hand, for user m, the ergodic rate is Then, writing (32) in terms of (26) leads to The ergodic rate of user m has the following expression where As a result, the ergodic rate of the (m, n) users pair is R k ð Þ pair = R m + R n , m, n ∈ I, k = 1, 2, ⋯, I/2: Finally, by adding the ergodic rate of all pairs, the ergodic sum-rate of the network is calculated by

Simulation Results and Analysis
Consider a coverage region denoted as ℝ with dimension 500m × 500m, where ten ground users, i.e., I = 10, which are marked by blue circles, are randomly distributed inside this coverage region based on nonuniform distribution function f ðx, yÞ, as shown in Figure 2.
We first demonstrate the impact of power allocation coefficients on the individual sum-rate, and then, we investigate the user pairing problem in the context of a PSO-based UAV deployment. Then, for NOMA and OMA networks, we investigate how much gain the PSO-based deployment provides the network over the random deployment. Finally, the fairness of the NOMA network is compared with the 7 Wireless Communications and Mobile Computing OMA network. Table 1 shows the simulation and system parameters. Figure 3 shows how our tuning factor γ 1 can decide the gain we get by employing our dynamic power allocation strategy (D-NOMA) over the OMA technique. It is clear that the rate of user m increases with the increasing of γ 1 . On the other hand, it decreases for user n as γ 1 increases. Moreover, these results coincide with the analytical results provided in (30) and (34).  We now study the influence of pairing schemes on the performance of the NOMA network. We assume that every two users are paired and perform NOMA independently from other pairs. As we have I users, the network contains I/2 pairs. Figure 4 presents the three user pairing schemes discussed earlier, namely CNFUP, UCGDP, and HP for PSObased UAV deployment. Each pairing scheme identifies the pair by a number ranging from 1 to 5, and each pair has the same color and shape. We can notice how the pairs are changing according to the pairing scheme. Figure 5 demonstrates the performance of NOMA for PSO-based location in terms of ergodic sum-rate with respect to SNR under the three pairing schemes. We can notice that the UCGDP scheme outperforms other pairing schemes. The major advantage of the UCGDP scheme is that it reduces the interference at the midusers, which causes a rate increase for these users. From this figure, we can also observe that there is no much gain of the UCGDP scheme over the other schemes. This is due to the relatively small number of users in the service area and the assumption that SIC is done perfectly at the BS. However, this gain would definitely increase as

Ergodic
Sum-Rate. The location of the UAV is shown in Figure 6 under four different deployment approaches; the PSO algorithm, the Genetic Algorithm (GA), and two random locations, namely, random 1 UAV location and random 2 UAV location. Furthermore, as we decided before, the optimum pairing scheme is the UCGDP scheme, and it would be used as the pairing scheme in our simulations henceforth.

Wireless Communications and Mobile Computing
According to Figure 6, it can be clearly seen that the PSO and GA algorithms converge to the same efficient location. As a result, for the sake of comparison between these two metaheuristic algorithms, Figure 7 presents a comparison for the convergence speed of these two algorithms. We can notice that, for GA, it requires almost 18 iterations to converge to the solution, whereas for PSO, it requires only about 7 iterations to converge to the same solution. Besides, the GA computational complexity for the worst-case scenario considering Q iterations is expressed as Oðt max W log 2 ðWÞÞ, compared to OðWQt max Þ for the PSO algorithm. From these results, we conclude that the PSO algorithm performs better than the GA in terms of complexity and speed. Figure 8 reports the ergodic sum-rate versus transmit SNR for the four UAV deployments under D-NOMA, F-NOMA, and OMA techniques. It confirms that the PSO algorithm and GA can be utilized efficiently to deploy the UAV, and they always perform better than the two random UAV locations but we should keep in mind that GA has higher complexity and takes higher iterations to converge to the same efficient location, as we confirmed earlier.
The PSO-based location is decided at which the summation of all users' pathlosses is minimized. This applies to NOMA and OMA networks. Moreover, the performance of NOMA consistently outperforms OMA. This can be justified in the following way: NOMA provides total independence to the user with better channel conditions while allocating only a limited amount of transmit power, resulting in minimal interference to the users with less channel condition. As a result, both users are capable of achieving acceptable rates. On the other hand, OMA techniques assign a considerable fraction of the independence to the users with less channel conditions to attain the same performance as the users with better channel conditions, resulting in a significant degradation in the users' performance with better channel conditions. In addition to that, the simulation results match the analytical results, proving the correctness of our mathematical derivations.
When we compare D-NOMA to F-NOMA, we can see that our proposed D-NOMA approach always produces a greater sum-rate than F-NOMA. The power allocation coefficients in D-NOMA change depending to the instantaneous channel gain rather than remaining constant all the time, which decreases performance.

Fairness.
Finally, we investigate the fairness among the users in the network. The fairness index can measure the fairness in resources distribution among users or pairs, such that they achieve equal data rates. We rely on Jain's fairness index, which is given by [58].
It is evident from Figure 9 that D-NOMA can achieve better fairness compared to OMA, especially when γ 1 = 1. Furthermore, Jain's fairness index is an increasing function of γ 1 . This is expected based on our analytical results, in   R m is an increasing function of γ 1 , and R n is a decreasing function of γ 1 . Furthermore, we can notice that, at γ 1 = 0, OMA has better fairness than NOMA. This tells us the importance of carefully choosing the controlling factors γ 1 and γ 2 , which, in turn, tune the power allocation coefficients, a m and a m .

Conclusions
This paper investigated the problem of jointly efficient 3D deployment of UAV and the power allocation strategy for UAV-enabled UL-NOMA network to maximize the ergodic sum-rate. We handled the nonconvexity of the original 14 Wireless Communications and Mobile Computing problem by dividing it into two stages. In the first stage, we utilized the PSO algorithm to find the optimum 3D location of the UAV. Then, we proposed a dynamic power allocation strategy, and we presented a closed-form expression for ergodic sum-rate. Moreover, we compared three pairing schemes; CNFUP, UCGDP, and HP schemes. Results show that our PSO-based algorithm and the proposed dynamic power allocation strategy can jointly provide a better ergodic sum-rate compared to other approaches, such as Genetic Algorithm (GA) and random deployment, and fixed power allocation strategy. Moreover, we concluded that the UCGDP scheme achieves higher rates as it minimizes the SIC errors compared to other user pairing schemes. Finally, we demonstrated that the fairness of a NOMA network depends on the right selection of power allocation coefficients.

Data Availability
Data available on request.

Conflicts of Interest
The authors declare no conflict of interest.