# The Author 2008. Published by Oxford University Press on behalf of The British Computer Society. All rights reserved.
Advance Access publication on July 16, 2008
For Permissions, please email:
[email protected] doi:10.1093/comjnl/bxn036
Integrating Wireless Sensors and RFID Tags into Energy-Efficient and Dynamic Context Networks TOMA´ S S A´NCHEZ LO´ PEZ1,*, D AEYOUNG K IM 1, GONZALO HUERTA CANEPA2
AND
KOUDJO KOUMADI 2
1
AutoID Lab Korea, Information and Communications University (ICU), 119 Munjiro, Yuseong-gu, Daejeon, South Korea 2 Engineering School, Information and Communications University (ICU), 119 Munjiro, Yuseong-gu, Daejeon, South Korea *Corresponding author:
[email protected] Context-aware systems have traditionally used distributed sensors to gather context information. The unique identity provided by radio frequency identification (RFID) tags could provide additional information to the sensor data. However, the task of matching identity and sensor information in the same context is not trivial. By placing wireless sensor nodes in the same RFID tagged objects, we can build distributed wireless networks that collaborate to produce uniquely identified context. In this paper, we introduce a set of network protocols that dictate the formation of contextspecific wireless sensor networks (WSNs). One of the main goals of our protocols is to maintain an energy-efficient WSN, in which network members can join and leave the network in a dynamic, transparent way. Simulations show that our design provides important improvements in network lifetime and that it is specially suited for dynamic environments. Additionally, we describe our implementation experience and provide a set of tools for creating and evaluating our application. Keywords: RFID; wireless sensor networks; pervasive; energy-efficient; network protocol; integration Received 10 September 2007; revised 25 June 2008
1. INTRODUCTION Ubiquitous computing was first envisioned in the late 80s at the Xerox Palo Alto Research Center by a team of visionaries leaded by Weiser [1,2]. As Weiser himself states in his famous position paper. The computer of the 21st century [2], ‘The most profound technologies are those that disappear [. . .]. The real power of the concept comes not from any one of these devices – it emerges from the interaction of all of them’. Indeed, the pervasive devices capture the information, but it is the merging and interpretation of that information that drives the engine of the ubiquitous computing era. This interpreted information is called context, and the computing systems that use it to produce automatic services to the users are called context-aware systems. The initial concept of ubiquitous computing has evolved in many ways after almost 20 years of research. The development of better wireless communication systems and integrated circuitry has created new technologies to collect and manage the information. But as Weiser noted, the disappearing computing is more than the devices that physically constitute it.
With more and better pervasive computing units that provide data in a variety of ways, present researchers realize the importance of the models that interpret the big streams of information. Thus the future of ubiquitous computing lies in finding efficient ways of obtaining meaningful context data and channeling it for the benefit of the system users. Radio frequency identification (RFID) and wireless sensor networks (WSNs) are gaining special attention for their promising applications in the area of ubiquitous computing. On the one hand, RFID tags are finally becoming mature enough for their widespread deployment. On the other hand, WSN are now on the verge of producing practical applications, not only for industrial use, but also to support peoples’ everyday life. RFID technology is already a de-facto standard in wireless electronic identification whose main applications reside in integrating RFID chips into real-world objects. Visioned as a substitute for the bar code, RFID systems are responsible for the new advances in supply chain management that promise to reduce costs while augmenting the visibility of the traded goods throughout their life cycle. RFID tag standards are
THE COMPUTER JOURNAL, Vol. 52 No. 2, 2009
ENERGY-EFFICIENT WSN/RFID INTEGRATION specified in a variety of classes featuring different capabilities. Those proven to be the most relevant until now are the so-called passive tags, which lack battery and are instead powered by reader devices situated at close range. WSNs are networks of small, cost-effective devices that can cooperate to gather environment information via simple integrated sensors. Sensor nodes are low-power, low-memory and low-range wireless devices that can operate at various radio frequencies. Additionally, sensor nodes may include simple actuators or may be attached to more complex ones. WSNs are gaining popularity for their social implications through concepts such as ‘Smart Home’, ‘Smart Room’ or, in general, ‘Smart Spaces’. These concepts involve sensor networks that gather users’ context, which means circumstances or conditions that surround users’ behavior and that affect their actions. Services are then offered to the context source, which often involve automatic actions that the user may desire in a particular situation. Many of the advocates of Smart Spaces through sensor networks (and specially WSN), picture a future of ‘ubiquitous’ (anywhere at any time) sensor and actuator networks, referring to infrastructures such as houses, farms or cities. However, we believe that the meaning of ‘ubiquitous’ should not just be restricted to the act of placing sensor devices everywhere, but rather to make those WSNs also part of the real-world objects. In the same way as RFID technology aims to provide object information (simple identification) transparent to the user, wireless sensor devices installed in those same objects could augment their information in a similar transparent way. Merging RFID and sensor networks into the same objects would result in truly ‘smart’ mobile objects that provide their sensed context with a unique identification number. Furthermore, if at some point in time several objects start producing information that could contribute to the same context, they could interact and decide to produce joint information under a single identification. We call this process association or grouping. In our work, we research the challenges that arise from merging RFID and WSN for their use in Smart Spaces. We have designed a framework that considers all the processes involving users receiving services according to their context. This includes RFID tag memory design, WSN association protocols, routing and addressing schemes, RFID sensor – actuator data integration and management, service definition and delivery, context and service matching, distributed middleware, etc. Additionally, we also consider the best ways for integrating our ideas with existing infrastructures, and we provide implementation scenarios that prove our concepts. In this paper, we will detail one of the key contributions of our research: how the interaction of pervasive devices at a low level can produce more accurate context and, thus, greatly benefit the ubiquitous computing systems. The rest of the paper is organized as follows: Section 2 compares our work with other related work in the area. Section 3
241
overviews the system architecture and specifies our interest for the discussion. Section 4 details the main association protocols. Section 5 proposes a mathematical model for the protocol’s energy consumption. Section 6 describes our experience building and utilizing our network simulator. Finally Section 7 details our development tools and the implementation of our protocols into real sensor nodes and Section 8 concludes the paper.
2.
RELATED WORK
Our research presents a unique mixture of technologies and thus is related with a wide variety of works. † Smart environments and context-aware services: Our architecture participates in the Smart Space concept by providing information that is specific to the user’s context, both in space and time. According to this context, the user is offered a selection of services in a dynamic, transparent way. † RFID and WSN integration: Not only the context is produced using both RFID and WSN technologies, but this context data is stored, organized and mined using RFID’s unique identifiers and the wireless sensor nodes’ sensor types. Services, databases and network protocols must seamlessly integrate both information sources in order to operate. † Self-organization and Self-configuration of WSNs: Accurate context is obtained by forming dynamic networks of RFID tags and wireless sensor nodes. Networks are built as clusters that change with time and environmental conditions, and the protocols governing the network formation provide automatic election of cluster heads (CHs), network identifiers and node addresses. 2.1.
Smart environments and context-aware services
In traditional Smart Spaces, context information is usually obtained through sensors located at the edge of the system, observing the user [3 – 6]. In this approach, the user and the context are decoupled in the sense that the main source of information is not from the user’s point of view, but from the system’s point of view. This means that all the decision power is put on the system side, as the context information about a user is limited to external sensing and making adequate decisions with this limited information. In our work, part of the decision power is placed on the user side, whose responsibility is to gather the context information only from relevant sources. This simplifies the service provider’s task, but increases the complexity on the user side which has to deal with entity associations and information updates. Most importantly, this new concept of active users entails great benefits by providing first-hand context data which is very hard to obtain with traditional approaches.
THE COMPUTER JOURNAL, Vol. 52 No. 2, 2009
T. SA´NCHEZ LO´PEZ et al.
242
There exist some works in the area that attempt to provide first-hand information in a similar way to our work. In [7], users are augmented with portable devices and sensors, but the service infrastructure is non-existent, making a truly distributed system impossible. Other works such as [8] build agents representing the sources of context and perform groupings of related agents. However, entities with various capabilities should communicate with the system independently, which makes the architecture inflexible and unscalable. Projects such as [9, 10] focus on augmenting everyday objects in the same way we do. However, they lack a general infrastructure to provide spontaneous services which follow the independence pattern that our work follows. 2.2.
RFID and WSN integration
To our knowledge, there are very few attempts to integrate RFID and sensor networks, and none of them embeds both technologies inside mobile entities and uses the standard RFID infrastructure to enhance the Smart Spaces services. There is a stream of research whose efforts are focused on integrating WSN and RFID readers. In [11], for example, where a Smart Museum concept is implemented, WSN nodes are only used to relay RFID codes of users that are navigating the museum space. In [12], authors use WSN and RFID readers to read and relay RFID codes, to provide a healthcare application for the elderly. Finally, [13] also integrates RFID readers in sensor nodes, but only intends, from a user’s point of view, to extend the range of the RFID system. Regarding other areas of research where WSN and RFID are studied together, generally RFID is considered as an information supplement with no integration with sensor data. In the HiFi architecture [14], for example, WSN and RFID networks are both described as data sources. A system is proposed in which a database-like query language is executed at several levels of the network, filtering, aggregating and refining data streams. However, although the authors assure that the proposed strategy can easily support the merger of RFID and sensor data, there is no actual description on how this integration occurs or how accurate the result would be. In [15], various ways of integrating WSN and RFID systems are proposed. In their work, the authors imagine smart sensor nodes and sensor tags, and how their vision could benefit data integration. Overall, their work does not provide protocols, implementations or simulations of any kind. Several architectures have been specified which consider smart objects that may contain RFID and sensor data. The work done at the PROMISE [16] and ELIMA [17] projects defines embedded devices attached to various products that collect data and store it in infrastructure databases. Although, in this sense, their work is similar to ours, there is little interest in forming dynamic mobile networks with such smart objects. In [18], authors consider a WSN in their extension to the EPCglobal Network, which would provide a framework for sensor
and RFID integration similar to our goals. Nevertheless, their work is preliminary and does not offer details on how WSN would fit on the RFID protocols. On another related area, works such as [19 – 21] provide designs for the inclusion of sensors into either passive or battery assisted passive RFID tags. However, their designs stop at the hardware level, without describing how the proposed design could be used to empower an RFID-sensor integrated infrastructure. Finally, there are some examples on demonstrators that include both RFID and WSN technologies. The work developed at LandMARC for the US Navy [22], for example, includes a scenario in which containers with highvalue assets, such as aircraft parts, are monitored with RFID sensor tags. HP [23] developed a system in which server racks are identified with RFID tags and their temperature is monitored. However, although these projects show promising interest by industry on integrating sensor and RFID information, they are just made-to-measure designs with no real architecture. 2.3.
Self-organization and self-configuration of WSNs
Traditional WSN architectures are centralized and static. A central base station (BS) collects the data from a number of nodes whose location and role in the routing protocols do not change. The expectation of using WSN in uncontrolled and dynamic environments such as the battlefield, natural disaster locations or remote geographical areas gave birth to new research directions in which sensor nodes have to selforganize and self-configure to form a network. In many cases, topology construction is done as a byproduct of routing, a process in which sensor nodes try to discover paths that allow them to communicate with the BS or other nodes [24, 25]. The self-organizing medium access control for sensor (SMACS) networks, developed by Sohrabi et al. [26], however, provides a fully distributed mechanism in which nodes discover their neighbors and form locally independent subnets that, eventually, will merge in a connected network. Unlike routing-oriented topologies, SMACS forms a flat network at the MAC level and uses multiple frequencies for collision avoidance. One of the most popular ways to support self-organization in WSN is clustering. In clustering, a few nodes, called CHs, are elected as representatives in order to route the traffic originated in the network. Many protocols for clustering in WSN have been developed over the years, focused on various design criteria and objectives. Some protocols, for example, cluster nodes according to their location [27, 28], which assumes every node has a global positioning system (GPS) receiver or a similar way to obtain their position. Other proposals just select random CHs, hoping that this will balance the load among all the nodes of the network [29, 30]. Another criteria is to choose CHs according to the number of neighbors. This scheme attempts to balance the cluster sizes and hence
THE COMPUTER JOURNAL, Vol. 52 No. 2, 2009
ENERGY-EFFICIENT WSN/RFID INTEGRATION the load of the CH [31, 32]. Another common strategy is to shape the network topology by controlling the node redundancy. On these types of protocols, some nodes will sleep while others are actively communicating. Redundancy may be evaluated in terms of node density (activate enough nodes so the connectivity in the network is maintained) or sensing range (activate the minimum number of nodes that cover the sensing of a given phenomena in a certain area) [27, 33]. Although the number of clustering protocols for WSN is big, only some of them consider the case of dynamic and heterogeneous networks, where clusters and cluster-heads are varied along the lifetime of the network. In the following paragraphs we discuss the state-of-the-art in this area and compare it in more detail with our work. As it will be shown with more detail in Section 4, the assumptions of the protocols that build the wireless networks of our framework are quite different from most of the existing WSNs research. The most noticeable differences are the following: † Node deployment: It is generally assumed that large networks of sensor nodes are deployed in a certain area and that they start operation once the deployment has been performed. Our nodes, however, start operation alone or in small groups, and networks are meant to reach relatively small numbers during the operation time. † Mobility: Although mobility is a popular topic in recent WSN research, it is usually focused on mobile sinks and data buffering, either on nodes that wait for a data collector device or on the data collector devices themselves while they are moving. Even if mobile sensor nodes are considered, they always move on a fixed deployment area as described before. Our node’s mobility, however, is based on groups of nodes that navigate the user space, adding and removing nodes from the network. † Base station: All the existing work in WSN assumes a data sink where the sensor data from the network is sent. The BS is, many times, used to centralize not only the network data gathering, but also the network control. In our framework, however, the gateway of the mobile network resembles more a CH than a BS, since the gateway role rotates among all the nodes, taking into account the node’s capabilities. † Network topology: Generally, sensor nodes are deployed without the sense of belonging to any topology or group. Topologies are then constructed, such as trees, clusters or just flat configurations. Even if the topology is computed off-line and before deployment, the starting assumption is always a set of independent nodes. In our framework, however, Smart Space entities (described in Section 4.1) provide physical groups of nodes which shape the topology of the network beforehand. One of the main objectives of our work is to provide energy-efficient and dynamic protocols that will support the
243
constrained WSN embedded devices. Although this goal is very common among the WSN research, the difference of assumptions that our work presents makes the comparison with other protocols difficult. Nevertheless, in what follows we compare the aspects that we consider most important about the energy-efficiency and the dynamics of our framework’s wireless networks with other proposals. Since most of our efforts focus on the election of the CH that will serve as the nodes’ gateway, these proposals deal with clustering in WSN. We would like to note that we excluded those works that: † are centralized, since our framework’s network nodes do not consider a static gateway. † need to provide the network nodes with localization information, since such an assumption is not applicable to the type of network that we are considering. † are focused on the election of a domination set or on redundancy elimination, since the number of nodes per cluster is predetermined in our Smart Space entities and hence is not a concern for us. We divide the properties that we would like to compare in two sets, with respect to their relation with energy-efficiency or network dynamics. We would like to emphasize that this comparison does not pretend to be an exhaustive listing of properties, but just those aspect that we consider most important. Our final goal is to prove that no existing work integrates all the qualities that are necessary for the type of dynamic and energy-efficient networks that we are considering. The studied properties are the following: † Energy-efficiency (i) Variable CH period: If the time a certain node is to be CH is variable or static. (ii) CH election according to node conditions: If a node is elected according to its own conditions. We list the type of condition. (iii) Heterogeneous nodes: If nodes are assumed to have equal capabilities. (iv) CH election complexity: An estimation of the complexity to elect a new CH. † Dynamics (i) Mobility: If node mobility is supported. (ii) Synchronization: If the nodes need synchronization for either electing the CH or operating inside the cluster. (iii) Global cluster information: If the cluster nodes need to store information about all the cluster members in order to perform the CH election or to operate. We are conscious that some of the properties overlap between the two groups. Specially, properties (i) and (ii) from the energy-efficient group may seem more related with the dynamics group. However, since, in our framework’s networks, these properties are directly influenced by the residual energy of the nodes, we decided to place them in the first group.
THE COMPUTER JOURNAL, Vol. 52 No. 2, 2009
244
T. SA´NCHEZ LO´PEZ et al.
Table 1 shows a summary of our comparison. Low-energy adaptive clustering hierarchy (LEACH) [34] heads the table as the most influential protocol in the literature. In LEACH, every node chooses a random number between 0 and 1. If that number is smaller than a certain threshold T, the node elects itself as a CH. LEACH is organized in equal length rounds, in which the previously mentioned mechanism is repeated. The periodic selection aims to distribute the burden of being a CH, but it is inefficient because it assumes that all the nodes consume energy in the same way. Although an attempt is done to consider the node’s energy a part of the threshold, the computation of this value requires a global knowledge of the network’s average residual energy. Several of the other presented protocols are modifications of LEACH that aim to increase its energy-efficiency. The protocol presented by Liang and Yu [35], for example, introduces an energy factor on the threshold value that does not need any global knowledge. Energy-efficient clustering scheme [36] elects candidate CHs the same way LEACH does, and then chooses the one with highest residual energy among those situated inside a certain radius. However both proposals bear similar disadvantages regarding node heterogeneity and periodic round time. Energy-driven adaptive clustering (EDAC) [37] also uses the LEACH strategy to generate an initial set of CHs. However, CHs are then rotated according to a threshold function calculated according to the node’s residual energy. Also the node with the highest remaining energy is elected as the new CH. Hybrid energy-efficient distributed clustering (HEED) [38], distributed mobility-adaptive clustering (DMAC) [39] and GEodeic sensor clustering (GESC) [40] also choose their CHs according to the node conditions and consider heterogeneous networks. Among them, only HEED uses specifically node residual energy as the base condition. On the other hand, DMAC employs node’s weight: an abstract value that could be associated with a variable such as residual energy. GESC, however, determines if a node will be selected as a CH according to its ‘significance’, which is a value computed according to the node’s contribution on relaying messages to the sink. None of these protocols, however, consider variable CH periods. There are several observations that we can draw from our comparison. First, only EDAC considers variable representation periods, but only DMAC considers node mobility in its protocols. We can also see that the CH election complexity is similar in all the compared protocols. But, perhaps, the most important observation is that all the analyzed works need to store some degree of global cluster information on their cluster nodes. For example, LEACH, and all the protocols that derive from it, need to synchronize their communication with the CH, which can only be done by knowing all the cluster members. EDAC, which bears similar properties as WISSE in terms of variable CH period, needs to store and update in the CH the residual energy values of all the cluster members in order to choose a successor. Every node in
GESC needs to store a graph of all the cluster member in order to elect the CH. In HEED, every sensor node needs also to store a list of ‘candidate’ CHs every time that a cluster election is triggered. Finally DMAC also needs every node to hold a list of all the cluster members’ IDs and their weights. In our work, however, cluster members only need to know the ID of the CH, and the CH does not need to store any information about the nodes from the cluster. According to this and the previously mentioned observations, our final conclusion is that there is no single existing work that has all the properties that we deem necessary for our framework’s networks.
3.
WIRELESS SENSORS AND RFID FOR SMART ENVIRONMENTS
In our work, we design an integration scenario in which mobile objects and users, carrying RFID tags and WSN, receive ubiquitous services according to their identity and real-time sensor/actuator information. We call this framework (Wireless Sensors and RFID for Smart Environments) WISSE. The main characteristic of WISSE is an early integration of identification and sensor/actuator information at a low level, as well as a distributed infrastructure that allows the tracking of the context in a real-time manner. In this way, we aim to address two typical problems of RFID –WSN integration and Smart Spaces: First, the early merger of RFID and WSN information helps reduce the ambiguity problem during the context interpretation. This ambiguity appears when sensor and ID information coming from separate sources need to be fused in a meaningful manner for a proper interpretation. Secondly, the distributed infrastructure extends the service operation beyond the local spaces to which traditional context-aware frameworks are confined. The WISSE framework defines a layered architecture from the service receivers to the service providers and the logic for automatic, meaningful service delivery. The main components of the architecture are as follows: † Context layer: contains the objects carrying the RFID/ WSN and the users they belong to. These objects, which we call entities, are the source of the context and may associate, forming groups of meaningful information. Examples of entities are clothes, documentation tokens, electronic devices, vehicle parts, tableware, etc. † Service layer: contains service providers registered to the WISSE network. Service providers specify the requirements, in terms of sensors and actuators, that clients must meet in order to be eligible to receive their services. Additionally, service providers hold the logic and processing power needed for executing the services they offer, as well as a standard way of specifying how the clients should access their services.
THE COMPUTER JOURNAL, Vol. 52 No. 2, 2009
ENERGY-EFFICIENT WSN/RFID INTEGRATION
245
TABLE 1. Comparison or relevant clustering techniques. Protocol
Variable CH period Conditioned election Heterogeneity Complexity
LEACH No Liang et al. No EECS No EDAC Yes HEED No DMAC No GESC No Ours Yes
None Energy ProbþEnergy Energy Energy Weight Significance Energy
No No No Yes Yes Yes Yes Yes
O(n) O(n) O(n) O(n) Nit * O(n)a O(dþ1)b O(n * u) þ O(n)c O(n)
Mobility Synchronization Global information No No No No No Yes No Yes
Yes Yes Yes Yes No No No No
Yes Yes Yes Yes Yes Yes Yes No
a
Nit is the number of iterations defined beforehand; bu is the number of edges of the graph formed by the cluster nodes; cd is the distance of the furthest node.
† Service network edge: provides the means for matching the context of the entities in the context layer and the service requirements from the service layer. Since the entities are mobile, their associations are spontaneous and temporal, which results in a very dynamic context. Furthermore, those entities may be anywhere and anytime showing the need for a distributed infrastructure that connects clients and servers while tracking their context and requirements, respectively. The service network edge provides the means for receiving, storing and matching user and service information in a distributed, real-time manner. Figure 1 depicts the WISSE framework through an example. From the bottom, the context layer holds several entities such as clothes, furniture and personal identification cards. Three entities associate around a user creating the grouped entity ‘businessman’, which will immediately begin to produce joint context information. When associating, the entities (a smart phone, a shirt and a digital ID card) choose a common identification (the ID card) and a representative (the smart phone) for transmitting their context to the WISSE service network edge. As an example scenario, consider the following situation: While going back home after work, the user’s shirt temperature and humidity sensor detects an increase in body due to an unusual warm day. Together with the location provided by his phone’s GPS and identity from his ID card, this information is transmitted to the system by a CDMA link. The service network edge recalls that this user also hired a home-network actuation service, and together with the user’s context information, triggers a remote actuation command to turn on the businessman’s home air conditioning system before he arrives home. As this scenario shows, WISSE users profit from services delivered directly according to their context. If, as in many traditional approaches, temperature values would have been obtained through sensors located on the edge of the system (i.e. sensors at the user’s home), then the services would have been delivered according to the Smart Space context and not
to the user context. By introducing the WISSE framework, we want to overcome these type of limitations. In this paper, we analyze in detail a part of the WISSE framework, the context layer, where all the interactions among mobile entities occurs. In the context layer, entities associate and form groups that provide information about a common context. This context is relevant to users that are related to the entities, so the more accurate the information provided is, the better the services the users will receive. In order to perform appropriate associations, entities must discern which groups they should join and assign association priorities according to their own preferences. Furthermore, groups of entities and the protocols that tie them together need to be flexible enough to support dynamic joins and leaves. Since the operation of the groups that produce the context is an important part of the framework, we will put special emphasis on the analysis of the mechanism that constitutes the association and maintains the entities grouped together. In summary, the work described in this paper provides two main contributions. First, it proposes a new strategy for integrating RFID and sensor information before the context is transmitted. We believe this early fusion of sensor, actuator and identification data offers important advantages for the context inference. Secondly, it provides a set of energyefficient network protocols that manage the creation of dynamic WSN based on the context of interest. We would like to note that the protocols described in this paper are not limited to context information and could be configured to provide energy-efficient and dynamic associations of sensor nodes based on any other requirements.
4. 4.1.
CONTEXT LAYER ASSOCIATION PROTOCOLS Entities
The main component of the context layer is the WISSE entity. Entities are not physically different from any object that may carry an RFID tag. The difference is functional: while normal RFID tagged objects are just individually read by some RFID
THE COMPUTER JOURNAL, Vol. 52 No. 2, 2009
246
T. SA´NCHEZ LO´PEZ et al.
FIGURE 1. WISSE framework example.
THE COMPUTER JOURNAL, Vol. 52 No. 2, 2009
ENERGY-EFFICIENT WSN/RFID INTEGRATION reader, WISSE entities may associate and then transmit their information jointly. In order to achieve this, entities use the wireless communication capabilities of their sensor nodes. From the broad concept of RFID, we chose the electronic product code (EPC) Global tag data standards [41]. The EPC is an identification scheme designed to support the needs of various industries by accommodating both existing and new coding schemes. The EPC global standards specify a whole architecture framework as a collection of interrelated interface standards for hardware, software and core services. This architecture enables numerous advantages when managing information related to EPCs. The EPC global standards consider various kinds of tags distributed in classes. A total of four classes are defined, from the well-known passive tags (classes 1 and 2) to the battery powered active tags. In December 2004, EPC global ratified the second generation part of their tag standards, known as the Class-1 Generation 2 (Gen2) UHF RFID, or air interface [42]. This generation involves noticeable improvements, including better compatibility, security and extended tag memories. In order to emphasize a practical approach, we focus our research on currently available technologies, such as Class-1 Gen2 RFID tags and existing WSNs. However, our current research does not exclude the use of future technologies, and part of our current considerations regarding issues such as mediation and information capture will be solved with the evolution of the standards themselves. According to what has been argued before, WISSE entities should carry one (and only one) passive RFID tag. The tag’s EPC will uniquely identify the entity, in the same way as today’s tagged objects are identified by one EPC. In addition, each entity may carry several sensor nodes, which may contain any combination of sensors and actuators. Ideally, each sensor node has a map of the memory of the RFID tag of the entity to which it belongs. In this way, each node has access to its entity’s identity and to other parts of the memory needed by the WISSE protocols. Unfortunately, we cannot assume that a WSN is able to read RFID tags. It would be desirable, though, that the manufacturers that tag the objects and install the sensor nodes would also transfer the RFID memory map to the node’s memory. We believe this is a reasonable assumption for factory production lines using RFID gates holding also WSN transceivers, for example installed on conveyor belts. This way, while RFID tags would still maintain their functionality if read by regular RFID readers, the sensor nodes could participate in the WISSE network on behalf of the same objects. Nevertheless it is also possible for those nodes to be added after object manufacturing and, besides, we would like to consider the participation of objects without sensor nodes. The rest of the document assumes the RFID tag’s memory is mapped into the sensor node’s memory of their associated object. Section 4.5 considers how to overcome the situations where this mapping was not done during manufacturing.
4.2.
247
Protocol overview
Single entity data is normally poor in the sense that it cannot offer enough context information for obtaining relevant services. For example, our businessman from Section 3 could not acquire the home actuation service if he only considered GPS information from his mobile phone, but not the temperature information from his shirt’s embedded sensors. Providing as much data as possible for the same client may extend its context information and hence the possible available services. WISSE entities sense not only the environment but also the presence of other entities, and so may associate with them if they have the same context-related interest. Grouping is the process by which two or more entities decide to collaborate by sharing their context information. Entities periodically advertise their presence by sending advertisement packets and listening for other entities in periodic, unsynchronized intervals. To provide entities with the ability to decide which other entities they should associate with, we divide the grouping process into two phases. The first phase uses the information stored in the RFID tags to make basic decisions and prioritize the association process. The second phase involves choosing representatives, invoking the addressing process and distributing the results to all the group members. Only when the grouping process is finished will the entities be aware of their new membership and the results will be communicated to the rest of the WISSE infrastructure. In order to deal properly with dynamic wireless networks, WISSE organizes any combination of associated entities in a double clustered architecture. On one hand, each individual entity chooses a CH, which will communicate with other CHs from other entities. On the other hand, a group of associated entities chooses a correspondent CH to communicate with the service network. Both election processes are aperiodic and based on remaining node energy. Election processes are triggered by a number of reasons, including assigned time expiration, node battery exhaustion or node discovery. Finally, each entity group chooses a meaningful identifier (EPC) among all entities, which will represent the group to the rest of the system. An entity will report its interactions dynamically, getting services according to the context gained through them. The following subsections detail all the processes taking place in the context layer, from choosing which entities shall form a group to which identifier should be chosen.
4.3.
Representative election
4.3.1. Entity cluster head election Entity cluster heads (ECH) are used by single entities to communicate with other entities. Thus, the first task of the entity’s sensor nodes is to undertake an ECH election process. This process is as follows: Nodes marked as ‘ECH capable’ send an ECH proposal for a time Tentity when (1) they are elected
THE COMPUTER JOURNAL, Vol. 52 No. 2, 2009
T. SA´NCHEZ LO´PEZ et al.
248
as ECH but their representation period has just finished or (2) they are not elected as ECH and cannot find their representative. Only nodes which compute a higher Tentity will respond to the proposal. In order to avoid collisions when more than one node tries to answer, a delay in the response is introduced, as a function of the remaining power plus a random component [28]. We can compute the proposed time and delay as follows: Tentity ¼ C1 RemainingEnergy Delay ¼
C2 þ Random RemainingEnergy
where 0 Random C2/(2 MaxEnergy), and C1, C2 are constants. Once this process is finished, the ECH election result will be broadcast to the rest of the single entity’s nodes, which from that moment will use the ECH as a relay node to communicate with the outside. 4.3.2. Correspondent election WISSE correspondents are defined as ECHs that are elected to connect the entity to the service network edge. Only one correspondent can exist per group of associated entities. If an entity does not belong to any group, its ECH is automatically promoted to correspondent. Not every ECH is eligible at any time to become a correspondent. It is possible for certain nodes of an entity to be in range with a sensor network gateway (edge device) while some other remain ‘hidden’ or out of range. Apart from the energy efficiency requirements, the correspondent election procedure should also avoid choosing a correspondent which is hidden while another ECH from the group is in range of an edge device. To address this issue, edge devices send advertisement packets to announce their presence. Only ECHs that receive an advertisement (ADV packet) will start the correspondent election process: The correspondent election procedure follows the same algorithm described above for the ECH election, using Tcorresp as the proposed time. The correspondent election procedure starts when any of the following occur: (i) No correspondent is currently selected in the group. (ii) Tcorresp expires. (iii) Current correspondent looses range with all the edge devices. (iv) An ECH, who did not participate in the previous election and had more remaining power than the current correspondent, now receives an ADV packet. (v) An ECH cannot communicate with the current correspondent before Tcorresp expires. (vi) A new entity is added to the correspondent’s group. According to this algorithm, if an entity looses its correspondent and no ECH receives an ADV packet, the election
process will not start again to choose a new correspondent. This situation is undesirable because the context information of the grouped entities may still be useful locally. Moreover, we cannot allow new groupings to be discarded due to temporal disconnections. To avoid this problem, the correspondent election procedure will be started by any node which runs for more than a certain time TNo-ADV without being able to communicate with its correspondent. When connection with the service network is re-established, entities holding a correspondent selected in this way will start a regular correspondent election procedure again. In our research we focus on groups of entities that can associate dynamically and spontaneously. For this reason, we should avoid storing vital grouping information in a centralized manner, but rather distribute this information. This is specially true for the elected correspondent, as the entity which it is contained in may un-group without prior notice. Unlike correspondents, however, EHCs are unlikely to ‘die’ without warning as they remain attached to their entities. WISSE defines that each ECH shall store a table with a list of its entity’s nodes and the sensors and actuators they hold (node table). Additionally, the ECH will store its address and may store some other additional information such as its level in the association hierarchy. When an ECH finishes its representation period or is about to exhaust its battery, its node table will be transferred to the next elected ECH.
4.4.
Grouping procedure
The concept behind the grouping procedure is rather simple: entity correspondents send periodic broadcasts of grouping_ request packets, looking for other entities with which to associate. Entities that receive grouping_request packets may process the packet information and decide to associate by sending back a grouping_response. The responding entity makes decisions on which EPC will represent the resulting entity. Results are communicated to all the entity members and a new correspondent election process begins. This process may involve several entities at the same time. Although the process seems straight forward, a too simplistic approach may lead to an unrealistic design. In general, we need to monitor the grouping procedure to avoid uncontrollable chains of associations that will exhaust the nodes’ batteries. In particular, if the objective is to provide shared context relevant to the clients, the association’s nature and priorities should be considered carefully before using the devices’ scarce resources. In our work, we try to meet these requirements by proposing a two-phase grouping procedure. The first phase, or pre-grouping, aims to organize and filter the entities that should undertake a full association procedure, which takes place in the second phase. The following sections describe the concepts and algorithms behind this two-phase grouping.
THE COMPUTER JOURNAL, Vol. 52 No. 2, 2009
ENERGY-EFFICIENT WSN/RFID INTEGRATION 4.4.1. Phase 1: filtering and classification In general, the main purpose of RFID tags is to provide unique identification. In the EPC global Class-1 Gen2, that unique identification is given by the tag’s electronic product code. The standard also specifies other kind of information that may be stored in the tag’s memory. There are four logically separated memory banks in a Gen2 tag. Bank 1 contains the EPC information, while banks 0 and 2 contain other data for security and compatibility reasons. Gen2 also specifies a fourth memory bank called the user memory bank. Its organization, size and purpose is said to be user-specific. WISSE uses this additional data storage to keep a minimum set of logical information that will be used in Phase 1. We justify the need for this additional data based on the observation that: (i) The properties of the EPC Global core services and infrastructure make it possible to retrieve information from remote databases using any EPC as a search key. This information could help to make decisions on the association procedure. However, even if we could make relevant information available for any EPC and build the logic to process that information, we would still have a connectivity problem: the inherently unreliable wireless communications may occasionally break the bridge to upper layers. (ii) We should consider some priority mechanism when grouping multiple entities at the same time. Even if the ‘businessman’ from Fig. 1 could associate with his office chairs to receive, for example, chair locations for tracking purposes, he would definitely prefer to associate his PDA and his ID card first to find out his own location. (iii) Security mechanisms are necessary to allow private groups and prevent unauthorized associations. WISSE specifies the user memory bank containing two different IDs, a user ID and a group ID. Unlike the EPCs, these 16-bit identification numbers do not refer to the physical product, but rather to its logical use. The group ID is compulsory and shall contain a non-zero value for any RFID tag compatible with the WISSE architecture. Its use is to define general object classes such as furniture, human, vehicle, food, books, clothes, etc. The user ID is optional and is intended for user-defined object classes. Additionally, a user password may be specified for preventing unauthorized association to user-defined groups. A tag not belonging to any user-defined class should set its user ID to 0. In this case, the user password bit shall also be set to 0. Figure 2 shows the logical memory map of the user memory bank of tags participating in the WISSE architecture. Entities send their user memory bank information together with their grouping_request packets once every grouping period (GP). GPs have a fixed size, and they always start with a fixed sending interval in which the entities actually send their grouping_request packets. During the rest of the GP,
249
FIGURE 2. Gen2 tag’s user memory layout for the WISSE framework.
entities listen for other grouping_request packets. Figure 3 shows how the GPs are distributed. During the fixed interval time T2 2 T1, entities listen for request packets. If any requests are received, they process them producing a grouping_response. The processing time is variable depending on the number of requests received. If any requests are received from T2 to T3, they are queued and will be processed at the next GP’s processing period, starting at T5. As mentioned before, entities send their user memory bank information together with their grouping_request packets. According to this information, the WISSE filtering and classification phase distinguishes three classes of entities at association time: ‘User’, ‘Group’ and ‘Other’. The User class is granted to those grouping_request packets that share the same user ID as the entity that receives that packet. The Group class is granted in a similar way but takes into account the group ID values. Packets not matching the user ID nor the group ID values are granted the Other class. It is also possible to specify with which kind of combination of classes this entity is allowed to group. The grouping bits provide this function by marking 1 when a certain class is allowed for association. The default value is 111, meaning that this entity will be willing to associate with any kind of entity. Grouping requests are hence classified upon reception in the three mentioned groups and are processed by class type, starting from the ones in the User class and finishing
FIGURE 3. Grouping period organization.
THE COMPUTER JOURNAL, Vol. 52 No. 2, 2009
250
T. SA´NCHEZ LO´PEZ et al.
FIGURE 4. Request classification according to tag’s user memory bank.
with those in the Other class. This procedure assures not only that associations will be granted in a controllable way, but also that there will be a priority in those associations, giving preference to the user-defined classes. Figure 4 depicts the algorithm that classifies the requests in classes according to their user memory bank information. Phase 1 ends by providing the next phase with a list of received requests with the highest priority. Only one class will be processed in one GP, while the rest of requests will be queued in an first-come, first-served manner for the next processing time. Since the characteristics of an entity can vary after every grouping, all the queued requests should be classified again at every GP. 4.4.2. Phase 2: Naming and update One of the most important principles of WISSE is that entities are represented in the system by one EPC. When entities
associate, one of their EPCs is chosen as representative of the group. We could say that the group of associated entities form a wireless sensor network and that the EPC is its network ID (or NetID, for short). This design allows the addressing of meaningful groups of entities globally under a unique identifier. Nonetheless, WISSE still maintains the possibility of accessing every individual EPC through a database of associations called the virtual entity database (VED). The VED design is described in [43]. Although the purpose of having a unique address for every group of associated entities is fulfilled by choosing any of their EPCs as representative, it is obvious that the more meaningful this choice is, the better it will represent the group. For example, our ‘businessman’ group would be better identified by the EPC from its digital ID card than by the EPC of its shirt, even if both EPCs may be valid unique network identifiers. Better choices allow easy recognition of the nature of a group without having to dig into all its entities. In order to make optimum choices and better organize the associations, the VED is also arranged in a hierarchical manner, where lower levels contain more representative entities. The main goal of Phase 2 is to process the grouping_ requests coming from Phase 1 and choose a NetID among all the entities that will associate. The chosen NetID must be notified to all the members of the group. Another important task of this phase is assigning local addresses for communication and routing. Explanation of the addressing scheme (called sequence chain) is out of the scope of this paper. Figure 5 depicts the algorithms involved in this second phase of the grouping. Since entities are mobile, the first task of the algorithm is to check if all the entities, from which there is a request, are still in range of the node. The next task is to elect
FIGURE 5. Block diagrams related to the grouping_request and grouping_response packets; the algorithm in (a) will be executed when a list with accepted requests is received from Phase 1; and the algorithm in (b) will be executed when a grouping_response packet is received.
THE COMPUTER JOURNAL, Vol. 52 No. 2, 2009
ENERGY-EFFICIENT WSN/RFID INTEGRATION the NetID that will represent the entity. For this, the choice is made according to the level of the entity in the hierarchy, as we mentioned earlier. For the same level, the entity which is already grouped with most entities is chosen. This is for efficiency reasons, as the cost of updating database records is directly related with how many entities are associated around the same NetID. Finally, the algorithm generates the grouping_response, sends the updates to the service network and also updates the number of associated entities. The previous algorithm, executed by ECHs receiving grouping_request packets, produces a grouping_ response packet that is sent back to the sender. Upon reception, the node receiving the grouping_response should first proceed with the changes indicated in the packet. These changes involve updating its NetID information, its address and the number of entities that now form part of its group. Finally, those changes should be transmitted to the rest of the entities of this group. The algorithm achieves that by sending grouping_responses in a recursive manner until all the members are notified. Note that the part of the algorithm that deals with addressing issues has been simplified to make the diagrams clearer. Figure 6 presents an example of the grouping process where Entity B receives grouping requests from Eentities A and C. In this example, Entity B’s NetID is selected as the new NetID of the group. Note that the details for the Entity C have been omitted for the sake of clarity. Those details are analogous to the ones depicted for Entity A. 4.5.
Extension
As mentioned in Section 4.1, the ideal scenario for our framework is for the RFID tag’s memory to be mapped into the WSN node’s memory. However, it is possible for this assumption to be invalidated by scenarios where manufacturers do not provide such mapping or where new nodes are added to the entities by the users. Moreover, it may also be relevant to
251
consider entities without sensor nodes, such as those from traditional RFID applications. To try to consider all possible scenarios, we also propose an extension to the regular grouping protocols where the tag’s memory is not initially mapped into any sensor node and where entities with no sensor nodes exist. In order to read RFID tags inside the mobile entities without using sensor nodes, we should consider portable RFID readers. Several commercial products exist that already combine RFID reader and wireless communication technologies, such as the Symbol RD5000 (WLAN, Bluetooth), the IDBlueTM (Bluetooth) and a variety of other hand-held devices. Readers would keep a list with the RFID tags that they read. This way repetitive groupings can be avoided, not only with the tags mediated through the RFID reader, but also with tags that belong to regular entities. We call this list registered tag list (RTL). As mentioned before, there are two cases, where the memory of an RFID tag might not be mapped into a sensor node’s memory: (i) The entity where the tag is located does not contain any sensor node. (ii) The entity where the tag is located does contain sensor nodes but at least one of them does not have a valid tag map into their memory. Algorithm 1 shows the procedure that a reader belonging to a WISSE group will undertake when it reads a tag. In lines 1 – 3, the reader checks if that tag was already read in the past. In line 4, the reader sends an MAC level broadcast looking for nodes without a valid network address (nodes without a valid tag memory map). If it receives a response (lines 6 and 7), the reader will inject the memory map from the tag to those nodes and let them undertake the regular grouping procedures. Otherwise (lines 8 – 10), the reader will register the tag as a new entity and will begin the periodic grouping procedure by sending grouping_request on behalf of the tag.
FIGURE 6. Example of WISSE’s grouping process.
THE COMPUTER JOURNAL, Vol. 52 No. 2, 2009
T. SA´NCHEZ LO´PEZ et al.
252
Algorithm 1 ReadTag(tagMemoryMap,RTL) 1: if (tagMemoryMap.EPC e RTL) then 2: break 3: else 4: send responseList¼broadcast (MACbroadcastAddress) 5: add tagMemoryMap to RTL 6: if (responseList = null) then 7: send mapInjection(tagMemoryMap, responseList) 8: else 9: send ve_register(tagMemoryMap.EPC) 10: send grouping_request (gpLength) 11: end if 12: end if
Figure 7 presents an example of the previous two cases. Starting from the left (Case 1), a mobile reader, which forms an entity with itself as the only member, reads a tag that is not registered in the RTL. The reader performs an MAC level broadcast to try to find new nodes without a valid network address. As it cannot find any new nodes, it assumes this is an entity without any sensor node, registering it and sending grouping_requests on its behalf. On the right (Case 2), the reader reads another tag that is not registered. This time two nodes answer its MAC broadcast. The reader then injects the ECP and tag’s memory map into the new nodes. The nodes will then elect representatives, register with upper layers and start sending a grouping_request as a new constituted entity.
lifetime. As the simulation will later show, the election of an appropriate representation period and its relation with the number of nodes of the cluster plays an important role in this endeavor. In Section 4.3, we showed that this period, Tentity, is calculated as a function of the remaining node energy multiplied by a constant C1. Since the node residual energy is given by the particular situation of a node and cannot be modified, C1 becomes a key parameter in the calculation of an optimal representation period. In order to determine the value of Tentity which will maximize the network lifetime in each election procedure, we need to model the energy consumption in the network and apply it to a lifetime expectation model. In this section we present the definition of the energy model of the nodes in the network, and we apply that model in the lifetime prediction approach used by [44]. By doing this, we determine the best value for Tentity as a function of C1 and the number of nodes in the cluster. The energy model that we describe here, and the results obtained from our analysis, will be used later in our simulations and implementation. 5.1.
Energy model
The following equations describe the model at the entity level (ECH election), although extending them to the network level would be straight forward. Our model consists of two processes, the election and the transmission of the data. For both processes, the energy model is based on the following equations [45]: etx ¼ ecircuitry k þ eamplify k d c ;
ð1Þ
erx ¼ ecircuitry k;
ð2Þ
5. ENERGY MODEL AND LIFETIME EXPECTATION One of the main concerns of our design is reducing the energy consumption of the system and thus maximizing the network
Where † etx is the energy used while transmitting data.
FIGURE 7. Example of the extension algorithm.
THE COMPUTER JOURNAL, Vol. 52 No. 2, 2009
ENERGY-EFFICIENT WSN/RFID INTEGRATION † † † † † †
erx is the energy used while receiving data. ecircuitry is the energy needed to feed the tx/rx circuits. eamplify is the energy required to amplify the tx signal. k is the length of the packet to be transmitted. d is the distance between source and target. c is the path loss exponent.
These equations are used in the following subsections to determine the value of Tentity that will maximize the energy of the WISSE networks. 5.1.1. Data transmission Every node transmits its available sensor data once every Sc seconds. The data is transmitted to the ECH and then is propagated toward the correspondent. We do not consider data aggregation in the model, although Section 6.4 will discuss the effect of data aggregation in the simulations. Following that premise, the data’s transmission energy is defined as:
etransmit
8 corresp < n etx ¼ þðn 1Þ erx : CH etx
if ECH; otherwise;
ð3Þ
where † ecorresp is the energy used while transmitting data to the tx correspondent. † eCH tx is the energy used while transmitting data inside the cluster. † n is the number of nodes in the cluster. 5.1.2. Election process As shown earlier, the energy consumed in the representative election procedure is very important for our energy model. As also presented in Section 4.3, in the selection of a new CH, only the nodes with remaining energy greater than a certain threshold exchange messages, and the node that initiates the process is the current CH. Therefore we can divide the nodes’ energy consumption due to the election into three possible groups:
eelection
8 2 eCH > tx > > > < þm erx ¼ eCH tx þ 2 erx > > > > : 2 erx
if ECH; if node participates; in the election; otherwise;
ð4Þ
where † m is the number of nodes that participate in the election process. 5.2.
Lifetime of the network
In [44], the authors, based on the law of large numbers and the processes of a WSN, propose a general formula to determine
253
its lifetime: J½lifetime ¼
E0 J½Ewasted ; Pc þ l J½Er
ð5Þ
where † E0 is the initial energy of all the nodes in the network. † J[Ewasted] is the expected node residual energy when the network dies. † Pc is the base power consumption. † l is the average data reporting rate. † J[Er] is the expected energy consumed when transmitting the data in the network. The final factor (l*J[Er]) represents the case of only one transmission process. It can be decomposed in as many factors as needed, should there be more than one process related to data transmission. In our case we need to decompose this factor into three elements: † The energy consumed due to data transmissions from the nodes to the CH: l*J[ENtx] † The energy consumed due to transmissions from the CH to the correspondent: l*J[ECH tx ] † The energy consumed with the CH election procedure: m*J[Eelection]. Taking these elements into account, we can rewrite Equation 5 as follows: E0 J½Ewasted 1 Pc þ l J½Etxcorresp @ þl J½ECH A tx þm J½Eelection
J½lifetime ¼ 0
5.3.
ð6Þ
Solving the model
Based on the previous equations, we can maximize the lifetime of the network either by minimizing the wasted energy or by minimizing the energy consumption due to data transmission. In the first case, one way to achieve this is to equilibrate the residual energy in all the nodes, so the average wasted energy is reduced. In the second, although we cannot reduce the energy consumption due to data transmissions or their rate, we can reduce the number of election procedures, therefore reducing the data transmissions performed for that purpose. To equilibrate the residual energy among the nodes, we try to minimize the difference between the nodes with the highest and lowest residual energy. The idea, thus, is to determine the time that a node will be the CH according to the residual energy on the current CH node and the node with the lowest remaining energy, since their residual energy difference is higher than the difference between any other node and the node with the lowest energy.
THE COMPUTER JOURNAL, Vol. 52 No. 2, 2009
T. SA´NCHEZ LO´PEZ et al.
254 We define the delta energy in the network as De ¼ e1 en ;
ð7Þ
where e1 e2 ... en represent the residual energy of the nodes at the beginning of the next period. The node with energy e1 will be the CH, and we need to determine the time that the node will continue to be so. That time is determined by the fact that the delta energy remains the highest if that node is the CH. If we look at the equations in Section 5.1, there are three ways that the energy of a node can change, depending on the node’s status: if the node is the CH, if the node is not the CH but can participate in the election procedure and if the node is not the CH and will not participate in the election. In those equations, we point out that the nodes consume, on average, the same energy in the transmission processes. We can then assume that the node with the second highest residual energy will be the one that will replace the CH. However, it is also possible for the node with the highest residual energy of those that did not participate in the election process to be the new CH. The reason why nodes that are not part of the election are included in the possible alternatives is that, at the time of the election, the nodes do not include the energy consumed by the messages sent back to the CH. Those messages may consume a delta energy that is greater than the difference between the nodes with energy below the threshold and the others, making them candidates for the new election period. Therefore, we have three possible candidates for the election process: the current CH, the node with the second highest remaining energy, and the node with the highest remaining energy among those that do not participate in the CH election (with energy ek). Since we do not know the energy of the nodes that do not participate in the election procedure, we need to compare against the threshold mentioned in Section 5.1.2. Therefore, there are three possible values for the delta energy at the end of the time in which the new CH needs to be elected:
De ¼
8h i T > eCH þ eCH e1 entity > transmit election > l > > h i > > N N > > en Tentity e þ e > transmit election l > > i >h > Tentity > N N > e þ e e 2 > transmit election l < h i T
N N en entity > l etransmit þ eelection > > > > ½threshold > > i > > Tentity > NP > > l eN transmit þ eelection > > i > > h > N : en Tentity eN ; þ e transmit election l
† eNtransmit is the transmission energy of a non-CH node. † eCH election is the election energy if node is the CH. † eN election is the election energy of a non-CH node that participates in the election process. † eNP election is the election energy of a non-CH node that does not participates in the election process. † threshold is the residual energy threshold below which a node will not answer an election message. We then need to compare the possible delta energies in order to determine Tentity. The CH will continue to be CH as long as its delta energy is greater than the other possible candidates. We can express that fact as
Tentity CH CH etransmit þ eelection e1 l Tentity N N etransmit þ eelection ; e2 l
N ðe1 e2 Þ ðeCH election eelection Þ
Tentity N ðeCH transmit etransmit Þ; l
l
N ðe1 e2 Þ ðeCH election eelection Þ Tentity ; CH ðetransmit eN transmit Þ
ðe1 thresholdÞ NP ðeCH election eelection Þ N ðeCH transmit etransmit Þ
†
ð11Þ
Tentity :
ð12Þ
Using the equations in Section 5.1, we can expand Equation (11) into Equations (13 – 15). Similarly, we can obtain Equation (15) from Equation (12). Finally, we obtain the value of Tentity by calculating the minimum value between Equations (15) and (16). The final result is shown in Equation (17). As discussed in the beginning of the section, the value of C1 could then be written as follows:
where eCH transmit
ð10Þ
where e2 is the energy of the node with the second highest remaining energy from those that participated in the election process. Similarly, we can obtain the following equation for the node with highest remaining energy that did not participate in the election process:
l
ð8Þ
ð9Þ
C1 ¼ is the transmission energy if node is the CH.
THE COMPUTER JOURNAL, Vol. 52 No. 2, 2009
Tentity e1
ð18Þ
ENERGY-EFFICIENT WSN/RFID INTEGRATION 6.
255
which is currently elected as ECH, has temperature,
SIMULATION
Due to the distributed nature of the algorithms presented previously, it is difficult to evaluate their correctness without a graphical representation of the entities, their nodes and the network protocols that build and maintain the WISSE WSN. For this reason, as part of our work, we have built a simulation tool that not only implements our protocols, but also draws a rich graphical representation of the state of each entity and message exchange among the network nodes. Figure 8 shows a screen capture of the simulation tool. The left part of the application displays the entities on the network (10 in this example), whereas the right part lists the dynamic characteristics of the selected entity. In this case, Entity 6 [with an RFID universal resource identifier (URI) urn:epc:id:gid:2.1.6] is selected. The information list shows that this entity’s ECH is also the correspondent of the network, and that it has two nodes. Node ‘1’,
l
CH ðe1 e2 Þ ð2 eCH tx þ m erx etx 2 erx Þ þ ðn 1Þ erx eCH ðn ecorresp tx Þ tx
Tentity
ð13Þ
0
1 c ðe1 e2 Þ ð2 ðecircuitry k þ eamplify k dCH Þ @ þm ðecircuitry kÞ ðecircuitry k A c þeamplify k dCH Þ 2 ðecircuitry kÞÞ l c Þ n ðecircuitry k þ eamplify k dcorresp c Þ þ ðn 1Þ ecircuitry k ðecircuitry k þ eamplify k dCH Tentity ð14Þ
FIGURE 8. Screenshot of the WISSE simulation tool.
THE COMPUTER JOURNAL, Vol. 52 No. 2, 2009
T. SA´NCHEZ LO´PEZ et al.
256
l
c ðe1 e2 Þ ðm þ 1Þ ecircuitry k eamplify k ½dCH
c c dCH 2 ðn 1Þ ecircuitry k þ eamplify k ½n dcorresp
Tentity ð15Þ
c ðe1 thresholdÞ ðm þ 1Þ ecircuitry k eamplify k ð2 dCH Þ l c c 2 ðn 1Þ ecircuitry k þ eamplify k ðn dcorresp dCH Þ
Tentity ð16Þ 0 Tentity ¼
1 l minðððe1 e2 Þ ðm þ 1Þ ecircuitry k c @ eamplify k ðdCH A Þ;ðe1 thresholdÞ c ðm þ 1Þ ecircuitry k eamplify k ð2 dCH ÞÞÞ c Þ c dCH 2 ðn 1Þ ecircuitry k þ eamplify k ðn dcorresp
ð17Þ humidity and light sensors, and node ‘2’ has only temperature and humidity sensors. Note that to make the visualization clearer, the full identity’s URI, linked to the entity’s RFID tag, is only displayed through the entity’s pop-up menu, together with its node’s sensors. Finally, note also that in the figure, Entity 6 is sending a group_request broadcast as correspondent of the network. Besides using the simulator tool to verify that our algorithms work as expected, we also used it to assess the quality of our design. Our main focus was to evaluate the energy
consumption of the nodes and prove that the double clustered architecture ensures a balanced and long node lifetime. In our protocols, we are interested in keeping the context meaningful for as much time as possible. Hence, our algorithms try to ensure that every node of the network has enough energy to operate, while keeping the overall network lifetime as long as possible. Graphs in Fig. 9 depict the basic operation of the WISSE context network protocols and show the consequence of running the network without providing any representative election mechanism. In this 10 min simulation, six entities are added to the network, four of them at the start of the simulation and the other two after 1 min (Entity 5) and 9 min (Entity 6). Additionally, all but Entity 5 start with a 100% of battery power. The line marked as ‘correspondent’ symbolizes the remaining battery power of the entity that is selected as correspondent at every point in time. The peaks in the line occur when a correspondent election is produced and the role of the correspondent is changed from one entity to another. In order to increase the diversity of the results, the starting time of the nodes is set to be random for a period of 4 s, so every simulation may offer a slightly different result depending on which nodes send their requests first. Finally, the period between grouping_request messages is 5 s, and the statistics about the remaining battery of each node are taken every 20 s, which explains the slope on the left side of the peacks. The simulation in Fig. 9a only performs a correspondent election when an entity is added or removed from the group. It can be observed that, as soon as the election procedure occurs after Entity 5 is added, the elected correspondent (Entity 4) uses considerably more power than the rest of the
FIGURE 9. Basic effect of the representative election mechanism in the energy of the network; in (a), the correspondent election is only performed when a new node joins the network, in (b), the correspondent election is performed normally.
THE COMPUTER JOURNAL, Vol. 52 No. 2, 2009
ENERGY-EFFICIENT WSN/RFID INTEGRATION nodes until it exhausts completely its battery and is removed from the network. At that time, Entity 3 is elected correspondent, and few seconds later, Entity 6 is added to the network, soon becoming the new correspondent. In the simulation in Fig. 9b, the regular correspondent election and representative period are applied. It can be observed that by sharing the overhead of performing the correspondent’s task, all the nodes are still alive when the simulation finishes. It is easy to observe that under the terms exposed in the previous paragraph, the scenario depicted by Fig. 9b is preferable to that depicted by Fig. 9a. 6.1.
Number of entity nodes
The previous simulation only considered the correspondent election in order to stress the need of the representative election procedure. However, there are several variables that may influence the network lifetime and that we would like to analyze. The first of these variables is the number of cluster members. Intuitively, the greater the number of cluster members, the more the candidates to share the representative’s task and the longer the life of the network and its nodes. However, this is not necessarily true because the representative’s overhead is related to the number of members of the cluster. For example, if the representative has to periodically forward one message per member, the higher the number of members, the more the messages to forward and the higher the battery drain. Furthermore, the election procedure itself would require more power with a higher number of cluster members, since the representative must receive a packet for every member that decides to compete for the next representing period. To evaluate the influence of the number of cluster members in our algorithms, we simulated a WISSE network varying the number of nodes of each entity. The number of entities was
257
fixed to four, all starting randomly at the beginning of the simulation. The overhead of the representative included periodically forwarding a packet for each member of its cluster. We also performed this set of simulations with and without activating the ECH election mechanism, in order to observe how single and double cluster architectures behave under the same conditions. The objective was thus, not only to observe how the number of cluster members influences the network and node lifetime, but also to verify that the second-level clustering provides considerable benefits to our architecture. Figure 10a shows the simulation of 2, 5, 8 and 10 nodes per entity when both correspondent and ECH election mechanisms are activated. The zigzagging lines represent the correspondent’s remaining battery power at every point in time. The vertical lines represent the moment the first node of the network exhausts its battery. As expected, the peacks that represent the occurrence of an election process are steeper when the number of nodes is higher, since the overhead of the packet forwarding by the ECH is higher. However, the influence in the lifetime of the network is not as much as expected. The reason for this is that the overhead produced by the number of nodes in the forwarding of packets and the election process itself nearly overrides the benefits of having more nodes to distribute the ECH’s responsibilities. We also observe that for 10 nodes per entity, the death of the first node in the network happens earlier than in the simulations with five and eight nodes per entity, even if the lifetime of the network is longer. This is because the higher number of nodes increases the energy unbalance among nodes too fast to be properly balanced by the election procedure with the established election period. Figure 10b shows the same set of simulations but with the ECH election procedure deactivated. We can clearly observe that, since the ECH is never changed, the rate of the energy drain of the correspondent is proportional to the number of
FIGURE 10. Effect of varying the number of entity nodes with (a) and without (b) activating the ECH election mechanism.
THE COMPUTER JOURNAL, Vol. 52 No. 2, 2009
T. SA´NCHEZ LO´PEZ et al.
258
nodes of the entities. As compared with the previous set of simulations, this situation is obviously less desirable. As observed in Fig. 10a, although the improvement in the network lifetime is not very significant, the double cluster architecture helps to maintain the network lifetime stable. In the next section we will analyze how the variation of the representation period influences the time in which the first node of the network exhausts its battery. 6.2.
Representation period
The second variable that greatly influences the behavior of the protocol is the time that a node is elected as representative. Graphs in Fig. 11 depict the simulation results when the number of entity nodes is fixed and the time a node operates as ECH varies. In order to choose values more intuitively, the representative period (in seconds) was calculated as Tech ¼ ((C1/100) Remaining node Power), where C1 is the variable of interest and max(Remaining node Power) ¼ 100 is the initial battery power per node. This way, C1 represents the number of seconds a node would calculate the representation period with its battery at full capacity. The number of nodes per entity was set to three. The rest of the simulation conditions were the same as the previous simulations. As we can deduce by observing the graphs, performing the ECH election too often results in a short network lifetime, due to the overhead of the process itself. However, not performing the election often enough results in nodes exhausting their battery power when other nodes still have much of their energy left. From C1 ¼ 480, the first elected representative will use all its energy before any election period takes place, around 6 min from the start of the simulation. However, the lines in the graph only represent the correspondents, so they do not specify when the first node of the network dies.
The graph in Fig. 12 plots the time this event occurs in relation with the value of C1. As the graph shows, the battery drain of periodic tasks that affect all the nodes of the network causes nodes to exhaust their battery before the network or any representative node dies. For example, for C1 ¼ 300, the first node dies around 9 min from the start of the simulation, while the network itself does not do so until the 16 min mark. In order to understand how the use of the analytical results presented in Section 5.3 would influence the lifetime of the network, we introduced Equation (17) in the simulations. We are specially interested in comparing the empirical results of Figs 11 and 12 with the outcome of this new simulations. Graphs in Fig. 13 show the effect of using Equation (17) to dynamically calculate the value of C1 in each election procedure. Results prove that the introduction of Equation (17) produces optimal network and node lifetimes. Figure 13b shows that the first node exhausts its battery 12 min from the start of the simulation, which is comparable with the best empirical result from Fig. 12. However, the lifetime of the simulated network is extended up to almost 20 min, whereas the associated lifetime for the empirical result is barely above 12 min.
6.3.
Number of messages in the election procedure
The election of a new representative involves the exchange of various messages between the CH and the members of the cluster. Fundamentally, the process includes three different messages: † Election message: Sent by the CH to the cluster members. Announces the new election procedure and requests other nodes to bid for becoming the new representative.
FIGURE 11. Effect of varying the representation period.
THE COMPUTER JOURNAL, Vol. 52 No. 2, 2009
ENERGY-EFFICIENT WSN/RFID INTEGRATION
259
FIGURE 12. Relation between the life of the network and the first node that exhausts its battery power.
† Election Response message: Sent to the CH from those nodes who will participate in the bid. † Election Set message: Sent from the CH to the cluster member. Announces the new CH. Among them, Election and Election Set are broadcast messages inside each cluster. However, Election Response messages are only sent by those nodes that compute a higher residual energy than that of the current CH. Since these type of messages are unicast messages and depend on the number of nodes of the cluster, we would like
to analyze how the increase of cluster members influences both the Election Response messages and the total number of messages exchanged during the representative election procedure. We also would like to compare the number of messages sent with our strategy as compared with a more naive strategy in which every node answers the CH’s Election message regardless of its residual energy. Figure 14a and b shows the number of messages exchanged inside a WISSE cluster in the representative election procedure, varying the number of nodes. These figures were obtained performing a 20-min simulation for each number of
FIGURE 13. Using Equation (17) to dynamically choose C1 in each election procedure; (a) correspondent residual energy with time, (b) relation between the life of the network and the first node that exhausts its battery power.
THE COMPUTER JOURNAL, Vol. 52 No. 2, 2009
260
T. SA´NCHEZ LO´PEZ et al.
FIGURE 14. Number of messages exchanged during the election procedure: in (a) all nodes send an Election Response message, whereas in (b) only those with which computer a higher residual energy than that of the CH do so.
nodes on the x axis. Both graphs display the number of election procedures within the simulation time, the number of Election Response messages and the total number of messages exchanged during the election procedures. Figure 14a plots this information when all the nodes answer back to the CH’s Election message, regardless of their residual energy. Figures in this graph thus show the amount of exchanged information without considering the strategy presented in Section 4.3. On the other hand, Fig. 14b plots the number of messages considering the WISSE protocols. Figure 15a and 15b compares the results of Fig. 14a and b for clarity purposes. As is easily observable, the rate of Election Response messages increases faster when the scheme presented in Section 4.3 is not used (i.e. when the residual energy of a node is not considered to decide which node will answer the Election messages, labeled as ‘no energy’). This fact also influences the total number of messages exchanged during the election procedures. Since the
number of data transmission is a key factor in the energy expenditure of the network, we can easily conclude that the strategy adopted in our protocol is beneficial for extending the network lifetime. 6.4.
Message aggregation
Another important source of energy expenditure are the periodic messages sent by the nodes and that contain sensor information. These messages need to be forwarded by the CH (either an ECH or the correspondent), and hence constitute an important factor in the CH’s energy drain and its period of representation. In the previous simulations, we assumed that the CH did not perform any kind of message aggregation and that it forwarded each individual message that was sent by the cluster members. This was assumed without a loss of validity of the results, since, in previous simulations, we were interested in comparing other factors, and such comparisons
FIGURE 15. Comparison of the results of Fig. 14a and b.
THE COMPUTER JOURNAL, Vol. 52 No. 2, 2009
ENERGY-EFFICIENT WSN/RFID INTEGRATION were not influenced by our aggregation assumption. We would like now to analyze how the aggregation of messages at the CH could extend the lifetime of the network. The set of graphs in Fig. 16 present the effect, on the CH’s energy, of varying the number of nodes with and without using aggregation. Figure 17a elaborates on these graphs by comparing the lifetime of the network with and without aggregation. Finally, Fig. 17b displays the trend of the extension of the network lifetime when aggregation is used. In these simulations, we assume that a CH waits a whole sensor report period (i.e. time between two consecutive messages from the same node) before aggregating the data. As the results show, not only using aggregation extends the network lifetime, but this extension increases as the number of nodes grow, stabilizing at around 8 – 10 nodes per cluster. The reason for this upper bound on the network lifetime extension is the relationship between the energy consumption, the number of nodes of the cluster and the aggregation effects. As the number of nodes increases, the aggregation benefits increase, since more messages are aggregated and hence more energy is saved. However, the energy consumed by other protocol processes (i.e. election procedure) also increases, eventually stabilizing the increasing rate trend.
6.5.
261
Latency of the grouping procedure
Besides the network and node lifetime, we also analyzed the latency of the grouping procedure for the different grouping priorities described in Section 4. We measured the time since a request is sent until that request is processed and the entity is grouped. As described in Section 4, when a correspondent receives several requests and they are classified with different priorities (User, Group or Other), those requests with higher priority will be processed first whereas the requests in the following priority will have to wait until the following GP. Thus we are specially interested in measuring how long a request will have to wait when it is preceded by higher-priority requests and it will be delayed one (in the case of Group) or two (in the case of Other) GPs before being processed. The graph in Fig. 18 shows the simulation results for the average of 10 repetitions of the desired cases. The vertical lines represent the maximum and minimum values from the repetitions. In our simulations, the GP was set to 5 s, while listening period before processing (T2 2 T1 in Fig. 3) was set to 2 s. The addition of new entities was also randomized to assure realistic results.
FIGURE 16. Effect of varying the number of nodes with and without using aggregation; (a) two nodes, (b) five nodes, (c) eight nodes, (d) ten nodes.
THE COMPUTER JOURNAL, Vol. 52 No. 2, 2009
262
T. SA´NCHEZ LO´PEZ et al.
FIGURE 17. Comparison of the results of graphs in Figure 16; (a) lifetime of the network with and without aggregation, (b) Trend of the extension of the network lifetime when aggregation is used.
As we can observe, the average processing time of requests belonging to the User class is slightly higher than 1 s. Although we have labeled the data ranges as User, Group and Other, the columns represent the case in which a certain request has to wait none (User), one (Group) or two (Other) GPs to be processed. For example, if a request classified as Other arrives in a given GP, and there is no other request in that period, nor any pending requests from previous GPs, it will be processed immediately with the average time value presented in the User column. Although the values presented in the Group and Other columns seem large, the probability that a request will have to wait several GPs before it is served is not very big. For example, assuming a Poisson arrival process, the probability that a request will be processed in the same GP it arrives is
P[G0] ¼ e2lUT for Group, and P[O0] ¼ e2lUT . e2lGnGT for Other, where T is the duration of each GP, n is the number of GPs elapsed since the last request of the relevant priority was processed, and U and G refer to User and Group, respectively. If we assume a GP of 5 s (T ¼ 5) and an arrival rate of one request per GP (l ¼ 0.2) for any type of request, the probability that a request classified as Group will be processed in the same GP as it arrives is 0.368, while for Other the probability is 0.135 (nG ¼ 1). We can easily observe that these priorities decrease while the requests are queued for one or more GPs. For example, formula (19) expresses the probability that a request classified as Group would have to wait i GPs to be processed. Confirming the initial affirmation, we can easily compute P[G1] ¼ 0.233, P[G2] ¼ 0.147, P[G3] ¼ 0.093, etc. As it can be observed, with a cumulative priority of 60% for G1 and almost 75% for G2, the priority for a request to wait more than one GP is quite small. P½Gi ¼ ð1 elU T Þi elU T
7.
FIGURE 18. Latency of request processing when waiting none (User), one (Group) or two (Other) GPs.
ð19Þ
IMPLEMENTATION
We also implemented the proposed algorithms in real WSN hardware. Our platform of choice was ANTS [46], a complete set of WSN hardware and software that has been in continuous development in our laboratory for the past four years. Currently, the ANTS hardware family is composed of three series of members, codenamed H1, H2 and H4, with a fourth series still under consideration. This separation of the hardware intends to provide the proper resources for different sets of needs. For example, while the H1 series employs a one-chip solution in order to reduce the PCB size and power consumption (currently Chipcon’s CC2430/CC2431chip, which includes an IEEE 802.15.4 compatible RF transceiver plus an Intel’s 8051 processor core), the H4 series uses 32-bit CPUs and includes interfaces more appropriate for higher-level tasks such as WSN BS or
THE COMPUTER JOURNAL, Vol. 52 No. 2, 2009
ENERGY-EFFICIENT WSN/RFID INTEGRATION localization anchors. For our implementation in particular, we chose the H2 series ANTS-H20-P4xx member, featuring an Atmega128L micro-controller, a CC2420 RF chip and Join Test Action Group (JTAG), In-System Programming (ISP) and USB/Serial interfaces. Figure 19 shows both the programming board and the sensor node itself. As a base for the application and protocol development, ANTS H1 and H2 series include the evolvable operating system (EOS) [47]. ANTS EOS is a multi-threaded operating system (OS) with features such as dynamic memory allocation, small footprint, low power consumption and upgrading capability [48]. The version we used for our implementation also includes the PHY and MAC layers for the CC2420 chip. The following subsections present some details in the development process and the tools we used to test our implementation. 7.1.
Integrated development environment
Traditionally, the development of code for WSN has been based on command line tools for compiling the code written with some general text editor. These text editors may provide code coloring and organization, but the coding, compiling and image downloading parts are still basically separated. Furthermore, as in other embedded systems programming, debugging is generally a difficult task that requires micro-controller emulators or JTAG interfaces. Some microcontroller makers such as the Atmel Corporation provide (integrated development environment IDE) tools that incorporate coding, compiling, debugging and image downloading in one software package. However, these solutions are only provided for each company’s products. Since the ANTS platform integrates several vendor’s products in its hardware family, it would force the programmers to change the IDE every time they change the target hardware. This is inconvenient because the developers spend a considerable amount of time adapting to the new software features. As part of our research, we also implemented a plug-in for the Eclipse development platform aimed to provide a flexible
263
programming tool for the ANTS platform. Eclipse modularity has been proved useful for creating tools for embedded devices [49], such as cellular phones. By taking profit of this modularity, we created a WSN programming tool that is able to edit C code, compile it with a single mouse click, download to the target sensor node by just dragging and dropping the resulting image file, and debugging the result both through the compiler output and the node’s JTAG interface. One of the main advantages of this piece of software is that it may support any type of hardware by adjusting the underlying compiler and downloading tools, which are provided by the hardware vendors. Moreover, the Eclipse and CDT (C/C þ þ Development Tools) software packages that we use as the base for our plug-in are already considered de-facto industry standards for software development. Figure 20 presents a screen shot of our plug-in running on Eclipse 3.2. The ‘New Project’ wizard allows the choice of hardware and EOS software modules that will be included in this project. On the left, the project tree organizes source and binary files, including the particular EOS source tree that will be compiled with this project. On the right, the ‘Make Targets’ tab allows one-click cleaning and compiling of the desired project. Compilation errors are pinpointed through the source code files. At the bottom, the ‘Download to Target’ tab allows drag-and-drop of program images that will be downloaded automatically to the target hardware through the ISP or JTAG interfaces. Finally, using a JTAG In-Chip Emulator connected to the node’s programming board, we can also debug the image at the target device using the standard Eclipse debugging view. All the EOS coding involved in the implementation scenario exposed in this section was performed using the described IDE. 7.2.
Monitoring tool
WISSE context layer protocols do not follow the typical centralized WSN topologies in which a BS collects the data forwarded by the rest of the network. In these kind of tree or
FIGURE 19. ANTS H2 hardware; (a) ANTS-H20-P4xx sensor node, (b) ANTS-H20 sensor boards and (c) ANTS-H2X-USB-R1 programming board.
THE COMPUTER JOURNAL, Vol. 52 No. 2, 2009
264
T. SA´NCHEZ LO´PEZ et al.
FIGURE 20. ANTS IDE plug-in for Eclipse 3.2 Development Platform.
star topologies, it is relatively easy to analyze the data at the central point in order to debug the protocols. In WISSE, however, WSN topologies are dynamic and the data is exchanged among various nodes rather than produced in one node and forwarded to the BS. Even though it is possible to attach the sensor nodes to a computer’s serial interface and program them to output protocol debugging information (i.e. messages sent and received, current variable states, etc), the distributed nature of WISSE context layer makes this task tedious and provides information which is hard to interpret. In order to analyze the network traffic and debug our protocol implementation, we re-used the GUI of the simulator and augmented its functionality as a WISSE network monitor. In the ‘monitor’ mode, the software collects all the data exchanged in the network using a ‘sniffer’ sensor node connected to the USB/Serial port. By looking at the packets’ source and destination as well as the rest of their information, the software’s GUI draws the nodes involved in the traffic and their communication type. It is also possible to record all the sniffed packets to replay the monitoring session later.
7.3.
Implementation scenario
Figure 21 depicts the scenario we used to test our implementation. We used a total of six H2 ANTS nodes transmitting at 2.4 Ghz. We also used a laptop with a WJ MPR5000 RFID reader to run the extension algorithm introduced in Section 4.5. One of the sensor nodes was attached to the laptop to allow its communication inside the WISSE network. Finally, another node was connected to a second computer running the monitoring software. This node is labeled as ‘sniffer node’. The total footprint of the node’s application code is around 25.5 KB, whilst the static random access memory (SRAM) consumption accounts for about 3 KB. The remaining Kilobytes of SRAM is distributed between the Stack and the Heap that is utilized by the OS operation. The nodes programmed with the WISSE network protocols run two separate threads with equal priority: one of the threads sends periodic grouping_requests, while the other thread processes received packets. A dedicated 16-bit timer was used for the CH election procedures. An additional program was coded
THE COMPUTER JOURNAL, Vol. 52 No. 2, 2009
ENERGY-EFFICIENT WSN/RFID INTEGRATION
265
FIGURE 21. Implementation Scenario.
for the sniffer node, running a single thread for the processing of the overheard communication messages. Upon reception, the messages are encoded and sent through the Serial-over-USB port on the programming board that the sniffer node is attached to. Due to its simplicity, the footprint of the sniffer application is smaller than the regular node code, staying at around 20 KB. One of the biggest challenges we faced when developing the software for our protocols was the reduced memory size of the Atmega128L. Since the filtering and classification part of the grouping procedure needs to store all the received requests before classifying and processing them, there is a limit on the buffer size directly related with the available RAM memory. Our current implementation uses 11 bytes for each one of the requests, without including the size of the source and destination network IDs. As we explained in the design, these IDs are EPCs, so their size varies depending on the type of RFID tag. For example, with the 96-bit EPCs, such as the ones we used in our experiments, the total size of each request is 35 bytes. Furthermore, a second buffer is needed for the correspondent election proposals, where the node that proposes a time to be correspondent receives better bids from other nodes that compute a higher time. Although in this later case the information to be stored is smaller (only proposed time and source of the competing node), the number of buffer slots must increase with the number of entities in the network, since the probability of nodes having higher remaining energy is higher. The memory problems mentioned in the previous paragraphs can be alleviated by introducing dynamic memory allocation support by the operating system. This way, the memory is not wasted in buffer slots that are uncertain to be occupied. ANTS EOS makes use of dynamic memory allocation by
assigning free memory chunks when requested. However, even if this technique increases the efficiency in the use of our resources, the Atmega128L RAM memory (4K) still runs short for such a relatively complex protocol as ours. In the future, we are planning to change our hardware platform to use the MSP430 F1611 microcontroller, which provides 10K of SRAM and other improvements. The EOS port for the MSP430 is currently under development. 8.
CONCLUSION
Our work in context-aware systems attempts to address the lack of correlation among the context information extracted from sensor nodes and the identification data found in RFID tags. By introducing a framework that integrates both WSN and RFID, we expect to favor the creation of meaningful infrastructures that store, share and mine context information associated with a great variety of user services. In this paper, we analyze what constitutes the foundations of our framework: the dynamic creation of WSN depending on the context data they collect. In the paper, we introduce our data models and a set of network protocols that empower the association of nodes to create energy-efficient and dynamic networks. In order to analyze our design and prove its performance, we both simulated and implemented our protocols. We created tools that allowed us to simulate and monitor the functioning of our system, and with them we proved that our design is both feasible and efficient, and that it can be tuned to increase its performance in terms of energy consumption. As an additional contribution to the area of WSN, we also created an IDE for our sensor network platform, which we used to create our application. We believe this IDE to be flexible and to ease the development of WSN software.
THE COMPUTER JOURNAL, Vol. 52 No. 2, 2009
266
T. SA´NCHEZ LO´PEZ et al.
REFERENCES [1] Weiser, M. (1993) Some computer science issues in ubiquitous computing. Commun. ACM, 36, 74–84. [2] Weiser, M. (1991) Computer of the 21st century. Sci. Am., 3, 94 –104. [3] Modukuri, K.K., Hariri, S. and Chalfoun, N. (2005) Autonomous Middleware Framework for Sensor Networks. Proc. ICPS 2005, Santorini, Greece, July 12 –14, pp. 17 –26. IEEE Computer Society, USA. [4] Ranganathan, A. and Campbell, R. (2003) A Middleware for Context-Aware Agents in Ubiquitous Computing Environments. Proc. Middleware 2003, Rio de Janeiro, Brazil, June 16–20, pp. 143–161. Springer, Berlin. [5] Chen, H.-L. (2004) An intelligent broker architecture for pervasive context-aware systems. Ph.D. Thesis, University of Maryland, USA. [6] Kiani, S.-L., Riaz, M., Lee, S. and Lee, Y. (2005) Context Awareness in Large Scale Ubiquitous Environments with a Service Oriented Distributed Middleware. Proc. ACIS 2005, Sidney, Australia, November 30–December 2, pp. 513–518. IEEE Computer Society, USA. [7] Yau, S.S. and Karim, F. (2001) Context-Sensitive Middleware for Real-Time Software in Ubiquitous Computing Environments. Proc. ISORC 2001, Magdeburg, Germany, May 2–4, pp. 163 –171. IEEE Computer Society, USA. [8] Takahashi, H., Suganuma, T. and Shiratori, N. (2005) AMUSE: An Agent-Based Middleware for Context-Aware Ubiquitous Services. Proc. ICPADS’05, Fukuoka, Japan, July 20–22, pp. 743 –749. IEEE Computer Society, USA. [9] Kawsar, F., Fujinami, K. and Nakajima, T. (2005) Experiences with Developing Context-Aware Applications with Augmented Artefacts. Proc. 1st Int. Workshop on Personalized Context Modeling and Management for UbiComp Applications, A Workshop in Conjunction with UbiComp2005, Tokyo, Japan, September 11–14, pp. 111 –120. Springer, Berlin. [10] Gellersen, H.W., Schmidt, A. and Beigl, M. (2000) Adding Some Smartness to Devices and Everyday Things. Proc. WMCSA’00, Monterey, USA, December 2 –8, pp. 3–10. IEEE Computer Society, USA. [11] Brunette, W., Lester, J., Rea, A. and Borriello, G. (2005) Some Sensor Network Elements for Ubiquitous Computing. Proc. IPSN 2005, Los Angeles, USA, April 25 –27, pp. 388–392. IEEE Computer Society, USA. [12] Ho, L., Moh, M., Walker, Z., Hamada, Z. and Su, C. F. (2005) A Prototype on RFID and Sensor Networks for Elder Healthcare: Progress Report. Proc. 2005 ACM SIGCOMM Workshop on Experimental Approaches to Wireless Network Design and Analysis, Philadelphia, USA, August 22, pp. 70– 75. ACM, USA. [13] Englund, C. and Walling, H. (2004) RIFD in wireless sensor network. Master’s Thesis, Chalmers University of Technology, Sweden. [14] Franklin, M-J., Jeffery, S-R., Krishnamurthy, S., Reiss, F., Rizvi, S., Wu, E., Cooper, O., Edakkunni, A. and Hong, W. (2005) Design Considerations for High Fan-In Systems:
[15]
[16]
[17]
[18]
[19]
[20]
[21]
[22] [23] [24]
[25]
[26]
[27]
[28]
[29]
[30]
The HiFi Approach. Proc. CIDR 2005, Asilomar, USA, January 4– 7, pp. 290–304. VLDB Endowment, USA. Zhang, L. and Wang, Z. (2006) Integration of RFID into Wireless Sensor Networks: Architectures, Opportunities and Challenging Problems. Proc.GCCW ’06, Hunan, China, October 21 –23, pp. 463–469. IEEE Computer Society, USA. PROMISE FP6 507100 (2005) Product Lifecycle Management and Information Tracking Using Smart Embedded Systems. PROMISE, The PROMISE Consortium, EU. G1RD-CT-2001-00562 D19 (2005) Final Reference Architecture and Design Guidelines for ELIMA-IMS. The ELIMA Consortium, EU. AUTOIDLABS-WP-SWNET-018 (2007) Architecture Development for Sensor Integration in the EPCglobal Network. AutoID-Labs. Cho, N., Song, S-J., Lee, J-Y., Kim, S., Kim, S. and Yoo, K. J. (2005) A 8-/spl mu/W, 0.3-mm/sup 2/ RF-Powered Transponder with Temperature Sensor for Wireless Environmental Monitoring. Proc. ISCAS 2005, Kobe, Japan, May 23–26, pp. 4763–4766. IEEE, USA. Mitsugi, M. (2006) Multipurpose Sensor RFID Tag. Proc. APMC 2006 Workshop on Emerging Technologies and Applications of RFID, Yokohama, Japan, December 12– 15, pp. 143–148. IEICE, Japan. Opasjumruskit, K., Thanthipwan, T., Sathusen, O., Sirinamarattana, P., Gadmanee, P., Pootarapan, E., Wongkomet, N., Thanachayanont, A. and Thamsirianunt, M. (2006) Self-powered wireless temperature sensors exploit RFID technology. IEEE Pervasive Comput., 5, 54–61. Roberti, M. (2004) Navy revs up RFID sensors. RFID J. http:// www.rfidjournal.com/article/articleview/990/1/1. Gilbert, A. (2004) HP developing ‘smart rack’ to ease data center work. CNET News.com, October 29. Braginsky, D. and Estrin, D. (2002) Rumor Routing Algorithm for Sensor Networks. Proc. WSNA’02, Atlanta, USA, September 28, pp. 22–31. ACM, USA. Intanagonwiwat, C., Govindan, R. and Estrin, D. (2000) Directed Diffusion: A Scalable and Robust Communication Paradigm for Sensor Networks. Proc. MobiCom’00, Boston, USA, August 6–11, pp. 56– 67. ACM, USA. Sohrabi, K., Gao, J., Ailawadhi, V. and Pottie, G. (2000) Protocols for self-organization of a wireless sensor network. IEEE Pers. Commun., 7, 16–27. Xu, Y., Heidemann, J. and Estrin, D. (2001) Geography-Informed Energy Conservation for Ad Hoc Routing. Proc. MobiCom’01, July 16–21, pp. 70–84. ACM, USA. Kandula, S., Hou, J. and Sha, L. (2004) A Case for Resource Heterogeneity in Large Sensor Networks. Proc. MilCom 2004, October 31–November 3, pp. 502–509. IEEE Computer Society, USA. Olariu, S. and Xu, Q. (2005) A simple and robust virtual infrastructure for massively deployed wireless sensor networks. Comput. Communications, 28, 1505–1516. Bandyopadhyay, S. and Coyle, E. (2003) An Energy Efficient Hierarchical Clustering Algorithm for Wireless Sensor
THE COMPUTER JOURNAL, Vol. 52 No. 2, 2009
ENERGY-EFFICIENT WSN/RFID INTEGRATION
[31]
[32]
[33]
[34]
[35]
[36]
[37]
[38]
[39]
[40]
Networks. Proc. InfoCom’03, April 1–3, pp. 1713–1723. IEEE Communications Society, USA. Chan, H. and Perrig, A. (2004) ACE: An Emergent Algorithm for Highly Uniform Cluster Formation. Proc. EWSN’04, Berlin, Germany, January 19–21, pp. 154 –71, Springer, Berlin. Kuhn, F., Moscibroda, T. and Wattenhofer, R. (2004) Initializing Newly Deployed Ad Hoc and Sensor Networks. Proc. MobiCom’04, Philadelphia, USA, September 26 – October 1, pp. 260 –274. ACM, USA. Chen, B., Jamieson, K., Balakrishnan, H. and Morris, R. (2001) Span: An Energy-Efficient Coordination Algorithm for Topology Maintenance in Ad Hoc Wireless Networks. Proc. MobiCom’01, July 16–21, pp. 85 –96. ACM, USA. Heinzelman, W. B., Chandrakasan, A. -P. and Balakrishnan, H. (2002) An Application-Specific Protocol Architecture for Wireless Microsensor Networks. IEEE Trans. Wirel Commun., 1, 660 –670. Liang, Y. and Yu, H. (2005) Energy Adaptive Cluster-Head Selection for Wireless Sensor Networks. Proc. PDCAT’05, December 5–8, pp. 634 –638. IEEE Computer Society, USA. Ye, M., Li, C., Chen, G. and Wu, J. (2005) EECS: An Energy Efficient Clustering Scheme in Wireless Sensor Networks. Proc. IPCCC’05, Phoenix, USA, April 7–9, pp. 535–540. IEEE Computer Society, USA. Wang, Y., Zhao, Q. and Zheng, D. (2004) Energy-Driven Adaptive Clustering Data Collection Protocol in Wireless Sensor Networks. Proc. ICMA’04,, August 26–31, pp. 599– 604. IEEE, USA. Younis, O. and Fahmy, S. (2004) HEED: A Hybrid, Energy-Efficient, Distributed Clustering Approach for Ad Hoc Sensor Networks. IEEE Trans. Mob. Comput., 3, 366– 378. Basagni, S. (1999) Distributed Clustering for Ad Hoc Networks. Proc. ISPAN’99, June 23 –25, pp. 310 –316. IEEE Computer Society, USA. Dimokas, N., Katsaros, D. and Manolopoulos, Y. (2007) Node Clustering in Wireless Sensor Networks by Considering Structural Characteristics of the Network Graph. Proc.
[41] [42]
[43]
[44]
[45]
[46]
[47]
[48]
[49]
267
ITNG’07. , April 2 –4, pp. 122–127. IEEE Computer Society, USA. EPCglobal Inc. (2005) EPCTM Tag Data Standards Version 1.3. EPCglobal Inc, Brussels, Belgium. EPCglobal Inc. (2005) Class 1 Generation 2 UHF Air Interface Protocol Standard Version 1.1.0: Gen 2. EPCglobal Inc., Brussels, Belgium. Sa´nchez Lo´pez, T. and Kim, D. (2007) Building Smart Spaces with Intelligent Objects. In Syukur, E., Yang, L.T. and Loke, S. (eds). Handbook on Mobile and Ubiquitous Computing: Innovations and Perspective. American Scientific Publishers, USA. Chen, M. and Zhao, Q. (2005) Maximizing the Lifetime of Sensor Network Using Local Information on Channel State and Residual Energy. Proc. CISS’05, Baltimore, USA, March 16 –18, pp. 235–240. IEEE Information Theory Society, USA. Heinzelman, W.R., Chandrakasan, A. and Balakrishnan, H. (2000) Energy-Efficient Communication Protocol for Wireless Microsensor Networks. Proc. HICSS’00, Maui, USA, January 4–7, pp. 10. IEEE Computer Society, USA. Kim, D., Sanchez Lopez, T., Yoo, S. and Sung, J. (2005) ANTS: An Evolvable Network of Tiny Sensors. Proc. EUC’2005, Nagasaki, Japan, December 6– 9, pp. 142–151. Springer, Berlin. Do, T., Kim, D., Sanchez, T., Kim, H., Hong, S., Pham, M., Lee, K. and Park, S. (2005) An evolvable operating system for wireless sensor networks. Int. J. Softw. Eng. Knowl. Eng., 15, 265–270. Lee, K., Kim, J., Do, T., Kim, D., Ahn, S. and Yang, J. (2006) Multi-Hop Network Re-Programming Model for Wireless Sensor Networks. Proc. Sensors 2006, October 22–25, pp. 884–887. IEEE Sensors Council, USA. Eclipse Foundation. (2007) New Project Releases Continue to Drive Adoption of Eclipse in the Embedded and Device Development Community. The Eclipse Foundation, Press Release, Silicon Valley, USA.
THE COMPUTER JOURNAL, Vol. 52 No. 2, 2009