Two-level Computation Offloading to Optimize the Energy Consumption of UAV-mounted Edge Nodes

The utilization of Unmanned Aerial Vehicles (UAVs) in Internet of Things (IoT) applications has recently gained widespread popularity. Recently, fixed-edge servers have been used for computation offloading services to IoT devices. These nodes have troublesome installations in geographically constrained areas and are not easy to replace in case of sudden failure in remote areas. UAV nodes can be utilized as mobile Edge servers to overcome these problems. Their importance can be visualized in various applications like disaster management, offshore industries, military applications, healthcare, and wildlife conservation. Since UAVs run on battery, saving energy becomes a primary challenge. This paper proposes an architecture that provides a two-level offloading mechanism for IoT devices to minimize energy consumption. When computation offloading happens from IoT devices to their respective UAV-mounted Edge nodes, they do not need to wait if Edge server capacity is exhausted. In such a case, UAV offloads to another suitable one in its network. In this way, Edge nodes are more efficiently utilized than when a single UAV-mounted Edge node has to serve all its IoT devices. Using our model, we can also provide better services to IoT users. The proposed model uses game theory to utilize the Nash Equilibrium to solve this problem. The simulation work evaluates the accuracy of the proposed architecture and finds a significant difference in energy consumption between the case of offloading from IoT devices to respective UAVs and the case of the proposed model.


INTRODUCTION
With the enormous increase in IoT applications, the demand for high-computation IoT systems has significantly risen.The IoT service providers have been focusing on satisfying the needs of their users in such applications, which may have criticality or urgency.Edge computing emerged as a solution that acts as a micro data center and continues functioning even when the connection to the Cloud is affected.Having micro data centers within the local premises would reduce the possibility of delays in data transfer.Edge computing has several advantages over the Cloud, like minimizing system downtime and network failures, mitigating data transmission delays, and addressing concerns of privacy [1].
Computation offloading [2] can be described as the technique for transferring resource-intensive computations from an end device to resource-rich infrastructures.Offloading is a way to increase mobile systems' capabilities by drifting computation to more capable devices that are placed adjacent, such as Edge nodes, Fog nodes, cloudlets, base stations, or access points [3].Integrating UAVs with Edge services offers several merits by providing the ability to reach any geographical terrain and be remotely controlled quickly.This makes it a privileged technology for scenarios where fixed Edge servers have troublesome installations, are only needed for a limited time, or sudden damage of the Edge node in a critical application [4].
Two-level offloading is computational offloading from IoT devices to UAV-mounted Edge nodes.Then, if required, offloading happens from the current UAV to another UAV-mounted Edge node, which is part of a network, each serving a set of IoT devices.Using UAVs to carry Edge nodes and provide services for handling offloading from IoT devices opens doors for solving issues in various applications.In military applications, such as war zones, soldiers often use IoT devices in remote environments like forests, mountains, deserts, and rocky terrain.Other crucial applications include forest fire detection and monitoring, healthcare, disaster management scenarios like flood control or earthquake management etc.

Motivation
UAVs have constraints in battery life and weight-carrying capacity.This challenges the research community to find feasible methods for real-world applications.Solutions should simultaneously consider the performance and longevity needs of the implementation.Our proposed work targets to reduce the energy consumption of the UAV-mounted Edge nodes and elongate their flight time.We use the Game theory techniques, which has lesser computation requirements [5] than AI-based techniques like Deep learning and Reinforcement learning algorithms.

Contribution and Outline
Our work contributes to the optimization of energy consumption for UAVs while they provide computation offloading services to IoT devices.Key points are as follows: • We provide two-level offloading, which helps reduce the energy consumption of UAV-mounted Edge devices, compared to single-level offloading.This is achieved by having UAVs connected in a mesh topology.• To ensure proper use of Edge nodes, we use a mechanism to find the best possible offloading decision by the IoT devices, using game theory.• Deliver better services to computational-intensive IoT applications and also handle the dynamic increase in the number of IoT devices requesting offloading services.• Simulation results depict that with the increase in iterations, there is a convergence of the amount of offloading done by the IoT devices.Also, there is a significant decrease in the energy cost of UAV-mounted Edge nodes together as a system.
The outline of the rest of the paper is as follows.Section 2 reviews the recent literature, Section 3 presents the proposed architecture and algorithm, Section 4 analyzes the system model, and Section 5 provides the results achieved from the simulation.The conclusion and references follow this.

RELATED WORK
Giorgos et al. [6] propose an offloading method from various mobile devices to a single UAV-mounted Multiaccess Edge Computing (MEC) server.However, the capacity of the Edge node mounted on a UAV remains fixed, which makes it challenging to handle the increase in the number of IoT devices.It describes single-level offloading only.Hongzhi et al. [7] deal with the issue of computation offloading at the UAV-mounted Edge.Their focus was on the Big Data generated case.However, there may be a lapse during the increase in requirements for IoT devices.Messous et al. [8] explain the situation of handling offloading of highly intensive tasks that can help decrease the delay of execution.Elie et al. [9] focus on finding low latency and highly reliable computation offloading problems.However, in their work, the failure of the UAV may collapse the system as a whole.Xiaoge et al. [10] present a method for offloading from devices using two links simultaneously.Maoli et al. [11] define the offloading of computation between users and a single UAV as a Stackelberg game.They use a technique to pre-offload each computation task in the multi-UAV system with Edge nodes mounted on it.Pavlos et al. [12] describe an offloading strategy for uncertain capacity requirements.They use both UAV-mounted and fixed MEC servers on the ground.
Kaiyuan et al. [13] consider a UAV-mounted MEC server, one fixed MEC server, and many mobile devices.Each mobile device would have only one indivisible task.Weibin et al. [14] deal with swarm UAVs with cloudlets to handle tasks.However, they do not consider offloading from IoT devices to their respective UAVmounted Edge nodes.Wen et al. [15] solve the issue of the resource allocation of UAVs, the trajectory of UAVs, and offloading decisions.This helps reduce total energy consumption.Soha et al. [16] highlight that their system can accommodate an increase in traffic without a decrease in performance.They propose a system with several users, UAV-enabled Edge servers with integrated cloud computing.From the literature survey, we notice that very few publications use models of multi-UAV-mounted Edge computing systems to provide computation offloading services for IoT devices.Also, research work is needed to optimize the energy consumption of Edge devices mounted on multiple UAVs.This directly affects the energy required to run the UAVs which carry them.Also, various limitations must be overcome, such as the inability of IoT devices to get services in case their respective UAV-mounted Edge node fails.

PROPOSED ARCHITECTURE
Fig. 2 depicts the topology of our proposed architecture.Our proposed model mainly focuses on reducing energy consumption compared to when offloading does not happen among UAVs.While offloading from IoT devices to respective UAV-mounted Edge nodes, various factors considered are the user's actual utilization and delay limitations, energy needs, the computation requirements of IoT devices, and the IoT user's perception of gain and loss.Based on these parameters, we formulate a function using the Utility Function in game theory, in which their preferences are determined according to the different options for players.Further, Prospect theory is applied to derive the final function.This function is called the Prospect utility function.The offloading decision is based on this final function [6].
Every IoT device cannot be provided with maximum offloading because of limited capacity on the edge side.So, the best possible solution is using the game theory of Pure Nash Equilibrium [17].
As shown in Fig. 1, selecting the appropriate UAV-Edge is based on the task's availability, delay limitations, and energy cost.Also, if the Edge node on the UAV gets damaged or stops working, then the UAV acts as a Hop node and passes the requirements to other UAV-mounted Edge servers based on the same offloading method.While offloading tasks from one UAV to another, we have taken the Frequency Division Multiple Access (FDMA) approach to handle data transfer using channels.UAVs allocate bandwidth of equal size to all UAV-mounted Edge nodes that offload tasks to it to avoid channel interference.It is evident that, together, many UAV-mounted Edge nodes offload to the same one, and then the data rate will be lower.This would result in more significant energy consumption for offloading.Also, on that UAV Edge, the execution energy for  each task would decrease.Thus, to make the best use of system energy, the best offloading decision needed to be made.
A game theoretic approach is again adopted to handle offloading among UAVs, using techniques from exact potential games [18].This game of managing offloading has a state of Nash equilibrium because it is an exact potential game.The proposed algorithm runs iteratively, finding better decisions for each player, i.e., UAVmounted Edge node.The above defined steps are portrayed in Fig. 3 with the help of the sequence diagram.In our proposed model, we assume that the UAVs need to be stationary, and they should all be connected similar to mesh topology.

SYSTEM MODEL
We present the proposed system model in this section.It consists of  UAVs,  =  1 ,  2 , ....  .Both  and  signify the number of UAVs.Now, each   has a set of    IoT devices looking to offload data to the UAV can be represented by the following Equation:

Problem Formulation
The first point of focus is to efficiently utilize the Edge server mounted on the UAV, giving the best possible service to every IoT user under the respective UAV.Each IoT user aims to maximize its expected prospect theoretic utility function while considering the imposed pricing policy and personal risk-aware characteristics. max In the above Equation, we obtain the best response array in the form of [

𝑜 𝑓 𝑓
] that is then transmitted to device .Now, each       has a corresponding number of CPU cycles required to compute this data, which is given by The second problem is to minimize the energy consumption of all the UAV-mounted Edge nodes together as a system.In our current model, energy is defined in two parts.
• If the UAV is not offloading its task: • If the UAV offloads its task: The objective function below is to minimize the sum of all the energy used in all the architecture operations.The optimization problem is defined as: with the constraints, ∈ (0, 1), ∀,  ∈ (1, ..., ), ≥ 1, ∀ ∈ (1, ..., ),  ∈ (1, ..., ) (11) Constraint 7 takes care that only one task can be executed in one UAV.Condition 8 is that the time to process a task does not exceed the time limit of the execution deadline.Constraint 9 says that the number of tasks a UAV receives is at its maximum capacity.Condition 10 ensures that the decision variable is either zero or one.Constraint 11 ensures that at least one IoT device is active under each UAV, and only offloading happens.

Problem Solution
Consider the solution to the first problem.The offloading optimization is framed as a non-cooperative game among different IoT users: In this Equation;   (Γ  ( indicates the function of expected prospect utility of users.Then, we need to theoretically utilize the concept of a sub-modular game to solve the maximization problem.This makes it convenient to prove a Pure Nash Equilibrium state in the above-mentioned non-cooperative game .
The solution for the second problem is as follows.To minimize the energy consumption of the UAV-mounted Edge nodes as a system, optimizing the decision to offload tasks by each UAV-mounted Edge node is the best solution.We use exact potential game theory to solve our objectives.Let us say that   {1, 2...} is   decision in the game.  is free to make choices of any UAV-mounted Edge node, including itself.To signify the execution of the task in itself, i.e.,   ,   =  is used, and for the execution of the task on another, i.e.,   to   ,   = ,  ≠  is used. − = ( Calculate   (),   ( + 1) Calculate  ℎ  (),  ℎ  ( + 1)   () ←  *  // all better strategies of    () ←  () ∪   ()  ℎ ( + 1) =  ℎ () // Select one better strategy from  ()  =  + 1   ←  used to portray strategies of offloading by all except  ′  .Thus,  ′   the cost function of task ℎ, as per the conditions given in Equations 8 -9 can be portrayed as: We define the offloading game as  <, ,  >.The developed game here has the main goal to minimize the  ℎ  (  ,  − ), which is the cost function of respective   .This game of managing offloading has a state of Nash equilibrium because it is an exact potential game.

Algorithm for Energy Optimization
We have designed an algorithm that reduces energy consumption while implementing our proposed architecture compared to singlelevel offloading.Its step-wise explanation is as follows: let  () be the set of decision profiles of the offloading decision made by each UAV at time .  represents the total number of UAVs communicating with   .Let  () denote the multi-set of all better response strategies   (for all   ) at iteration , where every element in   () has a lower energy cost than the previous energy cost at ˘1.It loops for each UAV   .In it, we calculate     *   , which gives a Pure Nash Equilibrium point for the amount of data to be offloaded from the IoT device to UAV for every user  and equate it to       .Then, calculate the corresponding number of CPU cycles required to compute this data for each       .After that, compute the total data size   of task   and also calculate the total number of CPU cycles (  ) required to compute task   .After this, get the total number of UAVs communicating with each   at iteration  and  + 1.Further evaluate the execution time of each   at iteration  and  + 1, and also calculate the total energy cost of each   at iteration  and  + 1.After that, filter all better response strategies of   .Furthermore, add all better response strategies of   to set  ().Select only one better response strategy from  () for the next decision profile and update the decision profile accordingly.Do this until the better response strategy  () becomes empty.At the end   , we get the final best offloading decision profile for each UAV.

SIMULATION RESULTS
The simulation work evaluates the accuracy of the functioning of the proposed architecture.We observe the numerical results after modeling the architecture, and simulation is done with the help of Python programming language.The performance is evaluated and presented in the form of graphs.The execution was done on an Apple M1 Pro chip with 16 GB RAM and an 8-core CPU.The graph in Fig. 4 illustrates the IoT devices offloading to the UAV-mounted Edge server.On the -axis are iterations of the algorithm with a single UAV at a time.It reveals that the offloading requirement of IoT devices converges to Nash equilibrium.In this way, there is a uniform serving of IoT devices from the Edge node.Also, this happens in less than 10 iterations, showing less computation requirement.In the first iteration, as the offloading requirement is unclear, the values have many variations.
However, from the second iteration onwards, the amount of offloading becomes more and more precise following the conditions in the algorithm.The graph in   architecture, the overall energy cost of the UAV-mounted Edge nodes as a system decreases with the increase in the number of iterations and then achieves an equilibrium state.This graph depicts the values at different iterations when the number of UAVs equals ten.It can be seen that there is a significant difference in energy cost value when the algorithm is implemented.
The graph in Fig. 7 compares the energy cost values of the UAVmounted Edge nodes as a system when there is single-level offloading vs Proposed Model values, which consider two-level offloading.Single-level offloading is when computation is offloaded from IoT devices to respective UAV-mounted Edge nodes but does not occur among the UAV-mounted Edge nodes.The proposed model manages the workload of UAV-mounted Edge nodes with the help of other UAVs linked to each other in a mesh topology, as per the algorithm for the proposed architecture.The UAV counts range from 4 to 16, and there is a significant achievement in decreasing the energy cost in managing the computation requirements of IoT devices.
The graphs in Fig. 6 and Fig. 7 depict the results concerning the solution of the second problem, i.e., Equation 12, mentioned in the problem formulation section.Though the major battery consumption in the UAV goes in flight handling [19] but by saving a good amount of energy consumption for running Edge node mounted on UAV, there would be a significant increase in respective UAV flight timing.The limitation of the model is that regular replacements or recharging of UAVs are necessary to maintain continuous operation.The number of IoT devices covered by each UAV should be less than 10 as there is limitation in bandwidth requirements for data transfer among UAVs.Also, the limited capacity of edge nodes can pose challenges when handling tasks that require very high computational capacity.Such cases may cause delays in services to IoT users.In the future, cloud computing integration can overcome this demerit.

CONCLUSION
In this paper, we propose a unified framework with multiple UAVmounted Edge nodes, which indirectly increases the computation capacity of resource-constrained IoT devices with the help of twolevel offloading.We focus on efficiently utilizing the computation resources of Edge servers.For this purpose, we theoretically achieve Nash equilibrium while offloading from IoT devices to respective UAV-mounted Edge nodes and offloading among UAV-mounted Edge nodes.With the help of the proposed algorithm, we can decrease the energy consumption in a few iterations.We have done this while considering the quality of service needs of the IoT users concerning task completion delays.Results depict noteworthy differences in energy cost values of single-level offloading and our proposed model.
Fig 5 shows the average amount of offloading done by IoT devices under an Edge node.It is more when devices are less and less when devices are more.This shows that the resources at Edge nodes are impartially available to all the respective IoT devices.The graphs in Fig. 4 and Fig 5 depict the results concerning the solution of the first problem formulation.Fig. 6 illustrates that using the algorithm based on the proposed

Figure 7 :
Figure 7: Comparison of Energy cost

Table 1 :
Summary of key notations used Notation Description   CPU frequency of  ℎ edge   Energy consumption per CPU cycle of Max task that can be executed at a time by   ℎ Task  ℎ CPU cycles required for task ℎ at UAV  ℎ Data size of task ℎ at UAV  ℎ

𝑖
Latency of task ℎ   Total bandwidth of     edges communication with   J Energy consumption in edge-to-edge offload   Data size for execution of task by IoT device    CPU cycles to accomplish task by IoT user   Each IoT device other than  offloads to its edge  (  ) Probability of failure of a   internally   Utility function associated with a      Strategy space of offloading by different    Γ IoT device's perceived satisfaction     Prospect theoretic utility when   survives     Prospect theoretic utility when   fails   IoT device's actual computation demand   Sensitivity of IoT device    Coefficient used in formula for     Transmission power of    Set of various decisions made by   Cost function of various    Loss aversion parameter of prospect theoretic utility  Switched capacitance of processor of     Consumed energy per CPU cycle at each    Θ Constant for sigmoidal curve, of Equation based on computing capabilities of Edge their data.Different notations used are mentioned in Table 1.An IoT user's expected prospect theoretic utility by offloading 1 , ...,   −1 ,  +1 , ...,   ) is Algorithm 1: Algorithm for energy optimization   , ,    ,    ,    ,    ,  (, ,  ),