I Introduction
Ia Background
With the rapid development of Internet of Things (IoT) and wireless sensor networks (WSNs), various wireless devices are required to access Internet, motivating lots of datadriven computationintensive and latencysensitive mobile intelligent applications, such as augmented reality/virtual reality (AR/VR), interactive gaming, autonomous driving and industrial control etc [1]. These emerging applications require realtime computations and communications, bringing serious challenges to smallsize wireless devices with limited computing capability [2, 3]. To effectively overcome these challenges and well support the computationintensive and latencysensitive applications with quality of service (QoS) requirements, fog computing (FC), a new paradigm similar to mobile edge computing (MEC) [4], has been presented as a promising solution, as it is capable of offloading computing tasks at sensors (mobile users (MUs)) to their nearby fog servers (FSs). Once a FS finishes the assigned computing task, it will feedback the calculated results to the MUs. Since FS has relatively strong enough computing capability, the system performance in terms of task processing latency can be greatly improved [5].
Besides computing resources, huge computationintensive and latencysensitive applications in IoT and WSNs also incur a great number of energy consumption at MUs [6]. However, most sensors are powered by batteries with limited energy capacities. Thus, how to provide sustainable energy supply to prolong the lifetimes of the energyconstrained sensors and reduce the management cost caused by frequent replacement of batteries become critical [7, 8, 9, 10, 11]. To resolve these problems, energy harvesting (EH) has been regarded as a promising technology, since it is able to provide energy to sensors by utilizing external natural energy sources (e.g. solar and wind etc)[12, 13] or harvesting energy from radio frequency (RF) signals. Compared with traditional natural energy sources, RF signals are less affected by weather or other external environmental conditions, and can be efficiently controlled and designed, so RFbased EH has greatly potential to provide stable energy to lowpower energyconstrained networks including IoTs. Moreover, as RF signals also carry information when they deliver energy, the concept of simultaneous wireless information and power transfer (SWIPT) was proposed and studied in [14] and [15] from an information theoretical perspective. Later, in order to make SWIPT implementable, Zhang et al. [16] presented two practical receiver architectures, i.e., time switching (TS) and power splitting (PS). Since then, both TS and PS have been widely studied in various wireless systems, see e.g. [17, 18, 19, 20].
As FC and SWIPT are two promising technologies that have great potential to be employed in future IoTs and WSNs, integrate them into a single system and inherit their benefits become very significant.
IB Related Work
So far, lots of works on SWIPT or FC can be found in the literature [21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38]. For SWIPT, some works investigated the optimal resource allocation including time assignment, transmit power, and energy beamforming vector in various wireless systems [22, 23, 24]
, and others focused on the system performance analysis in terms of outage probability
[26] and ergodic capacity [27] in fading channels or designed the SWIPT systems with some practical limitations, e.g., imperfect channel state information (CSI)[28], nonlinear EH circuit features [29] and communication secrecy requirements[30]. For FC/MEC, different types of offloading frameworks and policies were presented, see e.g., [31, 32, 33, 34], and multiobjective optimal resource allocations were studied, see e.g., [35, 36, 37, 38], to improve system performance in various scenarios.However, existing works mentioned above just studied SWIPT and FC separately, which did not exploit their benefits contemporaneously in a single system. In order to inherit the benefits of both technologies, recently, some works began to investigate FC with EH together. For example, in [39], dynamic computation offloading strategy was optimized for MEC system with EH devices, where however, only traditional natural source based EH technology was considered rather than the RFbased EH. Although in [40, 41, 42, 43], the FC systems with RFbased EH were studied, where however, only wireless power transfer (WPT) was adopted rather than SWIPT. Most recently, a few works studied fog computingassisted SWIPT networks see e.g., [44, 45, 46, 47, 48]. However, they did not jointly design the task offloading or only considered the single user scenario or only involved the TS SWIPT receiver. Specifically, in [44], the authors studied the resource allocation for twohop fogassisted SWIPT OFDM networks, where however, the computation offloading was not involved. In [45], the power minimization problem was studied in a SWIPTaided fog computing networks with dog offloading, where however, the fog server was just used to assign tasks rather than participate in computing. In [46], the authors studied the optimal resource allocation in ultralow power fogcomputing SWIPTbased networks, where however, only the TS receiver architecture was adopted and only singleuser was considered. In [47], the authors extended the work in [46] to a multiuser scenario, but it still only studied the TS receiver architecture. In [48], the power minimization problem was investigated in SWIPTaware fog computing system with PS receiver architecture, where however, only singleuser was considered.
IC Motivations and Contributions
As it was shown in [22, 49] that PS receiver architecture is able to achieve the better performance in terms of the larger energyrate region and higher endtoend information rate than the TS one. Therefore, in this paper, we focus on a multiuser fog computingassisted SWIPT networks with PS receiver architectures. To the best of the authors’ knowledge, this is the first work on the multiuser fog computingassisted PS SWIPT neworks. For such a system, where each sensor has to first harvest energy and receive information from a hybrid access point (HAP) that is with fixed power supply, and then tries to process the received information itself (namely, local computing mode) or offload the computing task to a nearby FS (namely, fog offloading mode) with the harvested energy, we desire to answer the following fundamental questions.

How to optimally schedule the sensors to minimize their total required energy?

For each sensor, what is its performance limit in terms of the minimal required energy and what is the corresponding optimal resource allocation?

For each sensor, is there one of the two modes (i.e., local computing or fog offloading) always superior to the other one, and for a given system configuration, which one should be the better choice?
The main contributions of this work are summarized as follows.

Firstly, a multiuser scheduling framework is presented based on time division multiple access (TDMA) manner, where for each time block, only one MU is scheduled to be served and for each time frame composed of multiple time blocks, all MUs can be served. Particulary, for each scheduled MU, either local computing mode or fog offloading mode can be selected.

Secondly, to reduce the total energy requirement of all MUs, an energyminimization optimization problem is formulated by jointly optimizing the user scheduling order, the mode selections, the time assignments, the transmit powers at MUs, and the PS ratios under the required information rates and energy harvesting constraints.

Thirdly, since the optimization problem is a mixed integer programming (MIP) problem and cannot be directly solved by using standard convex solution methods, we first optimize the rest variables by fixing the user scheduling order, and then decompose the new problem into two suboptimization problems with a given mode selection. Note that compared with existing works on WPTassisted FC networks, the new variables associated with the SWIPT receiver architectures (i.e., the PS ratios) are jointly optimized with time assignments and the transmit powers at the MU. The coupling of these variables makes each subproblem nonconvex, which cannot be directly solved by using known convex problem solution method. Therefore, by using the perspective function and some mathematical tackles, we fortunately find an efficient way to solve them and obtain some closedform and semiclosedform solutions to the two subproblems, which characterize the quantitative relationships between the system performance and prameters. Then the optimal mode selection is determined by choosing the one with the less energy requirement. Finally, with the obtained optimal mode selections, time assignments, transmit powers at MUs, and PS ratios, the optimal user scheduling scheme is achieved by serving the sensor who requires the minimal energy among the unscheduled ones for a give time block.

Fourthly, for better understanding the system and providing some simple deployment policy, the quantitative relationship between some system parameters, e.g., the number of logic operations per bit, the scaling factor of the task result, and the minimal required energy of both modes are analyzed, the quantitative relationship between the location of the MU for fixed HAP and FS and the minimal required energy of both modes is also studied by simulations. It is found that when the number of logic operations per bit is lower than a certain threshold or the scaling factor of the task result is higher than a certain threshold, the local computing mode is a better choice; otherwise, the fog offloading mode should be selected. Besides, when the location of MU is close to HAP or FS, the fog offloading mode is a better choice and for the rest locations, the local computing mode should be selected.
The rest of this paper is organized as follows. Section II describes the system model. In Section III, the problem formulation and solution are given, including the optimal solutions for the formulation problem and our proposed user scheduling scheme. Section IV analyzes the system performance. Section V discusses how to run the system in a frame by frame continuous scenario. Section VI provides some simulation results and finally, Section VII summarizes the paper.
Ii system model
We consider a multiuser fog computingassisted PS SWIPT system consisting of a multiantenna HAP, singleantenna MUs and a singleantenna FS, as illustrated in Figure 1.
The HAP desires to transmit data to MUs, and once a MU receives the data, it will process the data immediately for use. It is assumed that each MU is energyconstrained and only with very limited stored energy, and the HAP is with sufficient power supply, so that the HAP is able to charge MUs with its transmitted signals. PS receiver architectures are employed at all MUs, so they are able to decode information and harvest energy simultaneously from the received RF signals transmitted by the HAP. A FS is deployed closed to the MUs. As a result, the computing task of MUs can be accomplished either by MUs themselves (i.e., local computing mode) or helped by the FS (i.e., fog offloading mode).
Let denotes the set of MUs and represents the th MU. Denote as a time frame for the multiuser system, in which all the MUs are required to be served. To do so, each time frame with the interval of is divided into blocks with equal time interval . For convenience, with a little abuse of notations, we define . Let be the maximal delay tolerance of MUs. In order to satisfy the delay requirement, is chosen such that , and the task associated with MU must be completed within .
Block fading channel model is assumed, so in each time block, all channel coefficients are regarded as constants. To be general, both largescale fading and smallscale fading are considered. For the largescale fading, the lineofsight (LoS) component associated with the channel is modelled by using the International Telecommunication Union (ITU) indoor channel model as [51]:
(1) 
in which is the total path loss, is the frequency of carrier, is the distance between the transmitter and the reciever and is the corresponding power loss coefficient. For the smallscale fading, the channel coefficients may change independently from current block to the next following Rician distribution. Without loss of generality, the time interval of each block is assumed to be equal to .
Define , representing the user scheduled matrix with , where . indicates that in the th time block, MU is scheduled and served; otherwise, means that in the th time block, MU is not scheduled and served.
In order to avoid the interuser interference, in each , only one MU is allowed to be scheduled and served, and in order to make sure all the MUs be served in , each MU is only scheduled once during . Therefore, it is satisfied that
(2) 
Fig. 2 illustrates our presented transmission protocol. For each , it is divided into several time slots to complete the local computing or fog offloading. For local computing, it is divided into two parts and for fog offloading, it is divided into four parts.
For both modes, in their first part with time interval , each MU decodes the received data and harvests energy from the transmitted signals by HAP. Denote the RF signal symbol transmitted by the HAP as , which is originated from independent Gaussian codebooks, i.e., . The MU ’s beamforming vector is , where is the number of antennas deployed at the HAP. The channel vector from the HAP to MU is denoted with . Assuming that perfect channel state information (CSI) is known by MU ,
which can be realized by channel estimation and fed back to HAP and FS. Such assumptions have been widely adopted for the optimal design and performance limit analysis of wireless communication systems, see e.g.,
[44, 45, 46, 47, 48]. The received signal at MU is given by(3) 
where is the available transmit power of the HAP, and (0, ) is the noise received at each MU identically
, which obeys the circularly symmetric complex Gaussian distribution. Since the channel between the HAP and
each MU is a typical multiple input single output (MISO) channel, by using the maximum rate transmission (MRT) strategy, the optimal related to can be given by [52](4) 
With PS SWIPT receiver architecture, a part of the received signals’ power is inputted into the EH circuit for energy harvesting and the rest part of signals’ power at MU is input into the information decoding (ID) circuit for information receiving. Let (0, 1) be the power splitting factor of MU . The harvested energy at MU in its scheduled can be given by
(5) 
where denotes the energy conversion efficiency of the EH circuit. To fully utilize the broadcast feature of wireless channels, we assume that MU also accumulates the energy from the signals transmitted by the HAP to its previous MUs. Thus, the total harvested energy at MU in the previous time blocks is
(6) 
Since when MU is scheduled, its previous MUs have been served. Therefore, the second term in (6), i.e., is determined, which is a constant to MU . Hereafter, is denoted by for notational simplicity. The average achievable information rate over at MU can be given by
(7) 
where is the system frequency bandwidth. Following [53], we assume that the consumed energy for information decoding at MU is proportional to the received information amount. Therefore, the required energy for information decoding at MU can be given by
(8) 
where (Joule/bit) is a constant, which is used to characterize the energy requirement for decoding one bit.
Ii1 Local Computing Mode
As mentioned previously, for MU , when the local computing mode is selected, the time block with interval of is divided into two parts, and in the second part, i.e., , MU processes the received data by itself.
To do so, some energy is required for data processing. As described in [54], the energy requirement is larger than the Landauer limit by a factor of , i.e., , where is a timedependent immaturity factor of the technology and is the thermal noise spectral density. With such a computing energy requirement model, the local computing energy requirement at MU can be expressed by
(9) 
where is the fanout, i.e., the number of loading logic gates, is the activity factor, respectively. is the number of logic operations per bit and a linear model w.r.t to evaluate the computational complexity of local computing. That is, more bits are required to be processed, more computation should be performed by local computing. According to [50] and [55], the value of depends on the specific algorithms, but at high bit rate, the computing operation with linear complexity is often expected to reduce the computational complexity and power consumption. Hence, similar to [46, 50], we also adopt the linear model in (9) to characterize the local computing energy consumption in this paper. represents the data size received in each .
As a result, the total required energy at MU can be described by
(10) 
where denotes the remaining energy stored in the battery of MU after the last transmission. When , it means that MU ’s harvested energy is less than the required energy, i.e., . In this case, the battery has to discharge a certain amount of energy, i.e., , to help accomplish the local computing. When , it implies that the harvested energy is more than the required energy .
Ii2 Fog Offloading Mode
When the fog offloading mode is selected, the time block with interval of is divided into four parts. In the first parts, the process is similar to the local computing mode, and in the last three parts, MU offloads the decoded data to the FS, and then, waits the FS to process the data and feedback the result.
Let be the complexvalued channel coefficient from MU to the FS. The average achievable information rate associated with the offloading over can be given by
(11) 
where denotes the transmit power at MU , is the noise power at the FS, is the time used for task offloading from MU to the FS. Correspondingly, the energy required for task offloading at MU is
(12) 
where is constrained by the maximal available transmit power , i.e.,
(13) 
Once the FS receives the data, it will perform computing over the data. The required time for computing is
(14) 
where has the same meaning with that in (9), represents the amount of the data transmitted from MU to the FS, and denotes the logic operations per second of the FS.
After accomplishing the computing operations, the FS transmits the computed result to MU . For simplicity, it is assumed that the data amount of the computed result is proportional to that of the input one. By defining a scaling factor , the number of bits of the computed result of MU can be given by
(15) 
When , it indicates that the computing task of MU is similar to a data compression processing and when , the computing task of MU is similar to a data unzip processing.
Let be the complexvalued channel coefficient from the FS to MU . The average achievable information rate from the FS to MU for computing result feedback is
(16) 
where denotes the transmit power of the FS, and is the received noise power. is the transmission time from the FS to MU . Thus, the time assignment must satisfy that
(17) 
Moreover, in order to guarantee all computed result be transmitted back to MU within , it should satisfy that
(18) 
Similar to the local computing, the total required energy at MU by using fog offloading mode is
(19) 
When , the harvested energy is less than the total required energy . When , the harvested energy is more than the total required energy .
As mentioned previously, for MU , it may select either local computing mode or fog offloading mode. Let be the mode selection indicator with , where implies the local computing mode being selected and indicates the fog offloading mode being selected. The total energy requirement of MU can be given by
(20) 
Iii Optimal Problem Formulation and Solution
Iiia Problem formulation
This subsection formulates an optimization problem to minimize the total energy requirement of all MUs by jointly optimizing the user scheduling order, the mode selections, the time assignments, the transmit powers at MUs, and the PS ratios under the required information rates and energy harvesting constraints, in order to prolong their lifetimes while guaranteeing their minimal required information transmissions and processing rates. The optimization problem can be mathematically expressed by
(21)  
where = [, ] and = [, , , ] denote the time assignment vector associated with the two modes for MU , respectively. denotes the power splitting vector associated with the two modes. Constraint (IIIA) means that the information transmission rate from the HAP to the MU should be no less than a predefined threshold . Constraint (IIIA) means that no matter which mode is selected, the total number of logic operations at the MU or at the FS must not be smaller than the minimal required operations of the task. Particularly, represents the operations at the MU (where denotes the peak operations per second at the MU identically) and means the number of offloading operations, respectively. Constraint (IIIA) is similar to Constraint (IIIA), which describes the computing capability constraints at the FS. Constraint (IIIA) is used to guarantee the calculated result to be completely fed back from the FS to the MU . Constraint (IIIA) implies that the sum of the assigned time intervals should not be larger than . Constraint (IIIA) indicates that the transmit power at the MU cannot exceed the maximal available transmit power at the MU .
For problem P, is a matrix with discrete binary elements and
is a discrete binary variable
of MU , which make problem P difficult to solve. Therefore, we deal with it by using the following method.(A1): For a given , we find the joint optimal for the local computing mode and the joint optimal for the fog offloading mode. Based on the obtained results, the optimal is determined according to the minimal required energy. As the closedform solutions are derived, the optimal joint mode selection, time assignment and power allocation associated with MU is achieved with low computational complexity.
(A2): Based on the obtained optimal results , a user scheduling scheme is presented to find the approximate optimal , which is also with low computational complexity.
The detailed information of our presented solving approach is described in Section III.. To achieve notation simplicity, we omit the superscript “” of the notations in the sequel.
IiiB Solving Approach
I. Optimal for a given
Step 1: Optimization of the two modes. With a fixed , for each MU , Problem P is simplified to be the following Problem .
(22)  
which aims to find the joint optimal mode selection, time assignment and power allocation associated with MU for . It is noticed that Problem is with discrete variable , which is still not easy to tackle. In order to efficiently solve it, we decompose it into two subproblem and according to the working modes, i.e., the local computing mode and the fog offloading mode by fixing . Then, we solve them separately and get some closedform solutions related to the two modes.
IiiB1 Local Computing Mode
By setting = 1, MU works in the local computing mode, so Problem is simplified to be the following Problem , i.e.,
(23)  
By expanding the expressions, Problem is further equivalently rewritten as
(24)  
It is observed that variables and are coupled together, so that Problem is nonconvex and cannot be directly solved by using some standard convex optimization solution methods. Hence, by introducing a new slack variable , we have that .
Denote and So, . Therefore, Problem can be rewritten to be
(25)  
(25a)  
(25b)  
It can be seen that the first term of , i.e., , is with the form of , which is concave w.r.t. and [56]. That is, is concave w.r.t and . Moreover, the second term of , i.e., , is linear with and . To Problem , because that the objective function is the minimum of a concave function w.r.t and , and constraint (25b) is nonconvex, is still nonconvex problem. Hence, we analyze and obtain some theoretical results as follows.
Proposition 1: Problem has feasible solutions only when .
Proof:
Following Proposition 1, we obtain the following corollary.
Corollary 1: Problem has feasible solutions only when for given and , when for given and , and when for given , and .
Lemma 1: The optimal for local computing is .
Proof:
See Appendix A. ∎
Theorem 1: The optimal and for local computing mode are and , respectively.
Proof:
See Appendix B. ∎
IiiB2 Fog Offloading Mode
By setting = 0, MU works in the fog offloading mode. In this case, Problem is simplified to be the following Problem , i.e.,
(26)  
in which Constraint (IIIB2) describes that the number of the bits transmitted from MU to FS should be no less than the bits transmitted to the MU. Similar to the process of Problem . By introducing two new slack variable , and , Problem is transformed to be Problem in (27).
(27)  
The objective of Problem function is a minimization of a concave function w.r.t , , and . It is also difficult to solve due to the nonconvexity of constraint sets (IIIB2) and (IIIB2).
Proposition 2: Problem has feasible solutions only when .
Proof:
Following Proposition 2, we obtain the following corollary.
Corollary 2: Problem has feasible solutions only when for given and , and when for given , and .
Proposition 3: The optimal and for fog offloading mode are and , respectively.
Proof:
As is known, the energy required by transmitting and processing of data is determined the number of bits, which means the increased bits cannot reduce the energy requirement. So, when and are equal to their threshold, , and , the energy requirement reaches its minimum value. On the other hand, according (15) and (16), one can see that the smaller and are, the larger and are, which requires less energy for offloading energy or longer energy harvesting time. Therefore, in order to achieve the minimal energy requirement at the MU, and should be as small as possible. That is, the optimal and should be located close to their lower boundaries. So, the optimal solution and can be given by and