Performance Analysis and Optimization for IoT Mobile Edge Computing Networks With RF Energy Harvesting and UAV Relaying

This paper studies unmanned aerial vehicle (UAV)-aided nonorthogonal multiple access (NOMA)-based mobile-edge computing (MEC) in Internet of Things (IoT) systems in which the uav acts as a relay (UR). Specifically, we consider a scenario with two clusters IoT devices (IDs) (i.e., a high-priority cluster IA and a low-priority cluster IB) with limited resources, so these IDs cannot compute their tasks and must offload them to a base station (BS) through a UR. We propose a protocol named time switching - radio frequency (RF) energy harvesting (EH) UR NOMA (TS-REUN), which is divided into 5 phases. By applying the TS-REUN protocol, the IDs in the two clusters and the UR harvest RF energy from the broadcast signal of the power beacons (PB). Then, the IDs offload their tasks to the MEC server located at the BS. After server processing, the IDs receive the calculation results from the BS via the UR. The effects of both imperfect channel state information (ICSI) and imperfect successive interference cancellation (ISIC) on the REUN-based mec (REUN-MEC) are taken into account. To evaluate the performance of the system, we derive closed-form expressions for the successful computation probability (SCP) and energy consumption probability (ECP) in the Nakagami- $\mathfrak {m}$ fading channel. Moreover, we propose an optimization problem formulation that maximizes the SCP by optimizing the position and the height of the UR and the time switching ratio (TSR). The problem was addressed by employing an algorithm based on particle swarm optimization (PSO). In addition, the Monte Carlo simulation results confirmed the accuracy of our analysis based on system performance simulations with various system parameters, such as the number of antennas at the BS, the number of IDs in each cluster, the TSR, and the position and the height of the UR.


I. INTRODUCTION
Recently, the Internet of Things (IoT) has enabled technology for smart homes, smart cities, and space information networks, and it has provided abundant devices connections and sensors with different applications [1]- [4]. As more devices and sensors are connected to the IoT, more data and informa-The associate editor coordinating the review of this manuscript and approving it for publication was Zhenbao Liu . tion needs to be processed and transmitted. Moreover, in the 5G network, many applications associated with local IDs can be computationally intensive and latency critical, e.g., realtime gaming, virtual reality, and autonomous cars [5]. However, the finite battery life and limited computation capacity of these devices present considerable challenges [6].
To address these challenges, mobile-edge computing (MEC) is a viable solution for addressing computationintensive and latency-critical applications on IDs with restricted resources [7]- [9]. According to the MEC paradigm, the IDs divide the computation workloads into pieces and offload some of them to the MEC servers in the edge network. Additionally, by implementing effective computation offloading mechanisms, the MEC technique can help to reduce the IDs' energy consumption and prolong the battery life [10].
However, the use of MEC is highly dependent on data transmission and computing operations from devices to servers. Transmitted signals may not be effectively received at all times due to the random positions of IDs. Low-power designs are frequently employed for most IDs, resulting in restricted transmission coverage. Since unmanned aerial vehicles (UAVs) are easy to deploy, have high degrees of mobility, and have low operating costs, they can be used to relay data from the IDs to the MEC servers [11]- [14]. Therefore, UAVs have emerged as an essential technology for establishing flexible MEC in IoT networks at any time and in any location [15]- [17]. To be more precise, ground IDs can transfer computing tasks to aerial UAVs. Additionally, they can send a portion of the task to a distant access point (AP) for computing via UR, reducing the energy consumption [15]. The work in [16] presented an optimal offloading system for UAV networks, in which ground ID tasks were forwarded to the MEC server via UR. The authors of [17] investigated the average ID latency by optimizing the UAV positioning, ID association, and time allocation, with the UAV acting as a MEC server as well as a relay.
Another challenging aspect of deploying the IoT is determining how to provide a sustainable and cost-effective energy supply to computationally heavy devices. By installing dedicated energy transmitters to broadcast energy wirelessly, RF signal-based wireless power transfer (WPT) presents a potential solution [18]. RF EH is more appealing than traditional EH approaches, such as solar or wind charging, since it can provide a regulated and stable power source [19]. As a result, the works in [20]- [22] integrated RF EH IDs into MEC systems, providing the IDs with long-term energy support for transmission and processing. The study in [20] examined a MEC system that included an RF EH ID. Similar to [20], the authors in [21] investigated a MEC system in which two IDs harvested energy from an AP-assisted MEC system. Furthermore, a MEC WPT system based on multiple IDs was described, in which an AP-assisted MEC system broadcasted wireless power to charge multiple IDs, and each ID used the harvested energy to perform computing tasks [22].
Moreover, NOMA has shown considerable promise in terms of increasing the network spectrum efficiency [23]- [25]. In contrast to standard orthogonal multiple access (OMA) networks, NOMA allows numerous users to share the same frequency/time resource by using varying power levels, and the receiver detects users with the successive interference cancellation (SIC) technique. To capitalize on the benefits of both NOMA and UAVs, NOMA has been introduced to enhance the performance of UAV-enabled networks and has generated considerable research interest [26]- [29]. NOMA can be applied to a variety of wireless scenarios, including ubiquitous coverage [26], UR NOMA [27], [28], and information dissemination and data collection [29]. Additionally, combining NOMA and MEC systems to improve the offloading performance has recently been studied [30]- [32]. The work in [30] investigated two types of NOMA-based offloading scenarios. In [31], a NOMA-based MEC system with two ID clusters connected via a multiantenna AP was studied. Multiple IDs offload tasks to UAVs via an uplink NOMA [32].
Based on the abovementioned issues, there is much work that considers UAV-assisted NOMA-based MEC (i.e., a UAV acting as a BS-assisted MEC server; that is, the UAV consumes more energy for computation and flights, so the time for the UAV to communicate information is limited). Moreover, the problem of EH in the MEC system focuses only on the IDs and ignores the problem of EH in the UAVs. Motivated by the above issues, UR and NOMA-based MEC systems in the IoT were studied in this paper, with the UR supporting the forwarding of tasks from two cluster IDs to a BS. Moreover, we considered that the UR and IDs harvested RF energy from a PB [33] to improve the data offloading process. In addition, we considered UR that communications via Line-of-Sight (LoS) 1 and non-Line of Sight (NLoS) links, as well as the Nakagami-m fading channel. 2 Furthermore, we investigated the performance of UR NOMA-based MEC systems in practical cases, such as ICSI at receiver nodes and ISIC [34]. The detailed contributions of this paper are summarized as follows: • We investigated RF EH UR NOMA-based MEC (REUN-MEC) in IoT systems. Moreover, we considered the ICSI and ISIC to achieve realistic evaluations of the UR NOMA-based MEC in practical applications. Accordingly, we proposed a system protocol that ensured an efficient offloading process.
• We analyzed the system performance in terms of successful computation probability (SCP) by deriving its closed-form expression for the best ID in cluster IA (BIA) and best ID in cluster IB (BIB). Moreover, the energy consumption probability (ECP) is presented to evaluate the energy consumed during the offloading process from the IDs to the BSs. We also derived the ECP closed-form expressions for the BIA and BIB.
• We formulated an SCP maximization problem by optimizing the position and the height of the UR and TSR. The problem was solved by an algorithm based on PSO. The remainder of this paper is organized as follows. In Section II, the related work on NOMA-based MEC, URassisted MEC, and UR NOMA-based MEC are presented. In Section III, the system model, communication protocol, 1 The presence of LoS links between UAVs and ground IDs is a distinguishing feature of UAV communication, allowing for reduced small-scale fading and the possibility of increased network performance [11], [14]. 2 Nakagami-m fading is a generalized fading model for practical communication scenarios (m < 1 for Hoyt, m = 1 for Rayleigh, and m > 1 for Rician) [13], [31]. VOLUME 10, 2022 time offloading and energy consumption are introduced. In Section IV, the SCP, ECP, and SCP maximization problems are analyzed. In Section V, the numerical results are presented and discussed. Finally, the conclusions and future work are presented in Section VI.

II. RELATED WORK
In this paper, we consider a flexible MEC network architecture that incorporates both UR and NOMA. Before we introduce our proposed scheme, a review of some related work is presented.

A. NOMA-BASED MEC
Recently, NOMA, a viable solution to multiuser access, has attracted the interest of many researchers. When NOMA is applied to MEC, the system performance can be considerably improved. For example, Kiani and Ansari [35] presented an edge computing aware NOMA technique that utilizes the benefits of uplink NOMA to reduce the energy consumption of MEC users. They developed a NOMA-based optimization system that reduced MEC users' energy usage by optimizing user clustering, processing, communication resource allocation, and transmit power.
Truong el at. [31] proposed a NOMA-based MEC combination protocol, in which the AP was equipped with multiple antennas and each cluster used sensor node selection to choose a cluster head to participate in the communication process. They used SCP's closed-form precise expressions to evaluate the system's performance while considering the latency and energy consumption constraints. To overcome an ID's limited energy problem and increase the NOMAbased MEC system's performance, Shi el at. [36] proposed a scheme for maximizing the system computational energy efficiency of a WPT-enabled NOMA-based MEC system by jointly optimizing the MEC server and the IDs' computing frequencies and execution times, the offloading times, the EH times, the transmit power of each ID, and the transmit power of the power beacons (PB). The works discussed in [31] and [36] all consider models with ground devices. Based on these works, researchers can extend the models with UAVs.

B. UR-ASSISTED MEC
Embedding UAVs in MEC systems has recently gained popularity since it increases the flexibility of edge server deployment. When terrestrial infrastructures are crippled or insufficient for satisfying demand, the function of UAVs as relays becomes more important. The new setup of using a UAV for computing in MEC systems provides new opportunities for handling communication and computation design difficulties, and various relevant works have focused on this purpose [15], [37]. Hu et al. [15] investigated a UAV-assisted MEC system in which a UAV acts as a computing service to aid an ID in completing their tasks or aids a UR for offloading its computation chores to the AP. This approach reduced the total energy consumption of the UR and IDs within specific practical restrictions by iteratively optimizing computation resource scheduling and bandwidth allocation using an alternating approach. Additionally, the suggested algorithm outperformed and was more stable than baseline approaches.
Zhang et al. [37] investigated a new UAV-assisted MEC system in which the UAV assists in the computation of latency-critical task bits offloaded by IDs. In addition, the UAV was able to operate as a relay to aid in offloading bits from the IDs to the AP. They introduced a new optimization problem formulation, with the goal of minimizing the total energy consumption, including communication-related energy, computation-related energy, and UAV-flying energy, by optimizing bit allocation, time slot scheduling, and power allocation. The problem was solved by the Lagrangian duality method and a successive convex approximation technique.
The approaches in [15] and [37] have one thing in common: they both used UR to assist MEC. Therefore, the UR's energy consumption is very high, reducing the time required to sustain information communication in the system. In addition, the authors exclusively concerned with LoS communication for the UR. Furthermore, to promote offloading for multiple IDs. However, the approach in [37] did not apply the NOMA technique to improve offloading performance.

C. UR NOMA-BASED MEC
There is still a lack of research on this topic; therefore, combining UR and NOMA-based MEC systems to improve offloading performance was studied in [38]. F. Guo et al. presented a UAV-assisted MEC system in which the UAV functions as a relay between the IDs and BS. In addition, NOMA was used to improve the spectrum efficiency. The authors constructed the problem of minimizing the overall latency of all IDs, which was subsequently solved using sequential convex approximation techniques. This study employed NOMA to improve the offloading performance for a large number of IDs. However, the issue of LoS between the UR and the ground equipment was neglected. Furthermore, the issue of EH for the IDs was not taken into account to further improve the offloading performance.
Based on the above review, MEC systems that incorporate both UR and NOMA techniques have not been studied extensively in recent works. Thus, in this paper, we investigated a UR NOMA-based MEC system in which UAV and IDs harvest RF energy from the PBs. In addition, we considered UR communication via LoS and NLoS links. Furthermore, we investigated the performance of the UR NOMA-based MEC system in practical cases, such as ICSI at receiver nodes and ISIC. To the best of our knowledge, this work is the first to investigate an REUN-MEC system with ICSI and ISIC. Moreover, we propose a new metric named ECP to evaluate the performance of the system.

III. SYSTEM MODEL AND COMMUNICATION PROTOCOL A. SYSTEM MODEL
As illustrated in Fig. 1, we present a NOMA-based MEC system in an IoT network that consists of a UAV U deployed  as a decode-and-forward (DF) relay [14] that helps IDs in two clusters (i.e., cluster IA has M high-priority IDs, denoted by I m , and cluster IB has N low-priority IDs, denoted by I n ) in transmitting tasks to a BS B, where cluster IA has a larger power allocation ratio than cluster IB [39] and B is equipped with MEC functionality for computations. Furthermore, U and IDs can harvest energy from the power beacon P. The half-duplex mode is used by all nodes [40]. We suppose that B has K antennas while U and the IDs have a single antenna. There are no direct links between B and IDs due to the presence of obstacles in the urban environment. For clarity, we define the notations adopted throughout the remainder of this paper in Table 1.
Without loss of generality, we utilized a three-dimensional Cartesian coordinate system, as shown Fig. 2, where B, P and I i , i ∈ {m, n}, are on the ground at positions B (x B , y B , h B ), P (x P , y P , h P ) and I i (x i , y i , 0), respectively. U is fixed at a height of h U ≤ h max U [41], and its position is U (x U , y U , h U ). We used the path-loss model in [42], which considers the LoS and NLoS of the P → {U , I i } and U → {B, I i } channels, to accurately capture the propagation conditions in the REUN-MEC system. The expressions for the LoS and NLoS links are given as [14] L where ab ∈ {UB, I m U , I n U , PI m , PI n , PU } and the distance between a → b is defined as 2 . K LoS and K NLoS are environment and frequency dependent parameters, where c is the speed of light, f c is the carrier frequency, σ is the path-loss exponent, and ζ LoS and ζ NLoS are the excessive path losses of LoS and NLoS propagation, respectively.
The probabilities of having LoS links and NLoS links at an elevation angle of θ (in degrees) are as follows [11]: where θ ab = 180 π arcsin h U d ab and ω 1 and ω 2 are parameters that depend on the environment (rural, urban, or dense urban) [43]. Then, the mean path loss considering the probabilities of both LoS and NLoS links from a to b can be formulated as [11] The maximum supportable latency of the REUN-MEC system is assumed to be T seconds. During time αT , the power beacon P broadcasts RF energy to UR and IDs in the two clusters. Assume that IDs all perform the same task of length L (bits) and are divided into different groups [31]. Then, the capacity offload of I i can be expressed as follows: where β i is the offloading ratio and β i (0 ≤ β i ≤ 1). I i is unable to complete its tasks due to a lack of computing ability and energy. As a result, I i offloaded its tasks to the MEC server, which has superior energy and computation abilities. However, due to obstacles in the surrounding environment, I i is unable to directly offload its tasks to B. Therefore, I i simultaneously offloads its tasks to UR using uplink NOMA at t , and UR forwards those tasks Following that, during t com B , all offloaded tasks are computed at the corresponding B (see Section III.B). Finally, B performs task downloading for I m and I n via UR at t down .
We assume that the channel coefficient g ab experiences an independently and identically distributed Nakagami-m fading channel with a fading parameter m ab and a mean value λ ab = E |g ab | 2 , where E{.} is the expectation operator. Additionally, additive white Gaussian noise (AWGN) with zero mean and variance N 0 exists in all of the links [44]. In practice, the perfect channel state information (PCSI) is difficult to achieve in wireless systems due to channel estimation errors or feedback delays. Thus, the channel coefficient can be represented as [13] g ab =ĝ ab + ε ab , g ab represents the estimated channel coefficient and ε ab is the channel estimation error, which follows a complex Gaussian distribution denoted by ε ab ∼ CN (0, E ab ). It should be noted that the parameter E ab indicates the quality of the channel estimation. In this paper, the channel estimation error variance E ab was assumed to be constant [45], [46]. Clusters IA and IB consist of a set of IDs that are distributed near one another and perform similar tasks. Furthermore, using the best ID strategy reduces energy consumption, saves communication bandwidth and improves the scalability of the IoT [31]. Thus, one should select the best ID that participates in the communication process to help the channel achieve the highest instantaneous signal-to-noise ratio (SNR).
Prior to transmission, the IDs concurrently transmit pilot signals [47] to UR. U estimates the SNRs of all transmission channels from the two clusters and then selects BIA, denoted as I m * , and BIB, denoted as I n * , as the signals with the greatest received SNRs at the selected UAV terminal. Therefore, the indices and channel power gains of the selected IDs in clusters M and N are as follows [13]: Next, UR sends its pilot signal to K antennas at B simultaneously. Once the SNRs of all U to B k channels have been estimated, U selects the best antenna, which is denoted by the symbol B k * and is the antenna with the highest received SNR at U . Thus, the indices and channel power gain of the selected antenna B k * out of K antennae can be represented as follows [14]: Because the channel gains follow the Nakagami-m distribution, we constrained the fading parameter m to take integer values, and we assumed that the value of m was the same for all links. Accordingly, the cumulative distribution function (CDF) and probability density function (PDF) of the channel power gain ĝ Y * 2 , Y * ∈ (i * , k * ) are given as follows [13]:

B. COMMUNICATION PROTOCOL
In this subsection, we present the communication protocol for the proposed system. Fig. 3 depicts the time flow chart of the protocol. The communication protocol is detailed as follows.
In the first phase t eh , the IDs in the two clusters and UR harvest energy 3 from the broadcast signal of P B at time αT . Here, we use fixed-gain EHs at I i and U , i.e., λ PI i = E g PI i 2 and λ PU = E |g PU | 2 , as in [33]. Hence, the harvested energies at I i and U can be expressed as follows: where P P is the transmit power of P and η is the EH efficiency coefficient, which depends on the rectification (0 < η < 1). Here, we assumed that η was the same for all URs and IDs [40].
In the second phase, t off i * , I m * and I n * simultaneously offload C off m and C off n bit tasks to U . Based on (14), the transmit power of I i * is as follows: Then, UR receives information signals from both IDs. The composite received signal at U is as follows: where g i * =ĝ i * + ε i * ; x m and x n are the transmitted signals at BIA and BIB, respectively, and n U ∼ CN (0, N 0 ) is AWGN. Because a DF transmission scheme is employed at UAV, U must first decode both x m and x n before forwarding. According to the principle of uplink NOMA, the information signal with the highest level strength is decoded first, and then the signals with comparatively lower strength are decoded. Without loss of generality, we assume that the estimated channel gain between UR and the two best IDs are ordered as |g m * | 2 > |g n * | 2 . Thus, U first decodes x m by treating the signal corresponding to x n as interference. After successfully decoding x m , U decodes x n by applying the SIC principle to cancel the known x m value. The signal-to-interference-plusnoise ratio (SINR) at U is used to decode x m in the presence of ICSI [13] and is given by where Y = ĝ m * 2 , Z = ĝ n * 2 , , a 1 = γ m * L n * , According to the SIC principle, x n is decoded by removing x m from γ U ,m * ; if the SIC is perfect, then x m will be completely removed. Otherwise, the decoding of x n will be carried out in the presence of residual interference due to ISIC. Thus, 3 Note that we assume a simplistic harvesting model and are oblivious to the EH circuit's possible nonlinear behavior [48], [49]. the SINR in the presence of ICSI and ISIC [34] at U when decoding x n is given by where ξ 1 represents the residual interference due to ISIC, 0 ≤ ξ 1 ≤ 1, and ξ 1 = 0 refers to the perfect SIC (PSIC).
In the third phase t off U , after decoding x m and x n , U reencodes them by retransmitting the superimposed message x U = √ ρx m + √ 1 − ρx n and forwarding it to B k * , where ρ denotes the power allocation coefficient, which depends on the rectification of ρ ∈ (0.5, 1]. Therefore, the observed signal at B k * can be expressed as where g B * =ĝ k * + ε k * , n B is AWGN and the transmit power at U is expressed as Thus, the SINRs for detecting x m and x n transmitted from U at B are as follows: where , and ξ 2 represents the residual interference due to ISIC, 0 ≤ ξ 2 ≤ 1.
In the fourth phase t com B , the tasks that were offloaded are computed at B. Therefore, the time required to complete the total number of task bits at B can be expressed as [31] t com where ς is the number of CPU cycles required to compute one input bit and f MEC is the operating frequency of the MEC at B.
In the fifth phase t down B , B returns the computation result to I i * via U . It should be noted that the latency and energy consumption for returning the results from B to U and from U to the IDs are omitted because the size of the returned results is much smaller than the size of the offloaded data [37], [50], [51].

C. TOTAL LATENCY OFFLOAD AND ENERGY CONSUMPTION
In this section, we present the system's channel capacity, the total time for offloading a task from I i * to B, and the total energy consumed by the offloading task. Because UR uses the DF scheme, the end-to-end SINR at i * can be written as

VOLUME 10, 2022
According to Shannon's theorem, the instantaneous channel capacity of the I i * → B link can be formulated as follows: where W is the bandwidth. Hence, the latency offload and energy consumption from I i * to B via U can be expressed as where E off i * = γ i * t off s,i * is the energy consumption for offloading the tasks of I i * , and E off U = γ U t off s,i * is the energy consumption for the forwarding transmission of U . Thus, the total latency and total energy consumption for computational offloading from I i * to B can be expressed as where E com is the energy consumed to compute the tasks at B and P B is the power required to compute one input bit at B. The UR energy consumption while flying should also be taken into account. We only consider the UR energy consumption when ascending and descending from a certain altitude, hovering, and moving in a straight line. Thus, the total UR energy consumed while ascending to a desired altitude h max U from an initial ground position and hovering for time T can be calculated as follows [43], [52]: where P climb U is the maximum power of the motor, v climb U is the velocity of the UR, ψ represents the minimum power needed to hover just above the ground, and µ denotes the motor speed multiplier.

IV. PERFORMANCE ANALYSIS
In this section, we derive closed-form expressions for SCP and ECP in the investigated REUN-MEC system under Nakagami-m fading while taking ICSI and ISIC into account. In the first subsection, a performance analysis for SCP is presented, while ECP is considered in the second subsection. Finally, in the third subsection, we discuss SCP optimization for each ID and the whole system.

A. SUCCESSFUL COMPUTATION PROBABILITY ANALYSIS
In this subsection, we define SCP as the probability that BIA and BIB successfully compute all L tasks within the time delay of the system T th . Here, SCP is the probability that the total communication time in phases 2 and 3 and the computing time in phase 4 are less than T th . Thus, SCP is calculated as follows [31], [53]: where T th = (1 − α)T and T th = T th − t com B .

Proposition 1: Under Nakagami-m fading, the closed-form expression of the SCP of BIA for this considered REUN-MEC system is given by
where , υ 1 = m +l, and υ 2 = υ 1 + t.

Proof: See Appendix A. Proposition 2: Under Nakagami-m fading, the closedform expression of the SCP of BIB for this considered REUN-MEC system is given by
, and n * is defined as follows: where To ensure that BIA and BIB are treated equally, we used the total communication and computation times of the largest ID as the system computation time, which included the total communication and computation times of the remaining ID. Thus, the SCP value of the system can be calculated as

B. ENERGY CONSUMPTION PROBABILITY ANALYSIS
In this subsection, we calculate the amount of energy used by BIA, BIB, and UR during task offloading. The energy consumption during the offloading process needs to be considered because the UR and IDs are energy constrained. Therefore, the approaches in [15] and [37] were proposed for the optimization problems related to the minimum total energy consumption for the offloading processes of the UR and IDs.
The problems were solved by the Lagrangian duality method. Unlike the previous work, we found that the total energy consumption was instantaneous during the offloading process and was an random variable (RV); i.e., it was dependent on the channel coefficient expressed in equation (30). Thus, we constructed a total energy consumption problem for the process of offloading the probability problem. We proposed a new metric named the energy consumption probability (ECP), which is denoted by ECP and is calculated as follows: where E th is the energy threshold required by IDs and UR for the offloading processes of I i * → U and U → B, and

Proposition 4: Under Nakagami-m fading, the closed-form expression of the ECP of BIA for this considered REUN-MEC system is given by
and m * is defined as follows: where a 1 , and φ 6 = m l+1 The proof is similar to that of Proposition 1.

Proposition 5: Under Nakagami-m fading, the closed-form expression of the ECP of BIB for this considered REUN-MEC system is given by
, and n * is defined as follows: where ϑ 3 = ψ n * ξ 1 a 1 a 2 , ϑ 4 = ψ n * a 3 a 2 , and φ 7 = m l+1 The proof is similar to that of Proposition 2.

C. OPTIMIZATION: PROBLEM FORMULATION AND SOLUTION
To improve the system performance, we focused on improving the computation performance of the system (including the offloading time, forwarding time, and computation time) [31], [53]. Thus, we attempted to maximize the SCP in (33), (35), and (38) by determining the optimal position and height of the UR, which are denoted by x * U , y * U , h * U , and the TSR, which is denoted by α * . Therefore, the SCP maximization (SCPM) problem can be expressed as where the condition on the UR position under the ground is represented by constraints (45a) and (45b). The height of UR is described by constraint (45c). In addition, the TSR is described by constraint (45d).

VOLUME 10, 2022
We propose an SCPM algorithm based on PSO [54], [55], also known as SCPM-PSO, to solve the problem in (45a) with multiple constraints. PSO is a metaheuristic optimization technique inspired by natural life behaviors, such as bird flocking and fish schooling. Specifically, using group information, each component of the group adjusts its behavior, i.e., its position and velocity. The operation of the SCPM-PSO algorithm is described in detail in Algorithm 1.
The algorithm starts by randomly initializing p = [1, . . . , N ] particles with constraints (45a), (45b), (45c), and (45d), where N is the total number of particles. Each individual particle has a current position X p = (x U , y U , h U , α), a current velocity V p , a local best position X * p , and a global best position G * that corresponds to the position where particle p has the highest value, as determined by the maximization problem's objective function SCP. To efficiently implement the SCPM-PSO algorithm, we used the false computation probability (FCP), denoted by F, as the objective function. FCP is the complement of SCP, and it is defined as the probability that the IDs will be unable to compute their tasks within a time delay of T th . Thus, the formula describing the FCP of the REUN-MEC system can be expressed as follows: where SCP ∈ {SCP i * , SCP s }. To find the particle with the best X * p and G * , the main loop of the SCPM-PSO algorithm is executed I times. The particle updates its velocity V p and position X p during each iteration, then updates its two extreme values X * p and G * . Specifically, the velocity and position of each element are updated using the following formulas [54]: where q = [1, . . . , I]; χ = is the constriction coefficient with = 1 + 2 ; r 1 and r 2 are random numbers following a uniform distribution that ranges from 0 to 1; and 1 = χ 1 and 2 = χ 2 are two acceleration coefficients.
The computational complexity of the SCPM-PSO algorithm was determined by the number of iterations I, the total number of particles N and the position for each particle X . Thus, the worst-case complexity of the SCPM-PSO algorithm was given by O (IN X ). In other words, the stopping condition was the maximum number of evolution rounds. Thus, in the worst-case scenario, our algorithm ran to the end of the round. It is worth noting that when compared to other metaheuristic algorithms, such as the ant colony algorithm, the genetic algorithm, and the artificial bee colony algorithm, the PSO algorithm was simpler and took less time to execute [56]. for q ← 1 : N do 8: Random solution 10: Evaluate the fitness value of X p using (46) 11: Personal best 13: if C * p < G * then 14: G * ← C * p ; Global best 15: end if 16: end for Main loop of SCPM-PSO 17: for q ← 1 : I do 18: for p ← 1 : N do 19: Update the velocity 20: X p ← (48); Update the position 21: C p ← F X p ; 22: if C p < C * p then Update the personal best 23: X * p ← X p ; 24: C * p ← C p ; 25: if C * p < G then Update the global best 26: G * ← C * p ; 27: end if 28: end if 29: end for 30: end for 31: In this section, we present simulation results that validate the SCP and ECP of the REUN-MEC system with ICSI and ISIC in the Nakagami-m fading channels. In particular, we investigated the effects of the average transmitted SNR, TSR, the number of antennas at B, and the number of IDs in each cluster. Specifically, the parameters required during the simulation and analysis are shown in Table 2 [14], [43], [52], [56]. Fig. 4 depicts the impact of the average transmitted SNR γ P and the number of IDs in two clusters, M and N , on SCP and ECP. The results show that increasing the number of IDs improves the system performance. This is because the best ID is determined based on the channel conditions, and increasing  the number of IDs provides a wider range of choices for the best ID, thus improving the wireless transmission; hence, the transmission latency and energy consumption are reduced. In addition, we also observe that increasing the transmit power at P increases SCP. By increasing the transmit power at the power beacon, the IDs can gather more energy and utilize this energy throughout the offloading process. However, as γ P increases from 10 (dB) to 20 (dB), the SCP saturates. Therefore, we can select the output power to save power at P while also ensuring the efficiency of EH and improving the system performance. In contrast to SCP, a smaller ECP value results in higher energy consumption. Because the IDs harvest energy and utilize it for offloading, the higher the γ P value is, the more energy is consumed. Furthermore, the SCPs and ECPs of BIA are better than those of BIB because cluster IA has a higher priority than cluster IB. In other words, IA has a larger power allocation factor than cluster IB. Fig. 5 depicts the impact of the average transmitted SNR γ P and the number of antennas K on SCP and ECP. The results demonstrate that increasing the number of B antennas improves the system performance. This is similar to the cases of increasing M and N studied above. In other words, the greater the number of antennas, the more likely it is that the system will identify the  most appropriate antenna to participate in the communication process from U to B, thereby increasing the probability of a successful computation while simultaneously decreasing the probability of high energy consumption. In addition, increasing the transmit power at P increases the SCP value and decreases the ECP value. Increasing the power at P allows U to capture more energy, resulting in U having a large transmission power and a rapid offloading time but a higher energy consumption. Fig. 6 depicts the impact of the average transmitted SNR γ P and ICSI-ISIC (E; ξ ) on SCP and ECP. In this figure, we compared SCPs and ECPs in two cases: PCSI-PSIC, where (E; ξ ) = (0; 0), and ICSI-ISIC, where (E; ξ ) = (1; 0.3) and (E; ξ ) = (2; 0.5). As shown in the figure, (E; ξ ) = (0; 0) was optimal for system performance. However, in practice, this ideal instance is difficult to achieve with wireless communication. As a result, we were interested in the ICSI-ISIC case for the system under investigation. It is clear that the ICSI-ISIC case is detrimental to SCP and ECP as E and ξ increase. In this case, it can be easily observed that  increasing E and ξ decreases the SINR required to decode the x m and x n signals at U and B, hence reducing the SCP and ECP values. Fig. 7 depicts the impact of the TSR α on SCP and ECP. For the SCPs, when the value of α was small, there was less time for EH and more time for offloading. Thus, less energy was harvested, and the offloading time was greater. In contrast, when the value of α was larger, there was more time for EH but less time for offloading. It is desirable to find a value for α (i.e., α * ) that allows the considered system to achieve the best performance. For the ECPs, as α increased, ECP decreased. Because α increased, the longer the EH time was, the greater the energy consumed during the offloading process.
The effect of the height of UR h U on SCP and ECP is depicted in Fig. 8. There appears to be an optimal h U value that maximizes the SCP and ECP values. This is because the LoS and NLoS probabilities change as the UR height changes; when the UR height is small, the probability of LoS is low, while the probability of NLoS is high. This results in a limited line of sight between UR and the ground devices because of numerous barriers. Conversely, the larger the UR   height, the greater the propability of LoS and the lower the probability of NLoS. Hence, the LoS probability between UR and the ground devices is enhanced; however, the higher the altitude is, the larger the distance between UR and the ground devices, resulting in substantial transmission loss. Therefore, there is a height h * U at which the SCP and ECP values are the greatest. Fig. 9 shows the effects of the height of UR h U and TSR α on SCP. To demonstrate the simultaneous impact of the height of UR and TSR on SCP, we combined Fig. 7 and 8 and then ran a 3D simulation. There are always optimal h * U and α * values for maximizing the SCPs. By applying our proposed algorithm, h * U and α * have the values shown in Table 3. Additionally, in Figs. 10, 11, and 12, we used 3D simulations to examine the simultaneous influence of the UR position and height on SCP n * , SCP m * , and SCP s , respectively. The results revealed that there were always x * U , y * U , and h * U values  that maximized the SCPs. However, based on the closed-form equations obtained earlier, calculating this optimal value is rather challenging. As a result, we used the SCPM-PSO algorithm to simultaneously identify the optimal values for SCP n * , SCP m * , and SCP s , such as (x * U , y * U , h * U , α * ), which maximizes SCP n * , SCP m * , and SCP s . Table 3 summarizes the results for SCP n * , SCP m * , and SCP s . On the basis of these results, we can observe that the position and height of UR differ for the SCP values that need to be optimized, whereas α * does not differ significantly because it depends on both UR and the two cluster IDs; i.e., UR and the two clusters IDs have the same EH time. We may either utilize the optimal coefficients, which depend on the priority of each ID, or SCP s to ensure that the IDs are treated fairly.

VI. CONCLUSION
In this paper, we investigated a UR NOMA-based MEC system in the IoT under a Nakagami-m fading channel that considered IDs in two clusters and in which UR harvested RF energy from the PB. Closed-form expressions for the SCPs and ECPs for offloading the tasks of BIA and BIB with respect to ICSI and ISIC were derived to evaluate the system performance. The results show that the system performance improved as the number of antennas at BS and the number of IDs increased. Moreover, we observed that increasing the transmit power at PB reduced the time required for the offloading process, but the energy consumption increased. In addition, we proposed an algorithm based on PSO for determining the position and height of UR and TSR to maximize the SCP. In future work, we will obtain the closed form of the ECP expression for the whole system. Furthermore, we will consider issues related to sensitive and nonlinear EH models [48], joint maximum likelihood (ML) decoding [57], maximal ratio combining (MRC) [31], secure transmission with caching and intelligent reflecting surface (IRS) for UR NOMA-based MEC systems.
The integrals in (51) can be solved with formulas 3.351.3 from [58]. Thus, the proof of Proposition 1 is completed. VOLUME 10, 2022