Stochastic Coded Offloading Scheme for Unmanned Aerial Vehicle-Assisted Edge Computing

02/11/2022
by   Wei Chong Ng, et al.
0

Unmanned aerial vehicles (UAVs) have gained wide research interests due to their technological advancement and high mobility. The UAVs are equipped with increasingly advanced capabilities to run computationally intensive applications enabled by machine learning techniques. However, because of both energy and computation constraints, the UAVs face issues hovering in the sky while performing computation due to weather uncertainty. To overcome the computation constraints, the UAVs can partially or fully offload their computation tasks to the edge servers. In ordinary computation offloading operations, the UAVs can retrieve the result from the returned output. Nevertheless, if the UAVs are unable to retrieve the entire result from the edge servers, i.e., straggling edge servers, this operation will fail. In this paper, we propose a coded distributed computing approach for computation offloading to mitigate straggling edge servers. The UAVs can retrieve the returned result when the number of returned copies is greater than or equal to the recovery threshold. There is a shortfall if the returned copies are less than the recovery threshold. To minimize the cost of the network, energy consumption by the UAVs, and prevent over and under subscription of the resources, we devise a two-phase Stochastic Coded Offloading Scheme (SCOS). In the first phase, the appropriate UAVs are allocated to the charging stations amid weather uncertainty. In the second phase, we use the z-stage Stochastic Integer Programming (SIP) to optimize the number of computation subtasks offloaded and computed locally, while taking into account the computation shortfall and demand uncertainty. By using a real dataset, the simulation results show that our proposed scheme is fully dynamic, and minimizes the cost of the network and UAV energy consumption amid stochastic uncertainties.

READ FULL TEXT VIEW PDF

Authors

10/28/2021

Optimal Stochastic Coded Computation Offloading in Unmanned Aerial Vehicles Network

Today, modern unmanned aerial vehicles (UAVs) are equipped with increasi...
10/24/2020

Optimizing Multi-UAV Deployment in 3D Space to Minimize Task Completion Time in UAV-Enabled Mobile Edge Computing Systems

In Unmanned Aerial Vehicle (UAV)-enabled mobile edge computing (MEC) sys...
11/10/2019

Deep Reinforcement Learning Based Dynamic Trajectory Control for UAV-assisted Mobile Edge Computing

In this paper, we consider a platform of flying mobile edge computing (F...
11/30/2021

Energy-Efficient Inference on the Edge Exploiting TinyML Capabilities for UAVs

In recent years, the proliferation of unmanned aerial vehicles (UAVs) ha...
08/18/2020

Offloading Optimization in Edge Computing for Deep Learning Enabled Target Tracking by Internet-of-UAVs

The empowering unmanned aerial vehicles (UAVs) have been extensively use...
01/05/2022

Dynamic Coded Distributed Convolution for UAV-based Networked Airborne Computing

A single unmanned aerial vehicle (UAV) has limited computing resources a...
05/02/2022

Energy-efficient Caching and Task offloading for Timely Status Updates in UAV-assisted VANETs

Intelligent edge network is maturing to enable smart and efficient trans...
This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

I Introduction

Due to the rapid advancement of Internet of Things (IoT) enabled technologies, the number of wirelessly connected devices is increasing exponentially [du2017contract] and generating huge amounts of data [peng2021joint]. There are many new real-time applications enabled by wirelessly connected devices, such as augmented/virtual reality [von2019increasing] and smart cities [zanella2014internet] that are delay-sensitive. For example, it is important to know the real-time traffic [djahel2013adaptive]/parking [vlahogianni2016real] information to regulate traffic flow. The increase in wirelessly connected devices exerts a tremendous burden on the wireless communication infrastructure. For example, in many urban areas that are covered by dense skyscrapers or when the end-users are in congested regions or at high-speed vehicular network [7875131], the content in the static roadside units (RSUs)/base stations (BSs) cannot be successfully delivered to the end-users.

One solution is to deploy Unmanned Aerial Vehicles (UAVs), also known as drones, to act as an airborne BS to collect and process data from the terrestrial nodes [wang2018network, cheng2018air]. UAVs are in different shapes and sizes, such as fixed wings or multi-rotors, and they can maintain a line-of-sight communication with the end-users to provide a better quality of service (QoS). Furthermore, UAVs can be flexibly deployed to inaccessible terrains or disaster relief operations, e.g., due to their size and mobility. Moreover, wireless connections can be established without a fixed infrastructure to extend communication coverage. However, apart from all those benefits, UAVs are faced with energy constraints [koulali2016green], and thus, they cannot complete their computation tasks if the energy utilization is not scheduled correctly.

In this paper, we consider a network contains various UAVs, mobile charging stations, and edge servers that are attached to the BSs to run applications such as traffic monitoring [ro2007lessons, du2018auction]. The UAVs are required to perform computation, e.g., distributed matrix multiplication, as it is central to many modern computing applications, including machine learning and scientific computing [dutta2019optimal, liu2020federated] in applications such as post-disaster relief assistance [tang2019integration] and crowd detection [motlagh2017uav]. To alleviate some of the battery constraints of the UAVs, the matrix multiplication can be offloaded to ground-based edge servers for processing. The matrix multiplication in the UAVs can be accelerated by scaling the multiplication out across many distributed computing nodes in BSs or edge servers [yu2017polynomial] known as the workers. However, there is a significant performance bottleneck that is the latency in waiting for the slowest workers, or “stragglers” to finish their tasks [yu2017polynomial]. Coded distributed computing (CDC) is introduced to deal with stragglers in distributed high-dimensional matrix multiplication. In CDC, the computation strategy for each worker is carefully designed so that the UAV only needs to wait for the fastest subset of workers before recovering the output [yu2017polynomial]. The minimum number of workers that the UAV has to wait for to recover their results is known as the recovery threshold.

Apart from using the CDC technique to mitigate stragglers, there are three challenges in this network. The first challenge is the weather uncertainty. If the UAV is not properly allocated, it may not withstand the strong wind if its engines are not sufficiently powerful and the battery capacity is small. The second challenge is demand uncertainty. Typically, the edge servers in the BSs require the users to pay a subscription fee in advance, e.g., monthly subscription, so that the users, i.e., UAVs, can use the offloading service. For instance, in matrix multiplication, the size of the matrices, which is the demand, is not always the same. If the actual matrix size is very small, it will be cheaper to perform the local computation within the UAV. Therefore, an uncertainty of actual demand can result in an over-and under-subscription problem. The third challenge is the shortfall uncertainty. Once after the UAVs are allocated, they can perform full local computation, full offload or partial offloading. If the UAV decides to offload the computation to the edge servers in BSs, there is shortfall uncertainty that the copies cannot be returned by any edge servers on time to the UAV due to delays and link failure [wang2019batch]. It means that the total copies that the UAV has is less than the recovery threshold, where each copy is a sub-portion of matrices involved in the matrix multiplication operation. Therefore, the UAV has to pay a correction cost to re-compute the number of shortfalls locally or re-offload them to match the recovery threshold. This correction cost also involves a hovering cost as the UAVs have to hover in the sky throughout the re-computation.

To overcome the three challenges mentioned above, we introduce the Stochastic Coded Offloading Scheme (SCOS). SCOS is a two-phase optimization scheme that adopts a CDC technique to reduce the total cost of the network:

  • Phase one (UAV type allocation): The application owner will first allocate the appropriate UAV to each mobile charging station by considering the weather condition in each time slot. This weather uncertainty is modeled by a two-stage Stochastic Integer Programming (SIP) [birge2011introduction].

  • Phase two (task allocation): There are a different number of time-frames/periods within the same time slot. For example, when the morning is the first time slot, each hour is treated as one period, and task allocation occurs in each period. Demand and shortfall are the two uncertainties in task allocation. Instead of performing local computation as the correction action to correct the shortfalls, the same decision options are provided to the UAVs until the stage. Therefore, -stage SIP is used to model the demand and shortfall uncertainty in various stages.

Extensive simulations are performed to evaluate the effectiveness of SCOS. The results show that SCOS can minimize the total cost and the UAVs’ energy consumption, especially compared with the traditional deterministic baseline scheme.

The contributions of this paper are summarized as follows.

  • The combination/integration yields fully dynamic on-demand computing solutions for emerging applications such as road traffic prediction for autonomous vehicles in which traditional approaches are ineffective due to their rigid and fixed deployment.

  • Our SCOS is able to provide strategic scenario-based decision that adapts well with the weather condition in which the current solutions for UAVs are limited.

  • The proposed SCOS can minimize the UAVs’ overall costs by optimizing the task allocation. At the same time, it can also minimize all the UAVs’ energy consumption. The optimal solution is achieved by considering both the demand and shortfall uncertainty.

  • From the performance evaluation, we use the real data to validate that SCOS is the optimal scheme when the performance is compared with the Expected-Value Formulation (EVF) and random scheme.

The remainder of the paper is organized as follows: In Section II, we review the related works. In Section III, we present the system model. In Sections IV and V we formulate the problem. We discuss and analyze the simulation result in Section VI. Section VII concludes the paper.

Ii Related Work

Ii-a UAV-enabled Mobile Edge Computing

Mobile edge computing (MEC) is regarded as a promising solution to break through the computation limitation [li2020noma]. Due to the flexibility of the UAVs, the UAV is an ideal mobile edge computing (MEC) platform for performing computing-intensive tasks for ground users. Furthermore, the UAV-enabled MEC platform can be quickly deployed in emergency response scenarios such as major traffic accidents [zhou2019secure]. There have been several works investigating the performance of UAV-enabled MEC. In [zhou2018computation], the authors studied the UAV-enabled MEC wireless powered system by considering both partial and binary computation offloading modes. Instead of using only the UAVs to act as the BSs, the authors in [8740949] installed the MEC servers on both UAVs and stationary BSs and presented a novel game-theoretic framework to serve their users more efficiently. In [8933487], the authors consider both computation bits and energy consumption to optimize the computation efficiency in a multi-UAV MEC system. The authors in [zhang2019resource] maximize the computation efficiency in partial computation offloading mode.

However, different from the work mentioned above, in this paper, we reduce energy consumption by adopting a CDC technique to mitigate stragglers in the network. The UAVs can recover the computed task if the returned tasks are greater than or equal to the recovery threshold.

Ii-B Stochastic Integer Programming

Stochastic integer programming is one of the important tools to incorporate uncertainty in optimization problems [wang2014stochastic]. SIP can be applied to various fields to solve the optimization problem, e.g., production planning [fleming1987optimal]

. SIP assumes uncertain data as random variables with known probability distributions, and uses sampled values from this distribution to build a scenario tree and optimize over the expectation 

[lara2020electric]. SIP models can correct the decisions using the concept of recourse. In this idea, some decisions have to be made before realizing uncertain parameters and some decisions after their realization [birge2011introduction]. SIP models can be formulated as the two-stage and multi-stage problems. For the two-stage SIP, stage one decisions are made ‘here and now’ at the beginning of the period without the uncertainty realization. Stage two decisions are taken ‘wait and see’ as the recourse action at the end of the period [li2020review]. For example, in [chaisiri2011optimization], the authors applied the two-stage SIP to optimize the resource provisioning cost in cloud computing. In the courier delivery serves, the authors in [8108576] uses the two-stage SIP to plan an optimal vehicle delivery route. A multi-stage SIP is a generalization of the two-stage SIP to the sequential realization of uncertainties. For example, the authors in [liu2017multistage] use a multi-stage SIP to optimize electricity generation, storage, and transmission investments over a long planning horizon. The recourse is the key concept behind SIP. In this problem, weather, demand, and shortfall uncertainties are constantly changing. Therefore, it is not possible to obtain one decision that is suitable for all scenarios. With the idea of recourse, corrective action can be made after a random event has taken place. To the best of our knowledge, the application of stochastic programming to coded distributed computing has been less studied.

Ii-C Coded Distributed Computing

Distributed computing has been widely adopted to perform various computation tasks in different computing systems [kartik1997task, lu2019toward]. Nevertheless, there are many design problems, i.e., computing frameworks are vulnerable to uncertain disturbances, such as node failures, communication congestion, and straggler nodes [wang2019batch]. Only in recent years, coding techniques gained great success in improving the resilience of communication, storage, and cache systems to uncertain system noises [9024694]. The authors have [lee2017speeding] first presented the used of CDC to speed up matrix multiplication and data shuffling. As a result, a lot of the focus has been shifted to CDC. Followed by this study, CDC has been explored in many different computation problems, such as the gradients [tandon2017gradient], large matrix-matrix multiplication [lee2017high], and multivariate polynomials [yu2019lagrange].

There have been many other works to reduce the communication load [li2015coded, 8758338] that are capable of improving the overall communication time. The authors in [li2015coded] introduced a Coded MapReduce framework to reduce the inter-server communication load by a multiplicative factor that grows linearly with the number of servers in the system. The authors in [8758338] presented a technique known as Short-Dot to reduces the cost of computation, storage, and communication. Besides reducing the communication load, Short-Dot also tackles the straggler issue. It completes the computation successfully by ignoring the stragglers. More relevant to our study, the authors in [dutta2019optimal] proposed PolyDot codes, which is a unified view of Matdot [dutta2019optimal] and Polynomial codes [yu2017polynomial] and leads to a trade-off between recovery threshold and communication costs.

However, the works mentioned above mainly focus on the designing of different CDC schemes. Therefore, in this paper, we adopt PolyDot codes in the UAV network to alleviate the straggler problem and improve network reliability.

Iii System Model

The overall system model is shown in Fig. 1. We model the phase one (UAV type allocation) and phase two (task allocation) to complete applications defined by an application owner, e.g., road traffic monitoring [ro2007lessons] while considering various uncertainties. Since each edge server has limited computation capability, by deploy many edge servers at the BS, we can use constraints (53) and (54) from Appendix A to ensure that there will be enough computation resources to support the computation required by each UAV. The following sets are used to denote time slots, UAV types, mobile charging stations, and BSs.

Fig. 1: An illustrative example of the network with , 1 mobile charging station , 20 edge servers attached to 1 BS .
  • represents the different time slot.

  • represents the period in time slot .

  • The available UAVs are clustered into types denoted by set , where . Specifically, the type refers to the battery capacity of the UAV in ascending order. For example, is the largest type UAV that has the most battery and therefore leads to a longer flight time. The UAVs are owned by service provider . We use to denote when type UAV is used in time slot .

  • represents the UAV mobile charging stations, owned by service provider . All the mobile charging stations are deployed at pre-specified locations defined by application owner .

  • Each of BS is attached with number of edge servers. represents BSs with the height of . Edge servers are owned by service provider .

In phase one, the application owner first considers the weather uncertainty to pre-allocate the UAV types to each mobile charging station, also known as a UAV depot. Once the phase one optimization is done, all the UAVs will take off from their respective mobile charging stations which are located at . are the x-y coordinates of mobile charging station . At time slot , type UAV will take off vertically to the height of and hover in the sky for purposes such as traffic monitoring. and are the three-dimensional coordinates of the type UAV associated with mobile charging station and edge servers in BS , respectively, where to maintain a line-of-sight (LoS) communication link between type UAV and edge servers in BS . For simplicity, we assume that UAV maintain a LoS link with the edge servers in the RSUs. Due to the hovering capability, we consider only the rotary-wing UAVs [zeng2019energy].

After the UAVs reach their respective heights, they can receive and process computation tasks. In this paper, we consider the task that the type UAV computes is the matrix-matrix product AB involving the two matrices A and B. However, the UAV has limited computing and storage capability [hu2018joint]. Therefore, the UAV can choose to offload a portion or the whole matrix multiplication to the edge servers [hu2018joint]. In phase two, it derives the offloading decision to minimize the overall operation cost by considering the demand and shortfall uncertainties. Note that the key notations used in the paper are listed in Table I. In the following, we discuss the coded distributed computing model and UAV energy consumption model.

Symbol Definition
Set of time slots while denotes the time slot index
Set of periods in while denotes the period index
Set of UAV types while denotes the UAV type index
Set of mobile charging stations while denotes the mobile charging station index
Set of BSs while denotes the BS index
Recovery threshold
The number of stages in multi-stage SIP
Set of weather condition scenarios in while denotes the weather condition scenario index
Set of demand scenarios in while denotes the demand scenario index
Set of shortfall scenarios in stage , where , and while denotes the shortfall
scenario index
Binary variable at time slot for mobile charging station indicates whether type UAV is used.
Binary variable at time slot for mobile charging station indicates whether a correction on-demand type-
UAV is used in scenario , and represents the largest UAV type.
Binary variable to indicate whether the edge servers in BS will be used or not
Decision variable represents the number of copies computed locally by the type UAV that is associated with
mobile charging station in stage 2, time slot and scenario
Decision variable represents the number of copies offloaded to the edge servers in BS by the type UAV that is
associated with mobile charging station in stage 2, time slot and scenario
                                                             ⋮
Decision variable represents the number of copies computed locally by the type UAV that is associated with
mobile charging station in time slot , scenario , …, scenario and stage , where
Decision variable represents the number of copies offloaded to the edge servers in BS by the type UAV that is
associated with mobile charging station in time slot , scenario , …, scenario and stage
TABLE I: List of key notation

Iii-a Coded Distributed Computing

Massive parallelization can speed up matrix multiplication. However, it has a computational bottleneck due to stragglers or faults. Coded computation is introduced to make matrix multiplications resilient to faults and delays, i.e., PolyDot codes [dutta2019optimal]. In PolyDot codes, the system model typically consists of the followings [dutta2019optimal]:

  • Master node receives computation inputs, encodes and distributes them to the worker nodes.

  • Worker nodes perform pre-determined computations on their respective inputs in parallel.

  • Fusion node receives outputs from successful worker nodes and decodes them to recover the final output.

We consider that the type UAV is our proposed network’s master and fusion node. Each edge server in BS is the worker and has the computation capability of , where denotes the CPU computation capability of the edge server in BS (in CPU cycles per second).

The definitions of copy, successful workers, recovery threshold, shortfall, and demand are given as follows.

Definition 1. [Copy] a fraction of matrices A and B [dutta2019optimal].

Definition 2. [Successful workers] Workers that finish their computation task and the task is received successfully by the UAV.

Definition 3. [Recovery threshold] The recovery threshold is the worst-case minimum number of successful workers required by the UAV to complete the computation [dutta2019optimal].

Definition 4. [Shortfall] There exists a shortfall when the total returned copies from the local computation and from the workers are less than the recovery threshold.

Definition 5. [Demand] The demand is size of the matrix input . It is always different as the input of the matrix multiplication is not always the same.

Following [dutta2019optimal], two square matrices and are considered. Note that our model can be applied to other matrices, e.g., non square matrices. Each of matrices and is sliced both horizontally and vertically. For example, is sliced into matrices and is sliced into . We choose and such that they satisfy  [dutta2019optimal] and a copy is the -th fractions of matrices A and B. Each edge server has a storage constraint that limits the edge server to store only fractions of matrices A and B [dutta2019optimal]. The recovery threshold is defined [dutta2019optimal] as:

(1)

The processing by the workers may take a longer time when it is currently occupied with some other tasks. Therefore, the processing in the offloaded tasks is perceived to have failed if the duration exceeds the threshold time limit [dutta2017coded]. To recover the computed task, the sum of returned offloaded copies and locally computed copies must be greater than or equal to recovery threshold .

The decision scenario of phase one and phase two are explained using recovery threshold . In phase one, scenarios may occur. Mobile charging station chooses the UAV type to be used. In phase two, three scenarios may occur.

  • The UAV can compute all copies locally, , where indicates the number of copies that type UAV from mobile charging station computes locally at time slot and is defined in (1).

  • The UAV can offload all copies to BS , , where denotes the number of copies that are offloaded to the edge servers in BS at time slot by the type UAV from mobile charging station .

  • The UAV can compute some copies locally and offload some copies to the edge servers in BS ,

The final output can be decoded from all the return copies .

Similar to [dutta2019optimal], the type UAV associated with mobile charging station uses symbols for encoding of matrices and to decode the returned matrices. Each copy contains -th fractions of matrices A and B. UAV will transmit symbols to each of the edge servers. Each copy requires symbols for computation. After computation is completed, the edge server will send symbols back to the UAV.

Iii-B UAV Hovering Energy

The propulsion energy consumption is needed to provide the UAV with sufficient thrust to support its movement. Note that we drop the time notation for ease of presentation. The propulsion power of a rotary-wing UAV with speed can be modeled as follows [zeng2019energy]:

(2)

where

(3)
(4)

and are two constants related to UAV’s weight, rotor radius, air density, etc. denotes the tip speed of the rotor blade, is known as the mean rotor induced velocity in hover, and are the fuselage drag ratio and rotor solidity, respectively. and are the air density and rotor disc area, respectively. is the incremental correction factor to induced power. is the type UAV weight, is the profile drag coefficient, and denotes blade angular velocity of the type UAV. By substituting into (III-B[zeng2019energy], we obtain the power consumption for hovering status as follows:

(5)

Iii-C Local Computing Model

When one copy is processed locally, the local computation execution time of the type UAV is expressed as [pham2021uav]:

(6)

where is the number CPU cycles needed to process a bit, denotes the total CPU computing capability of the type UAV, and is a function to translate the number of symbols to the number of bits for computation, i.e., if the 16 Quadrature Amplitude Modulation (QAM) is used, each symbol carries 4 bits [qam]. The type UAV takes seconds to encode one copy of the matrices, and it is expressed as follows:

(7)

After the type UAV obtains at least copies, it will take seconds to decode. is defined as follows:

(8)

Iii-D UAV Communication Model

We assume that each UAV is allocated with an orthogonal spectrum resource block to avoid the co-interference among the UAVs [zhou2019energy]. The transmission rate from the type UAV which is associated with mobile charging station to the edge servers in BS can be represented as [chen2020intelligent]:

(9)

where the wireless transmission power of the type UAV at time slot is expressed as and is the bandwidth. is the channel gains, and

is the variance of complex white Gaussian noise. The UAV to edge server communication is most likely to be dominated by LoS links. Therefore, the air-to-ground channel power gain from the type

UAV to the edge servers in BS can be modeled as follows [hua2019energy]:

(10)

where

(11)

denotes the distance between the type UAV that is associated with mobile charging station and the edge servers in BS , and represents the reference channel gain at distance m in an urban area [hua2019energy]. We assume that for all the edge servers in the same BS , they will have the same . The transmission time to offload one copy of matrix from the type UAV to a edge server in BS can be given as follows:

(12)

The energy required by the type UAV to receive data from the edge server in BS is defined as follows [ng2020joint]:

(13)

where is the receiving power of type UAV. is the transmission rate from edge servers in BS to type UAV which is associated with mobile charging station . It is define similar to (9).

Fig. 2: The decision process of the system across all the time slots .
Fig. 3: Decision making process of the system in one time slot with the using of three different types of UAV, .

Iii-E Problem Formulation

As an illustration, Fig. 2 depicts the decision process of the system across all the time slots. UAV type allocation is performed in each time slot . Throughout , the mobile charging stations will use the same UAV type to perform the task allocation in each period. Fig. 3 shows a detailed diagram that zooms into one-period in one-time slot, and it is explained in details in both Sections IV and V. In Section IV, the application owner pays a reservation cost to make an advance booking for a different time slot for the use of the UAVs. The application owner can observe the weather condition via weather forecast as it may affect the status of the UAV. If the wind is too strong and the UAV used is not large type, the UAV may crash as it has insufficient energy to hover against the wind [bezzo2016online]. For example, a strong wind has high kinetic energy, kinetic energy leads to a higher density of the air, and it increases the UAV hovering power consumption. Low wind speed is referred to as wind speed that is less than and turbulence level  [chu2021simulation]. As a result, has to request an on-demand type UAV to perform the job. In order for SCOS to model the weather uncertainty, we formulate the two-stage SIP to optimize the UAV type allocation.

To achieve cost minimization, phase two (task allocation) in Section V has to consider two sources of uncertainty, i.e., the demand uncertainty and shortfall uncertainty. Demand uncertainty refers to the task required by the applications, such as traffic monitoring can be of different sizes, i.e., the task’s size depends on the image resolution. Shortfall uncertainty refers to if the UAV offloads the copies to the edge servers, the computed copies may not return, or the number of copies returned is less than the recovery threshold due to delays and link failure. Therefore, we use multi-stage SIP to model the demand uncertainty to optimize the number of copies to compute locally and offload . For example, when the recovery threshold is and the UAV decide to offload two copies of the task for the edge servers in BS to compute, i.e., . Therefore, the UAV has to compute at least two more copies locally to match the recovery threshold . In time slot , type UAV will hover in the sky for a threshold time limit to wait for the offloaded copies to return. Without loss of generality, is set as the worst-case scenario, i.e., the time required to compute all copies locally by the UAV, i.e., 

. However, there is a probability that the edge servers in BSs may fail, i.e., the computed task is not returned to the UAV before

. As a result, the UAV cannot complete the full task if the total returned copies are less than 4. When the UAV fails to receive sufficient number of copies, there are shortfalls, and hence, the UAV has to re-compute the shortfalls locally or re-offload to the edge servers. Since the UAV has limited computation capabilities, it can choose to re-compute the shortfall locally or re-offload to the edge servers until stages, where is the number of times of re-computations. In the meantime, the UAV has to continue hover in the sky when performing the re-computation. In order to model the shortfall uncertainty, we formulate -stage SIP to optimize the numbers of copies to compute locally and to offload, and we can also optimize the number of stages required. Hence, this scheme will minimize the overall network cost, and the system model of this network is formulated as follows:

:

(14)

subject to: (19)-(22), (44)-(56)

where is the UAV type allocation cost in time slot and it is defined in (17) in Section IV. is the task allocation cost within period and period is in time slot . The task allocation is defined in (35) in Section V-B.

Iv Phase one: UAV type allocation

This section introduces the SIP to optimize phase one (UAV type allocation) in SCOS by minimizing the total allocation. As described in Section III, the application owner needs to make a reservation in advance to secure certain types of UAVs, which are own by . However, the weather condition is unknown and may vary at a different time slot . If the wind is too strong, the UAV is required to use more energy to hover at a fixed location [bezzo2016online]. As a result, the UAV will crash with insufficient energy, and the application owner has to make an on-demand request with a type UAV. Fig. 3 illustrates the decision-making process of the system with the use of three UAV types, 1, 2 and 3, which represents small, medium and large, respectively.

Hence, we formulate this scheme as the two-stage SIP model.

  • First stage: The application owner makes a reservation on the types of UAVs to be used. The decision will be made based on the available cost information and the probability distribution of the weather condition.

  • Second stage: After knowing the exact weather condition, the application owner decides the correction action, which is the on-demand request to use the largest type UAV.

Let } denote weather condition scenarios of all mobile charging stations at time slot . The set of all weather scenarios is denoted by , i.e.,  [8482480]. represents a binary parameter of the weather condition at time slot . For tractability, we only consider that each mobile charging station experiences only two types of weather condition. As shown in Table II, means that at time slot , the wind is strong in mobile charging station and the UAV has crashed, and means otherwise. denotes the probability if scenario is realized. All of the scenarios can be obtained from historical records [8108576] or weather forecast.

Symbol Definition
At time slot , the wind is weak or there is no wind
at mobile charging station . Low wind speed is
referring to wind speed that is less than 11
and turbulence level  [chu2021simulation]
At time slot , the wind is strong at mobile charging
station . High wind speed is referring to wind
speed that is greater than 11 and
turbulence level  [chu2021simulation]
TABLE II: Weather uncertainty

The cost function is proportional to the resources used. In total, there are types of payments. Note that we drop the time notation.

  • is the reservation cost for the type UAV. It is defined as follows:

    (15)

    where is the battery capacity of the type UAV and is the cost coefficient.

  • is the on-demand cost for the type UAV, which represents the largest UAV type. It is defined as follows:

    (16)

    where is the cost coefficient with a similar role to and . is the battery capacity of the type UAV.

  • is the penalty cost. This penalty cost is the repair cost for the crashed UAV.

We formulate the UAV type allocation as a two-stage SIP model. There are decision variables in this model.

  • is a binary variable at time slot for mobile charging station indicates whether type UAV is used. When , at time slot , mobile charging station uses type UAV and means otherwise.

  • is a binary variable at time slot for mobile charging station indicates whether a correction on-demand type UAV is used in scenario , and represents the largest UAV type. When , at time slot , mobile charging station performs a correction action by using the largest type- UAV in scenario and means otherwise.

The objective function given in (17) and (18) is to minimize the cost of the UAV type allocation. The expressions in (17) and (18) represent the first- and second-stage SIP, respectively. The SIP formulation can be expressed as follows:

:

(17)

where

(18)

subject to:

(19)
(20)
(21)
(22)

The constraint in (19) ensures that the application owner makes a reservation on the types of UAV. On the other hand, (20) ensures that the UAV crashes because of strong wind if the application owner previously reserves a UAV that is not largest type . Then, the application owner has to perform a correction action by using the largest type on-demand UAV. (21) and (22) are boundary constraints for the decision variables.

V Phase two: task allocation

Once the types of the UAVs are optimized from phase one in SCOS, we introduce the Deterministic Integer Programming (DIP) and SIP to optimize phase two (the number of copies to compute locally and to offload) by minimizing the UAV network cost. Note that for simplicity, we drop notation from phase two task allocation.

Fig. 4: A scenario tree structure for -stage SIP in task allocation.

V-a Deterministic Integer Programming System Model

In an ideal case, when the actual demand, which is the actual matrix size and the number of shortfalls, are precisely known ex-ante, the UAVs can choose the exact number of copies to compute locally or offload. Therefore, the correction for the shortfall is not needed, and the correction cost is zero. Similar to [mitsis2020data], the cost function is proportional to the UAVs offloaded data and to their demand for consuming computation resources. Choosing different sizes of UAVs will affect the payment value. In total, five types of payments are considered in DIP.

  • is the subscription cost for the edge servers in BS .

  • denotes the UAV local computation cost and encoding cost for computing of one copy, i.e.,

    (23)

    where is the cost coefficient associated to the energy consumption and is the actual demand.

  • denotes the offloading cost and it consists of three parts. The first part is related to the transmission and encoding delay . The second part is the type UAV energy consumption cost and the last part is the service cost for edge servers in BS . It is modeled as follows:

    (24)

    where is the cost coefficient with a similar role to .

  • denotes the hovering cost for seconds. They are defined as follows:

    (25)

    where is the cost coefficient with a similar role to .

  • denotes the type UAV decoding cost for the returned matrices as follows:

    (26)

A DIP can be formulated and minimize the total cost of the UAVs as follows:

:

(27)

subject to:

(28)
(29)
(30)
(31)
(32)
(33)
(34)

is a binary variable to indicate whether the edge servers in BS will be used or not. is a binary variable to indicate in time slot whether the type UAV which is associated with mobile charging station will choose to offload or not. When , in time slot the UAV associated with mobile charging station choose to offload some of the copies to BS and means otherwise. The objective function in (V-A) is to minimize UAVs’ total cost involving the UAVs’ local computation cost and the UAVs’ offloading cost. The constraint in (28) ensures that the subscription cost of the edge servers in the BS will be paid if they are used in any of the stages, where is a sufficiently large number. (29) ensures that the total number of copies offloaded to the edge servers must not exceed the total number of edge servers in BSs. (30) ensures that the threshold cost will be paid if the UAV perform offloading action. (31) ensures that the shortfalls should only exist if the number of copies offloaded is more than or equal to the shortfalls. (32) ensures that the number of copies computed locally and offloaded have to be at least equal to or larger than recovery threshold . (33) indicates and are binary variables. (34) indicates that and are positive decision variables.

V-B Stochastic Integer Programming System Model

This section introduces the SIP to minimize the total cost of the network by optimizing the number of copies to compute locally and to offload to the edge servers in BSs. The first stage consists of all decisions that have to be selected before the demand and shortfall are realized and observed. In the second stage and onwards, decisions are allowed to adapt to this information. In each stage, decisions are limited by constraints that may depend on previous decisions and observations.

As described in Section III, there is a subscription cost when the service provider wants to use the edge servers in BSs for computation. Then, without knowing the demand, the type UAV can decides the number of copies to compute locally and the number of copies to offload .

The computation process in the edge servers are not very reliable, as the edge servers might be processing some other task or congested. As a result, the computation time is much longer than the threshold limit . Therefore, if a copy is offloaded, there is a probability that the computation might fail, and it will require the type UAV to re-offload again or compute it locally.

Hence, we formulate this framework as a -stage SIP model.

  • First stage: The application owner decides to use the edge servers in BS or not. The decision will be made based on the available cost information, the probability distribution of the demand, and the shortfall.

  • Second stage: After knowing the exact demand, the application owner decides the number of copies that are computed locally and the number of copies to be offloaded to the edge servers in BS .

  • Third stage: After knowing the exact shortfall in the previous stage, the performs a correction action to re-decide the number of copies that is computed locally and the number of copies to be offloaded to the edge servers in BS .
                                       ⋮

  • stage: After knowing the exact shortfall in the -1 stage, performs a correction action to re-decide the number of copies that is computed locally and the number of copies to be offloaded to the edge servers in BS . To promote the UAV to complete the task, a huge penalty will occur if there is still a shortfall in stage .

Let denote the UAV demand scenario across all mobile charging station in time slot and the set of demand scenarios is denoted by , i.e.,  [8482480]. contains a discrete value from a finite set , it represents the size of the task in UAV that is associated with mobile charging station . Specifically, means that in time slot the matrix that UAV receives is in the size of . Let denote the -th shortfall scenario of the UAV in time slot that is associated with its individual mobile charging station in stage , where . The set of shortfall scenarios is denoted by , i.e., . represents a binary parameter of the shortfall in time slot from the type associated with mobile charging station in stage . For example, means that, in time slot from the copies that the UAV has offloaded, at least copy did not return. As a result, the total number of copies that the UAV currently has is less than , and means otherwise. In stage , when . When there is no shortfall in the previous stage then, there will not be any shortfall in the next stage. Fig. 4 illustrates the stages with four scenarios at each stage. All of the scenarios can be obtained from the historical records.

The cost function used in SIP is similar to DIP with an additional penalty cost . occurs when the UAV still has to perform a corrective action. In total, six types of payments are considered in -stage SIP.

We formulate the task allocation as the -stage SIP model. There are decision variables in this model.

  • is a binary variable to indicate whether the edge servers in BS will be used or not. When , edge servers in BS will be used and means otherwise.

  • indicates in time slot the number of copies to be offloaded to the edge servers in BS by type UAV which is associated with mobile charging station in stage 2.

  • indicates in time slot the number of copies computed locally by the type UAV which is associated with mobile charging station in stage 2.