I Introduction
The integration of mobile edge computing (MEC) [3, 4, 1, 2, 6, 7, 5, 8] and wireless power transfer (WPT) [9, 10, 11, 12]
has recently emerged as a viable and promising solution to empower a large number of lowpower wireless devices (such sensors and actuators) in Internetofthings (IoT) networks, with enhanced and sustainable communication and computation. In such wireless powered MEC systems, energy transmitters (ETs) and MEC servers are deployed at the mobile network edge, either separated or colocated with access points (APs) or base stations (BSs) therein. Accordingly, wireless devices can harvest radiofrequency (RF) energy transferred from ETs over the air, and then rely on the harvested energy to execute their computation tasks via computing locally or offloading to MEC servers for remote computing. By exploiting both benefits of MEC and WPT, the wireless powered MEC is able to significantly prolong the network lifetime and even achieve sustainable network operation, with enhanced computation and communication capability at end devices. Therefore, this technique is envisioned to be of great importance to enable abundant IoT and artificial intelligence (AI) applications in the near future.
The wireless powered MEC systems face various new technical challenges due to the coupling of the wireless energy supply and the communication and computation demand at users. This thus calls for a new design framework to jointly optimize the WPT at ETs and the task execution via local computing and offloading at users, for maximizing the system performance. In the literature, the authors in [13]
first considered a singleuser wireless powered MEC system with colocated ET and MEC server, with the objective of maximizing the probability of successfully computing given tasks at the user. Furthermore, the authors in
[14] studied multiuser wireless powered MEC systems under a timedivision multiple access (TDMA) protocol for multiuser computation offloading, in which the overall energy consumption (including the transmission energy for WPT at the ET and the remote computing energy at the MEC server) is minimized subject to both energy neutrality and task completion constraints at these users. Moreover, [15] studied the computation rate maximization in multiuser wireless powered MEC systems with binary offloading. The authors in [16] further considered a wireless powered relaying system for MEC, where one relay node utilizes the harvested wireless energy to help the source node’s task offloading via relaying. In addition, [17] studied the computation rate maximization in wireless powered user cooperative computation systems, in which the source user node utilizes its harvested energy from the ET to offload its tasks to multiple peer user nodes via devicetodevice (D2D) links and each peer node also opportunistically harvests the harvested wireless energy for cooperative computation.Despite such research progress, these prior works [13, 14, 15, 16, 17] focused on oneshot optimization under static wireless channels and given computation tasks at users, in which the timedynamics in both WPT and task arrivals are overlooked. In practical wireless powered MEC systems, nonetheless, both wireless energy and computation task arrivals at users may fluctuate significantly over time, due to the randomness in wireless channels and the bursty nature of computation traffics, respectively. Therefore, both energy and task causality constraints are imposed at users, i.e., the energy (or task) amount cumulatively consumed (or executed) at any time instant cannot exceed that cumulatively harvested (or arrived) at that time. Under these new constraints, how to adaptively manage the ET’s wireless energy supply over timevarying channels to support users’ dynamic computation demands with random task arrivals is a fundamental but challenging problem that remains not well addressed yet. This thus motivates the current work.
In this paper, we address this problem by particularly considering a basic singleuser wireless powered MEC system that consists of a multiantenna ET, a singleantenna AP integrated with an MEC server, and a singleantenna user node with dynamic task arrivals over time. The ET employs the energy beamforming to wirelessly charge the user, and the user relies on the harvested energy to execute its computation tasks via locally computing a portion of them and offloading the other portion to the AP. To avoid the cochannel interference, we assume that the WPT from the ET to the user and the task offloading from the user to the AP are implemented simultaneously over orthogonal frequency bands. We focus on a particular finite time horizon consisting of multiple slots. Suppose that the user’s computation tasks arrive at the beginning of each slot and all tasks need to be successfully executed before the end of this horizon. Under this setup, our objective is to minimize the transmission energy consumption for WPT at the ET subject to the energy and task causality constraints at the user, by jointly optimizing the energy allocation for WPT at the ET and task allocation for local computing and offloading at the user over time. The main results of this paper are summarized as follows.

First, in order to characterize the fundamental performance limit, we consider the offline optimization by assuming that the perfect knowledge of channel state information (CSI) and task state information (TSI) (i.e., task arrival timing and amounts) is known apriori. In this case, the energy minimization problem corresponds to a convex optimization problem. Then, we handle this problem by first considering the special scenario with static channels. In this scenario, we obtain a wellstructured optimal solution by leveraging the KarushKuhnTucker (KKT) optimality conditions. The optimal solution shows that the ET should allocate the transmission energy uniformly over time, and the user should employ staircase task allocation for both local computing and offloading, with the number of executed task inputbits monotonically increasing over time.

Next, we consider the general scenario with timevarying channels, in which the energy minimization problem becomes more challenging to solve. In this scenario, we show that this problem can be decomposed into two subproblems for the ET’s energy allocation and the user’s task allocation, respectively. Accordingly, we obtain the wellstructured optimal solution via convex optimization techniques. It is shown that the ET should transmit energy sporadically at slots with causally dominating channel power gains, and the user should apply the staircase task allocation for local computing and the staircase waterfilling for offloading with monotonically increasing computation levels over time.

In addition, we also consider the online optimization when the knowledge of CSI and TSI is causally known, i.e., at each time slot, only the past and present CSI/TSI is available but the future CSI/TSI is unknown. Inspired by the structured optimal offline solutions obtained above, we develop heuristic online designs for the joint energy allocation (for WPT) at the ET and task allocation (for local computing and offloading) at the user, under both scenarios with static and timevarying channels.

Finally, we provide numerical results to validate the performance of our proposed designs. It is shown that in both static and timevarying channel scenarios, the optimal offline solutions achieve significantly smaller energy consumption than benchmark schemes with only local computing or full offloading at the user, while the proposed heuristic online designs perform close to the offline solutions and considerably outperform the conventional myopic designs.
It is worth noting that the proposed joint energy and task allocation designs in wireless powered MEC systems are different from the task allocation in energy harvesting powered MEC systems [18, 19, 20] and the energy allocation in energy harvesting[21] or wireless powered communication systems [22]. First, unlike [18, 19, 20]
considering random and uncontrollable energy arrivals from ambient renewable sources (e.g., solar and wind energy), this paper considers the fully controllable energy supply from WPT at the ET, in which the energy allocation for WPT is an additional design degree of freedom for optimizing the system computation performance. Next, in contrast to
[21] and [22] with only communication energy consumption considered, this paper focuses on both communication (for offloading) and (local) computation energy consumptions at the user, thus making the demand side management (with task allocation) more challenging. Furthermore, it is also worth noticing that our prior work[24] addressed the system energy minimization problem in multiuser wireless powered MEC systems with colocated ET and MEC server at the AP subject to energy and task causality constraints at each user, in which joint energy and task allocation is optimized offline via standard convex optimization techniques. By contrast, in this paper we consider a different setup with the ET and MEC server separately located, under which the optimal offline solutions are obtained in wellstructured forms to gain more design insights (instead of only numerical algorithms in [24]) in both static and timevarying channel scenarios, and new heuristic online designs are also proposed to facilitate practical implementation.The remainder of the paper is organized as follows. Section II introduces the singleuser wireless powered MEC system model and formulates the joint energy and task allocation problem of interest. Sections III and IV present the optimal offline solutions to the joint energy and task allocation problem in the scenarios with static and timevarying channels, respectively. Building upon the optimal offline designs, Section V presents heuristic online designs for the joint energy and task allocation. Section VI provides numerical results to demonstrate the effectiveness of the proposed designs, followed by the conclusion in Section VII.
Notation: For an arbitrarysize matrix , denotes the conjugate transpose. denotes the space of matrices with complex entries.
denotes the Euclidean norm of a complex vector
, denotes the absolute value of a complex scalar , and denotes the cardinality of a set . anddenote an identity matrix and an allzeros vector/matrix, respectively, with appropriate dimensions;
denotes the distribution of a circular symmetric complex Gaussian (CSCG) random variable
with meanand variance
, denotes the distribution of a uniform random variable within an interval , and stands for “distributed as”; denotes the statistical expectation. Furthermore, we define .Ii System Model and Problem Formulation
This paper considers a singleuser wireless powered MEC system as shown in Fig. 1, which consists of an ET equipped with antennas, a singleantenna AP integrated with an MEC server^{1}^{1}1Note that the MEC server represents an integral part of the virtualized computation resources and hosts the MEC applications running at the virtual machines (VMs) on top of the virtualization infrastructure[1, 2]., and a singleantenna user with dynamically arrived tasks to be executed. In this system, the ET employs the energy beamforming to charge the user over the air, and the user relies on the harvested energy for task execution via computing locally or offloading to the AP. Suppose that the WPT from the ET to the user and the task offloading from the user to the AP are implemented simultaneously over orthogonal frequency bands. In particular, we focus on a finite time horizon with duration , which is divided into time slots each with identical duration . Let denote the set of the slots. At the beginning of each slot , let denote the number of task inputbits arrived at the user. The computation tasks are subject to a common computation deadline at the end of this horizon, i.e., the user needs to successfully execute these tasks before that. Furthermore, we consider the partial offloading at the user, such that the user can arbitrarily partition computation tasks into two parts for local computing and offloading to the AP^{2}^{2}2As commonly assumed in the literature (see, e.g., [14, 13, 15]), we ignore the time required for both task execution at the MEC server and computation results downloading from the AP to the user. This is practically reasonable, since the MEC server normally has much stronger computation capability than the user, and the size of the computation results is generally much smaller than that of the task inputbits for many applications (e.g., image/video/voice recognition and file scanning.)., respectively.
Iia Task Execution at User
In this subsection, we consider the task execution at the user via local computing and offloading, respectively. At each slot , let and denote the number of task inputbits which are computed locally and offloaded to the AP, respectively. The task execution at the user is subject to the task causality constraints, i.e., until each slot , the number of task inputbits cumulatively executed via both local computing and task offloading (i.e., ) cannot exceed that cumulatively arrived (i.e., ). Therefore, we have
(1) 
In addition, since the user needs to successfully accomplish the task execution before the end of the last slot , we have the task completion constraint as
(2) 
First, we consider the user’s local computing for executing the task inputbits at each slot . Let denote the number of central processing unit (CPU) cycles required for executing one task inputbit at the user, which generally depends on the types of applications and the user’s CPU architecture[25]. Accordingly, a total of CPU cycles are required for the user’s local computing. By applying the dynamic voltage and frequency scaling (DVFS) technique, in order to maximize the energy efficiency for local computing, the user should adopt a constant CPU frequency at each slot [14]. In this case, the user’s energy consumption for local computing at slot is expressed as [25]
(3) 
where denotes the effective switched capacitance coefficient depending on the user’s CPU chip architecture.
Next, we consider the user’s computation offloading of the task inputbits at each slot . Let , , and denote the user’s transmission power, the channel power gain, and the system bandwidth for task offloading from the user to the AP, respectively. The transmission rate for offloading (in bitspersecond) from the user to the AP at slot is expressed as
(4) 
where denotes the signaltonoise ratio (SNR) gap due to the practical adaptive modulation and coding (AMC) scheme employed at the user[27] and denotes the power of the additive white Gaussian noise (AWGN) at the AP receiver. For notational convenience, we define in the sequel. In this case, we have in order for the user to offload the task inputbits to the AP. As a result, the user’s transmission energy consumption for task offloading at each slot is given by
(5) 
Notice that both in (3) and in (5) are convex functions with respect to and , respectively.
IiB Energy Beamforming for WPT at ET
In this subsection, we consider the energy beamforming for WPT at the ET to wirelessly charge the user node. At each slot , let denote the energybearing signal at the ET, where is assumed without loss of generality. Also, let (with ) and denote the energy beamforming vector and transmission power at the ET, respectively. Then, the transmitted energy signal of the ET is . Let denote the channel vector from the ET to the user for downlink WPT. The harvested energy by the user in this slot is then given by , where denotes the RFtoDC (direct current) energy conversion efficiency. Note that we consider a constant RFtoDC energy conversion efficiency, by assuming that the ET can properly adjust its transmission power level such that the user’s received RF power is always within the linear regime for RFtoDC conversion at the rectifier[9, 10]. More specifically, we assume that the ET employs the maximum ratio transmission (MRT) energy beamforming to maximize the transferred energy towards the user[11] by setting , . As a result, the energy harvested by the user at slot is given by
(6) 
where denotes the channel power gain for WPT from the ET to the user at slot .
Note that the user’s local computing and task offloading are both powered by the wireless energy transferred from the ET, thereby achieving sustainable computation and communication. In practice, the harvested energy at each slot can only be utilized at the present and subsequent time slots. In this case, the user is subject to the socalled energy causality constraints[21, 22], i.e., at each slot , the cumulatively consumed energy amount (for local computing and task offloading) at the user (i.e., ) cannot exceed that cumulatively harvested from the ET at that slot (i.e., ). As a result, we have
(7) 
IiC Problem Formulation
In this paper, we are interested in minimizing the transmission energy consumption for WPT at the ET while achieving sustainable operation for the user’s communication and computation^{3}^{3}3In this work, the energy consumption at the AP/MEC server incurred by offloading is not considered, since this term can be generally modeled as a constant. In practice, after the user offloads tasks to the AP, the MEC server therein normally uses the peak (and thus fixed) CPU frequency to execute these offloaded tasks with minimum delay[1, 2, 5]. In this case, the potential computation energy consumption reduction by controlling the AP’s remote execution for MEC is generally a negligible part as compared to the AP’s operational energy consumption for e.g., circuit, signal processing, and cooling.. In particular, our objective is to minimize the ET’s transmission energy consumption (i.e., ), subject to the user’s task causality constraints in (1), task completion constraint in (2), and energy causality constraints in (7). The design variables include the energy allocation at the ET, as well as the task allocation of for local computing and for offloading at the user. Mathematically, the energy minimization problem of interest is formulated as
(8a)  
(8b)  
(8c)  
(8d) 
Notice that the solution of problem () critically depends on the availability of the knowledge of CSI (i.e., and ) and TSI (i.e., ). In this paper, we first focus on the offline optimization with noncausal CSI and TSI, i.e., the CSI of and and the TSI of are perfectly known apriori. The offline optimization serves as the fundamental performance upper bound (i.e., the ET’s transmission energy consumption lower bound) for all the designs under imperfect and/or causally known CSI/TSI, which thus helps draw essential insights to motivate practical designs. In this case, since the computation energy consumption functions and are convex functions with respect to and , respectively, problem () is a convex optimization problem that can be efficiently solved by standard convex optimization techniques[26]. In Sections III and IV, we will obtain wellstructured optimal solutions to problems (1) in the scenarios with static and timevarying channels, respectively. Next, inspired by the optimal offline solutions, in Section V we will consider the online optimization of problem () with causal CSI/TSI available, i.e., at each slot , only the CSI of and and the TSI of for the previous and present slots are perfectly known, but , , and for future slots are unknown.
Iii Optimal Energy and Task Allocation Under Static Channels
In this section, we consider the offline optimization of problem (1) under the special scenario with static channels, where and , . In this scenario, we define for notational convenience. Accordingly, the energy minimization problem () is reduced as
(9a)  
(9b)  
In the following, we obtain the wellstructured optimal solution to problem (). To start with, we notice that at the optimality of problem (), the th constraint in (9b) must be tight. In other words, we have
(10) 
since otherwise one can always achieve a smaller objective value of problem () by decreasing the energy amount allocated at slot without violating constraints (8c) and (8d). Substituting (10) into the objective function, it is evident that the optimal task allocation solution of and to problem () can be obtained by equivalently solving the following total computation energy consumption minimization problem:
Let denote the optimal solution to problem (2), where the task allocation corresponds to the optimal solution to problem (). Furthermore, under and , any energy allocation that satisfies the constraints in (9b) and (10) is actually the optimal solution of to problem (). Therefore, in the following we first obtain and by solving problem () and then find based on (9b) and (10).
Iiia Obtaining Optimal and by Solving Problem ()
Note that problem () is a convex optimization problem that satisfies the Slater’s condition. Therefore, strong duality holds between problem () and its Lagrange dual problem [26]. Let , , and , denote the Lagrange multipliers associated with the constraints in (8c) and (8d) in problem (), and and , , denote the Lagrange multipliers associated with and , respectively. The following KKT conditions are sufficient and necessary for and to be the primal and dual optimal solutions to problem ()[26]:
(11a)  
(11b)  
(11c)  
(11d)  
(11e) 
where (11ab) denote the primal and dual feasible conditions, (11c) denotes the complementary slackness conditions, and (11d) and (11e) mean that the gradients of the Lagrangian with respect to and vanish at and , , respectively. Based on the KKT conditions in (11) together with some algebraic manipulations, one can obtain the optimal solution in a closed form to problem () in the following theorem.
Theorem 1
For problem (), the optimal number of task inputbits for local computing and for offloading are expressed as
(12a)  
(12b) 
respectively, where , .
Proof:
For ease of description, we refer to in (12) as the computation level at slot . Based on the KKT optimality conditions in (11), it is verified that the computation level is always nonnegative, i.e., , . In addition, since and , , the computation level increases monotonically over slots, i.e., . Furthermore, we define and refer to slot as a transition slot if the computation level increases strictly after this slot, i.e., . It is clear that the last slot is always a transition slot. Let collect all the transition slots within the horizon such that for and . Based on Theorem 1 and the monotonically increasing nature of computation levels over time, we establish the following proposition.
Proposition 1
The optimal task allocation of and for problem () satisfies the socalled staircase property below.

The number of task inputbits for local computing and for offloading both increase monotonically over slots, i.e., and .

If slot is a transition slot, then it holds that , i.e., the task buffer at the user is completely cleared after this slot.
Proof:
Based on (12), since , it yields that and . Therefore, the first property of Proposition 1 is proved.
To prove the second property of Proposition 1, we consider the cases of and , respectively. First, since all the cumulative tasks should be successfully computed before the end of the horizon, it must hold that . Next, we consider one particular slot that is a transition slot, i.e., the computation level increases strictly after slot with . Given and , we have . Based on the complementary slackness conditions in (11c), it follows that . The second property of Proposition 1 is thus verified.
Notice that the staircase task allocation in Proposition 1 is reminiscent of the staircase energy allocation for energy harvesting powered wireless communications[21]. Motivated by [21], we employ a forwardsearch procedure to find the optimal transition slot set, denoted by , and then obtain the optimal task allocation for problem () (or equivalently ()), as presented as Algorithm 1 in Table I and explained in detail as follows.
Algorithm 1 is implemented by induction, in which we start by searching the first optimal transition slot , followed by , , , until the last optimal transition slot . In particular, the search of the th optimal transition slot is stated as follows. We define for convenience. First, let denote the set of candidate transition slots. Then, for each candidate transition slot , we compute as the unchanged number of task inputbits executed perslot over slots . Next, we choose as the th optimal transition slot, since this slot admits the smallest unchanged number of task inputbits per slot among all candidate slots in set . Given the optimal transition slot obtained, we have
(13) 
where and are given in (12a) and (12b), respectively. Accordingly, we can find via a bisection search based on (13) and consequently find and . Therefore, by performing the above procedures iteratively, the optimal task allocation of and is finally obtained. Note that the task allocation obtained in Algorithm 1 always satisfies the staircase property in Proposition 1 and equivalently the KKT conditions in (11). Therefore, Algorithm 1 is ensured to achieve the optimal solution to problem () and thus problem ().
IiiB Obtaining Optimal Energy Allocation to Problem ()
Now, under the optimal task allocation obtained by Algorithm 1, it remains to find the optimal energy allocation to problem () based on (9b) and (10). Notice that based on Proposition 1, the allocated number of task inputbits and thus energy consumption at the user (for local computing and offloading) both monotonically increase over time. As a result, based on (9b) and (10), one optimal energy allocation solution to problem () is to uniformly allocate energy for WPT over time by setting
(14) 
By combining Algorithm 1 and (14), we finally obtain the optimal offline solution to problem ().
Example 1
For illustration, Fig. 2 shows the optimal offline solution to problem () with dynamic task arrivals , where the number of slots is set to be and other system parameters are set same as those in Section VI. As shown in Fig. 2(a), there are in total transition slots (i.e., , , and ), and the user’s task buffer becomes empty after each of these transition slots. It is also observed that both and increase monotonically over time, and they remain unchanged within the corresponding transition slot intervals (i.e., , , and ). The observations in Fig. 2(a) vividly corroborate the staircase task allocation structure (for local computing and offloading) as stated in Proposition 1. As shown in Fig. 2(b), the proposed uniform energy allocation for WPT at the ET is easy to implement in practice for meeting the user’s monotonically increasing computation energy demands over time.
Iv Optimal Energy and Task Allocation Under TimeVarying Channels
In this section, we present the optimal solution to problem () under the general scenario with timevarying channels, where the channel power gains for WPT and for offloading may change over slots. Let denote the optimal solution to problem ().
Iva Decomposition of Problem ()
In this subsection, we decouple problem () into two subproblems for optimizing energy allocation and task allocation , respectively. To this end, we first define the set of causality dominating slots (CDSs) for WPT from the ET to the user as [22]
(15) 
where . It is clear that in set , the channel power gain for WPT is strictly increasing over the CDS index , i.e., . Then, we have the following theorem.
Theorem 2
Under any given task allocation of and at the user, the optimal energy allocation to problem () is given by
(16) 
where is defined for convenience.
Proof:
See Appendix A.
Remark 1
Theorem 2 reveals the following two essential insights on the optimal energy allocation for WPT at the ET in wireless powered MEC systems over timevarying channels.

First, in order to the meet the energy demand at the user within the horizon, the ET should transmit wireless energy to the user only at CDSs, i.e., , , and , . This is intuitively expected, since the user can always harvest a larger amount of energy when the ET allocates energy to an earlier CDS in rather than to other nonCDSs in .

Second, the amount of energy harvested by the user at each CDS equals that consumed by the user at the CDS interval , i.e., , . This is because the channel power gains for WPT at CDSs are strictly increasing over time, and thus the ET only needs to allocate the exact amount of energy at the current CDS to meet the user’s energy demand during the corresponding CDS interval.
Based on Theorem 2 and to facilitate the description, we define as the effective channel power gain at slot for WPT from the ET to the user, where . By substituting the optimal ’s (16) back into the objective function of problem (), it yields that
(17) 
Based on (17), we can obtain the optimal task allocation solution of and to problem () by solving the following weighted sum energy minimization problem:
In the following, we first derive the optimal task allocation solution of and at the user by solving problem () and then obtain the optimal energy allocation at the ET to problem () by using Theorem 2.
IvB Obtaining Optimal Task Allocation by Solving Problem ()
As problem () is a convex optimization problem that satisfies the Slater’s condition, strong duality holds between problem () and its Lagrange dual problem. Let , , , , and , , denote the Lagrange multipliers associated with the constraints in (8c) and (8d), , and , respectively. The following KKT conditions are necessary and sufficient for and to be the primal and dual optimal solutions to problem ()[26].
(18a)  
(18b)  
(18c)  
(18d)  
(18e) 
where (18a–b) denote the primal and dual feasible conditions, (18c) denotes the complementary slackness conditions, and (18d) and (18e) mean that the gradients of the associated Lagrangian with respect to and vanish at and
Comments
There are no comments yet.