APPENDIX A Related Publication The paper published at the 8th IEEE International Conference on Mobile Ad-hoc and Sensor Systems (IEEE MASS 2011) appears below. This paper was presented by the author of this Master Thesis in the conference that was held in Valencia, in October 2011.
Dynamic and Heterogeneous Wireless Sensor Networks for Virtual Instrumentation Services: Application to Perishable Goods Surveillance T. Seco, J. Berm´ udez, J. Paniagua Grupo de Investigaci´ on Aplicada (GIA-MDPI) Instituto Tecnol´ ogico de Arag´ on Zaragoza, Spain Email: {tseco, jbermudez, jpaniagua}@ita.es J.A. Castellanos Instituto de Investigaci´ on en Ingenier´ ıa de Arag´ on Universidad de Zaragoza, Spain Email:
[email protected] Abstract—Wireless sensor networks (WSNs) have gained an increasing interest in logistic applications. In this paper, we propose a universal hardware and software architecture to measure environmental variables in a dynamic heterogeneous plug-and-play WSN. In this framework the physical structure of the WSN is automatically and transparently generated from the final user. Each node of the WSN communicates through a middle level configurable service-oriented layer. Composition of these services defines high-level virtual instruments for the final user. The proposed WSN is able to configure dynamically these virtual links to achieve the user requirements. The reported strategy is aimed at giving support to collaborative systems, e.g. stock management, intelligent machinery, etc, performing their commanded tasks within indoor environments. To demonstrate the applicability of the proposed method, the paper presents a particular implementation of the described architecture in an intelligent transportation system where both surveillance and control tasks of perishable goods are required. Keywords-Wireless sensor network (WSN), Service-Oriented Architecture (SOA), Internet of Things (IoT), Intelligent Transportation System (ITS), Perishable Goods Surveillance I. INTRODUCTION The increasing and rapid development of wireless sensor networks has facilitated their application in different fields such as environmental surveillance, healthcare monitoring, home automation, logistics, etc. However, sensor network architectures are tailored to specific applications and in most cases are device dependent. According to the Internet of Things vision (IoT) [2], the majority of the devices will have communication and computation capabilities, which will be used to connect, interact, and cooperate with their surrounding environment. Service Oriented Architecture (SOA) is a distributed computing paradigm in which business functionality is provided by autonomous systems called services, which are exposed in a network infrastructure through well-defined interfaces. The proposed architecture intends to reproduce the architectural concepts and information exchanges of regular SOA implementations in a heterogeneous and dynamic wireless sensor network. The idea behind this architecture is to turn all the sensor nodes into reusable resources and to enable distributed cooperation between them via auto-configuration features. [5] proposes a design methodology that relies on service-oriented architecture for the WSN use. The system should include a service discovery protocol. [6] presents a light-weight Service Discovery protocol (nanoSD) and its integration into a health care application with heterogeneous network architecture. The services composition plays an important role in systems which intend to work with heterogeneous devices formed with clusters of sensors - what we call virtual instruments. In [7] it is proposed a Dynamic Cluster Formation (DCF) algorithm which dynamically groups a set of sensor nodes into a logical cluster-based sensor processing unit, in which each participant member plays different roles to achieve efficient collaboration. The proposed architecture tries to offer an automatic and transparent process for the generation and composition of services, making the handle of these services easier by means of some templates through which the user can query a particular service. The ability to configure dynamically the links for obtaining the user-defined service is one of the main contribution of this paper. This service framework provides the necessary abstraction layer for the integration of each virtual instrument as a device in the world of Internet of Things. In order to show the usability of our method, we have implemented this architecture in a real scenario for the perishable food surveillance. The suitability of WSN for food transport monitoring has been demonstrated in other works: In [1] it has been deployed mobile WSN in a cargo container on a trans-Atlantic cargo vessel as well as on a lorry to monitor the transport conditions inside the container. In [8] the use of two types of wireless nodes for monitoring storage and transport was experimentally assessed. This paper is structured in five sections: section I is the introduction to the scope of this paper. Section II describes the proposed architecture and the services composition for virtual instruments is shown in section III. In section IV it is 2011 Eighth IEEE International Conference on Mobile Ad-Hoc and Sensor Systems 978-0-7695-4469-4/11 $26.00 © 2011 IEEE DOI 10.1109/MASS.2011.99 849
presented an application of this model to perishable goods surveillance. Finally, conclusions are given in section V. II. ARCHITECTURE DESCRIPTION The main goal of the proposed architecture is to accomplish a universal platform which permits plug&play sensor nodes connection to the network by means of which it is possible to create different services for measurement purposes. This system, based on wireless sensor networks, is comprised of three elements: the sensor nodes, the master node and the control centre. The sensor node is the network entity in charge of the data acquisition of the sensor or sensors connected to the node. It includes communication capabilities used to send the information both to other sensor nodes and to the master node. The master node is the main network node and its main functionalities are forming and maintaining the network and recognizing the sensor nodes present in the network and the services provided from them through a plug&play mechanism. The master node can communicate with other distributed master nodes and with the control centre which is in charge of gathering all the information, so that it can be accessed by other high level networks (IoT). With all the information about the wireless sensor network, the user can ask for a high-level service that could involve heterogeneous devices present in the network. In order to respond to this query it is necessary the existence of a services composition method. To understand the proposed composition of services we need to identify some concepts: Homogeneous sensor Array (HoS) is defined as the entity which provides a homogeneous measure. This measure value is obtained from a set of sensors which return the same physical (temperature, humidity, light sensor) or logical (RFID, presence) magnitude. The association of different homogeneous sensors is what we call heterogeneous sensor array (HeS) or virtual instrument (VI). (Figure 1) Figure 1. Diagram Service The criteria followed to make these associations are explained in more detail in the next section. There is a singular node for every requested service, either for proximity to the master node or because it is a special type of sensor needed for that service. This special node, named sub-master, is chosen by the master as the main node of the virtual instrument. The main task of the sub-master is to coordinate the rest of the sensors that form the virtual instrument. This sensor node plays the role of service master for the required service. Considering the features and requirements of the system, wireless sensor networks (WSNs) have been selected as the best option to integrate all components because of their easiness of use, low-cost and low power consumption. In the proposed architecture it is necessary that the sensor nodes are able to directly communicate among them, in order to create the necessary associations that make possible to form the virtual instruments. For this reason the standard chosen is the IEEE 802.15.4 (level 2 in the OSI model), which enables point-to-point communication and does not imply the existence of a network coordinator, as happened with standard Zigbee (level 3 and uppers in the OSI model). Consequently, a mesh topology has been implemented for the WSN. The band frequency used is the 2.40-2.48GHz band (16 channels and 250 Kb/s bit rate). For communication between the master node and the control centre it is possible to use different type networks like GPRS, UMTS, WLAN, etc. III. SOA MODEL FOR VIRTUAL INSTRUMENTATION SERVICES The SOA-based architecture proposed involves two main stages: services and devices discovery through a plug&play mechanism and the composition of services to form virtual instruments services. The initial scenario consists of an array of sensor nodes with different environmental and logical sensors attached and a master node. In a first step, the sensor nodes and their services are discovered through the implemented plug & play protocol, and all this information is gathered and available first in the master node and then in the control centre. At a second stage, the user defines the required high level service through the control centre and the master node makes a query to the network for this service; at this moment the proposed services composition comes into play. In the next subsections both the plug & play architecture and the services composition method will be described. A. Plug-and-Play Architecture This feature allows users to know the capabilities of the nodes in the network. For this purpose, each sensor node contains information about its main features organized in different data structure levels: •Data Level 0: sensor intrinsic parameters like type of measurement, sensing unit, sensing range, sensitivity, offset, calibration information, etc. •Data level 1: unique node identification (nID), list of sensors attached to the node, topological location of the node (locID), etc 850
•Data level 2: description of available services, events information (event list, type of event, thresholds, etc.) and communication message formats for interfaces. These data structures provide the nodes with the ability to self-describe their features and available services so that the users have the knowledge required to interact with them. All these structured data are assigned to the sensor node in an initial configuration process not described in this paper. A future work would be to make an automated auto-configuration process possible through the use of welldefined standards. Figure 2. Plug & play mechanism Figure 2 shows the proposed plug & play mechanism. To access sensor networks in plug and play manner, new sensor nodes need to be discovered by users through the master node (and the control centre). Our developed protocol allows available sensor nodes to be registered to the master node. If new sensor nodes are joined to a sensor network, they send an ”alive” message to the master node. This message includes the node identification and the network address. The master node maintains a list of node identifications which refers to discovered sensor nodes. This dynamic table is continuously updated by means of ”whoIsAlive” messages that master node sends periodically to the network. Following this process a second phase starts through which the master node retrieves the data from the discovered sensor nodes. For this purpose, a query message ”getSensorConfig” is sent to each node alive in the network. When a sensor node receives this query, the response is built based on the information contained in the data structure and returned to the master node. This initial information includes some parameters from data structured level 1, like the list of sensors with their types or topological location, and some others from level 2, like the list of available services for each sensor attached to the node. At this point, the necessary information for creating virtual instruments is available in the network and it is possible to afford the stage of service composition. The next section describes the proposed strategy for this purpose. B. Composition of services The goal of this strategy is to provide the high-level services requested by the user in a transparent manner. Given a collection of heterogeneous sensors we can define a rearrangement of the items according to the user preferences and the available resources. Each user-defined service is formed by one or more groups of homogeneous measures (HoS). The association among homogenous sensors of the same family is done taking into account both user requirements (topological location, number of measures, statistical treatment, spatial dispersion of the sensors, etc.) and system resources (available sensors). The service resulting from this association is the measurement service (MS). The association of different homogeneous measures forms the virtual instrument. The way for describing the virtual instrument is a service request based on a flexible template. This request includes all the topology of the HoS Arrays and the configuration requirements in the form of configuration parameters which are explained in the next subsections. The matching between the user requirements and available resources is measured by the Quality of Service Index (QoS). This index is an indicator of quality intended to be a measure of the distance from the required service to its actual deployment. Therefore, a value with a timestamp and this index is given as the result of this query services process. 1) Configuration of a Homogenous Sensor Array: The data type MS (Measurement Service) is obtained with: MS = V t QoSMS =f(FS, N, ST, locID, BH, σS, T rig)(1) where •V: Value of the measure. •t: Timestamp. •QoSMS: Quality of service index. The calculation of this index is done with the equation: QoSMS = 1 −N−m N(2) where mis the number of selected nodes that meet the condition specified by the spatial dispersion parameter σS. •Sensor’s Family (FS): Variable that determines the class of the magnitude measured by the sensor (Temperature, HR, etc). •Number of Measures (N): Number of sensors of the family. •Statistical Treatment (ST): Statistical function to deal with the homogenous array of measures. (Mean, Median, Maximum, etc.). •Topological Location Identification (locID): An ID number which links the sensor with a topological 851
Table I MEASUREMENT SERVICE PARAMETERS FS N ST locID BH σSTrig Temperature 10 Mean Indoor onTrigger [5,15] Yes ( LIGHT sensor) Relative Humidity 10 Median Room 4onEvent [1,10] Yes (alarm temperature) Light 5 On-off Room 5onAlarm [5,15] No RFID code 1 Value Zone RFID inWindow [1,5] No Volume 1 Value Zone RFID outWindow [1,5] Yes (from RFID detector) location. This parameter is associated to the sensor node in the initial stage of configuration. •Behavior (BH): It describes the situation or event that generates a response from the set of N sensors. (on Alarm, on Event, etc.). •Spatial Dispersion (σS): Integer and dimensionless dispersion unity describing the dispersion of homogeneous sensors referenced to the sub-master of the service. This parameter is used to select the nodes which are going to be involved in a particular service requested by the user, assuming a homogeneous distribution of sensors. This value for node sensor i is estimated by: σSi = floor 255 −RSSIsm,i 25.5+Nh 1 n n X j 255 −RSSIsm,j 25.5+ 0.5 (3) where: –RSSIsm,i: Received Signal Strength Indicator of the last received RF data packet in dBm. Zero value corresponds to the maximum coverage of the network. The RSSI indicator is used for distance estimation [3] with the advantages of not being necessary additional hardware and no impact in power consumption, sensor size and thus cost. –n: number of nodes directly connected to the submaster (without multi-hops). –Nh: number of hops for the sensor node when there is no direct connection with the sub-master. The maximum value of the spatial dispersion depends on the distribution of nodes over the considered area. A result between 0 and 10 indicates that most of the sensors are in direct communication with the submaster. •Trigger Input (Trig): Origin of a trigger signal (if triggered). Table I shows examples of parameters for the Measurement Service function. The process to choose the set of sensors that forms the MS is carried out by selecting a number of N sensors among the available ones with the same family, locId and trigger as the required by the user, and with a spatial dispersion value within the range requested by the user. 2) Configuration of a Virtual Instrument: The virtual instrument service (VS) is obtained with: V S = LV t LQoS =fMS1:MS2···MSn, ffusion, BHV I (4) where: •LV : Value or list of values of the virtual instrument. •t: Timestamp. •LQoS: List of the QoS indexes of the individual measurement services. This information is useful for identifying the measurement service responsible for not fulfilling the user requirements. Additionally, a global index is provided to the user: QoSV S = n P 1 QoSMSi n(5) •MSi: Collection of measurement services. •Heterogeneous Association Function (ffusion): Defines the composition function among the heterogeneous measures. It configures the result of the Virtual Instrument as a list of values or a single value estimated by using a fusion algorithm [4]. •Behavior (BHV I ): Describes the event that generates a response from the VI. (Alarm, Window, Event,etc) IV. APPLICATION TO PERISHABLE GOODS SURVEILLANCE To validate the applicability of the proposed method, we present a particular implementation of the described architecture in an intelligent transportation system setting where both surveillance and control tasks of perishable goods are required, (Figure 3). Perishable goods decay rapidly and must be therefore transported by highly efficient distribution channels that can retain the integrity of the product. The objective of the experimental application of this architecture is to control the biological degradation process of perishable foods by means of the measurement of some critical parameters during transportation: •Temperature: brief interruptions in the control of the cold chain can result in an immediate deterioration of product quality. •Light intensity: this value is checked with the aperture of the door, and therefore with exposure to external agent •Humidity: to detect leaks of water in the product. •Vibrations: this parameter affects the quality of some vegetables. To measure these magnitudes the sensor nodes have been distributed inside the truck container. Besides, two more sensors have been added to the system: a RFID reader sensor 852
Figure 3. Scenario for perishable goods surveillance for identification of the packages and a 3D volume sensor for the measurement of the occupancy level of the load. A. Hardware description In this particular application, the hardware of the sensor nodes consists of Waspmote boards battery powered with a ATmega1281 microprocessor and an XBee Pro radio module [9]. These sensor nodes are responsible for the acquisition of the environmental values: temperature, humidity, light intensity and vibrations (through 3-axis accelerometer). For RFID and volume sensor an embedded target with Intel Atom processor has been selected with an XBee Pro module adapter for radio communication. The master node has been implemented over a PC based target with a Waspmote gateway. This platform includes other types of communications like Ethernet, Wi-Fi and USB, which enable messages exchange with the control centre or with other master nodes. As a result of the implemented plug-and-play protocol with node and service discovery, both an available service list from sensor nodes and their capabilities are automatically detected and stored by the master node. At this point, the user is provided with all the information to request a particular service based on a template. Next subsections describe examples of the network application. B. Services composition examples Example 1: ”Temperature alarm when the load temperature exceeds 5 degrees Celsius” The parameters selected by the user for this service are: •Sensor magnitude: Temperature •Number of sensors needed : 4 along the container •Spatial dispersion: along the container, not at a point. •Event type: Alarm •Threshold: 5C The master node checks the feasibility of the service and then the automatic service composition starts with the selection of the sub-master node. In this particular case, Table II EXAMPLE 1 TEMPERATURE ALARM Param MS1 VS FS Temperature N (R/S) 4/3 ST Mean Value LocID Zone 1 BH onAlarm (T>5C) onAlarm (T>5C) σS[5,15] Trigg No RESULT V 5.5C 5.5C t 6:20:34 6:20:34 QoS 0.75 0.75 the sensor node nearest to the master node is selected and responsible for the service. The localization of this node is obtained through the RSSI (Received Signal Strength Indication) value between both the master node and the sensor node. Table II shows the parameters for the composition of this service and the results for that query (RESULT). The statistical function chosen is mean value of all of measurements and the locID Zone 1 refers to inside the container. In this case, it is desired that the nodes chosen to form the virtual instrument are homogeneously distributed along the container. The parameter N (R/S) shows the required number of sensors versus the number of selected sensors which satisfy the spatial dispersion condition. The format for time parameter t is hh:mm:ss. In this case the BH of the virtual instrument is onAlarm. Example 2: ”Conditions of the load during the transport: temperature, vibrations, luminosity and humidity” The goal of this service is to obtain in a periodically manner the conditions of the goods under surveillance. For this purpose, the parameters selected by the user are: •Sensor magnitudes: Temperature, vibration, luminosity and humidity •Number of sensors needed: 4 temperature, 3 vibrations, 853
Table III EXAMPLE 2 CONDITIONS OF THE LOAD DURING THE TRANSPORT Param MS1 MS2 MS3 MS4 VS FS Temperature Vibrations Luminosity Relative Humidity MS1,MS2 MS3,MS4 N (R/S) 4/3 3/3 2/2 4/2 ST Mean Max of period Mean Mean ff: List of values LocID Zone 1 Zone 1 Zone 1 Zone 1 BH onPeriod(20 min) onPeriod(20 min) onPeriod(20 min) onPeriod(20 min) onPeriod(30 min) σS[5,15] [5,15] [5,15] [5,15] Trigg Clock in node Clock in node Clock in node Clock in node RESULT V/LV 25 0,9 g 50 lux 60% {25, 0.9, 50, 60} t 6:20:00 6:20:00 6:20:00 6:20:00 6:30:00 QoS 0.75 1 1 0.5 0.81 2 luminosity and 4 HR. •Spatial dispersion: along the container, not at a point. •Event type: Every 30 minutes As in the first example, the master node checks the feasibility of the service and then the automatic services composition initiates the selection of the sub-master node. The sensor node nearest to the master node is selected as responsible for the service. In this case there is a HoS Array for each magnitude and the association between them forms the virtual instrument. Table III shows the chosen parameters for this query service and the result of that query (RESULT). The BH for the virtual instruments is onPeriod with period of 30 minutes for this example. V. CONCLUSIONS AND FUTURE WORK In this paper we have presented a distributed measurement system capable of providing heterogeneous and configurable services to the user in a transparent way. The system solves the restrictions of the wireless sensor network adding an abstraction layer through the application of SOA concepts, what makes the integration of this WSN in the internet of things world easier. It has been described the main features of the architecture, like the plug & play behavior that permits the discovery of the network nodes and their services in an automatic way, and the services composition that allows for the generation of virtual instruments through the homogeneous sensor association. It has been proposed a formulation to obtain the service requested by the user, who is provided with some templates that the system uses in order to automatically create the necessary links in a transparent manner and return the result of this query with a quality service index. Finally, in order to demonstrate the validation of this system, the proposed method has been applied to the surveillance of perishable goods with some examples of query services. As future work and continuation lines, a greater emphasis will be given to the services composition algorithms with more exhaustive tests of dynamic nodes (on and off nodes). The fusion algorithms used to obtain the homogeneous and heterogeneous measurement is also a future challenge. Another important challenge is the independency of the system from a specific platform. This goal could be obtained through the use of the standard TEDs (transducer electronic data sheets) in target devices which allow a precise identification of the network nodes. The influence of the proposed architecture in the energy consumption of the sensor nodes and the possible overhead added to the communication will be evaluated in future works. ACKNOWLEDGMENT This work has been carried out within the framework of the project TSI-020410-2009-26, partly financed by the Spanish Ministry of Industry, Turism and Commerce (Plan Avanza 2, 2008-2011), and it has been supported by the Grupo de Investigaci´ on Aplicada (GIA-MDPI) from Instituto Tecnol´ ogico de Arag´ on. REFERENCES [1] M. Becker, B.-L. Wenning,C. Grg, R. Jedermann, A. Timm- Giel, Logistic applications with Wireless Sensor Networks. In: Proc. of HotEmNets 2010. 2010 [2] D. Guinard, S. Karnouskos, V. Trifa, B. Dober, P. Spiess, D. Savio, Interacting with the SOA-based Internet of Things: Discovery, Query, Selection, and On-Demand Provisioning of Web Services, IEEE Transactions on Services Computing, vol. 3, no. 3, pp. 223 235, 2010. [3] G. Mao, B Fidan, B.D.O. Anderson, Wireless sensor networks localization techniques, Computer Networks 51 (2007) 2529- 2553 [4] P.S. Maybeck, Stochastic Models, Estimation and Control Volume 1, ISBN-10: 0124807011, June, 1979. [5] E. Meshkova, J. Riihijarvi, F. Oldewurtel, C. Jardak, P. Mahonen, Service-Oriented Design Methodology for Wireless Sensor Networks: A View through Case Studies, IEEE International Conference on Sensor Networks, Ubiquitous and Trustworthy Computing, 2008. SUTC ’08. , Taichung, 11-13 June 2008 [6] A. Kovacevic, J. Ansari, P. M¨ ah¨ onen, Demo Abstract: Discovering Services in Mobile, Flexible and Heterogeneous Wireless Sensor Networks, International Conference on Information Processing in Sensor Networks, 2009. IPSN 2009., San Francisco, CA, 13-16 April 2009 [7] C-Y. Shih, S.F. Jenks, A Dynamic Cluster Formation Algorithm for Collaborative Information Processing in Wireless Sensor Networks, 3rd International Conference on Intelligent Sensors, Sensor Networks and Information, 2007. ISSNIP 2007, Melbourne, Qld. 3-6 Dec. 2007 [8] L. Ruiz-Garcia, P.Barreiro, J.I. Robla, Wireless Sensor Networks Study for Real-Time Fruit Logistics Monitoring, AgEng2008. International Conference on Agricultural Engineering & Industry Exhibition [9] Waspmote, http://www.libelium.com/products/waspmote 854