Dynamic Computation Offloading for Mobile-Edge Computing with Energy Harvesting Devices
Mobile-edge computing (MEC) is an emerging paradigm to meet the ever-increasing computation demands from mobile applications. By offloading the computationally intensive workloads to the MEC server, the quality of computation experience, e.g., the execution latency, could be greatly improved. Nevertheless, as the on-device battery capacities are limited, computation would be interrupted when the battery energy runs out. To provide satisfactory computation performance as well as achieving green computing, it is of significant importance to seek renewable energy sources to power mobile devices via energy harvesting (EH) technologies. In this paper, we will investigate a green MEC system with EH devices and develop an effective computation offloading strategy. The execution cost, which addresses both the execution latency and task failure, is adopted as the performance metric. A low-complexity online algorithm, namely, the Lyapunov optimization-based dynamic computation offloading (LODCO) algorithm is proposed, which jointly decides the offloading decision, the CPU-cycle frequencies for mobile execution, and the transmit power for computation offloading. A unique advantage of this algorithm is that the decisions depend only on the instantaneous side information without requiring distribution information of the computation task request, the wireless channel, and EH processes. The implementation of the algorithm only requires to solve a deterministic problem in each time slot, for which the optimal solution can be obtained either in closed form or by bisection search. Moreover, the proposed algorithm is shown to be asymptotically optimal via rigorous analysis. Sample simulation results shall be presented to verify the theoretical analysis as well as validate the effectiveness of the proposed algorithm.
Mobile-edge computing, energy harvesting, dynamic voltage and frequency scaling, power control, QoE, Lyapunov optimization.
The growing popularity of mobile devices, such as smart phones, tablet computers and wearable devices, is accelerating the advent of the Internet of Things (IoT) and triggering a revolution of mobile applications . With the support of on-device cameras and embedded sensors, new applications with advanced features, e.g., navigation, face recognition and interactive online gaming, have been created. Nevertheless, the tension between resource-limited devices and computation-intensive applications becomes the bottleneck for providing satisfactory quality of experience (QoE) and hence may defer the advent of a mature mobile application market .
Mobile-edge computing (MEC), which provides cloud computing capabilities within the radio access networks (RAN), offers a new paradigm to liberate the mobile devices from heavy computation workloads . In conventional cloud computing systems, remote public clouds, e.g., Amazon Web Services, Google Cloud Platform and Microsoft Azure, are leveraged, and thus long latency may be incurred due to data exchange in wide area networks (WANs). In contrast, MEC has the potential to significantly reduce latency, avoid congestion and prolong the battery lifetime of mobile devices by offloading the computation tasks from the mobile devices to a physically proximal MEC server [4, 5]. Thus, lots of recent efforts have been attracted from both industry  and academia .
Unfortunately, although computation offloading is effective in exploiting the powerful computation resources at cloud servers, for conventional battery-powered devices, the computation performance may be compromised due to insufficient battery energy for task offloading, i.e., mobile applications will be terminated and mobile devices will be out of service when the battery energy is exhausted. This can possibly be overcome by using larger batteries or recharging the batteries regularly. However, using larger batteries at the mobile devices implies increased hardware cost, which is not desirable. On the other hand, recharging batteries frequently is reported as the most unfavorable characteristic of mobile phones111CNN.com, “Battery life concerns mobile users,” available on http://edition.cnn.com/2005/TECH/ptech/09/22/phone.study/., and it may even be impossible in certain application scenarios, e.g., in the wireless sensor networks (WSNs) and the IoT for surveillance where the nodes are typically hard-to-reach. Meanwhile, the rapidly increasing energy consumption of the information and communication technology (ICT) sector also brings a strong need for green computing . Energy harvesting (EH) is a promising technology to resolve these issues, which can capture ambient recyclable energy, including solar radiation, wind, as well as human motion energy , and thus it facilitates self-sustainability and perpetual operation .
By integrating EH techniques into MEC, satisfactory and sustained computation performance can be achieved. While MEC with EH devices open new possibilities for cloud computing, it also brings new design challenges. In particular, the computation offloading strategies dedicated for MEC systems with battery-powered devices cannot take full benefits of the renewable energy sources. In this paper, we will develop new design methodologies for MEC systems with EH devices.
I-a Related Works
Computation offloading for mobile cloud computing systems has attracted significant attention in recent years. To increase the batteries’ lifetime and improve the computation performance, various code offloading frameworks, e.g., MAUI  and ThinkAir , were proposed. However, the efficiency of computation offloading highly depends on the wireless channel condition, as the implementation of computation offloading requires data transmission. This calls for computation offloading policies that incorporate the characteristics of wireless channels [12, 13, 14]. In , a stochastic control algorithm adapted to the time-varying wireless channel was proposed, which determines the offloaded software components. For the femto-cloud computing systems, where the cloud server is formed by a set of femto access points, the transmit power, precoder and computation load distribution were jointly optimized in . In addition, a game-theoretic decentralized computation offloading algorithm was proposed for multi-user mobile cloud computing systems . Nevertheless, these works assume non-adjustable processing capabilities of the central processing units (CPUs) at the mobile devices, which is not energy-efficient since the CPU energy consumption increases super-linearly with the CPU-cycle frequency . With dynamic voltage and frequency scaling (DVFS) techniques, the local execution energy consumption for applications with strict deadline constraints is minimized by controlling the CPU-cycle frequencies . Besides, a joint allocation of communication and computation resources for multi-cell MIMO cloud computing systems was proposed in . Most recently, the energy-delay tradeoff of mobile cloud systems with heterogeneous types of computation tasks were investigated by a Lyapunov optimization algorithm, which decides the offloading policy, task allocation, CPU clock speeds and selected network interfaces .
Energy harvesting was introduced to communication systems for its potential to realize self-sustainable and green communications [19, 20]. With non-causal side information (SI)222‘Causal SI’ refers to the case that, at any time instant, only the past and current SI is known, while non-causal SI means that the future SI is also available., including the channel side information (CSI) and energy side information (ESI), the maximum throughput of point-to-point EH fading channels can be achieved by the directional water-filling algorithm . The study was later extended to EH networks with causal SI . Cellular networks with renewable energy supplies have also been widely investigated. Resources allocation policies that maximize the energy efficiency in OFDMA systems with hybrid energy supplies (HES), i.e., both grid and harvested energy are accessible to base stations, were proposed in . To save the grid energy consumption, a sleep control scheme for cellular networks with HES was developed in , and a low-complexity online base station assignment and power control algorithm based on Lyapunov optimization was proposed in .
The design principles for MEC systems with EH devices are different from those for EH communication systems or MEC systems with battery-powered devices. On one hand, compared to EH communication systems, computation offloading policies require a joint design of the offloading decision, i.e., whether to offload a task, the CPU-cycle frequencies for mobile execution333We use “local execution” and “mobile execution” interchangeably in this paper., and the transmission policy for task offloading, which makes it much more challenging. On the other hand, compared to MEC systems with battery-powered devices, the design objective is shifted from minimizing the battery energy consumption to optimizing the computation performance as the harvested energy comes for free. In addition, taking care of the ESI is a new design consideration, and the time-correlated battery energy dynamics poses another challenge.
In this paper, we will investigate MEC systems with EH devices and develop an effective dynamic computation offloading algorithm. Our major contributions are summarized as follows:
We consider an EH device served by an MEC server, where the computation tasks can be executed locally at the device or be offloaded to the MEC server for cloud execution444It is worthwhile to point out that powering mobile devices in MEC systems with wireless energy harvesting was proposed in , where the harvested energy is radiated from a hybrid access point and fully controllable. This is different from the system considered in this paper where the EH process is random and uncontrollable.. An execution cost that incorporates the execution delay and task failure is adopted as the performance metric, while DVFS and power control are adopted to optimize the mobile execution process and data transmission for computation offloading, respectively.
The execution cost minimization (ECM) problem, which is an intractable high-dimensional Markov decision problem, is formulated assuming causal SI, and a low-complexity online Lyapunov optimization-based dynamic computation offloading (LODCO) algorithm is proposed. In each time slot, the system operation, including the offloading decision, the CPU-cycle frequencies for mobile execution, and the transmit power for computation offloading, only depends on the optimal solution of a deterministic optimization problem, which can be obtained either in closed form or by bisection search.
We identify a non-decreasing property of the scheduled CPU-cycle frequencies (the transmit power) with respect to the battery energy level, which shows that a larger amount of available energy leads to a shorter execution delay for mobile execution (MEC server execution). Performance analysis for the LODCO algorithm is also conducted. It is shown that the proposed algorithm can achieve asymptotically optimal performance of the ECM problem by tuning a two-tuple control parameters. Moreover, it does not require statistical information of the involved stochastic processes, including the computation task request, the wireless channel, and EH processes, which makes it applicable even in unpredictable environments.
Simulation results are provided to verify the theoretical analysis, especially the asymptotic optimality of the LODCO algorithm. Moreover, the effectiveness of the proposed policy is demonstrated by comparisons with three benchmark polices with greedy harvested energy allocation. It is shown that the LODCO algorithm not only achieves significant performance improvement in terms of execution cost, but also effectively reduces task failure.
The organization of this paper is as follows. In Section II, we introduce the system model. The ECM problem is formulated in Section III. The LODCO algorithm for the ECM problem is proposed in Section IV and its performance analysis is conducted in Section V. We show the simulation results in Section VI and conclude this paper in Section VII.
Ii System Model
In this section, we will introduce the system model studied in this paper, i.e., a mobile-edge computing (MEC) system with an EH device. Both the computation model and energy harvesting model will be discussed.
Ii-a Mobile-edge Computing Systems with EH Devices
We consider an MEC system consisting of a mobile device and an MEC server as shown in Fig. 1. In particular, the mobile device is equipped with an EH component and powered purely by the harvested renewable energy. The MEC server, which could be a small data center managed by the telecom operator, is located at a distance of meters away and can be accessed by the mobile device through the wireless channel. The mobile device is associated with a system-level clone at the MEC server, namely, the cloud clone, which runs a virtual machine and can execute the computation tasks on behalf of the mobile device . By offloading the computation tasks for MEC, the computation experience can be improved significantly [4, 5, 6].
We assume that time is slotted, and denote the time slot length and the time slot index set by and , respectively. The wireless channel is assumed to be independent and identically distributed (i.i.d.) block fading, i.e., the channel remains static within each time slot, but varies among different time slots. Denote the channel power gain at the th time slot as , and , where is the cumulative distribution function (CDF) of . For ease of reference, we list the key notations of our system model in Table I.
|Distance between the mobile device and the MEC server|
|Index set of the time slots|
|Channel power gain from the mobile device to the MEC server in time slot|
|Computation task with bits input and deadline|
|Computation mode indicators at time slot|
|Task arrival indicator at time slot|
|()||Number of CPU cycles required to process one bit task input ()|
|Scheduled CPU-cycle frequencies for local execution at time slot|
|Transmit power for computation offloading at time slot|
|()||Maximum allowable CPU-cycle frequency (transmit power)|
|()||Execution delay of local execution (MEC server execution) at time slot|
|()||Energy consumption of local execution (MEC server execution) at time slot|
|()||Harvested (harvestable) energy at time slot|
|Maximum value of|
|Battery energy level at the beginning of time slot|
|The weight of the task dropping cost|
Ii-B Computation Model
We use to represent a computation task, where (in bits) is the input size of the task, and is the execution deadline, i.e., if it is decided that task is to be executed, it should be completed within time . The computation tasks requested by the applications running at the mobile device are modeled as an i.i.d. Bernoulli process. Specifically, at the beginning of each time slot, a computation task is requested with probability , and with probability , there is no request. Denote if a computation task is requested at the th time slot and if otherwise, i.e., . We focus on delay-sensitive applications with execution deadline less than the time slot length, i.e., [12, 13, 14, 17, 27], and assume no buffer is available for queueing the computation requests.
Each computation task can either be executed locally at the mobile device, or be offloaded to and executed by the MEC server. It may also happen that neither of these two computation modes is feasible, e.g., when energy is insufficient at the mobile device, and hence the computation task will be dropped. Denote with as the computation mode indicators, where and indicate that the computation task requested in the th time slot is executed at the mobile device and offloaded to the MEC server, respectively, while means the computation task is dropped. Thus, the computation mode indicators should satisfy the following operation constraint:
Local Executing Model: The number of CPU cycles required to process one bit input is denoted as , which varies from different applications and can be obtained through off-line measurement . In other words, CPU cycles are needed in order to successfully execute task . The frequencies scheduled for the CPU cycles in the th time slot are denoted as , which can be implemented by adjusting the chip voltage with DVFS techniques . As a result, the delay for executing the computation task requested in the th time slot locally at the mobile device can be expressed as
Accordingly, the energy consumption for local execution by the mobile device is given by
where is the effective switched capacitance that depends on the chip architecture . Moreover, we assume the CPU-cycle frequencies are constrained by , i.e., .
Mobile-edge Executing Model: In order to offload the computation task for MEC, the input bits of should be transmitted to the MEC server. We assume sufficient computation resource, e.g., a high-speed multi-core CPU, is available at the MEC server, and thus ignore its execution delay [16, 18, 26]. It is further assumed that the output of the computation is of small size so the transmission delay for feedback is negligible. Denote the transmit power as , which should be less than the maximum transmit power . According to the Shannon-Hartley formula, the achievable rate in the th time slot is given by , where is the system bandwidth and is the noise power at the receiver. Consequently, if the computation task is executed by the MEC server, the execution delay equals the transmission delay for the input bits, i.e.,
and555When the execution delay in the MEC server is non-negligible, the proposed algorithm can still be applied by modifying the expression of in (4) as , where denotes the execution delay in the MEC server. the energy consumed by the mobile device is given by
Ii-C Energy Harvesting Model
The EH process is modeled as successive energy packet arrivals, i.e., units of energy arrive at the mobile device at the beginning of the th time slot. We assume ’s are i.i.d. among different time slots with the maximum value of . Although the i.i.d. model is simple, it captures the stochastic and intermittent nature of the renewable energy processes [22, 25, 30]. In each time slot, part of the arrived energy, denoted as , satisfying
will be harvested and stored in a battery, and it will be available for either local execution or computation offloading starting from the next time slot. We start by assuming that the battery capacity is sufficiently large. Later we will show that by picking the values of ’s, the battery energy level is deterministically upper-bounded under the proposed computation offloading policy, and thus we only need a finite-capacity battery in actual implementation. More importantly, including ’s as optimization variables facilitates the derivation and performance analysis of the proposed algorithm. Similar techniques were adopted in previous studies, such as ,  and . Denote the battery energy level at the beginning of time slot as . Without loss of generality, we assume and . In this paper, energy consumed for purposes other than local computation and transmission is ignored for simplicity, while more general energy models can be handled by the proposed algorithm with minor modifications.666We will demonstrate how to adapt the proposed algorithm to more general energy models of mobile devices, e.g., by taking the power consumption of screens and operating systems into account, in Section IV-A. Denote the energy consumed by the mobile device in time slot as , which depends on the selected computation mode, scheduled CPU-cycle frequencies and transmit power, and can be expressed as
subject to the following energy causality constraint:
Thus, the battery energy level evolves according to the following equation:
With EH mobile devices, the computation offloading policy design for MEC systems becomes much more complicated compared to that of conventional mobile cloud computing systems with battery-powered devices. Specifically, both the ESI and CSI need to be handled, and the temporally correlated battery energy level makes the system decision coupled in different time slots. Consequently, an optimal computation offloading strategy should strike a good balance between the computation performance of the current and future computation tasks.
Iii Problem Formulation
In this section, we will first introduce the performance metric, namely, the execution cost. The execution cost minimization (ECM) problem will then be formulated and its unique technical challenges will be identified.
Iii-a Execution Cost Minimization Problem
Execution delay is one of the key measures for users’ QoE [12, 13, 14, 16, 17, 18], which will be adopted to optimize the computation offloading policy for the considered MEC system. Nevertheless, due to the intermittent and sporadic nature of the harvested energy, some of the requested computation tasks may not be able to be executed and have to be dropped, e.g., due to lacking of energy for local computation, while the wireless channel from the mobile device to the MEC server is in deep fading, i.e., the input of the tasks cannot be delivered. To take this aspect into consideration, we penalize each dropped task by a unit of cost. Thus, we define the execution cost as the weighted sum of the execution delay and the task dropping cost, which can be expressed by the following formula:
where (in second) is the weight of the task dropping cost, is the indicator function, and is given by
Without loss of generality, we assume that executing a task successfully is preferred to dropping a task, i.e., .
If it is decided that a task is to be executed, i.e., or , it should be completed before the deadline . In other words, the following deadline constraint should be met:
Consequently, the ECM problem can be formulated as:
where (13) indicates that if there is no computation task requested, neither mobile execution nor MEC server execution is feasible. (14) is the battery discharging constraint, i.e., the amount of battery output energy cannot exceed in each time slot, which is essential for preventing the battery from over discharging [30, 31]. The maximum allowable transmit power and the maximum CPU-cycle frequency constraints are imposed by (15) and (16), respectively, while the zero-one indicator constraint for the computation mode indicators is represented by (17).
Iii-B Problem Analysis
In the considered MEC system, the system state is composed of the task request, the harvestable energy, the battery energy level, as well as the channel state, and the action is the energy harvesting and the computation offloading decision, including the scheduled CPU-cycle frequencies and the allocated transmit power. It can be checked that the allowable action set depends only on the current system state, and is irrelevant with the state and action history. Besides, the objective is the long-term average execution cost. Thus, is a Markov decision process (MDP) problem. In principle, can be solved optimally by standard MDP algorithms, e.g., the relative value iteration algorithm and the linear programming reformulation approach . Nevertheless, for both algorithms, we need to use finite states to characterize the system, and discretize the feasible action set. For example, if we use states to quantize the wireless channel, states to characterize the battery energy level, states to describe the harvestable energy, and admits transmit power levels and CPU-cycle frequencies, there are possible system states in total. For the relative value iteration algorithm, this will take a long time to converge as there will be as many as feasible actions in some states. For the linear programming (LP) reformulation approach, we need to solve an LP problem with variables, which will be practically infeasible even for a small value of , e.g., . In addition, it will be difficult to obtain solution insights with the MDP algorithms as they are based on numerical iteration. Moreover, quantizing the state and action may lead to severe performance degradation, and the memory requirement for storing the optimal policy will yet be another big challenge.
In the next section, we will propose a Lyapunov optimization-based dynamic computation offloading (LODCO) algorithm to solve , which enjoys the following favorable properties:
There is no need to quantize the system state and feasible action set, and the decision of the LODCO algorithm within each time slot is of low complexity. In addition, there is no memory requirement for storing the optimal policy.
The LODCO algorithm has no prior information requirement on the channel statistics, the distribution of the renewable energy process or the computation task request process.
The performance of the LODCO algorithm is controlled by a two-tuple control parameters. Theoretically, by adjusting these parameters, the proposed algorithm can behave arbitrarily close to the optimal performance of .
An upper bound of the required battery capacity is obtained, which shall provide guidelines for practical installation of the EH components and storage units.
Iv Dynamic Computation Offloading: The LODCO Algorithm
In this section, we will develop the LODCO algorithm to solve . We will first show an important property of the optimal CPU-cycle frequencies, which helps to simplify . In order to take advantages of Lyapunov optimization, we will introduce a modified ECM problem to assist the algorithm design. The LODCO algorithm will be then proposed for the modified problem, which also provides a feasible solution to . In Section V, we will show that this solution is asymptotically optimal for .
Iv-a The LODCO Algorithm
We first show that the optimal CPU-cycle frequencies of the CPU cycles scheduled for a single computation task should be the same, as stated in the following lemma.
If a task requested at the th time slot is being executed locally, the optimal frequencies of the CPU cycles should be the same, i.e., .
The proof can be obtained by contradiction, which is omitted for brevity.
The property of the optimal CPU-cycle frequencies in Lemma 1 indicates that we can optimize a scalar instead of a -dimensional vector for each computation task, which helps to reduce the number of optimization variables. However, due to the energy causality constraint (8), the system’s decisions are coupled among different time slots, which makes the design challenging. This is a common difficulty for the design of EH systems. We find that by introducing a non-zero lower bound, , on the battery output energy at each time slot, such coupling effect can be eliminated and the system operations can be optimized by ignoring (8) at each time slot. Thus, we first introduce a modified version of as
where . Compared to , only a scalar needs to be determined for mobile execution, which preserves optimality according to Lemma 1, and thus and . Besides, all constraints in are retained in , and an additional constraint on the battery output energy is imposed by (18). Hence, is a tightened version of . Denote the optimal values of and as and , respectively. The following proposition reveals the relationship between and , which will later help show the asymptotic optimality of the proposed algorithm.
The optimal value of is greater than that of , but smaller than the optimal value of plus a positive constant , i.e., , where . Here, , and .
Please refer to Appendix A.
In general, the upper bound in Proposition 1 is not tight. However, as goes to zero, diminishes as shown in the following corollary.
By letting approach zero, can be made arbitrarily close to , i.e., .
The proof is omitted due to space limitation.
Proposition 1 bounds the optimal performance of by that of , while Corollary 1 shows that the performance of both problems can be made arbitrarily close. Actually, Corollary 1 fits our intuition, since when , reduces to . However, due to the temporally correlated battery energy levels, the system’s decisions are time-dependent, and thus the vanilla version of Lyapunov optimization techniques, where the allowable action sets are i.i.d., cannot be applied directly. Fortunately, the weighted perturbation method offers an effective solution to circumvent this issue . In order to present the algorithm, we first define the perturbation parameter and the virtual energy queue at the mobile device, which are two critical elements.
The perturbation parameter for the EH mobile device is a bounded constant satisfying
where , and is a control parameter in the LODCO algorithm with unit as .777Since the right-hand side of (19) increases with (), a larger value of will result in a large value of , i.e., a higher perturbed energy level in the proposed algorithm.
The virtual energy queue is defined as , which is a shifted version of the actual battery energy level at the mobile device.
As will be elaborated later, the proposed algorithm minimizes the weighted sum of the net harvested energy and the execution cost in each time slot, with weights of the virtual energy queue length , and the control parameter , respectively, which tends to stabilize around and meanwhile minimize the execution cost. The LODCO algorithm is summarized in Algorithm 1. In each time slot, the system operation is determined by solving a deterministic per-time slot problem, which is parameterized by the current system state and with all constraints in except the energy causality constraint (8).
When the power consumption for maintaining the basic operations at the mobile device, denoted as , is considered, there will be four computation modes for the time slots with , i.e., mobile execution (), MEC server execution (), dropping the task while maintaining the basic operations (), as well as dropping the task and disabling the basic operations (); while for the time slots with , two modes exist, i.e., the basic operations are maintained () or disabled (). As a result, the energy consumed by the mobile device at the th time slot can be written as . We introduce a unit of cost to penalize the interruption of basic operations, and thus the execution cost can be expressed as , where is the weight of the basic operations interruption cost. It is worthwhile to note that the framework of the proposed LODCO algorithm can be modified for this case, where the major changes lie on the selection of the perturbation parameter and the solution for the per-time slot problem, and will not be detailed in this paper.
Iv-B Optimal Computation Offloading in Each Time Slot
In this subsection, we will develop the optimal solution for the per-time slot problem, which consists of two components: the optimal energy harvesting, i.e., to determine , as well as the optimal computation offloading decision, i.e., to determine , and . The results obtained in this subsection are essential for feasibility verification and performance analysis of the LODCO algorithm in Section V.
Optimal Energy Harvesting: It is straightforward to show that the optimal amount of harvested energy can be obtained by solving the following LP problem:
and its optimal solution is given by
Optimal Computation Offloading: After decoupling from the objective function, we can then simplify the per-time slot problem into the following optimization problem :
Denote the feasible action set and the objective function of as and , respectively. For the time slots without computation task request, i.e., , there is a single feasible solution for due to (13), which is given by , , , and . Thus, we will focus on the time slots with computation task requests in the following. First, we obtain the optimal CPU-cycle frequency for a task being executed locally at the mobile device by solving the following optimization problem :
which is obtained by plugging , and into , and using the fact that for local execution. (24) is the execution delay constraint for mobile execution, and (25) is the CPU energy consumption constraint obtained by combining (14) and (18). We denote the objective function of as . Note that mobile execution is not necessarily feasible due to limited computation capability of the processing unit at the mobile device as indicated by (23). In the following proposition, we develop the feasibility condition and the optimal solution for given it is feasible.
is feasible if and only if , where and . If is feasible, its optimal solution is given by:
We first show the feasibility condition. Due to (24), should be no less than in order to meet the delay constraint. Besides, since the CPU energy consumption increases with , the battery output energy constraint can be equivalently expressed as . By incorporating (23), we rewrite the feasible CPU-cycle frequency set as , i.e., is feasible if and only if .
Next, we proceed to show the optimality of (26) when is feasible. When , decreases with , i.e., the minimum value is achieved by . When , is convex with respect to as both and are convex functions of . By taking the first-order derivative of and setting it to zero, we obtain a unique solution . If , is increasing in , and thus ; if , is decreasing in , and thus ; otherwise, if , is decreasing in and increasing in , and we have .
It can be seen from Proposition 2 that the optimal CPU-cycle frequency is chosen by balancing the cost of the harvested energy and the execution cost. Interestingly, we find that a higher CPU-cycle frequency, i.e., lower execution delay, can be supported with a greater amount of available harvested energy, which is because that the cost of renewable energy is reduced and more energy can be used to enhance the user’s QoE, as demonstrated in Corollary 2.
The optimal CPU-cycle frequency for local execution is independent with the channel gain , and non-decreasing with the virtual energy queue length .
Since does not depend on , the optimal CPU-cycle frequency is independent with the channel state. As and are constants independent with , and increases with for , we can conclude that is non-decreasing with based on (26).
Next, we will consider the case that the task is executed by the MEC server, where the optimal transmit power for computation offloading can be obtained by solving the following optimization problem :
which is obtained by plugging , and into , and using the fact that for computation offloading. (28) and (29) stand for the execution delay constraint and the battery output energy constraint for MEC, respectively. We denote the objective function of as . Due to the wireless fading, it may happen that computation offloading is infeasible. In order to derive the feasibility condition and the optimal solution for given it is feasible, we first provide the following lemma to facilitate the analysis.
For , is an increasing function of () that takes value from .
The proof is omitted due to space limitation.
is feasible if and only if , where and are defined as
respectively. In (30), , is the unique solution for given , and is the unique solution for given .
The proof can be obtained based on Lemma 2, which is omitted for brevity.
We now develop the optimal solution for as specified in the following proposition.
If is feasible, i.e., , its optimal solution is given by
where is the unique solution for equation and .
When , since both terms in are non-increasing with , we have . When , we define , and thus
Since , increases with . In addition, as and , there exists a unique satisfying . Since the denominator of (32) is positive for and , for , i.e., is decreasing, and for , i.e., is increasing. Consequently, when and , is non-increasing in while non-decreasing in , and thus ; when and , is non-decreasing in the feasible domain, and thus ; otherwise when and , is non-increasing in the feasible domain, we have .
Similar to mobile execution, we find a monotonic behavior of the optimal transmit power for computation offloading, as shown in the following corollary.
For a given such that is feasible, the optimal transmit power for computation offloading is non-decreasing with .
Please refer to Appendix B.
We can see from (31) that the optimal transmit power for computation offloading depends on both the battery energy level and the channel state. In Corollary 3, we show a higher battery energy level awakes a higher transmit power, and thus incurs smaller execution latency. However, the monotonicity of with respect to does not hold. This is due to the battery output energy constraint, which makes the feasible set of change with .