Computation ofﬂoading game in multiple unmanned aerial vehicle-enabled mobile edge computing networks

Because of extreme sensitivity to time and energy consumption, many computation- and data-intensive tasks are difﬁcult to implement on mobile terminals and cannot meet the needs of the rapid development of mobile networks. To solve this problem, mobile edge computing (MEC) appears to be a promising solution. In this study, we propose two ofﬂoading schemes in the multiple unmanned aerial vehicles (UAVs) enabled MEC network. Their optimisation goals are to minimise the global computing time and energy consumption of all UAVs, respectively. Different from previous research, the UAV can perform tasks locally or ofﬂoad an appropriate percentage to the desired MEC server in the two proposed schemes. In order to get the minimum global computing time, we prove the existence condition and obtain the optimal ofﬂoading proportion. In addition, in order to minimise global energy consumption, we also obtain the optimal ofﬂoading proportion and present the optimal transmission power through solving Karush–Kuhn–Tucker conditions. Finally, because UAVs are selﬁsh, we adopt the game theory to get optimal solutions of the proposed ofﬂoading strategies. Numerical results verify that the proposed schemes can effectively decrease the global computing time and energy consumption, especially for a large number of UAVs.


INTRODUCTION
With high mobility and low cost, unmanned aerial vehicles (UAVs) have been widely used in the past few decades. Initially, UAVs were mainly used in the military field to reduce pilot losses [1]. In recent years, with the ever-decreasing cost and miniaturisation of equipment, UAVs have many new applications in the civilian and commercial fields, such as remote sensing monitoring [2], traffic control [3], cargo transportation [4], and emergency rescue [5]. [8,9]. In [10], the UAV provided wireless communication is used as a flight base station (BS) for device-to-device communication networks. In [11][12][13], UAV acted as a relay, which was an effective technical solution for wireless communication between remote or blocked ground terminals. In [14,15], UAV was used as a mobile data collector to extend network lifetime. Besides, UAVs can be utilised in many communication applications. A new UAV-enabled wireless power transfer system was considered in [16], where a UAV-mounted energy transmitter broadcasts wireless energy to charge receivers on the ground. The issue of secure transmission was considered in [17], where UAV provides video for user equipment (UE) in some small cells. Some researchers have studied the optimisation of the position and trajectory of the UAVs to achieve maximum user coverage [18][19][20][21]. The problem of energy consumption in wireless networks always is the focus of research [22][23][24][25][26]. Similarly, due to the limited resource of UAVs, the authors considered the energy consumption and resource allocation in the networks [23]. Recently, many scholars have paid attention to the task assignment and resource allocation in mobile edge computing (MEC) [24,25]. The proposal of MEC made it possible for UAVs to perform heavy computing tasks [26]. Since the MEC server can be deployed near the UAVs, the UAV-enabled MEC network can improve the computing performance and provide low latency and low energy consumption for UAVs [27]. In [28], the authors jointly optimised user association, power control, and location planning, and solved the problem of minimising the total sum power of multiple UAVs.
Many studies have been published on the MEC optimisation methods. For different optimisation goals, different offloading optimisation methods can be used in the computational offloading. In [29,30], the authors modelled the computational offloading optimisation problem as an integer programming problem to obtain the optimal solution for the task offloading scheme. The authors of [31,32] both used heuristic algorithms to obtain approximate global optimal solutions. There are also some researchers that used convex optimisation algorithm to solve the resource allocation problem in MEC and obtained the optimal resource allocation scheme [28,33]. In [34,35], the scholars adopted different game theory models to simulate the interaction among the MEC servers and users and proposed the optimal offloading strategies by formulating cost function.
In addition, some scholars pay attention to the problem of computation offloading in UAV-enabled MEC network [36][37][38][39]. In [36], the computation efficiency was maximised by jointly optimising the offloading time, the transmit power of the user and the trajectory of the UAV. In [37], the authors considered minimising the total energy consumption of the system and meeting the quality-of-service requirements of mobile applications. Although there are some excellent works on UAV-enabled MEC networks in terms of computation offloading, UAVs were mostly deployed as flying MEC platforms to provide computing resources to UEs. In fact, UAVs only have limited hardware and energy resources. When UAVs need to deal with very heavy computing tasks, the calculation of heavy tasks can lead to slower response speed and also be detrimental to battery life, which may eventually affect the success of the tasks. Therefore, if UAVs offload computing tasks to MEC servers, it can effectively reduce computing time and reduce energy consumption. Compared with [36][37][38], UAVs are deployed as UEs in [39]. And the authors considered the offloading problem of computing tasks of UAVs and achieved the best balance among energy consumption, time delay and calculation cost. However, they considered the computation offloading as a binary offloading mode and ignored the fact that the computing tasks could be split, which might result in a suboptimal offloading strategy.
In this study, we consider the UAV-enabled MEC network, in which UAVs offload computing tasks to the MEC server. Due to most applications being sensitive to computation time and UAVs have limited hardware and energy resources, we consider two problems of minimising computing time and energy consumption. The optimised time includes the transmission time and the computing execution time of the computing task on the UAV and MEC server. The optimised energy consumption takes into account the energy consumption of all UAVs.
In these two problems, the computing tasks can be split, and our purpose is to obtain the optimal offloading proportion. We prove the existence condition of the minimum value in the computing time problem. In addition, we also obtain the optimal transmission power in the energy consumption problem. Next, we convert the optimisation problems into two offloading strategy selection problems. In order to get the optimal offloading strategy, we propose two effective optimisation algorithms based on game theory, that is, the minimum computing time algorithm (MCTA), and the minimum energy consumption algorithm (MECA). The simulation results show that the global computing time and energy consumption can be significantly reduced in our proposed algorithm with the increase in the number of UAVs.
The main contributions of this study are summarised as follows: 1. We consider a more flexible computation offloading problem in UAV-enabled MEC network. In this scenario, UAV can offload an appropriate percentage of computing tasks to the desired MEC server, which satisfies the requirement of time efficiency and energy consumption. 2. We propose two optimisation schemes, that is, the minimum computing time and the minimum energy consumption schemes. In the minimum computing time problem, we prove the existence conditions of the optimal offloading proportion and also obtain the optimal solution of computing time. In the minimum energy consumption problem, we first obtain the optimal offloading proportion. Then, we obtain the optimal transmission power by solving the Karush-Kuhn-Tucker (KKT) conditions. 3. In order to solve the two schemes effectively, we convert the optimisation problems into the offloading strategy selection problems and present the solutions based on game theory. Simulation results show that the algorithms can achieve convergence and effectively reduce global computing time and energy consumption for UAVs.
The remainder of this study is organised as follows. Section 2 introduces the network scenario and system model. We give two optimal computation offloading strategy in Section 3, which includes two optimisation problems and two offloading algorithms. Numerical simulation results and some theoretical analysis are presented in Section 4. Finally, conclusions are given in Section 5.

Network model
As shown in Figure 1, we consider a multi-UAV and multi-MEC servers' network, where N UAVs are covered by a macro base station (MBS) and M small base stations (SBSs). In this network, the SBSs and UAVs are evenly distributed. The SBSs are connected to the core network through wired fibers. One lightweight MEC server is deployed around one SBS so that the In order to avoid interference among multiple UAVs, multiple access technology, for example, time division multiple access (TDMA) can be adopted.
If the computing tasks are heavy for UAVs, the UAVs will choose to offload them to the MEC server according to their hardware resources and latency requirements. The UAV first uploads its computing task information and location information to the SBS, and the SBSs within MEC network exchange the information with each other. Then, the SBSs return the information of others to each UAV connected to itself. For any computation task I i of UAV i, it can be described in two terms, that is, where b i denotes the data size of the computing task I i transmitted to the MEC server j, and s i is the required CPU cycles to finish I i . The UAV i can offload computing tasks to any one MEC server, or perform computing tasks locally without offloading. Let λ i,j ∈{0,1} denote the offloading factor between the UAV i and the MEC server j, where λ i,j = 1 means that the UAV i decides to offload the computing task to the MEC server j, otherwise λ i,j = 0. Assume that each UAV can only select one MEC server to offload the computing task, that is, and the MEC server j can provide computing service for multiple UAVs at the same time, that is,

Communication model
Assume that UAV's location change within each iteration slot can be ignored, compared to the distance from the UAV to the MEC server. Denote that the coordinate of UAV i are (x i , y i , h i ) and the coordinate of MEC server j are (x j , y j , 0) as shown in Figure 1. The horizontal distance between UAV i and MEC server j is calculated as The data transmission rate r i of UAV i can be expressed where B represents the bandwidth of the selected channel when the task is offloaded, p i represents the transmission power of UAV i, = g 0 ∕ 2 , g 0 as the channel power gain at the reference distance 1 m and set g 0 = 1.42×10 -4 , σ 2 represents the noise power [28].

OPTIMAL COMPUTATION OFFLOADING STRATEGY
This section is divided into two sub-sections. The first part describes the problem of the minimum computing time. The computing time includes transmission time and execution time of the tasks on the UAVs and MEC server side. The second section describes the problem of the minimum energy consumption. The energy consumption only considers the energy consumption of all UAVs in the execution of computing tasks.

The minimum computing time
When UAV i runs a computing task, there are two possible execution locations of the computing tasks. One is performed locally by the UAV i, and the other is offloaded to the MEC server. Limited by the hardware resource, it would be the first choice to offload the computing task to the MEC server. However, if UAVs offload all their tasks to MEC server at the same time, it will cause a certain amount of congestion, which increases the task computing time. Therefore, the minimum computing time problem is to find an optimal computation offloading strategy for all UAVs' computing tasks, which minimises the global task computing time.

Problem formulation
Suppose that the task offloading proportion of UAV i is x i , so the locally computing proportion is (1 -x i ). Then, we know that the local computing time is where f i local represents the local computing capacity of the UAV i.
If the UAV i selects MEC server j to offload the computing task, the task processing time T i,j cloud mainly contains two parts, that is, the transmission time and computing execution time of the task processed by the MEC server j. Then, the task processing time on the MEC server j side can be expressed as where it represents the computing capacity allocated by the MEC server j to the UAV i, and where indicates the number of UAVs that all choose to offload the computing task to the MEC server j.
Because of simultaneously happening of the UAV and MEC server computation, the task computing time of the UAV i is Based on Equation (6) and offloading factor λ i,j , the computing time of UAV i can be rewritten as This indicates that the computing time is valid when the UAV i has established the offloading relationship with the MEC server j.
Our final optimisation goal is to minimise the task computing time of all UAVs; so letT = . The minimum computing time problem can be described as follows: In Equation (8), the first constraint indicates that the sum of the computing resources allocated by the MEC server j for the UAVs does not exceed its maximum computing capacity; the second constraint indicates that the total computing time is lower than the maximum tolerable execution time T i max of the UAV i; the third constraint represents the range of the uplink transmission power of the UAV i; the fourth constraint indicates that the UAV i has a certain computing capacity f i local .

Optimal offloading proportion for the minimum computing time
After one MEC server is selected, the proportion x i of offloading task determines T i local and T i,j cloud . According to Equation (6), we can know that the task computing time T i of the UAV i depends on the maximum value of the local computing time T i local and the MEC server-side computing time T i,j cloud .

Lemma 1. If and only if T local
, the optimal T i * exists and the task computing time T i reaches a minimum value, and the optimal offloading proportion x i as below: Proof: The computing time of the UAV i has three possible situations, that is, . ).
In summary, the optimal T i * exists in case 3, that is, when , the task computing time T i have a minimum value.
Based on Equation (8), the problem (7) can be converted to In order to solve Equation (9), we need to obtain the optimal offloading proportion x i according to the distance among the UAV and the BS and the computing capacity of the MEC server. Therefore, the problem (9) can be transformed to an offloading strategy problem.

3.1.3
Optimal offloading strategy for the minimum computing time To solve the offloading strategy problem, we adopt the game approach to find the optimal strategy and the minimum computing time. Game theory is considered as a powerful tool to analyse the conflicts among multiple game players that are supposed to realise their own interests.
We adopt a dynamic non-cooperative game to obtain efficient multi-UAV computation offloading decisions. The dynamic game refers to the fact that the players can observe the actions of the players who acted before them and make their own decision accordingly. In the non-cooperative game, the players do not have a common agreement, and each player pursues the best personal decision.
Let a i indicate the offloading strategy of UAV i, and let a -i indicate the offloading strategy of the other UAVs excluding UAV i. The goal of the game is to minimise the computing time of each UAV, that is, where T i (a i , a −i ) is the computing time function of UAV i based on the current strategies, and it can be expressed as The offloading strategy problem can be described as a distributed offloading strategy game, which can be denoted by where N represents all game players, { i, j } i∈N is the strategy set of player i, {T i (a i , a −i )} i∈N is the computing time function of UAV i in the game. Nash equalisation (NE) is a state of non-cooperation game, in which no player can improve its utility by changing its decision. According to the NE existence theorem, the games where the players have a finite pure strategy set, there is at least one NE point [40]. Our offloading strategy game has finite players and offloading strategy space, and each player can only choose a pure strategy from a limited set of offloading strategy. Thus, our game has the NE. That is, in each iteration, UAV determines whether there is a better decision based on the existing decisions of other UAVs then requests to update it. But in each iteration, the network only updates one UAV decision. Based on the premise that each UAV is rational, the game will reach NE over a limited iteration. In this state of NE, no UAV can further reduce computing time by changing its strategy. The strategy of the equilibrium point is denoted as where a time* is the optimal strategy for the minimum computing time. In addition, the optimal computing time T i can be expressed as In order to get the equilibrium point strategy a time* , we propose an effective algorithm, that is, MCTA. In this algorithm, it is assumed that UAVs can get all the information, including the distance, the computing capacity of the MEC servers, and the size of computing tasks. First, each UAV selects the nearest  Initialise: N, M, B, p i ,σ 2 , b i , s i , f j , f i local ; an offloading strategy space of the UAVs(a i , a −i ); the initial offloading strategy of the UAV i, that is,(a i , a −i ); the initial computing time T (a i , a −i ) based on the initial strategy; the update set = ∅of the UAV i; the computation time update set = ∅;

3.
for all UAV i do 4. change strategy, compute x i , T i ( i,k ), and compute whether MEC server as the initial strategy. Then, within each iteration, all UAVs calculate whether a better strategy exists and determine whether it is globally optimal. If T (a i ′ , a −i ) < T (a i , a −i ), store it to the updated D, T. When the D is not empty, the system updates the optimal strategy and broadcasts to other UAVs. Finally, all UAVs have no better choice than current strategies, which indicates that the network has reached the NE, and the proposed algorithm has converged to the global optimal solution.

The minimum energy consumption
Due to the limited energy resource of UAV, we consider the problem of energy consumption in this section. Similar to the minimum computing time problem, UAV can offload any proportion of computing tasks to the MEC server. In addition, in order to minimise energy consumption, we also consider the transmission power of UAV. The minimum energy consumption problem is to find the optimal computation offloading strategy so as to meet the real-time requirements of the computing task while minimising the energy consumption of all UAVs.

Problem formulation
If the UAV i chooses local computing, the energy consumption can be given by where ε local denotes the consumed energy per CPU cycle of UAV i. If the UAV i chooses to offload the computing task with the proportion x i to the MEC server j, then the energy consumption can be given by where the first item is the energy consumption of the UAV, which transmits the computing task. The second item is the energy consumption of the UAV, which handles the rest of the computing task. Based on Equation (17) and offloading factor λ i,j , the energy consumption of UAV i can be rewritten as Our final optimisation goal is to minimise the energy consumption of all UAVs; so let . The minimum energy consumption problem can be mathematically formulated as In Equation (19), the first constraint indicates that the UAV's energy consumption for offloading computing task should be less than executing locally; the second constraint indicates that the total execution time is lower than the maximum tolerable time T i max of each UAV i; the third constraint represents the sum of the computing resources allocated by the MEC server j for the UAVs do not exceed its maximum computing capacity; the fourth constraint denotes the range of the uplink transmission power of the UAV i; the fifth constraint indicates that the UAV i can only select one MEC server to offload the computing task.

3.2.2
Optimal offloading proportion for the minimum energy consumption For a given UAV offloading factor λ i,j and transmission power p i of problem (19), we can get the optimal solution of the offloading proportion x i as follows.
The partial derivative of Equation (17) is shown below: According to the first constraint E cloud i, j < E i local of problem (19), we can get and implies that the function is a decreasing function respect to x i .

Lemma 2.
For the certain offload strategy and the transmission power of each UAV, the optimal offloading proportion x i can be expressed as Proof: According to Equations (20) and (21), we can know that the larger the value of the offloading proportion x i , the less the energy consumption of the UAV i. The range of offloading proportion x i is from 0 to 1, thus x i ≤ 1.
According to the second constraint condition of Equation (19), we have . Therefore, the optimal offloading proportion x i can be expressed as x i = min{

3.2.3
Optimal transmission power for the minimum energy consumption For a certain UAV offloading factor λ i,j and offloading proportion x i of problem (19), we can get the optimal solution of the transmission power p i of each UAV i as follows.
According to Equations (3) and (17), let̄= ; then the energy consumption of UAV i can be expressed as According to Equation (22), the energy consumption is only related to the first term. Let e i = p i ⋅ , the problem (19) can be simplified as We rewrite the objective function through variable substitution, that is, let i =  (24) can be formulated as For each UAV i, if y = ī (2 i ∕ i − 1), the first derivative of the objective function exists, and the second derivative is Due to 2 y 2 i > 0, problem (25) is a convex problem. Then, the KKT conditions is a necessary and sufficient condition for the optimal solution. The Lagrange function of problem (25) can be obtained as where the variables μ i , v i are all non-negative coefficients representing the Lagrange multipliers. The KKT conditions are as follows for ∀i.
iteratively solving the offloading proportion x i and transmission power p i . The specific algorithm is shown in Procedure 1.

3.2.4
Optimal offloading strategy for the minimum energy consumption Next, we adopt the game approach to find the optimal strategy and achieve minimum energy consumption for all UAVs.
Similar to the minimum computing time problem, the game goal of this part is to minimise the energy consumption of each UAV, that is, , ∀i ∈ N is the energy consumption for UAV i based on the current strategies.
The game can be denoted by where {E i (a i , a −i )} i∈N is the energy consumption function of UAV i in the game. Similar to Equation (14), the game in Equation (31) also have the NE over a limited number of iterations.
In the state of NE, no UAV can further reduce energy consumption by changing its strategy. Similarly, in order to get the equilibrium point strategy a energy* , we propose an effective algorithm, that is, MECA. First, each UAV selects the nearest MEC server as the initial strategy. Within each iteration, the UAV i can change strategy and iteratively solve the optimal offloading proportion x i and optimal transmission power p i . If E (a i ′ , a −i ) < E (a i , a −i ), store the updated D ′ , E. Then, the system updates the optimal strategy and broadcasts to all UAVs. At last, when the D ′ is empty, it indicates that the proposed algorithm has converged to the global optimal solution.

NUMERICAL RESULTS AND DISCUSSION
In this section, we evaluate the performance of the proposed two algorithms, that is, the MCTA and MECA. At the same Algorithm 2 Minimum Energy Consumption Algorithm 1. Initialise: An offloading strategy space of the UAVs (a i , a −i ); set the initial offloading strategy of the UAVi,(a i , a −i ); the initial energy consumption E (a i , a −i ) based on the initial strategy; the update set ′ = ∅ of the UAV i; the energy consumption update set = ∅; 2. for each iteration l 3. for all UAV i do time, we present some comparison results between our proposed algorithms and other available algorithms. The bandwidth of the network is B = 1 MHz. For each UAV, we set the altitude as H j = 10 m, and the distance between UAVs to MEC server is from 100 to 1000 metres that follows a uniform distribution. Each UAV's computing task data size b i is from 20 to 200 KB that follows a uniform distribution. And the required CPU cycles range from 1000 to 5000 megacycles that follows a uniform distribution. The computing capacity of the MEC server is 4 GHz, and the computing capacity of the UAV is 0.1 GHz. In order to verify the effectiveness of our proposed algorithms, we first compare the MCTA and MECA with their benchmark algorithms, respectively. The benchmarks in this experiment are exhaustive search algorithms, and the results are shown in Figures 2(a) and (b). The exhaustive search algorithm is mainly used to traverse the set of MEC servers selected by the UAVs, that is, j ∈ M = {1, 2…, M}. The number of MEC server is set to 4, and the number of UAV is changed from 1 to 8. It can be found that in Figure 2(a), when the number of UAV is 5, the minimum computing time of the MCTA and the exhaustive algorithm is 0.000213. In Figure 2(b), when the number of UAV is 6, the difference in value between the MECA and exhaustive algorithm is only 0.001. Therefore, the computing time and energy consumption of our proposed algorithms are very consistent with the benchmark algorithms. In addition, the proposed algorithms have less complexity since the complexity of the two exhaustive algorithms are O(M N ), which indicates that our algorithms can provide the optimal solution for our problems.  The number of UAV is N = 20, 35, 50, and the number of MEC server is 8. It can be easily seen that the computing time or energy consumption always decreases gradually as the number of iterations increases. After a limited number of iterations, the two algorithms can achieve numerical convergence. In addition, the minimum computing time and the minimum energy consumption of the two algorithms are related to the number of UAVs. The larger the number of UAV, the greater the value of the minimum computing time and energy consumption. But the needed iterations are similar when the two algorithms reach convergence, so the MCTA and MECA apply to any number of UAV.
In order to verify the performance of our proposed algorithms, we simulated a comparison with other offloading algorithms as shown in Figures 4(a) and (b). First, Figure 4(a) shows the comparison results of the binary offloading algorithm (BOA), local computing algorithm (LCA), all offloading algorithm (AOA) and the MCTA. In order to make a fair  comparison, other algorithms also adopt game theory to obtain the optimal strategy. At this time, the number of MEC server is set to 10. Under the BOA, UAV's computing tasks are not split, and either all are offloaded to the MEC server or are executed locally. The LCA is that the computing tasks are performed locally, while the AOA is that the UAV offloads all computing tasks to the MEC server. It can be seen from Figure 4(a) that there is just a little difference among the minimum computing time of the four algorithms when the number of UAV is five. When the number of UAV reaches 50, the proposed MCTA reduces the computing time by about 45%, 53%, and 64% compared to LCA, BOA and AOA, respectively. Therefore, the MCTA can effectively reduce the computing time, especially for a large number of UAVs. This is because the MCTA can flexibly choose any percentage of computing tasks to offload.
Similarly, Figure 4(b) shows the comparison results between LCA, AOA and the proposed MECA. The other strategies also adopt game theory to obtain the optimal strategy. At this time, the number of MEC servers is set to 8. In the Figure 4(b), when the number of UAV is 20, one can see that the MECA  reduce the energy consumption about 58% and 75% compared with AOA and LCA, respectively. It is clear that the proposed MECA shows the least energy consumption for the same number of UAVs. This is because the MECA can not only offload the computing tasks to any MEC server but also has the flexibility to choose any percentage of computing tasks to offload. Numerical results not only demonstrate the need to use multiple MEC servers for computing offloading in UAV-enabled MEC network but also demonstrate that the proposed MECA can effectively reduce the energy consumption of all UAVs.

CONCLUSION
Most applications of UAV-enabled MEC networks are sensitive to time and energy consumption, but UAVs have limited resources. In this study, we consider the two problems of minimising global computing time and energy consumption for UAVs. Different from the previous works, the computing tasks can be split to make full use of the computing resources of the networks. We prove the existence conditions of the minimum computing time and obtain the optimal solution of the offloading proportion. Moreover, we also consider the impact of transmission power on the offloading proportion and obtain the minimum energy consumption. Next, in order to obtain the optimal offloading strategy, we propose the effective MCTA and MECA based on game theory. Simulations show that the proposed algorithms have less complexity and are suitable for the scenario of a large number of UAVs. In future work, we will focus on the joint optimisation problem of computing time and energy consumption and consider the situation in which the MEC server allocates computing capacity under the influence of UAV network uncertainty.