development of an iot environmental monitoring application with … · 2017-11-30 · iot...

4
Development of an IoT Environmental Monitoring Application with a Novel Middleware for Resource Constrained Devices Salvatore Gaglio, Giuseppe Lo Re, Gloria Martorella, Daniele Peri, and Salvatore Davide Vassallo University of Palermo Viale delle Scienze, ed. 6 – 90128 Palermo, Italy {salvatore.gaglio, giuseppe.lore, gloria.martorella, daniele.peri, salvatore__davide.vassallo}@unipa.it Abstract. In this paper the development of a Mobile Health monitoring system is described. The system combines user location data with air quality information provided by a heterogeneous sens- ing infrastructure providing users with advises about their daily exposure to air pollutants. The highly dynamic integration of different kind of nodes, mostly characterized by rather constrained resources, of this application is crucial to implement the Internet of Things vision, and requires powerful and effective programming methodologies to abstract implementation of high-level dis- tributed processing from hardware dependencies. We then describe our programming methodology and our novel middleware supporting distributed applications on constrained devices. Our devel- opment approach is based on distributed symbolic processing through executable code exchange among nodes, and permits to extend the capabilities of nodes even after their deployment. Keywords: Mobile-Health, Air Quality, Middleware, Symbolic Processing 1 Introduction With the recent technological advances in wireless technologies and the growing popularity of com- puting devices, information processing has become ubiquitous and part of everyday activities. Com- mon objects, such as cars, electrical appliances, toys, and clothes can be fitted with microproces- sors, sensors and communication devices that allow them to be interconnected and interact with each other, offering a whole range of fascinating possi- bilities culminating in the vision of the “Internet of Things” (IoT) [2]. The pervasive nature of in- terconnected and collaborating devices of the In- ternet of Things has a direct application also to the medical field. Popular devices like smartphones and sensing systems can be connected to create an ubiquitous infrastructure that provides accessibil- ity to health care services and information in or- der to improve individuals’ quality of life. This new way to provide health services is also referred to as “Mobile-Health” [12]. Mobile-Health can be thus considered the result of the convergence of wireless communication systems, wireless sensor networks and ubiquitous computing technologies to provide healthcare services. Following our previous research, in which we de- signed an application [7] able to give individuals indications about their daily exposure to air pollu- tion, we present a much wider project that requires integration and interoperability of different net- works such as mobile sensor networks and WSNs. In this paper we describe the implementation of an IoT Mobile-Health application using a novel mid- dleware that we designed to permit high-level sym- bolic programming even on resource constrained devices. The remainder of the paper is organized as follows. In section 2, we give an overview about air pollution monitoring in the context of Mobile- Health. In section 3, we discuss the architecture of our urban air quality monitoring system. Our de- velopment methodology is described in section 4, along with our novel middleware and its use in the implementation of the air quality monitoring sys- tem. Then, section 5 reports our conclusions. 2 Air Quality Monitoring Air pollution in large urban areas may have a sig- nificant impact on human health and on the envi- ronment. Urban air quality is usually monitored by highly reliable networks of fixed stations. A fixed monitoring station can accurately measure a wide range of pollutants. However, permanent monitor- ing stations are frequently placed so as to mea- sure ambient background concentrations or at po- tential hotspot locations, and they are usually sev- eral kilometers apart. Urban pollution varies spa- tially, as it is reasonable to expect, accordingly to human activities, topography, and local microme- teorology. The large cost of acquisition and main- tenance of governative air quality monitoring sta- tions limits the number of such facilities, resulting in a non-scalability of the system and in an ex- tremely limited spatial resolution of the pollution

Upload: others

Post on 14-Apr-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Development of an IoT Environmental Monitoring Applicationwith a Novel Middleware for Resource Constrained Devices

Salvatore Gaglio, Giuseppe Lo Re, Gloria Martorella, Daniele Peri, and Salvatore Davide Vassallo

University of PalermoViale delle Scienze, ed. 6 – 90128 Palermo, Italy

{salvatore.gaglio, giuseppe.lore, gloria.martorella, daniele.peri,salvatore__davide.vassallo}@unipa.it

Abstract. In this paper the development of a Mobile Health monitoring system is described. Thesystem combines user location data with air quality information provided by a heterogeneous sens-ing infrastructure providing users with advises about their daily exposure to air pollutants. Thehighly dynamic integration of different kind of nodes, mostly characterized by rather constrainedresources, of this application is crucial to implement the Internet of Things vision, and requirespowerful and effective programming methodologies to abstract implementation of high-level dis-tributed processing from hardware dependencies. We then describe our programming methodologyand our novel middleware supporting distributed applications on constrained devices. Our devel-opment approach is based on distributed symbolic processing through executable code exchangeamong nodes, and permits to extend the capabilities of nodes even after their deployment.

Keywords: Mobile-Health, Air Quality, Middleware, Symbolic Processing

1 Introduction

With the recent technological advances in wirelesstechnologies and the growing popularity of com-puting devices, information processing has becomeubiquitous and part of everyday activities. Com-mon objects, such as cars, electrical appliances,toys, and clothes can be fitted with microproces-sors, sensors and communication devices that allowthem to be interconnected and interact with eachother, offering a whole range of fascinating possi-bilities culminating in the vision of the “Internetof Things” (IoT) [2]. The pervasive nature of in-terconnected and collaborating devices of the In-ternet of Things has a direct application also tothe medical field. Popular devices like smartphonesand sensing systems can be connected to create anubiquitous infrastructure that provides accessibil-ity to health care services and information in or-der to improve individuals’ quality of life. This newway to provide health services is also referred toas “Mobile-Health” [12]. Mobile-Health can be thusconsidered the result of the convergence of wirelesscommunication systems, wireless sensor networksand ubiquitous computing technologies to providehealthcare services.

Following our previous research, in which we de-signed an application [7] able to give individualsindications about their daily exposure to air pollu-tion, we present a much wider project that requiresintegration and interoperability of different net-works such as mobile sensor networks and WSNs.In this paper we describe the implementation of an

IoT Mobile-Health application using a novel mid-dleware that we designed to permit high-level sym-bolic programming even on resource constraineddevices. The remainder of the paper is organizedas follows. In section 2, we give an overview aboutair pollution monitoring in the context of Mobile-Health. In section 3, we discuss the architecture ofour urban air quality monitoring system. Our de-velopment methodology is described in section 4,along with our novel middleware and its use in theimplementation of the air quality monitoring sys-tem. Then, section 5 reports our conclusions.

2 Air Quality Monitoring

Air pollution in large urban areas may have a sig-nificant impact on human health and on the envi-ronment. Urban air quality is usually monitored byhighly reliable networks of fixed stations. A fixedmonitoring station can accurately measure a widerange of pollutants. However, permanent monitor-ing stations are frequently placed so as to mea-sure ambient background concentrations or at po-tential hotspot locations, and they are usually sev-eral kilometers apart. Urban pollution varies spa-tially, as it is reasonable to expect, accordingly tohuman activities, topography, and local microme-teorology. The large cost of acquisition and main-tenance of governative air quality monitoring sta-tions limits the number of such facilities, resultingin a non-scalability of the system and in an ex-tremely limited spatial resolution of the pollution

2

maps. To overcome these problems it is necessary toadopt more pervasive monitoring systems. A con-siderable number of projects are described in lit-erature that use low cost sensing devices carriedby people or by mobile vehicles [8] for sensing airpollutants. In [10] authors show an environmentalsensing approach that empowers citizens to rein-vigorate their awareness of, and concern for, pol-lution. ExposureSense [11] is a rich mobile partici-patory sensing infrastructure able to monitor peo-ple’s daily activities as well as to compute a rea-sonable estimation of pollution exposure in theirdaily life. In [9] authors demonstrate the usability ofthe CalFit smartphone technology to track person-level time, geographic location, and physical activ-ity patterns for improved air pollution exposure as-sessment. In [13] authors introduce a cloud-basedknowledge discovery system that infers real-time,fine-grained air quality information throughout acity on the basis of the air quality data reportedby existing monitor stations and a variety of datacollected in the urban area, such as meteorology,traffic flow, human mobility, structure of road net-works, and points of interests. The system offers amobile client, with which a user can monitor the airquality of multiple locations in a city. In [7] we pre-sented an Android application providing users withair quality data. Exploiting smart-phones capabili-ties, our application implements an ubiquitous andunobtrusive monitoring system able to inform usersabout their daily air pollution exposure by combin-ing user location data and urban air quality infor-mation provided by the network of fixed monitoringstations.

3 Designing an Urban Air QualityMonitoring System

In order to deploy a scalable and high-density airquality monitoring system with fine spatial andtemporal scales, we propose an efficient and scalableplatform that enables users to monitor their dailyexposure to air pollutants by combining user lo-cation data and urban air quality information pro-vided by a heterogeneous sensing infrastructure. Asshown in Figure 1, our system is composed by mo-bile and fixed sensor nodes integrating the exist-ing network of fixed stations. The sensor readingsare transmitted to a back-end server that storesgathered data, ensuring their integrity, security andavailability, and provides those data for several ser-vices. Exploiting low cost sensors pervasiveness andvehicles mobility, the system covers all the city areaand collects detailed urban air quality data, offer-ing a wide spatial coverage, and a fine granularityof the detected characteristics. The sensors periodi-cally monitor the air quality and transmit, through

PALERMO

Fig. 1. System architecture of the air quality monitor-ing application. The system is composed of heteroge-neous sensing devices that measure several pollutantsin the air, some access points, and a monitoring serverthat answers to queries about the air quality data frommobile clients.

some gateways, the collected data to a central stor-age system in which data are processed and madeavailable to queries from mobile devices. Users canuse their mobile clients to monitor the air qual-ity of multiple locations in the area, for exampleto decide where and when to go jogging. The col-lected data can also help point out specific causesof air pollution. The system models the daily in-dividual exposure to air pollutant by tagging andmonitoring users’ movements through smartphoneGPS data [7]. By combining context-aware infor-mation, given by users’ smartphones, and urbanair pollution levels provided by the sensing layer,the system can give an estimation of the amountof air pollutants inhaled during the day. Differ-ently from mainstream approaches, in which thesensor nodes are programmed conventionally, theproposed Mobile-Health platform is developed us-ing a symbolic programming methodology and anovel middleware that we designed to program ho-mogeneously heterogeneous nodes. Although thisapproach fosters high-level representation of the ap-plication tasks, the computation is effective evenon resource constrained sensing devices. Our plat-form makes the nodes able to directly exchange exe-cutable code and supports interactive programmingwith iterative refinement of code even on a deployednetwork [3]. The network may thus acquire new ca-pabilities at runtime. This versatility has been al-ready proven in AmI applications [4, 5] and can beeffective in other highly dynamic IoT scenarios, in-cluding Mobile-Health.

3

4 The Proposed Approach

The paradigm adopted to program the devicescomposing the sensing infrastructure of a Mobile-Health application, is often a disregarded aspectwhen compared to data acquisition and data anal-ysis. In fact, the design of large-scale distributedapplications, such as the air quality monitoring de-scribed in section 3, requires to interconnect hetero-geneous cooperating devices. This compels the ap-plication designers to cope with the essential char-acteristics of networked objects that differ in archi-tecture, capabilities, protocols, data representation,and so on. Our middleware platform [6, 1] addressesthis troublesome task by providing high level ab-straction tools to reduce the burden of designingand implementing applications that run on arbi-trary devices. Our platform permits to:

– program the sensing infrastructure layer of aMobile-Health application through a high-levelsymbolic approach;

– expand the platform itself in order to supporta wide range of services and applications;

– re-program the nodes even after their deploy-ment.

Our middleware is built atop a Forth interactiveenvironment, permitting the designer to developapplications by expanding the language itself withhigh-level words. The programs executed by eachof the node of the sensing infrastructure are thussequence of words that can be chosen to map con-cisely high-level concept, somewhat approximat-ing natural language descriptions of the tasks tobe performed. This programming approach basedon symbolic computation encourages the designof application-specific languages, and permits toprogram heterogeneous objects uniformly. Treat-ing knowledge elements, both data or code, at asymbolic level, grants interoperability among col-laborative objects since the same high-level codecan be implemented on different devices, with min-imal hardware dependency. As an example, nodesand stations, which are sensing devices with differ-ent architectures and resource availability, acquire asample of carbon monoxide, by executing the samecommand:

CO sample

Low-level implementation details, for instance con-cerning the sensor hardware specifications, are thushidden inside the definitions of high-level words. Asa result, already deployed sensor nodes, as well asfixed monitoring stations, expose their knowledgeto the other nodes with the same symbolic rep-resentation. The interactions occurring in complexdistributed applications take place in terms of sym-bols exchanged between the entities of the infras-tructure layer –i.e. stations and nodes. Having an

CO sample threshold > [if] alarm [then]

CO sample threshold > [if] alarm [then]

Fig. 2. The middleware allows nodes and stations toexchange executable code. Through a Forth environ-ment executed by the nodes, it is possible to interpretmessages incoming from the radio. Therefore, reactivebehaviors can be easily implemented. In this example,a station tells the network to acquire a sample of car-bone monoxide and to send an alarm if the CO sampleexceeds a predefined threshold.

on-board interpreter, fixed stations and already de-ployed nodes can thus exchange symbolic programsthat are executed once received as radio input.

This approach makes the middleware dictionaryable to be incrementally extended by defining newwords on the basis of already defined words. Newimplementations of protocols and communicationrequirements needed by large distributed applica-tions as well as security protocols can be easilyadded. Furthermore, such peculiarity can be ex-ploited equally by heterogeneous objects. A mon-itoring station can force a certain behavior on al-ready deployed nodes, for instance to tell a node tosend an alarm when the level of a certain pollutantovercomes a specified threshold (Figure 2) as wellas to provide further abilities to a node. A simplerule implementing such behavior would be:

CO sample threshold > [if] alarm [then]

The alarm word defines the actions to be taken incase the event occurs.

Other formalism can be added whenever the ap-plication requires them, even at runtime. We havealready shown hot to extend our middleware withFuzzy Logic expressions and rules [4]. Moreover,the deployment of new devices or their replacementcan be done without programming the nodes in ad-vance, while updating the software application canbe done on already deployed nodes. On the otherhand, sensor nodes can be made to perform moreadvanced collaborative computations than sheersensing of pollutant agents. Through the exchangeof code, sensor nodes can even perform on-boardair quality data fusion and aggregation tasks withhigh-level symbolic implementations. Symbolic rea-soning can be carried out to infer collateral informa-tion in a distributed fashion, such as the identifica-

4

tion of nodes’ relative position or their membershipin a partition of the network according to sensorreadings [4], when needed. Although we are dealingwith high-level behaviors, the efficiency of the im-plementation is not lessened as words are actuallycompiled to run directly on the target hardware.For exceptionally time-critical tasks code may alsobe written using the on-line assembler.

Our middleware has been experimented on theIris Mote platform that required us to implementhardware-dependent words to deal with specificsubsystems such as the radio transceiver, the on-board sensors, and the expansion boards. However,to make it run on other embedded devices, just athin abstraction layer is required to comply withthe target hardware platform.

Due to the symbolic approach, hardware-abstracted words are not affected by the target plat-form above which they run. According to their fi-nality, words are grouped into wordsets [3] that canbe loaded only when needed.

The high-level symbolic programming and thereal-time execution of incoming messages allowsfor the efficient extension of the middleware. Thismeans that more efficient routing, communicationand security protocols, as well as high-level dataanalysis and processing methods can be uploadedto the nodes effortlessly at any time. IoT applica-tions may thus benefit from this approach in termsof code reusability and ease of maintenance, andfrom the versatility it offers. Further services as re-sult of market investigations and of user reviews canbe offered to users just by expanding the softwareinfrastructure capability at runtime.

5 Conclusions

We described the architecture and the developmentof a Mobile-Health system that enables users tomonitor their daily exposure to air pollutant bycombining their location data with urban air qual-ity data coming from several sources.

We showed how our development methodologybased on high-level programming and symbolic pro-cessing can address some important issues arisingwhen heterogeneous devices, often characterized byconstrained resources, are requested to cooperate,which is a crucial feature of IoT applications.

We then presented our novel middleware plat-form that supports our methodology and enablesthe implementation of high-level data analysis anddata processing efficiently on resource constraineddevices.

References

1. Distributed Computing for Resource Constrained

Devices (DC4CD) (2014), http://www.dicgim.unipa.it/networks/ndslab/rl_dc4cd.php

2. Atzori, L., Iera, A., Morabito, G.: The Internet ofThings: a Survey. Computer networks 54(15), 2787–2805 (2010)

3. Gaglio, S., Lo Re, G., Martorella, G., Peri, D.: AFast and Interactive Approach to Application De-velopment on Wireless Sensor and Actuator Net-works. In: Accepted at The 19th IEEE Interna-tional Conference on Emerging Technologies andFactory Automation (ETFA’2014) (2014)

4. Gaglio, S., Lo Re, G., Martorella, G., Peri, D.:High-level Programming and Symbolic Reasoningon IoT Resource Constrained Devices. In: Acceptedat The First International Conference on CognitiveInternet of Things Technologies (COIOTE 2014)(2014)

5. Gaglio, S., Lo Re, G., Martorella, G., Peri, D.: Pro-gramming Distributed Applications with SymbolicReasoning on WSNs. In: Accepted at InternationalConference on Computing, Networking and Com-munications (CNC2015) (2014)

6. Gaglio, S., Re, G.L., Martorella, G., Peri, D.:A Lightweight Middleware Platform for Dis-tributed Computing on Wireless Sensor Networks. Procedia Computer Science 32(0), 908 –913 (2014), http://www.sciencedirect.com/science/article/pii/S1877050914007108, the5th International Conference on Ambient Systems,Networks and Technologies (ANT-2014), the 4thInternational Conference on Sustainable EnergyInformation Technology (SEIT-2014)

7. Lo Re, G., Peri, D., Vassallo, S.D.: A Mobile Ap-plication for Assessment of Air Pollution Expo-sure. In: Mobile and Information Technologies inMedicine and Health 2013 (2013)

8. Lo Re, G., Peri, D., Vassallo, S.D.: Urban Air Qual-ity Monitoring Using Vehicular Sensor Networks.In: Advances onto the Internet of Things, pp. 311–323. Springer (2014)

9. de Nazelle, A., Seto, E., Donaire-Gonzalez, D.,Mendez, M., Matamala, J., Nieuwenhuijsen, M.J.,Jerrett, M.: Improving Estimates of Air PollutionExposure through Ubiquitous Sensing Technolo-gies. Environmental Pollution 176, 92–99 (2013)

10. Peterová, R., Hybler, J.: Do-it-yourself Environ-mental Sensing. Procedia Computer Science 7, 303–304 (2011)

11. Predic, B., Yan, Z., Eberle, J., Stojanovic, D.,Aberer, K.: Exposuresense: Integrating daily ac-tivities with air quality using mobile participatorysensing. In: Pervasive Computing and Communi-cations Workshops (PERCOM Workshops), 2013IEEE International Conference on. pp. 303–305.IEEE (2013)

12. Varshney, U.: Pervasive Healthcare Computing:EMR/EHR, Wireless and Health Monitoring.Springer (2009)

13. Zheng, Y., Chen, X., Jin, Q., Chen, Y., Qu, X.,Liu, X., Chang, E., Ma, W.Y., Rui, Y., Sun, W.:A Cloud-Based Knowledge Discovery System forMonitoring Fine-Grained Air Quality. Tech. rep.,MSR-TR-2014-40 (2014)