Collaborative offloading for UAV-enabled time-sensitive MEC networks

Recently, unmanned aerial vehicle (UAV) acts as the aerial mobile edge computing (MEC) node to help the battery-limited Internet of Things (IoT) devices relieve burdens from computation and data collection, and prolong the lifetime of operating. However, IoT devices can ONLY ask UAV for either computing or caching help, and collaborative offloading services of UAV are rarely mentioned in the literature. Moreover, IoT device has multiple mutually independent tasks, which make collaborative offloading policy design even more challenging. Therefore, we investigate a UAV-enabled MEC networks with the consideration of multiple tasks either for computing or caching. Taking the quality of experience (QoE) requirement of time-sensitive tasks into consideration, we aim to minimize the total energy consumption of IoT devices by jointly optimizing trajectory, communication and computing resource allocation at UAV, and task offloading decision at IoT devices. Since this problem has highly non-convex objective function and constraints, we first decompose the original problem into three subproblems named as trajectory optimization (PT\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathbf {P}_{\mathbf {T}}$$\end{document}), resource allocation at UAV (PR\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathbf {P}_{\mathbf {R}}$$\end{document}) and offloading decisions at IoT devices (PO\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathbf {P}_{\mathbf {O}}$$\end{document}) and then propose an iterative algorithm based on block coordinate descent method to cope with them in a sequence. Numerical results demonstrate that collaborative offloading can effectively reduce IoT devices’ energy consumption while meeting different kinds of offloading services, and satisfy the QoE requirement of time-sensitive tasks at IoT devices.

difficult to deploy MEC servers. Hence, UAV is extensively employed as an aerial MEC node for service coverage in surveillance, data collection, disaster relief, and public safety due to its excellent flexibility and mobility [9]. Although UAV-assisted MEC provides IoT devices with remote resources, it still faces the challenge of communication and computation design due to the limited embedded battery of UAV and IoT devices, and several prior related works have been done to minimize the energy consumption of ground or sensor nodes (GNs/SNs) [10][11][12]. To be specific, the total UAV energy consumption while satisfying the communication throughput requirement of GN was investigated in [10], and the authors in [11] employed UAV for minimizing the maximum energy consumption of SNs. In addition, the energy consumption tradeoff between UAV and GNs had been investigated in [12], where authors attempted to reduce the overall weighted energy consumption between SNs and UAV, while ensuring the required amount of data collection from each SN just as [11] investigated.
However, offloading energy-consuming workloads to UAV also invokes extra latency which significantly affects the QoE of IoT devices, and thus cannot be ignored in the system design. Recently, some inspiring related works have considered the QoE requirement of time-sensitive tasks of IoT devices [13][14][15][16][17]. Specifically, the energy consumption of GNs, or UAV, or the weighted sum of energy consumption of IoT devices and UAV were investigated in [15][16][17] with the consideration of time-sensitivity for task offloading, respectively. Meanwhile, to minimize the maximum task latency, authors in [18] designed a novel penalty dual decomposition-based algorithm by jointly optimizing UAV trajectory and task offloading. Due to the limited battery capacity and computation resources of IoT devices, the tradeoff between the energy consumption and time sensitively has also attracted significant attention [19][20][21][22]. More specifically, authors in [19] utilized the modified genetic algorithm NSGA-II to solve a multi-objective problem of GNs' average energy consumption and latency time, while the authors in [21] aimed at minimizing the weighted sum of the service delay of all IoT devices and UAV energy consumption. Besides, an alternative optimization algorithm based on successive convex approximation (SCA) was derived to minimize UAV energy and completion time by jointly optimizing computing offloading, resource allocation and trajectory in [22].
Ordinarily, an application consists of several divisible and logically independent tasks. For example, an AR application consists of five critical tasks: video source, tracker, mapper, object recognizer, and renderer. Among these tasks, the tracker, mapper, and objective recognizer are computation-intensive components which can be offloaded to MEC servers to compute or store for follow-up processing [23]. To our knowledge, larger amounts of data and tasks are generating and waiting for proceeding with the explosive growth of smart terminals in the era of big data. To meet the challenge, data caching can be regarded as an effective way to deal with these tasks, and efficiently tackle the following two dilemmas: (1) strong channel gain but insufficient computation capability at UAV, the GN could have offloaded more data to ease its burden of computing; (2) weak channel gain with sufficient computation capability at UAV, the UAV could have computed more for GNs to improve the performance of networks. With the help of data caching, we can foster efficiency in the use of channel and computation capability at UAV concurrently. To be specific, although UAV is engaged in calculation for other GNs at the moment, GN can transmit more data in virtue of better channel gain. Furthermore, these abundant data or tasks can be buffered first, and wait for processing till UAV has sufficient computation resources. Meanwhile, the computation capability will not be wasted at the situation that GN has low-rate transmission due to poor channel gain, UAV can process the cached data instead.
Nevertheless, these pioneering works above just investigated the single task of IoT devices, and focused on either data collection [11,12] or computing offloading [14-19, 21, 22], but ignored the effectiveness of data caching. In the meantime, time-sensitivity has been one of most important metric for network performance, and triggered a great deal of research interests in applications related with UAV. Therefore, in this paper, collaborative multi-task computation and caching offloading for UAV-enabled MEC networks is investigated to minimize the total energy consumption of GNs, 1 where the trajectory along with communication and computing resource allocation at UAV is optimized, and task offloading decision at GNs is determined, to satisfy the QoE requirement of time-sensitive tasks of GNs. The main contributions of this paper are summarized as follows: • Collaborative multi-task computation and caching offloading are considered to take full advantage of communication and computation resources. • To our knowledge, it is the first attempt to investigate the energy consumption associated with data caching operations, and consider the collaborative offloading. • Since the applications generated by GNs can be divided into several tasks, the QoE requirement of latency is considered for both the single task and the whole application of GNs.

System model and problem formulation
A UAV-assisted MEC system with multiple IoT devices denoted by K = {1, 2, . . . , K } is considered based on frequency division multiple access (FDMA), as shown in Fig. 1, where the UAV is equipped with an embedded MEC server providing computing resource and data storage service to IoT devices during its navigation. The origin and destination points are denoted by Q 0 and Q F 2 respectively, and the period of the whole navigation between Q 0 and Q F is given by T, which is further divided into N time slots belongs to the set N , and the length of each is τ , τ = T /N . In this system, the three-dimensional Assume that each IoT device has an energy-consuming and delay-sensitive application to be executed within T k , which defines the kth GN whole mission delay and must not exceed the mission period T, given as T k ≤ T , ∀k . Herein, partition-oriented applications are investigated, such as virus scan application and figure compression application [24], and the application can be divided into N logically independent tasks w.r.t. the time slots. Furthermore, each logically independent task can be arbitrarily divided into several partitions to support parallelism, and thus handled locally and at the UAV concurrently since the amount of data to be processed is known in advance for this kind of applications [23]. To be specific, the kth IoT device generates a task described by a tuple of five parameters indicates the amount of input data to be processed, a k [n] is the indicator of task type, i.e., a k [n] = 1 for computing, a k [n] = 0 for caching, θ k represents the number of CPU cycles for computing 1-bit of input data, l k [n] ∈ [0, 1] is the proportion of s k [n] offloading to UAV, while the rest (1 − l k [n])s k [n] bits are processed at local, and τ k [n] is the maximum tolerable latency shorter than τ . Denote C k and C as the storage capacity of the kth IoT device and the UAV in bits, respectively. Due to hardware limitations, the total storage resource assigned to IoT devices must satisfy  the local CPU frequency of the kth IoT device is characterized by f k , and f k,u [n] is the computing resource allocated to the kth IoT device by the UAV at the nth time slot, where both of them are measured by the number of CPU cycles per second. Moreover, a practical constraint that the total computing resources allocated to all the associated IoT devices cannot excess the UAV's computation capability F, is given by k∈K a k [n]f k,u [n] ≤ F.

Task latency
Suppose that the application generated by the kth GN can be divided into several tasks, which are scheduled into N slots and further partially offloaded to the UAV. With the consideration of time-sensitivity, we assume there are QoE requirements for the single task and the application, respectively. Denote t k [n] as the latency for the kth GN at nth slot, and the one for the application of kth GN must not exceed T k , given as, N n=1 t k [n] ≤ T k , ∀k , the details of which are given in the following.

Local computing mode
By assuming there is no further operation required for caching the residual part locally, we consider the local computing for executing the residual part (1 − l k [n])s k [n] with computation capability f k at the kth IoT device, the time consumption of which is given by

Offloading mode
It is assumed that the wireless channel between the UAV and the kth IoT device is dominated by line-of-sight link [25], and the channel between the UAV and IoT devices is modeled by the free space path loss model. Therefore, the channel gain h k [n] from the kth IoT device to the UAV at the nth time slot is given where ρ 0 represents the channel gain at the reference distance d 0 = 1 meter. Since the change of UAV position is negligible when the LoS link path is applied, the channel gain remains constant within each slot. Assume that the total available bandwidth B is shared among IoT devices with a proportion Bb k [n] for each during a time slot, and the sum of the bandwidth allocated to IoT devices cannot exceed the total bandwidth, K k=1 b k [n] ≤ 1, ∀n . Thus, the achievable offloading rate at the kth IoT device is given as where P k denotes the transmit power of the kth IoT device, and N 0 is the noise power dense at the UAV.
The offloading time t off k [n] of the kth IoT device mainly consists of two parts 3 : the uplink transmission time t up k [n] from the IoT device to the MEC-integrated BS, and the corresponding execution time at MEC server t ex k [n] for the computing and the caching task, respectively. It's assumed that there is no further processing for cached data at UAV and the operation will always succeed. The caching time is negligible and the result of caching operation need not be returned. Thus for the offloading caching task, we only take the task transmission time into account. Therefore, the offloading time for both the computing and the caching task can be written as Due to the parallel computing at IoT devices and the UAV, the total latency for the kth IoT device depends on the larger one between t loc k [n] and t off k [n] , which can be recast as , t off k [n]}, ∀k, n.

Energy consumption
Since GN tasks can be computed or cached locally or in UAV, both the computing and caching operation are charged for energy consumption. Similar to [26], the in-memory caching energy consumption model is adopted for both UAV and GN, in which the energy consumption is proportional to the cached task bits. Additionally, the signal transmission consumption of GNs and UAV propulsion energy are also included.

Energy consumption at the IoT device
The energy consumed by the kth IoT device includes the cost of uploading and the part of local operation, which varies according to corresponding task type. For a local computing task, the power consumption of the processor at the kth IoT device is modeled as η k f 3 k (joule per second), given as, where η k represents the computation energy efficiency coefficient related to the processor's chip. On the other hand, based on the energy-proportional model the local caching energy consumed for processing (1 − l k [n])s k [n] bits data at kth GN can be written as where ω ca k is the coefficient of caching power efficiency related to the GN caching hardware drives [27][28][29]. With the help of (5), the transmission energy consumption at the kth IoT device is given as In the end, the total energy consumption of kth GN during flight navigation can be written as follows,

UAV energy consumption
During the entire flight, the energy consumption for propulsion and task processing are involved at UAV. The part for offloaded computing task at UAV is similarly given as where η denotes the computation energy efficiency coefficient related to the processor's chip of UAV. However, if the offloaded task is claimed as a caching task, the caching energy can be similarly written as where ω ca is the caching energy coefficient related to UAV storage hardware. Additionally, similar to [10,12], the rotary-wing energy model is adopted for UAV propulsion energy consumption.
where P 0 and P i denote the constant blade profile power and induced power in hovering status. For other parameters, Q tip is the tip speed of the rotor blade, v 0 is the mean rotor induced velocity in hover, d 0 and s are the fuselage drag ratio and rotor solidity, and ρ and A define the air density and rotor disc area.

Problem formulation
In this paper, we jointly optimize trajectory q , bandwidth b , computation capability f , task type a and offloading ratio l , to minimize the total energy consumption of IoT devices in the following problem,  }, ∀k, n . Constraints (13a)-(13d) are the resource limitations introduced above. Constraint (13e) indicates that the total energy consumption must not exceed UAV battery capacity. The QoE requirements for the single task and the application are denoted by (13f ) and (13g), respectively, ensuring the instantaneous and long-time performance for GNs.

Proposed solution and algorithm
Obviously, P is a challenging mixed integer nonlinear programming (MINLP) problem due to the coupled variants in both the constraints and the objective function. Instead of dealing with the original problem directly, we divide P into three manageable subproblems to decouple these variants: (1) Trajectory optimization for q ; (2) Resource allocation at UAV including bandwidth b and computation capability f ; (3) Offloading decisions including task type a and ratio l . The iterative approach based on the block coordinate descent (BCD) method [30,31] is thus employed to alternately solve the three subproblems.

Trajectory optimization
Given {b, f , a, l} , the trajectory of UAV can be derived according to the following problem, which is still intractable due to the non-convexity of constraints (13e)-(13g), as well as the objective function.
Motivated by [12,17], the SCA technique is utilized to cope with the non-convexity  ) with the given local point at the ith iteration, the proof of which can be found in [17]. Therefore, P T can be transformed into a convex optimization problem as where r q {r q k [n]} , and the details of solving P T1 is presented in Algorithm 1.

Resource allocation at UAV
With the newly obtained q ⋆ and the given {a, l} , the resource allocation strategy at UAV can be designed via the following problem, which is non-convex due to the nonlinear part in the objective function and constraints (13g) and (20a), i.e., r k [n] . Similarly, the auxiliary variables r b {0 <r b k [n] ≤ r k [n], ∀k, n} are introduced to deal with r k [n] , which further transforms P R into the following equivalent problem, , ∀k, n, where E ′ is a constant value related to energy consumption. Define φ 1 as φ 1 P k ρ 0 (�q[n]−w k � 2 +H 2 )N 0 and the second-order derivative of the right side in constraint (21b) is given as Bb k [n](Bb k [n]+φ 1 ) 2 ln 2 , which proves the concavity of constraint (21b). It is also observed that (21e) is convex because the second item in max method is convex and the first item is a constant value. Therefore, P R1 is a convex problem w.r.t. {b, f ,r b } , which can be efficiently solved by solvers, e.g., CVX [32].

Offloading decisions at GNs
In this subsection, the task type and offloading ratio are optimized to further minimize the total energy consumption of MDs with the achieved {q ⋆ , b ⋆ , f ⋆ } as follows which is also difficult to deal with since a consists of binary variables and further couples with l . It's observed that with fixed a , P o is the linear programming problem w.r.t l and given with fixed l the subproblem becomes an integer programming problem w.r.t a . Thus, an inner BCD algorithm is derived to alternatively solve the offloading problem.

Simulation results and discussions
In this section, several experiments are conducted for verifying the performance of proposed algorithm. Assume that GNs are distributed in a square area of size 100m × 100m and generate multiple tasks during the navigation of UAV, the sizes of which range from 100 to 500 Kbits within each time slot. The UAV starts flight at origin point Q 0 = (0, 0) and follows the optimized trajectory to the final point Q F , which can be the origin or a different point. The details of the experimental parameters are summarized in Table 1, unless otherwise mentioned. Numerical results are presented for the UAV trajectory and the energy consumption of GNs w.r.t different offloading schemes: (1) Computing offloading mode: all of GNs' tasks are for computing; (2) Fig. 2, the trajectory of UAV w.r.t. different offloading modes is investigated, where 10 GNs are stochastically distributed and generate tasks with size ranging from 100 to 200 Kbits. The total slot numbers is N = 20, the length of which is 0.5 s. Compared with computing and collaborative offloading mode, caching offloading mode authorizes UAV to get closer to GNs, since it does not need to process the offloaded data, gives UAV enough time to approach GNs and further gets better communication quality in return, which is beneficial to energy saving as illustrated in Fig. 5. Since collaborative offloading mode is the combination of the other two modes, it is observed that UAV can get relatively closer to GNs at that mode, hover at some points to render services, and further save energy just like that of caching offloading mode.
In Fig. 3, the trajectory of UAV with different final points are investigated, and the optimized UAV trajectories can vary according to its final points under the same environment settings. Notice that the first half trajectories for four different final points appear to overlap, and the flight path is a straight line when the UAV ends at the origin and point (100, 100), while the UAV made a slow arcs to GNs at the second half trajectory for the other two final points, i.e., (0, 100) and (100, 0). It's mainly because UAV wants to fly closer to GNs for stronger channel gain, thus provides them with better services.
In Fig. 4, with the same environment settings, the trajectory of UAV w.r.t. different QoE requirement of time-sensitive tasks are presented. Along with the decreasing QoE requirement of latency, the trajectory will gradually fly towards the GNs, since it has more time to approach GNs, and further offer better services as explained above. Notice that, when the QoE requirement of latency exceeds a certain limitation, i.e., τ = 0.5 s, GNs can easily accomplish its task with the constraint of QoE requirement for latency, and thus the UAV will not fly closer to UE due to its purpose of energy saving. Besides, the trajectory (the red and pink lines) indicates that the UAV will hover at some points during the navigation to save its energy, rather than moving forward.
In Fig. 5, we investigate the performance of the total energy consumption of GNs for different schemes. Due to the different energy consumption and operation for computing and caching task, GNs at computing offloading mode consume more energy compared with collaborative offloading and caching offloading schemes, since all the tasks are designed for computing that consumes much energy than caching. Meanwhile, the  Fig. 4 The UAV trajectories w.r.t. different QoE requirement of time-sensitive tasks at collaborative offloading mode caching offloading mode is the most energy-saving since all the tasks are for caching, and thus consume less energy compared with the others. Furthermore, collaborative offloading scheme not only meets the demands for different type of tasks, but also gets relatively satisfactory result on energy saving, since it can switch parts of tasks into caching.
In Fig. 6, we study the influence of the QoE requirements of time-sensitive tasks at IoT devices on the total energy consumption for different numbers of GNs. With the growing number of GNs, the total energy consumption of GNs is increasing for all the schemes. On the observation of Fig. 6, the total energy consumption is reducing along with the decreasing QoE requirement of time-sensitive tasks. This is because UAV has sufficient time to get closer to GNs with the decreasing requirement of latency, providing better communication access (i.e., better channel gain), and thus help to reduce the total energy consumption of GNs.

Conclusions
With the consideration of QoE requirement of time-sensitive tasks, a UAV-assisted multi-task MEC networks is investigated, where UAV provides collaborative offloading services to GNs. We jointly optimize the trajectory, resource allocation of UAV, and offloading decisions of GNs to minimize the total energy consumption of GNs according to BCD method. Simulation results demonstrate that collaborative computing and caching offloading can effectively reduce the total energy consumption of GNs, while satisfying the QoE demands for different type of tasks.