Skip to main content

Advances, Systems and Applications

Joint task offloading and resource allocation in mobile edge computing with energy harvesting

Abstract

Mobile edge computing (MEC) is considered to be a promising technique to enhance the computation capability and reduce the energy consumption of smart mobile devices (SMDs) in the sixth-generation (6G) networks. With the huge increase of SMDs, many applications of SMDs can be interrupted due to the limited energy supply. Combining MEC and energy harvesting (EH) can help solve this issue, where computation-intensive tasks can be offloaded to edge servers and the SMDs can also be charged during the offloading. In this work, we aim to minimize the total energy consumption subject to the service latency requirement by jointly optimizing the task offloading ratio and resource allocation (including time switching (TS) factor, uplink transmission power of SMDs, downlink transmission power of eNodeB, computation resources of SMDs and MEC server). Compared with the previous studies, the task uplink transmission time, MEC computation time and the computation results downloading time are all considered in this problem. Since the problem is non-convex, we first reformulate it, and then decompose it into two subproblems, i.e., joint uplink and downlink transmission time optimization subproblem (JUDTT-OP) and joint task offloading ratio and TS factor optimization subproblem (JTORTSF-OP). By solving the two subproblems, a joint task offloading and resource allocation with EH (JTORAEH) algorithm is proposed to solve the considered problem. Simulation results show that compared with other benchmark methods, the proposed JTORAEH algorithm can achieve a better performance in terms of the total energy consumption.

Introduction

Artificial intelligence (AI), virtual reality (VR), Internet of things (IoT), and the new generation of wireless communication technology have promoted a new round of technological revolution in the world. Although compared with the fourth-generation (4G) networks, the fifth-generation (5G) networks can provide a higher information transmission rate, for the computation-hungry and delay-sensitive mobile applications, such as autonomous driving and online gaming, 5G still cannot guarantee the quality of service (QoS) of these applications [1, 2]. In order to solve this problem, the sixth-generation (6G) networks emerge as the times require. Mobile edge computing (MEC) is one of the enabling technologies of 6G [3, 4]. By deploying the computation resources at the edge of networks, it can address the issues of insufficient computation capability and large service delay of mobile devices.

Energy efficiency (EE) is an important performance of 6G, which is required to be 10  100 times that of 5G. Although MEC can reduce energy consumption by deploying the computation resources at the edge of networks, some applications may still be interrupted due to the limited energy of smart mobile devices (SMDs) batteries [5, 6]. Using large batteries or recharging the batteries can be used to mitigate this issue. However, considering the size and cost of hardware, the battery capacity is finite, which cannot provide a long-term stable power supply for the SMDs. Meanwhile, it is impossible to recharge the batteries in some special scenarios, such as the large-scale deployment of IoT and outdoor wireless sensor networks (WSN) [7]. To achieve sustainable operation, energy harvesting (EH) allows the SMDs to harvest renewable energy from the environment (e.g., solar radiation, wind, and mechanical energy) or data communications and task processing. EH technology becomes very important for the green communication and durable operation of SMDs [8].

In the literature, a flurry of studies on task offloading with EH in MEC networks has been reported, which can be classified into two categories based on different objectives. The first is to minimize the MEC system power consumption [913]. In [9], the authors investigated the problem of power consumption for multiuser MEC system with EH, where an online algorithm was proposed based on the Lyapunov optimization method. In [10], the energy minimization problem is studied for MEC system considering the channel fluctuations and dynamic task arrivals over time, where a well-structured optimal solution is achieved. In [11], the total energy consumption was minimized for MEC system considering the independent variation of the wireless channel conditions and computing tasks, where a mixed-timescale joint computation offloading and wireless resource allocation algorithm is presented. In [12], the access point power consumption was minimized for MEC system with consideration of the doubly near-far effect for the farther SMDs, where a two-phase task offloading method is proposed. In [13], the total energy consumption of access points was minimized for wireless powered multiuser MEC system subject to the users individual computation latency, where an optimal resource allocation scheme was designed. The second is to maximize the EE performance of MEC system [1418]. In [14], the system minimum EE was maximized for a MEC system, where a cooperative scheme among users was presented. In [15], a partial offloading scheme was proposed to improve the EE for a wireless powered MEC system. In [16], the EE in partial offloading and local computing scenarios for a MEC system was maximized, where a two-phase resource allocation method was proposed. In [17], the EE was maximized in a MEC-based heterogeneous system, where a quantum-behaved particle swarm optimization algorithm was involved. In [18], the EE was also maximized for a wireless powered MEC system with dynamic task arrivals, where the Lagrange duality method was used.

Nevertheless, the computation results downloading transmission time is not considered in previous studies above [918]. When the computation outcome with large sizes, the downloading time cannot be ignored, such as augmented reality and multi-media transformation [19]. In addition, when considering the computation results downloading transmission, the SMDs with EH components can harvest energy while receiving information, the EH-aware decision making should be considered. Therefore, the resource allocation schemes should be re-investigated when considering the downloading time and energy harvesting in MEC system, which motivated this work.

The motivations of this paper can be summarized as follows.

  • In most previous work [918], the downloading transmission time of the computation results was ignored. However, for computation outcome with large sizes, the downloading transmission time is an important part of task offloading delay, such as augmented reality and multi-media transformation, which cannot be ignored for simplify.

  • Considering the computation results downloading transmission, the SMDs with EH components can harvest energy while receiving information, i.e., simultaneous wireless information and power transfer (SWIPT) [20]. Therefore, how to make full use of the renewable energy resources to improve system performance is a challenging issue in the downlink SWIPT system.

Therefore, in this paper, we mainly focus on the total energy consumption minimization problem. Since the problem is a non-convex problem, we reformulate the problem firstly, and then decompose it into two subproblems, which are solved by Lagrangian dual method. Based on the results of two subproblems, a joint task offloading and resource allocation with energy harvesting (JTORAEH) algorithm is proposed. Simulation results demonstrate the effectiveness of the proposed JTORAEH algorithm. Our main contributions of the paper are summarized as follows.

  • To realize green MEC design for 6G networks, the total energy consumption minimization problem is formulated, which jointly optimizes the task offloading ratio and resource allocation with considering the energy harvesting and computation results downloading time.

  • Due to the coupling of optimization variables and the nonconvexity of the formulated problem, we decompose the primal problem into two subproblems, which can be solved by Lagrangian dual method. Based on the results of two subproblems, we propose a JTORAEH algorithm to minimize the total energy consumption of the system.

  • Simulation results are provided, which demonstrate the accuracy and effectiveness of our proposed JTORAEH algorithm.

The rest of this paper is organized as follows. In “System model” section, the system model is described. In “Problem formulation and reformulation” section, the total energy consumption minimization problem is formulated and reformulated. In “Joint task offloading and resource allocation with eH algorithm: jTORAEH” section, the JTORAEH algorithm is proposed to solve the considered problem. Simulation results are provided in “Simulation results” section. Finally, “Conclusions” section concludes this paper.

System model

In this section, we first describe the system model of MEC, including network model, uplink transmission model, computation model, downlink transmission model, and EH model.

Network model

A multiple EH-enabled users MEC system is considered, as shown in Fig. 1, which consists of an eNodeB equipped with a MEC server and I single-antenna SMDs. In order to achieve sustainable operation, each SMD has EH function, which can harvest energy from radio frequency (RF) signals. Besides, in the given time period, each SMD has one computation-intensive task to be executed. Let \(\mathcal {I}=\{1,...,I\}\) denote the set of SMD indices, which are also the set of task indices. Using a 4-tuple \(\{c_{i}, s_{i}, o_{i}, t_{i}^{\max }\}\) to represent the task i, where ci is the number of CPU-cycle required to accomplish task i. si is the input computation file size of task i, oi is the output computation result size of task i, and \(t_{i}^{\max }\) is the maximal delay requirement of task i. The output results size is proportional to the input data size, i.e., oi=βisi, βi(0,1].

Fig. 1
figure 1

System Model

The partial task offloading is considered in this work. Therefore, we denote λi as the offloading ratio variable of task i, which means that λisi bits of task i are offloaded to the MEC server, and (1−λi)si bits of task i are executed by SMDs locally. Let T be the total EH and task offloading time, as shown in Fig. 2. In the EH phase with the interval of αT, each SMD harvests energy from RF signals transmitted by the eNodeB, where α is the time switching (TS) factor. In the task offloading phase with the interval of (1−α)T, each SMD offloads partial task to the MEC server or executes partial task locally. Particularly, when the partial task is offloaded to the MEC server, the phase is divided into three parts. The first part is used for uplink transmission in which a partial task is offloaded to the eNodeB. The second part is used for computation in which a partial task is executed by the MEC server. The third part is used for downlink transmission in which the eNodeB downloads the computation results to SMDs. The notations used in this paper are summarized in Table 1.

Fig. 2
figure 2

The process of EH and task offloading

Table 1 Summary of key notations

Uplink transmission model

Let bi be the bandwidth between eNodeB and SMD i, and the bandwidth is allocated to each SMD orthogonally in this system. Thus, there is no interference among the SMDs. The uplink channel gain from SMD i to eNodeB is denoted as hi. The uplink transmission power of SMD i to eNodeB is \(p_{i}^{u}\). Therefore, the uplink transmission rate of task i can be given by

$$\begin{array}{*{20}l} r_{i}^{u}=b_{i}\log\left(1+\frac{h_{i}p_{i}^{u}}{N_{0}}\right), \end{array} $$
(1)

where N0 is the noise power. Since λisi bits of task i are offloaded to the MEC server, the uplink transmission time of the partial task i can be expressed as

$$\begin{array}{*{20}l} t_{i}^{u}=\frac{\lambda_{i}s_{i}}{b_{i}\log\left(1+\frac{h_{i}p_{i}^{u}}{N_{0}}\right)}. \end{array} $$
(2)

Further, the uplink transmission energy consumption of partial task i is given by

$$\begin{array}{*{20}l} E_{i}^{u}=p_{i}^{u}\frac{\lambda_{i}s_{i}}{b_{i}\log\left(1+\frac{h_{i}p_{i}^{u}}{N_{0}}\right)}. \end{array} $$
(3)

Computation model

Local computation

Denote \(F_{i}^{\max }\) as the maximal CPU-cycle frequency of SMD i, and \(f_{i}^{\text {loc}}\) as the CPU-cycle frequency of SMD i allocated to the task. Therefore, the local computation time can be given by

$$\begin{array}{*{20}l} t_{i}^{\text{loc}}=\frac{(1-\lambda_{i})c_{i}}{f_{i}^{\text{loc}}}. \end{array} $$
(4)

While, the local computation time, i.e., \( t_{i}^{\text {loc}}\), should satisfy the task delay requirement. That is,

$$\begin{array}{*{20}l} t_{i}^{\text{loc}}\leq \min\left(t_{i}^{\max},(1-\alpha)T\right). \end{array} $$
(5)

Following with (2) in [21], the local computation energy consumption of SMD i can be given by

$$\begin{array}{*{20}l} E_{i}^{\text{loc}}=\kappa_{i}^{\text{loc}}\left(f_{i}^{\text{loc}}\right)^{2}(1-\lambda_{i})c_{i}, \end{array} $$
(6)

where \(\kappa _{i}^{\text {loc}}\) is the conversion coefficient of SMD i, which is determined by the SMD i CPU chip architecture. Based on the practical measurement, we set \(\kappa _{i}^{\text {loc}}=10^{-27}\) in the sequel [22].

MEC Server Computation

Denote \(F_{\text {mec}}^{\max }\) as the maximal CPU-cycle frequency of MEC server, and \(f_{i}^{\text {mec}}\) as the CPU-cycle frequency of MEC server allocated to the task i. Therefore, the MEC server computation time can be given by

$$\begin{array}{*{20}l} t_{i}^{\text{mec}}=\frac{\lambda_{i}c_{i}}{f_{i}^{\text{mec}}}. \end{array} $$
(7)

Considering the leakage power can take more than 30% of the total power of the modern CPU. We need to consider the leakage power of MEC server. According to [23, 24], the leakage power can be expressed as

$$ P_{\text{staic}}=V_{\text{dd}}(I_{\text{leak}}+I_{\text{gate}}), $$
(8)

where Vdd is bias voltage, Ileak is sub-threshold leakage current, Igate is current due to gate tunneling effect.

Following with (6), the MEC server computation energy consumption of task i is expressed as

$$\begin{array}{*{20}l} E_{i}^{\text{mec}}=\kappa^{\text{mec}}(f_{i}^{\text{mec}})^{2}\lambda_{i}c_{i}+ P_{\text{staic}}t_{i}^{\text{mec}}, \end{array} $$
(9)

where κmec is the conversion coefficient of MEC server, which is determined by the MEC server CPU chip architecture. Similar to [22], we set κmec=10−28 in the paper.

Downlink transmission model

After finishing the MEC server computation, the eNodeB downloads the computation results to SMDs. Let gi be the downlink channel gain from eNodeB to SMD i, and the downlink transmission power of eNodeB to SMD i be \(p_{i}^{d}\). Therefore, the downlink transmission rate from eNodeB to SMD i can be given by

$$\begin{array}{*{20}l} r_{i}^{d}=b_{i}\log\left(1+\frac{g_{i}p_{i}^{d}}{N_{0}}\right), \end{array} $$
(10)

and the downlink transmission time from eNodeB to SMD i can be expressed as

$$\begin{array}{*{20}l} t_{i}^{d}=\frac{\beta_{i}\lambda_{i}s_{i}}{b_{i}\log\left(1+\frac{g_{i}p_{i}^{d}}{N_{0}}\right)}. \end{array} $$
(11)

Meanwhile, the downlink transmission energy consumption of eNodeB to SMD i is given by

$$\begin{array}{*{20}l} E_{i}^{d}=p_{i}^{d}\frac{\beta_{i}\lambda_{i}s_{i}}{b_{i}\log\left(1+\frac{g_{i}p_{i}^{d}}{N_{0}}\right)}. \end{array} $$
(12)

Moreover, when the partial task i is offloaded to the MEC server, the task offloading delay should satisfy the task delay requirement

$$\begin{array}{*{20}l} t_{i}^{u}+t_{i}^{\text{mec}}+t_{i}^{d}\leq \min(t_{i}^{\max},(1-\alpha)T). \end{array} $$
(13)

EH model

The energy harvested by SMD i includes two parts. In the first part, SMD i harvests energy from RF signals transmitted by eNodeB over αT, which is given by

$$\begin{array}{*{20}l} E_{i,1}^{\mathrm{\text{har}}}=\alpha T\eta_{i}g_{i}p_{i}^{d}, \end{array} $$
(14)

where ηi(0,1) is the energy conversion efficiency [25]. The second part is that SMD i collects energy from the eNodeB downlink transmission of the computation results with SWIPT. That is,

$$\begin{array}{*{20}l} E_{i,2}^{\mathrm{\text{har}}}=\eta_{i}t_{i}^{d}g_{i}p_{i}^{d}, \end{array} $$
(15)

Therefore, the total energy harvested by SMD i can be given by

$$\begin{array}{*{20}l} E_{i}^{\mathrm{\text{har}}}=E_{i,1}^{\mathrm{\text{har}}}+E_{i,2}^{\mathrm{\text{har}}}. \end{array} $$
(16)

As a result, the total energy consumption can be given by

$$\begin{array}{*{20}l} E_{tot}=\sum_{i=1}^{I}\left(E_{i}^{\text{loc}}+E_{i}^{u}+E_{i}^{\text{mec}}+E_{i}^{d}\right). \end{array} $$
(17)

Problem formulation and reformulation

In this section, a total energy consumption minimization problem is formulated firstly. And then, due to the nonconvexity of the primal problem, we reformulate the problem.

Problem formulation

Based on the system model, the total energy consumption minimization problem can be formulated as

$$\begin{array}{*{20}l} (\mathbf{P1})&~\min_{\alpha, \boldsymbol{\lambda}, \boldsymbol {f}^{\text{loc}},\boldsymbol {f}^{\text{mec}}, \boldsymbol {p}^{u}, \boldsymbol {p}^{d}}~~E_{tot} \end{array} $$
(18a)
$$\begin{array}{*{20}l} \text{s.t.}&~~t_{i}^{\text{loc}}\leq \min\left(t_{i}^{\max},(1-\alpha)T\right),\forall i \in \mathcal{I}, \end{array} $$
(18b)
$$\begin{array}{*{20}l} &~~ t_{i}^{u}+t_{i}^{\text{mec}}+t_{i}^{d}\leq \min\left(t_{i}^{\max},(1-\alpha)T\right), \forall i \in \mathcal{I}, \end{array} $$
(18c)
$$\begin{array}{*{20}l} &~~0\leq f_{i}^{\text{loc}}\leq F_{i}^{\max},~~\forall i\in \mathcal{I}, \end{array} $$
(18d)
$$\begin{array}{*{20}l} &~~\sum_{i=1}^{I} f_{i}^{\text{mec}}\leq F_{\text{mec}}^{\max}, \end{array} $$
(18e)
$$\begin{array}{*{20}l} &~~p_{i}^{u}\leq P_{i}^{\max},~~\forall i \in \mathcal{I}, \end{array} $$
(18f)
$$\begin{array}{*{20}l} &~~\sum_{i=1}^{I}p_{i}^{d}\leq P_{e}^{\max}, \end{array} $$
(18g)
$$\begin{array}{*{20}l} &~~E_{i}^{\text{loc}}+ E_{i}^{u}\leq E_{i}^{\mathrm{\text{har}}}+E_{i}^{o}, ~~\forall i\in \mathcal{I}, \end{array} $$
(18h)
$$\begin{array}{*{20}l} &~~0<\alpha<1, \end{array} $$
(18i)
$$\begin{array}{*{20}l} &~~0\leq\lambda_{i}\leq 1, \forall i \in \mathcal{I}, \end{array} $$
(18j)

where \(\boldsymbol {\lambda }=\left \{\lambda _{i}, i\in \mathcal {I}\right \}\), \(\boldsymbol {f}^{\text {loc}}=\left \{f^{\text {loc}}_{i}, i\in \mathcal {I}\right \}\), \(\boldsymbol {f}^{\text {mec}}=\left \{f^{\text {mec}}_{i}, i\in \mathcal {I}\right \}\), \(\boldsymbol {p}^{u}=\left \{p^{u}_{i}, i\in \mathcal {I}\right \}\), \(\boldsymbol {p}^{d}=\{p^{d}_{i}, i\in \mathcal {I}\}\) are the vectors of task offloading ratio, SMDs CPU-cycle frequency allocation, MEC server CPU-cycle frequency allocation, SMDs uplink power allocation, and eNodeB downlink power allocation, respectively. \(P_{i}^{\max }\) is the maximal transmission power of SMD i. \(P_{e}^{\max }\) is the maximal downlink transmission power of eNodeB. \(E_{i}^{o}\) is the initial energy of SMD i. Constraints (18b) and (18c) are the task offloading delay requirement of local computing and MEC computing, respectively. Constraints (18d) and (18e) are the SMD and MEC computation resource constraints, respectively. Constraints (18f) and (18g) are the transmission power constraints of SMD and eNodeB, respectively. Constraint (18h) means that the total energy consumption of SMDs should be no more than the harvested energy. Due to the product relationship between λi and \({p}_{i}^{u}\) as well as \({p}_{i}^{d}\), problem (P1) is non-convex, which is difficult to solve.

Problem reformulation

In order to solve problem (P1), we need to reformulate the problem. For (6), given α and λ, the local computation energy consumption of SMD is monotonously increasing with \(f_{i}^{\text {loc}}\). This means that the smaller \(f_{i}^{\text {loc}}\) is, the less local computation energy consumption is. For constraint (18b), when the optimal solution is obtained, \(t_{i}^{\text {loc}}= \min (t_{i}^{\max },(1-\alpha)T)\) should be held. Therefore, the optimal local CPU-cycle frequency of SMD i can be given by

$$\begin{array}{*{20}l} f_{i}^{\text{loc}*}=\frac{(1-\lambda_{i})c_{i}}{\min(t_{i}^{\max},(1-\alpha)T)}. \end{array} $$
(19)

Similarly, for (9), given α and λ, the MEC server computation energy consumption of SMD is monotonously increasing with \(f_{i}^{\text {mec}}\). For constraint (18c), when the optimal solution is obtained, \(t_{i}^{\text {loc}}= \min (t_{i}^{\max }-t_{i}^{u}-t_{i}^{d},(1-\alpha)T-t_{i}^{u}-t_{i}^{d})\) should be held. Therefore, the optimal MEC server CPU-cycle frequency to SMD i is given by

$$\begin{array}{*{20}l} f_{i}^{\text{mec}*}=\frac{\lambda_{i}c_{i}}{\min(t_{i}^{\max}-t_{i}^{u}-t_{i}^{d},(1-\alpha)T-t_{i}^{u}-t_{i}^{d})}. \end{array} $$
(20)

Then, constraint (18e) can be transformed as

$$\begin{array}{*{20}l} \sum_{i=1}^{I}\frac{\lambda_{i}c_{i}}{\min(t_{i}^{\max}-t_{i}^{u}-t_{i}^{d},(1-\alpha)T-t_{i}^{u}-t_{i}^{d})}\leq F_{\text{mec}}^{\max}. \end{array} $$
(21)

Following (3) and (12), let \(f(x)=x\frac {1}{\log _{2}(1+x)}\), where f(x) is monotonously increasing with x≥0. That is, given λ, the smaller pu and pd are, the less uplink and downlink transmission energy consumption are. With (2) and (11), the optimal uplink transmission power of SMD i, and downlink transmission power to SMD i are given by

$$\begin{array}{*{20}l} p_{i}^{u*}=\frac{N_{0}}{h_{i}}\left(2^{\frac{\lambda_{i}s_{i}}{b_{i}t_{i}^{u}}}-1\right), \end{array} $$
(22)

and

$$\begin{array}{*{20}l} p_{i}^{d*}=\frac{N_{0}}{g_{i}}\left(2^{\frac{\beta_{i}\lambda_{i}s_{i}}{b_{i}t_{i}^{d}}}-1\right), \end{array} $$
(23)

respectively.

Therefore, the problem (P1) can be reformulated as

$$\begin{array}{*{20}l} (\mathbf{P2})&~\min_{\alpha, \boldsymbol{\lambda}, \boldsymbol {t}^{u},\boldsymbol {t}^{d}}~~\varphi(\alpha, \lambda_{i}, t_{i}^{u}, t_{i}^{d}) \end{array} $$
(24a)
$$\begin{array}{*{20}l} \text{s.t.}&~~\frac{(1-\lambda_{i})c_{i}}{\min(t_{i}^{\max},(1-\alpha)T)}\leq F_{i}^{\max} ~~\forall i\in \mathcal{I}, \end{array} $$
(24b)
$$\begin{array}{*{20}l} &~~\sum_{i=1}^{I}\theta_{i}(\alpha,\lambda_{i}, t_{i}^{u}, t_{i}^{d})\leq F_{\text{mec}}^{\max}, \end{array} $$
(24c)
$$\begin{array}{*{20}l} &~~\frac{N_{0}}{h_{i}}\left(2^{\frac{\lambda_{i}s_{i}}{b_{i}t_{i}^{u}}}-1\right)\leq P_{i}^{\max},~~\forall i\in \mathcal{I}, \end{array} $$
(24d)
$$\begin{array}{*{20}l} &~~\sum_{i=1}^{I}\frac{N_{0}}{g_{i}}\left(2^{\frac{\beta_{i}\lambda_{i}s_{i}}{b_{i}t_{i}^{d}}}-1\right)\leq P_{e}^{\max}, \end{array} $$
(24e)
$$\begin{array}{*{20}l} &~~\kappa_{i}^{\text{loc}}\frac{(1-\lambda_{i})^{3}c_{i}^{3}}{(\min(t_{i}^{\max},(1-\alpha)T))^{2}}+\frac{N_{0}}{h_{i}}\left(2^{\frac{\lambda_{i}s_{i}}{b_{i}t_{i}^{u}}}\!-1\right)t_{i}^{u}\\ &~~\leq \eta_{i}N_{0}\left(2^{\frac{\beta_{i}\lambda_{i}s_{i}}{b_{i}t_{i}^{d}}}-1\right)(\alpha T+t_{i}^{d})+E_{i}^{o},~~\forall i\in \mathcal{I}, \end{array} $$
(24f)
$$\begin{array}{*{20}l} &~~0<\alpha<1, \end{array} $$
(24g)
$$\begin{array}{*{20}l} &~~0\leq\lambda_{i}\leq 1, \forall i \in \mathcal{I}, \end{array} $$
(24h)

where \(\boldsymbol {t}^{u}=\{t_{i}^{u}, i \in \mathcal {I}\}\) and \(\boldsymbol {t}^{d}=\{t_{i}^{d}, i\in \mathcal {I}\}\) are the vectors of uplink and downlink transmission time, respectively,

$$ \begin{aligned} \theta_{i}\left(\alpha, \lambda_{i}, t_{i}^{u}, t_{i}^{d}\right)= \frac{\lambda_{i}c_{i}}{\min(t_{i}^{\max}-t_{i}^{u}-t_{i}^{d},(1-\alpha)T-t_{i}^{u}-t_{i}^{d})}, \end{aligned} $$

and

$$ \begin{aligned} \varphi(\alpha, \lambda_{i}, t_{i}^{u}, t_{i}^{d}) =& \kappa_{i}^{\text{loc}}\frac{(1-\lambda_{i})^{3}c_{i}^{3}}{(\min(t_{i}^{\max},(1-\alpha)T))^{2}} \\ &+ \frac{N_{0}}{h_{i}}\left(2^{\frac{\lambda_{i}s_{i}}{b_{i}t_{i}^{u}}}-1\right)t_{i}^{u} + \kappa^{\text{mec}}\theta_{i}^{2}\lambda_{i}c_{i}+P_{\text{staic}}\frac{\lambda_{i}c_{i}}{\theta_{i}} \\ & + \frac{N_{0}}{g_{i}}\left(2^{\frac{\beta_{i}\lambda_{i}s_{i}}{b_{i}t_{i}^{d}}}-1\right)t_{i}^{d}. \end{aligned} $$

However, since the optimal variables are coupled, problem (P2) is still non-convex, which is difficult to solve.

Joint task offloading and resource allocation with eH algorithm: jTORAEH

In this section, we first decompose the problem (P2) into two subproblems: joint uplink and downlink transmission time optimization subproblem (JUDT-OP) and joint task offloading ratio and TS factor optimization subproblem (JTORTSF-OP). Then, the Lagrangian dual method is used to solve the two subproblems. By doing so, an iterative algorithm is proposed to the primal problem.

Joint uplink and downlink transmission time optimization subproblem: jUDTT-OP

By fixing α and λ, the JUDTT-OP can be given by

$$\begin{array}{*{20}l} (\mathbf{P3})&~\min_{\boldsymbol {t}^{u},\boldsymbol {t}^{d}}~~\varphi\left(t_{i}^{u}, t_{i}^{d}\right) \end{array} $$
(25a)
$$\begin{array}{*{20}l} \text{s.t.} &~~\sum_{i=1}^{I}\theta_{i}\left(t_{i}^{u}, t_{i}^{d}\right)\leq F_{\text{mec}}^{\max}, \end{array} $$
(25b)
$$\begin{array}{*{20}l} &~~\sum_{i=1}^{I}\frac{N_{0}}{g_{i}}\left(2^{\frac{\beta_{i}\lambda_{i}s_{i}}{b_{i}t_{i}^{d}}}-1\right)\leq P_{e}^{\max}, \end{array} $$
(25c)
$$\begin{array}{*{20}l} &~~\frac{N_{0}}{h_{i}}\left(2^{\frac{\lambda_{i}s_{i}}{b_{i}t_{i}^{u}}}-1\right)\leq P_{i}^{\max},~~\forall i\in \mathcal{I}, \end{array} $$
(25d)
$$\begin{array}{*{20}l} &~~\kappa_{i}^{\text{loc}}\frac{(1-\lambda_{i})^{3}c_{i}^{3}}{\left(\min\left(t_{i}^{\max},(1-\alpha)T\right)\right)^{2}}+\frac{N_{0}}{h_{i}}\left(2^{\frac{\lambda_{i}s_{i}}{b_{i}t_{i}^{u}}}-1\right)t_{i}^{u}\\ &~~\leq \eta_{i}N_{0}\left(2^{\frac{\beta_{i}\lambda_{i}s_{i}}{b_{i}t_{i}^{d}}}-1\right)\left(\alpha T+t_{i}^{d}\right)+E_{i}^{o},~~\forall i\in \mathcal{I}. \end{array} $$
(25e)

Due to the objective function and constraints in problem (P3) are convex, problem (P3) is a convex problem. Therefore, the Lagrangian dual method can be used to solve the JUDTT-OP [26].

Then, the Lagrangian function of problem (P3) is expressed as

$$\begin{array}{*{20}l} \begin{aligned} \mathcal{L}_{1} =& \mathcal{L} \left(\boldsymbol {t}^{u}, \boldsymbol {t}^{d}, \mu_{1}, \mu_{2}, \nu_{i}, \gamma_{i}\right) \\ =&\varphi\left(t_{i}^{u}, t_{i}^{d}\right)+\mu_{1}\left(\sum_{i=1}^{I}\theta_{i}\left(t_{i}^{u}, t_{i}^{d}\right)-F_{\text{mec}}^{\max}\right)\\ &+\mu_{2}\left(\sum_{i=1}^{I}\frac{N_{0}}{g_{i}}\left(2^{\frac{\beta_{i}\lambda_{i}s_{i}}{b_{i}t_{i}^{d}}}-1\right)- P_{e}^{\max}\right)\\ &+\nu_{i}\left(\frac{N_{0}}{h_{i}}\left(2^{\frac{\lambda_{i}s_{i}}{b_{i}t_{i}^{u}}}-1\right)-P_{i}^{\max}\right)\\ &+\gamma_{i} \bigg(\kappa_{i}^{\text{loc}}\frac{(1-\lambda_{i})^{3}c_{i}^{3}}{\left(\min\left(t_{i}^{\max}, (1-\alpha)T\right)\right)^{2}} \\ &+\frac{N_{0}}{h_{i}} \left(2^{\frac{\lambda_{i}s_{i}}{b_{i}t_{i}^{u}}}-1\right) t_{i}^{u} \\ &-\eta_{i}N_{0} \left(2^{\frac{\beta_{i}\lambda_{i}s_{i}}{b_{i}t_{i}^{d}}}-1\right) \left(\alpha T+t_{i}^{d}\right)-E_{i}^{o} \bigg), \end{aligned} \end{array} $$
(26)

where μ1, μ2, νi, and γi are the Lagrange multipliers.

Since the Lagrange function, i.e., \(\mathcal {L}_{1}\), is differentiable, the gradients of the Lagrange multipliers can be respectively given by

$$\begin{array}{*{20}l} \frac{\partial \mathcal{L}_{1}}{\partial \mu_{1}} =& \sum_{i=1}^{I}\theta_{i}\left(t_{i}^{u}, t_{i}^{d}\right)-F_{\text{mec}}^{\max}, \end{array} $$
(27)
$$\begin{array}{*{20}l} \frac{\partial \mathcal{L}_{1}}{\partial \mu_{2}} =& \sum_{i=1}^{I}\frac{N_{0}}{g_{i}}\left(2^{\frac{\beta_{i}\lambda_{i}s_{i}}{b_{i}t_{i}^{d}}}-1\right)- P_{e}^{\max}, \end{array} $$
(28)
$$\begin{array}{*{20}l} \frac{\partial \mathcal{L}_{1}}{\partial \nu_{i}} =& \frac{N_{0}}{h_{i}}\left(2^{\frac{\lambda_{i}s_{i}}{b_{i}t_{i}^{u}}}-1\right)- P_{i}^{\max}, \end{array} $$
(29)
$$\begin{array}{*{20}l} \frac{\partial \mathcal{L}_{1}}{\partial \gamma_{i}} =& \kappa_{i}^{\text{loc}}\frac{(1-\lambda_{i})^{3}c_{i}^{3}}{\left(\min\left(t_{i}^{\max},(1-\alpha)T\right)\right)^{2}} \,+\, \frac{N_{0}}{h_{i}}\!\left(2^{\frac{\lambda_{i}s_{i}}{b_{i}t_{i}^{u}}}\!-1\right)t_{i}^{u} \\ &- \eta_{i}N_{0}\left(2^{\frac{\beta_{i}\lambda_{i}s_{i}}{b_{i}t_{i}^{d}}}-1\right) \left(\alpha T+t_{i}^{d}\right)-E_{i}^{o}, \end{array} $$
(30)

Then, the Lagrange multipliers can be obtained by utilizing the gradient method. That is,

$$\begin{array}{*{20}l} \mu_{1}(t+1) =& \left[\mu_{1}(t)+\tau_{1}\frac{\partial \mathcal{L}}{\partial \mu_{1}}\right]^{+}, \end{array} $$
(31)
$$\begin{array}{*{20}l} \mu_{2}(t+1) =& \left[\mu_{2}(t)+\tau_{2}\frac{\partial \mathcal{L}}{\partial \mu_{2}}\right]^{+}, \end{array} $$
(32)
$$\begin{array}{*{20}l} \nu_{i}(t+1) =& \left[\nu_{i}(t)+\tau_{3}\frac{\partial \mathcal{L}}{\partial \nu_{i}}\right]^{+}, \end{array} $$
(33)
$$\begin{array}{*{20}l} \gamma_{i}(t+1) =& \left[\gamma_{i}(t)+\tau_{4}\frac{\partial \mathcal{L}}{\partial \gamma_{i}}\right]^{+}, \end{array} $$
(34)

where τ1, τ2, τ3, and τ4 are the iteration steps, t is the iteration number, and [·]+ means max(0,·).

Taking the derivative of \(\mathcal {L}_{1}\) w.r.t \(t_{i}^{u }\), \(t_{i}^{d }\) to be zero respectively, we have

$$\begin{array}{*{20}l} \frac{\partial \mathcal{L}_{1}}{\partial t_{i}^{u }} =& (1+\gamma_{i})\frac{N_{0}}{h_{i}}\left(2^{\frac{\lambda_{i}s_{i}}{b_{i}t_{i}^{u}}}-1\right) \\ &-(1+\gamma_{i})\frac{N_{0}}{h_{i}}2^{\frac{\lambda_{i}s_{i}}{b_{i}t_{i}^{u}}}\frac{\lambda_{i}s_{i}}{b_{i}t_{i}^{u}}\ln2\\ &+\left(\mu_{1}+2\kappa^{\text{mec}}\theta_{i}\lambda_{i}c_{i}-P_{\text{staic}}\frac{\lambda_{i}c_{i}}{\theta_{i}^{2}}\right) \\ &\frac{\lambda_{i}c_{i}}{\left(\min\left(t_{i}^{\max}-t_{i}^{u}-t_{i}^{d},(1-\alpha)T-t_{i}^{u}-t_{i}^{d}\right)\right)^{2}} \\ &-\nu_{i}\frac{N_{0}}{h_{i}}2^{\frac{\lambda_{i}s_{i}}{b_{i}t_{i}^{u}}}\frac{\lambda_{i}s_{i}}{b_{i}\left(t_{i}^{u}\right)^{2}}\ln2 \\ &=0, \end{array} $$
(35)
$$\begin{array}{*{20}l} \frac{\partial \mathcal{L}_{1}}{\partial t_{i}^{d }} =& (1-\gamma_{i}\eta_{i}g_{i})\frac{N_{0}}{g_{i}}\left(2^{\frac{\beta_{i}\lambda_{i}s_{i}}{b_{i}t_{i}^{d}}}-1\right) \\ &-(1-\gamma_{i}\eta_{i}g_{i})\frac{N_{0}}{g_{i}}2^{\frac{\beta_{i}\lambda_{i}s_{i}}{b_{i}t_{i}^{d}}}\frac{\beta_{i}\lambda_{i}s_{i}}{b_{i}t_{i}^{d}}\ln2\\ &+\left(\mu_{1}+2\kappa^{\text{mec}}\theta_{i}\lambda_{i}c_{i}-P_{\text{staic}}\frac{\lambda_{i}c_{i}}{\theta_{i}^{2}}\right) \\ &\frac{\lambda_{i}c_{i}}{\left(\min\left(t_{i}^{\max}-t_{i}^{u}-t_{i}^{d},(1-\alpha)T-t_{i}^{u}-t_{i}^{d}\right)\right)^{2}} \\ &-(\mu_{2}-\gamma_{i}\eta_{i}g_{i}\alpha T)\frac{N_{0}}{g_{i}} 2^{\frac{\beta_{i}\lambda_{i}s_{i}}{b_{i}t_{i}^{d}}}\frac{\beta_{i}\lambda_{i}s_{i}}{b_{i}\left(t_{i}^{d}\right)^{2}}\ln2 \\ & =0. \end{array} $$
(36)

Thus, \(t_{i}^{u }\) and \(t_{i}^{d }\) can be obtained by (35)) and (36), respectively.

Joint task offloading ratio and tS factor optimization subproblem: jTORTSF-OP

By fixing tu and td, the JTORTSF-OP is given by

$$\begin{array}{*{20}l} (\mathbf{P4})&~\min_{\alpha, \boldsymbol{\lambda}}~~\varphi(\alpha, \lambda_{i}) \end{array} $$
(37a)
$$\begin{array}{*{20}l} \text{s.t.}&~~\frac{(1-\lambda_{i})c_{i}}{\min\left(t_{i}^{\max},(1-\alpha)T\right)}\leq F_{i}^{\max} ~~\forall i\in \mathcal{I}, \end{array} $$
(37b)
$$\begin{array}{*{20}l} &~~\sum_{i=1}^{I}\theta_{i}(\alpha, \lambda_{i})\leq F_{\text{mec}}^{\max}, \end{array} $$
(37c)
$$\begin{array}{*{20}l} &~~\sum_{i=1}^{I}\frac{N_{0}}{g_{i}}\left(2^{\frac{\beta_{i}\lambda_{i}s_{i}}{b_{i}t_{i}^{d}}}-1\right)\leq P_{e}^{\max}, \end{array} $$
(37d)
$$\begin{array}{*{20}l} &~~\frac{N_{0}}{h_{i}}\left(2^{\frac{\lambda_{i}s_{i}}{b_{i}t_{i}^{u}}}-1\right)\leq P_{i}^{\max},~~\forall i\in \mathcal{I}, \end{array} $$
(37e)
$$\begin{array}{*{20}l} &~~\kappa_{i}^{\text{loc}}\frac{(1-\lambda_{i})^{3}c_{i}^{3}}{\left(\min\left(t_{i}^{\max},(1-\alpha)T\right)\right)^{2}}+\frac{N_{0}}{h_{i}}\left(2^{\frac{\lambda_{i}s_{i}}{b_{i}t_{i}^{u}}}-1\right)t_{i}^{u}\\ &~~\leq \eta_{i}N_{0}\left(2^{\frac{\beta_{i}\lambda_{i}s_{i}}{b_{i}t_{i}^{d}}}-1\right)\left(\alpha T+t_{i}^{d}\right)+E_{i}^{o},~~\forall i\in \mathcal{I}, \end{array} $$
(37f)
$$\begin{array}{*{20}l} &~~0<\alpha<1, \end{array} $$
(37g)
$$\begin{array}{*{20}l} &~~0\leq\lambda_{i}\leq 1, \forall i \in \mathcal{I}. \end{array} $$
(37h)

However, since the optimal variables are coupled, problem (P4) is a non-convex problem. In order to solve this problem, we first fix α to calculate λ. And then, we fix λ to calculate α, and repeat this process until convergence.

Optimization of task offloading ratio

When the TS factor α is fixed, the task offloading ratio problem is formulated as

$$\begin{array}{*{20}l} (\mathbf{P5})&~\min_{\boldsymbol{\lambda}}~~\varphi(\lambda_{i}) \end{array} $$
(38a)
$$\begin{array}{*{20}l} \text{s.t.}&~~\frac{(1-\lambda_{i})c_{i}}{\min(t_{i}^{\max},(1-\alpha)T)}\leq F_{i}^{\max}, ~~\forall i\in \mathcal{I}, \end{array} $$
(38b)
$$\begin{array}{*{20}l} &~~\sum_{i=1}^{I}\theta_{i}(\lambda_{i})\leq F_{mec}^{\max}, \end{array} $$
(38c)
$$\begin{array}{*{20}l} &~~\sum_{i=1}^{I}\frac{N_{0}}{g_{i}}\left(2^{\frac{\beta_{i}\lambda_{i}s_{i}}{b_{i}t_{i}^{d}}}-1\right)\leq P_{e}^{\max}, \end{array} $$
(38d)
$$\begin{array}{*{20}l} &~~\frac{N_{0}}{h_{i}}\left(2^{\frac{\lambda_{i}s_{i}}{b_{i}t_{i}^{u}}}-1\right)\leq P_{i}^{\max},~~\forall i\in \mathcal{I}, \end{array} $$
(38e)
$$\begin{array}{*{20}l} &~~\kappa_{i}^{\text{loc}}\frac{(1-\lambda_{i})^{3}c_{i}^{3}}{(\min(t_{i}^{\max},(1-\alpha)T))^{2}}+\frac{N_{0}}{h_{i}}\left(2^{\frac{\lambda_{i}s_{i}}{b_{i}t_{i}^{u}}}\!-1\right)t_{i}^{u}\\ &~~\leq \eta_{i}N_{0}\left(2^{\frac{\beta_{i}\lambda_{i}s_{i}}{b_{i}t_{i}^{d}}}-1\right)(\alpha T+t_{i}^{d})+E_{i}^{o},~~\forall i\in \mathcal{I}, \end{array} $$
(38f)
$$\begin{array}{*{20}l} &~~0\leq\lambda_{i}\leq 1, \forall i \in \mathcal{I}. \end{array} $$
(38g)

Problem (P5) is a convex problem, the Lagrangian dual method is used to solve it. Then, the Lagrangian function of problem (P5) is given by

$$\begin{array}{*{20}l} \mathcal{L}_{2} =&\mathcal{L}(\boldsymbol{\lambda}, \varepsilon_{i}, \mu_{1}, \mu_{2}, \nu_{i}, \gamma_{i}, \xi_{i}) \\ =&\varphi(\lambda_{i})+\varepsilon_{i}\left(\frac{(1-\lambda_{i})c_{i}}{\min(t_{i}^{\max},(1-\alpha)T)}- F_{i}^{\max}\right) \\ &+\mu_{1}\left(\sum_{i=1}^{I}\theta_{i}(\lambda_{i})-F_{\text{mec}}^{\max}\right) \\ &+\mu_{2}\left(\sum_{i=1}^{I}\frac{N_{0}}{g_{i}}(2^{\frac{\beta_{i}\lambda_{i}s_{i}}{b_{i}t_{i}^{d}}}-1)- P_{e}^{\max}\right) \\ &+\nu_{i}\left(\frac{N_{0}}{h_{i}}(2^{\frac{\lambda_{i}s_{i}}{b_{i}t_{i}^{u}}}-1)-P_{i}^{\max}\right) \\ &+\gamma_{i}(\kappa_{i}^{\text{loc}}\frac{(1-\lambda_{i})^{3}c_{i}^{3}}{(\min(t_{i}^{\max},(1-\alpha)T))^{2}}\\&+\frac{N_{0}}{h_{i}}\left(2^{\frac{\lambda_{i}s_{i}}{b_{i}t_{i}^{u}}}-1\right)t_{i}^{u} \\ &-\eta_{i}N_{0}\left(2^{\frac{\beta_{i}\lambda_{i}s_{i}}{b_{i}t_{i}^{d}}}-1\right)(\alpha T+t_{i}^{d})-E_{i}^{o})\\&+\xi_{i}(\lambda_{i}-1), \end{array} $$
(39)

where εi, μ1, μ2, νi, γi, and ξi are the Lagrange multipliers. Since the Lagrange function is differentiable, the gradients of the Lagrange multipliers can be respectively given by

$$\begin{array}{*{20}l} \frac{\partial \mathcal{L}_{2}}{\partial \varepsilon_{i}} = & \frac{(1-\lambda_{i})c_{i}}{\min(t_{i}^{\max},(1-\alpha)T)}- F_{i}^{\max}, \end{array} $$
(40)
$$\begin{array}{*{20}l} \frac{\partial \mathcal{L}_{2}}{\partial \mu_{1}} =& \sum_{i=1}^{I}\theta_{i}(\lambda_{i})-F_{\text{mec}}^{\max}, \end{array} $$
(41)
$$\begin{array}{*{20}l} \frac{\partial \mathcal{L}_{2}}{\partial \mu_{2}} =& \sum_{i=1}^{I}\frac{N_{0}}{g_{i}}\left(2^{\frac{\beta_{i}\lambda_{i}s_{i}}{b_{i}t_{i}^{d}}}-1\right)- P_{e}^{\max}, \end{array} $$
(42)
$$\begin{array}{*{20}l} \frac{\partial \mathcal{L}_{2}}{\partial \nu_{i}} =&\frac{N_{0}}{h_{i}}\left(2^{\frac{\lambda_{i}s_{i}}{b_{i}t_{i}^{u}}}-1\right)- P_{i}^{\max}, \end{array} $$
(43)
$$\begin{array}{*{20}l} \frac{\partial \mathcal{L}_{2}}{\partial \gamma_{i}}=&\kappa_{i}^{\text{loc}}\frac{(1-\lambda_{i})^{3}c_{i}^{3}}{(\min(t_{i}^{\max},(1-\alpha)T))^{2}} +\frac{N_{0}}{h_{i}}\left(2^{\frac{\lambda_{i}s_{i}}{b_{i}t_{i}^{u}}}-1\right)t_{i}^{u} \\ & -\eta_{i}N_{0}\left(2^{\frac{\beta_{i}\lambda_{i}s_{i}}{b_{i}t_{i}^{d}}}-1\right)(\alpha T+t_{i}^{d}) -E_{i}^{o}, \end{array} $$
(44)
$$\begin{array}{*{20}l} \frac{\partial \mathcal{L}_{2}}{\partial \xi_{i}} =& \lambda_{i}-1. \end{array} $$
(45)

The Lagrange multipliers can be obtained by utilizing the gradient method, i.e.,

$$\begin{array}{*{20}l} \varepsilon_{i}(t+1) =& \left[\varepsilon_{i}(t)+\rho_{1}\frac{\partial \mathcal{L}}{\partial \varepsilon_{i}}\right]^{+}, \end{array} $$
(46)
$$\begin{array}{*{20}l} \mu_{1}(t+1)=& \left[\mu_{1}(t)+\rho_{2}\frac{\partial \mathcal{L}}{\partial \mu_{1}}\right]^{+}, \end{array} $$
(47)
$$\begin{array}{*{20}l} \mu_{2}(t+1)=& \left[\mu_{2}(t)+\rho_{3}\frac{\partial \mathcal{L}}{\partial \mu_{2}}\right]^{+}, \end{array} $$
(48)
$$\begin{array}{*{20}l} \nu_{i}(t+1)=& \left[\nu_{i}(t)+\rho_{4}\frac{\partial \mathcal{L}}{\partial \nu_{i}}\right]^{+}, \end{array} $$
(49)
$$\begin{array}{*{20}l} \gamma_{i}(t+1)=& \left[\gamma_{i}(t)+\rho_{5}\frac{\partial \mathcal{L}}{\partial \gamma_{i}}\right]^{+}, \end{array} $$
(50)
$$\begin{array}{*{20}l} \xi_{i}(t+1)=& \left[\xi_{i}(t)+\rho_{6}\frac{\partial \mathcal{L}}{\partial \xi_{i}}\right]^{+}, \end{array} $$
(51)

where ρ1, ρ2, ρ3, ρ4, ρ5 and ρ6 are the iteration steps, and t is the iteration number.

Taking the derivative of \(\mathcal {L}_{2}\) w.r.t λi to be zero, we have

$$ \begin{aligned} \frac{\partial \mathcal{L}_{2}}{\partial \lambda_{i}}=& (1+\gamma_{i})\frac{-\kappa_{i}^{\text{loc}}3(1-\lambda_{i})^{2}c_{i}^{3}}{\left(\min\left(t_{i}^{\max},(1-\alpha)T\right)\right)^{2}} \\ &+\frac{N_{0}}{h_{i}}\frac{s_{i}}{b_{i}t_{i}^{u}}(t_{i}^{u}+\gamma_{i}t_{i}^{u}+\nu_{i})2^{\frac{\lambda_{i}s_{i}}{b_{i}t_{i}^{u}}}\ln2 \\ &-\varepsilon_{i}\frac{c_{i}}{\min(t_{i}^{\max},(1-\alpha)T)} \\ &+\kappa^{\text{mec}}\frac{3\lambda_{i}^{2}c_{i}^{3}}{\left(\min\left(t_{i}^{\max}-t_{i}^{u}-t_{i}^{d},(1-\alpha)T-t_{i}^{u}-t_{i}^{d}\right)\right)^{2}} \\ &+\mu_{1}\frac{c_{i}}{\min(t_{i}^{\max}-t_{i}^{u}-t_{i}^{d},(1-\alpha)T-t_{i}^{u}-t_{i}^{d})} \\ &+N_{0}\frac{\beta_{i}s_{i}}{b_{i}t_{i}^{d}}2^{\frac{\beta_{i}\lambda_{i}s_{i}}{b_{i}t_{i}^{d}}}\left(\frac{t_{i}^{d}+\mu_{2}}{g_{i}}-\gamma_{i}\eta_{i}(\alpha T+t_{i}^{d})\right)\ln2\\ &+\xi_{i}=0. \end{aligned} $$
(52)

Therefore, λi can be achieved by (52).

Optimization of tS factor

The TS factor is not only related to EH of SMDs, but related to the task execution time. In (14), it is observed that the larger α is, SMDs can harvest more energy. Meanwhile, less time is available for task execution. By fixing λ, we set the initial α as

$$\begin{array}{*{20}l} \alpha=1-\frac{\min_{i\in \mathcal{I}}\{t_{i}^{\max}\}}{T}. \end{array} $$
(53)

By substituting (53) into problem (P1), after several iterations, such as M iterations, some task offloading delay requirements cannot be satisfied due to the time reserved is not enough, α can be updated by

$$\begin{array}{*{20}l} \alpha=\alpha-\Delta, \end{array} $$
(54)

where Δ>0. Therefore, we can use the offline experiments to determine the iteration numbers to guarantee each task offloading delay.

JTORAEH algorithm

To solve the primal problem, a JTORAEH algorithm is proposed, as shown in Algorithm 1.

Simulation results

In this section, some simulation results are provided to discuss for the system performance with the proposed JTORAEH algorithm. Unless otherwise stated, the number of eNodeB and SMDs is set to be 1 and 10, respectively. SMDs are uniformly distributed over a cell. The bandwidth allocated to each SMD is 200 KHz. The noise power is 10−10 W. The wireless channel hi and gi are respectively obtained by \(h_{i}=\zeta d_{i}^{-3}\bar {h}_{i}\) and \(g_{i}=\zeta d_{i}^{-3}\bar {g}_{i}\), where \(\bar {h}_{i} \sim \mathcal {CN} (\boldsymbol {0,I})\), \(\bar {g}_{i} \sim \mathcal {CN} (\boldsymbol {0,I})\), di is the distance between the eNodeB and the SMD i, and ζ=6.25×10−4 is the channel power gain at a reference distance of one meter [27]. The maximal transmission power of each SMD is 0.1 W, and the maximal downlink transmission power of eNodeB is 1 W. The maximal CPU-cycle frequency of the SMDs and MEC server are set to be 50 MHz and 1 GHz, respectively. The conversion coefficients of SMD and MEC server are 10−27 and 10−28, respectively [22]. The initial energy of SMD E0=0.001 J. The time period of a complete EH and task offloading process T=3 s. The energy conversion efficiency η=0.8107 [25]. The data size of the tasks and the number of CPU-cycle requirements that follow Gaussian distributions are \(s_{i}\sim \mathcal {N}(1,0.1)\) and \(c_{i}\sim \mathcal {N}(100,10)\), respectively. The data size is measured in MB and the number of CPU-cycle is measured in Megacycles, respectively. The output data size is 10% of the input data size. Each task offloading delay tolerance is 2.2 s.

Convergence analysis of the proposed jTORAEH algorithm

Figure 3 shows the convergence of the proposed JTORAEH algorithm with different M. M can be considered as updating the value of TS factor α every M iterations according to (54). We set \(\Delta =\frac {\min _{i\in \mathcal {I}}\{t_{i}^{\max }\}}{2T}\), M=2,4, respectively. It is seen that the proposed JTORAEH algorithm can achieve convergence within about 16 iterations. Besides, the proposed JTORAEH algorithm nearly has the same convergence speed no matter what M takes. Therefore, we take M=4 in the following simulation.

Fig. 3
figure 3

Total energy consumption versus iterations

In order to verify the effectiveness of the proposed JTORAEH algorithm, the following three algorithms are also simulated in our work for comparison.

  • Local computing (LC) algorithm: In this algorithm, all the tasks are only executed by SMDs locally, where λi=0, \(\forall i\in \mathcal {I}\).

  • MEC server computing (MC) algorithm: In this algorithm, all the tasks are offloaded to the MEC server, and only executed by the MEC server, where λi=1, \(\forall i\in \mathcal {I}\).

  • Based on Hungarian and graph coloring (BHGC) algorithm: In this algorithm, the task offloading ratio, uplink power and computation resource allocation can be obtained by utilizing the same algorithm in [28]. To obtain the TS factor α, the same algorithm is used as this work. For the downlink power allocation, the power is allocated averagely for each task.

Effect of the bandwidth on the energy consumption

Figure 4 plots the total energy consumption versus bandwidth. It can be seen that for the LC algorithm, the total energy consumption remains unchanged with the increment of the bandwidth. Because all the tasks are executed by the SMDs locally, the total energy consumption is independent of bandwidth. For the other three algorithms, the total energy consumption decreases as the bandwidth increases. Because higher bandwidth leads to lower transmission power. Compared with the BHGC algorithm, when the bandwidth grows from 200 KHz to 600 KHz, the total energy consumption of JTORAEH algorithm can achieve the system performance gain about 14.43%.

Fig. 4
figure 4

Total energy consumption versus bandwidth

Effect of the cPU-cycle frequency of mEC server on the energy consumption

Figure 5 compares the total energy consumption versus CPU-cycle frequency of MEC server. For the LC algorithm, because the total energy consumption is independent of CPU-cycle frequency of MEC server, the total energy consumption remains unchanged with the increase of the CPU-cycle frequency of MEC server. For the other three algorithms, with the increasing of CPU-cycle frequency of MEC server, each task can be allocated more computation resources, and the task computation time can be reduced. Meanwhile, SMDs have more time to transmit tasks to the MEC server, therefore, the uplink transmission energy consumption is reduced. Compared with the BHGC algorithm, when the CPU-cycle frequency of MEC server grows from 1 GHz to 3.5 GHz, the total energy consumption of JTORAEH algorithm can achieve the system performance gain about 15.73%.

Fig. 5
figure 5

Total energy consumption versus CPU-cycle frequency of MEC server

Effect of the sMDs number on the energy consumption

Figure 6 shows the total energy consumption versus SMDs number. It can be observed that the total energy consumption increases with respect to the number of SMDs. Because the resources are limited, when the number of SMDs increases, each SMD will allocate fewer resources, the total energy consumption increases. Meanwhile, the more number of SMDs increases, the faster the total energy consumption of the MC algorithm, BHGC algorithm and JTORAEH algorithm increases. For the LC algorithm, since the energy consumption is only related to the CPU-cycle frequency of SMDs locally, the energy consumption of LC algorithm increases linearly with the number of SMDs increases.

Fig. 6
figure 6

Total energy consumption versus SMDs number

Effect of the input computation file size of task on the energy consumption

Figure 7 plots the total energy consumption versus input computation file size of task. For the LC algorithm, because the tasks are only executed by SMDs locally, and the total energy consumption is independent of the input computation file size of task, the total energy consumption remains unchanged with the increase of the input computation file size of task. For the other three algorithms, with the increment of input computation file size of task, the SMDs need to consume more energy to transmit tasks. Therefore, the total energy consumption increases.

Fig. 7
figure 7

Total energy consumption versus input computation file size of task

Conclusions

This paper studied the total energy consumption minimization problem for EH-enabled MEC networks by jointly optimizing the task offloading ratio and resource allocation. For such a problem, the task uplink transmission time, MEC computation time and the computation results downloading time were considered at the same time. Since the problem was non-convex, we first reformulated it, and then decomposed it into two subproblems, i.e., JUDTT-OP and JTORTSF-OP. By solving them, JTORAEH algorithm was proposed to solve the considered problem. Simulation results show that compared with other benchmark methods, the proposed JTORAEH algorithm can achieve a better performance in terms of the total energy consumption.

Considering the limited energy of batteries can not provide SMDs with long-term and stable power supply, and rechargeable batteries or power supply through the traditional grid (for example, when SMDs are distributed in remote or dangerous environment) may even be impossible or extremely expensive. We can utilize EH technology to achieve the green communication and durable operation of the SMDs. This article provides us with a solution to reduce energy consumption through EH and resource allocation strategy in the future 6G MEC network.

Availability of data and materials

The data used to support the findings of this study are available from the corresponding author upon request.

Abbreviations

MEC:

Mobile edge computing

SMDs:

Smart mobile devices

6G:

Sixth-generation

EH:

Energy harvesting

TS:

Time switching

JUDTT-OP:

Joint uplink and downlink transmission time optimization subproblem

JTORTSF-OP:

Joint task offloading ratio and TS factor optimization subproblem

SWIPT:

Simultaneous wireless information and power transfer

JTORAEH:

Joint task offloading and resource allocation with energy harvesting

References

  1. Li S, Zhang N, Lin S, Kong L, Katangur A, Khan MK, Ni M, Zhu G (2018) Joint admission control and resource allocation in edge computing for Internet of things. IEEE Netw 32(1):72–79.

    Article  Google Scholar 

  2. Li S, Lin S, Cai L, Li W, Zhu G (2020) Joint resource allocation and computation offloading with time-varying fading channel in vehicular edge computing. IEEE Trans Veh Technol 69(3):3384–3398.

    Article  Google Scholar 

  3. Li S, Zhang N, Chen H, Lin S, Dobre OA, Wang H (2021) Joint road side units selection and resource allocation in vehicular edge computing. IEEE Trans Veh Technol 70(12):13190–13204.

    Article  Google Scholar 

  4. Li S, Wang Q, Wang Y, Xie J, Tan D, Kou W, Li W (2021) Joint congestion control and resource allocation for delay-aware tasks in mobile edge computing. Wirel Commun Mob Comput 2021(1):1–16.

    Article  Google Scholar 

  5. Jiang R, Xiong K, Fan P, Zhou L, Zhong Z (2020) Outage probability and throughput of multirelay SWIPT-WPCN networks with nonlinear EH model and imperfect CSI. IEEE Syst J 14(1):1206–1217.

    Article  Google Scholar 

  6. Chen Y, Zhang N, Zhang Y, Chen X, Wu W, Shen XS (2021) TOFFEE: Task offloading and frequency scaling for energy efficiency of mobile devices in mobile edge computing. IEEE Trans Cloud Comput 9(4):1634–1644.

    Article  Google Scholar 

  7. Wang F, Zhang X (2018) Dynamic computation offloading and resource allocation over mobile edge computing networks with energy harvesting capability In: 2018 IEEE International Conference on Communications (ICC), 1–6. https://doi.org/10.1109/ICC.2018.8422096.

  8. Jiang R, Xiong K, Fan P, Zhang Y, Zhong Z (2019) Power minimization in SWIPT networks with coexisting power-splitting and time-switching users under nonlinear EH model. IEEE Internet Things J 6(5):8853–8869.

    Article  Google Scholar 

  9. Zhang G, Chen Y, Shen Z, Wang L (2019) Distributed energy management for multiuser mobile-edge computing systems with energy harvesting devices and QoS constraints. IEEE Internet Things J 6(3):4035–4048.

    Article  Google Scholar 

  10. Wang F, Xu J, Cui S (2020) Optimal energy allocation and task offloading policy for wireless powered mobile edge computing systems. IEEE Trans Wirel Commun 19(4):2443–2459.

    Article  Google Scholar 

  11. Teng Y, Cheng K, Zhang Y, Wang X (2019) Mixed-timescale joint computational offloading and wireless resource allocation strategy in energy harvesting multi-MEC server systems. IEEE Access 7:74640–74652.

    Article  Google Scholar 

  12. Hu X, Wong K, Yang K (2018) Wireless powered cooperation-assisted mobile edge computing. IEEE Trans Wirel Commun 17(4):2375–2388.

    Article  Google Scholar 

  13. Wang F, Xu J, Wang X, Cui S (2018) Joint offloading and computing optimization in wireless powered mobile-edge computing systems. IEEE Trans Wirel Commun 17(3):1784–1797.

    Article  Google Scholar 

  14. Ji L, Guo S (2019) Energy-efficient cooperative resource allocation in wireless powered mobile edge computing. IEEE Internet Things J 6(3):4744–4754.

    MathSciNet  Article  Google Scholar 

  15. Mahmood A, Ahmed A, Naeem M, Hong Y (2020) Partial offloading in energy harvested mobile edge computing: A direct search approach. IEEE Access 8:36757–36763.

    Article  Google Scholar 

  16. Liu B, Wang J, Ma S, Zhou F, Ma Y, Lu G (2019) Energy-efficient cooperation in mobile edge computing-enabled cognitive radio networks. IEEE Access 7:45382–45394.

    Article  Google Scholar 

  17. Zhao Y, Leung VCM, Gao H, Chen Z, Ji H (2018) Uplink resource allocation in mobile edge computing-based heterogeneous networks with multi-band RF energy harvesting In: 2018 IEEE International Conference on Communications (ICC), 1–6.. IEEE. https://doi.org/10.1109/ICC.2018.8422201.

  18. Wang F, Xing H, Xu J (2019) Optimal resource allocation for wireless powered mobile edge computing with dynamic task arrivals In: 2019 IEEE International Conference on Communications (ICC), 1–7.. IEEE. https://doi.org/10.1109/ICC.2019.8761143.

  19. Guo J, Song Z, Cui Y, Liu Z, Ji Y (2017) Energy-efficient resource allocation for multi-user mobile edge computing In: GLOBECOM 2017 - 2017 IEEE Global Communications Conference, 1–7.

  20. Jiang R, Xiong K, Fan P, Zhong Z, Letaief KB (2020) Information-energy region for SWIPT networks in mobility scenarios. IEEE Trans Veh Technol 69(7):7264–7280.

    Article  Google Scholar 

  21. Zhao P, Tian H, Qin C, Nie G (2017) Energy-saving offloading by jointly allocating radio and computational resources for mobile edge computing. IEEE Access 5:11255–11268.

    Article  Google Scholar 

  22. Miettinen AP, Nurminen JK (2010) Energy efficiency of mobile clients in cloud computing In: 2010 USENIX Conference on Hot Topics in Cloud Computing (Hotcloud), 4–4.. USENIX Association. https://doi.org/10.5555/1863103.1863107.

  23. Choi JH, Bansal A, Meterelliyoz M, Murthy J, Roy K (2007) Self-consistent approach to leakage power and temperature estimation to predict thermal runaway in FinFET circuits. IEEE Trans Comput Aided Des Integr Circ Syst 26(11):2059–2068.

    Article  Google Scholar 

  24. Wei X, Goth G, Kelly P, Zoodsma R, VanDeventer A (2014) Air-water hybrid cooling for computer servers: A case study for optimum cooling energy allocation In: Fourteenth Intersociety Conference on Thermal and Thermomechanical Phenomena in Electronic Systems (ITherm), 568–573.. IEEE. https://doi.org/10.1109/ITHERM.2014.6892331.

  25. Jiang R, Xiong K, Fan P, Zhang Y, Zhong Z (2017) Optimal design of swipt systems with multiple heterogeneous users under non-linear energy harvesting model. IEEE Access 5:11479–11489.

    Article  Google Scholar 

  26. Boyd S, Vandenberghe L (2004) Convex Optimization. Cambridge University Press, Cambridge.

    Book  Google Scholar 

  27. Wang F, Xu J, Wang X, Cui S (2018) Joint offloading and computing optimization in wireless powered mobile-edge computing systems. IEEE Trans Wirel Commun 17(3):1784–1797.

    Article  Google Scholar 

  28. Zhang J, Xia W, Yan F, Shen L (2018) Joint computation offloading and resource allocation optimization in heterogeneous networks with mobile edge computing. IEEE Access 6:19324–19337.

    Article  Google Scholar 

Download references

Acknowledgements

The authors would like to thank all anonymous reviewers for their invaluable comments.

Funding

This work was partly supported by the National Natural Science Foundation of China (No.61861002, 62101507). Guangxi Key Laboratory of Wireless Wideband Communication and Signal Processing (No. GXKL06200121). Guangxi Science and Technology Plan Project (No.AD18281044).

Author information

Authors and Affiliations

Authors

Contributions

SL and RJ conceived the original idea and completed the theoretical analysis. ZZ and FZ completed the numerical simulations. NZ and GY improved the system model and algorithm of the article. All authors provided useful discussions and reviewed the manuscript. The authors read and approved the final manuscript.

Corresponding author

Correspondence to Ruihong Jiang.

Ethics declarations

Competing interests

The authors declare that they have no competing interests.

Additional information

Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Li, S., Zhang, N., Jiang, R. et al. Joint task offloading and resource allocation in mobile edge computing with energy harvesting. J Cloud Comp 11, 17 (2022). https://doi.org/10.1186/s13677-022-00290-w

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1186/s13677-022-00290-w

Keywords

  • Sixth-generation (6G) networks
  • Mobile edge computing (MEC)
  • Downloading time
  • Energy harvesting (EH)
  • Joint task offloading and resource allocation