Resource Allocation in Uplink NOMA-IoT Based UAV for URLLC Applications

One of the main targets of future 5G cellular networks is enlarging the Internet of Things (IoT) devices’ connectivity while facing the challenging requirements of the available bandwidth, power and the restricted delay limits. Unmanned aerial vehicles (UAVs) have been recently used as aerial base stations (BSs) to empower the line of sight (LoS), throughput and coverage of wireless networks. Moreover, non-orthogonal multiple access (NOMA) has become a bright multiple access technology. In this paper, NOMA is combined with UAV for establishing a high-capacity IoT uplink multi-application network, where the resource allocation problem is formulated with the objective of maximizing the system throughput while minimizing the delay of IoT applications. Moreover, power allocation was investigated to achieve fairness between users. The results show the superiority of the proposed algorithm, which achieves 31.8% delay improvement, 99.7% reliability increase and 50.8% fairness enhancement when compared to the maximum channel quality indicator (max CQI) algorithm in addition to preserving the system sum rate, spectral efficiency and complexity. Consequently, the proposed algorithm can be efficiently used in ultra-reliable low-latency communication (URLLC).


Introduction
Due to their mobility and flexibility, unmanned aerial vehicles (UAVs)-also called drones-have become popular and have a wide range of applications. These applications include-though are not confined to-monitoring the environment, fertilizing and dusting crops, searching for mines, police monitoring, and operations of rescue. UAVs have received great attention thanks to its lower cost, high mobility, wide coverage and ease of deployment and flexibility [1]. These applications are not restricted to industrial and civilian fields only, but can also be extended to military applications [2].
In the near future, UAVs will be highly deployed in many applications in wireless networks, especially 5G networks, to serve ultra-reliable low-latency communication (URLLC) [3]. UAVs can present either in a single-UAV or multi-UAV system [4]. UAVs can be utilized as airborne base stations and flying relays to provide LoS connections to improve the coverage and power consumption for IoT devices. The recent era will witness billions of connections of Internet of Things (IoT) devices that will be served simultaneously [5]. Smart mobiles, vehicles, home appliances, and sensors are examples of these IoT devices [6].
The fifth generation (5G) network is intended to provide coverage for high-density devices with various applications of diverse quality of service (QoS) requirements [7]. Non-orthogonal multiple access (NOMA) is a promising multiple access technology which

•
The uplink NOMA-based transmission system utilizing the UAV as a base station is modeled. Then, the resource allocation problem is formulated with the aim of maximizing the sum rate, taking into consideration the different delay requirements to serve URLLC applications.

•
The proposed scheduler allocates resources jointly in both time domain and frequency domain based on the IoT devices parameters. Delay limits and priority are used by time domain; then the buffer status report (BSR) and channel quality indicator (CQI) control the frequency domain scheduler decision to allocate resources. In addition, a power allocation scheme is proposed to achieve fairness between the users allocated the same RB regardless of the different channel conditions. • Unlike the previous works, the novelty of the presented algorithm lies in its ability to consider both the strict delay requirements of IoT devices and the system throughput while ensuring high reliability and fairness, where simulations are performed to evaluate the proposed scheduling algorithm performance. The results demonstrate the effectiveness of the proposed algorithm to serve URLLC traffic with restricted delay limits, due to the significant enhancement in delay, reliability and fairness, in addition to maximizing the sum data rate and spectral efficiency while achieving the same system complexity when compared to the maximum channel quality indicator (max CQI) algorithm.

Related Works
This section presents the state-of-the-art in resources scheduling in uplink 5G networks, UAV communication, and NOMA-based URLLC systems. Resource allocation and scheduling techniques in uplink 5G networks have been studied in many research papers presented in this literature. In [8], the authors proposed two resource allocation algorithms; the first one is the local rate maximization (LRM) in which the subcarrier is allocated to the user which gives the maximum rate on the chosen subcarrier. The second approach is global objective maximization (GOM) in which the allocated subcarrier is that which achieves maximum increase in the objective function.
A weighted sum rate maximization problem is modeled in [11], then a subcarrier allocation scheme which is based on iterative water-filling (IWF) algorithm is introduced. Its main idea is to initially begin with all devices allocated to all subchannels then remove the subchannel-device pair which gives the worst gain and power; repeatedly doing so until it meets the constraint that L devices are allocated to each subchannel [11]. The authors in [12] came up with a many-to-many matching model, where each subchannel forms a preference list based on the system throughput and each user creates its own preference list based on the received power. Iterative addition or substitution processes for the users to the subchannels are performed; for the purpose of enhancing the system performance until there is no more enhancement [12]. Reference [13] shows a two-sided matching and swapping technique, where firstly, each device forms its preference list based on channel gain and data rate, then each subchannel receives requests from the demanding devices and chooses the L devices with the highest energy efficiency. Then swapping operations are performed if and only if it is accompanied by an enhancement in energy efficiency [13]. UAV cellular networks were investigated with 5G technologies in [14,15] considering the channel model but the resource allocation problem was not inspected. In [16], backscatter communication technology, which is based on reflecting the incident wireless signals for the purpose of data collection, is investigated. The mobility of UAVs is exploited for maximizing the energy efficiency while optimizing the backscatter devices allocation and UAV trajectory [16]. The authors in [17] proposed NOMA scheme with index modulation to reduce the effect of contention, interference and collision in grant-free access. However, the system throughput was not considered. The authors in [18] used resource slicing and presented two user clustering mechanisms to meet the delay constraints of time stringent applications in uplink NOMA. NOMA technology is used in [19] and the resources are classified into shared and private. If the transmission and delay requirements of users cannot be achieved by the shared resources, then the private resources can be used [19]. Unlike the studies, the proposed algorithm is the first to consider the restricted delay limits of the IoT devices in addition to throughput maximization which makes the proposed algorithm suitable for URLLC applications.
The following sections in the rest of the paper are organized as follows. In Section 3, the system model is illustrated for the uplink of IoT devices served by UAV using NOMA access technique. Section 4 shows the problem formulation with the purpose of delay minimization and maximizing the network sum rate. Section 5 demonstrates the delay-rate optimization scheduling algorithm and the fairness optimization power allocation algorithm. Section 6 shows the performance evaluation of the proposed algorithm through the simulation results. Finally, the conclusion of the presented work is discussed in Section 7.

System Model
As shown in Figure 1, a UAV-assisted IoT network is considered where the UAV serves as an aerial base station, all IoT devices are served by a UAV that covers a cell with radius R c . The UAV is located at 3D coordinates (x UAV , y UAV , h UAV ); assume that (x U AV = 0, y U AV = 0, h U AV ); i.e., the UAV is at the center of the cell with altitude h UAV ; such that (h min ≤ h UAV ≤ h max ) where h min and h max are the minimum and maximum allowable heights of the UAV. Assume that there are N ground IoT devices; each device is equipped with a single antenna. These devices are distributed randomly in the cell covered by the UAV; each device is located at (x i , y i ) where i = {1, 2, . . . , N}. Each IoT device has a packet arrival rate λ i and transmits minimum rate R i with delay limit D i . Each IoT device has a transmitted power P i (P min,i ≤ P i ≤ P max,i ) where P min,i and P max,i are the minimum and maximum transmitted power of IoT device i respectively. Path loss between IoT device i to the UAV expresses the large-scale fading component which is given by where f c is the carrier frequency, c is the light speed, η LOS , η NLOS , a, b are constants related to the propagation environment either urban, suburban, dense urban or high-rise urban environments. Considering air to ground (A2G) communication between the UAV and the ground IoT devices, thus, each device can have line of sight (LoS) view or non-line of sight (NLoS) view with respect to the aerial base station with certain probability. NLoS occurs when the propagation path is partially or fully obscured by physical obstacles. The LoS probability or NLoS probability are highly dependent on the device location, environment and the elevation angle between the device and the UAV, as illustrated in Figure 1. Pr LoS i , Pr NLoS i are the probabilities of IoT device i having LoS link or having non-line of sight (NLoS) link respectively between the UAV and IoT device, which could be calculated as [20] Pr where θ i is the elevation angle (measured in "degree") between IoT device i and the UAV as illustrated in Figure 1; it can be calculated as d i is the distance between the IoT device i at (x i , y i ) and the UAV located at (x U AV , y U AV , h U AV ) is Sensors 2022, 22, x FOR PEER REVIEW 4 of 17 and the ground IoT devices, thus, each device can have line of sight (LoS) view or nonline of sight (NLoS) view with respect to the aerial base station with certain probability. NLoS occurs when the propagation path is partially or fully obscured by physical obstacles. The LoS probability or NLoS probability are highly dependent on the device location, environment and the elevation angle between the device and the UAV, as illustrated in Figure 1. , are the probabilities of IoT device i having LoS link or having nonline of sight (NLoS) link respectively between the UAV and IoT device, which could be calculated as [20] where is the elevation angle (measured in "degree") between IoT device i and the UAV as illustrated in Figure 1; it can be calculated as is the distance between the IoT device i at (xi,yi) and the UAV located at The UAV uses the NOMA access technique to communicate with the IoT devices. Assume that the total bandwidth allocated to the UAV is B, which is divided equally into K orthogonal subcarriers. Let bk,i(t) is the subcarriers assignment index, where bk,i(t) = 1 means that subcarrier k is allocated to device i, otherwise bk,i(t) = 0. There are maximum L IoT devices allowed to be scheduled over a single subcarrier at the same time and each IoT device gets exactly one subcarrier for simplicity. IoT devices can give preferences for the resource blocks, and their preferences are considered based on their channel quality indicator (CQI) [22] which depends on the channel quality between the UAV and IoT devices. The signal to noise plus interference ratio (SNIR) of IoT device i on subcarrier k is modeled as , ( ) is the channel gain between the UAV and IoT device i on subcarrier k. , ( ) which is invariant in one time slot but varies over different time slots, can be modeled as: The UAV uses the NOMA access technique to communicate with the IoT devices. Assume that the total bandwidth allocated to the UAV is B, which is divided equally into K orthogonal subcarriers. Let b k,i (t) is the subcarriers assignment index, where b k,i (t) = 1 means that subcarrier k is allocated to device i, otherwise b k,i (t) = 0. There are maximum L IoT devices allowed to be scheduled over a single subcarrier at the same time and each IoT device gets exactly one subcarrier for simplicity. IoT devices can give preferences for the resource blocks, and their preferences are considered based on their channel quality indicator (CQI) [22] which depends on the channel quality between the UAV and IoT devices. The signal to noise plus interference ratio (SNIR) of IoT device i on subcarrier k is modeled as g k,i (t) is the channel gain between the UAV and IoT device i on subcarrier k. g k,i (t) which is invariant in one time slot but varies over different time slots, can be modeled as: where h k,i (t) is the small scale fading of complex Gaussian distribution given by h k,i (t)∼ CN(0,σ 2 ). URLLC uses short packets to ensure low latency transmission, so Shannon capacity, which acts as the upper bound in terms of data rate, can no longer be applied. Consequently, the user data rate at finite blocklength transmission [23] is given by where, the decoding error probability ε [24] is given by Such that the Q function and V are defined respectively as where D states the packet size, and m represents the blocklength of the channel. The sum rate can be calculated as Assume that packet arrival of the IoT device i follows a Poisson process with the average arrival rate as λ i packets per second. The average service rate of the same IoT device is assumed to be µ i packets per second. Both λ i and µ i are statistically identical and independent distributed. The queuing system model of the IoT device is shown in Figure 2. Then, the average delay d av,i , which is based on the M/M/1 queuing model [25], can be given by the following formula: where S i and R av,i are the packet size and the average rate of IoT device i respectively.
where ℎ , ( ) is the small scale fading of complex Gaussian distribution given by ℎ , ( )∼ CN(0, ). URLLC uses short packets to ensure low latency transmission, so Shannon capacity, which acts as the upper bound in terms of data rate, can no longer be applied. Consequently, the user data rate at finite blocklength transmission [23] is given by where, the decoding error probability [24] is given by Such that the function and are defined respectively as where states the packet size, and represents the blocklength of the channel. The sum rate can be calculated as Assume that packet arrival of the IoT device i follows a Poisson process with the average arrival rate as packets per second. The average service rate of the same IoT device is assumed to be μi packets per second. Both and μi are statistically identical and independent distributed. The queuing system model of the IoT device is shown in Figure  2. Then, the average delay , , which is based on the M/M/1 queuing model [25], can be given by the following formula: where Si and , are the packet size and the average rate of IoT device i respectively.  [26].
, can be given as the rate of device i averaged over time as follows: where represents the total number of time slots. R av,i can be given as the rate of device i averaged over time as follows: where T slots represents the total number of time slots.

Problem Formulation
The main objective is to maximize the sum data rate of all users while achieving minimum device delay through selecting the assignment index b k,i at every time slot. Hence, the resource allocation problem is formulated with data rate maximization objective function as follows: s.t. C1 : C2 : C4 : where P max is the maximum available transmission power of the IoT device. C1 is the minimum required data rate for all users to ensure QoS. C2 means that any IoT device transmit power cannot exceed P max . C3 and C4 are the constraints of the assignment matrix b k,i and power p k,i . C5 mentions that one subcarrier cannot be allocated to more than L users at the same time. C6 is the delay constraint, states that the average delay of the device i (d av,i ) should not exceed the delay limit requirement D i . C7 is the UAV height constraint between the minimum and maximum allowable altitudes. The optimization problem is non-convex due to the coupled variables b k,i and p k,i in (20) and (21). Hence, the proposed algorithm uses a linear weighted utility function to overcome the complexity of the optimization problem (17).

Proposed Algorithm
The optimization problem is non-convex due to the coupled variables b k,i and p k,i in (20) and (21). To find a simplified solution, the proposed scheduler in this section exploits the convexity property of the sub-problems [27] for the main non-convex problem (17). In addition, the proposed algorithm makes use of the resource element structure in NOMA which takes one subcarrier in frequency and one time symbol known as transmission time interval (TTI) [28], as demonstrated in Figure 3. Hence, the proposed algorithm operates in two domains, as illustrated in Figure 4. The first is delay minimization to guarantee the delay requirement of each IoT device which is performed by a time domain packet scheduler (TDPS). The second domain is rate maximization to increase the spectral efficiency and maximize the system sum rate which is performed by a frequency domain packet scheduler (FDPS).   The optimum height of the UAV should be calculated to solve constraint C7. The optimal UAV elevation angle was derived for each environment in [29] to cover a circular cell of certain radius in A2G communication independent of the multiple access technique used .Thus, according to [30]; the values of given by (25) for UAV placement corresponding to each environment either suburban, urban, dense urban or high-rise urban environments are illustrated in Table 1. Thus, the optimum UAV altitude ℎ to cover a cell of radius can be given by

Time Domain Packet Scheduling (TDPS)
The main function of TDPS is to select a certain number of IoT devices to be scheduled in the next TTI; this process should guarantee that there are no devices exceed their maximum delay limits by minimizing the average delay. Hence, the optimization problem for time domain scheduling can be formulated using (15) as   The optimum height of the UAV should be calculated to solve constraint C optimal UAV elevation angle was derived for each environment in [29] to a circular cell of certain radius in A2G communication independent of the multiple technique used .Thus, according to [30]; the values of given by (25) fo placement corresponding to each environment either suburban, urban, dense ur high-rise urban environments are illustrated in Table 1. Thus, the optimum UAV a ℎ to cover a cell of radius can be given by = ℎ The main function of TDPS is to select a certain number of IoT devices to be uled in the next TTI; this process should guarantee that there are no devices excee The optimum height of the UAV should be calculated to solve constraint C7. The optimal UAV elevation angle θ optimum was derived for each environment in [29] to cover a circular cell of certain radius in A2G communication independent of the multiple access technique used. Thus, according to [30]; the values of θ optimum given by (25) for UAV placement corresponding to each environment either suburban, urban, dense urban or high-rise urban environments are illustrated in Table 1. Thus, the optimum UAV altitude h optimum to cover a cell of radius R c can be given by

Time Domain Packet Scheduling (TDPS)
The main function of TDPS is to select a certain number of IoT devices to be scheduled in the next TTI; this process should guarantee that there are no devices exceed their The device selection criteria in TDPS is based on a weighted delay metric which is essentially needed to prioritize the devices requests. The metric function is based on delay [31] to satisfy the delay constraint C6. The UAV uses the information in the BSR to compute the metric function for each requesting device. This metric aims to order the IoT devices requests to control the TDPS decision. The metric considers average delay and buffer status reports [32] as follows: where α j states the priority of each traffic group, where the TDPS categorizes stations according to their delay limits into j groups, and w i,j is the traffic weight of user i in traffic class j, this weight can be calculated as where q i,j is the queue size of user i in traffic group j, and bl is the buffer length to avoid buffer overflow of the IoT device. After grouping and calculating metric for the IoT devices that send scheduling requests. The TDPS selects maximum N max = KL devices to be scheduled in the next TTI, since there are L devices can be scheduled over the same resource block according to constraint C5 (22). Consider N_sel to be the number of chosen IoT devices to be scheduled. The rejected users send scheduling requests in the next TTI.

Frequency Domain Packet Scheduling (FDPS)
The main purpose of FDPS is allocating resources for IoT devices based on channel conditions (CQI) to increase spectral efficiency [32]. FDPS allocates resources to the IoT devices chosen by TDPS. Thus, the optimization problem of FDPS could be formulated as C5 : In the proposed algorithm in FDPS each of the selected users prioritizes the RBs, where each IoT device sorts the RBs in descending order of CQI. The CQI value is an indication for the channel quality of each user on each subchannel. CQI value ranges from 0 to 15. The higher the value, the better the channel quality and vice versa. The CQI value is determined according to the estimated value of SINR [33]. Therefore, a preference matrix is formed containing the CQI values of all users on all RBs such that CQI i,k is the CQI value of user i on RB k; where the rows correspond to the IoT devices and the columns are related to the RBs. Each IoT device's preferences (CQI values) are listed in a row in this matrix; such that a higher CQI value indicates that the IoT device prefers this RB.
A weighted preference matrix is then formed which is based on the weighted metrics (27) computed in TDPS and the preferences determined in FDPS, and can be given by f obj = Diag(M 1xN_sel ) CQI N_sel xK (33) where M 1xN_sel is a row vector of the metrics of the selected devices and CQI N_sel xK is the preference matrix which contains the CQI values of the selected devices on all RBs. Hence, the problem in (29) can be easily modified to C5 : The problem in (34) can be solved using binary integer programming which is used to solve the constrained problem to maximize f obj The algorithm (Algorithm 1) to find the optimum allocation matrix is listed in detail as shown in the pseudo code.

Algorithm 1. Joint Delay-Rate Optimization Scheduler
Input: T, K, N, λ, P min & P max , j, L Output: {s}b k,i 1: Initialize: N max = L * K 2: Step 1: chooses the N max devices with the highest metrics in TDPS.

3:
Arrange IoT devices in j groups according to the application type.

4:
For T s = 1 to T s = T do 5: R = IoT devices send scheduling requests 6: If R =< N max go to Label 7: else, do 8: For i = 1 to i = R do 9: Compute the weight of device i (27): M i = α i w i,j d av,i 10: End for 11: Arrange IoT devices of each group in descending order of the weight (M i ) 12: Choose the N_max nodes which have the maximum weight to be scheduled in this TTI. 13: Label: Choose the R nodes to be scheduled in this TTI. 14: End If 15: N_sel = the selected nodes to be scheduled 16: Step 2: assign each IoT device a resource block 17: For i = 1 to i = N_sel do 18: Form the preference matrix for each device i to all available RBs based on the CQI value.

19:
Form the objective function which is the weighted preference matrix f obj . 20: Initializek = 1, correspondingly set f max = f obj .

21:
if a solutionk k K f obj f max can be found: updatek =k, and f max = f obj .

22:
End for 23: Delay of the scheduled nodes is cleared, but that of waiting nodes is incremented. 24: Rejected nodes send scheduling requests in the next TTI.

25: End For
In the Joint Delay-Rate Optimization Scheduler, the UAV receives scheduling requests in every TTI. In TDPS, the UAV classifies the requests to groups according to the application. Then, the metric function is computed for all requesting devices using (27). The scheduler selects N_sel devices with the highest metrics. Then, in FDPS, the RBs allocated to each IoT device are chosen with the objective to maximize the weighted preference matrix in (33).

Power Allocation Algorithm
The Uplink power allocation scheme is used to ensure fair data rates between users sharing the same RB [34]. Consider two users share the same RB, if g k,n > g k, f then according to (8) the SNIR of near and far users respectively are given as Assuming that the UAV will decode the signal of the nearest user first then decode the signal of the far user using SIC. To achieve fair data rates for both users, then, Let g k,n (t) 2 = g N as the gain of the near user and g k, f (t) 2 = g F as the gain of the far user. Thus, the power allocation coefficients a N and a F of the near and the far users respectively can be derived as Let ρ = P max /σ 2 , then divide both sides by σ 2 where 0 < a N < 0.5 because a F > a N and a N + a F = 1.

Simulation Results
In this section, simulation is introduced to evaluate the proposed algorithm performance. Consider a single UAV covering a cell of radius R c = 1 km; assuming a suburban environment. An aerial UAV is centered and placed at the optimum height of the cell according to the values in Table 1. Consider IoT devices (N = 300) randomly deployed in the cell, IoT devices are supporting different applications, assuming there are 4 groups of IoT devices each has its unique traffic parameters. The maximum transmit power of each IoT device is 27 dBm and the minimum transmit power is 20 dBm. Unless stated, it is assumed that the system total available bandwidth B = 1.4 MHz consisting of 6 RBs. The noise power density σ 2 = −174 dBm/Hz. The main simulation parameters are summarized in Table 2.
To verify the efficiency of the proposed scheduler; the proposed algorithm is compared with the maximum CQI scheduling algorithm. According to [35], the best CQI algorithm shows its superiority in the achieved sum rate and spectral efficiency. The idea of the best CQI is based on scheduling the N_sel nodes which have the maximum CQI regardless of any other parameters.  Figure 5 shows the percentage of IoT devices that exceeds the delay limit, and as clearly seen the proposed algorithm outperforms the maximum CQI and the gap increases with the time, until it reaches a certain point at which the percentage of devices exceeding the delay limit saturates in both algorithms. This is due to its receiving large requests and scheduling N_sel nodes only in each TTI while rejecting the rest of nodes. The percentage of devices exceeding the delay tolerance saturates in the proposed algorithm to nearly 30% but around 44% in maximum CQI. The proposed algorithm gives priority to the nodes of the maximum buffer and least delay tolerance, resulting in 31.8% delay improvement. To verify the efficiency of the proposed scheduler; the proposed algorithm is compared with the maximum CQI scheduling algorithm. According to [35], the best CQI algorithm shows its superiority in the achieved sum rate and spectral efficiency. The idea of the best CQI is based on scheduling the N_sel nodes which have the maximum CQI regardless of any other parameters. Figure 5 shows the percentage of IoT devices that exceeds the delay limit, and as clearly seen the proposed algorithm outperforms the maximum CQI and the gap increases with the time, until it reaches a certain point at which the percentage of devices exceeding the delay limit saturates in both algorithms. This is due to its receiving large requests and scheduling N_sel nodes only in each TTI while rejecting the rest of nodes. The percentage of devices exceeding the delay tolerance saturates in the proposed algorithm to nearly 30% but around 44% in maximum CQI. The proposed algorithm gives priority to the nodes of the maximum buffer and least delay tolerance, resulting in 31.8% delay improvement. To evaluate the fairness of the proposed algorithm; the formula of Jain's fairness index in [8] is used, which is given by where represents the rate of user k and K is the total number of users. The fairness index values are confined between 0 and 1 such that the maximum value is achieved when the users have equal data rates. As obviously seen in Figure 6, the proposed algorithm is significantly fairer than the best CQI, since scheduling is performed sequentially from all groups, in addition to the fair power allocation algorithm used unlike the best CQI; re- To evaluate the fairness of the proposed algorithm; the formula of Jain's fairness index in [8] is used, which is given by where R k represents the rate of user k and K is the total number of users. The fairness index values are confined between 0 and 1 such that the maximum value is achieved when the users have equal data rates. As obviously seen in Figure 6, the proposed algorithm is significantly fairer than the best CQI, since scheduling is performed sequentially from all groups, in addition to the fair power allocation algorithm used unlike the best CQI; resulting in 50.8% fairness enhancement at 300 users. In Figure 7, the relationship between the transmitted power of the IoT devices and the sum rate is shown. As expected, the sum rate of the maximum CQI is greater than the proposed algorithm by only 1.6%; therefore, they still have a very close performance. By increasing the IoT device's maximum power, the sum rate is nearly the same and does not change; this is due to the slight increase in the device's maximum power that it does not affect the sum rate.  Figure 8 shows a comparison between the proposed algorithm and the best CQI in the achieved sum rate versus the number of users at different bandwidths; in case of 6, 10 and 25 resource blocks. They achieved nearly the same performance, which proves the In Figure 7, the relationship between the transmitted power of the IoT devices and the sum rate is shown. As expected, the sum rate of the maximum CQI is greater than the proposed algorithm by only 1.6%; therefore, they still have a very close performance. By increasing the IoT device's maximum power, the sum rate is nearly the same and does not change; this is due to the slight increase in the device's maximum power that it does not affect the sum rate. In Figure 7, the relationship between the transmitted power of the IoT devices and the sum rate is shown. As expected, the sum rate of the maximum CQI is greater than the proposed algorithm by only 1.6%; therefore, they still have a very close performance. By increasing the IoT device's maximum power, the sum rate is nearly the same and does not change; this is due to the slight increase in the device's maximum power that it does not affect the sum rate.    Figure 8 shows a comparison between the proposed algorithm and the best CQI in the achieved sum rate versus the number of users at different bandwidths; in case of 6, 10 and 25 resource blocks. They achieved nearly the same performance, which proves the superiority of the proposed algorithm. As the number of users increases, the sum rate increases to a certain saturation point after which the sum rate is almost constant due to scheduling the maximum number of users N max in every TTI achieving almost the same sum rate. It can be noticed that the sum rate in case of 25 RBs outperforms that in case of 6 RBs and 10 RBs, while it is the least in the case of 6 RBs. It is observed that the saturation point is shifted to the right as the number of RBs increases, meaning that as the number of RBs increases, the sum rate saturates at larger number of users. scheduling the maximum number of users Nmax in every TTI achieving almost the same sum rate. It can be noticed that the sum rate in case of 25 RBs outperforms that in case of 6 RBs and 10 RBs, while it is the least in the case of 6 RBs. It is observed that the saturation point is shifted to the right as the number of RBs increases, meaning that as the number of RBs increases, the sum rate saturates at larger number of users.  Figure 9 shows the achieved sum rate versus the bandwidth (number of RBs) with maximum 2 users allocated to the resource block. The spectral efficiency of the proposed algorithm is almost closer to that of the maximum CQI, which verifies the efficiency of the proposed algorithm in terms of spectral efficiency.
The results obtained in Figures 7-9, show the excellence of the proposed algorithm in terms of spectral efficiency and sum rate. This is because the proposed algorithm cannot exceed the best CQI which represents the upper bound in throughput and spectral efficiency. However, the proposed algorithm records a very close performance.  Figure 9 shows the achieved sum rate versus the bandwidth (number of RBs) with maximum 2 users allocated to the resource block. The spectral efficiency of the proposed algorithm is almost closer to that of the maximum CQI, which verifies the efficiency of the proposed algorithm in terms of spectral efficiency.
The results obtained in Figures 7-9, show the excellence of the proposed algorithm in terms of spectral efficiency and sum rate. This is because the proposed algorithm cannot exceed the best CQI which represents the upper bound in throughput and spectral efficiency. However, the proposed algorithm records a very close performance. Figure 10 shows the spectral efficiency versus the maximum power of the IoT devices comparing the performance of both the proposed resource allocation algorithm and the best CQI once using the proposed power allocation and once using distance-based power allocation. As can be clearly seen, the proposed power allocation outperforms the dis-tance=based power allocation. Moreover, as expected, the maximum CQI is superior in terms of spectral efficiency which is on average 41.2 bps/Hz followed by the proposed algorithm which achieves very close performance, nearly 40.5 bps/Hz and about 1.69% decrease only.
To evaluate the reliability of the algorithms, the relationship between the packet size and probability of decoding error is shown in Figure 11. As expected, as the packet size increases, the probability of error increases in both algorithms. However, the probability of error ε in the proposed algorithm is significantly lower than that of the max CQI, where at packet size = 1000 bits, ε is about 8.5 × 10 −11 and 4.2 × 10 −8 in the proposed algorithm and the max CQI respectively, resulting in nearly 99.7% performance improvement.  Figure 9 shows the achieved sum rate versus the bandwidth (number of RBs) with maximum 2 users allocated to the resource block. The spectral efficiency of the proposed algorithm is almost closer to that of the maximum CQI, which verifies the efficiency of the proposed algorithm in terms of spectral efficiency.
The results obtained in Figures 7-9, show the excellence of the proposed algorithm in terms of spectral efficiency and sum rate. This is because the proposed algorithm cannot exceed the best CQI which represents the upper bound in throughput and spectral efficiency. However, the proposed algorithm records a very close performance.  Figure 10 shows the spectral efficiency versus the maximum power of the IoT devices comparing the performance of both the proposed resource allocation algorithm and the best CQI once using the proposed power allocation and once using distance-based power allocation. As can be clearly seen, the proposed power allocation outperforms the dis-tance=based power allocation. Moreover, as expected, the maximum CQI is superior in terms of spectral efficiency which is on average 41.2 bps/Hz followed by the proposed algorithm which achieves very close performance, nearly 40.5 bps/Hz and about 1.69% decrease only. To evaluate the reliability of the algorithms, the relationship between the packet size and probability of decoding error is shown in Figure 11. As expected, as the packet size increases, the probability of error increases in both algorithms. However, the probability of error in the proposed algorithm is significantly lower than that of the max CQI, where at packet size = 1000 bits, is about 8.5 * 10 and 4.2 * 10 in the proposed algorithm and the max CQI respectively, resulting in nearly 99.7% performance improvement. The computational complexity of both the proposed algorithm and the best CQI is ( ) which means that they have linear complexity in the number of users and number of RBs. However, in [36], resource allocation for uplink multi carrier NOMA is developed using graph theory with complexity ( ). The shortest processing time (SPT) strategy is presented in [37] for uplink NOMA with complexity ( ). Thus, the proposed algorithm has a worthy complexity improvement.

Conclusions
In this paper, an uplink NOMA resource allocation algorithm is proposed for a UAV-IoT-based communication network serving a large number of IoT devices of different applications. The optimization problem is formulated under constraints with the objective to maximize the data rate and minimize the delay. The scheduler works in time domain to optimize the delay, and in frequency domain to optimize the data rate. The power allocation is used to ensure fair data rates between users allocated the same RB. The simulation results show that the proposed algorithm significantly enhances the system fairness, delay and reliability, in addition to achieving a spectral efficiency and sum rate that are nearly closer to the system upper bound.   The computational complexity of both the proposed algorithm and the best CQI is O(KN) which means that they have linear complexity in the number of users and number of RBs. However, in [36], resource allocation for uplink multi carrier NOMA is developed using graph theory with complexity O KN 3 . The shortest processing time (SPT) strategy is presented in [37] for uplink NOMA with complexity O N 2 . Thus, the proposed algorithm has a worthy complexity improvement.

Conclusions
In this paper, an uplink NOMA resource allocation algorithm is proposed for a UAV-IoT-based communication network serving a large number of IoT devices of different applications. The optimization problem is formulated under constraints with the objective to maximize the data rate and minimize the delay. The scheduler works in time domain to optimize the delay, and in frequency domain to optimize the data rate. The power allocation is used to ensure fair data rates between users allocated the same RB. The simulation results show that the proposed algorithm significantly enhances the system fairness, delay and reliability, in addition to achieving a spectral efficiency and sum rate that are nearly closer to the system upper bound.