**1. Introduction**

*1.1. Backgroud*

The 5G enabled Internet of Things (5G-IoT) [1–4] connects the real world with the internet world and human civilization is currently transforming from informatization to intelligence. The four abilities of 5G communication system, namely massive capacity, ultralow latency, high reliability and extensive connection, are the key driving forces for the development of IoT [5,6]. The integration of 5G and WSN-assisted IoT not only strengthens the connection between the real world and the internet world, but also widens the scope of IoT services such that IoT can not only serve the smart city [7] but also penetrate into agriculture [8], medical care [9], transportation [10], industry [11] and other fields [12]. However, WSN-assisted IoT is facing grand challenges and the huge amount data traffic brought by grea<sup>t</sup> number of IoT devices and sensors can impose an enormous burden on the network, resulting in higher service delays and reduced quality of service (QoS) [13].

Although the current terminal devices are equipped with high-performance hardware, it is still difficult to meet the needs of computing intensive tasks, especially in the case of ensuring low power consumption and low latency. Mobile Edge Computing (MEC) technology is considered as a crucial solution for 5G-IoT [14,15]. With the help of MEC, terminal devices can upload part of or all of the computing tasks to the edge computing

**Citation:** Chen, F.; Wang, A.; Zhang, Y.; Ni, Z.; Hua, J. Energy Efficient SWIPT Based Mobile Edge Computing Framework for WSN-Assisted IoT. *Sensors* **2021**, *21*, 4798. https://doi.org/10.3390/ s21144798

Academic Editor: Jing Tian

Received: 26 June 2021 Accepted: 12 July 2021 Published: 14 July 2021

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

platform for computing so as to reduce their own computing pressure and energy consumption, improve the computing efficiency and performance and bring better QoS [16–18]. The authors of [19] studied how the MEC enabled industrial verticals in 5G. Yang et al. [20] analyzed the main features of MEC in the context of 5G and IoT and presented several fundamental key technologies that enable MEC to be applied in 5G and IoT.

Despite the fact that MEC brings grea<sup>t</sup> benefits for IoT, it still faces an important problem: how can we effectively and conveniently extend the lifetime of IoT devices in the network? Simultaneous wireless information and power transfer (SWIPT) is considered as the key technology to solve this problem. The principle of SWIPT system is that RF signals can carry energy and information at the same time. It was first proposed by the author of [21] in 2008. Rui Zhang et.al. [22] proposed two practical SWIPT receivers, which are the time switching (TS) receiver and power splitting (PS) receiver. The TS receiver divides the time slot into two parts, the RF signal received in the first part of time is used for information demodulation and then the signal collected in the remaining time is used for energy harvesting. The PS receiver divides the received RF signal into two parts and then transmits them to the energy collector and information demodulator, respectively, so that the information demodulation and energy harvesting can be realized simultaneously. Since then, a lot of researches focus on the design and performance of the SWIPT systems [23,24]. The author of [25] proposes a more complex dynamic energy splitting receiver based on the above two receivers framework. The author of [26] studied the trade off between the harvested energy and forward data in SWIPT sensor networks. Tang et al. [27] proposed a TS receiver design to maximize the energy efficiency in MIMO channels for IoT.

#### *1.2. Related Works*

As both SWIPT and MEC technologies benefit the IoT system, MEC deployed WSN IoT network design with SWIPT has attracted increasing attention. In such new framework, the communication and computation resource allocation as well as wireless energy harvesting scheme are crucial for maximizing the system performance. The authors of [8] studied an energy efficiency optimization scheme for OFDM transmission WSN in smart agriculture. By jointly optimizing the power allocation and the pairing of subcarriers, the optimization scheme can help to solve the problem of energy deficiency. An achievable rate maximization problem was discussed in [28] for multiuser satellite IoT system with SWIPT and MEC to overcome the limitation in battery capacity and computing capability of IoT terminals. In [29], a UAV-enabled wireless powered MEC system was investigated, where the offloading modes were optimized to reach the maximum computation rate under the power constraint and the UAV speed constraint. The authors of [30] extended multi-access edge computing to support the long range (LoRa) system for IoT applications. The novel framework allowed dynamic IoT deployment at the edge and life cycle management.

With the development of artificial intelligence technology, reinforcement learning (RL) methods are used to solve various communication problems in 5G and IoT systems. Aiming at minimizing the difference between the distributed and demanded throughput for each user, ref. [31] presented a novel deep reinforcement learning (DRL) scheme, which satisfied the user requirements by power regulation. In [32], a RL based offloading scheme was studied to select the edge device and the offloading rate for IoT devices. The distinguished merit of this scheme is that the offloading policy can be optimized without knowledge required in traditional schemes. A hybrid-decision-based DRL approach is proposed in [33] to provide coordinated decisions of dynamic offloading scheme for multi-device multi-server MEC-IoT systems with energy harvesting devices.

## *1.3. Contributions*

In this paper, we investigate energy consumption minimization for SWIPT based mobile edge computing in WSN assisted IoT System by using the optimization process. It is a continuation of our previous work [34] that focused on the cellular system. However, this study focus on the WSN assisted IoT network. Different from existing works, an in-depth research is carried to analyze the effects of computation task size, mobile node (including wireless sensor node) number, antenna number and energy harvest weight factor on the system energy consumption. The novelties of this work are summarized as follows.

(1) We design a novel WSN assisted IoT System, which integrates a MEC-deployed and FD-deployed anchor node (AN) and multiple SWIPT-equipped mobile nodes (MNs). The research problem of modeling is completely different from our previous work since the transmission conditions and requirements between cellular communication system and wireless sensor network are different. We aim to achieve the minimum energy consumption by optimizing CPU frequency, power allocation, offloading weight factor and SWIPT weight factor. Moreover, given the analysis of uplink, we provide the closed form expression of downlink rate and obtain the downlink transmission delay. Moreover, we optimize the SWIPT weight factor, which will affect the energy consumption of downlink harvesting and then affect the total system energy consumption. A more reasonable expression of harvesting energy is provided, which is based on the SWIPT weight factor and downlink time delay. In other words, the uplink and downlink parameters are jointly optimized.

(2) We formulate a more practical WSN energy minimization problem by jointly optimizing the key decision variables in the system. Since the multiple variables to be optimized are coupled and the original problem is non-convex, the optimization is quite challenging. An efficient algorithm called alternate group iteration optimization (AGIO) is proposed. We decompose the decision variables into three groups and divide the original problem into three subproblems. Then, we alternately optimize each subproblem using the interior point iteration method until the convergence.

The rest of the paper is organized as follows. Section 2 describes the system model and analyzes the transmission process. Section 3 formulates the energy minimization problem. Sections 4 and 5 present the algorithms to solve the problem and provides simulation results. Section 6 concludes the paper.

#### **2. System Model**

Let us consider a SWIPT-MEC enabled WSN assisted IoT system as demonstrated in Figure 1. There are *N* mobile nodes (MNs) including wireless sensor nodes denoted as {*<sup>D</sup>*1, *D*2, ... , *D N*} that are overwhelmed with computation tasks and one *M*-antenna Full Duplex enabled anchor node (AN). Each MN deploys single antenna and a power splitting (PS) SWIPT equipment to harvest energy. The PS receiver is capable of switching between energy harvesting (EH) state and information decoding (ID) state. The anchor node is equipped with a MEC server that can help MNs with the enormous amount of computation tasks.

Assume that each MN can divide its computation task into two parts and one is for local computing and the other is for offloading to the MEC enabled AN. The total computation task size of *Di* is represented as *Li* bits and the offloading computation task size is *Lu i* bits, which satisfies *Lu i* = *<sup>α</sup>iLi*, where 0 ≤ *αi* ≤ 1 is a offloading weight factor. Since MN can decide how much computation task will be offloaded to AN, *αi* is a variable to be optimized to achieve better performance.

The operation processes of the system can be illustrated in the following steps.

(1) During the uplink process, MN *Di* (*i* ∈ {1, ... , *N*} ) offloads the computation task *Lu i*to the MEC server at AN.

(2) When the MEC server receives the offloading task, it immediately implements the computation task. Due to the strong computation ability, MEC server can finish the offloading computation task in a short time, which can be ignored compared to the other operation times.

(3) Since AN deploys FD technology when MN *Di* is offloading, AN can simultaneously download the computation result *L<sup>d</sup> j* from the MEC server to MN *Dj* (*j* ∈ {1, ... , *<sup>N</sup>*}, *j* = *i* ), which shares the same frequency as the uplink MN *Di*. The computation result satisfies *L<sup>d</sup> j* = *βjLu i* , where 0 ≤ *βj* ≤ 1 is a weight factor.

(4) After *Dj* receives the computation result, the PS receiver will perform energy harvesting and information decoding according to the received RF signal.

(5) Mobile node *Di* will perform local computing on the remaining computaion task when it finishes the offloading.

The above processes can be divided into three phases: the offloading phase, downloading phase and local computing phase. They are described in detail in the following analysis.

**Figure 1.** SWIPT-MEC enabled WSN assisted IoT System Model.

#### *2.1. Offloading Phase*

In the offloading phase, MNs {*<sup>D</sup>*1, *D*2, ... , *DN*} that are overwhelmed by the computation tasks will offload part of the tasks to AN. Without loss of generality, AN receives the offloading computation task *Lui* from MN *Di* during the time interval *tui* . Meanwhile, AN simultaneously downloads computation result *Ldj* to *Dj*, where *i* ∈ {1, ... , *<sup>N</sup>*}, *j* ∈ {1, . . . , *<sup>N</sup>*}, *i* = *j*. Thus, the received signal at AN is the following:

$$\mathbf{y}\_{i}^{u} = \sqrt{p\_{i}^{u}} \mathbf{H}\_{i}^{u} \mathbf{s}\_{i}^{u} + \sqrt{\eta\_{j}} \mathbf{H}\_{0} (\sqrt{p\_{j}^{d}} \mathbf{s}\_{j}^{d}) + \mathbf{n}\_{\mathbf{AN}}.\tag{1}$$

where *pui* and *sui* are the transmitted power and transmitted signal of *Di*, *pdj* and *sdj* are the transmitted power and the computation result signal transmitted from AN to MN *Dj*. The two transmitted signals are assumed with normalized power, i.e., |*sui* |2 = 1 and |*sdj* |2 = 1. **H***ui* ∈ C*M*×<sup>1</sup> is the uplink channel from *Di* to AN and **H**0 ∈ C*M*×*<sup>M</sup>* is the self-interference channel induced by FD transmission. *ηj* is the residual self-interference (RSI) coefficient. The received noise is **nAN** ∼ *CN*(0, *<sup>σ</sup>*2*AN***I***M*) .

According to the above expression, only the first part on the right side of Equation (1) contains the target offloading task *sui* , the seond part is the RSI due to FD transmission of AN and the third part is the additive white Gaussian noise (AWGN) at AN. Thus, the signal to interference plus noise ratio (SINR) can be represented as the following:

$$\gamma\_i^u = \frac{p\_i^u \text{tr}\{\mathbf{H}\_i^u \left(\mathbf{H}\_i^u\right)^H\}}{\eta p\_j^d \text{tr}\{\mathbf{H}\_0 \mathbf{H}\_0^H\} + \sigma\_{AN}^2},\tag{2}$$

where *tr*{.} represents the matrix trace. Then, we can obtain the transmission rate as the following:

$$R\_i^{\mu} = B \log\_2(1 + \gamma\_i^{\mu}),\tag{3}$$

where *B* denotes the bandwidth allocated. Let *Rumin* represent the minimum uplink transmission rate requirement. Therefore, we can obtain the first constraint condition in this system model shown as the following:

$$R\_i^u \supseteq R\_{min}^u. \tag{4}$$

 Meanwhile, we can calculate the transmission time for offloading as follows.

$$t\_i^u = \frac{L\_i^u}{R\_i^u}.\tag{5}$$

Thus, the energy consumed by *Di* at the offloading phase can be expressed as the following:

$$E\_i^{off} = p\_i^u \frac{L\_i^u}{R\_i^u} \tag{6}$$

and the resulting transmission energy consumed by all MNs is provided by the following.

$$E^{off} = \sum\_{i=1}^{N} E\_i^{off}.\tag{7}$$

#### *2.2. Downloading Phase*

Since AN is equipped with FD technology, it can download the computation result to MN *Dj* and receive offloading task from other MN *Di* simultaneously. Thus, the received signal at *Dj* is described as the following:

$$y\_j^d = \sqrt{p\_j^d} \mathbf{H}\_j^d s\_j^d + n\_j^d,\tag{8}$$

where *pdj* is the transmitted power AN uses for downloading the computation result to *Dj*. *ndj*is the AWGN with power *σ*2*j*.

Here, we suppose that the co-channel interference can be canceled perfectly in the receiver for the sake of simplicity.

Then, the signal to interference plus noise ratio (SINR) and the transmission rate at MN *Dj* are the following.

$$\gamma\_j^d = \frac{p\_j^d \text{tr}\{\mathbf{H}\_j^d (\mathbf{H}\_j^d)^H\}}{\sigma\_j^2},\tag{9}$$

$$R\_j^d = B \log\_2(1 + \gamma\_j^d). \tag{10}$$

Let *Rdmin* represent the minimum downlink transmission rate requirement and we can obtain another constraint condition described as follows.

$$R\_j^d \ge R\_{\min}^d. \tag{11}$$

Meanwhile, we can calculate the latency of the downlink transmission as follows.

$$t\_j^d = \frac{L\_j^d}{R\_j^d}.\tag{12}$$

The PS receiver at *Dj* then divides the received RF signal into two parts; the *θj* (0 ≤ *θ* ≤ 1) part is used for energy harvesting, while the rest (1 − *θj*) part is used for information decoding. We can obtain the harvest energy of *Dj* as follows.

$$E\_{\dagger}^{\text{bare}} = \theta\_{\dagger} (p\_{\dagger}^{d} tr \left\{ \mathbf{H}\_{\dagger}^{d} (\mathbf{H}\_{\dagger}^{d})^{H} \right\} + \sigma\_{\dagger}^{2}) t\_{\dagger}^{d}. \tag{13}$$

Meanwhile, the energy consumption of AN can be calculated as the following.

$$E^{AN} = \sum\_{j=1}^{N} p\_j^d t\_j^d. \tag{14}$$

#### *2.3. Local Computation Phase*

After offloading, MN operates on the remaining computation task. Let *f n i* denote the CPU frequency needed for the *n*-th CPU cycle of *Di*. The following constraint condition should be met:

$$0 \le f\_i^n \le f\_i^{\max}, \forall i \tag{15}$$

where *f max i* is the maximum CPU frequency of *Di*. Then, the time for local computation of *Di* is the following:

$$t\_i^{local} = \sum\_{n=1}^{C(L\_i - L\_i^{\mu})} \frac{1}{f\_i^n} \tag{16}$$

where *C* is the CPU cycles required for computing 1-bit of data. The energy consumption of local computation is given by the following:

$$E\_i^{\text{loc}} = \sum\_{n=1}^{\mathcal{C}(L\_i - L\_i^{\text{u}})} \kappa (f\_i^n)^2,\tag{17}$$

where *κ* is the effective capacitance coefficient based on the chip architecture [35]. Thus, we can obtain the total local energy consumption as follows.

$$E^{\rm loc} = \sum\_{i=1}^{N} E\_i^{\rm loc}.\tag{18}$$

#### **3. Problem Formulation**

After we analyze the transmission process of the system, we can formulate an problem which can optimize the system performance. This paper aims at minimizing the total energy consumption of the system, while simultaneously ensuring the transmission requirements. The total energy consumption of the system contains AN energy consumption *<sup>E</sup>AN*, the offloading energy consumption *Eoff* and the energy consumption of local computation *Eloc*. In addition, we need to remove the harvest energy *Ehav* MNs can obtain. Based on Equations (7), (13), (14) and (18), we can write the total energy consumption of the system as the following.

$$\begin{split} E^{total} &= E^{AN} + E^{off} + E^{loc} - E^{ub} \\ &= \sum\_{j=1}^{N} p\_j^d \frac{L\_j^d}{R\_j^d} + \sum\_{i=1}^{N} p\_i^u \frac{L\_i^u}{R\_i^u} + \sum\_{i=1}^{N} \sum\_{n=1}^{C(L\_i - L\_r^y)} \kappa(f\_i^n)^2 \\ &- \sum\_{j=1}^{N} \theta\_j(p\_j^d tr \{\mathbf{H}\_j^d(\mathbf{H}\_j^d)^H\} + \sigma\_j^2) \frac{L\_j^d}{R\_j^d} \end{split} \tag{19}$$

Finally, the problem can be described as follows:

$$\begin{array}{c} (P1) \quad \min\_{\mathbf{f}, \mathbf{p}^u, \mathbf{p}^d, \mathbf{a}, \boldsymbol{\theta}}\\ \text{s.t.} \quad \begin{cases} \text{C1}: 0 \le \mathbf{a}, \boldsymbol{\theta} \le 1\\ \text{C2}: R\_i^u \ge R\_{\text{min}}^u, \forall i\\ \text{C3}: R\_j^d \ge R\_{\text{min}'}^d, \forall j\\ \text{C4}: p\_i^u \le P\_{\text{max}'}^u, \forall i\\ \text{C5}: p\_j^d \le P\_{\text{max}'}^d, \forall j\\ \text{C6}: 0 \le t\_i^{local} \le t\_i^u, \forall i\\ \text{C7}: 0 \le f\_i^u \le f\_i^{\text{max}}, \forall i \end{cases} \end{array} \tag{20}$$

where **f** = [ *f*1, *f*2, ... , *fN*], **p***<sup>u</sup>* = [*p<sup>u</sup>*1 , *pu*2 , ... , *<sup>p</sup>uN*], **p***d* = [*pd*1, *pd*2, ... , *<sup>p</sup>dN*], *α* = [*<sup>α</sup>*1, *α*2, ... , *<sup>α</sup>N*] and *θ* = [*<sup>θ</sup>*1, *θ*2,..., *<sup>θ</sup>N*].

In problem *P*1, *C*1 provides the constraints on weight factors. *C*2 and *C*3 imply that the offloading rate and downloading rate should not be less than the QoS requirements *Rumin* and *<sup>R</sup>dmin*, respectively. *C*4 and *C*5 indicate the uplink and downlink transmission power limits *Pumax* and *<sup>P</sup>dmax*. *C*6 denotes that the time of the local computation should be no more than the time of the offloading phase, otherwise it is better to offload all the tasks. *C*7 indicates the CPU frequency constraint according to Equation (15).

#### **4. The Proposed Algorithm**

In this section, we will solve the formulated problem in steps. The problem P1 is full of challenges since both the objective function and the constraints are non-convex. Although the variables that need to be optimized are all coupled in P1, we find that the CPU frequency **f** is the least relevant variable compared to other variables. We divide P1 into the following three subproblems. (i) Local computation optimization is as follows: In this subproblem, we obtain the optimal CPU frequency using the scheme in [36]. (ii) Power optimization is as follows: When **f** and the weight factors *α*, *θ* are fixed, we can use the interior point algorithm to solve the problem. (iii) Weight factor optimization is as follows: After frequency and power optimization are completed, interior point algorithm can be used again to obtain the optimal weight factors. The three subproblems should be optimized alternately by the iteration method.

#### *4.1. Local Computation Optimization*

Inspired by [36], the optimal CPU frequency should satisfy the following.

$$f\_i^1 = f\_i^2 = \dots = f\_i^{\mathbb{C}(L\_i - L\_i'')} = \overline{f\_i}.\tag{21}$$

The above equation reveals the CPU frequency should maintain the same in each cycle as *fi*. Suppose the other four variables have been optimized, the initial problem (P1) can be reformulated as follows:

$$\begin{array}{ll} \text{(P2)} & \min\_{\overline{I}} E + \sum\_{i=1}^{N} \mathbb{C} (L\_i - L\_i^{\mu}) \kappa (\overline{f\_i})^2 \\ & s.t. \begin{cases} \text{C6}: 0 \le \frac{\mathbb{C} (L\_i - L\_i^{\mu})}{\overline{f\_i}} \le t\_{i'}^{\mu}, \forall i \\\ \text{C7}: 0 \le \overline{f\_i} \le f\_i^{\max}, \forall i \end{cases} \end{array} \tag{22}$$

where *E* = *EAN* + *Eoff* − *<sup>E</sup>hav*, **f** = [ *f*1, *f*2, ... , *fN*]. According to the optimization objective function, the energy consumption increases monotonically with *fi*. In other words, *fi* has to be the smallest value to achieve the minimum energy consumption. Thus, from the constraint C6, we can obtain the following.

$$f\_i^{opt} = \frac{\mathbb{C}(L\_i - L\_i^u)}{t\_i^u}.\tag{23}$$

Then, by replacing *f n i* with *f opt i* in Equation (16), we can obtain the local energy consumption of user *Du i*as follows.

$$E\_i^{\rm loc} = \frac{\kappa \mathcal{C}^3 (L\_i - L\_i^{\mu})^3}{(t\_i^{\mu})^2}. \tag{24}$$

According to Equation (16), we find that the effect of CPU frequency on energy consumption can be transformed to the effect of offloading ratio and transmitting power. Therefore, we only need to focus on the optimization of these two parameters in the following steps.

#### *4.2. Power Optimization*

After the CPU frequency has been optimized and with the assumption that the two weight factors have been optimized, problem P1 now can be rewritten as the following.

$$\begin{aligned} \text{(P3)} \quad \min\_{\mathbf{p}^u, \mathbf{p}^d} \sum\_{j=1}^N p\_j^d \frac{L\_j^d}{R\_j^d} + \sum\_{i=1}^N p\_i^u \frac{L\_i^u}{R\_i^u} + \sum\_{i=1}^N \frac{\kappa C^3 (L\_i - L\_j^u)^3}{(t\_i^a)^2} \\ \qquad \qquad - \sum\_{j=1}^N \theta\_j (p\_j^d tr \{\mathbf{H}\_j^d (\mathbf{H}\_j^d)^H\} + \sigma\_j^2) \frac{L\_j^d}{R\_j^d} \\ \text{s.t. } \text{C2, C3, C4, C5.} \end{aligned} \tag{25}$$

For problem P3, the second-order derivative of each variable, i.e., *pu* 1 , *pu* 2 , ... , *pu N* and *pd* 1, *pd* 2, ... , *pd N* of the objective function is zero. Moreover, all constraints are linear. Thus, the standard interior point algorithm can be applied to this convex problem and the optimal solution can be achieved.

#### *4.3. Weight Factor Optimization*

With the optimized variables **f**, **p***<sup>u</sup>*, **<sup>p</sup>***d*, the problem can can be expressed as the following:

$$\begin{array}{ll}(P4) & \min\_{\mathfrak{a},\mathfrak{b}} \sum\_{j=1}^{N} p\_{j}^{d} \frac{\beta\_{j} u\_{i} L\_{i}}{R\_{j}^{d}} + \sum\_{i=1}^{N} p\_{i}^{u} \frac{a\_{i} L\_{i}}{R\_{i}^{d}} + \sum\_{i=1}^{N} \frac{\kappa \mathbb{C}^{3} (1 - a\_{i})^{3} (L\_{i})^{3}}{(t\_{i}^{u})^{2}} \\ & & - \sum\_{j=1}^{N} \theta\_{j} (P\_{j}^{d} + \sigma\_{j}^{2}) \frac{\beta\_{j} u\_{i} L\_{i}}{R\_{j}^{d}} \\ & & \text{s.t. } \mathbb{C}1: 0 \le \mathfrak{a}, \theta \le 1 \end{array} \tag{26}$$

where *P<sup>d</sup> j* = *pd j tr*{**H***<sup>d</sup> j* (**H***<sup>d</sup> j* ) *H*}. Similar to problem P3, problem P4 is a convex problem which can be solved by the interior point algorithm.

Based on the above discussion, the proposed AGIO algorithm can effectively solve the optimization problem P1, which is illustrated in Algorithm 1.

#### **Algorithm 1** Alternate Group Iterative Optimization

**Input:** *N*, *M*, *B*, **H***<sup>u</sup>*, **<sup>H</sup>***d*, **H**0, *C*, *κ*, **L**, *σ*<sup>2</sup> *j* , *<sup>σ</sup>*2*AN*, *β*, *η*, *Pumax*, *<sup>P</sup>dmax*, *Rumin*, *Rdmin* **Output:** optimal solutions **f**<sup>∗</sup>, **<sup>p</sup>**(*u*)<sup>∗</sup>, **<sup>p</sup>**(*d*)<sup>∗</sup>, *<sup>α</sup>*∗, , *θ*<sup>∗</sup> 1: Set iteration number *n* = 1. 2: Set maximum iteration number *Imax*. 3: Set the initial values: **<sup>p</sup>***<sup>u</sup>*(0), **<sup>p</sup>***d*(0), *<sup>α</sup>*(0), *θ*(0) . 4: **While** *n* ≤ *Imax* 5: Solve problem P2 to obtain the optimal **f**; 6: Solve problem P3 to obtain the optimal (**p***<sup>u</sup>*(*n*), **p***d*(*n*)); 7: Solve problem P4 to obtain the optimal (*α*(*n*), *θ*(*n*) ) 8: Set *n* = *n* + 1; 9: **End While** .

#### **5. Simulation and Analysis**

#### *5.1. Simulation Results*

In this section, the research work above is simulated and the effects of different variables on the system performance are investigated. The simulation parameters are summarized as follows: the bandwidth is 5 MHz; the upper limits of transmitting power are *<sup>p</sup><sup>u</sup>*1,*max* = *<sup>p</sup><sup>u</sup>*2,*max* = ··· = *pu N*,*max* = 5 W and *<sup>p</sup>d*1,*max* = *<sup>p</sup>d*2,*max* = ··· = *pd N*,*max* = 20 W; the weight factors are *β*1 = *β*2 = ··· = *βN* = 1; and the noise power is *<sup>σ</sup>*2*AN* = *σ*<sup>2</sup> *j* = −120 dBm, ∀*j*. We also set the chip effective capacitance coefficient to *κ* = 10−<sup>20</sup> and the CPU cycles are *C* = 10<sup>3</sup> cycles/bit. We choose a random Rayleigh fading channel model for all the channel matrix in the simulation. Moreover, we apply two benchmark algorithms to compare with the proposed AGIO algorithm.

(1) The fixed-variable (FV) algorithm: The variables **p***<sup>u</sup>*, **<sup>p</sup>***d*, *α*, *θ* are fixed at initial values. (2) The full-offloading (FO) algorithm: MNs upload all computation tasks to the MEC server. Thus, the local computation task is zero, the CPU frequency of local computation is *f*1=*f*2=···=*fN*=0andtheoffloadingweightfactoris*α*1=*α*2=···=*αN*=1.

Figure 2 demonstrates that convergence performance of the proposed AGIO algorithm under different computation task size L (4 Mbits, 8 Mbits and 12 Mbits ) with 6 MNs and the antenna number of AN is 6. As shown in the figure, the algorithm converges after five iterations under varying L. This proves the effectiveness of our algorithm.The convergence curves also indicate that the energy consumption increases with computation task size L.

**Figure 2.** Convergence behavior of the proposed AGIO algorithm.

Figure 3 compares the system energy consumption of the three different algorithms under a different number of AN antennas *M*. The proposed AGIO has the minimum system energy consumption in all the scenarios, which shows the performance superiority of the AGIO algorithm. The number of antennas of the FV algorithm has the least impact on energy consumption. It increases gently with the number of AN antennas. On the other hand, for FO algorithm and the proposed AGIO algorithm, the energy consumption is greatly reduced with *M*. As a result, our algorithm indicates greater performance improvement in energy consumption when the number of the AN antennas increases. Thus, we can conclude that the proposed AGIO algorithm is suitable for multi-antenna AN.

**Figure 3.** Comparison of energy consumption with a different number of antennas.

Figure 4 compares the three different algorithms under different number of MNs. The energy consumption increases with N which is attributed to the increased number in computation tasks when the number of users increases. Again, the proposed AGIO algorithm outperforms both FV and FO algorithms. The superiority increases with the number of MNs, which reveals the applicability of the proposed algorithm in multi-user senarios. In addition, it is clear that the FO scheme outperforms the FV scheme, which mainly benefits from the optimal power allocation process in FO scheme.

**Figure 4.** Comparison of energy consumption with a different number of mobile nodes.

Figure 5 shows the energy consumption of the three algorithms under different harvest weight factor *θ* with *N* = 2 and *N* = 4, respectively. For the three algorithms, the energy consumption decreases with the parameter *θ*. The FO and AGIO algorithms demonstrate increased significant decline than FV due to the reason that *θ* represents the capability of energy harvesting and the greater value of *θ* means more harvested energy and less total system energy consumption. Thus, we can conclude MN tends to offload a larger proportion of computation bits to AN in the view of energy efficiency.

**Figure 5.** Comparison of energy consumption with different *θ*.

Figure 6 demonstrates the offloading delay of MNs in the uplink transmission. The FV scheme shows a slight advantage than the FO algorithm because we set the offloading weight factor *α* = 0.1 for FV, which means smaller offloading task in FV than in FO. Compared with the two benchmark algorithms, AGIO algorithm displays better latency performance due to the excellent design of optimization steps. It also indicates the distinguished feature of our algorithm both in energy consumption performance and latency performance.

**Figure 6.** Comparison of offloading delay with different computation task size L.

#### *5.2. Analysis and Discussion*

Aiming at solving the data explosion and energy insufficiency challenges in WSNassisted IoT system, we designed a novel framework that integrates MEC and SWIPT technologies into the IoT system. We formulate the energy consumption minimization problem and propose an AGIO algorithm to solve it. By jointly optimizing the CPU frequency, power allocation, offloading scheme and SWIPT scheme, we can achieve the minimum energy consumption.

Simulation results in Section 5.1 have verified our original intention. First, the proposed novel system shows grea<sup>t</sup> advantages in energy consumption and time delay, which are demonstrated in Figures 5 and 6. It can attribute the success to more reasonable expressions of several parameters, which affects the system performance. That is also achieved by the first contribution listed in Section 1.3. In addition, the convergence result displayed in Figure 2 confirms the effectiveness of the AGIO algorithm as we stated in the second contribution. Furthermore, the simulation result in Figure 3 shows that the energy consumption decreases with the number of AN antennas. It provides a clue that our system is suitable for multi-antenna system, which is more efficient in applications. The simulation results in Figure 4 shows the superiority of the proposed algorithm in a multi-user scenario, which is exactly the practical application of a WSN-assisted IoT system.
