# Dynamic Task Offloading for NOMA-Enabled Mobile Edge Computing with Heterogeneous Networks

Authors: Kaixin Li; Jiajie Xu; Hua Xing; Ying Chen; Jiwei Huang
Journal: Security and Communication Networks
 (2022)

---

## Abstract

With the rapid development of the Internet of Things (IoT), more and more computation-intensive tasks are generated by IoT devices. Due to their own limitations, IoT devices cannot process all tasks locally, and some tasks need to be offloaded to edge servers for processing. In addition, nonorthogonal multiple access (NOMA) technology allows multiple IoT devices to share the same frequency resource. IoT devices can use NOMA technology to transmit data to increase the data transmission rate. In this article, we study the problem of NOMA-enabled dynamic task offloading in heterogeneous networks. We formulate a stochastic optimization problem to minimize system energy consumption. Using stochastic optimization techniques, we transform this problem into a deterministic optimization problem and decompose it into five sub-problems to solve. At the same time, we propose a NOMA-enabled dynamic task offloading (NDTO) algorithm. Then, we mathematically analyze the performance of the NDTO algorithm. We conduct a series of parameter analysis experiments and comparative experiments, and the results verify the performance of the NDTO algorithm.


---

## Body

## 1. Introduction

In recent years, with the rapid development of Internet of Things (IoT) technology, various IoT devices have appeared in people’s lives [1, 2]. At the same time, more and more computation-intensive applications are emerging, such as virtual reality. These computation-intensive applications generate a large number of computation-intensive tasks as they work. However, due to the limited computing resources and battery capacity of IoT devices, these computation-intensive tasks cannot be fully handled [3–5]. To cope with this situation, mobile cloud computing (MCC) came into being [6–8]. However, offloading tasks to cloud computing centers for processing will introduce significant delays [9–11]. The emergence of mobile edge computing (MEC) provides a new solution [12–14]. At the same time, in order to cope with the problem of data traffic explosion brought by the increasing number of IoT devices, a two-layer heterogeneous small cell network (SCN) is proposed [15]. The SCN is usually composed of macro base station (MBS) and small base station (SBS). Both the MBS and the SBS are generally deployed with an MEC server for providing services. SCN can expand network coverage and further improve user experience quality. Therefore, SCN will play an important role in the future [16].With the rapid increase of IoT devices and various computation-intensive applications, the traditional orthogonal multiple access (OMA) technology can no longer meet the increasing communication demands. Non-orthogonal multiple access (NOMA) technology is a promising technology that can alleviate the problem of scarcity of spectrum resources [17–19]. NOMA uses power multiplexing technology that allows multiple devices to share the same spectrum resources. Thus, NOMA can greatly improve the resource utilization efficiency of the wireless access network [20, 21].Since both the computing resources of IoT devices and the computing resources that MEC can provide are limited, it is challenging to design a suitable task offloading scheme to maximize the use of available computing resources [22–24]. First, the generation and arrival of tasks are dynamic. Second, the quality of the wireless channel is time-varying. Whether the wireless channel state is good or bad will have a great impact on task offloading. At the same time, the statistics of these factors are difficult to predict. Therefore, it is urgent to design a task offloading scheme that can dynamically adapt to changes in wireless channels and task arrivals.In this article, we study the NOMA-enabled dynamic task offloading problem in MEC. We work to minimize the long-term average energy consumption of the system. Meanwhile, we design a NOMA-enabled dynamic task offloading (NDTO) algorithm using stochastic optimization techniques. Moreover, we evaluate the performance of the NDTO algorithm through a series of experiments. Our contributions are as follows:(1)
We study the problem of dynamic task offloading for SBSs and devices based on NOMA. Both SBSs and MBS are deployed with MEC servers. IoT devices can offload tasks to SBS for processing through NOMA technology. At the same time, the SBS can also offload the collected tasks to the MBS for processing. Our goal is to minimize the long-term average energy consumption of the system.(2)
Since task arrival and channel state are time-varying. Therefore, we transform the above problem into a deterministic optimization problem using stochastic optimization techniques. Then, we decompose it into multiple sub-problems to solve. Meanwhile, we design the NDTO algorithm to solve this problem.(3)
We verify the effectiveness of the NDTO algorithm through parameter analysis and comparative experiments. Experimental results demonstrate the effectiveness of the NDTO algorithm in minimizing system energy consumption and maintaining task queue stability.The remainder of this article is as follows. In Section2, we present the system model and problem formulation. A NOMA-enabled dynamic task offloading algorithm is proposed in Section 3. In Section 4, we analyze the NDTO algorithm mathematically. In Section 5, we experimentally verify the performance of the NDTO algorithm. In Section 6, we discuss related works. In Section 7, we conclude this study.


## 2. System Model and Problem Formulation

### 2.1. System Model

In this study, we consider a system with one MBS and multiple SBSs. Each SBS is deployed with an MEC server to serve IoT devices. In this work, IoT devices can offload tasks to SBS for processing. In our model, there areS SBSs, which are defined as S=1,2,…,s,…,S. Each SBS has a fixed service area, and the service areas of any two SBSs do not overlap. Among them, there are Ns IoT devices located in the service area of SBS s, which is represented as Ns=1,2,…,i,…,Ns. For the convenience of description, we denote the IoT device i within the service area of SBS s as Us,i. We consider a discrete slot model denoted as T=0,1,…,T−1. At the same time, t∈T, and the length of each slot is τ. The main symbols are listed in Table 1.Table 1
Notations.
SymbolDescriptionSThe set of SBSsNsA set of IoT devices within the service area of SBSs.τThe length of time slotPs,itThe transmit power ofUs,ihs,itThe channel power gain of IoT deviceUs,ifs,iltThe CPU cycle frequency of the IoT deviceUs,igstThe channel power gain of SBSsPstThe transmit power of SBSsRs,itThe data offloading rate of IoT deviceUs,iAs,itThe amount of tasks generated by IoT deviceUs,iDs,iltThe amount of tasks processed locally by IoT deviceUs,iDs,iotThe amount of offloaded tasks for IoT deviceUs,iμs,iltThe amount of tasks from the IoT deviceUs,i processed locally by SBS sμs,iotThe amount of tasks from the IoT deviceUs,i that SBS s offloads to the MBSQs,iltThe task backlog of the local computing queue of IoT deviceUs,iQs,iotThe task backlog of the local offloading queue of IoT deviceUs,iHs,itThe task queue backlog that IoT deviceUs,i offloads to SBS sUs,iThe IoT devicei within the service area of SBS s


### 2.2. Task and Communication Model

In this study, each IoT device maintains two task queues, namely the local computing queue and the local offloading queue. The tasks in the local computing queue are processed locally by IoT devices. The tasks in the local offloading queue are offloaded to the SBS for processing. In each time slot, the size of the task generated by the IoT deviceUs,i is denoted as As,it. Is,it is an offload decision, indicating whether newly arrived tasks are placed on the local computing queue or the local offloading queue. When Is,it=0, the newly arrived task is placed in the local computing queue, otherwise, it is placed in the local offloading queue.IoT devices communicate with SBS via NOMA wireless network.hs,it represents the channel gain from the IoT device Us,i to the SBS s. We assume that the channel gain of IoT devices within the SBS’s service area is in nonincreasing order, i.e., hs,1t≥hs,2t≥⋯≥hs,it≥⋯≥hs,Nst. Using the SIC technique, the signal is iteratively decoded in order of the IoT device’s channel gain [25]. Therefore, we can get the signal-to-noise ratio when the IoT device Us,i communicates with the SBS s as follows:(1)γs,it=Ps,iths,it2∑j=i+1NsPs,jths,jt2+σ2,where Ps,it represents the transmit power of the IoT device Us,i and σ2 represents the channel noise power.Therefore, the achievable data transmission rate when the IoT deviceUs,i communicates with the SBS s is expressed as follows:(2)Rs,it=Bslog21+γs,it,where Bs represents the channel bandwidth allocated by SBS s to IoT devices.Orthogonal frequency division multiple access technology is used when SBS communicates with MBS.gst represents the channel gain when the SBS s communicates with the MBS. Pst represents the transmit power of the SBS s. Therefore, we can get the achievable data transmission rate when the SBS s communicates with the MBS as follows:(3)Rst=Bmlog21+Pstgstσ2,where Bm represents the channel bandwidth allocated by MBS to SBSs.


### 2.3. Queuing Model

Each IoT device maintains a local computing queue and a local offloading queue. The number of CPU cycles consumed by the IoT deviceUs,i to process 1 bit of data is φs,i. The amount of tasks processed locally by the IoT device in the time slot t is denoted as Ds,ilt, and the specific calculation method is as follows:(4)Ds,ilt=fs,iltτφs,i,where fs,ilt represents the CPU cycle frequency of the IoT device Us,i.We define the maximum CPU cycle frequency of the IoT deviceUs,i as fs,il,max. Thus, we can get:(5)fs,ilt≤fs,il,max.We useQs,ilt to denote the task backlog of the local computing queue of IoT device Us,i. Then, the evolution of Qs,ilt can be obtained as follows:(6)Qs,ilt+1=maxQs,ilt−Ds,ilt,0+1−Is,itAs,it.The amount of tasks offloaded by IoT deviceUs,i in time slot t is denoted as Ds,iot. Because the data transmission rate of IoT devices has an upper limit, the amount of offloaded tasks should satisfy:(7)Ds,iot≤Rs,itτ.We defineQs,iot as the task backlog of the local offloading queue of IoT device Us,i. Then, we give the evolution of Qs,iot as follows:(8)Qs,iot+1=maxQs,iot−Ds,iot,0+Is,itAs,it.Each SBS maintains a task queue for each IoT device in its service area to store tasks offloaded from IoT devices. In each time slot, the amount of tasks from the IoT deviceUs,i processed locally by the SBS is μs,ilt. Then, μs,iot represents the amount of tasks from the IoT device Us,i that the SBS offloads to the MBS.We defineHs,it to represent the task queue backlog that IoT device Us,i offloads to SBS s. Then, the evolution of Hs,it is as follows:(9)Hs,it+1=maxHs,it−μs,ilt−μs,iot,0+Ds,iot.


### 2.4. Energy Consumption Model

For each IoT device, its energy consumption includes two parts, namely local computing energy consumption and local offloading energy consumption. We know that the local computing energy consumption of an IoT device is closely related to its CPU frequency [26]. We denote the energy consumption of IoT device Us,i locally calculated in time slot t as Es,ilt, as follows:(10)Es,ilt=ξs,ifs,il2tφs,iDs,ilt,where ξs,i denotes the effective switched capacitance of the CPU.The offloading energy consumption of IoT devices is closely related to its transmit power. The energy consumption generated by IoT deviceUs,i offloading tasks to SBS s in time slot t is denoted by:(11)Es,iot=Ps,itDs,iotRs,it.In each time slot, the energy consumption generated by SBS includes two parts, one part is computing energy consumption, and the other part is offloading energy consumption. During time slott, the energy consumption generated by the tasks from the IoT device Us,i processed by the SBS s is denoted as:(12)Cs,ilt=l1μs,ilt,where l1 denotes the energy consumption coefficient of the MEC server in SBS s [27].Then, the energy consumption generated by SBSs offloading tasks to MBS is denoted as:(13)Cs,iot=Pstμs,iotRst.All tasks offloaded by SBS will be handled by MBS. We set the energy consumption generated by the MBS to process the tasks from the IoT device U offloaded by the SBSs as:(14)Cs,iMt=l2μs,iot,where l2 is the energy consumption coefficient of MBS.Therefore, in a time slott, the total energy consumption generated by the system is as follows:(15)Et=∑s=1S∑i=1NsEs,ilt+Es,iot+Cs,ilt+Cs,iot+Cs,iMt.


### 2.5. Problem Formulation

Within each slot, we make a decision to determine whether newly arrived tasks should be executed locally or offloaded to the SBS for processing. Our goal is to minimize the long-term average energy consumption of the system, as follows:(16)minIt,flt,Dot,μlt,μotE¯=limT⟶∞∑t=0T−1EEtTs.t.C1:Is,it∈0,1,C2:0≤fs,ilt≤fs,il,max,C3:0≤Ds,iot≤Rs,itτ,C4:Ds,iot≤Qs,iot,C5:0≤∑i=1Nsμs,ilt≤fs,ietτφe,∀s∈S,C6:0≤μs,iot≤Rstτ,∀s∈S.There are certain challenges to solving this problem. First, the generation and arrival of tasks are random. Second, the wireless channel state is also constantly changing. Therefore, next, we use stochastic optimization techniques to solve this problem.


## 2.1. System Model

In this study, we consider a system with one MBS and multiple SBSs. Each SBS is deployed with an MEC server to serve IoT devices. In this work, IoT devices can offload tasks to SBS for processing. In our model, there areS SBSs, which are defined as S=1,2,…,s,…,S. Each SBS has a fixed service area, and the service areas of any two SBSs do not overlap. Among them, there are Ns IoT devices located in the service area of SBS s, which is represented as Ns=1,2,…,i,…,Ns. For the convenience of description, we denote the IoT device i within the service area of SBS s as Us,i. We consider a discrete slot model denoted as T=0,1,…,T−1. At the same time, t∈T, and the length of each slot is τ. The main symbols are listed in Table 1.Table 1
Notations.
SymbolDescriptionSThe set of SBSsNsA set of IoT devices within the service area of SBSs.τThe length of time slotPs,itThe transmit power ofUs,ihs,itThe channel power gain of IoT deviceUs,ifs,iltThe CPU cycle frequency of the IoT deviceUs,igstThe channel power gain of SBSsPstThe transmit power of SBSsRs,itThe data offloading rate of IoT deviceUs,iAs,itThe amount of tasks generated by IoT deviceUs,iDs,iltThe amount of tasks processed locally by IoT deviceUs,iDs,iotThe amount of offloaded tasks for IoT deviceUs,iμs,iltThe amount of tasks from the IoT deviceUs,i processed locally by SBS sμs,iotThe amount of tasks from the IoT deviceUs,i that SBS s offloads to the MBSQs,iltThe task backlog of the local computing queue of IoT deviceUs,iQs,iotThe task backlog of the local offloading queue of IoT deviceUs,iHs,itThe task queue backlog that IoT deviceUs,i offloads to SBS sUs,iThe IoT devicei within the service area of SBS s


## 2.2. Task and Communication Model

In this study, each IoT device maintains two task queues, namely the local computing queue and the local offloading queue. The tasks in the local computing queue are processed locally by IoT devices. The tasks in the local offloading queue are offloaded to the SBS for processing. In each time slot, the size of the task generated by the IoT deviceUs,i is denoted as As,it. Is,it is an offload decision, indicating whether newly arrived tasks are placed on the local computing queue or the local offloading queue. When Is,it=0, the newly arrived task is placed in the local computing queue, otherwise, it is placed in the local offloading queue.IoT devices communicate with SBS via NOMA wireless network.hs,it represents the channel gain from the IoT device Us,i to the SBS s. We assume that the channel gain of IoT devices within the SBS’s service area is in nonincreasing order, i.e., hs,1t≥hs,2t≥⋯≥hs,it≥⋯≥hs,Nst. Using the SIC technique, the signal is iteratively decoded in order of the IoT device’s channel gain [25]. Therefore, we can get the signal-to-noise ratio when the IoT device Us,i communicates with the SBS s as follows:(1)γs,it=Ps,iths,it2∑j=i+1NsPs,jths,jt2+σ2,where Ps,it represents the transmit power of the IoT device Us,i and σ2 represents the channel noise power.Therefore, the achievable data transmission rate when the IoT deviceUs,i communicates with the SBS s is expressed as follows:(2)Rs,it=Bslog21+γs,it,where Bs represents the channel bandwidth allocated by SBS s to IoT devices.Orthogonal frequency division multiple access technology is used when SBS communicates with MBS.gst represents the channel gain when the SBS s communicates with the MBS. Pst represents the transmit power of the SBS s. Therefore, we can get the achievable data transmission rate when the SBS s communicates with the MBS as follows:(3)Rst=Bmlog21+Pstgstσ2,where Bm represents the channel bandwidth allocated by MBS to SBSs.


## 2.3. Queuing Model

Each IoT device maintains a local computing queue and a local offloading queue. The number of CPU cycles consumed by the IoT deviceUs,i to process 1 bit of data is φs,i. The amount of tasks processed locally by the IoT device in the time slot t is denoted as Ds,ilt, and the specific calculation method is as follows:(4)Ds,ilt=fs,iltτφs,i,where fs,ilt represents the CPU cycle frequency of the IoT device Us,i.We define the maximum CPU cycle frequency of the IoT deviceUs,i as fs,il,max. Thus, we can get:(5)fs,ilt≤fs,il,max.We useQs,ilt to denote the task backlog of the local computing queue of IoT device Us,i. Then, the evolution of Qs,ilt can be obtained as follows:(6)Qs,ilt+1=maxQs,ilt−Ds,ilt,0+1−Is,itAs,it.The amount of tasks offloaded by IoT deviceUs,i in time slot t is denoted as Ds,iot. Because the data transmission rate of IoT devices has an upper limit, the amount of offloaded tasks should satisfy:(7)Ds,iot≤Rs,itτ.We defineQs,iot as the task backlog of the local offloading queue of IoT device Us,i. Then, we give the evolution of Qs,iot as follows:(8)Qs,iot+1=maxQs,iot−Ds,iot,0+Is,itAs,it.Each SBS maintains a task queue for each IoT device in its service area to store tasks offloaded from IoT devices. In each time slot, the amount of tasks from the IoT deviceUs,i processed locally by the SBS is μs,ilt. Then, μs,iot represents the amount of tasks from the IoT device Us,i that the SBS offloads to the MBS.We defineHs,it to represent the task queue backlog that IoT device Us,i offloads to SBS s. Then, the evolution of Hs,it is as follows:(9)Hs,it+1=maxHs,it−μs,ilt−μs,iot,0+Ds,iot.


## 2.4. Energy Consumption Model

For each IoT device, its energy consumption includes two parts, namely local computing energy consumption and local offloading energy consumption. We know that the local computing energy consumption of an IoT device is closely related to its CPU frequency [26]. We denote the energy consumption of IoT device Us,i locally calculated in time slot t as Es,ilt, as follows:(10)Es,ilt=ξs,ifs,il2tφs,iDs,ilt,where ξs,i denotes the effective switched capacitance of the CPU.The offloading energy consumption of IoT devices is closely related to its transmit power. The energy consumption generated by IoT deviceUs,i offloading tasks to SBS s in time slot t is denoted by:(11)Es,iot=Ps,itDs,iotRs,it.In each time slot, the energy consumption generated by SBS includes two parts, one part is computing energy consumption, and the other part is offloading energy consumption. During time slott, the energy consumption generated by the tasks from the IoT device Us,i processed by the SBS s is denoted as:(12)Cs,ilt=l1μs,ilt,where l1 denotes the energy consumption coefficient of the MEC server in SBS s [27].Then, the energy consumption generated by SBSs offloading tasks to MBS is denoted as:(13)Cs,iot=Pstμs,iotRst.All tasks offloaded by SBS will be handled by MBS. We set the energy consumption generated by the MBS to process the tasks from the IoT device U offloaded by the SBSs as:(14)Cs,iMt=l2μs,iot,where l2 is the energy consumption coefficient of MBS.Therefore, in a time slott, the total energy consumption generated by the system is as follows:(15)Et=∑s=1S∑i=1NsEs,ilt+Es,iot+Cs,ilt+Cs,iot+Cs,iMt.


## 2.5. Problem Formulation

Within each slot, we make a decision to determine whether newly arrived tasks should be executed locally or offloaded to the SBS for processing. Our goal is to minimize the long-term average energy consumption of the system, as follows:(16)minIt,flt,Dot,μlt,μotE¯=limT⟶∞∑t=0T−1EEtTs.t.C1:Is,it∈0,1,C2:0≤fs,ilt≤fs,il,max,C3:0≤Ds,iot≤Rs,itτ,C4:Ds,iot≤Qs,iot,C5:0≤∑i=1Nsμs,ilt≤fs,ietτφe,∀s∈S,C6:0≤μs,iot≤Rstτ,∀s∈S.There are certain challenges to solving this problem. First, the generation and arrival of tasks are random. Second, the wireless channel state is also constantly changing. Therefore, next, we use stochastic optimization techniques to solve this problem.


## 3. NOMA-Enabled Dynamic Task Offloading Algorithm Design

In this section, we introduce stochastic optimization techniques to solve problem (16). Using stochastic optimization techniques, we design a NOMA-enabled Dynamic Task Offloading (NDTO) algorithm [28]. The NDTO algorithm can make optimal offloading decisions without the need for future statistics. Then, we decompose the optimization problem into five sub-problems to solve.


### 3.1. Problem Transformation

In order to maintain the stability of the task queue, we define the Lyapunov function as follows:(17)LΘt=12∑s=1S∑i=1NsQs,il,2t+Qs,io,2t+Hs,i2t,where Θt=Qlt,Qot,Ht indicates the queue backlog vector.Then, the Lyapunov drift function is given as follows:(18)ΔΘt=ELΘt+1−LΘt|Θt.Our goal is to keep the task queue stable while minimizing energy consumption. To this end, we give the Lyapunov drift plus penalty function as follows:(19)ΔVΘt=ΔΘt+VEEt|Θt,where V is the trade-off parameter.We can minimize energy consumption by minimizing the upper bound of (19). The following theorem gives the upper bound of (19).Theorem 1.
The upper bound of the drift plus penalty function is shown below.(20)ΔΘt+VEEt|Θt≤Z+VEEt|Θt+E∑s=1S∑i=1NsQs,ilt1−Is,itAs,it−Ds,ilt|Θt+E∑s=1S∑i=1NsQs,iotIs,itAs,it−Ds,iot|Θt+E∑s=1S∑i=1NsHs,itDs,iot−μs,ilt−μs,iot|Θt,where Z is a constant.Proof.
Froma−b++c2≤a2+b2+c2+2ac−b, we can get:(21)Qs,il,2t+1≤Qs,il,2t+1−Is,itAs,it2+Ds,il,2t+2Qs,ilt1−Is,itAs,it−Ds,ilt,(22)Qs,io,2t+1≤Qs,io,2t+Is,itAs,it2+Ds,io,2t+2Qs,iotIs,itAs,it−Ds,iot.(23)Hs,i2t+1≤Hs,i2t+μs,ilt+μs,iot2+Ds,io,2t+2Hs,itDs,iot−μs,ilt−μs,iot.
Then, combining (17) and (18), we can get:(24)ΔVΘt≤Z+VEEt|Θt+E∑s=1S∑i=1NsQs,ilt1−Is,itAs,it−Ds,ilt|Θt+E∑s=1S∑i=1NsQs,iotIs,itAs,it−Ds,iot|Θt+E∑s=1S∑i=1NsHs,itDs,iot−μs,ilt−μs,iot|Θt,where Z=1/2∑s=1S∑i=1NsAs,imaxt2+fs,il,maxtτ/φs,i2+2Rs,imaxtτ2+fs,ietτ/φe+Rsmaxtτ2.


### 3.2. NOMA-Enabled Dynamic Task Offloading Algorithm

In this section, we propose the NDTO algorithm to minimize the upper bound of (19). We define Xt=It,flt,Dot,μlt,μot. Since Z is a constant, the upper bound minimization problem can be formulated as follows:(25)minXt∑s=1S∑i=1NsQs,ilt1−Is,itAs,it+Qs,iotIs,itAs,it+∑s=1S∑i=1NsVξs,ifs,il,3tτ−Qs,iltfs,iltτφs,i+∑s=1S∑i=1NsVPs,itDs,iotRs,it−Qs,iotDs,iot+Hs,itDs,iot+∑s=1S∑i=1NsVl1μs,ilt−Hs,itμs,ilt+∑s=1S∑i=1NsVPstμs,iotRst−Hs,itμs,iot+Vl2μs,iot,,s.t.C1:Is,it∈0,1,C2:0≤fs,ilt≤fs,il,max,C3:0≤Ds,iot≤Rs,itτ,C4:Ds,iot≤Qs,iot,C5:0≤∑i=1Nsμs,ilt≤fs,ietτφe,∀s∈S,C6:0≤μs,iot≤Rstτ,∀s∈S.In Problem (25), its decision variables are It, flt, Dot, μlt, and μot. Because the decision variables are decoupled, we can decompose Problem (25) into five corresponding sub-problems. Below, we will give the optimal solution for each sub-problem.


### 3.3. Offloading Decision

By separating out the part related toIs,it in Problem (25), the offloading decision sub-problem is given as follows:(26)minIt∑s=1S∑i=1NsQs,ilt1−Is,itAs,it+Qs,iotIs,itAs,it,s.t.Is,it∈0,1.Problem (26) is a zero-one integer programming problem. Therefore, we give the optimal solution for the offloading decision as follows:(27)Is,i∗t=0,Qs,iot≥Qs,ilt,1,otherwise.


### 3.4. CPU Frequency for IoT Devices

The optimal CPU frequency of IoT devices in each time slot can be obtained by solving the following sub-problems:(28)minflt∑s=1S∑i=1NsVξs,ifs,il,3tτ−Qs,iltfs,iltτφs,i,s.t.0≤fs,ilt≤fs,il,max.Problem (28) is a convex optimization problem. Its first derivative function is 3Vξs,ifs,il,2tτ−Qs,iltτ/φs,i. When its first derivative function is equal to 0, we can get fs,ilt=Qs,ilt/3Vξs,iφs,i. Then, we can get its second derivative function as 6Vξs,ifs,iltτ≥0. Thus, the optimal solution of fs,ilt as follows:(29)fs,il,∗t=Qs,ilt3Vξs,iφs,i,0≤Qs,ilt3Vξs,iφs,i≤f∗,f∗,otherwise,where f∗=minQs,iltφs,i/τ,fs,il,max.


### 3.5. Offloading Computation for IoT Devices

The sub-problem of offloading computation for IoT devices is described as follows:(30)minDot∑s=1S∑i=1NsVPs,itRs,it−Qs,iot+Hs,itDs,iot.s.t.0≤Ds,iot≤Rs,itτ,Ds,iot≤Qs,iot.Problem (30) is a linear programming problem. We define Ws,it=VPs,it/Rs,it−Qs,iot+Hs,it. Thus, the offloading computation Ds,iot of the IoT device Us,i is calculated as follows:(31)Ds,io,∗t=minRs,itτ,Qs,iot,Ws,it≤0,0,otherwise.


### 3.6. SBS Local Computation Allocation

The SBS local computation allocation sub-problem is formulated as follows:(32)minμlt∑s=1S∑i=1NsVl1−Hs,itμs,ilt.s.t.0≤∑i=1Nsμs,ilt≤fs,ietτφe,∀s∈S.Problem (32) can be viewed as a knapsack problem, where the weights of μs,ilt are Vl1−Hs,it. The specific steps to solve this problem are given as follows:(1)
We initialize the amount of tasks that SBSs can handle in the time slot t as Csl=fs,ietτ/φe.(2)
For each SBS, the IoT devices in its service area are sorted according to the value ofVl1−Hs,it from low to high.(3)
The SBSs sequentially assigns the size of the SBS local computation to the IoT device Us,i according to the sorting results, as follows:(33)μs,il,∗t=minHs,it,Csl,i=i∗,Vl1−Hs,it≤0,0,otherwise.wherei∗=argmini∈NsVl1−Hs,it.(4)
Updating the amount of tasks that SBSs can still process in the time slot t is Csl=Csl−μs,il,∗t.


### 3.7. SBS Offloading Computation Allocation

The SBS Offloading computation allocation sub-problem is formulated as follows:(34)minμiot∑s=1S∑i=1NsVPstRst−Hs,it+Vl2μs,iot,s.t.0≤∑i=1Nsμs,iot≤Rstτ,∀s∈S.We defineYs,it=VPst/Rst−Hs,it+Vl2. Similar to solving Problem (32), the specific steps to solve this problem are given as follows:(1)
We initialize the amount of tasks that SBSs can offload in time slot t as Cso=Rstτ.(2)
For each SBS, the IoT devices in its service area are sorted according to the value ofYs,it from low to high.(3)
The SBSs sequentially assigns the size of the SBS local computation to the IoT device Us,i according to the sorting results, as follows:(35)μs,io,∗t=minHs,it−μs,il,∗t,Cso,i=i∗,Ys,it≤0,0,otherwise.wherei∗=argmini∈NsYs,it.(4)
Updating the amount of tasks that SBSs can still offload in time slot t is Cso=Cso−μs,io,∗t.Details of the NDTO algorithm are given in Algorithm 1.Algorithm 1: NOMA-enabled Dynamic Task Offloading (NDTO) Algorithm.
Input:Qs,ilt←0, Qs,iot←0, Hs,it←0, As,itOutput:Is,it,fs,ilt,Ds,iot,μs,ilt,μs,iot(1)
for alls∈Sdo(2)
for alli∈Nsdo(3)
Set theIs,it according to (27).(4)
end for(5)
end for(6)
for alls∈Sdo(7)
for alli∈Nsdo(8)
Calculate the value ofQs,ilt/3Vξs,iφs,i.(9)
Set thefs,ilt according to (29).(10)
end for(11)
end for(12)
for alls∈Sdo(13)
for alli∈Nsdo(14)
Calculate the value ofVPs,it/Rs,it−Qs,iot+Hs,it.(15)
Set theDs,iot according to (31).(16)
end for(17)
end for(18)
for alls∈Sdo(19)
InitializeCsl=fs,ietτ/φe.(20)
Sort IoT devices from low to high according to the value ofVl1−Hs,it.(21)
for alli∈Nsdo(22)
Set theμs,ilt according to (33).(23)
Csl=Csl−μs,il,∗t.(24)
end for(25)
end for(26)
for alls∈Sdo(27)
InitializeCso=Rstτ.(28)
Sort IoT devices from low to high according to the value ofVPst/Rst−Hs,it+Vl2.(29)
for alli∈Nsdo(30)
Set theμs,iot according to (35).(31)
Cso=Cso−μs,io,∗t.(32)
end for(33)
end for(34)
for alls∈Sdo(35)
for alli∈Nsdo(36)
Update the values of queuesQs,ilt, Qs,iot and Hs,it.(37)
end for(38)
end for


## 3.1. Problem Transformation

In order to maintain the stability of the task queue, we define the Lyapunov function as follows:(17)LΘt=12∑s=1S∑i=1NsQs,il,2t+Qs,io,2t+Hs,i2t,where Θt=Qlt,Qot,Ht indicates the queue backlog vector.Then, the Lyapunov drift function is given as follows:(18)ΔΘt=ELΘt+1−LΘt|Θt.Our goal is to keep the task queue stable while minimizing energy consumption. To this end, we give the Lyapunov drift plus penalty function as follows:(19)ΔVΘt=ΔΘt+VEEt|Θt,where V is the trade-off parameter.We can minimize energy consumption by minimizing the upper bound of (19). The following theorem gives the upper bound of (19).Theorem 1.
The upper bound of the drift plus penalty function is shown below.(20)ΔΘt+VEEt|Θt≤Z+VEEt|Θt+E∑s=1S∑i=1NsQs,ilt1−Is,itAs,it−Ds,ilt|Θt+E∑s=1S∑i=1NsQs,iotIs,itAs,it−Ds,iot|Θt+E∑s=1S∑i=1NsHs,itDs,iot−μs,ilt−μs,iot|Θt,where Z is a constant.Proof.
Froma−b++c2≤a2+b2+c2+2ac−b, we can get:(21)Qs,il,2t+1≤Qs,il,2t+1−Is,itAs,it2+Ds,il,2t+2Qs,ilt1−Is,itAs,it−Ds,ilt,(22)Qs,io,2t+1≤Qs,io,2t+Is,itAs,it2+Ds,io,2t+2Qs,iotIs,itAs,it−Ds,iot.(23)Hs,i2t+1≤Hs,i2t+μs,ilt+μs,iot2+Ds,io,2t+2Hs,itDs,iot−μs,ilt−μs,iot.
Then, combining (17) and (18), we can get:(24)ΔVΘt≤Z+VEEt|Θt+E∑s=1S∑i=1NsQs,ilt1−Is,itAs,it−Ds,ilt|Θt+E∑s=1S∑i=1NsQs,iotIs,itAs,it−Ds,iot|Θt+E∑s=1S∑i=1NsHs,itDs,iot−μs,ilt−μs,iot|Θt,where Z=1/2∑s=1S∑i=1NsAs,imaxt2+fs,il,maxtτ/φs,i2+2Rs,imaxtτ2+fs,ietτ/φe+Rsmaxtτ2.


## 3.2. NOMA-Enabled Dynamic Task Offloading Algorithm

In this section, we propose the NDTO algorithm to minimize the upper bound of (19). We define Xt=It,flt,Dot,μlt,μot. Since Z is a constant, the upper bound minimization problem can be formulated as follows:(25)minXt∑s=1S∑i=1NsQs,ilt1−Is,itAs,it+Qs,iotIs,itAs,it+∑s=1S∑i=1NsVξs,ifs,il,3tτ−Qs,iltfs,iltτφs,i+∑s=1S∑i=1NsVPs,itDs,iotRs,it−Qs,iotDs,iot+Hs,itDs,iot+∑s=1S∑i=1NsVl1μs,ilt−Hs,itμs,ilt+∑s=1S∑i=1NsVPstμs,iotRst−Hs,itμs,iot+Vl2μs,iot,,s.t.C1:Is,it∈0,1,C2:0≤fs,ilt≤fs,il,max,C3:0≤Ds,iot≤Rs,itτ,C4:Ds,iot≤Qs,iot,C5:0≤∑i=1Nsμs,ilt≤fs,ietτφe,∀s∈S,C6:0≤μs,iot≤Rstτ,∀s∈S.In Problem (25), its decision variables are It, flt, Dot, μlt, and μot. Because the decision variables are decoupled, we can decompose Problem (25) into five corresponding sub-problems. Below, we will give the optimal solution for each sub-problem.


## 3.3. Offloading Decision

By separating out the part related toIs,it in Problem (25), the offloading decision sub-problem is given as follows:(26)minIt∑s=1S∑i=1NsQs,ilt1−Is,itAs,it+Qs,iotIs,itAs,it,s.t.Is,it∈0,1.Problem (26) is a zero-one integer programming problem. Therefore, we give the optimal solution for the offloading decision as follows:(27)Is,i∗t=0,Qs,iot≥Qs,ilt,1,otherwise.


## 3.4. CPU Frequency for IoT Devices

The optimal CPU frequency of IoT devices in each time slot can be obtained by solving the following sub-problems:(28)minflt∑s=1S∑i=1NsVξs,ifs,il,3tτ−Qs,iltfs,iltτφs,i,s.t.0≤fs,ilt≤fs,il,max.Problem (28) is a convex optimization problem. Its first derivative function is 3Vξs,ifs,il,2tτ−Qs,iltτ/φs,i. When its first derivative function is equal to 0, we can get fs,ilt=Qs,ilt/3Vξs,iφs,i. Then, we can get its second derivative function as 6Vξs,ifs,iltτ≥0. Thus, the optimal solution of fs,ilt as follows:(29)fs,il,∗t=Qs,ilt3Vξs,iφs,i,0≤Qs,ilt3Vξs,iφs,i≤f∗,f∗,otherwise,where f∗=minQs,iltφs,i/τ,fs,il,max.


## 3.5. Offloading Computation for IoT Devices

The sub-problem of offloading computation for IoT devices is described as follows:(30)minDot∑s=1S∑i=1NsVPs,itRs,it−Qs,iot+Hs,itDs,iot.s.t.0≤Ds,iot≤Rs,itτ,Ds,iot≤Qs,iot.Problem (30) is a linear programming problem. We define Ws,it=VPs,it/Rs,it−Qs,iot+Hs,it. Thus, the offloading computation Ds,iot of the IoT device Us,i is calculated as follows:(31)Ds,io,∗t=minRs,itτ,Qs,iot,Ws,it≤0,0,otherwise.


## 3.6. SBS Local Computation Allocation

The SBS local computation allocation sub-problem is formulated as follows:(32)minμlt∑s=1S∑i=1NsVl1−Hs,itμs,ilt.s.t.0≤∑i=1Nsμs,ilt≤fs,ietτφe,∀s∈S.Problem (32) can be viewed as a knapsack problem, where the weights of μs,ilt are Vl1−Hs,it. The specific steps to solve this problem are given as follows:(1)
We initialize the amount of tasks that SBSs can handle in the time slot t as Csl=fs,ietτ/φe.(2)
For each SBS, the IoT devices in its service area are sorted according to the value ofVl1−Hs,it from low to high.(3)
The SBSs sequentially assigns the size of the SBS local computation to the IoT device Us,i according to the sorting results, as follows:(33)μs,il,∗t=minHs,it,Csl,i=i∗,Vl1−Hs,it≤0,0,otherwise.wherei∗=argmini∈NsVl1−Hs,it.(4)
Updating the amount of tasks that SBSs can still process in the time slot t is Csl=Csl−μs,il,∗t.


## 3.7. SBS Offloading Computation Allocation

The SBS Offloading computation allocation sub-problem is formulated as follows:(34)minμiot∑s=1S∑i=1NsVPstRst−Hs,it+Vl2μs,iot,s.t.0≤∑i=1Nsμs,iot≤Rstτ,∀s∈S.We defineYs,it=VPst/Rst−Hs,it+Vl2. Similar to solving Problem (32), the specific steps to solve this problem are given as follows:(1)
We initialize the amount of tasks that SBSs can offload in time slot t as Cso=Rstτ.(2)
For each SBS, the IoT devices in its service area are sorted according to the value ofYs,it from low to high.(3)
The SBSs sequentially assigns the size of the SBS local computation to the IoT device Us,i according to the sorting results, as follows:(35)μs,io,∗t=minHs,it−μs,il,∗t,Cso,i=i∗,Ys,it≤0,0,otherwise.wherei∗=argmini∈NsYs,it.(4)
Updating the amount of tasks that SBSs can still offload in time slot t is Cso=Cso−μs,io,∗t.Details of the NDTO algorithm are given in Algorithm 1.Algorithm 1: NOMA-enabled Dynamic Task Offloading (NDTO) Algorithm.
Input:Qs,ilt←0, Qs,iot←0, Hs,it←0, As,itOutput:Is,it,fs,ilt,Ds,iot,μs,ilt,μs,iot(1)
for alls∈Sdo(2)
for alli∈Nsdo(3)
Set theIs,it according to (27).(4)
end for(5)
end for(6)
for alls∈Sdo(7)
for alli∈Nsdo(8)
Calculate the value ofQs,ilt/3Vξs,iφs,i.(9)
Set thefs,ilt according to (29).(10)
end for(11)
end for(12)
for alls∈Sdo(13)
for alli∈Nsdo(14)
Calculate the value ofVPs,it/Rs,it−Qs,iot+Hs,it.(15)
Set theDs,iot according to (31).(16)
end for(17)
end for(18)
for alls∈Sdo(19)
InitializeCsl=fs,ietτ/φe.(20)
Sort IoT devices from low to high according to the value ofVl1−Hs,it.(21)
for alli∈Nsdo(22)
Set theμs,ilt according to (33).(23)
Csl=Csl−μs,il,∗t.(24)
end for(25)
end for(26)
for alls∈Sdo(27)
InitializeCso=Rstτ.(28)
Sort IoT devices from low to high according to the value ofVPst/Rst−Hs,it+Vl2.(29)
for alli∈Nsdo(30)
Set theμs,iot according to (35).(31)
Cso=Cso−μs,io,∗t.(32)
end for(33)
end for(34)
for alls∈Sdo(35)
for alli∈Nsdo(36)
Update the values of queuesQs,ilt, Qs,iot and Hs,it.(37)
end for(38)
end for


## 4. Analysis of NOMA-Enabled Dynamic Task Offloading Algorithm

In this section, we analyze the performance of the NDTO algorithm mathematically.We give the following lemma to demonstrate the performance of the NDTO algorithm.Lemma 1.
No matter how the task arrival rateλ changes, there is always an optimal decision π∗ that is independent of the queue length. From this, we can get:(36)EE¯π∗t=E∗λ,E1−Is,iπ∗tAs,iπ∗t≤EDs,il,π∗t,EDs,io,π∗t≤Eμs,il,π∗t+μs,io,π∗t,where E∗λ is minimum energy consumption with λ.Proof.
Caratheodory’s theorem can be used to prove Lemma1. Here, we will not repeat them. □
It is worth noting that the task arrival rate is capped. Therefore, the upper limit of the system energy consumption is denoted asE^, and the lower limit is denoted as Eˇ. We define L¯=limT⟶∞1/T∑s=1S∑i=1NsQs,ilt+Qs,iot+Hs,it. According to Lemma 1, we give Theorem 2 to analyze the performance of NDTO.Theorem 2.
For any value ofV, when the task arrival rate is λ+ϵ, according to NDTO, we have:(37)ENDTO≤E∗+ZV,(38)L¯≤Z+VE^−Eˇϵ.Proof.
Based on Lemma1, for any decision π and task arrival rate λ+ϵ, we can get:(39)EE¯πt=E∗λ+ϵ,E1−Is,iπtAs,iπt+ϵ≤EDs,il,πt,EIs,iπtAs,iπt+ϵ≤EDs,io,πt,EDs,io,πt+ϵ≤Eμs,il,πt+μs,io,πt.
Our NDTO algorithm is to minimize the value of (19). Thus, for decision π, we have:(40)ΔVΘt≤Z+VEEt|Θt+E∑s=1S∑i=1NsQs,ilt1−Is,itAs,iπt−Ds,il,πt+E∑s=1S∑i=1NsQs,iotIs,itAs,iπt−Ds,io,πt+E∑s=1S∑i=1NsHs,itDs,io,πt−μs,il,πt−μs,io,πt,
Combining (39) and (40), we can get:(41)EUΘt+1−UΘt+VEEt≤Z+VE∗λ+ϵ−ϵ∑s=1S∑i=1NsEQs,ilt+Qs,iot+Hs,it.
Generally speaking,LΘ0=0. Taking expectations on both sides of (41) and giving the cumulative sum over time, we obtain:(42)V∑t=1T−1EEt≤ZT+VTE∗λ+ϵ−ϵ∑t=1T−1∑s=1S∑i=1NsEQs,ilt+Qs,iot+Hs,it.
SinceQs,ilt, Qs,iot, Hs,it and ϵ are nonnegative, we have:(43)V∑t=1T−1EEt≤ZT+VTE∗λ+ϵ.
Then, divide both sides of (43) by VT. When ϵ⟶0, T⟶∞, we can get (37).
With (42), we also get:(44)ϵ∑t=1T−1∑s=1S∑i=1NsEQs,ilt+Qs,iot+Hs,it≤ZT+VTE∗λ+ϵ−V∑t=1T−1EEt.
SinceEEt is nonnegative, we have:(45)ϵ∑t=1T−1∑s=1S∑i=1NsEQs,ilt+Qs,iot+Hs,it≤ZT+VTE^−Eˇ.
By dividing (45) by ϵT, when T⟶∞, we get (38).


## 5. Evaluation

In this section, we evaluate the performance of the NDTO algorithm through a series of experiments.


### 5.1. Experiment Setup

In the experiments, we consider a system with 100 IoT devices, 5 SBSs, and 1 MBS. Within each time slot, the task arrival rate satisfies a uniform distribution, i.e.,As,it∼U0,1.4 Mb. For each IoT device, the maximum CPU frequency is 1 GHz, and the transmit power is uniformly distributed, which is Ps,it∼U0.01,0.1w. For each SBS, the transmit power is uniformly distributed, which is Pt∼U1,5w. We set the wireless channel bandwidth to 106 Hz, the channel noise power to 10−13w, and the number of CPU cycles required to process 1-bit data to 1000. Furthermore, the effective switched capacitance is 10−27, the time slot length is 1 s, and l1=10−4 J/b [29, 30].


### 5.2. Parameter Analysis

#### 5.2.1. Impact of Parameter V

Figure1 shows the effect of different parameter V on energy consumption. It can be seen that energy consumption decreases as V increases, which is consistent with the result of (37). This is because the greater the value of V, the greater the weight of the system energy consumption. Therefore, the NDTO algorithm will dynamically adjust the offloading strategy to reduce energy consumption. Figure 2 shows the effect of different parameter V on the queue length. It can be seen that the queue length increases as V increases, which is consistent with the result of (38). Combining Figures 1 and 2, it can be seen that the NDTO algorithm can achieve a trade-off between energy consumption and queue length.Figure 1
Energy consumption with different values of V.Figure 2
Queue length with different values of V.


#### 5.2.2. Impact of Task Arrival Rate

Figures3 and 4 show the effect of different task arrival rates on energy consumption and queue length. We set the task arrival rate to α⋅As,it, where α=0.8, 1.0, and 1.2. As can be seen from Figure 3, the higher the task arrival rate, the higher the system energy consumption. An increase in the task arrival rate leads to an increase in computing tasks, and thus an increase in energy consumption. As can be seen from Figure 4, the higher the task arrival rate, the larger the queue length. Because the transmission capacity and computing power of IoT devices will not change due to the change of task arrival rate. Taken together, the NDTO algorithm can adapt to changes of the task arrival rate to achieve a trade-off between energy consumption and queue length.Figure 3
Energy consumption with different task arrival rates.Figure 4
Queue length with different task arrival rates.


#### 5.2.3. Impact of Number of IoT Devices

Figures5 and 6 show the effect of the number of IoT devices on energy consumption and queue length. We set the number of IoT devices to increase from 30 to 120 in increments of 10 each. Figure 5 shows that energy consumption increases as the number of devices increases. Because the amount of generated tasks increases with the number of devices, energy consumption increases accordingly. But the computing power and transmission capacity of SBS are limited. Therefore, as shown in Figure 6, the queue length increases with the number of devices.Figure 5
Energy consumption with different number of IoT devices.Figure 6
Queue length with different number of IoT devices.


### 5.3. Comparison Experiment

We compare the NDTO algorithm with two other baseline algorithms to further evaluate the performance of NDTO.(i)
Local-only Computation Algorithm. The tasks generated by IoT devices are all placed on the local computing queue.(ii)
Offload-only Computation Algorithm. The tasks generated by IoT devices are all placed on the local offloading queue.Figures7 and 8 show the relationship between energy consumption and queue length for different algorithms, respectively. As can be seen from Figure 7, the energy consumption of the offload-only computation algorithm is the lowest, followed by the NDTO algorithm, and finally the local-only computation algorithm.Figure 7
Energy consumption with different algorithms.Figure 8
Queue length with different algorithms.It can be seen from Figure8 that the queue length of the offload-only computation algorithm increases linearly, which will lead to instability of the task queue. At the same time, we can see that the change in queue length of the NDTO algorithm and the local-only computation algorithm is basically the same. Taken together, our NDTO algorithm is more advantageous in minimizing system energy consumption and maintaining task queue stability.


## 5.1. Experiment Setup

In the experiments, we consider a system with 100 IoT devices, 5 SBSs, and 1 MBS. Within each time slot, the task arrival rate satisfies a uniform distribution, i.e.,As,it∼U0,1.4 Mb. For each IoT device, the maximum CPU frequency is 1 GHz, and the transmit power is uniformly distributed, which is Ps,it∼U0.01,0.1w. For each SBS, the transmit power is uniformly distributed, which is Pt∼U1,5w. We set the wireless channel bandwidth to 106 Hz, the channel noise power to 10−13w, and the number of CPU cycles required to process 1-bit data to 1000. Furthermore, the effective switched capacitance is 10−27, the time slot length is 1 s, and l1=10−4 J/b [29, 30].


## 5.2. Parameter Analysis

### 5.2.1. Impact of Parameter V

Figure1 shows the effect of different parameter V on energy consumption. It can be seen that energy consumption decreases as V increases, which is consistent with the result of (37). This is because the greater the value of V, the greater the weight of the system energy consumption. Therefore, the NDTO algorithm will dynamically adjust the offloading strategy to reduce energy consumption. Figure 2 shows the effect of different parameter V on the queue length. It can be seen that the queue length increases as V increases, which is consistent with the result of (38). Combining Figures 1 and 2, it can be seen that the NDTO algorithm can achieve a trade-off between energy consumption and queue length.Figure 1
Energy consumption with different values of V.Figure 2
Queue length with different values of V.


### 5.2.2. Impact of Task Arrival Rate

Figures3 and 4 show the effect of different task arrival rates on energy consumption and queue length. We set the task arrival rate to α⋅As,it, where α=0.8, 1.0, and 1.2. As can be seen from Figure 3, the higher the task arrival rate, the higher the system energy consumption. An increase in the task arrival rate leads to an increase in computing tasks, and thus an increase in energy consumption. As can be seen from Figure 4, the higher the task arrival rate, the larger the queue length. Because the transmission capacity and computing power of IoT devices will not change due to the change of task arrival rate. Taken together, the NDTO algorithm can adapt to changes of the task arrival rate to achieve a trade-off between energy consumption and queue length.Figure 3
Energy consumption with different task arrival rates.Figure 4
Queue length with different task arrival rates.


### 5.2.3. Impact of Number of IoT Devices

Figures5 and 6 show the effect of the number of IoT devices on energy consumption and queue length. We set the number of IoT devices to increase from 30 to 120 in increments of 10 each. Figure 5 shows that energy consumption increases as the number of devices increases. Because the amount of generated tasks increases with the number of devices, energy consumption increases accordingly. But the computing power and transmission capacity of SBS are limited. Therefore, as shown in Figure 6, the queue length increases with the number of devices.Figure 5
Energy consumption with different number of IoT devices.Figure 6
Queue length with different number of IoT devices.


## 5.2.1. Impact of Parameter V

Figure1 shows the effect of different parameter V on energy consumption. It can be seen that energy consumption decreases as V increases, which is consistent with the result of (37). This is because the greater the value of V, the greater the weight of the system energy consumption. Therefore, the NDTO algorithm will dynamically adjust the offloading strategy to reduce energy consumption. Figure 2 shows the effect of different parameter V on the queue length. It can be seen that the queue length increases as V increases, which is consistent with the result of (38). Combining Figures 1 and 2, it can be seen that the NDTO algorithm can achieve a trade-off between energy consumption and queue length.Figure 1
Energy consumption with different values of V.Figure 2
Queue length with different values of V.


## 5.2.2. Impact of Task Arrival Rate

Figures3 and 4 show the effect of different task arrival rates on energy consumption and queue length. We set the task arrival rate to α⋅As,it, where α=0.8, 1.0, and 1.2. As can be seen from Figure 3, the higher the task arrival rate, the higher the system energy consumption. An increase in the task arrival rate leads to an increase in computing tasks, and thus an increase in energy consumption. As can be seen from Figure 4, the higher the task arrival rate, the larger the queue length. Because the transmission capacity and computing power of IoT devices will not change due to the change of task arrival rate. Taken together, the NDTO algorithm can adapt to changes of the task arrival rate to achieve a trade-off between energy consumption and queue length.Figure 3
Energy consumption with different task arrival rates.Figure 4
Queue length with different task arrival rates.


## 5.2.3. Impact of Number of IoT Devices

Figures5 and 6 show the effect of the number of IoT devices on energy consumption and queue length. We set the number of IoT devices to increase from 30 to 120 in increments of 10 each. Figure 5 shows that energy consumption increases as the number of devices increases. Because the amount of generated tasks increases with the number of devices, energy consumption increases accordingly. But the computing power and transmission capacity of SBS are limited. Therefore, as shown in Figure 6, the queue length increases with the number of devices.Figure 5
Energy consumption with different number of IoT devices.Figure 6
Queue length with different number of IoT devices.


## 5.3. Comparison Experiment

We compare the NDTO algorithm with two other baseline algorithms to further evaluate the performance of NDTO.(i)
Local-only Computation Algorithm. The tasks generated by IoT devices are all placed on the local computing queue.(ii)
Offload-only Computation Algorithm. The tasks generated by IoT devices are all placed on the local offloading queue.Figures7 and 8 show the relationship between energy consumption and queue length for different algorithms, respectively. As can be seen from Figure 7, the energy consumption of the offload-only computation algorithm is the lowest, followed by the NDTO algorithm, and finally the local-only computation algorithm.Figure 7
Energy consumption with different algorithms.Figure 8
Queue length with different algorithms.It can be seen from Figure8 that the queue length of the offload-only computation algorithm increases linearly, which will lead to instability of the task queue. At the same time, we can see that the change in queue length of the NDTO algorithm and the local-only computation algorithm is basically the same. Taken together, our NDTO algorithm is more advantageous in minimizing system energy consumption and maintaining task queue stability.


## 6. Related Work

In recent years, with the development and popularization of IoT and wireless communication technologies, the number of IoT devices has exploded [31, 32]. In addition, the proliferation of mobile devices has facilitated the development of computation-intensive applications [33, 34]. The emergence of the MEC paradigm has attracted great attention from industry and academia. Mao et al. [35] proposed an online joint radio and computational resource management algorithm for multi-user MEC systems. The algorithm implements a trade-off between power consumption and execution delay. Chen et al. [36] studied the problem of energy-saving task offloading in MEC systems. Then, they propose an energy-efficient dynamic offloading algorithm. The algorithm can minimize the transmission energy consumption while limiting the queue length. Huang et al. [37] considered wirelessly powered MEC networks with the binary offload. They propose an online algorithm that adapts task offloading decisions and radio resource allocation to time-varying radio channel conditions. The above work only considers the situation that one base station provides services for multiple users, but does not consider the situation that one MBS covers multiple SCNs.The problem of one MBS covering multiple SCNs has also been extensively studied. Guo et al. [38] studied the problem of energy-efficient computation offloading in MEC systems with SCN. Wherein each user equipment not only decided whether to perform offloading, but also decided to which base station to offload. Wang et al. [39] studied the problem of computational offloading and content caching in heterogeneous wireless SCNs. Then, they proposed an ADMM-based distributed algorithm to solve the proposed problem. The above work is based on OMA technology. But with the explosive growth of IoT devices, OMA technology can no longer meet user needs.Therefore, NOMA technology is applied in SCN as a new generation of mobile communication technology. Yang et al. [40] considered the task offloading problem in NOMA-based small cell MEC networks. Meanwhile, a hybrid genetic hill climbing algorithm is proposed to minimize the weighted total cost of energy consumption and latency. Most of these works can be predicted based on task arrival or channel state. However, task arrival and channel state are affected by many factors, and it is unrealistic to achieve accurate prediction.In our work, we study the problem of NOMA-based dynamic task offloading in heterogeneous networks. We specify stochastic problems to minimize the total energy consumption of the system. Meanwhile, we transform it into five sub-problems using stochastic optimization techniques. Finally, we design an NDTO algorithm to solve this problem.


## 7. Conclusion

In this article, we study the NOMA-enabled dynamic task offloading problem in MEC. We describe it as a stochastic optimization problem, where the goal is to minimize system energy consumption while keeping the task queue stable. Using stochastic optimization techniques, we decompose this problem into five deterministic sub-problems to solve. Then, an NDTO algorithm is designed to solve this problem. Meanwhile, we evaluate the performance of the NDTO algorithm through mathematical analysis and experiments. The experimental results show that the NDTO algorithm is effective in minimizing energy consumption while maintaining queue stability.



---

*Source: 7258236-2022-09-20.xml*