frog: a robust and green wireless sensor node for fog...

13
Research Article FROG: A Robust and Green Wireless Sensor Node for Fog Computing Platforms Manuel Castillo-Cara , 1 Edgar Huaranga-Junco , 1 Milner Quispe-Montesinos, 1 Luis Orozco-Barbosa , 2 and Enrique Arias Antúnez 2 1 Center of Information and Communication Technologies, Universidad Nacional de Ingeniería, Peru 2 Albacete Research Institute of Informatics, Universidad de Castilla-La Mancha, Spain Correspondence should be addressed to Luis Orozco-Barbosa; [email protected] Received 30 September 2017; Revised 9 March 2018; Accepted 25 March 2018; Published 12 April 2018 Academic Editor: Bruno Andò Copyright © 2018 Manuel Castillo-Cara et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. Over the past few years, we have witnessed the widespread deployment of wireless sensor networks and distributed data management facilities: two main building blocks of the Internet of things (IoT) technology. Due to the spectacular increase on the demand for novel information services, the IoT-based infrastructures are more and more characterized by their geographical sparsity and increasing demands giving rise to the need of moving from a cloud to a fog model: a novel deployment paradigm characterized by the provisioning of elastic resources geographically located as close as possible to the end user. Despite the large number of wireless sensor networks already available in the market, there are still many issues to be addressed on the design and deployment of robust network platforms capable of meeting the demand and quality of fog-based systems. In this paper, we undertake the design and development of a wireless sensor node for fog computing platforms addressing two of the main issues towards the development and deployment of robust communication services, namely, energy consumption and network resilience provisioning. Our design is guided by examining the relevant macroarchitecture features and operational constraints to be faced by the network platform. We based our solution on the integration of network hardware platforms already available on the market supplemented by smart power management and network resilience mechanisms. 1. Introduction Over the past years, the development of wireless networks, mobile devices, and computing paradigms have given rise to the introduction of a large amount of information and communication-assisted services. From Smart City applica- tions to the management of rural areas, Internet of things (IoT) technologies are being deployed to monitor or assist the operation of a wide variety of control and production processes. Nowadays, behind city trac control and food production tasks, IoT systems are being used to monitor the resources and eectiveness of the actions that are manu- ally or automatically being taken in response to the informa- tion provided by tiny sensors deployed across the monitored area. For instance, the use of IoT systems have been used to monitor the environmental conditions of vineyards and the growth of grape bunches over a season [1]. Despite the promising results that have been obtained up-to-date, there are still many issues to be addressed on the design and implementation of robust IoT-based systems capable of meeting the end-user application requirements. Besides the issues to be addressed in order to improve the operation of the underlying communication platforms, another major issue has to deal with the design of a scalable and robust data processing architecture. Towards this end, the data processing architecture of IoT systems has moved from a cloud paradigm to a fog paradigm. The latter has been designed bearing in mind that for a large number of applica- tions, the main consumers of the information obtained from the sensor data may be located close to the data sources. Furthermore, many application may have stringent quality- of-service requirements, such as real-time, security, and nonstop operation requirements. Some applications may also be characterized by their high data rates; for example, Hindawi Journal of Sensors Volume 2018, Article ID 3406858, 12 pages https://doi.org/10.1155/2018/3406858

Upload: others

Post on 03-Sep-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: FROG: A Robust and Green Wireless Sensor Node for Fog ...downloads.hindawi.com/journals/js/2018/3406858.pdfparameters of fog computing platforms [18–20]. In [18], the authors have

Research ArticleFROG: A Robust and Green Wireless Sensor Node for FogComputing Platforms

Manuel Castillo-Cara ,1 Edgar Huaranga-Junco ,1 Milner Quispe-Montesinos,1

Luis Orozco-Barbosa ,2 and Enrique Arias Antúnez 2

1Center of Information and Communication Technologies, Universidad Nacional de Ingeniería, Peru2Albacete Research Institute of Informatics, Universidad de Castilla-La Mancha, Spain

Correspondence should be addressed to Luis Orozco-Barbosa; [email protected]

Received 30 September 2017; Revised 9 March 2018; Accepted 25 March 2018; Published 12 April 2018

Academic Editor: Bruno Andò

Copyright © 2018 Manuel Castillo-Cara et al. This is an open access article distributed under the Creative Commons AttributionLicense, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work isproperly cited.

Over the past few years, we have witnessed the widespread deployment of wireless sensor networks and distributed datamanagement facilities: two main building blocks of the Internet of things (IoT) technology. Due to the spectacular increase onthe demand for novel information services, the IoT-based infrastructures are more and more characterized by their geographicalsparsity and increasing demands giving rise to the need of moving from a cloud to a fog model: a novel deployment paradigmcharacterized by the provisioning of elastic resources geographically located as close as possible to the end user. Despite thelarge number of wireless sensor networks already available in the market, there are still many issues to be addressed on thedesign and deployment of robust network platforms capable of meeting the demand and quality of fog-based systems. In thispaper, we undertake the design and development of a wireless sensor node for fog computing platforms addressing two of themain issues towards the development and deployment of robust communication services, namely, energy consumption andnetwork resilience provisioning. Our design is guided by examining the relevant macroarchitecture features and operationalconstraints to be faced by the network platform. We based our solution on the integration of network hardware platformsalready available on the market supplemented by smart power management and network resilience mechanisms.

1. Introduction

Over the past years, the development of wireless networks,mobile devices, and computing paradigms have given riseto the introduction of a large amount of information andcommunication-assisted services. From Smart City applica-tions to the management of rural areas, Internet of things(IoT) technologies are being deployed to monitor or assistthe operation of a wide variety of control and productionprocesses. Nowadays, behind city traffic control and foodproduction tasks, IoT systems are being used to monitorthe resources and effectiveness of the actions that are manu-ally or automatically being taken in response to the informa-tion provided by tiny sensors deployed across the monitoredarea. For instance, the use of IoT systems have been used tomonitor the environmental conditions of vineyards and thegrowth of grape bunches over a season [1].

Despite the promising results that have been obtainedup-to-date, there are still many issues to be addressed onthe design and implementation of robust IoT-based systemscapable of meeting the end-user application requirements.Besides the issues to be addressed in order to improve theoperation of the underlying communication platforms,another major issue has to deal with the design of a scalableand robust data processing architecture. Towards this end,the data processing architecture of IoT systems has movedfrom a cloud paradigm to a fog paradigm. The latter has beendesigned bearing in mind that for a large number of applica-tions, the main consumers of the information obtained fromthe sensor data may be located close to the data sources.Furthermore, many application may have stringent quality-of-service requirements, such as real-time, security, andnonstop operation requirements. Some applications mayalso be characterized by their high data rates; for example,

HindawiJournal of SensorsVolume 2018, Article ID 3406858, 12 pageshttps://doi.org/10.1155/2018/3406858

Page 2: FROG: A Robust and Green Wireless Sensor Node for Fog ...downloads.hindawi.com/journals/js/2018/3406858.pdfparameters of fog computing platforms [18–20]. In [18], the authors have

a city traffic monitoring system may have to report onevents rising during the peak hours: traffic jams, accidentsamong others.

From the above, it is clear that the services to be providedby the IoT platforms will heavily depend on the underlyingcommunication facilities. In this paper, we focus at two mainnetwork design parameters: power management and net-work resilience mechanisms. The former plays a key role onthe robustness of a wireless sensor network deployed in areasof difficult access and often exclusively powered by batteries.Our solution takes into account the application profile as ameans to define an application-aware power managementmechanism [2]. As for the second issue, network resilience,it is well known that such networks will often have to self-heal based on events, such as the energy depletion of a nodeproviding relay services to other nodes; or due to upgrade orarchitectural changes, such as a change on the number ofnodes covering a certain area or the change of the geograph-ical location of a data processing server. It should be clearthat the nodes should collaborate in order to be able todeliver the data service as required by the end-user applica-tion. Both of these two design parameters are clearly interre-lated. The power consumption of a given node heavilydepends on the network mechanisms to be performed bythe nodes; that is, a node serving as a router will be requiredto forward the packets generated by their neighbors while aleaf node only has to take care of its own traffic. As for theself-healing network mechanisms, they will require to get toknow the power resources at the time of deciding the roleto be assigned to a node; for example, an end node may becalled to operate as a router.

Since one of our goals is to develop a robust and self-healing fog platform to be used in various Smart City andSmart Farming applications, we take as basis the open-source communication hardware platform. This decisionhas been motivated by the large number of different sensorsavailable in the market offering larger coverage range: twomain features towards the deployment of an ever increasingnumber of citywide applications.

Numerous works have been already reported on the useof open-source hardware and software technologies in SmartCity and Smart Farming applications [3–6], implementationof protocol mechanisms [7], or using data fusion to reducethe power consumption [8].

Due to the increasing number of parameters to be mon-itored, we also address the design of a configurable sensornode platform: a platform consisting of a configurable arrayof sensors, from now on sensor node. This is an importantissue to be taken into account when developing platforms tobe deployed in the fields, for example, Smart Farming appli-cations [9] as well as in numerous Smart City applicationsand weather and pollution monitoring, [10–12]. Our worktherefore undertakes a holistic approach towards the designof configurable wireless node platforms integrating powermanagement and network resilience mechanisms. Figure 1shows the overall proposed methodology. The ultimate goalis to develop smart fog computing platforms capable of pro-viding a wide range of end-user applications including themonitoring of complex event processing (CEP) and the pro-visioning of edge-to-core communications.

In this paper, we focus on the design and integrationof the three building blocks, bottom boxes in Figure 1.

Fog computing: edge level

Edge andedge-to-core

communication

Fog nodes

CEP

Array of sensors: phases

Electronic

Power-aware networkresilence management

Power management

FROG: a robust and greenwireless sensor node platform

Mechanical

Green and energyharvesting wireless network

ProgrammingCommunication

Wireless sensor network

Mesh networktopology

Empirical number ofrouter nodes

Optimal load-balancegame algorithm

Router

Coordinator

End

Wireless sensor network

Figure 1: Overall schema proposal.

2 Journal of Sensors

Page 3: FROG: A Robust and Green Wireless Sensor Node for Fog ...downloads.hindawi.com/journals/js/2018/3406858.pdfparameters of fog computing platforms [18–20]. In [18], the authors have

We start by designing a configurable node platform inte-grating off-the-shelf components, that is, sensors and wirelessnetwork platforms. We then incorporate into our designthe aforementioned power management and network resil-ience mechanisms.

In the following, the paper is organized as follows. Sec-tion 2 reviews the related work and describes the main con-tribution of our work. Section 3 reviews the principles andarchitecture of the fog computing paradigm. We also explainthe role played by each node making a part of the edge net-work infrastructure. Section 4 details our proposal. We firstintroduce the power management mechanism and explainits implementation based on the functionalities of the Ardu-ino platform. In the second part of this section, we providethe rationale behind the design of the power-aware networkresilience mechanism. Based on our discussion, we specifythe operation of our proposal.

In Section 5, we first evaluate the benefits of an onboardpower management mechanism. This first evaluation showsthe benefits of our application-aware power managementmechanism. We then evaluate the power-aware resiliencemechanism. We finally spell out our conclusions and futureresearch plans in Section 6.

2. Related Work

Power consumption management of wireless sensor net-works has long attracted the attention of many researchgroups. While many studies have looked into solutions rang-ing from the use of alternative power sources, that is, solarenergy [13], other studies have centered on the design ofpower-aware protocol mechanisms [14, 15]. With the maingoal of improving the overall network operation, fog com-puting has emerged to extend the cloud computing paradigmto the edge of the network [16]. Fog computing has been cre-ated to address, among others, the mobility, geographical,and latency requirements of most IoT applications [17].Due to the requirement when deploying an increasing num-ber of interconnected devices, power management and self-healing mechanisms have become two of the key designparameters of fog computing platforms [18–20]. In [18],the authors have identified the main features of the underly-ing network mechanisms of a fog computing platform,namely, location, distribution, scalability, density of devices,mobility support, real-time, and standardization. Moreover,the network infrastructure in a fog computing platform mustbe autonomous and efficient in terms of the energy consump-tion and network resilience [21].

As for the available communication technologies, theIEEE 802.15.4 ZigBee standard, from now on ZigBee, hasattracted the attention of many designers. Various studieshave shown the benefits of ZigBee in the context of variousSmart City and Smart Farming applications. In [22], theauthors have evaluated the connectivity, packet loss rate,and transmission throughput in an indoor experimental area.A hybrid network approach, ZigBee/5G, has been describedin [23]. The authors have shown the effectiveness of integrat-ing various protocol mechanisms aiming at reducing thepower consumption. On the other hand, the authors from

[24] have evaluated and compared the power consumptionof ZigBee versus the Advanced and Adaptive Network Tech-nology (ANT). According to their analysis, ANT outper-forms ZigBee in terms of the energy consumptionimplemented through a sleep/wake algorithm. However,their study has also revealed that by properly managing theoverall platform, radio, and sensors, the power consumptionreported by the ZigBee systems can be considerably reduced.These results make ZigBee an excellent experimental plat-form to study the benefits of integrating power consumptionmanagement mechanisms. Furthermore, the wider coveragerange of ZigBee makes it an excellent development platformfor the development of Smart City and Smart Farmingapplications.

In a recent work, Piromalis and Arvantis have introduceda scalable hardware architecture for wireless sensor and actu-ator networks to be used in Smart Farming applications [21].While our work follows a similar approach on the design ofthe sensor node platform, our work focuses on the powerconsumption management and network resilience mecha-nisms taking into account the latest trends on the fog com-puting paradigm. That is to say, our approach brings intothe design of the sensor node platforms, some of the majorfeatures of the fog computing paradigm, mainly, geographi-cal location, latency, and power management.

3. Fog Computing: Principles and Technologies

The fog computing paradigm can be simply defined as a nat-ural extension of the cloud computing paradigm. Under thefog computing paradigm, the data processing and user ser-vices are performed by smart devices, called fog nodes,closely located to the end users.

In this context, the fog computing architecture is dividedinto two levels, core and edge [19]. The components andtechnologies of each level are adapted to the services to beprovided by each one of them, see Figure 2. The core com-prises the main computing components of the system, forexample, the main database and broker, among others [18],while the edge level is comprised by other components: wire-less sensor and actuators networks and the fog nodes. Thelatter comprises a local broker, local databases, and a process-ing and visualization server [18, 25, 26]. The fog nodes are incharge of processing the time-sensitive data while making abetter use of the underlying network infrastructure.

In this work, we focus on the edge level of fog computingarchitectures and in particular on the features and operationof each one of the edge elements. In fact, this work contrib-utes on enhancing the intelligence of the network nodesand the autonomy, including the self-healing mechanisms,of the wireless network infrastructure. In order to fully justifyour contribution, we start by briefly describing the main pro-cessing tasks of the two main components of an edge infra-structure: the fog nodes and the wireless sensor network.We will also highlight the features and processes to benefitfrom our proposal.

3.1. Fog Nodes. The fog nodes are the main processing unitslocated closely to the data nodes. They process the data

3Journal of Sensors

Page 4: FROG: A Robust and Green Wireless Sensor Node for Fog ...downloads.hindawi.com/journals/js/2018/3406858.pdfparameters of fog computing platforms [18–20]. In [18], the authors have

captured by the sensor node and are also responsible forfiltering and delivering the relevant data to be stored in thecloud. Their two main tasks can be described as follows:

(i) Complex event processing (CEP). This task refers tothe processing fusion of the data collected by the sen-sor nodes. The main outcome of this task is to notifystakeholders of patterns derived from events of thelower level [25]. Tools, such as Apache Flink, arebeing used as a CEP motor in the fog node for localevents and in the cloud level for general events. Afog node processes the different events based on theinformation extracted from the data collected by thesensor nodes. At the edge level, an initial analysis iscarried out. As the second step, the fog node sendsthe data and events to the core level via the Internetreducing the processing and analysis to be done atthe core level.

(ii) Edge and edge-to-core communications. Fog nodesare in charge of sending (1) local alerts to thesubscribers and (2) the sensed data and events tothe core level via the Internet [26]. Nowadays,many platforms use the MQTT protocol: a light-weight protocol where the devices send (publish)

information with a label (topic) to a server thatworks as a broker. The broker sends informationto all subscribers to the referred topic [19]; thatis, (i) the communication mechanisms are imple-mented in a local broker implemented at the fognode and (ii) a global broker built into the cloudfacilities [26].

3.2. Wireless Sensor Network. In the following examples, webased our design on the ZigBee standard. This standardprovides the following advantages for our proposal: (i) longdistances between sensors because of the low frequency; (ii)a hierarchical topology that can be deployed in environmentswith high dimensions such as a Smart City or Smart Farming;and (iii) a hierarchical definition of the roles played by thevarious node elements enabling the natural interconnectionwith the fog nodes. The three node roles can be simplydescribed as follows:

(i) Coordinator node. Every ZigBee network needs tohave a single coordinator node. This device has thefollowing features whose main functions are net-work initialization, distribution of addresses, andmanagement operations.

Coordinator node

Edge level

Core level

Rounter node

End node

Fog nodesWSNMQTTHTTPS

Cloud

Figure 2: General fog computing architecture.

4 Journal of Sensors

Page 5: FROG: A Robust and Green Wireless Sensor Node for Fog ...downloads.hindawi.com/journals/js/2018/3406858.pdfparameters of fog computing platforms [18–20]. In [18], the authors have

(ii) Router node. Router nodes receive the data packetsgenerated by the sensor nodes and deliver them tothe coordinator node. In order to ensure the reliabledelivery of the data generated by the end nodes,every end node should be able to communicate withat least one router node. In our configuration, therouter node has been implemented using an off-the-shelf hardware platform equipped with varioussensor devices and a long-range RF interface. A cus-tomized programmable on/off switch has beendesigned in order to implement the power manage-ment mechanism. The implementation of this latterswitch was deemed necessary to enable the use ofanalog sensor devices. The routers also implementthe self-healing network mechanism.

(iii) End node. The main mission of an end node isto monitor its environment. An end node alwaysrelies on a router node or coordinator node tomake part of the network. The end nodes have alsobeen implemented using off-the-shelf hardwareplatforms. Similarly to the router nodes, the endnodes also implement the dynamic power manage-ment mechanism.

Based on the above discussion, we will proceed to explainthe twomain contributions of ourproposal, namely, thepowermanagement mechanisms and the self-healing protocol.

4. FROG: A Robust and Green WirelessSensor Platform

In this section, we first introduce the power managementmechanism of our proposal. Our design also includes theimplementation of the required electronics to properly cou-ple the sensor nodes to the platform. In the second part, wedescribe the network resilience-provisioning mechanism.

4.1. Power Management. A large number of works have beenreported in the literature aiming to manage the power con-sumption of sensor nodes. Many of such works have definedmechanisms to turn on/off the radio system, see for instance[27]. Many works were initiated at the time when the sensornodes comprised a limited number of sensors, typically rang-ing between two or three sensors. In the last few years, thenumber of sensors that can be integrated into one node plat-form has considerably increased. The main reason behindthis trend has been motivated by the development of novelapplications in sectors, such as Smart Cities and Smart Farm-ing. This increase has resulted in a higher energy demand topower the onboard processing and monitoring functions [2].Furthermore, the data acquisition requirements, time, anddata amount to be processed, greatly vary from one applica-tion to another.

In this work, we follow the latest trends on developing amultiple-purpose sensor platform capable of dynamicallyadapting its duty cycle to the application [28]. Different fromthe early proposals introduced in the literature, the proposedpower management mechanism consists basically on turningon/off the power to be delivered to the sensors, rather than

dealing with the radio system. This choice has also beenmade taking into account the latest development on lowpower radio transceivers.

In order to illustrate the benefits of the proposed mecha-nism, we will take the case depicted in Figure 3 where wehave plotted the level of CO2 reported by the sensors placedin our premises using three different sampling periods, 5 s,10 s, and 20 s. As seen from Figure 3, the trend of the datais for the most predictable; that is, from the data reportedwith the lowest sampling resolution, we could easily predictother values. We further notice that there are few exceptionswhere there is a significant change on the values reported bythe sensors. Based on the previous analysis and bearing inmind the wide spectrum of applications, including the mon-itoring of sensitive data, we proceed to define a dynamicpower management scheme meeting the requirements of alarge number of potential applications. In other words, thedesign should take into account all the safety requirementsby properly fixing the sampling rate and transmissionperiods. Accordingly, the management mechanism onlyapplies to the sensor nodes; the main controllers shouldalways be powered up. In this way, we should be able to inte-grate into our platform both paradigms: synchronous andasynchronous event scheduling.

In this context, many commercial sensors already countwith the logic to program the on/off periods. For instance,Figure 4 depicts the connection diagram of a digital sensorbased on the well-known I2C protocol. However, the connec-tion of simpler sensor devices require the development of aprogrammable digital switch, see Figure 5.

The switch is simply controlled by the programmablepower management mechanism. The duty cycle is com-manded using the digital signal generated by the mainonboard processor connected to the base of the NPN (nega-tive-positive-negative) transistor Q1. When the pulse is gen-erated, the circuit is activated. The sensors are powered byconnecting the power input of the sensors to the collectorof Q2 and to the common ground, GND. It is important tomention that the collector voltage decreases although transis-tor emitterQ2 is connected to the 5V source. This fact occursbecause when the transistor switches to the onmode, there isa potential drop between the emitter and the collector of Q2whose value is VEC=0.7V approximately. Nevertheless, thesensor operation is not affected by this slight potential drop[29]. In fact, multiple sensors can be connected to the transis-tor collector Q2 and a common ground.

Finally, Figure 6 shows the sensor node platform devel-oped in this work. The same platform may be used to imple-ment the router nodes and end nodes. As for the packaging,we have designed a box facilitating the installation of varioussensors. We have also designed the chambers to store the vol-ume of air required to determine the level of concentrationmeeting the specifications of most gas sensors. Moreover,we have also provisioned the platform with a battery chargerto be integrated with the follow-up of our project.

4.2. Power-AwareNetworkResilienceManagementMechanism.Based on the underlying programmable power manage-ment facility presented in Section 4.1, we developed herein

5Journal of Sensors

Page 6: FROG: A Robust and Green Wireless Sensor Node for Fog ...downloads.hindawi.com/journals/js/2018/3406858.pdfparameters of fog computing platforms [18–20]. In [18], the authors have

a power-aware network-wide resilience mechanism. Themain goal of this latter mechanism is to provide the meansto enhance the robustness of the wireless sensor network.

Figure 7 depicts the general topology of the wireless sen-sor network on which we base the description of our pro-posal. As seen in Figure 7, the network is composed ofthree types of sensor nodes, namely, the coordinator, router,and end nodes. The coordinator node is responsible of ini-tializing the sensor network and ensuring its connectivity tothe fog premises. This type of nodes is normally implementedby a highly reliable node. The other two types of nodes,routers and end nodes, are the subject of our proposal.

Since the router nodes are in charge of forwarding thedata collected by the end nodes and monitoring the environ-ment, it is obvious that they are exposed to higher loaddemands than the ones handled by the end nodes. We thenpropose to replicate the number of router nodes providingservice to a given number of end nodes. At all times and in

order to get the most of the available resources, the routerand end nodes will monitor the environment making use oftheir onboard sensors.

In order to show the benefits and gains in terms of powerconsumption, let us define the following relation assumingthat the sensor nodes are initially fully charged:

Er t = 100 − Kr × t,Ee t = 100 − Ke × t,

1

where Er is the energy level of the router node at time t, Ee isthe energy level of the end node at time t, Kr is the dischargerate as router node, and Ke is the discharge rate as end node.

Since the discharge rate depends on the task performedby the sensor nodes, it is clear that given that a router nodeprovides service to one or more end nodes, the discharge rateof a router node is higher than the discharge rate of an endnode. The relation between the discharge rate of a routernode and an end node can be simply expressed as follows:

Kr = Ke +Ne ×M, 2

where Ne is the number of end nodes connected to therouter node and M denotes the average energy consumedat the router node by each end node connected to it up totime t.

As seen in Figure 7, three sensor nodes may play the roleof router nodes, while six sensor nodes always operate as endnodes. Our goal is to find the number of routers required toguarantee the robustness of the network without leavingout of service any end node. Let us take the following threescenarios. Notice that in our analysis, we do not include theenergy consumed by the router node(s) to serve the six endnodes, since this energy consumption will be the same forall the three scenarios under study.

(i) One router node and two end nodes: only one of thethree sensor nodes located at the group of router/endnodes operates as a router node. The other two end

+5 V

SDA

SCLGND

Figure 4: Physical connection of a digital sensor using the I2Cprotocol.

× 1040.5 1 1.5 20 2.5

t (s)

6

8

10

12

CO2 (

ppm

)

6

8

10

12

CO2 (

ppm

)6

8

10

12

CO2 (

ppm

)

Figure 3: Data traces for CO2 concentration using three different sampling periods, from top to bottom: 5, 10, and 20 seconds.

6 Journal of Sensors

Page 7: FROG: A Robust and Green Wireless Sensor Node for Fog ...downloads.hindawi.com/journals/js/2018/3406858.pdfparameters of fog computing platforms [18–20]. In [18], the authors have

nodes are connected to the active router node. Thepower consumption for this case can be simplystated as follows:

E1 routerlevel 2 t = 100 − Kr × t + 2 × 100 − Ke × t

= 300 − Kr + 2Ke t

3

(ii) Two router nodes and one end node: L of the endnodes located at the group of nodes are connectedto one of the two router nodes, while (8 − L) sensornodes are connected to the second router node.The third sensor node located at the group of therouter/end node is connected to one of the two

active router nodes. The overall energy demandcan be simply expressed as follows:

E2 routerslevel 2 t = 2 × 100 − Kr × t + 100 − Ke × t

= 300 − 2Kr + Ke t4

(iii) Three router nodes: L1 end nodes are connected tothe first router node, L2 to the second router node,and L3 to the third router node. Then, the overallenergy demand is expressed as follows:

E3 routerslevel 2 t = 3 × 100 − Kr × t = 300 − 3Kr t 5

Summarizing, for every possible configuration on the sec-ond level, we have the following power consumption:

(i) One router node + two end nodes = Kr + 2Ke t

(ii) Two router nodes +one end node= 2Kr + Ke t

(iii) Three router nodes = 3Kr t

Since Kr > Ke, we have the following power consumption:

Kr + 2Ke < 2Kr + Ke < 3Kr 6

From (6), it is clear that the use of one router nodeexhibits the best results in terms of the power requirements.The implementation of a lightweight protocol should providethe means to take over the role of the router node by another

Figure 6: FROG node platform.

Digital terminal D4

Digital signal

R2Q1

Q2

2N3904

GND

GND

GND

+5 VMQ135

VCCAoutDout

(NH3) (NOX) sensor

Sound detector

Sound sensor

GND

VCCEnvelGateGateGND

+5 V

+5 V

GND

2N3906R1

1K

1K

R3

1K

Figure 5: Digital on/off switch.

7Journal of Sensors

Page 8: FROG: A Robust and Green Wireless Sensor Node for Fog ...downloads.hindawi.com/journals/js/2018/3406858.pdfparameters of fog computing platforms [18–20]. In [18], the authors have

sensor node located within the coverage range of the currentrouter node.

In order to design and develop the network resiliencealgorithm, we must take into account that the coordinatornode is the one in charge of controlling the network. In orderto take the decision of replacing a router node, we must verifythe status of the batteries of the current sensor node and theone of all those sensor nodes that may take over the routingtask. Algorithm 1 specifies the operation of our network resil-ience mechanism.

One of the main characteristics of our proposal is its sim-plicity. Since the number of sensor nodes involved on therole-changing task is fixed to three sensor nodes, the reliabil-ity of the mechanism is practically guaranteed. In fact, suchconfiguration allows us to schedule maintenance tasks whileensuring the presence of the backup node at all times. That isto say, the sensor node taking over the routing task will be theone in charge of taking over the in-transit traffic ensuringthat no packets get lost. Furthermore, our algorithm preventsthe presence of potential loops involving end nodes androuter/end nodes.

5. Experimental Evaluation

In this section, we start by describing our experimental setup.We first conduct the evaluation of the sensor node platformin terms of onboard power savings, and then, the evaluationof the power-aware network resilience mechanism.

5.1. Experimental Setting. Our experimental setting countedwith the following elements:

(i) FROG platforms. We have assembled nine FROGunits. Each FROG unit comprises a set of sensors

with a total current consumption requirement of475.48mA. We implemented the processor andcommunications platform using an Arduino FioV3 and an XBee-PRO XSC radio system whose cur-rent consumption requirements add up to 266.5mA.

1: procedure BALANCEGAME

2: timeLoop← 13: lookForRouter← FALSE4: whileTRUEdo5: secondLevelDevices← coordinatorDevice.findConnectedDevices()6: indexDevice← 07: forindexDevice< secondLevelDevices.size() do8: device← secondLevelDevices[indexDevice]9: ifdevice.getRole() ==ROUTER-NODE then10 ifdevice.getBatteryLevel() <= 50 then11: device.setRole(END−NODE)12: lookForRouter←TRUE13: end if14: else15: iflookForRouter==TRUEthen16: ifdevice.getBatteryLevel() >= 70 then17: device.setRole(ROUTER−NODE)18: lookForRouter← FALSE19: end if20: end if21: end if22: end for23: sleep(timeLoop)24: end while25: end procedure

Algorithm 1: (Network Resilience Algorithm).

Coordinator node

Router node

End node

Group of router node/end nodes

Xbee mesh network Group of end node

Figure 7: Wireless sensor network topology.

8 Journal of Sensors

Page 9: FROG: A Robust and Green Wireless Sensor Node for Fog ...downloads.hindawi.com/journals/js/2018/3406858.pdfparameters of fog computing platforms [18–20]. In [18], the authors have

The total FROG node consumption is, processorplus sensors, 741.98mA. Following the baselinetopology depicted in Figure 7, we have placed threeFROG platforms within the router/end node sector.Throughout our experiments and based on our pre-vious analysis, we have considered the case whereonly one of the three sensor nodes will act as a routernode at a given time. In the case when the powermanagement mechanism is enabled, the duty cycleis set with an off period of 5 s and an on period of1 s. We have further implemented a coordinatornode using a single-board computer, Raspberry Pi3 Model B. This latter system has been plugged intothe power line. As already mentioned, we will add abattery charger as part of our future plans.

(ii) Batteries. Table 1 summarizes the main characteris-tics of the Li-Po batteries used throughout our trials.

(iii) Voltage level monitoring circuit. An Arduino UNOshield was used to monitor the voltage level of thebatteries during our experiments. In order to be ablemonitor the voltage values in the range of 0 to 5Vusing the 12V batteries, we implemented a voltagedivider consisting of a 2 kΩ resistor and a potenti-ometer, R2, see Figure 8.

Since the battery voltage diminishes during the experi-ments, the setting of the potentiometer had to be adjustedaccordingly. A Matlab script was used to dynamically changethe setting of R2. A second Matlab script was used to monitorand plot the battery voltage as a function of time.

5.2. Onboard Power Consumption Evaluation. In the first setof experiments, we monitored the discharge of the batteriesby first disabling the power management mechanism, andthen enabling the power management mechanism of FROG.We repeated our experiments ten times. It is worth mention-ing that the results were very similar in all ten trials.

Figures 9(a) and 9(b) show the results for both platformconfigurations using Li-Po batteries. In the case when theplatform does not implement the proposed power manage-ment mechanism, the first deep voltage drop is reported after3.5× 104 s from the beginning of the test. As seen inFigure 9(a), the discharge time for this type of battery isapproximately 9× 104 s. This result confirms the theoreticalbound given by the ratio of the battery rate being used,20C, divided by the current consumption of our platform,741.98mA [30]. In our case, this ratio is approximately equalto 9.7× 104 s (26 hours).

Figure 9(b) shows the results for the FROG platform. Asseen from Figure 9(b), the battery voltage slowly diminishesand no deep drop is reported during the evaluation period.These results clearly show the benefits of our proposal. How-ever, we should realize that the optimal setting of the powermanagement mechanism depends on various factors, suchas the sampling rate (latency) of the actual data to be reportedand number of sensors integrated into the platform for agiven target application. Furthermore, the integration ofasynchronous handling of events, such as the CEP to be

integrated into our system, will play a major role on theactual duty cycle and more specifically on the sensors beingpowered during a given period of time. Take for instance,the general case where each sensor may be turned on at dif-ferent time instances and for periods of variable length. Fol-lowing the discussion similar to the one in [30], the powermanagement strategy will prove beneficial if the followingcondition holds for the period of operation of the system, t:

〠n

i=1Pion ⋅ t

ion + 〠

n

i=1Piof f ,on ⋅ t

iof f ,on ≤ 〠

n

i=1Pion ⋅ t, 7

where tion denotes the time during which the sensor, i, ispowered up; the corresponding power consumed by sensori during this period of time by Pi

on, and the cost of the transi-tion and time delay from off to on is expressed by Pi

of f /on and

tiof f /on, respectively. Finally, t denotes the total running time.Our experimental results have shown that considerablepower saving can be achieved by simultaneously turningon/off all the sensor devices. In fact, several of the sensordevices we have used comprise numerous sensors. Fur-thermore, the power consumed during the off/on transi-tion is due to the electronic switch we have developed.We can therefore rewrite (7) to reflect our platform oper-ation as follows:

ton 〠n

i=1Pion + tof f ,on 〠

n

i=1Piof f ,on ≤ 〠

n

i=1Pion ⋅ t 8

As seen from the last expression, the fact of turning on allthe sensors at the same time reduces considerably the powerconsumption. The second term of the left-hand side of (8)only contributes once during a duty cycle.

From the above analysis, it is clear that the proper sched-uling of the data gathering process and setting of the dutycycle play a major role on the power consumption. However,the solution best fitting the needs of a specific application willhave to take into account other requirements, such as thelatency and sampling rate. Furthermore, the implementationof a CEP engine will require the handling of both synchro-nous and asynchronous events.

5.3. Network Resilience Mechanism Evaluation. In this sec-tion, we evaluate the performance, in terms of the energyconsumed, of the FROG platform operating in each one ofthe two roles: router node and end node. In this case, weplaced the nine FROG nodes throughout the hall of our Fac-ulty department. The duty cycle was set with an on period of1 s and an off period of 5 s. All the nodes transmit a packet

Table 1: Technical specifications of the batteries.

Specification Li-Po battery

Nominal voltage 11.1V

Voltage per cell 3.7 V

Number of cells 3

C rate 20C

Capacity 6400mAh

9Journal of Sensors

Page 10: FROG: A Robust and Green Wireless Sensor Node for Fog ...downloads.hindawi.com/journals/js/2018/3406858.pdfparameters of fog computing platforms [18–20]. In [18], the authors have

conveying the data generated by the sixteen sensors: onesample for each one of the nine sensor devices. Similarly tothe previous evaluation trials, we repeated ten times the trialsunder a given setup. At the beginning of each trial, the batterywas replaced by brand new ones.

The experiment ran for a period of 8.5× 104 s(23.61 hours). Figure 10(a) shows the energy consumption

for the end node and Figure 10(b) shows the results for therouter node. As seen from the results, the router node con-sumes much more energy than the end node. We also mon-itored the number of packets having been successfullyreceived. No losses were reported despite the handover per-formed as the battery of the router crosses the thresholddefined in the algorithm. These results confirm once again

× 104

2

4

6

8

10

12

Volta

ge (V

)

92 3 4 5 6 7 810Time (s)

(a) Platform without the power management mechanism

× 10482 3 4 5 6 71 90

Time (s)

2

4

6

8

10

12

Volta

ge (V

)

(b) FROG

Figure 9: Voltage Vs. Time results for the Li-Po battery.

0 1 2 3 4 5 6 7 8 9× 104Time (s)

3456789

101112

Volta

ge (V

)

(a) End node

0 1 2 3 4 5 6 7 8 9Time (s) × 104

3456789

101112

Volta

ge (V

)

(b) Router node

Figure 10: Voltage Vs. Time results for the Li-Po battery.

Batte

ry

12 V

R 1R 2 5 V

GND2K

−+

D0

D1

D2

D3

D4

D5

D6

D7

D0

D1

D2

D3

D4

D5

D6

D7

Arduino

A5

A4

A3

A2

A1

A0

VIN

GN

D1

GN

D2

5 V

3 V

/Res

et

UNO R1/R2 Diecimila Duemilanove

Figure 8: Voltage monitoring circuit.

10 Journal of Sensors

Page 11: FROG: A Robust and Green Wireless Sensor Node for Fog ...downloads.hindawi.com/journals/js/2018/3406858.pdfparameters of fog computing platforms [18–20]. In [18], the authors have

the need to dynamically change the role played by the sensornodes at times, as specified in Algorithm 1, when theyencounter power provisioning problems.

6. Conclusions and Future Plans

In this paper, we have developed FROG: a robust and greenwireless sensor network platform to be integrated into thefog architecture. Our design has been fully justified after areview of the current trends on the use of IoT technology invarious types of Smart City and Smart Farming applications.

We based our design on the use of open software andopen hardware platforms. We therefore made use of someof the facilities and functionalities already available on themarket. We then design and develop a power manage-ment mechanism and a network resilience algorithm. Weshow that the use of a reduced number of sensor nodescapable of acting as a relay or end node as required willprovide the means to considerably improve the networkoperation while lowering the power required for the over-all network operation.

Our immediate research will focus on developing anexperimental platform including Smart City applications.The system will include various end-user services based ona complex event processing (CEP) system and the fog com-puting paradigm. We will also explore the use of softwaredefined networks (SDNs).

Conflicts of Interest

The authors declare that there is no conflict of interestregarding the publication of this article.

Acknowledgments

This work has been partially funded by “Cienciactiva -CONCYTEC” of the Peruvian government, under Grantno. 138-2017-FONDECYT and by the Spanish Ministry ofEconomy and Competitiveness under Grant no. TIN2015-66972-C5-2-R.

References

[1] L. Orozco-Barbosa, F. M. García, A. B. Ramos, and F. M.Riquelme, An Experimental Evaluation of IoT Technologiesin Precision Viticulture, Springer International Publishing,Cham, 2017.

[2] N. Vallina-Rodriguez and J. Crowcroft, “Energy managementtechniques in modern mobile handsets,” IEEE Communica-tions Surveys & Tutorials, vol. 15, no. 1, pp. 179–198, 2013.

[3] A. Kumar, K. Kamal, M. O. Arshad, S. Mathavan, andT. Vadamala, “Smart irrigation using low-cost moisture sen-sors andXBee-based communication,” in IEEEGlobal Human-itarian Technology Conference (GHTC 2014), pp. 333–337, SanJose, CA, USA, 2014.

[4] H.-H. Lin, H.-Y. Tsai, T.-C. Chan et al., “An open-source wire-less mesh networking module for environmental monitoring,”in 2015 IEEE International Instrumentation and MeasurementTechnology Conference (I2MTC) Proceedings, pp. 1002–1007,Pisa, Italy, 2015.

[5] V. Jeličić, T. Ražov, D. Oletić, M. Kuri, and V. Bilas, “Masli-NET: a wireless sensor network based environmental monitor-ing system,” in 2011 Proceedings of the 34th InternationalConvention, MIPRO, pp. 150–155, Opatija, Croatia, 2011.

[6] B. Jolly, A. Willig, A. McDonald, M. Pannell, and G. Plank,“SNOWWEB—wirelessly connected weather stations in Ant-arctica,” in 38th Annual IEEE Conference on Local ComputerNetworks—Workshops, pp. 194–202, Sydney, NSW, Australia,2013.

[7] T. U. Sane, S. L. Shue, and J. M. Conrad, “Implementation ofdynamic source routing using 802.15.4 on XBee series 1 mod-ules,” in SoutheastCon 2015, pp. 1–8, Fort Lauderdale, FL,USA, 2015.

[8] Y. Solahuddin and W. Ismail, “Data fusion for reducing powerconsumption in Arduino-XBee wireless sensor network plat-form,” in 2014 International Conference on Computer andInformation Sciences (ICCOINS), pp. 1–6, Kuala Lumpur,Malaysia, 2014.

[9] F. R. J. López and A. J. López, “Field variables monitoring inreal time (GPS, soil moisture, temperature) with precisionfarming applications,” in EATIS ’12 Proceedings of the 6th EuroAmerican Conference on Telematics and Information Systems,pp. 1–5, Valencia, Spain, 2012.

[10] P. A. L. Besari, M. Abdurohman, and A. Rakhmatsyah, “Appli-cation of M2M to detect the air pollution,” in 2015 3rd Interna-tional Conference on Information and CommunicationTechnology (ICoICT), pp. 304–309, Nusa Dua, Bali, 2015.

[11] M. Noushad, B. Tauheed, S. A. Khan, and M. A. Khan, “Wire-less monitoring of temperature and humidity using sensorarray,” in 2015 Annual IEEE India Conference (INDICON),pp. 1–5, New Delhi, India, 2015.

[12] M. Mitoi, A. Vulpe, R. Craciunescu, G. Suciu, and O. Fratu,“Approaches for environmental monitoring sensor networks,”in 2015 International Symposium on Signals, Circuits and Sys-tems (ISSCS), pp. 1–4, Iasi, Romania, 2015.

[13] W. B. Pramono, P. Setiawan, and Firdaus, “Solar power supplyfor ZigBee wireless sensor network,” in 2016 InternationalSeminaronApplication forTechnologyof InformationandCom-munication (ISemantic), pp. 336–340, Semarang, Indonesia,2016.

[14] T. Matsui and H. Nishi, “ECORS: energy consumption-oriented route selection for wireless sensor network,” in 2016IEEE 14th International Conference on Industrial Informatics(INDIN), pp. 1044–1049, Poitiers, France, 2016.

[15] C. Pérez-Garrido, F. González-Castaño, D. Chaves-Díeguez,and P. Rodríguez-Hernández, “Wireless remote monitoringof toxic gases in shipbuilding,” Sensors, vol. 14, no. 2,pp. 2981–3000, 2014.

[16] F. Bonomi, R. Milito, J. Zhu, and S. Addepalli, “Fog computingand its role in the internet of things,” in MCC ’12 Proceedingsof the First Edition of the MCC Workshop on Mobile CloudComputing, pp. 13–16, New York, NY, USA, 2012.

[17] D. Spirjakin, A. Baranov, A. Karelin, and A. Somov, “Wirelessmulti-sensor gas platform for environmental monitoring,” in2015 IEEE Workshop on Environmental, Energy, and Struc-tural Monitoring Systems (EESMS) Proceedings, pp. 232–237,Trento, Italy, 2015.

[18] A. Al-Fuqaha, M. Guizani, M. Mohammadi, M. Aledhari, andM. Ayyash, “Internet of things: a survey on enabling technolo-gies, protocols, and applications,” IEEE Communications Sur-veys & Tutorials, vol. 17, no. 4, pp. 2347–2376, 2015.

11Journal of Sensors

Page 12: FROG: A Robust and Green Wireless Sensor Node for Fog ...downloads.hindawi.com/journals/js/2018/3406858.pdfparameters of fog computing platforms [18–20]. In [18], the authors have

[19] T. H. Luan, L. Gao, Z. Li, Y. Xiang, G. Wei, and L. Sun,“Fog computing: focusing on mobile users at the edge,”http://arxiv.org/abs/1502.01815.

[20] K. C. Okafor, I. E. Achumba, G. A. Chukwudebe, and G. C.Ononiwu, “Leveraging fog computing for scalable IoT data-center using spine-leaf network topology,” Journal of Electricaland Computer Engineering, vol. 2017, Article ID 2363240, 11pages, 2017.

[21] D. Piromalis and K. Arvanitis, “SensoTube: a scalable hard-ware design architecture for wireless sensors and actuatorsnetworks nodes in the agricultural domain,” Sensors, vol. 16,no. 8, p. 1227, 2016.

[22] J.-S. Lee and Y.-M.Wang, “Experimental evaluation of ZigBee-based wireless networks in indoor environments,” Journal ofEngineering, vol. 2013, Article ID 286367, 9 pages, 2013.

[23] J. Mu, “An improved AODV routing for the ZigBee heteroge-neous networks in 5G environment,” Ad Hoc Networks,vol. 58, pp. 13–24, 2017.

[24] S. Gharghan, R. Nordin, and M. Ismail, “An ultra-low powerwireless sensor network for bicycle torque performance mea-surements,” Sensors, vol. 15, no. 5, pp. 11741–11768, 2015.

[25] M. B. A. P. Madumal, D. A. S. Atukorale, and T. M. H. A.Usoof, “Adaptive event tree-based hybrid CEP computationalmodel for fog computing architecture,” in 2016 SixteenthInternational Conference on Advances in ICT for EmergingRegions (ICTer), pp. 5–12, Negombo, Sri Lanka, 2016.

[26] A.Garcia-de-Prado,G.Ortiz, and J. Boubeta-Puig, “COLLECT:COLLaborativE ConText-aware service oriented architecturefor intelligent decision-making in the internet of things,”ExpertSystems with Applications, vol. 85, pp. 231–248, 2017.

[27] P. Díaz, F. Royo, T. Olivares, F. Ramirez-Mireles, andL. Orozco-Barbosa, “A case study on the power-aware proto-col framework for wireless sensor networks,” InternationalJournal of Distributed Sensor Networks, vol. 9, no. 12, ArticleID 718252, 2013.

[28] U. Raza, A. Camerra, A. L. Murphy, T. Palpanas, and G. P.Picco, “Practical data prediction for real-world wireless sensornetworks,” IEEE Transactions on Knowledge and Data Engi-neering, vol. 27, no. 8, pp. 2231–2244, 2015.

[29] R. L. Boylestad and L. Nashelsky, Electronic Devices and Cir-cuit Theory, Prentice-Hall, Inc., Upper Saddle River, NJ,USA, 11th edition, 2013.

[30] W. Dargie, “Dynamic power management in wireless sensornetworks: state-of-the-art,” IEEE Sensors Journal, vol. 12,no. 5, pp. 1518–1528, 2012.

12 Journal of Sensors

Page 13: FROG: A Robust and Green Wireless Sensor Node for Fog ...downloads.hindawi.com/journals/js/2018/3406858.pdfparameters of fog computing platforms [18–20]. In [18], the authors have

International Journal of

AerospaceEngineeringHindawiwww.hindawi.com Volume 2018

RoboticsJournal of

Hindawiwww.hindawi.com Volume 2018

Hindawiwww.hindawi.com Volume 2018

Active and Passive Electronic Components

VLSI Design

Hindawiwww.hindawi.com Volume 2018

Hindawiwww.hindawi.com Volume 2018

Shock and Vibration

Hindawiwww.hindawi.com Volume 2018

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawiwww.hindawi.com Volume 2018

Hindawiwww.hindawi.com Volume 2018

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawiwww.hindawi.com

Volume 2018

Hindawi Publishing Corporation http://www.hindawi.com Volume 2013Hindawiwww.hindawi.com

The Scientific World Journal

Volume 2018

Control Scienceand Engineering

Journal of

Hindawiwww.hindawi.com Volume 2018

Hindawiwww.hindawi.com

Journal ofEngineeringVolume 2018

SensorsJournal of

Hindawiwww.hindawi.com Volume 2018

International Journal of

RotatingMachinery

Hindawiwww.hindawi.com Volume 2018

Modelling &Simulationin EngineeringHindawiwww.hindawi.com Volume 2018

Hindawiwww.hindawi.com Volume 2018

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawiwww.hindawi.com Volume 2018

Hindawiwww.hindawi.com Volume 2018

Navigation and Observation

International Journal of

Hindawi

www.hindawi.com Volume 2018

Advances in

Multimedia

Submit your manuscripts atwww.hindawi.com