Computation Offloading in UAV-Enabled Edge Computing: A Stackelberg Game Approach

This paper studies an efficient computing resource offloading mechanism for UAV-enabled edge computing. According to the interests of three different roles: base station, UAV, and user, we comprehensively consider the factors such as time delay, operation, and transmission energy consumption in a multi-layer game to improve the overall system performance. Firstly, we construct a Stackelberg multi-layer game model to get the appropriate resource pricing and computing offload allocation strategies through iterations. Base stations and UAVs are the leaders, and users are the followers. Then, we analyze the equilibrium states of the Stackelberg game and prove that the equilibrium state of the game exists and is unique. Finally, the algorithm’s feasibility is verified by simulation, and compared with the benchmark strategy, the Stackelberg game algorithm (SGA) has certain superiority and robustness.


Introduction
With the rapid development of network communication technology, the data interaction efficiency of the mobile Internet is constantly improving. Meanwhile, the transmission bandwidth and data scale have become increasingly large. 5G communication and cloud computing have spawned new applications such as driverless, automatic navigation, face recognition, and augmented reality [1]. Meanwhile, these applications are computationally intensive and time-sensitive. However, mobile devices at the terminal cannot provide sufficiently high-performance computing services, and the battery capacity is limited, so it is inefficient in handling these tasks and may not meet the quality of services requirements [2]. In the network architecture of cloud computing, computing resources concentrate in the cloud, and there is a certain distance between the computing resources and terminal devices. Therefore, the service response has an inevitable delay [3], and when dealing with computationally intensive tasks; it is prone to access congestion.
Mobile edge computing (MEC) is a new computing architecture for providing computing services [4,5] that can push the service resources of cloud computing to the edge to meet the requirements of intensive computing and low latency. Compared with cloud computing, edge computing is more in line with the concept of a smart city, which is proposed to realize green and sustainable development [6]. Traditional terrestrial networks face challenges in scenarios such as complex terrain and equipment failure. Unmanned aerial vehicles (UAV) can help to enhance the flexibility and robustness of mobile edge computing network deployment [7], and reduce the complexity and cost of resource management. For example, Verizon and AWS work together to combine UAVs with mobile edge computing to reduce connection latency and reduce UAV costs by about 10% [8]. However, with the increasing number of UAVs in use, resource management of networks faces challenges such as power control, spectrum allocation, interference management, and task allocation [9].
In terms of task allocation, different devices in the MEC network differ in various aspects, such as onboard battery capacity and computational performance. Tasks that require high performance can be offloaded to devices with large battery capacity and high computing performance. In MEC networks, the offloading forms of computation include partial offloading (complex computation tasks can be divided into several sub-computation tasks.) and full offloading (tasks are inseparable) [10]. The computation task offload strategy should consider determining the proportion of the offloading task and choosing the offloading computation content [11]. Moreover, the balance between throughput and fairness also needs to be considered [12]. Artificial intelligence (AI) could also help to allocate resources dynamically. Combined with AI, the learning capacity of edge devices could be enhanced [13]. As shown in Figure 1, the UAV in the MEC network can act as a user at the terminal to access the MEC service or a server to receive the tasks from users; it can also act as a relay node to forward tasks offloaded from nearby users to the base station servers. Roles are changed according to the scenarios.

Related Works
To improve the performance of the computational tasks' allocation strategy, it is necessary to set the optimization goal first. On the one hand, some studies considered a single performance metric. Long et al. [14] aimed to minimize the computation latency and obtain the optimal offloading computation task strategy. However, it is necessary to consider introducing a UAV-enabled MEC network to improve the performance of computing offload further. Luan et al. [15] aimed to minimize the energy consumption and solve the problem of distributed task allocation of UAVs based on a coalitional game. On the other hand, some studies have integrated multiple performance metrics, which could improve the system computing performance more comprehensively. Chen et al. [16] integrated computing latency and energy consumption, and then introduced the pricing of computing resources to differentiate the servers on base stations and UAVs, but it is also necessary to analyze the allocation scheme of the optimal offloading proportion. Ren et al. [17] considered to minimize the global computation latency and energy consumption and divided the computation task into several subtasks, then worked out the optimal offloading proportion by KKT-condition. In addition, in that study, the optimal offloading strategy and minimum computing latency were obtained by a non-cooperative game. However, due to the limited endurance of UAVs, a single UAV cannot provide services for ground users efficiently, so the performance of multiple UAVs should also be considered.
In addition, some studies have considered the resource allocation in the more complex network environment. Alioua. et al. [18] comprehensively considered latency, energy consumption, link quality, and other factors in a multi-UAV-enabled road traffic monitoring scenario, and obtained a computation resource allocation strategy with better overall performance based on the sequential game. EI N.N et al. [19] considered device association, task assignment, and computational resource allocation problems comprehensively, and proposed an iterative algorithm based on block coordinate descent to minimize the energy consumption of mobile devices and UAVs. Yan et al. [20] considered the MEC network of a multi-UAV and multi-ground user scenario and constructed a Stackelberg game model: The UAV, as the vice-leader, maximizes the income by optimizing the location and pricing of computing resources. In addition, the user, as the follower, reduces the overhead by optimizing the offload allocation strategy. Dong et al. [21] points out that most studies focus on simple application scenarios, and the research on multi-UAV cooperative resource management in complex environments needs to be further deepened and improved.

Contributions
According to related works above and [22][23][24][25][26], game theory has a good application prospect in solving resource management of the MEC network recently. In addition, we found that multiple UAV applications should be considered in MEC resource management, and energy consumption, delay, and other aspects should be considered comprehensively in performance indexes to improve system performance comprehensively. In Stackelberg game, the player can decide the strategy at different layers. The followers respond to the leader's strategic actions and choose the best strategy. Therefore, players at all levels can consider their own interests and set different utility functions. Previous studies [27,28] have used the Stackelberg game to solve the problem of computing unloading in MEC, we extend it to the UAV-enabled application scenario, and it is different that we divide players into three layers based on the supply of computation. The contributions of this study are as follows: 1.
In the multi-UAV cooperative MEC network, we construct a multi-layer Stackelberg game model according to the different characteristics of base stations, UAVs, and users. And the equilibrium state is reached through several iterations to meet the maximum interests of players in each layer.

2.
Players at each layer of the Stackelberg game set the utility function according to their own interests and demands, and select the optimal computational offloading strategy to maximize the total utility of the system.

3.
Performance metrics such as computation latency and energy consumption are weighted to improve the performance of the system more comprehensively.

4.
The proposed SGA has a certain superiority and robustness. Compared with the benchmark scheme of random pricing strategy, it can achieve higher total system benefits in multiple different scenarios.

Model of Stackelberg Game
The main symbols in the model are given in Nomenclature.

Leader Sub-Game
In the MEC network, the ground base station has strong computing ability and continuous power supply, so the base stations act as the leader and the UAV as the vice-leader in the Stackelberg game. For each leader station g, the onboard edge server can receive computing tasks directly from the user or employ the UAVs as relay nodes to forward computing tasks from the users. The leader needs to set a different price M g i for each computing resource requested by user i, a corresponding price M g j for the employed relay UAV j. The computing resource F g of the leader is limited, and the computing resource allocated to the user i is F g i . Then we can obtain the profit P g that the base station by providing computing services to the user and the cost C g of employing the UAV as follows: where D i represents the computation task quantity of user i, Need g i = 1 indicates that user i needs to offload the computing task to base station g, Need j i = 0 indicates that the computing task of user i needs the assistance of UAV j, and γ r i indicates the proportion that user i chooses to forward the computing task to the base station through relay.
Then, the net income of the leader base station g can be expressed as U g = P g − C g , and the game of the leader layer can be formulated as: where M g i is the pricing set of all base stations for user i, M g j is the base station's pricing set for hiring UAVs, F g i is the resource set allocated to the user by the base station, I, J , G are respectively the set of users, UAVs, and base stations. The first constraint indicates that the computing resources of the base station are limited, the second and third constraints indicate that the pricing for user services and hiring UAVs should fall within a certain range, and the fourth constraint indicates that each UAV can only be employed by one base station.

Vice-Leader Sub-Game
In the MEC network, the UAV can act as a server to receive computing service requests from users or as a relay node to forward service requests from users to the base station. Role j i = 1 represents that the UAV j acts as a server, and Role j i = 0 represents a relay node when processing the computing tasks of user i. The benefits of these two roles are denoted as P compute j and P relay j , respectively. When acting as a server, the UAV sets a price m j i for the computing resources accessed by different users. As with the BS in the leader layer, the service resource F j of the UAV is also limited, and the resource allocated to user i is denoted as f j i . Then the profit P compute j and P relay j of the vice-leader can be expressed as: When UAV j acts as an edge server, there is overhead C compute j in processing computation tasks, and when acting as a relay, there is the communication cost C trans j in transmitting the tasks: Therefore, the profit of the vice-leader UAV j can be expressed as U j = P compute j , and the game of the vice-leader can be formulated as:

Follower Sub-Game
As a follower, user i taking the fees C pay i paid for computation services and the processing cost C compute i (including the computation latency and communication cost in transmission) into account and decides the offloading object and proportion based on the pricing strategy given in the leader layer and the allocated computing resources.
where p i denotes the user's transmission power, and γ l i , γ g i , γ j i and γ r i denote the allocation ratios for local computing, offloading to the base station, offloading to the UAV and forwarding to the base station via relay, respectively. Then, the utility function of user i can be expressed as: U i = −C compute i − C pay i , and the game of the follower can be defined as:

Computation Offload Model Based on Stackelberg Game
The game of base station, UAV, and user from the first three sections can form a three-layer heterogeneous Stackelberg game model, which can be expressed as: where G, J, I are the sets of strategy space, respectively. For this Stackelberg game model, to get the state of Stackelberg Equilibrium(SE), the set M should satisfied the conditions as follow:

Existence Analysis of the Equilibrium Solution
Theorem 1. Stackelberg Equilibrium point exists in the Stackelberg multi-layer game G.
Proof. As the leader, the utility of base station G is: get the partial derivatives respectively, there are: therefore, U g is monotonous to M get the partial derivatives respectively, there are: As follower, the utility of user I is: since C compute i and C pay i are constant for γ i , U i could be simplified as: therefore, U i is linearly related to γ i , and the game of this layer is a linear programming problem. The constraint given by (14) is a convex set, then the objective function U i obtains the optimal value at the vertex of the feasible domain [29]. In summary, the Stackelberg Equilibrium point exists in multi-layer game G.

Equilibrium Uniqueness Analysis of Stackelberg Game
Theorem 2. The stackelberg game equilibrium point is unique.
Proof. For the leader and vice-leader layer, it could be known from (20) and (22) (14) is a pyramid, so the vertex is unique, and the optimal solution of the follower layer is unique [29]. In summary, the Stackelberg Equilibrium point in multi-layer game G is unique.

1.
Parameters initialization, initialize the values of the parameters in the simulation environment and the strategy for the first round of the game. Get the distances between each base station, UAV and user. And users will choose to establish a connection with the nearest base station or UAV in the initial state.

2.
Resource pricing and allocation, the players in each layer play a game of resource allocation and pricing, updating the optimal strategy based on the current round in the order of leader, vice-leader, and follower, M Repeat step (2) for iterations, and eventually converge to equilibrium through multiple rounds of the game.

Simulation Parameter Setting
The basic simulation environment is a MEC network composed of two base stations, 6 UAVs, and eight users. The locations of the base stations, UAVs, and users (randomly generated) are distributed in a Cartesian plane coordinate system as shown in Figure 2. The computing resources of base stations, UAVs, and users are all 64 GB, 8 GB, and 32 MB, respectively. In addition, the computation amount of users are random in 10 MB∼1 GB. Other parameters are shown in Table 1. The program design and result diagram of the simulation are completed in MATLAB, and the operating system is Windows 10, 64-bit professional version. The base stations, UAVs, and users in the simulation scene are virtual devices imitating real device parameters.   Figure 3 shows the iteration of the three roles of the base station, UAV, and user in the Stackelberg multi-layer game. It can be found that after about 250 iterations, the income or overheads of players at each layer finally reached the equilibrium state, indicating that the algorithm can achieve Stackelberg equilibrium. During the whole process, as shown in Figure 3a, the incomes of BS1 and BS2 were basically stable, which changed suddenly at about 150 iterations and returned to equilibrium after about 50 iterations. In Figure 3b, the overhead of user2 changed dramatically about 150 iterations, indicating that user2 switched the offloading object. And after about 50 iterations, user2 reached the equilibrium state. The overheads of other users gradually increase in the oscillation and enter the equilibrium state when they reach the certain values, which indicates that the prices for computation services had reached the maximum value, and the offloading objects had not changed during that period. In Figure 3c, the incomes of UAVs fluctuated greatly before convergence, indicating that the competition of UAVs in the game of resource allocation was fierce. We can also find that after about 150 iterations, the incomes of UAVs were oscillations in several points, but as they gradually entered the equilibrium state, there were fewer and fewer oscillations until they reach the equilibrium and no longer oscillate. The specific computation offloading situation in Stackelberg equilibrium is shown in Figure 4.

Simulation Result and Performance Comparison
The benchmark algorithm is RANDOM (the users decide the offload objects and proportions randomly) and LOCAL (all users execute the task locally), and the total profit of a multi-level game is used as the performance evaluation standard. The total profit of the system can be expressed as: As shown in Figure 5, we compare the total system profits of the Stackelberg game algorithm (SGA) with RANDOM and LOCAL. Firstly, it can be found that the SGA strategy reached an equilibrium state after about 250 iterations. Secondly, the total system profit of SGA in the equilibrium state is about 80% more than that of random strategy, and the profits of SGA and RANDOM are more than LOCAL.
We also compare the SGA in an equilibrium state with the RANDOM and LOCAL strategy in five different scenarios, as shown in Figure 6. Figure 6a shows the total system profit in the scenarios where the quantity of users is 2, 4, 8, 12, and 16, respectively. We can see SGA is significantly better than RANDOM and LOCAL in all five scenarios, and the total profit of the system increases with the quantity of users. Figure 6b is the performance comparison chart of SGA, LOCAL, and RANDOM in scenarios with different user positions, and the coordinates of users in the other four scenarios are also randomly generated. It can be found that the SGA algorithm is superior to RANDOM and LOCAL in these scenarios. In addition, we can find that the total system profit of RANDOM fluctuates greatly, and the profits in some scenarios are not as good as the LOCAL. While the total system profit of SGA is more stable. Figure 6c is  Since the amount of computation directly affects the overhead, it is normal for the total system profit to fluctuate.

Conclusions
This study aims to solve the problem of computing resource management in a multi-UAV-enabled edge computing scenario. According to the different interests of base stations, UAVs and users, we construct a three-layer Stackelberg game model by comprehensively considering computing latency, energy consumption, and specific profit. The equilibrium state is achieved after several iterations and verified by simulation. The Stackelberg game algorithm has better total system profit in multiple different scenarios and has certain robustness in the equilibrium state than the random strategy. Therefore, in the future scenario of multi-UAV-enabled edge computing, Stackelberg game theory has application prospects in solving complex resource problems.