## I Introduction

Cloud computing has become an established paradigm to provide various services to end users, e.g., computational resources for IoT devices [1]. The cloud is typically located hundreds of kilometers away from the end device [14]. The corresponding communications delay and jitter can be therefore significant. Fog computing, being set of computational resources (e.g., local servers, small data centers) located close to the end user, has been introduced to address this problem [5]. At the same time fog computing can reduce required local computing and therefore simplify IoT end devices construction and cost. At the same time the power required for computations at IoT devices is reduced. Optimization of IoT devices Energy Efficiency (EE) is particularly important when these devices are battery powered.

Research on green fog networks is usually focused on delay and energy efficiency of computations carried in fog instead of the cloud [6, 20]. Modelling of energy consumption of the fog network as a whole is performed in [21, 20, 6]. However, energy consumption modeling of mobile devices is omitted. On the other hand, there are articles focused on energy consumption of mobile/IoT devices in fog computing environment. In [8] offloading decisions of a single mobile device are examined. In [24, 23, 25] optimization of offloading decisions of multiple mobile devices is performed jointly. Energy consumption spent on local computations and transmission is considered in [24, 23, 8]. Additionally, energy spent on computations in Fog Nodes is considered in [25]. However, models of energy consumption for transmission used in each of these papers are simple and do not cover BaseBand (BB) and Radio Frequency (RF) processing required to transmit data. To the best of our knowledge, our work is the first one to cover these aspects in the context of fog networks.

Our research question is formulated as follows: when is it beneficial to offload computations to the fog from the perspective of energy consumption of an IoT device? Both solutions, i.e., local computations and data offloading consume various amounts of energy. Energy required to process data locally is compared with energy required for preparation and sending data to the fog. Accurate modelling of wireless transmission costs is essential to properly assess the viability of offloading computations to the fog tier. First, we provide detailed models of power spent by end devices on transmission. The radio transmission chain is divided into separate elements. Significant attention is devoted to power consumption and nonlinear distortion introduced by a PA. It can consume significant amount of power and introduce significant distortion [13, 7, 12]. Both effects are modeled considering soft limiter nonlinearity model and power consumption of class B PA. Second, the optimal operating point of the PA is derived and used assuming Signal-to-Interference and Noise Ratio (SINR) maximization. We take video surveillance as an application scenario. It consists of one or multiple IoT devices, i.e., high-bitrate cameras utilizing Time-Division Multiple Access (TDMA). We assume Orthogonal Frequency-Division Multiplexing (OFDM) for transmission which is a state-of-the-art technology in modern wireless communications, e.g, used in WiFi and Long Term Evolution (LTE). Our results confirm that the PA consumes significant part of link power. This is particularly evident for long distances and narrow transmission bandwidths. Fog computing is the most advantageous for short links with wide bandwidth available. To the best of our knowledge, this work is the first one to consider detailed power model of an IoT device in the context of offloading computations to fog or performing them locally.

The rest of this paper is organized as follows. The considered fog network architecture is presented in Sec. II along with the system model including the power consumption model of the local computations as well as in the case of offloading computations to the Fog. Sec. III details numerical results. The paper is summarized in Sec. IV.

## Ii Fog application for video surveillance

We use the fog architecture shown in Fig. 1. It consists of three tiers. The Things tier includes IoT devices. These devices are sources of computation requests. The requests can be served either locally, or offloaded using a wireless connection to the Fog tier, i.e., a nearby Base Station (BS). The BS has a short-range wired connection to a FN which can process computational tasks sent by IoT devices. In addition, some computationally intensive and delay tolerant tasks can be sent to a far-away Cloud tier or distributed among many FNs.

In our application system, we consider

video cameras, each generating constant bitrate stream that has to be processed requiring high computational load. Face recognition is an exemplary application.

### Ii-a Local computations

In the case of local computations, the power consumption can be modeled as a function of clock frequency, voltage, and some platform specific coefficients [17]. However, such a model is not directly related to the computational power measured in number of Floating point Operations Per Second (FLOPS) available. Therefore, here, a mean, constant processing efficiency of is used as in [2]. It is inline with values reported for some smartphones, e.g., Samsung Galaxy S6 [4]. The total power consumption for local calculations is defined as

(1) |

where denotes the bitrate of video stream after compression while is the computational complexity coefficient determining the mean number of operations per single encoded bit required to complete the task, e.g., face recognition. Thus, specifies the required computational load in FLOPS.

### Ii-B Offloading to the Fog

The workload can be offloaded to the fog network reducing energy consumption of the local device. On the other hand, the task offloading requires the data to be transmitted via the network to the fog. This forms another source of energy consumption. The data offloading is carried in Up Link (UL) of OFDM-based system (being a common choice for modern wireless communications systems). The downlink is neglected as a few orders of magnitude lower throughput is usually experienced. All cameras are sharing resources of a single serving BS, utilizing -th of available time resources. TDMA is the most energy efficient approach for sharing transmission media [13]. According to [9] the UL rate considering adaptive modulation and coding can be approximated by the scaled Shannon formula

(2) |

where is the useful bandwidth of the transmitted signal, SINR is Signal-to-Interference and Noise Ratio, and is a scaling coefficient. In [9] is equal 0.55 assuming Single-Input Single-Output (SISO) transmission in Additive White Gaussian Noise (AWGN) channel and 0.4 assuming Single-Input Multiple-Output (SIMO) transmission in UL of typical urban fast fading channel.

The diagram of the considered transmitter is shown in Fig. 2. The stream of bitrate is encoded and modulated (with power consumption detailed in Sec. II-B2) and transmitted using many subcarriers using OFDM (resulting in power consumption described in Sec. II-B3). The complex symbols at the output of OFDM block are separated to in-phase and quadrature phase real symbols and fed to two Digital-Analog Converters of bit resolution and conversion speed , where . The considered DAC power consumption model is provided in Sec. II-B4. In order to reduce power consumption Zero- Intermediate Frequency (IF) architecture is considered as in [7] requiring in addition only one Local Oscillator (LO) and two mixers whose power consumption models are provided in Sec. II-B5 and Sec. II-B6, respectively. Finally, the signal at radio frequency has to be amplified in PA and fed to the antenna.

In the simplest approach the higher the transmit power, the higher the received power and higher the achievable link throughput. However, nonlinear distortion of OFDM signal passing through PA has to be considered[13]. The OFDM signal samples

for sufficiently high number of subcarriers follow complex-Gaussian distribution

[22]. Assuming that the PA can be modeled in BB as a soft limiter with the input OFDM signal , the output sample equals:(3) |

where is the maximum power of a sample, i.e., clipping threshold. An Input Back-Off (IBO) defined as

(4) |

is a common measure of PA operating point, i.e., how *far* the mean transmission power is from the clipping power.
The energy consumption of a PA is discussed in Sec. II-B7.
According to the Bussgang theorem the nonlinearly distorted signal can be decomposed into linearly down-scaled (by coefficient defined in [16]) input signal and uncorrelated distortion , i.e.,

(5) |

This signal reaches a receiver being attenuated by the channel of a single coefficient (reflecting path loss; other effects like fading are included in coefficient ), where the noise sample is added, resulting in

(6) |

Based on derivations in [16, 13] it can be shown that the received SINR value equals

(7) | ||||

where and . SINR depends on IBO and that can be interpreted as maximum possible SINR that can be obtained if input signal is a complex sine of power resulting in no nonlinear distortion but maximum PA utilization. For SINR maximization, the optimal IBO value can be derived (as shown in Appendix A) by numerically solving (e.g., using the Newton method) the following equation

(8) |

The resulting IBO value (see (7)) is shown in Fig. 3 for . Most interestingly, the maximum SINR can be approximated in dB scale as

(9) |

with maximum error lower than 0.5 dB for as shown in Fig. 3.

For a known bitrate requirement , SINR calculated from (2) can be used in (9) giving

(10) |

After some simplifications and substitution of the definition we obtain:

(11) |

The last equation determines optimum (maximizing SINR over IBO) clipping power of the PA that influences power utilization described in Sec. II-B7.

The mean power consumption of a single camera for the task offloading to the fog is given as

(12) |

where , , , , , , and denote power consumed by video coder, redundancy coding, OFDM, DAC, LO, mixer, and PA, respectively. Division by is carried for transmitter components that are turned off when other cameras transmit their data, i.e., a component is active only -th of time. They are detailed in the sections below.

#### Ii-B1 Video compression

In order to transmit a video signal its raw video frames have to be encoded. H264 is one of the state-of-the-art compression standards that can be used for this purpose. Video encoding is a computationally intensive process. This fact together with high popularity of watching videos leads to high availability of dedicated Application-Specific Integrated Circuits in the mass market [15]. The power consumption depends on many parameters including coder configuration, resolution, and utilized Complementary Metal-Oxide-Semiconductor (CMOS) technology. Average power consumption is reported in [15], e.g., for a Full HD stream. The typical output bitrate is .

#### Ii-B2 Redundancy coding

#### Ii-B3 Ofdm

The computational complexity of an OFDM transmitter is dominated by

Inverse Fast Fourier Transform

(IFFT) [3]. For a given transmitter bandwidth (not useful band spanned by utilized subcarriers), a subcarrier bandwidth of can be assumed giving IFFT size .Assuming the number of operations required for IFFT equals [3] and constant OFDM symbol duration equal to (the cyclic prefix duration is neglected for simplicity) the required computational complexity equals FLOPSs. We use being a constant number of operations per second per Watt to map the computational complexity to power consumption. A value of is assumed for femto base stations [7]. This value can be much higher than reported for general purpose processors as the computing unit can be optimized specifically for this task. This is related also to the utilized terminal, i.e., .

#### Ii-B4 Digital-Analog Converter

#### Ii-B5 Local Oscillator

#### Ii-B6 Mixer

A Zero-IF transmitter uses two mixers: one for the in-phase component and one for the quadrature component. Based on [12] a constant value of is used here for one mixer.

#### Ii-B7 Pa

Modeling of power consumed by a PA is a complex task depending on several factors such as PA class, input signal distribution and specific implementation [18]. A class B PA is considered in [13] as it provides relatively high energy efficiency (up to 78.5%) and has relatively simple construction that is suitable for mobile devices. Similarly, in [10] l-way Doherty PA is assumed being generalization of B class PA. However, while [13] does not consider input signal clipping (required by the considered soft limiter PA model), [10] does not consider OFDM samples power distribution. Therefore, the class B PA power consumption assuming soft limiter nonlinear characteristic for complex Gaussian input signal is derived in Appendix B giving:

(14) |

where optimal IBO is calculated solving (8) for from (9) and is calculated based on (11).

## Iii Numerical results

The considered IoT link offloading computations to the fog is analyzed using parameters summarized in Table I. The propagation channel amplification assumes path loss for macro, urban base station, with 0 dBi IoT device gain and 15 dBi base station antenna gain [9]. Distance between base station and IoT device is (in km) and carrier frequency is denoted by . Noise power is modeled as thermal noise in increased by 5 dB noise figure according to [9].

Parameter | Value |
---|---|

5 GFLOPS/W [2] | |

0.4 [9] | |

R | 6 Mbit/s |

242 mW [15] | |

MHz [9] | |

MHz [9] | |

[9] | |

120 GFLOPS/W [7] | |

15 kHz | |

3.5 GHz | |

[9] | |

dBm [9] | |

67.5 mW [12] | |

21 mW [12] | |

[mW/Mbps] [2] | |

[12] | |

[12] | |

[12] | |

10 bit |

The optimal SINR changes according to (2) as shown in the top part of Fig. 4 under varying utilized bandwidth and fixed rate . Higher bandwidth allows the same rate to be achieved by lower SINR. Higher number of cameras sharing spectrum require higher SINR as well. The SINR can be used to calculate optimal parameters of the PA, i.e., using (9) and IBO using (8) presented in the bottom of Fig. 4. The optimal IBO (maximizing SINR defined by (7)) decreases with available bandwidth achieving IBO lower than 0 dB for B greater than 7 MHz and . Such low setting of IBO results in relatively high PA energy efficiency at the cost of relatively high nonlinear distortion power.

The required power for offloading the video stream to the fog for processing is shown in Fig. 5 for varying distance between IoT device and base station. Two transmission bandwidths and 1 or 10 cameras are considered. The power consumption for short distance communications (e.g., below 20 m) equals around 26 dBm (differences below 1 dB) in each case. This is dominated by components other than PA. Video compression consumes around 24 dBm. This is inline with power consumption of WiFi cards reported in [11] where a significant constant, idle power is visible. However, as the communications link becomes longer, the PA power consumption becomes dominant over all power consumption components. This phenomenon is particularly significant for narrow bandwidth and high number of cameras sharing the radio channel.

Finally, the power consumed by an IoT device for local computing is compared with power consumed by the same device for communications performed to offload the computation task to the fog in Fig. 6. The total communications power is compared with (1) in order to obtain the maximum number of FLOPS per bit of compressed video stream that can be carried locally within the same power budget. For short links (distance below 20 m) it is more power efficient to offload tasks to the fog if is greater than 320 FLOP/bit and 267 FLOP/bit for and , respectively. For longer distance the computations complexity coefficient has to be even higher to offload the task, e.g., for and one camera it equals around 620 FLOP/bit and 530 FLOP/bit for 9 MHz and 18 MHz, respectively. These numbers are significantly higher for 10 cameras sharing radio channel. Maximal is lower for than for at distances lower than 200 m. This is due to the fact that PA power is low for low distances. The constant terms from (12) dominate then. Some elements (such as mixers or DACs) can be switched off when the number of devices is bigger than 1 (see the divisions over in (12)).

## Iv Conclusions

In the context of ever lacking energy stored in the batteries of mobile IoT devices, we answer the question whether it is beneficial from the power consumption perspective to perform computations locally by the IoT device or to offload (i.e., send) them to the fog. We contribute with a detailed power consumption model of IoT device for data offloading to the fog and local computations. Optimal operating point of the PA is derived and used assuming SINR maximization. The results prove that usage of fog computing reduces IoT device power consumption mostly for short transmission distances, wide transmission bandwidth, and relatively high local computations complexity, e.g., more than 300 FLOP per bit of compressed video stream. Numerical values are valid for the considered, realistic system parameters. The general trend is expected to be valid for most setups. Verification of the analytical results against measurements of equipment on a testbed or in a real fog network would be useful in the future. An algorithm deciding when to offload computations to the fog is also needed.

## Appendix A Optimal Ibo for Sinr maximization

The IBO maximizing SINR in (7) can be calculated by finding for which SINR derivative equals 0, i.e.,

(15) | |||

where . Observing that the denominator is always positive, the root of the nominator has to be found. The following equation is obtained after omission of denominator and substitution of and :

(16) |

In the above product the first factor is always positive for . This stems from the fact that it equals 0 for and its derivative, i.e., , is positive for any . Therefore, the second factor has to be equal 0 resulting in (8).

## Appendix B Class B Pa power consumption for complex Gaussian input signal

For the input PA signal the output signal , described by (3), achieves maximum power . Consumed power of a class B PA transmitting sine wave of mean power is given as

(17) |

following [18, 13]. It has to be averaged over experienced instantaneous power distribution for any other transmitted signal. Each OFDM symbol sample

can be well approximated by a complex normal distribution with variance

, i.e., . Therefore, amplitude is Rayleigh distributed with parameterresulting in probability density function

(18) |

The mean PA power consumption is calculated as follows:

(19) |

It can be rewritten utilizing (3) as

(20) |

It can be found that

(21) |

and

(22) |

Substituting these results to (20) and after some simplifications we obtain

(23) |

## References

- [1] (2014-First Quarter) Cloud-based augmentation for mobile devices: motivation, taxonomies, and open challenges. IEEE Communications Surveys Tutorials 16 (1), pp. 337–368. Cited by: §I.
- [2] (2015-06) Optimal design of energy-efficient multi-user MIMO systems: is massive MIMO the answer?. IEEE Transactions on Wireless Communications 14 (6), pp. 3059–3075. External Links: Document, ISSN 1536-1276 Cited by: §II-A, §II-B2, TABLE I.
- [3] (2015-05) Dynamic spectrum aggregation for future 5G communications. IEEE Communications Magazine 53 (5), pp. 35–43. External Links: Document, ISSN 0163-6804 Cited by: §II-B3, §II-B3.
- [4] (2016-Sep.)(Website) Note: https://www.boston.co.uk/blog/2016/09/13/more-power-your-smartphone-is-smarter-than-your-games-console.aspx Cited by: §II-A.
- [5] (2016-Dec.) Fog and IoT: an overview of research opportunities. IEEE Internet of Things Journal 3 (6), pp. 854–864. External Links: Document, ISSN 2327-4662 Cited by: §I.
- [6] (2016-Dec.) Optimal workload allocation in fog-cloud computing toward balanced delay and power consumption. IEEE Internet of Things Journal 3 (6), pp. 1171–1181. External Links: ISSN 2327-4662, Document Cited by: §I.
- [7] (2012-04) Flexible power modeling of LTE base stations. In 2012 IEEE Wireless Communications and Networking Conference (WCNC), Vol. , pp. 2858–2862. External Links: Document, ISSN 1558-2612 Cited by: §I, §II-B2, §II-B3, §II-B, TABLE I.
- [8] (2017-Aug.) Offloading in mobile edge computing: task allocation and computational frequency scaling. IEEE Transactions on Communications 65 (8), pp. 3571–3584. External Links: Document, ISSN 0090-6778 Cited by: §I.
- [9] (2017-Apr.) LTE; Evolved Universal Terrestrial Radio Access (E-UTRA); Radio Frequency (RF) system scenarios. TR Technical Report 136 942 v.14.0.0, ETSI. Cited by: §II-B, TABLE I, §III.
- [10] (2014-Feb.) Spectral efficiency and energy efficiency of OFDM systems: impact of power amplifiers and countermeasures. IEEE Journal on Selected Areas in Communications 32 (2), pp. 208–220. External Links: Document, ISSN 0733-8716 Cited by: §II-B7.
- [11] (2017-05) Modeling of power consumption by wireless transceivers for system level simulations. In European Wireless 2017; 23th European Wireless Conference, Vol. , pp. 1–6. External Links: Document, ISSN Cited by: §III.
- [12] (2007-Jan.) A system level energy model and energy-quality evaluation for integrated transceiver front-ends. IEEE Transactions on Very Large Scale Integration (VLSI) Systems 15 (1), pp. 90–103. External Links: Document, ISSN 1063-8210 Cited by: §I, §II-B4, §II-B5, §II-B6, TABLE I.
- [13] (2011-05) Power efficiency in communication systems from a circuit perspective. In 2011 IEEE International Symposium of Circuits and Systems (ISCAS), Vol. , pp. 1896–1899. External Links: Document, ISSN 2158-1525 Cited by: Appendix B, §I, §II-B2, §II-B7, §II-B, §II-B.
- [14] (2018-Third Quarter) Survey of fog computing: fundamental, network applications, and research challenges. IEEE Communications Surveys Tutorials 20 (3), pp. 1826–1857. External Links: Document, ISSN 1553-877X Cited by: §I.
- [15] (2014-Nov.) H.264/AVC hardware encoders and low-power features. In 2014 IEEE Asia Pacific Conference on Circuits and Systems (APCCAS), Vol. , pp. 77–80. External Links: Document, ISSN Cited by: §II-B1, TABLE I.
- [16] (2000-11) Performance of the deliberate clipping with adaptive symbol selection for strictly band-limited OFDM systems. IEEE Journal on Selected Areas in Communications 18 (11), pp. 2270–2277. External Links: Document, ISSN 0733-8716 Cited by: §II-B.
- [17] (2013-05) Accurate modeling of the delay and energy overhead of dynamic voltage and frequency scaling in modern microprocessors. IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems 32 (5), pp. 695–708. External Links: Document, ISSN 0278-0070 Cited by: §II-A.
- [18] (2002-Mar.) Power amplifiers and transmitters for rf and microwave. IEEE Transactions on Microwave Theory and Techniques 50 (3), pp. 814–826. External Links: Document, ISSN 0018-9480 Cited by: Appendix B, §II-B7.
- [19] (2016-Jan.) A 0.05- to 10-GHz, 19- to 22-GHz, and 38- to 44-GHz frequency synthesizer for software-defined radios in 0.13- CMOS process. IEEE Transactions on Circuits and Systems II: Express Briefs 63 (1), pp. 109–113. External Links: Document, ISSN 1549-7747 Cited by: §II-B5.
- [20] (2018-Jan.) Assessment of the suitability of fog computing in the context of Internet of Things. IEEE Transactions on Cloud Computing 6 (1), pp. 46–59. External Links: Document Cited by: §I.
- [21] (2016-Mar.) Theoretical modelling of fog computing: a green computing paradigm to support IoT applications. IET Networks 5 (2), pp. 23–29. External Links: ISSN 2047-4954 Cited by: §I.
- [22] (2010-Oct.) Convergence of the complex envelope of bandlimited OFDM signals. IEEE Transactions on Information Theory 56 (10), pp. 4893–4904. External Links: Document, ISSN 0018-9448 Cited by: §II-B.
- [23] (2017-03) Energy-efficient resource allocation for mobile-edge computation offloading. IEEE Transactions on Wireless Communications 16 (3), pp. 1397–1411. External Links: ISSN 1536-1276, Document Cited by: §I.
- [24] (2019) Green large-scale fog computing resource allocation using joint benders decomposition, Dinkelbach algorithm, ADMM, and branch-and-bound. IEEE Internet of Things Journal (), pp. 1–1. Note: early access External Links: Document, ISSN 2327-4662 Cited by: §I.
- [25] (2019) FEMTO: fair and energy-minimized task offloading for fog-enabled IoT networks. IEEE Internet of Things Journal (), pp. 1–1. External Links: Document, ISSN 2327-4662 Cited by: §I.