Optimal_Computation_Offloading_in_Edge-Assisted_UAV_Systems
Optimal_Computation_Offloading_in_Edge-Assisted_UAV_Systems
Abstract—The ability of Unmanned Aerial Vehicles (UAV) to possibly reduce the capture-to-decision time, thus improving
autonomously operate is constrained by the severe limitations its reaction time to sensor input. Additionally, offloading data
of on-board resources. The limited processing speed and energy processing to an edge server can reduce the amount of energy
storage of these devices inevitably makes the real-time analysis
of complex signals – the key to autonomy – challenging. In urban needed to complete the mission.
environments, the UAV can leverage the communication and However, the urban IoT is a highly dynamic system, where
computation resources of the surrounding city-wide Internet of a myriad of devices, and data streams, compete for the
Things infrastructure to enhance their capabilities. For instance, available communication and computation resources. As a
the UAVs can interconnect with edge computing resources and result, the network connecting the UAV and edge server may
offload computation task to improve response time to sensor
input and reduce energy consumption. However, the complexity be congested, and the transportation of the data to the edge
of the urban topology and the large number of devices and server may require a large time. Additionally, the topology of
data streams competing for the same network and computation urban areas may degrade the capacity of the channel due to
resources create an extremely dynamic environment, where poor path loss and shadowing. Finally, the edge server may have a
channel conditions and edge server congestion may penalize queue of computation tasks from other devices and services
the performance of task offloading. This paper develops a
framework enabling optimal offloading decisions as a function of that need to be completed before processing the data from the
network and computation load parameters and current state. The UAV. Therefore, in some conditions and locations, the time
optimization is formulated as an optimal stopping time problem needed to transport the data to the edge server and receive the
over a Markov process. outcome of analysis may exceed that of local processing at
Index Terms—Edge Computing, Urban Internet of Things, the UAV.
Unmanned Aerial Vehicles, Autonomous Systems. In this paper, we present an optimization process through
which the UAV decides whether to process locally or offload
I. I NTRODUCTION the computation task to the edge server. The decision is based
The use of Unmanned Aerial Vehicles (UAV) is being on a series of interactions between the UAV and the IoT
increasingly proposed for a wide spectrum of applications, system, where the UAV receives feedback on the state of the
including surveillance and monitoring, disaster management, network and edge server, which allows the estimation of the
agriculture, and network coverage extension [1]–[5]. Their residual time to task completion. Based on this information,
autonomous operations require the acquisition and real-time the UAV solves an optimization problem aiming at the
analysis of information from the surrounding environment. minimization of a weighted sum of delay and energy expense.
However, processing information-rich signals, such as video Numerical results, which are based on parameters extracted
and audio input, to inform navigation and, in general, from a real-world implementation of the system, demonstrate
autonomous decision making, is an extremely demanding task that the proposed intelligent and sequential probing technique
for these constrained platforms. In fact, due to the limited effectively adapts the processing strategy to the instantaneous
on-board computation resources, the analysis process may state of the network-edge server system. The outcome is a
require a significant amount of time, thus decreasing the UAV reduced processing delay and energy expense, two extremely
responsiveness to stimuli. Additionally, continuously running important metrics in the considered application.
heavy-duty analysis algorithms imposes a considerable energy The rest of the paper is organized as follows. Section II
expense burden to these battery-powered devices. In summary, provides an overview of the system considered in this
the degree of autonomy of UAVs may be limited, and may paper. Section III describes in detail the parameters and
come at the price of a reduced operational lifetime. operations of the UAV-edge server system. Section IV
In urban environments, the UAV can leverage the introduces a Markovian description of the system’s dynamics
resources of the surrounding urban Internet of Things (IoT) and formulates and solves the problem for the optimization
infrastructure to overcome some of its limitations and of the offloading decisions. Section V presents numerical
enhance its capabilities. For instance, the UAV can use the results illustrating the performance of the proposed adaptive
communication infrastructure to connect to edge servers – offloading strategy. Section VI concludes the paper.
that is, compute-capable machines positioned at the network
edge – to offload data processing tasks [6]. By offloading the II. S YSTEM AND P ROBLEM OVERVIEW
computation task to a more powerful device, the UAV can
We consider a scenario where a UAV autonomously
This work was partially supported by the NSF under grant IIS-1724331. navigate an urban environment. The UAV is assigned the
Authorized licensed use limited to: National Chung Cheng University. Downloaded on September 04,2024 at 06:03:20 UTC from IEEE Xplore. Restrictions apply.
978-1-5386-4727-1/18/$31.00 ©2018 IEEE
a smaller energy expense associated with hovering.
However, as noted in the introduction, the urban IoT is a
highly dynamic environment, where a myriad of data streams
and services coexist and compete for the same communication
resources. In the considered scenario, the wireless channel
connecting the UAV to a wireless access point may have
a low capacity due to the physical properties of signal
propagation, but also due to the existence of interfering
communications which use part of the time/frequency channel
resource. Additionally, the edge servers may be serving other
devices offloading their computation tasks, and the UAV task
may suffer queuing delay, or a reduced processing speed. As
a result, in certain conditions, offloading the computation task
to an overloaded edge server connected to the UAV through a
Figure 1: Illustration of the considered scenario and system: a poor communication channel may lead to a longer capture-to-
UAV interconnects with an edge server through a low latency decision time. Again, this corresponds to less efficient mission
wireless link to offload computation tasks. Poor channel operations, but also a possibly large energy expense due to
conditions and high processing load at the edge server may hovering while waiting for a response.
result in a larger delay and energy expense compared to local In order to fully harness the possible performance gain
on-board processing. granted by the available resources provided by the urban IoT
infrastructure, the UAV needs to make informed decisions
whether or not to offload computation. To this aim, we equip
task to acquire and process complex data in predefined the UAV with the ability to interact with the surrounding
locations within the city, where the outcome of processing network and edge devices and acquire information regarding
may influence sensing and navigation actions. A relevant the status of the communication and processing pipeline. The
case-study application is city-monitoring, in which the UAV information is used to evaluate the progress of the task and
captures a panoramic sequence of pictures at each location predict the future cost of the binary decision between local
and process them using a classification algorithm to detect and edge-assisted computing.
objects or situations of interest. In case of positive detection,
the UAV may stay at the location to capture more detailed or
higher-resolution pictures of a specific portion of its view. III. S YSTEM M ODEL
Intuitively, processing information-rich signals using a In this section, we formalize and discuss an abstraction of
computation-intense algorithm is a challenging task for the system composed of the UAV, a network access point
inherently constrained platforms such as UAVs. In fact, and an edge server. We divide the description into modules
the limited processing power of the on-board computation focusing on the communication, computation and energy
resources results in long capture-to-output time of the expense aspects of the system.
algorithm, which decreases responsiveness to stimuli and
increases mission time. Additionally, on-board processing
consumes a significant amount of energy, even when compared A. Communications
to motion and navigation, thus shortening the lifetime of these The UAV is connected to the network access point
battery-powered systems. Note that in the scenario described through a wireless channel of finite capacity. The data to
above, the UAV is hovering while waiting for the classification be transferred for offloading have size L-bits. The UAV
algorithm to complete, as the outcome will determine its transmits with fixed power P and rate R in the finite set of
subsequent action. Thus, a large processing time incurs at K +1 transmission rates {R0 , R1 , R2 , . . . , RK }, where R0 =0
additional energy expense penalty associated with longer flight corresponds to disconnection from the network, and thus no
time. data transmission. The link between the UAV and the AP is
The UAV can leverage the resources of the surrounding a wireless link affected by path loss, fading and noise. The
urban IoT infrastructure to improve its performance. In the SNR at the receiver is
scenario at hand, edge servers placed at the network edge
gP
can take over the task of processing the data acquired by the SNR = 2 , (1)
UAV. Intuitively, the larger processing power of edge servers σ
compared to that of UAVs grants a much faster completion of where σ 2 is the noise power and g is the channel attenuation
the processing task, thus allowing a faster decision making coefficient including path loss and fading. We assume
and a smaller capture-to-decision time. Additionally, the exponential path loss and Rayleigh flat fading. Thus, the
UAV would be relieved from the energy expense burden of distribution of g is
processing, at the price of energy expense associated with
Θg (x)= Pr(g ≤ x)=1−e− γ ,
x
(2)
data transmission. We remark that a shorter time to receive
the output of the classification algorithm also corresponds to where γ is the path loss.
Authorized licensed use limited to: National Chung Cheng University. Downloaded on September 04,2024 at 06:03:20 UTC from IEEE Xplore. Restrictions apply.
Assuming channel knowledge and a capacity achieving semi-Markov process. Let’s define as t+ j , j=0, 1, 2, . . . the
scheme, the selected transmission rate of the UAV is equal time instants right after the occurrence of an event, defined
to Ri bits/s if g ∈ (gi , gi+1 ], where as the establishment of the connection with the network, the
delivery of the data to the edge server, or the completion of
gi = g : Ri = C(gSNR), i=1, . . . , K, (3)
a computation task at the UAV or edge server. We denote the
and state of the system at time t+ j as the random variable S(tj ).
+
C(x)=log(1 + x). (4) The state space S of S(t+ j ) consists of an initial state s0 ,
two termination states sUAV and sES , and a number of states
The resulting transmission time is L/Ri s. describing data transmission and task queueing process. The
termination states correspond to the computation task being
B. Computation completed locally at the UAV (sUAV ) and offloaded to the
The time to complete the computation task locally at edge server (sES ). Specifically, we include (i) a set of K+1
the UAV and at the edge server are captured using the states R0 , R1 , . . . , RK associated with a transmission rate,
random variables X ′ and X, respectively. We assume that that is, a channel state in the ranges defined in the previous
X ′ and X follow an exponential distribution of rate µ′ and section; and (ii) a set of C+1 states B1 , . . . , BC+1 associated
µ tasks/s, respectively. The edge server accumulates incoming with the position of the UAV task in the task buffer at the
computation tasks in a finite buffer of size B tasks. Excluding edge server. Note that BC+1 corresponds to a full buffer at
the task generated by the UAV, tasks arrive according to a arrival, that is, the UAV task is rejected. It can be shown that
Poisson process of rate λ tasks/s, with λ<µ. the process S=(S(t+ j ))j=0,1,... is a Markov process.
At each time instant t+ j , the UAV is notified of the state
C. Energy S(t+j ) from the network access point or the edge server,
and makes a binary decision u∈{0, 1}, where 0 and 1
As described in the previous section, at each predefined
correspond to local computing and continuing on the edge-
location the UAV captures the data, and then completes the
assisted pipeline – that is, further deferring local computing,
computation task – either locally or at the edge server –
respectively.
while hovering maintaining the position. We define a rate of
energy expense for the two fundamental operational blocks
A. Transition Probabilities
that are influenced by the offloading decision: processing and
hovering. Specifically, we define PP and PH as the Watts We now describe the transition probabilities governing the
used to respectively process the data and hover. As mentioned dynamics of the stochastic process S. For the sake of notation
earlier, the transmission power is equal to P Watts. clearness, we denote the time t+
j with its index j. We define,
then
IV. O PTIMAL O FFLOADING D ECISIONS P (s′ |s, u)= Pr(S(j+1)=s′ |S(j)=s, U (j)=u). (5)
In the considered scenario, the two most relevant
If the decision is equal to 0, the transition probabilities from
performance metrics are energy expense E and time T per
any state s are
location. Herein, we assume the state of the system at each {
location to be independent. Importantly, the costs E and T ′ 1 if s′ =sUAV ;
are a function of the offloading decision, that is, whether the P (s |s, 0)= (6)
0 otherwise.
computation task is completed at the UAV or at the edge
server. That is, if the decision is to compute locally, the process moves
Given the knowledge of the system parameters, the UAV to state sUAV deterministically from any state.
can compute the average cost E and time T corresponding We, then, analyze the transition probabilities if the decision
to each of the two options, where the average is over is 1, that is, the UAV further defers the initiation of local
realizations of the stochastic process associated with the computation. In such case, from the initial state s0 , the channel
system dynamics. However, within that average there are distribution is sampled, and the state moves to one of the pre-
realizations in which offloading is advantageous (high channel transmission states Ri with probability equal to that of the
capacity and low processing congestion) or disadvantageous associated interval. Thus,
(low channel capacity and high processing congestion). In {
′ πi if s′ =Ri , i=0, 1, . . . , K;
order to fully harness the performance gain edge computing P (s |s0 , 1)= (7)
can provide while facing the dynamics of the IoT system, we 0 otherwise,
develop a sequential probing and decision making framework. where π(i)=Θg (gi+1 ) − Θg (gi ).
At each stage, the UAV observes the current realization, In any state Ri , the UAV is reported the transmission
estimates the residual cost to complete the operations, and rate, that is, the index i, from the wireless access point.
makes a decision about whether to initiate local processing If the decision is to defer local processing, the transition
or not. This formulation corresponds to an optimal stopping probabilities from Ri , i=1,. . . ,K, are
time problem on a semi-Markov process. {
Under the assumptions listed in the previous section, the ′ σc−1 if s′ =Bc
P (s |Ri , 1)= (8)
temporal evolution of the system can be represented as a 0 otherwise.
Authorized licensed use limited to: National Chung Cheng University. Downloaded on September 04,2024 at 06:03:20 UTC from IEEE Xplore. Restrictions apply.
Figure 2: Representation of state transitions with non-zero probability in the Markov Chains associated with decision u = 0
(left) and u = 1 (right).
σc is the probability that the UAV task will find c tasks stored The average time and energy cost associated with the initial
in the edge server buffer at arrival. It is known that state are equal to 0. In the termination states sUAV and sES ,
(1 − λ/µ)(λ/µ)c we have
σc = . (9)
1 − (λ/µ)C+1 ϕ(sUAV ) = 1/µ′ , (12)
The state R0 , corresponding to disconnection from the ψ(sUAV ) = (PP + PH )/µ′ , (13)
network, deterministically leads to sUAV .
and
At the beginning of any state Bc , the UAV is notified of the
index c. For states Bc , c=2, . . . , C, the transition probabilities ϕ(sES ) = 1/µ, (14)
are { ψ(sES ) = PH /µ. (15)
′ 1 if s′ =Bc−1
P (s |Bc , 1)= (10)
0 otherwise. Note that in the termination states the action is pre-determined
and does not need to be formally included in the cost.
State BC+1 corresponds to a full task queue and, thus, From any transmission and queueing state R0 , . . . , RK and
rejection of the UAV task. Therefore, from BC+1 the system B1 , . . . , BC+1 , if the decision is to initiate local processing
deterministically moves to sUAV . State B1 corresponds to the at the UAV (u=0), the process immediately moves to sUAV
UAV task being in the first position, and deterministically and the energy and time cost are both equal to 0. Note that
leads to sES . such decision is forced in states R0 and BC+1 .
If the decision is to defer local processing (u=1), the costs
B. Cost Functions and Optimal Policy are
With the transition probabilities conditioned on the state ϕ(Ri , 1) = L/Ri , (16)
and action, we can now build the optimization process. We ψ(Ri , 1) = (PH + P )L/Ri . (17)
consider a formulation where the objective of the UAV is to
minimize E (V ), with with i=, 1, . . . , K, and
V = ωE + (1−ω)T, (11) ϕ(Bi , 1) = 1/µ, (18)
where ω is a positive weight in [0, 1]. ψ(Bi , 1) = PH /µ. (19)
To this aim, define the time and energy spent in state s∈S as The problem of minimizing the expected total cost can be
Φ(s, u) and Ψ(s, u) conditioned on the action u, respectively. rephrased as a Markov Decision Process over a finite temporal
Note that both the latter and the former are random horizon. We aim at finding, then, the (deterministic) optimal
variables. We denote their average as ϕ(s, u)=E (Φ(s, u)) and policy u∗ (s), where
ψ(s, u)=E (Ψ(s, u)). We further define C(s, u)=ωΦ(s, u) + ( )
(1−ω)Ψ(s, u), with average c(s, u). u∗ (s) = arg min E Vres (s, u) , (20)
u={0,1}
Authorized licensed use limited to: National Chung Cheng University. Downloaded on September 04,2024 at 06:03:20 UTC from IEEE Xplore. Restrictions apply.
Figure 3: Probability of offloading to the edge server (lighter Figure 4: Probability of offloading the computation to the edge
shades corresponds to higher probability) with ω = 0. server as a function of the system load ρ.
j † = min(j : S(j)∈{sUAV , sES }), (22) where Y ∈ {SUAV , SES }, and PS∞0 (SUAV ) + PS∞0 (SES )=1.
† In Figure 3, we plot PS∞0 (SES ), using lighter pixel color for
and Uj1 = (U (0), . . . , U (j † )). The optimal policy can be higher probabilities. As expected, for low values of ρ and
recursively found using well-known techniques. high values of the SNR, the offloading probability is almost
equal to 1, that is, the UAV offloads computation when system
V. N UMERICAL R ESULTS conditions are favorable. When the SNR is sufficiently low,
To make our observations meaningful, we derive the the UAV will likely be disconnected, or the cost of offloading
optimal policies under different channel and load conditions might exceed that of local computation due to the large time
using parameters obtained from real-word experimentations. needed to transport the data to the edge server. Similarly,
Specifically, we used a 3DR Solo Drone mounting a Pixhawk if the load parameter ρ is large, that is, the ES buffer has
flight controller running ArduCopter connected to a Raspberry frequent arrivals or computation tasks take a large time to be
Pi model 3B as companion computer. We use as edge server a completed, the UAV choses to compute locally.
Laptop with 16GB RAM and Intel Core i7-6700HQ processor In Figure 4 we fix the SNR, and show PS∞0 (SES ) as
with Nvidia GM204M GPU. We set the number of pictures a function of ρ. As the SNR decreases, the probability of
collected in each location to 20, where each picture has offloading to the edge server decreases as well. Intuitively,
resolution equal to 720 × 480. The average size of each the SNR influences the shape of the probability curve.
picture after encoding is 80 KB. The pictures are processed Interestingly, high SNR values show a sharp transition from
implementing a face recognition algorithm using a multi scale offloading to local computing, whereas low SNR values have a
Haar Cascade, which takes on average 1/µ′ =0.56s at the more progressive transition, most likely due to the distribution
UAV and 1/µ=0.046s at the edge server. We consider SNR of the communication time.
values in the range [−10, 20] dB and transmission rates in the Figure 5 compares the total delay incurred by fixed
range from 1 Mbps to 11 Mbps (matching a system using strategies – local computing or edge offloading – with the
WiFi IEEE 802.11). Power consumption rates are based on proposed adaptive approach as a function of the system load
battery level readings in the same set up: in particular, we ρ. Clearly, local computing at the UAV is not influenced by ρ.
set Ph = 0.1 levels/s, Pp = 10% · Ph levels/s. The optimal For small system loads, offloading grants a reduced delay. As
†
deterministic policy Uj1 given the parameters is computed ρ increases, the total delay associated with offloading increases
using Equation (21). to exceed that of local computation. The adaptive strategy
Authorized licensed use limited to: National Chung Cheng University. Downloaded on September 04,2024 at 06:03:20 UTC from IEEE Xplore. Restrictions apply.
Figure 5: Total delay as a function of the system load ρ for Figure 6: Probability of selecting local computation in the
the fixed strategies UAV-only and edge server-only, and the three main decision stages or offloading to the edge server.
proposed adaptive strategy.
Authorized licensed use limited to: National Chung Cheng University. Downloaded on September 04,2024 at 06:03:20 UTC from IEEE Xplore. Restrictions apply.