Improving an Over-the-Air Programming Protocol for Wireless ... - UFMG

8 downloads 636 Views 690KB Size Report
Oct 30, 2009 - ABSTRACT. Reprogramming is an important and challenging problem in wireless sensor networks because it is often necessary to in-network ...
Improving an Over-the-Air Programming Protocol for Wireless Sensor Networks Based on Small World Concepts Guilherme Maia1 , Daniel L. Guidoni1 , Andre L. L. Aquino2 , Antonio A. F. Loureiro1 1

Department of Computer Science – Federal University of Minas Gerais, Belo Horizonte, MG, Brazil {jgmm,guidoni,loureiro}@dcc.ufmg.br 2

Department of Computer Science – Federal University of Ouro Preto, Ouro Preto, MG, Brazil [email protected]

ABSTRACT Reprogramming is an important and challenging problem in wireless sensor networks because it is often necessary to in-network sensor reprogramming. So, over-the-air programming is a fundamental service that relies upon reliable broadcast for efficient distribution. In this work we use small world features to improve the over-the-air programming. The small world based protocol takes into account the communication workflow of sensor networks to create shortcuts toward the sink, thus improving the reprogramming process. The endpoints of these shortcuts are nodes with more powerful hardware, resulting in a heterogeneous wireless sensor network. We, then evaluate the behavior of the small world based protocol regarding the number of messages transmitted, energy consumption and time to reconfigure the network.

Categories and Subject Descriptors H.4 [Information Systems Applications]: Miscellaneous

General Terms Algorithms

Keywords Wireless Sensor Networks, Over-the-Air Programming, Small World

1.

INTRODUCTION

Wireless sensor networks (WSNs) [1, 2, 14] have been proposed for a wide variety of application areas. Since WSNs usually operate in remote and harsh environments, applications need to operate in a unattended way for long periods

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’09, October 26–30, 2009, Tenerife, Canary Islands, Spain. Copyright 2009 ACM X-XXXXX-XX-X/XX/XX ...$10.00.

of time. This introduce some difficulties: first, the environment can evolve over time, so it is almost impossible to know how a sensor node must operate during its life time; second, the application requirements can change. For example, due to technological advances or even a better understanding of the environment can lead to different application behaviors. The aforementioned difficulties make management and maintenance in WSNs challenging tasks. Within this context, over-the-air programming (OAP) protocols [19] play a key role as an enabling technology to numerous WSNs applications, and several protocols and algorithms have been specifically designed for this purpose. Whereas in “traditional” networks the data communication happens between arbitrary communicating entities, in WSNs data communication tends to happen in such a way that the sink node is either the destination or origin of a message. Usually, WSNs are composed of a set of homogeneous nodes, however Gupta et. al. [9] and Yarvis et. al. [22] have shown that homogeneous ad-hoc networks suffer from poor fundamental limits and network performance. Consequently, heterogeneous sensor networks are gaining wide acceptance. Such a network assumes the existence of a large number of low-end sensors and a small number of powerful high-end sensors. The greater communication capacity of high-end sensors leads to a non-trivial network topology structure. As shown in [12, 15, 20], complex networks models are important to characterize networks with certain non-trivial topological features. One such a model, known as small world, presents desired characteristics for WSNs such as small average path length. In order to create a network with small world characteristics, a small number of longrange links, called shortcuts, must be added. Since the data communication in WSNs happens between the sink and sensors nodes and vice-versa, the shortcuts should be created toward the sink node. The goal of this work is to improve and assess the OAP Deluge protocol [5, 11] when applied it to a network with small world features. It is shown that the use of OAP on a small world heterogeneous sensor network increases drastically its performance. Therefore, this work presents a new in-network algorithm OAP-SW that combines the shortcut creation with a OAP to improve the network reprogramming. The paper is organized as following. We first review the state of the art OAP protocols and related work in terms of small world design in Section 2. Section 3 describe the

protocol used and the adapted on-line algorithm for shortcut creation. In Section 4, we present some simulation results of the protocol on a network with small world features. Finally, in Section 5 we present our conclusions and future work.

2.

RELATED WORK

Small-world phenomena have been proposed for wireless networks in recent years. In this context, the works are interesting in to improve the resource query, the network connectivity, or the energy efficiency [3, 4, 10]. However, some works use the small world characteristics in WSNs, generally, to reduce the energy consumption and packet delay by reducing the average hop count [8, 16, 17]. A number of OAP protocols have been proposed in the last few years [19] and, specifically, the Deluge [5, 11] is currently the state of the art and it is the protocol used here. It works in a advertise request data handshaking way, pipelining the transfer of pages and using a bit vector to keep track of loss within a page. In order to reduce contention on the shared channel, Deluge implements advertisement and NACK suppression, which aim at avoiding redundant transmissions of control packets. In [11], the dynamic behavior of Deluge is investigated. It is found that when the network is dense, the propagation speed along the diagonal is significantly less than the speed along the edge due to the hidden terminal problem, which occurs when two senders out of range of each other transmit packets to the same receiver at the same time, thus causing collisions at the receiver. There is other protocols, similar to Deluge, that try to implement some Deluge characteristics like: keep the radio always on during the reprogramming, implement sender selection to limit the number of concurrent transmissions in each neighborhood, divide a program into pages enabling pipelining, and reduce the idle time of a node. For instance, example of these protocols are Multi hop over the air programming, Multi hop network programming, and XNP [6, 13, 18]. Considering our OAP approach, the main advantage is the combination between OAP and the WSN with small world characteristics.

3.

OVER-THE-AIR PROGRAMMING PROTOCOL

In this section we describe the over the air programming small world protocol (OAP-SW ) for WSNs. This protocol is described in two phases: infrastructure and reprogramming. The infrastructure is responsible to aggregate into the WSN the small world features. The reprogramming specify the messages used to allow the code mobility. The problem assessed here is to reconfigure the program running on all sensor nodes of a WSN. Assuming the network is connected, all sensor nodes must receive the exact program image and be updated with the same version of code. Currently, only networks with stationary nodes are considered. A code dissemination protocol should meet the following requirements. • Energy efficiency: The energy used during the reconfiguration process should be as low as possible to not affect the network lifetime.

• Time efficiency: The program should be propagated and installed as quickly as possible. • Reliability: The exact program image must be received by sensor nodes and eventually all sensors, in the network, are reprogrammed. • Autonomy: The reconfiguration process must be accomplished without human intervention. Although energy and time efficiency are not essential requirements for the correctness of code dissemination mechanisms they are important and cannot be overlooked for the practical use of any system. Since it is difficult to fulfill all the design goals in a system, the tradeoff has to be made to ensure the system’s overall performance goals.

3.1

Infrastructure Protocol Phase

The data communication in WSNs is from the sink to sensor nodes or vice-versa. Thus, the shortcuts to be added should be devised considering this communication pattern to optimize the data communication between sink and sensor nodes. In this section, we describe a model in which all shortcuts are generated using an angulation directed to the sink. This model is used in the infrastructure phase of the OAP-SW protocol. WSNs are typically regular graphs. Therefore, it is possible to decrease significantly the average minimum path length between pairs of nodes by adding some shortcuts, i. e. introducing a set of powerful communication sensors (H-sensors). However, in WSNs the communication is done by broadcasting, all neighbors in communication range receive the packets transmitted by a given node. Since the Watts and Strogatz [21] model consists of adding links between unique source and destination nodes, to introduce the small world property to a WSN, we have to use unicast links to create the shortcuts. The endpoint nodes of these shortcuts should operate in two distinct frequencies, one for the communication among H-sensors and another one for the low-end sensor nodes. In the theoretical model of directed angulation toward the sink node [8], each node randomly chooses another node to create a shortcut between them. This shortcut is introduced according to a probability p and its endpoints are H-sensors. The shortcuts are created considering the straight line y = mx + b that passes the geographic position of each node and the geographic position of the sink node. This straight line is the bisectrix of an angle φ that defines an angle region directed to the sink node or opposite to it. Nodes that are in the direction of the data flow between the sensor node i and the sink node can be chosen in the shortcut creation. The search space includes the direction opposite to the sink node since this direction will also help in the data communication process. To verify whether another node is inside its angulation region, a sensor node performs the following steps. Firstly, the node i calculates the straight line equation y1 = m1 x + b1 that passes its geographic location and the sink node geographic location. Secondly, the node i calculates the equa-

3.2

tion of the straight line y2 = m2 x + b2 that passes its geographic location and the geographic location of node k, where k 6= i and node k is the node that we want to know whether it is in the angulation directed of node i. The tangent of the angle formed by the two straight lines is given by tan θ =

Reprogramming Protocol Phase

The OAP-SW protocol is a NACK based protocol and it relies on periodic advertisements to keep nodes informed of their neighbors states. Its basic cycle of communication is depicted in Figure 2 and detailed in the following steps:

m1 − m2 . 1 + m1 m2

Thus, the node i can determine if a given node is inside the angle φ directed angulation making tan θ < tan φ. Using these shortcuts, the OAP-SW creates the small world infrastructure as follows. Consider a regular graph G(V, E). Given an edge e ∈ E | e = (vi , vj ), where vi , vj ∈ V , it is necessary to add an edge e0 between nodes vi and vk ∈ V in such a way that e0 = (vi , vk ), where tan θ =

(a)

(b)

(c)

(d)

mi − mk , 1 + mi mk

so mi − mk < tan φ, 1 + mi mk with vi , vk ∈ V , and mi , mk the angular coefficients of the straight line that passes through node i and the sink node and through node i and node k. The addition of this edge is done using the same probability p determined for each edge of G. These steps are repeated for all edges of G. Figure 1 illustrates the shortcut addition in the model of adding directed shortcuts varying the probability. In this figure, the sink node is located at the lower-left corner. It worth noticing that for all values of probabilities, all shortcuts are created in direction of the sink node. When the probability of adding a shortcut is 0, the WSN is a regular graph. As the probability p increases, the WSN starts exhibiting the small world characteristic. However, it worth noticing that differently from the model proposed in [8], the communication between H-sensors is not unicast, but broadcast since during the reconfiguration process all nodes must receive the same program version being disseminated.

Figure 2: Basic steps of protocol messages.

Step 1 Every node in the network periodically broadcast advertisements (Figure 2(a)). Each advertisement contains a version number and a bit vector describing which pages of that version the advertiser has received completely. Faster advertisements are used in periods of active updating. Step 2 The node determines the lowest numbered page it requires and sends a request to the first sender that advertised that page, indicating the page and packets within that page are needed (Figure 2(b)). Step 3 The node starts a period of waiting. When this period ends, the sender broadcasts a data packet for every requested packet of the selected page (Figure 2(c)).

(a) p = 0.0001

(b) p = 0.001

Figure 1: Shortcuts created considering different p values.

Step 4 When a node receives the last packet it needs to complete a page, it broadcasts an advertisement before attempting to request any new packets to still needs, thus enabling spatial multiplexing (Figure 2(d)). It should be observed that the protocol still avoids maintaining any kind of neighbor table or any other information on the states of other nodes, resulting in a robust and simple implementation.

3.3

4.

OAP-SW Remarks

The main advantage of the OAP-SW protocol is that it enables pipelining by dividing a program into fixed-sized segments which in turn are divided into packets. Such an approach results on a desired characteristic for network reprogramming, known as spatial multiplexing, which enables different parts of the network doing the reconfiguration process under the same time. However, this protocol use the advantages of small world to improve the code mobility. To understand the OAP-SW behavior, consider the Figure 3. In traditional OAP protocols for a network with four nodes (Figure 3(a)) if node 1 had a new program version to disseminate to the network then the node would propagate the holy program with no pipelining (Figure 3(b)). Only after receiving the complete program from node 1 is that node 2 would initiate the dissemination to its neighbors (Figure 3(c)). The same happens for node 3, it can only start the dissemination of the new program version only after receiving it for complete from node 2 (Figure 3(d)).

SIMULATION RESULTS

This section presents the simulation results of OAP-SW protocol. The evaluation is based on the following assumptions: • Simulation: We perform our evaluation through simulation and use the SinalGo simulator version 0.75.3 [7]. Each simulated scenario was executed with 33 random topologies with the sink node located at the bottom left corner of the area. At the end, for each scenario we plot average values with 95% (symmetric asymptotic) confidence interval. • Evaluated parameters: We varied the number of nodes and the probabilities of message loss. The sensed field area was adjusted to keep the network density of approximately 21 neighbors. It was also considered that the network density is n π r2 /A, where A is the sensed area. The general parameters used in the simulation are presented in Table 1. • Evaluated metrics: We evaluated the messages transmitted, energy consumed and time to reconfigure the network. The goal is to evaluate the OAP-SW behavior on heterogeneous networks for both reliable and lossy scenarios.

(a)

(c)

(b) Table 1: Simulation parameters. Parameter Values Sink node bottom left Network size 1024 Program size (Kb) 16 Loss probability 0.0 Sensors radio range (m) 50 H-sensor radio range (m) 500 High-end node probability 0.01 Energy to transmit (nAh) 20.000 Energy to receive (nAh) 8.000

(d)

Figure 3: Reconfiguration without pipelining. In OAP-SW the process is more efficient since a node does not need to receive the complete program to initiate the dissemination to its neighbors, due to the use of pipelining, how depicted in Figure 4. Initially, node 1 would disseminate the first segment of the program to node 2 (Figure 4(a)). After receiving part of the program from node 1, then node 2 starts the dissemination of part of the program it already has before requesting a new segment (Figure 4(b)), thus enabling spatial multiplexing. However, the use of long range shortcuts makes the spatial multiplexing even more efficient as will be observed in the Simulation Results Section.

(a)

(b)

Figure 4: Reconfiguration with pipelining enabled.

4.1

Varying Network Size

In this scenario we varied the number of nodes in the network (121, 256, 529, 1024, 2048) and kept the values of Table 1 constants. The Figures showed in this section, Flooding represents an naive implementation of a dissemination protocol that uses flooding for reconfiguring the network, Deluge is the original protocol being evaluated and OAP-SW represents the results of our protocol. Figure 5 shows the number of messages transmitted during the reconfiguration process on a reliable network. By reliable we mean a network with no collision, interference and packet loss. Both Deluge and OAP-SW transmit almost the same number of messages what is an expected result since the use of long range links does not have any direct impact on the increase or decrease of the number of messages. Still, the OAP-SW transmit less message when compared with the Deluge, this occur because the small world infrastructure, provided by OAP-SW, reduces the network minimal average path.

Messages Transmitted

take a look at Figure 1 at Section 3.1 we can see that when a H-sensor sends its program to another H-sensor located far away from him, different parts of the network will be under the process of reconfiguration accelerating the program dissemination, what does not happen on Deluge since the reconfiguration occurs hop-by-hop, neighbor-by-neighbor.

200000 180000 160000

Deluge OAP−SW Flooding

Messages

140000 120000 100000 80000

Time to Reconfigure

60000 2.2

40000

2

20000 529

1024 Nodes

1.8

2048 Time (s)

0 121256

Deluge OAP−SW

Figure 5: Number of messages transmitted for a reliable scenario.

1.6 1.4 1.2 1 0.8

Figure 6 shows the energy consumption by the entire network to reconfigure all nodes. It worth noticing that even on a heterogeneous sensor network in which there are a small number, but different from zero, of H-sensors that consume more energy for long range transmission, the final energy consumed by the network is almost the same for both Deluge and OAP-SW indicating that the use of H-sensors does not affect drastically on the energy consumed by the network. For the same reasons, of the message transmitted, the OAP-SW had a best performance when compared with the Deluge. However, is important highlighted that the energy consumption is proportional to message transmitted. Energy Consumed 45000 40000

Energy (nAh)

35000 30000 25000 20000 15000 10000 5000

529

1024 Nodes

2048

Figure 6: Energy consumed for a reliable scenario. An important metric of general OAP protocols it the time it takes to reconfigure the entire network, since it may not be feasible for some applications stop operating while the reconfiguration is taking place. So, any advancement that attempt to minimize the total time to reconfigure the network is a desirable one. Figure 7 shows the time for both Deluge and OAP-SW to reconfigure a network for different number of nodes. The real advantage by using OAP-SW can be observed in this Figure. For a network with 2048 nodes, OAP-SW takes half the time if compared to Deluge. The observation of why it happens is straightforward. If we

529

1024 Nodes

2048

Figure 7: Time to reconfigure the network for a reliable scenario. Based on the results showed previously, we can conclude that the use of OAP-SW for network reprogramming does not have a deep impact on the number of messages and energy consumed by the network even in the presence of a small number of nodes that consume more energy for long range communication. On the other hand, the time to reconfigure the network was deeply affected by the use of heterogeneous network evidencing its feasibility for this particular scenario.

4.2

Deluge OAP−SW Flooding

0 121256

0.6 121256

Varying Packet Dropping Probability

Here we evaluate the behavior of OAP-SW protocol on scenarios with packet lost. To include the packet lost in our scenarios we consider a network with no collisions neither interferences, but with different packet dropping probabilities. As was observed in Section 4.1 the number of messages transmitted and energy consumed was not drastically influenced by the use of OAP-SW. This same behavior was observed for these scenarios, for instance, we hid these results here. We only discuss about the results for time to reconfigure the network because it is deeply affected by the use of OAP-SW. Figure 8(a) shows the time to reconfigure the network for a dropping probability of 10%. It can be observed that for a network of 529 nodes, OAP-SW starts to exhibit a better time to reprogram the network and for a network of 2048 nodes the time is almost half the value for the OAP-SW. As presented in previous sections, the observation of why this happens is that when a H-sensor sends its program to another H-sensor located far away from him, different parts of the network will be under the process of reconfiguration accelerating the program dissemination, what does not happen on Deluge since the reconfiguration occurs hop-by-hop, neighbor-by-neighbor. Figures 8(b), 8(c), and 8(d) present the time to reprogram the network for dropping probabilities of 20%, 30%,

Time to Reconfigure − Lossy 0.2 3.5

3

3

2.5

2.5

Time (s)

Time (s)

Time to Reconfigure − Lossy 0.1 3.5

2 1.5

2 1.5

Deluge OAP−SW 1 121256

529

1024 Nodes

Deluge OAP−SW 1 121256

2048

(a) Probability of 0.1

1024 Nodes

Time to Reconfigure − Lossy 0.3 3.5

3

3

2.5

2.5

Time (s)

3.5

2 1.5

2 1.5

Deluge OAP−SW 1 121256

2048

(b) Probability of 0.2

Time to Reconfigure − Lossy 0.3

Time (s)

529

529

1024 Nodes

Deluge OAP−SW 1 121256

2048

(c) Probability of 0.3

529

1024 Nodes

2048

(d) Probability of 0.4

Figure 8: Time to reconfigure the network with different packet dropping probabilities and 40% respectively. These Figures show that the time to reprogramming is only increased when the probability increases. This suggests that the behavior of the OAP-SW protocol considering a reliable scenario does not change, evidencing its effectiveness.

5.

CONCLUSIONS

Over-the-Air Programming is a fundamental service for WSNs since management and maintenance are challenging tasks for this kind of network. In this work, we have proposed the OAP-SW protocol that configure the network with small world characteristics. In such a network, a small number of shortcut links are added between H-sensors, resulting in a network with desired small world characteristics like short averaged path length. The results show the efficiency of OAP-SW. It was shown that the time to reconfigure the network was drastically reduced and the total energy consumed by the network was not considerably affected by the use of a small amount of H-sensors. As future work, we intend to better evaluate the proposed algorithm by considering other network scenarios and the impact of the program size over the performance of the protocol. We also intend to investigate the better value for probability of H-sensors that guarantees accepted results

for time to reconfigure the network, messages transmitted and energy consumed.

6.

REFERENCES

[1] I. F. Akyildiz, W. Su, Y. Sankarasubramaniam, and E. Cayirci. A survey on sensor networks. IEEE Communications Magazine, 40(8):102–114, August 2002. [2] A. Boukerche. Algorithms and Protocols for Wireless Sensor Networks. Wiley-IEEE Press, 2008. [3] D. Cavalcanti, D. Agrawal, and J. K. D. Sadok. Exploiting the small-world effect to increase connectivity in wireless ad hoc networks. In 11th International Conference on Telecommunications (ICT’04), volume 3124 of Lecture Notes in Computer Science, pages 388–393, Fortaleza, Brazil, August 2004. Springer Berlin/Heidelberg. [4] R. Chitradurga and A. Helmy. Analysis of wired short cuts in wireless sensor networks. In IEEE/ACS International Conference on Pervasive Services (ICPS’04), pages 167–176, Beirut, Lebanon, July 2004. IEEE Computer Society. [5] A. Chlipala, J. Hui, and G. Tolle. Deluge: Data Dissemination for Network Reprogramming at Scale, 2003.

[6] I. Crossbow Technology. Mote in-network programming user reference. www.tinyos.net/tinyos-1.x/doc/Xnp.pdf, 2003. [7] E. D. C. Group. Sinalgo - simulator for network algorithms. http://dcg.ethz.ch/projects/sinalgo/, 2008. [8] D. L. Guidoni, R. A. F. Mini, and A. A. F. Loureiro. Creating small-world models in wireless sensor networks. pages 1–6, September 2008. [9] P. Gupta and P. Kumar. The capacity of wireless networks. IEEE Transactions on information theory, 46(2):388–404, 2000. [10] A. Helmy. Small worlds in wireless networks. IEEE Communications Letters, 7(10):490–492, October 2003. [11] J. W. Hui and D. Culler. The dynamic behavior of a data dissemination protocol for network programming at scale. In SenSys ’04: Proceedings of the 2nd international conference on Embedded networked sensor systems, pages 81–94, New York, NY, USA, 2004. ACM. [12] J. Kleinberg. The convergence of social and technological networks. Commun. ACM, 51(11):66–72, 2008. [13] S. S. Kulkarni and L. Wang. Mnp: Multihop network reprogramming service for sensor networks. Distributed Computing Systems, International Conference on, 0:7–16, 2005. [14] E. F. Nakamura, A. A. F. Loureiro, and A. C. Frery. Information fusion for wireless sensor networks: Methods, models, and classifications. ACM Computing Surveys, 39(3):9/1 – 9/55, April 2007. [15] M. E. J. Newman. The structure and function of complex networks. SIAM Review, 45:167–256, 2003. [16] G. Sharma and R. Mazumdar. A case for hybrid sensor networks. In 7th ACM International Symposium on Mobile Ad Hoc Networking and ˇ Computing (MobiHocS06), pages 366–377, Urbana-Champaign, IL, USA, May 2006. ACM. [17] G. Sharma and R. Mazumdar. A case for hybrid sensor networks. IEEE/ACM Transactions on Networking, 16(5):1121–1132, October 2008. [18] T. Stathopoulos, J. Heidemann, and D. Estrin. A remote code update mechanism for wireless sensor networks. Technical report, 2003. [19] Q. Wang, Y. Zhu, and L. Cheng. Reprogramming wireless sensor networks: challenges and approaches. IEEE Network, 20(3):48–55, 2006. [20] D. J. Watts. A twenty-first century science. Nature, 445(2):489, 2007. [21] D. J. Watts and S. H. Strogatz. Collective dynamics of small-world networks. Nature, 393(6684):440–442, 1998. [22] M. Yarvis, N. Kushalnagar, H. Singh, A. Rangarajan, Y. Liu, and S. Singh. Exploiting heterogeneity in sensor networks. In Proceedings IEEE INFOCOM 2005. 24th Annual Joint Conference of the IEEE Computer and Communications Societies, volume 2, 2005.

Suggest Documents