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

**Rana Karem 1,2,\*, Mehaseb Ahmed <sup>1</sup> and Fatma Newagy <sup>2</sup>**


**Abstract:** 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).

**Keywords:** internet of things; non-orthogonal multiple access; resource allocation; ultra reliable low latency communication; unmanned aerial vehicles; uplink transmission

## **1. 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 can face the challenging requirements of high throughput and low latency accompanied

**Citation:** Karem, R.; Ahmed, M.; Newagy, F. Resource Allocation in Uplink NOMA-IoT Based UAV for URLLC Applications. *Sensors* **2022**, *22*, 1566. https://doi.org/10.3390/ s22041566

Academic Editor: Margot Deruyck

Received: 9 January 2022 Accepted: 15 February 2022 Published: 17 February 2022

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

with the traffic of IoT devices. The basic concept of NOMA lies in the ability of NOMA to serve numerous users simultaneously over the same resource block (RB) to increase the spectrum efficiency [8]. However, due to simultaneous transmission, interference occurs between users sharing the same RB, so that successive interference cancellation (SIC) is used to detect the signal [9]. The exploitation of UAVs combined with NOMA is used to support the required massive connections of IoT devices and also provide long transmission range for IoT devices with limited transmission power capabilities. UAVs can easily overpass the IoT nodes, collect the information data and then transmit them to the data center or the other IoT devices [4]. IoT is accommodating numerous various applications with extremely precise performance requirements. Delay is one of the essential key metrics and one of the biggest challenges facing IoT applications [10]. In this paper, the UAV as a base station was exploited with NOMA to support URLLC IoT network with devices of different applications; each application has its own traffic parameters and delay requirements. A resource and power allocation scheme was proposed to manage the different QoS requirements for each application in uplink networks achieving high spectral efficiency, fairness and data rate as well as improving the delay and reliability.

The main contributions of this research are listed as follows:


#### **2. 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.

#### **3. 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 *Rc*. The UAV is located at 3D coordinates (*xUAV*, *yUAV*, *hUAV*); assume that (*xUAV* = 0, *yUAV* = 0, *hUAV*); i.e., the UAV is at the center of the cell with altitude *hUAV*; such that (*hmin* ≤ *hUAV* ≤ *hmax*) where *hmin* and *hmax* 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<sup>i</sup>* , *y<sup>i</sup>* ) where *i* = {1, 2, . . . , *N*}. Each IoT device has a packet arrival rate *λ<sup>i</sup>* and transmits minimum rate *R<sup>i</sup>* with delay limit *D<sup>i</sup>* . Each IoT device has a transmitted power *P<sup>i</sup>* (*Pmin,i* ≤ *P<sup>i</sup>* ≤ *Pmax,i*) where *Pmin,i* and *Pmax,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

$$PL\_i = \frac{A}{1 + ae^{-b\ (\theta\_i - a)}} + B\_{i\prime} \tag{1}$$

$$A = \eta\_{\text{LOS}} - \eta\_{\text{NLOS}}.\tag{2}$$

$$B\_i = 20\log\_{10}(d\_i) + 20\log\_{10}\left(\frac{4\pi f\_c}{c}\right) + \eta\_{NLOS\_{\prime}}\tag{3}$$

where *f<sup>c</sup>* 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. *PrLoS<sup>i</sup>* , *PrNLoS<sup>i</sup>* 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] 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]

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,

*Sensors* **2022**, *22*, x FOR PEER REVIEW 4 of 17

$$\text{Time} = \text{conv number} + \text{new} + \text{volume} \times \text{volume} \times \text{acceleration} \times \text{(25)}$$

$$Pr\_{LoS\_i} = \frac{1}{1 + a \exp(-b[\theta\_i - a])} \text{ \,\, \text{(4)}$$

$$\text{Pr}\_{\text{NLoS}\_l} = 1 - \text{Pr}\_{\text{LoS}\_l} \tag{5}$$

where *θ<sup>i</sup>* is the elevation angle (measured in "degree") between IoT device *i* and the *UAV* as illustrated in Figure 1; it can be calculated as as illustrated in Figure 1; it can be calculated as ℎ

$$\theta\_i = \frac{180}{\pi} \sin^{-1} \left(\frac{h\_{LAV}}{d\_i}\right) \tag{6}$$

*di* is the distance between the IoT device *i* at (*x<sup>i</sup>* , *y<sup>i</sup>* ) and the *UAV* located at (*xUAV*, *yUAV*, *hUAV*) is *(*, *,*ℎ*)* is

$$d\_i = \sqrt{(\mathbf{x}\_{ULV} - \mathbf{x}\_i)^2 + (y\_{ULV} - y\_i)^2 + (h\_{ULV})^2} \tag{7}$$

**Figure 1.** Illustration of the elevation angle in case of static UAV [21]. **Figure 1.** Illustration of the elevation angle in case of static UAV [21].

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 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

$$\Gamma\_{k,i}(t) = \frac{b\_{k,i}(t)p\_{k,i}(t) \left| \mathbf{g}\_{k,i}(t) \right|^2}{\sum\_{f=1,\ |\mathcal{R}\_{k,f}(t)|^2 < |\mathcal{R}\_{k,i}(t)|^2} b\_{k,f}(t) p\_{k,f}(t) \left| \mathbf{g}\_{k,f}(t) \right|^2 + \sigma^2},\tag{8}$$

సభ,ቚೖ,()ቚమ ಬቚೖ,()ቚమ ,() is the channel gain between the *UAV* and IoT device *i* on subcarrier *k*. ,() *gk*,*i*(*t*) is the channel gain between the *UAV* and IoT device *i* on subcarrier *k*. *gk*,*i*(*t*) which is invariant in one time slot but varies over different time slots, can be modeled as:

$$\mathbf{g}\_{k,i}(\mathbf{t}) = \sqrt{PL\_{k,i}} h\_{k,i}(\mathbf{t}) \,\tag{9}$$

modeled as

where *hk*,*i*(*t*) is the small scale fading of complex Gaussian distribution given by *hk*,*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 pacity, 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 ,() = logଶ ቀ1+,()ቁ <sup>−</sup> <sup>ඨ</sup>, ିଵ() (10)

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 ca-

$$R\_{k,l}(t) = \log\_2(1 + \Gamma\_{k,l}(t)) - \sqrt{\frac{V\_{k,l}}{m}} \ Q^{-1}(\varepsilon) \tag{10}$$

,() = ඥ,ℎ,()*,* (9)

∼

(14)

where, the decoding error probability *ε* [24] is given by = ൭ln 2ට ቀlogଶ(1+) <sup>−</sup>

The sum rate can be calculated as

*Sensors* **2022**, *22*, x FOR PEER REVIEW 5 of 17

$$
\varepsilon = Q \left( \ln 2 \sqrt{\frac{m}{V}} \left( \log\_2 \left( 1 + \Gamma \right) - \frac{D}{m} \right) \right),
\tag{11}
$$

$$
\text{Such that the O function and } V \text{ are defined accordingly as}
$$

Such that the *Q* function and *V* are defined respectively as √2 න ି௧<sup>మ</sup> ଶ ௫ (12)

$$Q(\mathbf{x}) = \frac{1}{\sqrt{2\pi}} \int\_{\mathbf{x}}^{\infty} e^{\frac{-\overline{x}^2}{2}} \, dt \tag{12}$$

ቁ൱, (11)

$$V\_{k,i} = 1 - \left(1 + \Gamma\_{k,i}\right)^{-2} \tag{13}$$

where *D* states the packet size, and *m* represents the blocklength of the channel. The sum rate can be calculated as ௦௨ = ,(), ே ୀଵ 

ୀଵ

$$R\_{sum} = \sum\_{k=1}^{K} \sum\_{i=1}^{N} R\_{k,i}(t),\tag{14}$$

Assume that packet arrival of the IoT device *i* follows a Poisson process with the average arrival rate as *λ<sup>i</sup>* packets per second. The average service rate of the same IoT device is assumed to be *µ<sup>i</sup>* packets per second. Both *λ<sup>i</sup>* and *µ<sup>i</sup>* are statistically identical and independent distributed. The queuing system model of the IoT device is shown in Figure 2. Then, the average delay *dav*,*<sup>i</sup>* , which is based on the *M/M/1* queuing model [25], can be given by the following formula: 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: ௩, <sup>=</sup> ௩, − (15)

$$d\_{av,i} = \frac{S\_i}{R\_{av,i} - S\_l \lambda\_i} \tag{15}$$

where *S<sup>i</sup>* and *Rav*,*<sup>i</sup>* are the packet size and the average rate of IoT device *i* respectively.

**Figure 2.** Queuing system model of the IoT device [26]. **Figure 2.** Queuing system model of the IoT device [26].

௩, can be given as the rate of device *i* averaged over time as follows: *Rav*,*<sup>i</sup>* can be given as the rate of device *i* averaged over time as follows:

$$R\_{av,i} = \frac{1}{T} \sum\_{t=1}^{T\_{slots}} \sum\_{k=1}^{K} R\_{k,i}(t) b\_{k,i}(t) \,\prime \tag{16}$$

where ௦௧௦ represents the total number of time slots. where *Tslots* represents the total number of time slots.

#### **4. 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 *bk*,*<sup>i</sup>* at every time slot. Hence, the resource allocation problem is formulated with data rate maximization objective function as follows:

$$\underset{\{b\_{k,i}(t)\}}{\text{Max}} \sum\_{k=1}^{K} \sum\_{i=1}^{N} \mathbb{R}\_{k,i}(t) \tag{17}$$

$$\text{s.t.} \,\text{C1}: \sum\_{k=1}^{K} b\_{k,i}(t)\mathbb{R}\_{k,i}(t) \ge \text{R}\_{\text{min},i} \tag{18}$$

$$\text{C2}: \sum\_{k=1}^{K} b\_{k,i}(t) p\_{k,i}(t) \le P\_{\text{max}} \tag{19}$$

$$\mathcal{C} \mathbf{3} \colon b\_{k,i}(t) \in \{0, 1\} \tag{20}$$

$$\text{C4} : \sum\_{k=1}^{K} b\_{k,i}(t) p\_{k,i}(t) \ge 0 \tag{21}$$

$$\text{C5}: \sum\_{i=1}^{N} b\_{k,i}(t) \le L \tag{22}$$

$$\mathbb{C}\mathfrak{G}: d\_{av,i} < D\_i \tag{23}$$

$$\text{C7}: h\_{\text{min}} < h\_{\text{ULAV}} < h\_{\text{max}} \tag{24}$$

where *Pmax* is the maximum available transmission power of the IoT device. *C*1 is the minimum required data rate for all users to ensure QoS. *C*2 means that any IoT device transmit power cannot exceed *Pmax*. *C*3 and *C*4 are the constraints of the assignment matrix *bk,i* and power *pk,i*. *C*5 mentions that one subcarrier cannot be allocated to more than *L* users at the same time. *C*6 is the delay constraint, states that the average delay of the device *i* (*dav*,*<sup>i</sup>* ) should not exceed the delay limit requirement *D<sup>i</sup>* . *C*7 is the UAV height constraint between the minimum and maximum allowable altitudes.

The optimization problem is non-convex due to the coupled variables *bk*,*<sup>i</sup>* and *pk*,*<sup>i</sup>* in (20) and (21). Hence, the proposed algorithm uses a linear weighted utility function to overcome the complexity of the optimization problem (17).

#### **5. Proposed Algorithm**

The optimization problem is non-convex due to the coupled variables *bk*,*<sup>i</sup>* and *pk*,*<sup>i</sup>* 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).

*Sensors* **2022**, *22*, x FOR PEER REVIEW 7 of 17

**Figure 3.** General NOMA resource allocation. **Figure 3.** General NOMA resource allocation. **Figure 3.** General NOMA resource allocation.

**Figure 4.** Illustration of the proposed scheduler. **Figure 4.** Illustration of the proposed scheduler. **Figure 4.** Illustration of the proposed scheduler.

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 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 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 *hoptimum* to cover a cell of radius *R<sup>c</sup>* can be given by

$$\theta\_{\text{optimum}} = \tan^{-1} \left( \frac{h\_{\text{optimum}}}{R\_{\text{c}}} \right) \tag{25}$$

ℎ௧௨ 

൰ (25)

**Table 1.** Values of optimal elevation angle of each environment.


௧௨ = ିଵ ൬

#### High-rise urban 75.52° Urban 42.44° *5.1. Time Domain Packet Scheduling (TDPS)*

*5.1. Time Domain Packet Scheduling (TDPS)* 

*5.1. Time Domain Packet Scheduling (TDPS)*  Dense urban 54.62° High-rise urban 75.52° 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 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

uled 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

for time domain scheduling can be formulated using (15) as

maximum delay limits by minimizing the average delay. Hence, the optimization problem for time domain scheduling can be formulated using (15) as

$$\min d\_{av,i} = \frac{\mathbb{S}\_i}{R\_{av,i} - \mathbb{S}\_i \lambda\_i} \,\,\,\tag{26}$$

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:

$$M\_{\rm i} = \alpha\_{\rm j} \, w\_{\rm i,j} d\_{a\rm v,i} \tag{27}$$

where *α<sup>j</sup>* states the priority of each traffic group, where the TDPS categorizes stations according to their delay limits into *j* groups, and *wi*,*<sup>j</sup>* is the traffic weight of user *i* in traffic class *j*, this weight can be calculated as

$$w\_{i,j} = \frac{q\_{i,j}}{bl},\tag{28}$$

where *qi*,*<sup>j</sup>* 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 *Nmax* = *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.

#### *5.2. 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

$$\underset{\{b\_{k,l}(t)\}}{\text{Max}} \sum\_{k=1}^{K} \sum\_{l=1}^{N\_{-}} \text{s}\_{k,l}(t) \tag{29}$$

$$\text{s.t.} \,\text{C1}: \sum\_{k=1}^{K} b\_{k,l}(t) R\_{k,l}(t) \; \ge \, R\_{\text{min},l} \tag{30}$$

*C*3 : *bk*,*l*(*t*) ∈ {0, 1} (31)

$$\text{C5}: \sum\_{l=1}^{N\_{\text{sle}}} b\_{k,l}(t) \le L \tag{32}$$

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 *CQIi*,*<sup>k</sup>* 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

*fobj* = *Diag*(*M*1*xN*\_*sel* ) *CQIN*\_*sel xK* (33)

where *M*1*xN*\_*sel* is a row vector of the metrics of the selected devices and *CQIN*\_*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

$$\underset{\{b\_{k,l}(t)\}}{\text{Max}} - \text{Diag}\left(M\_{1\text{xN}\_{\text{sl}}}\right) \\ \mathbb{C}Q I\_{N\_{\text{sl}}\ge \text{K}} b\_{k,l}(t) \tag{34}$$

$$s.t \text{ C3}: b\_{k,l}(t) \in \{0, 1\} \tag{35}$$

$$\text{C5}: \sum\_{l=1}^{N\_\text{-sel}} b\_{k,l}(t) \le L \tag{36}$$

The problem in (34) can be solved using binary integer programming which is used to solve the constrained problem to maximize *fobj* The algorithm (Algorithm 1) to find the optimum allocation matrix is listed in detail as shown in the pseudo code.


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).

#### *5.3. 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 *gk*,*<sup>n</sup>* > *gk*, *<sup>f</sup>* then according to (8) the SNIR of near and far users respectively are given as

$$\Gamma\_{k,n}(t) = \frac{p\_{k,n}(t) \left| g\_{k,n}(t) \right|^2}{p\_{k,f}(t) \left| g\_{k,f}(t) \right|^2 + \sigma^2} \tag{37}$$

$$\Gamma\_{k,f}(t) = \frac{p\_{k,f}(t) \left| \mathcal{g}\_{k,f}(t) \right|^2}{\sigma^2},\tag{38}$$

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,

$$\frac{p\_{k,n}(t)|\mathcal{g}\_{k,n}(t)|^2}{p\_{k,f}(t)\left|\mathcal{g}\_{k,f}(t)\right|^2+\sigma^2} \xrightarrow{p\_{k,f}(t)\left|\mathcal{g}\_{k,f}(t)\right|^2} \tag{39}$$

Let *gk*,*n*(*t*) <sup>2</sup> <sup>=</sup> *<sup>g</sup><sup>N</sup>* as the gain of the near user and *<sup>g</sup>k*, *<sup>f</sup>*(*t*) 2 = *g<sup>F</sup>* as the gain of the far user. Thus, the power allocation coefficients *a<sup>N</sup>* and *a<sup>F</sup>* of the near and the far users respectively can be derived as

$$\frac{a\_N P\_{\max} g\_N}{a\_F P g\_F + \sigma^2} = \frac{a\_F P\_{\max} g\_F}{\sigma^2} \,\,\,\,\tag{40}$$

Let *ρ* = *Pmax*/*σ* 2 , then divide both sides by *σ* 2

$$\frac{a\_N \rho g\_N}{a\_F \rho g\_F + 1} = \frac{a\_F \rho g\_F}{1},\tag{41}$$

$$(g\_F^2 \rho^2 a\_F^2 + (g\_F + g\_N)\rho a\_F - \rho g\_N = 0\tag{42}$$

$$a\_F = \frac{-(\mathcal{g}\_N + \mathcal{g}\_F) \pm \sqrt{(\mathcal{g}\_N + \mathcal{g}\_F)^2 + 4\rho \mathcal{g}\_F^2 \mathcal{g}\_N}}{2\mathcal{g}\_F^2 \rho} \tag{43}$$

where 0 < *a<sup>N</sup>* < 0.5 because *a<sup>F</sup>* > *a<sup>N</sup>* and *a<sup>N</sup>* + *a<sup>F</sup>* = 1.

#### **6. Simulation Results**

In this section, simulation is introduced to evaluate the proposed algorithm performance. Consider a single UAV covering a cell of radius *R<sup>c</sup>* = 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 *σ* <sup>2</sup> <sup>=</sup> <sup>−</sup>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.


*Sensors* **2022**, *22*, x FOR PEER REVIEW 11 of 17

**Table 2.** Simulation parameters. ௫ IoT device maximum power 500 mW–27 dBm

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. 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.

clearly seen the proposed algorithm outperforms the maximum CQI and the gap increases

**Figure 5.** Percentage of devices exceeding the application delay limit at each time slot. **Figure 5.** Percentage of devices exceeding the application delay limit at each time slot.

To evaluate the fairness of the proposed algorithm; the formula of Jain's fairness index in [8] is used, which is given by 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

$$\text{Jain's failures index} = \frac{\left(\sum\_{k=1}^{K} R\_k\right)^2}{K \sum\_{k=1}^{K} R\_k^2} \tag{44}$$

(44)

sulting in 50.8% fairness enhancement at 300 users.

where *R<sup>k</sup>* 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. *Sensors* **2022**, *22*, x FOR PEER REVIEW 12 of 17 *Sensors* **2022**, *22*, x FOR PEER REVIEW 12 of 17

**Figure 6.** Fairness index versus number of users. **Figure 6.** Fairness index versus number of users. **Figure 6.** Fairness index versus number of 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. 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.

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

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

Figure 8 shows a comparison between the proposed algorithm and the best CQI in

**Figure 7.** Sum rate versus the power of the IoT devices. **Figure 7.** Sum rate versus the power of the IoT devices. **Figure 7.** Sum rate versus the power of the IoT devices.

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 *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. *Sensors* **2022**, *22*, x FOR PEER REVIEW 13 of 17 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 8.** Sum rate versus number of users. **Figure 8.** Sum rate versus 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. 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. 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 distance=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

*Sensors* **2022**, *22*, x FOR PEER REVIEW 13 of 17

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

packet size = 1000 bits, *<sup>ε</sup>* is about 8.5 <sup>×</sup> <sup>10</sup>−<sup>11</sup> and 4.2 <sup>×</sup> <sup>10</sup>−<sup>8</sup> in the proposed algorithm and the max CQI respectively, resulting in nearly 99.7% performance improvement. 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

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

**Figure 9.** Sum rate versus the number of RBs. decrease only.

**Figure 8.** Sum rate versus number of users.

proposed algorithm in terms of spectral efficiency.

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 improve-

**Figure 10.** Spectral efficiency versus the power of the IoT devices. **Figure 10.** Spectral efficiency versus the power of the IoT devices.

ment.

**Figure 11.** Decoding error probability versus the packet size. **Figure 11.** Decoding error probability versus the packet size.

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. 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*<sup>3</sup> . The shortest processing time (SPT) strategy is presented in [37] for uplink NOMA with complexity *O N*<sup>2</sup> . Thus, the proposed algorithm has a worthy complexity improvement.

#### **7. Conclusions**

**7. 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 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.

**Author Contributions:** Conceptualization, R.K., M.A. and F.N.; methodology, R.K. and M.A.; software, R.K.; validation, R.K., M.A. and F.N.; formal analysis, R.K. ; writing—original draft preparation, R.K.; writing—review and editing, R.K. and M.A.; visualization, M.A.; supervision, M.A. and **Author Contributions:** Conceptualization, R.K., M.A. and F.N.; methodology, R.K. and M.A.; software, R.K.; validation, R.K., M.A. and F.N.; formal analysis, R.K.; writing—original draft preparation, R.K.; writing—review and editing, R.K. and M.A.; visualization, M.A.; supervision, M.A. and F.N. All authors have read and agreed to the published version of the manuscript.

F.N.; All authors have read and agreed to the published version of the manuscript. **Funding:** This research received no external funding.

**Funding:** This research received no external funding. **Institutional Review Board Statement:** Not applicable.

**Institutional Review Board Statement:** Not applicable. **Informed Consent Statement:** Not applicable.

are nearly closer to the system upper bound.

**Informed Consent Statement:** Not applicable. **Data Availability Statement:** Not applicable.

**Data Availability Statement:** Not applicable. **Conflicts of Interest:** The authors declare no conflict of interest. **Conflicts of Interest:** The authors declare no conflict of interest.

## **References**

