Adaptive Neighbor Discovery for Mobile and Low ... - Semantic Scholar

1 downloads 98875 Views 1008KB Size Report
Oct 25, 2012 - communication between sensors is completely ad hoc, espe- cially when ... derstanding of neighborhood that nearby devices share. We propose ...... [2] Semantic service provisioning for the internet of things using future ...
Adaptive Neighbor Discovery for Mobile and Low Power Wireless Sensor Networks Dimitrios Amaxilatis

Georgios Oikonomou

Computer Technology Institute & Press “Diophantus” Computer Engineering and Informatics Department, University of Patras Patras, Greece

Computer Engineering and Informatics Department, University of Patras Patras, Greece

[email protected]

Ioannis Chatzigiannakis

Computer Technology Institute & Press “Diophantus” Computer Engineering and Informatics Department, [email protected] University of Patras Patras, Greece

[email protected]

ABSTRACT

1.

Wireless Sensor Networks are by nature highly dynamic and communication between sensors is completely ad hoc, especially when mobile devices are part of the setup. Numerous protocols and applications proposed for such networks operate on the assumption that knowledge of the neighborhood is a priori available to all nodes. As a result, WSN deployments need to use or implement from scratch a neighborhood discovery mechanism. In this work we present a new protocol based on adaptive periodic beacon exchanges. We totally avoid continuous beaconing by adjusting the rate of broadcasts using the concept of consistency over the understanding of neighborhood that nearby devices share. We propose, implement and evaluate our adaptive neighborhood discovery protocol over our experimental testbed and using large scale simulations. Our results indicate that the new protocol operates more efficiently than existing reference implementations while it provides valid information to applications that use it. Extensive performance evaluation indicates that it successfully reduces generated network traffic by 90% and increases network lifetime by 20% compared to existing mechanisms that rely on continuous beaconing.

Over recent years, Wireless Sensor Networks are proposed as a valuable tool towards the realization of Future and Smart Cities. Many recent academic and industrial studies provided the knowledge to make large scale WSN installations reliable. In many cases WSNs are characterized as low power and lossy networks. Devices operate solely on small power cells with no or minimal ability to recharge while communication with nearby nodes is neither guaranteed nor cheap in terms of power requirements. As a result, already known and studied protocols for Computer Networks are not always suitable for WSNs. Although communication failures can be dealt with methods like retransmission, energy concerns rise and impose the need for a different way of dealing with such problems. Concepts like Fault Tolerance and Sleep Scheduling were introduced in the theoretical models to design robust and self maintained algorithms. One of the most important issues faced by algorithms running on WSNs is the erratic behavior of the communication channel. It is quite common for sudden changes in the quality of the communication medium or nodes with poor communication channel (i.e., due to local interference, or node positioning), to greatly affect the stability and performance of an entire network running an otherwise stable software module. It is therefore critical to provide Neighborhood Discovery mechanisms for establishing local connectivity awareness with the ability to characterize the stability of the neighboring nodes so that the higher applications can adjust their operation to frequent and/or significant topology changes. The need for such a mechanism is common in many protocols (i.e., the routing protocol [18] and the clustering protocols [3, 4, 17]). A number of different methodologies are proposed in the relevant bibliography. We here focus on some very recent results. In [22] a leader based neighborhood discover protocol is presented. Initially, a node is selected as leader that starts the discovery process by broadcasting a special request message. Nodes respond to the leader with short feedback messages. When the leader has identified all its neighbors, the leadership passes to the next node until all nodes have discovered their neighbors. [23] proposes a probabilistic scheme for solving the neighborhood discovery problem. Each neighbor is characterized in 2 states (Good or Bad) and nodes become neighbors or are removed from the neighborhood based on a specific probability function. In [14], a polling

Categories and Subject Descriptors C.2.3 [Network Operations]: Network monitoring; C.2.4 [Distributed Systems]: Distributed applications

General Terms Design, Experimentation, Performance Evaluation

Keywords Wireless Sensor Networks, Low Power Networks, Mobile Networks, Neighborhood Discovery, Adaptive Protocols, Protocol Design, Experimental Evaluation

Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. To copy otherwise, to republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. MSWiM’12, October 21–25, 2012, Paphos, Cyprus. Copyright 2012 ACM 978-1-4503-1628-6/12/10 ...$15.00.

INTRODUCTION

based methodology is adopted for neighborhood discovery as an integrated part of the MAC layer for WSNs. Also in [13] an adaptive beaconing protocol that detects only the size of the neighborhood is presented. Our work is inspired by Trickle [16], a protocol that comes to solve the problem of consensus in Distributed Systems using the concept of “polite gossip”. Devices, in need of a consistent shared piece of information, notify the rest of the network of their own version. Incoming versions are merged with the local one and a new common version is generated. The “polite” part of the solution comes up when information exchanged requires no merging. Then the information exchange rate is relaxed, thus less traffic is generated and nodes save their much needed power. If, for any reason, an inconsistent version is received, messaging rates rise to maximum to make sure that all devices get notified immediately. In scenarios where no changes happen in the network (i.e., during the night in an office building monitoring scenario) message rates can be reduced and energy requirements can be lowered, while during highly unstable situations (i.e., during working hours) higher message rates can be used to achieve the required results. In this work we present an adaptive fully decentralized neighborhood discovery mechanism that is based on the periodic broadcasting of beacon messages. In contrast to [23], we do not use simple HELLO messages; our beacons include MAC information of all the neighbors of each node thus allowing nodes to establish a common understanding of how the local neighborhood is perceived by nearby nodes. Moreover, we totally avoid a fixed time interval of periodically broadcasting the message updates; instead our protocol proactively increases the period when nodes reach a consensus in the spirit of Trickle. We further improve the performance of the protocol by introducing mechanisms to adapt to the size and communication quality of the network without any prior knowledge of the topology. Our experimental findings provide strong evidence that we manage to reduce the overhead imposed on the communication medium when operated in low dynamics networks. Furthermore, we propose a series of improvements over the initial protocol to make it suitable for topologies with mobile nodes. Our protocol manages to limit regular message exchanges to mobile nodes thus minimizing the energy consumption of static nodes resulting. Our experimental evidence indicate that the adaptive mechanism successfully reduces message transmissions and minimizes the energy consumption. Duty cycling can further reduce power needs and thus lead to longer operation of the WSN. Our implementation is part of the Wiselib WSN code library [7], that allows OS-independent implementations for various WSN platforms such as Contiki, TinyOS and iSense. To reduce the complexity and code size of the protocols running on each sensor, we follow the approach of [19]. We implement our protocol as an external service that other protocols can use. The Unifying Link Abstraction layer lies between the physical Link Layer and the other protocols and applications executed on the sensor node. Its purpose is to abstract the link layer’s details from protocols’ send/receive functions and transmit node’s messages efficiently. Higherlayer protocols rely on the ULA to deliver messages to all nodes in the neighborhood and ULA can then decide on the optimal transmission rate of messages or broadcasting power

required based on predefined thresholds and options. ULA also notifies other protocols of neighborhood changes. We conduct extensive simulations and real device experiments as we consider both to be essential parts of the development process of robust and efficient algorithms. For the simulations we scale up to 1000 nodes while in our experiments with real devices we work in testbeds of up to 35 nodes, and prove that on average our protocol achieves neighborhood discovery using 90% less messages and thus allows battery powered devices to consume less power and operate for 20% more time on the same power. In Section 2 we present a representative periodic beaconing mechanism with fixed transmission periods. The algorithm is implemented as part of ULA, along with various extensions to improve its suitability for low power and Lossy networks. We use this algorithm as a reference to evaluate the performance of our algorithm that is presented in details in Section 3. We showcase the results of the evaluation we performed on large scale simulations and real hardware platforms in Section 5. Finally the paper is concluded in Section 6 where we also discuss future research directions.

2.

FIXED NEIGHBOR DISCOVERY

Beaconing is currently the most effective methodology for neighborhood discovery. Many protocols for Ad hoc Mobile Networks and WSNs use it to identify neighbors either as an embedded sub-protocol or as an external service provided by another protocol. ULA attempts to define the characteristics of a neighborhood discovery protocol for WSN and indicates that each implementation should provide a registration mechanism for applications to exchange data on top of periodic beacons (using piggybacking) and a Notification mechanism for higher applications to receive changes in the neighborhood. With the term beaconing [3] we refer to the exchange of special messages containing information not only for the presence of the node itself but also for its view of the neighborhood. Each beacon contains at least the full list of neighbors available at the moment which in general are the nodes whose beacons are regularly received and comply with a set of given requirements. Also these special messages we use, unlike the HELLO messages in [23], contain indicators to estimate the state of the communication channel and classify neighbors. Based on the information contained (more details in 4.1) nodes can detect bad neighbors and assess link symmetry. In this work we use the protocol presented in [3] (which we call the Fixed-ND protocol) as a reference protocol for evaluating our solution by conducting a comparative experimental study. The selection of [3] is because the protocol is already implemented in Wiselib (see Sec.4), is thoroughly tested in the context of project WISEBED [11] and used in other experiments (e.g., [8],[10]). The protocol uses beaconing on fixed intervals to detect changes in the topology. When no beacons are received from a particular node after a predefined timeout period, the node is dropped from the neighborhood. The beacons are also used to assess the quality and symmetry (whether they are Unidirectional or Bidirectional) of the links. In a Unidirectional link only one of the nodes can receive the beacons of the second while Bidirectional nodes can have two way communication. In more details, for each received beacon message, FixedND examines a number of indicator values which define the

quality of the communication channel with it’s neighboring node. Then, based on these indicators, it decides if a node should be considered as a “stable” neighboring node. More specifically, if the Fixed-ND receives at least 3 consecutive beacons from a single neighbor whose indicator values are above certain thresholds then the neighbor is marked “stable”. The stable neighboring nodes are attached to each broadcast packet and when a node receives a beacon, it checks whether its address is listed in the received message. In this way, Fixed-ND is able to recognize whether the communication with the neighboring nodes is bi-directional or not. If Fixed-ND stops receiving beacons from a neighbor, or if the beacons received do not match the defined indicators, it will remove the node from the list of neighbors after a predefined amount of time. The indicators used for examining the quality of the communication channels are (a) the LQI of the received beacons, (b) the RSSI of the received beacons, (c) the link associativity [21] (the time, in beacons, that nodes are associated, i.e., they retain a connection), (d) the node stability [6] (the average link associativity for all neighboring nodes) and (e) the reverse node stability [10] (defined as a result of experimentation, indicating the average numbers of consecutive beacons that successfully delivered on a destination). The goal is to filter out the neighbors that have poor communication channel quality. The nodes will consider the broadcaster as a neighboring node only if it receives a number of consecutive beacon messages with RSSI/LQI above a certain threshold. In order to avoid occasional short channel degradation to negatively impact the above strategy, we allow a node to miss a number of beacons within a given period of time before removing it (called the timeout period ). However we set a second RSSI/LQI threshold; message beacons with RSSI/LQI below this threshold are dropped (and therefore count towards the number of beacons that are missed). Fixed-ND can parameterize its mode of operation based on the requirements of the higher-level applications. Depending on the requests, it fine tunes (i) the periodicity of examining the condition of the nearby devices, (ii) the frequency of generating notifications for the changes in the nearby topology, (iii) the indicators that will be used to characterize the quality of the communication channel, and (iv) the contents of the beacon message.

3.

ADAPTIVE NEIGHBOR DISCOVERY

We now present our adaptive neighbor discovery algorithm which we call Adaptive-ND. Our goal is to avoid constant periodic beacon exchanges, instead we wish to adapt the beacon broadcast period to achieve low energy consumption when the network is relatively stable. The beacon interval is controlled by each node independently based on its local perception on the consistency of the network, i.e., the changes to the local neighborhood detected by the node. We use a basic rule: as long as a node does not detect any changes on its neighborhood (i.e., it is consistent) the beaconing interval period is doubled until a maximum beaconing interval period is reached. Whenever a changed or a new neighboring node is detected (or lost), the beaconing interval is reduced to a predefined minimum beaconing interval period. In more detail, Adaptive-ND nodes transmit a maximum of one message Beacon during each interval period. During this period, the node examines all beacons received by the

neighboring nodes; a beacon that has not been sent from a known neighbor (e.g., a new node) is said to be consistent and if the node only receives consistent beacons it is characterized as consistent. If an inconsistent message beacon is received, i.e., a beacon that originates from an unknown node, the node becomes inconsistent. Therefore, consistency is defined by the merging incoming beacons with the local neighborhood status. When an interval expires, nodes decide on the next interval’s duration and the resulting message rate. If the node is consistent, the next interval will be of double duration and the message rate will be cut down to half. If on the contrary, the node is not consistent, the interval goes down to a minimum duration and message rate rises to the maximum. The minimum and maximum beaconing intervals are properly selected by the network designer in order to achieve fast convergence and low message rates during consistent periods (in the Sec. 5 we conduct experiments on real devices and large scale simulations to understand the effect of the minimum and maximum beaconing intervals on the performance of our protocol). Whenever a node decides on a new beaconing interval, a time moment t is selected and marked as the transmission event time. At the time of t, the node will check the number of consistent beacons received and decide whether to send his own beacon or not. When the node is inconsistent, a message is sent to notify others of its current state. The time t is a random time during the interval to ensure low congestion at the moment of transmission.

3.1

Control of the Adaptation Process

We control the adaptation process of Adaptive-ND to the unique characteristics of different WSNs by setting the following three protocol parameters: Imin – the minimum time interval Imax – the maximum time interval k – the number of consistent messages per interval required for a node to become consistent Imin and Imax control the beaconing rate of our protocol. Inconsistent nodes transmit a beacon every Imin . To achieve better response time to changes in the neighborhood we need to set Imin to a very low value but not too low as this would cause flooding and would degrade the communication channels. Imax affects only consistent nodes and represents how relaxed beaconing can become when consistency is achieved. The more we relax beaconing the higher response times to changes become. The value for k is used to decide the state of a node and in our scenario it depends completely on the size of the neighborhood of each individual setup. k is compared during the transmission events to an internal counter c of the consistent messages received. If enough consistent messages are received (c >= k) there is no need to send a beacon as we assume that the network is stable. If on the other hand, less than k consistent messages are received (c < k), we consider that our knowledge of the neighborhood may be outdated or incomplete and therefore a new Beacon is transmitted. The value of c is set to 0 after each new Interval to count new beacons during it. As a result, when we have a dense network, higher values for k are required to keep track of the neighborhood. When we have a sparse setup with a wrong value for k, the consistency requirements may never be met.

3.2

Characterizing Node Consistency

From the above it is clear how the value of k is crucial to the overall performance of our protocol. Choosing a certain value may cause false inconsistencies or drop events resulting to unnecessary high message exchange rates that cancel out the advantages of the adaptive operation. We propose and evaluate two different versions of Adaptive-ND that are influenced differently by this parameter. Experiments presented in Sec. 5 clearly highlight the advantages and disadvantages of each approach. FixK maintains a constant value for k during the lifetime of the network. A node expects a neighborhood of size close to k and does so uniformly during its whole operation. This design choice is more straight forward and suitable for evenly populated networks where we can decide prior to installation what is the size of the expected neighborhood. AverageK chooses different values for k on each node of the network after every transmission event. Each node adjusts its k value according to the number of its consistency during past Intervals. The value of k is re-calculated using Alg. 1: The advantage of this solution is that each node Algorithm 1 Calculating new value for k intervalcounter + + consistent messtotal + = consistent messreceived kcurrent ← ceil(consistent messtotal /intervalcounter ) knew ← kprev ∗ w + kcurrent ∗ (1 − w) consistent messreceived ← 0 uses an estimate of the expected consistent messages and the decision for the next transmission event is more accurate on a local scale. We expect this approach to be more efficient in terms of congestion and power in dynamic networks where the neighborhoods are periodically changing, or networks with unevenly distributed sensors. To avoid sharp changes in the value of k, the new value is actually a linear combination of both the old and the new value with adjustable weights.

3.3

Assessing Link Quality Indicators

Link Quality Indicators (LQI) provided by the MAC layer for each received incoming beacon are used to better evaluate the neighboring nodes that are either too far away or with limited transmission capabilities. The goal is to filter out the neighbors that have poor communication channel quality. Using such indicators has proven to be a reliable solution when trying to define the exact neighborhood of a node [3]. The nodes will consider the broadcaster as a neighboring node only if it receives a number of consecutive beacon messages with LQI above a certain threshold. In order to avoid occasional short channel degradation to negatively impact the above strategy, the algorithm allows a node to miss a number of beacons within a given period of time before removing it (called the timeout period). A second LQI threshold is also set; message beacons with LQI below this threshold are dropped (and therefore count towards the number of beacons that are missed). During the first steps of our hardware evaluation we realized that certain nodes on the outskirts of the neighborhoods were constantly causing instability mainly because of high message loss rate. We decided to address that problem by introducing a mechanism to identify and exclude these weak connections based on the LQI value of each incoming message. We use 2 different LQI thresholds, one strict and one

more relaxed to characterize incoming beacons as presented in Alg. 2. The first is used to accept any node in the neighborhood and the second more relaxed threshold is required for the rest of the time, as the node has proven its reliability. Internally, 2 LQI values are kept for each individual Neighbor. The LQI value of the last incoming message, and a value provided by the Neighbor which is the LQI value of the last outgoing message. These values can also set a node to an inconsistent state. If a node receives a beacon where his reported LQI value is greatly different than the previous one, he considers himself inconsistent. Algorithm 2 Processing Beacons if node is in neighbor list then if lqi ≥ thresholdmin then neighbor list.update(node) else drop beacon end if else if lqi ≥ thresholdmax then neighbor list.add(node) end if end if

3.4

Dealing with Low Power and Lossy Links

Link failures are not unusual events in WSNs even for neighbors whose LQI are above certain thresholds. Experimental evidence indicates that message transmissions, even from nearby nodes, will not be received all the time. To avoid removing from our neighborhood nodes that have proven their consistency but for some reason occasionally lose a message or two, we define a timeout period for which a link is considered valid even if a message beacon is not received. Previous Experiments [3, 10, 23] have shown that up to two beacons may be lost (especially on dense networks) so as a good practice we set the timeout close to the time period equivalent to 3 consecutive beacons. However, this may turn out to be non-trivial as beacon broadcasting periods are not predefined and change during the execution of the protocol as part of the adaptation process. Note that using a higher timeout period will cause slow responses to nodes leaving the neighborhood, while lower timeouts will cause events that do not correspond to physical events. As an extra feature to ensure that beaconing rates do not fall too low and reduce the validity of the reported neighborhood we add an override transmission event to ensure that beacons will be transmitted to refresh the information available on the nodes. Taking into consideration the relaxed beaconing of AdaptiveND defining the timeout period is not as straightforward as for Fixed-ND. Timeouts should not only be bounded by Imax as nodes can choose not to transmit a message during every interval. Therefore, to avoid falsely deleted neighbors in our implementation, we consider that the timeout should not also be less than 25 Imax . This value is computed as the more relaxed interval between two successfully received consecutive beacons while 2 communication failures can happen. max max Imax T imeout = 2Tlost + Tsuccesf = 5Imax ul = 2Imax + 2 2 Of course the timeout selection depends completely on the

special network characteristics but the above threshold provided a reliable behaviour during all our experiments.

4.

IMPLEMENTATION DETAILS

We implement the Adaptive-ND algorithm using Wiselib [7], a code library for WSNs, that allows OS-independent implementations for various WSN platforms. The Fixed-ND algorithm is already provided by the library [3]. Algorithms are implemented on a subset C++ using templates and callbacks, but not virtual inheritance or exceptions that are not available on older platforms. Algorithm implementations can be recompiled for several platforms and firmwares, without any code changes. Wiselib currently supports platforms like iSense, Contiki, TelosB and the WSN simulator Shawn[12] for testing and debugging, with plans to support mobile devices like Android and iPhone. The ability to run the same application on a simulator (Shawn) and with no changes evaluate the operation of our implementation on real hardware is a huge advantage that really speeds up development.

4.1

Message Beacons

The beacons exchanged by Adaptive-ND and Fixed-ND follow the ULA format. The beacon header consists of a 1Byte Message id (required for all Wiselib Applications) and 2 counters for the number on neighbors and application payloads contained in the message. The list of neighbors is an array of 2Byte neighbor MAC addresses in the plain implementation while when using LQI values we add after each address the respective LQI value as an unsigned 8bit integer. Finally after the information about the Neighborhood we add, if they exist, the payloads of the applications registered on our algorithm, as triples of Application Id, Size and Data. Due to hardware limitations from the Radio of Wiselib platforms, a single beacon cannot contain an unlimited number of neighbors or piggybacked payloads of very big size. In Wiselib, packets are limited to 116Bytes and as a result, it may include a maximum of 56 neighbors on each beacon when we do not use LQI thresholds or 37 neighbors with LQI. If we need to operate on a larger neighborhood we can use the Wiselib Fragmenting Radio and transmit beacons larger than a single message reach a neighbor of up to 255 nodes which is the limit of the unsigned integer counter used for the neighbors counter in the message header. Working with Wiselib also gives us the freedom to work on an abstraction from the actual MAC layer implementation and helps move with minimal effort to 6LoWPAN [15] and IPv6 addressing. In Wiselib data types like Node Id or platform specific characteristics like maximum packet length are defined during compilation target platform and applications are developed in a generic format disconnected from the actual deployment platform (i.e., using make isense or make tinyos-telosb we compile the same application for iSense or TelosB devices). As a result, the transition to 6LoWPAN, when this becomes available in Wiselib, will simply be a matter of compiling the application to the new target. 6LoWPAN offers packets of 1280Bytes and 8Byte addresses, making it possible to store up to 150 unique neighbors in each beacon.

4.2

Piggybacking

It is common among many existing algorithms to periodically exchange data as new events are generated. Normally

this is done by broadcasting messages containing the updated information. This can often lead to the generation of excess messages waste of precious memory space when more that one algorithm is running on the same device and needlessly duplicate the previous mechanism. Fixed-ND provides a piggybacking technique that can be significantly reduce the rate of broadcasting messages, by allowing higherlayer applications to take advantage of its own broadcasting mechanism. The piggybacking technique exposes an interface that allows other applications to attach their data on the beacon messages of the Fixed-ND, and get notified by a callback mechanism when new data are received. Fixed-ND will gather all the data from the different applications and will add them to the payload of the next beacon message, and upon receiving the beacon it will unpack the data and deliver them to the relevant receivers. For example, a Clustering protocol can use this technique so that the nodes also broadcast their role (cluster head, cluster member).

5.

PERFORMANCE EVALUATION

To evaluate the performance of Adaptive-ND we conduct a series of large scale simulations on Shawn and real world experiments in Testbeds of up to 35 iSense[1] nodes. We comparatively evaluate the performance of our protocol with the Fixed-ND protocol which we consider to be the reference. We consider as pointed in [5, 20] that an extensive analysis of any WSN application based on simulations before deployment on real hardware is crucial and can provide a beneficial initial feedback on fully managed conditions and no outside interference. The metrics we concentrate on during experiments and simulations as well as the experimental setup are described in the rest of this section. Messages: With the term messages we describe the Beacons each algorithm transmits over the 802.15.4 wireless network. Message exchanges are one of the most costly operations in WSNs and with Adaptive-ND we limit the amount of messages needed to identify and maintain neighbors. Events: All changes a neighborhood discovery protocol reports to any registered applications and/or higher-level protocol. In general we report 4 types of events. The NewNeighbor (NB) events, occur when a node detects for the first time a new neighbor and represent uni-directional links. The NewBidi (NBB) events occur when both 2 nodes consider each other as neighbors and form a bi-directional link. The NeighborLost (NBL) events when nodes demote a bidirectional to a uni-directional neighbor and finally the NeighborDrop (NBD) events when there is no communication with a neighbor and nodes remove him from their lists. Lifetime: This term is used only in the device experiments where nodes operate using a limited power cell. Lifetime of a node is the time until the device runs out of power and is not part of the neighborhood any more. Stability: A neighborhood is stable when all nodes and neighbors are correctly identified. We expect that in a stable neighborhood a very limited number of changes that result in new events occur. Density and Diameter: Density of a WSN is the number of existing nodes divided by the area covered by the network. The more nodes we place in a specific area, the bigger neighborhoods get, and the more messages nodes need to process during the execution of the neighborhood discovery

mechanism. Diameter is the longest shortest path between any two nodes of the WSN. Simulation and Experimental goals: The goal of the Shawn simulations is to examine the scalability and performance of Adaptive-ND in controlled environments (topologies) of up to 1000 nodes. Each topology describes different a WSN based on two characteristics critical for the operation of WSN algorithms, density and diameter. Also we performed a number of comparison experiments between the previous ND protocol available in Wiselib and Adaptive-ND. The experiments on real devices were divided into 3 stages. First we tested the functionality and performance of our implementation with repeated 20 minute experiments, to eliminate any error and confirm the correctness of our implementation on real hardware. Also we used these experiments to understand how the different choices in Imin , Imax and k affect Adaptive-ND. Secondly, we experimented with battery powered devices and compared the lifetime of a network operating on the two protocols and proved that the AdaptiveND approach would consume less power even without any duty cycling. Finally we experimented with mobile nodes to identify how Adaptive-ND adapts movement and the behavior in terms of messages, events and stability.

5.1

protocols report the same neighborhoods and generate the same events in all experiments. This is an indicator for the correctness of the implementation since in all simulations no communication or device failures occur. Therefore it was easy to compare the results of each protocol. However, as we present in Figure 1 there is a great difference on the amount of traffic generated by the two algorithms. As there are no failures, nodes quickly identify their neighborhoods and then reduce the rate of the transmission events. We calculate that Adaptive-ND only needs an average of 10% of the messages exchanged by Fixed-ND in all topologies to achieve the same result.

Large-Scale Simulations

For the simulations presented below we used topologies with fixed network density of 9 neighbors and increasing diameter, ranging from 1 to 112 hops The results presented in the rest of this section were achieved using the AverageK version of Adaptive-ND. In the simulations, we do not use any LQI threshold as the LQI values in Shawn are constant based on the distance between nodes and do not impact on the results. Time is calculated in synchronous simulation rounds of Shawn where Incoming messages are processed, internal timers and operations are executed and then all existing outgoing messages are sent.

Figure 1: Transmitted Messages from Fixed-ND and Adaptive-ND in a Reliable Network of different sizes (n ∈ [10, 1000]) The first set of experiments acts as a comparison of AdaptiveND and Fixed-ND algorithms and a proof of the correctness of the Adaptive-ND implementation. We run multiple experiments in the topologies described above ranging from 10 to 1000 nodes and for the duration of 300 rounds. AdaptiveND and Fixed-ND have the same timeout period of 20 rounds and the beaconing period of Fixed-ND is set to be the same as the Imin of Adaptive-ND, 2 rounds. We note that both

Figure 2: Transmitted Messages from Adaptive-ND in a Lossy Network (with a 50% message loss rate) of 70 nodes, Period-1: Initialization, Period-2: Lossy, Period-3: Reliable In Figure 2, we showcase the behaviour of Adaptive-ND in a 70 node topology with lossy links (50% of the message exchanges fail) for the duration of 300 rounds. First we have the initialization phase (first 60 rounds of the simulation), when all devices are in an inconsistent state and high beaconing rates are required to quickly identify neighbors. After all neighbors are correctly identified and reported, all nodes are consistent and the beaconing rates go down to a minimum. Then we introduce a 50% message failure chance until round 200 and as we can see more messages are transmitted over time as nodes lose their consistency and start beaconing to identify the new state of the neighborhood. After round 200 we remove the message failures and observe how nodes become consistent once more and intervals between beacons become bigger. This experiment proves how Adaptive-ND adapts to the quality of the links to maintain communication with their neighbors. The behavior of our protocol during the lossy period (see previous experiment) led us to the next experiment. We compare Fixed-ND and Adaptive-ND on the same topologies while communication failures occur. We expect that as we use same timeout periods in all simulations, Fixed-ND will have an advantage since to maintain a connection a node needs to receive a single beacon every 20 rounds. The probability for all the messages to fail during a 20 round period Fixed-ND 10 is Pdrop all = 0.5 . Since Adaptive-ND on a consistent node attempts to send a beacon every Imax = 8 rounds and the timeout period is 20 rounds there may be only 2 attempts to send new beacon during the timeout period. The probabilAdaptive-ND ity for both messages to fail is Pdrop = 0.52 = 0.25 >> all Fixed-ND Pdrop all . This results to Figure 3(a) where Fixed-ND generates far less events. We can see that difference also in Figure 3, since Adaptive-ND attempts to broadcast 57% less

(a) Events Generated

Figure 4: Map of the CTI WSN testbed in the simulations. For the the FixK implementation we choose k = 2. For all experiments the timeout period is 20 seconds and the duration of all experiments is 20 minutes. All experiments were performed during the night when the noise in the testbed environment was minimal.

5.2.1

(b) Transmitted Messages

Figure 3: Fixed-ND and Adaptive-ND in an Lossy Network (50% message loss) of different sizes (n ∈ [10, 100])

messages than Fixed-ND. Even in networks with low quality communication channels a loss rate of 50% is an extreme situation but if this is the case we can modify the AdaptiveND I parameters to transmit messages more frequently and achieve an Fixed-ND like behaviour. The design choice to minimize transmission of messages revealed the trade-off between beaconing intervals and stability.

5.2

Operation of Adaptive-ND and Fixed-ND In Figure 5, we can see how messages are transmitted over time by Fixed-ND (dashed line) and Adaptive-ND (solid line). We see that for Fixed-ND a new beacon is broadcasted every 2 seconds while Adaptive-ND sends less messages and over variable intervals. As each node chooses to send at random intervals, fewer transmission events collide resulting to less congestion and interference between beacons, avoiding degradation of the communication quality. This contributes to successful delivery of more messages and less conflicts also with applications that messages over the network. We note that for the duration of all experiments nodes reported the same neighbors and so other parameters of the mentioned above like stability and events were the same proving the correctness of the operation of Adaptive-ND. The results were

Real Device Experiments

We run our real device experiments on Wisebed[9, 11], a large-scale heterogeneous WSN research testbed installed in 9 geographically disparate European Universities and Research Institutes. We carefully selected 15 iSense devices from the CTI Testbed (node positions are available in Figure 4) and 35 iSense of the UZL Testbed that are very close to the topologies examined in [3]. We did this to produce comparable results using the WISEBED flexible testbed services. iSense are equipped with an IEEE 802.15.4 compliant radio, a 16M Hz 32 − bit RISC controller, 96kbytes of memory, and a highly accurate clock. We report that the measurements collected from the execution of Fixed-ND are very close to those reported in [3, 10, 8]. For this reason we are confident that the protocols studied in [3, 10, 8] can improve their performance by switching Fixed-ND with Adaptive-ND. We set the parameters Imin & Imax of Adaptive-ND to be 2 and 8 seconds respectively close to the parameters used

Figure 5: Transmitted Messages over time for FixedND and Adaptive-ND for a specific node very similar to the respective topologies that were used during simulations. The performance of the protocols in each case is very similar.

5.2.2

FixK vs AverageK

Here we experiment in order to better understand the differences between FixK and AverageK versions of Adaptive-

(a) FixK with k = 2 (a) Adaptive-ND AverageK, without LQI threshold

(b) AverageK (b) Adaptive-ND AverageK, LQI threshold 180 Figure 6: Transmitted Messages in a Real Network of 35 nodes

ND. Figure 6(a) depicts the messages transmitted by FixK. With FixK, less messages are transmitted over time as neighborhoods are larger than 3 nodes and so the consistency requirement is met even when nodes lose some of the messages. On the other hand, the AverageK version has a slightly higher message rate as it adapts to the size of the reported neighborhood. We note that the Adaptive-ND version in both experiments reported the same neighborhoods confirming the correctness of the implementations. The specific characteristics of a WSN define the version of Adaptive-ND we should choose to achieve our main goal and minimize network traffic during stable periods. When the nodes are uniformly distributed over the network without prior knowledge of the deployed topology we can use FixK with the network density as the k value. AverageK is a more adaptive implementation and operates reliably on any given network as each device uses a different k value based on its own neighborhood with a small overhead on the number of messages.

5.2.3

Figure 7: Neighborhood Statistics and even with LQI we need to adapt the LQI value to the special needs of the WSN.

5.2.4

Mobility Experiments

In order to evaluate the performance of the two protocols in case where nodes are mobile, we defined a path within our network deployment. A member of our team carried a sensor node while moving on the predefined path with different walking speeds. The path we followed as well as the positions of the sensors are depicted in Figure 8. To better evaluate the operation of our algorithm with mobile devices we performed slow (1 step every 10 seconds) and fast (1 step every 5 seconds) walk experiments.

Using LQI for refined neighborhood

Next we examined the effect of using LQI thresholds on the operation of Adaptive-ND. For this experiment we present the results of experiments with the AverageK implementation with an LQI threshold of 180. We present the neighborhood statistics in Figure 7. Using LQI to ignore bad neighbors provides much more stable links for the whole duration of the experiment, eliminating devices on the outskirts of the neighborhood that have high rate of communication failures and allows the nodes to reach a consistent state easily. Not using LQI thresholds allows more distant nodes in the neighborhood, and results in less stability as message loss rates are higher over high distances. Without LQI thresholds in real networks, it is very difficult to reach a consistent state

Figure 8: Walk Path for the Mobility Experiment In Figure 9 we show that the mobile node transmits over 80% more messages during the walk while all devices transmit more messages than they would without movement.

This is because mobile nodes are always expected to be inconsistent and transmit regularly, while other nodes operate on longer intervals for the largest part of the experiment. Comparison of the events reported by the nodes simply confirms that all nodes identified the mobile node in their neighborhood an the mobile node identified the changes around him. At this point we need to mention that the mobile node was detected to the neighborhood of fixed nodes faster (on average after 8 seconds) than it did detect them (on average 13 seconds) since its neighborhood was always changing and its beaconing rate was higher. Also results for Fixed-ND do not provide any notable results as message rate is constant and higher than Adaptive-ND in all nodes.

(a) Topology

(b) Average lifetime per Algorithm Figure 10: Lifetime Experiment: Setup and Results result in even longer lifetimes but due to space and time limitations we could not perform. Figure 9: Messages Transmitted per Minute with no Mobile devices, by Mobile and Fixed Nodes during Slow and Fast Walks

5.2.5

Network Lifetime experiments

Results from previous experiments indicate that AdaptiveND achieves the design goal of minimizing message exchanges and while maintaining the neighborhood as the previous approach of Fixed-ND. Our next step is to evaluate the performance of Adaptive-ND on battery powered devices to find out how it affects the lifetime of a WSN in comparison to Fixed-ND. We used 6 devices powered with 2 AA Rechargeable Batteries each and them placed in a single neighborhood around our office rooms (see Figure 10(a)) and a gateway device connected and powered via USB that collected information from all the devices and could provide information about the operation of the battery powered devices. We run consecutive experiments where we used the same 2 AA Batteries for each device, fully recharged for every experiment and confirmed the Voltage of all batteries was the same before each experiment. As we can see from Figure 10(b) nodes in a network running Fixed-ND had an average lifetime of 1332 minutes while both Adaptive-ND implementations achieved a longer lifetime of 1612 minutes for the FixK version and 1406 for the AverageK. We see that in the FixK implementation we achieved on average 21% longer lifetime. We have to mention here that during these experiments all algorithms used no duty cycling and devices operated continuously during the whole experiment. Also taking into account that computations consume far less power than message exchanges the longer lifetime achieved by Adaptive-ND is almost completely due to minimizing beacon exchanges. We believe that introduction of duty cycling will further increase the operation of Adaptive-ND over Fixed-ND, and will

6.

CONCLUSIONS AND FUTURE WORK

In this work we presented a Neighborhood Discovery protocol that uses Adaptive Beaconing to detect and maintain Links between devices using a more efficient methodology than HELLO message exchanges. We did an extensive evaluation of the implemented protocol both in large scale simulations and real world experiments to prove its correctness and efficiency. The results of all the experiments showed that the new protocol achieves in most cases a reduced beaconing rate by 90% with almost no negative effects on the identified neighborhood. The only scenario where fixed interval beaconing outperformed our algorithm was the heavy message loss scenario, where message exchanges failed with a probability of more than 50%. Still, even in such scenarios Adaptive-ND suitably adapts and operates with a similar behavior to Fixed-ND in order to achieve the same stability and effectiveness. Also we showcased how our protocol is suitable for networks that include mobile nodes and more efficient on low power devices where we achieved 20% longer network lifetimes just by minimizing the total number of transmitted messages. Finally, we provided a second version of our protocol that adapts well to WSNs with different characteristics without any a priori knowledge for them and compared it to the original version to show how it suits to networks that are not uniformly populated. One of our next steps will be the introduction of duty cycling on the individual nodes to investigate how devices would respond to situations where not the whole neighborhood is available at any given time. Our algorithm will allow protocols running on top to operate without knowledge or information on the real state of the neighborhood (alive or sleeping nodes) but provide an abstraction of an always online system. We anticipate that duty cycling together with the decreased message exchange rates will be a huge ad-

vantage for our implementation as energy requirements will be even lower and result to even longer network lifetimes, lower power consumption and less network traffic thus an increased quality in the communication channels. Another direction is to investigate how the operation of Adaptive-ND affects protocols (i.e., routing[10], clustering[3, 10],tracking[8]) available on Wiselib[7]. These results will be a helpful feedback to better understand how our algorithm impacts on above protocols and how we will be able to further its operation and the coupling with those protocols.

7.

[13]

ACKNOWLEDGMENTS

This work is partially supported by the European Union under contract numbers ICT-258885 (SPITFIRE [2]).

8.

[12]

[14]

REFERENCES

[1] Coalesenses isense sensors. http://www.coalesenses.com/. [2] Semantic service provisioning for the internet of things using future internet research by experimentation, (SPITFIRE). http://spitfire-project.eu. [3] D. Amaxilatis, I. Chatzigiannakis, S. Dolev, C. Koninis, A. Pyrgelis, and P. Spirakis. Adaptive Hierarchical Network Structures for Wireless Sensor Networks. In Int. Conference on Ad Hoc Networks, AdHocNets ’11. [4] A. D. Amis, R. Prakash, T. H. Vuong, D. T. Huynh, T. H. P, V. Dung, and T. Huynh. Max-min d-cluster formation in wireless ad hoc networks. In IEEE Information Communications Marketplace, INFOCOMM ’00, pages 32–41. [5] D. J. Anthony, W. P. Bennett, M. C. Vuran, M. B. Dwyer, S. Elbaum, and F. Chavez-Ramirez. Simulating and testing mobile wireless sensor networks. In Int. Conference on Modeling, analysis, and simulation of wireless and mobile systems, MSWIM ’10, pages 49–58. [6] A. Bamis, A. Boukerche, I. Chatzigiannakis, and S. Nikoletseas. A mobility aware protocol synthesis for efficient routing in ad hoc mobile networks. Computer Networks, 52(1):130 – 154, 2008. MSWIM’06. [7] T. Baumgartner, I. Chatzigiannakis, S. Fekete, C. Koninis, A. Kr¨ oller, and A. Pyrgelis. Wiselib: A generic algorithm library for heterogeneous sensor networks. Computer Engineering, page 16, 2011. [8] K. Chantzis, C. Koninis, I. Chatzigiannakis, and J. Rolim. Design and evaluation of a lightweight tracking algorithm using wireless sensor networks. In Int. Conference on Mobile Ad-hoc and Sensor Systems, MASS ’11. [9] I. Chatzigiannakis, C. Koninis, G. Mylonas, S. Fischer, and D. Pfisterer. WISEBED: an open large-scale wireless sensor network testbed. In Int. Conference on Sensor Networks Applications, Experimentation and Logistics, 2009. [10] I. Chatzigiannakis and P. Spirakis, editors. Distributed Self-organized Societies of Tiny Artefacts: Design & Implementation. FET Pervasive Adaptation Research, FRONTS Project, 2011. [11] G. Coulson, B. Porter, I. Chatzigiannakis, C. Koninis, S. Fischer, D. Pfisterer, D. Bimschas, T. Braun,

[15]

[16]

[17]

[18]

[19]

[20]

[21]

[22]

[23]

P. Hurni, M. Anwander, G. Wagenknecht, S. Fekete, ˜ uller, and T. Baumgartner. Flexible A. KrA˝ experimentation in wireless sensor networks. Communications of the ACM, 55(1):82–90, 2012. S. P. Fekete, A. Kr¨ oller, S. Fischer, and D. Pfisterer. Shawn: The fast, highly customizable sensor network simulator. In Int. Conference on Networked Sensing Systems, INSS 2007. V. Iyer, A. Pruteanu, and S. Dulman. Netdetect: Neighborhood discovery in wireless networks using adaptive beacons. In 5th Int. Conference Self-Adaptive and Self-Organizing Systems, SASO ’11, pages 31–40. G. Jakllari, W. Luo, and S. V. Krishnamurthy. An integrated neighbor discovery and mac protocol for ad hoc networks using directional antennas. In Int Symposium on a World of Wireless Mobile and Multimedia Networks, WoWMoM ’05, pages 11–21. N. Kushalnagar, G. Montenegro, and C. P. Schumacher. IPv6 over low-power wireless personal area networks (6LoWPANs): Overview, assumptions, problem statement, and goals. RFC 4919, RFC Editor, 2007. P. Levis, N. Patel, D. Culler, and S. Shenker. Trickle: a self-regulating algorithm for code propagation and maintenance in wireless sensor networks. In Symposium on Networked Systems Design and Implementation, NSDI ’04, pages 15–28. P. Nie, Z. Jin, and Y. Gong. Mires++: a reliable, energy-aware clustering algorithm for wireless sensor networks. In Int. Conference on Modeling, analysis, and simulation of wireless and mobile systems, MSWIM ’10, pages 178–186. B. Pavkovi´c, F. Theoleyre, and A. Duda. Multipath opportunistic rpl routing over ieee 802.15.4. In Int. Conference on Modeling, analysis and simulation of wireless and mobile systems, MSWiM ’11, pages 179–186. J. Polastre, J. Hui, P. Levis, J. Zhao, D. Culler, S. Shenker, and I. Stoica. A unifying link abstraction for wireless sensor networks. In Int. Conference on Embedded networked sensor systems, SenSys ’05, pages 76–89. R. Steinmetz. Combining simulations, models and testbeds: possibilities and pitfalls. In Int. Conference on Modeling, analysis and simulation of wireless and mobile systems, MSWiM ’09, pages 1–1. C. K. Toh. Wireless ATM and Ad-hoc Networks: Protocols and Architectures. Kluwer Academic Publishers, 1997. L. Wang, Y. Li, Z. Xu, and S. V. Krishnamurthy. A novel neighbor discovery protocol for ultraviolet wireless networks. In Int. Conference on Modeling, analysis and simulation of wireless and mobile systems, MSWiM ’11, pages 135–142. Z. R. Zaidi, M. Portmann, and W. L. Tan. Analysis of link break detection using hello messages. In Int. Conference on Modeling, analysis and simulation of wireless and mobile systems, MSWiM ’11, pages 143–150.