A DETAILED SIMULATION STUDY OF GEOGRAPHIC RANDOM

6 downloads 0 Views 357KB Size Report
rotation achieves load balancing and increases the network lifetime). Nodes acquire ... In this paper, we consider Geographic Random Forward- ing (GeRaF), an ...
A DETAILED SIMULATION STUDY OF GEOGRAPHIC RANDOM FORWARDING (GERAF) IN WIRELESS SENSOR NETWORKS Paolo Casari, Alessia Marcucci, Michele Nati, Chiara Petrioli, Michele Zorzi ?

ABSTRACT This paper provides a thorough performance evaluation of the GeRaF protocol in a multi–hop wireless sensor network scenario. The contributions of the paper are twofold. First we provide an in–depth discussion on the impact of the different protocol parameters and of network features on the protocol performance. Based on the results of the first part of our investigation we design variants of the basic GeRaF protocol which are able to significantly decrease the packet latency and to increase the packet delivery ratio. The study presented in this paper is the first attempt to thoroughly characterize the performance of GeRaF and is a necessary step toward understanding the real protocol behavior before implementing it on real devices. I. INTRODUCTION Energy efficiency is one of the main research challenges in the design of protocols for sensor networks, due to the need to operate these networks for relatively long times without human intervention. It has been recognized that at the protocol design level (e.g., MAC and routing schemes) there are very significant opportunities to save energy. It therefore makes sense to investigate new approaches that have energy efficiency as one of the primary design goals, and to evaluate the resulting performance using energy savings as one of the key metrics (while of course verifying that possible degradations of other performance aspects, e.g., delay, are limited). Since the only way to save energy is to turn off the radio hardware in the nodes, such protocol design techniques make aggressive use of sleep modes. In the recent literature, a number of routing approaches have been presented, where the density of nodes in the network is used to share the energy load thereby increasing the network lifetime. For example, SPAN [1] routes packets only between the nodes elected as coordinators (whose rotation achieves load balancing and increases the network lifetime). Nodes acquire this role based on their position and on the fact that two or more neighboring coordinators are not directly within range of each other. The approach is rather complex in that it requires extensive topology knowledge. ? Alessia Marcucci, Michele Nati, and Chiara Petrioli are with the Computer Science Department at Rome University ”La Sapienza”. Paolo Casari and Michele Zorzi are with the Information Engineering Department at the University of Padova. Corresponding author: Michele Zorzi, e–mail: [email protected].

As an alternative to maintaining detailed topology information, which is costly in a dynamic environment where sleep modes are used, geographic routing has been proposed, in which some geographical information is used in lieu of the routing table to make a packet proceed toward its final destination. In this area of research, basic routing algorithms, MFR, DIR and GEDIR were proposed in [2]. A similar protocol is GPSR [3], which routes packets based on location information and specifically solves the problem of connectivity holes by routing around the perimeter of these holes as identified in the planar network connectivity graph. Similar to GPSR are FACE–1 and –2 [4], which also address the problem of guaranteed delivery in presence of holes as long as the network graph is connected. GEAR [5] extends the concept of directed diffusion [6] by forwarding queries to sensors that are located in a restricted geographic area. The routing takes into account two costs, an estimated cost that depends on residual node energy and distance from destination, and a learned cost that is updated whenever connectivity holes occur in routing toward the destination. A recently proposed protocol, MACRO [7], uses the advancement toward the destination, weighed by the power needed to reach a relay, as a metric for relay selection in location– based routing. It divides the forwarding region in zones that can be reached using different fixed power levels and evaluates the probability to find a relay which offers a better weighted progress by means of statistical metrics. MACRO shows interestingly good performance, but lacks a precise physical layer model to take into account additional radio effects, e.g., fixed costs due to radio hardware, that could in some cases overweigh power control benefits. A complete survey of the recent work on geographic routing can be found in [8]. In this paper, we consider Geographic Random Forwarding (GeRaF), an integrated MAC/routing protocol recently proposed in [9]–[11], that shows very promising performance in terms of energy efficiency and latency. While in the original papers on GeRaF the performance was mostly studied by means of approximated analytical approaches, it is our goal here to provide in–depth understanding of the various mechanisms and aspects of the protocol that escape the simplified analytical investigation. To this aim, we have produced an ns–2 [12] implementation of the protocol and have used it to run extensive simulation campaigns whose results are described here. The main contributions of this paper are as follows: 1) based on our new ns–2 implementation of the protocol,

1 of 10

we present a thorough investigation of the protocol performance and, by comparing the results to those obtained following the analytical approach, we provide a deep understanding of the protocol behavior; 2) based on this understanding, we propose here a variant of the GeRaF protocol, called GeRaF+ , which can greatly improve the MAC performance; 3) we present and discuss here the first results on GeRaF's multi–hop performance, which were not explicitly considered before. This paper is a necessary step toward the detailed understanding of the protocol behavior and performance that helps in identifying the various important issues before we actually proceed and implement it on real devices. II. GERAF PROTOCOL DESCRIPTION GeRaF [9]–[11] is a convergecasting protocol which enables communication of data from the sensor nodes to the sink. It integrates an awake/sleep scheduling scheme, a MAC protocol, and geographic routing. The GeRaF protocol suite relies on the assumption that sensor nodes are aware of their own position as well as of the sink position. No information needs to be stored at each node about the location of its neighbors and their awake/asleep schedule. Location awareness can be obtained by means of any localization technique (see [13] for a recent survey of existing schemes). GeRaF's driving idea is that, as a general rule, nodes alternate between awake and asleep states according to a given duty cycle d. Once a node has a packet to send, a relay is chosen among its active (awake) neighbors in the direction toward the sink, preferably the one closest to the destination. The way the relay selection is performed and the data packet is forwarded is by means of a CSMA/CA– like MAC protocol. We summarize here briefly the main protocol rules, in order to enable the reader to follow the subsequent discussion. For a complete description of the protocol the reader is referred to [9]–[11]. Once a node has a packet to send, it senses the channel to avoid collisions. If the channel is heard idle for a sufficiently long time, the node broadcasts a Request– To–Send (RTS) message which is heard by all its awake neighbors. The part of the coverage area which faces the final destination is the forwarding area, and is divided into Np priority regions so that all points in one region are closer to the destination than any point in a region with lower priority. The goal of the protocol is to elect one of the best nodes (i.e., closest to the destination) as the forwarding node. This means that the relay should be picked from the highest–priority region among those that are not empty. After sending the RTS, the transmit node waits for a CTS from nodes in the highest–priority region. If no reply is received, the sending node concludes that the highest–priority region is empty, and proceeds to send another RTS, which polls nodes in the second highest– priority region, and so on until a non–empty region is

found. In this case, if a single CTS is received, packet transmission can start (a relay has been found). If, on the other hand, multiple CTSs are sent, some collision resolution algorithm is entered, which eventually results in a single relay being found. In both cases, the procedure ends with the selection of a single relay, which receives the data packet and replies with an ACK. This relay in turn becomes the sending node, until a node within coverage of the destination is reached, and the process terminates in one more hop. If the whole forwarding area should be empty (i.e., no CTS is heard after each of the Np RTSs), the sending node backs off and retries later, when a different distribution of awake neighbors will be seen. This process is repeated until either a relay is found or the maximum allowed number of attempts is reached, after which the packet is discarded. When a node has no packets to send, it periodically wakes up, according to the duty cycle, and listens to the channel. If during the awake time it does not hear any activity, it goes back to sleep. If on the other hand, during the time a node is awake, a RTS is heard, the node enters the relay contention phase, during which a forwarding node is elected by means of a distributed algorithm. Each node is able to determine its own priority region based on its own coordinates (that the node knows), as well as the coordinates of the sending node and of the final destination (that are explicitly included in the RTS packet). If the node is in the first priority region, it immediately answers with a CTS. Otherwise, if the node is in the i– th priority region, it only answers after hearing the i–th RTS (and only if the first i − 1 regions are empty). Note that in the basic scheme proposed in [9]–[11], a node can only participate in a contention phase for which it receives the first RTS (i.e., nodes that wake up after the first RTS has been issued are not allowed to participate). We will see in the next section that an extension of the GeRaF protocol where this limitation is removed performs significantly better. When a non–empty region is found, if a single CTS was received a packet transmission is started (which notifies all nodes in the area that the contention is completed, after which all nodes who lost the contention go to sleep). If on the other hand multiple CTSs collided, a special RTS message is sent which triggers the collision resolution phase among the colliding nodes (all those in the priority region currently being polled) and notifies all nodes in lower–priority regions to go to sleep. Collision resolution is performed by means of a splitting tree scheme. Upon successful resolution of the collision (which under our assumptions is guaranteed), packet transmission is eventually performed. III. PERFORMANCE EVALUATION A. Analytical approach In [9], a semi–Markov model has been presented that is able to capture the single–node behavior taking into

2 of 10

account the effect of multiple transmission attempts and backoffs. The model consists of a number of states that describe the situations a node can be led into, and of a matrix of transition probabilities from a state to another, which depend on the various network events. Moreover, times are associated with transitions, so that it is possible to calculate, for instance, the long–term fraction of time spent in any of the states as well as the mean time required to go from a state to another. These states and transitions describe the various actions the node takes when acting as a sender or a relay candidate. From this state transition structure, it is possible to find some metrics of interest. In particular, it is possible to assign to each transition an average energy cost by appropriately weighing the average times that the node (or more precisely, its radio) spends in the different functions. By doing so, it is possible to find the average energy consumption by using the theory of renewal reward processes [14]. It is also possible to obtain the average latency, defined as the time from when a packet is generated to when the successful transmission of the packet starts. In this case, the latency is given by the first passage time between a suitable pair of states. Thus, latency may also be derived from the semi–Markov model. Some details about semi–Markov and renewal reward processes, as well as a method to find first passage times, can be found in [14]. While being accurate in tracking a single node's behavior, this analytical approach still assumes that all others are in steady–state, and therefore may fail to capture some detailed network dynamics, especially when the network is operating close to critical conditions. On the other hand, this method is valuable in that it allows very quick computations while ns–2 simulations usually take several hours to obtain statistically meaningful results. B. Simulation Environment For a more detailed evaluation of GeRaF's performance, in order to demonstrate the protocol effectiveness in routing packets in realistic WSN scenarios, the protocol has been implemented using the VINT project network simulator ns–2 [12]. The scenarios we considered comprise WSNs with a number n of nodes that varies from 100 to 1000, scattered randomly and uniformly in a square area of side L = 320 m. Each node has a fixed transmission radius of 40 m. The joint choice of the particular transmission radius and of L allows us to test the protocol performance under a host of different node densities, ranging from 5 (n = 100) to 50 (n = 1000). All the topologies we have considered for our experiments are connected, i.e., there is always at least a route between any two nodes in the network. Transmissions occur from the sensor nodes to the sink which is randomly selected among the sensor nodes at the beginning of each simulation and kept fixed throughout.

Since we consider WSNs with random and uniform deployment of the sensor nodes, it might be the case that a node does not have any available relaying neighbors, in the direction of the sink. This would result in unsuccessful packet delivery, unless additional mechanisms are introduced for re–routing the packet. In our study we have quantified precisely the effect of this situation on the overall protocol performance. In our simulations, nodes alternate between awake and asleep states according to a predefined schedule with a duty cycle d. We have varied d over the following values: d = 0.01, 0.1, 0.5. Energy consumption when transmitting, receiving and in idle state are comparable, as it is often the case in short range sensor devices. The energy cost when asleep is assumed equal to 1/1000 of the cost when in the transmit state. Data traffic is generated according to a Poisson process with parameter λ. A packet arrives to the network and one of the sensor nodes is randomly and uniformly assigned to the packet as its source. Nodes have one–packet buffers, i.e., they can handle only a packet at a time. A newly generated packet is accepted by the source node only if the node is not currently handling another packet. Otherwise, the packet is discarded. Data transmission and route selection are then performed according to the MAC and routing protocols specified by GeRaF. According to GeRaF operations, nodes which are handling a packet do not volunteer as relay for other packets. The specific values for the protocol parameters are listed in Table I. The backoff interval length has been tuned via extensive simulations. The channel data rate has been set to 38.4 Kbps. GeRaF performance has been evaluated versus the following metrics of interests: packet latency, percentage of packets successfully delivered at the sink, and energy consumption. In particular, the following performance figures have been considered.

3 of 10

TABLE I P ROTOCOL PARAMETERS . Name d TSense TBackof f T` Tsleep TD TSIG

Value 0.01, 0.1, 0.5 0.0521 s 0.219 s 0.016 s T` × ((1/d) − 1) 0.0521 s 0.00521 s

Np NM axAtt

4 50

NM axColl

6

Description Duty Cycle Carrier sense length Backoff interval length Listening time Sleep time Data packet transmission time Signal packet transmission time Number of priority regions Number of attempts for searching a relay Number of attempts for solving a collision

1) Packet discarding probability: note that a packet may be discarded directly by the originator (if it is already handling a packet or in backoff), or because all attempts to find a valid relay turn out to be unsuccessful. A detailed breakdown of the various causes for packet discarding will be given later. 2) Packet latency: we consider both the per–hop normalized packet latency and the end–to–end latency. The former is defined as the time between the first channel sense after packet reception (or generation) and its successful forwarding to the next hop. The per–hop latency is normalized to the time needed for transmitting a data packet. The end–to–end latency is instead the time from when a packet is generated and when it is delivered to the sink. 3) Node energy consumption: this metric refers to the average energy consumed by nodes over a given timeframe normalized to the energy nodes would have consumed if active over the whole timeframe. The performance evaluation proceeds in two steps. First, we consider metrics concerning the transmission of a packet over a single hop. The simulation results are compared with the numerical results obtained with the model presented in Section III-A. This allows us to validate the analytical model and at the same time to understand the impact of the different assumptions we have made to achieve analytical tractability. In turn, the comparison between analytical and simulation results allows us to achieve a deeper understanding of GeRaF, especially of those features that have greater impact on the performance. Based on such findings we define a variant of GeRaF, named GeRaF+ , which quite drastically improves packet latency. The second part of our performance study aims at assessing the performance of GeRaF + in a multi–hop scenario. We evaluate the impact of the different protocol parameters on the overall protocol performance, as well as how much topological features such as the nodal degree affect protocol operations. In particular, we investigate the reasons for unsuccessful packet delivery. A variant of GeRaF+ , GeRaF+ (2) is then presented, in which simple schemes have been added to backtrack and re–route packets which have reached a “dead endº. We will show that GeRaF+ (2) significantly increases the packet delivery ratio. To achieve sufficient statistical confidence, all results have been obtained by averaging the results of 100 simulations over different connected network topologies. Each run refers to 1000 s of simulation time. C. GeRaF per hop behavior In this section we validate the analytical model presented in the previous section and provide numerical and simulation results on the per hop performance of GeRaF. As a first proof of the goodness of the Markov analytical model, we present a comparison between the average per

hop latency (normalized to the time needed for a data packet transmission) as predicted by the analytical model and as obtained by simulation. In figures 1 and 2 this comparison is depicted for an average network degree of 50 and 5 nodes, and for d = 0.01, 0.1, respectively. The curves are spanned by increasing the value of the packet generation rate λ. In the figures, the x axis is the network effective load (i.e., the accepted traffic per coverage area). In the following, we refer to the network effective load as “net load.º For small values of λ, the net load and λ are approximately linearly related, whereas for larger traffic values the network dynamics and the frequent occurrence of backoff events result in an actual network traffic that is less than one would predict. For high traffic values, this may even lead to a decreased network load as λ increases (meaning that the network is congested). The analysis is able to predict accurately the latency floor, that is equal for low traffic to the reciprocal of the probability that a correct CTS is received. Also, the analytical and simulation curves show the same trend. The latency first slowly increases with the offered load, then, as congestion builds up, it starts increasing more steeply, while the effective network load decreases with the offered load. In this regime, the net load decreases as the imposed per node packet generation rate λ increases, as network congestion leads many nodes into the backoff state, where no packets can be generated. This explains why, for instance, the simulated and analytical curves for d = 0.1 in Fig. 1 turn back as the net load approaches 0.1, showing an increasing latency and a diminishing net load as the imposed λ grows. This kind of behavior is more evident for lower N s and ds. We observe a diminishing accuracy of analytical predictions for lower duty cycles and for lower network degrees. In these cases simulation results show the effects of congestion at offered loads lower than those predicted analytically. This is due to the very nature of the Markov model, which inherently describes the behavior of a single node at a time, thus being unable to capture a global view of the network, where congestion may lead to local higher channel use and hence to higher latencies and to a lower number of available relays. To achieve a more thorough understanding of the differences between numerical and simulation results we have computed the expected time spent by nodes in the different protocol states and the transition probabilities among the different states, and reported the most significant analogies and differences in tables II and III. We have selected the net load value at which simulated and analytical behaviors in figures 1 and 2 most differ, and reported the relevant discrepancies between analytically extracted and simulated probabilities. Simulation results show that, except for the very favorable N = 50 and d = 0.1 case, nodes tend to spend

4 of 10

TABLE II R ELEVANT ANALYSIS AND SIMULATION COMPARISONS , N = 50. d = 0.1, NL Analysis 0.857 0.039 0.865 0.491 0 0.173

= 0.06 Simul. 0.851 0.050 0.765 0.523 0.052 0.453

d = 0.01, NL = 0.025 Analysis Simul. 0.919 0.819 0.022 0.167 0.181 0.117 0.242 0.425 0 0.090 0.363 0.883

TABLE III R ELEVANT ANALYSIS AND SIMULATION COMPARISONS , N = 5. Method −→ P [Sleep]b P [Pkt Ready]b P [CTS received]c P [Busy channel]c P [TX failure]c P [Win contention]c b c

100

10

1 0.0001

d = 0.01, NLa = 8e-4 Analysis Simul. 0.821 0.544 0.010 0.436 0.020 0.010 0.010 0.200 0 0.032 0.396 0.978

0.001

0.01 net load

0.1

Fig. 1. Normalized latency as a function of effective network load for varying d. N = 50. 100000

d=0.01, analysis d=0.1, analysis d=0.01, simul. d=0.1, simul.

10000

Net Load as introduced in Sec. III-C Steady±state Markov probabilities Transition probabilities

less time sleeping and roughly 10 to 40 times more time in backoff (in the “Packet Readyº state) than analytically predicted. The main cause of this behavior is the higher local congestion that the simulation is able to track: higher traffic, lower duty cycle and/or a lower network degree mean that it will take longer before a node successfully relays/transmits a packet. During this time the node will not be available to relay other packets. This further increases the number of transmission attempts needed to relay each packet, captured by P [Pkt Ready], resulting into increased traffic and higher relay unavailability, an effect which is not fully captured by our analytical model. The higher relay unavailability also results into a higher (simulated) probability of a node being elected as the contention winner and into a lower probability (from 11% to 50% smaller) to receive a CTS. As less relays are available, it is less and less likely that the scan of the regions finds available relays. However, when a node is available as relay, it is more likely that it will win the contention and it will be selected to forward the packet. The analysis is also unable to track packet losses, whereas the simulations show that 3% to 9% of sent packets are lost due to collisions. All these kinds of impairments are responsible for the discrepancies between the analytical and simulated curves and explain why the curves of the simulation results in Figs. 1 fold onto themselves at lower net loads than those analytically predicted. Fig. 1 also shows that, as the duty cycle d increases from 0.01 to 0.1 the latency decreases. At d = 0.1 a higher network load (approximately ten times as much)

Normalized Latency

a

d = 0.1, NLa = 8e-3 Analysis Simul. 0.719 0.531 0.033 0.394 0.181 0.110 0.102 0.202 0 0.035 0.363 0.912

d=0.01, analysis d=0.1, analysis d=0.01, simul. d=0.1, simul.

1000

Normalized Latency

Method −→ P [Sleep]b P [Pkt Ready]b P [CTS received]c P [Busy channel]c P [TX failure]c P [Win contention]c

a

1000

100

10 0.0001

0.001 net load

0.01

Fig. 2. Normalized latency as a function of effective network load for varying d. N = 5.

can be supported before the network becomes congested with respect to the case d = 0.01. Fig. 2 shows the normalized latency performance for sparse networks where the average nodal degree is equal to 5. As expected, the estimation of the latency floor for low traffic (not congested network) is very good, as is the prediction of the behavior for larger traffic. On the other hand, there are some differences between analysis and simulations in the region where the curves fold onto themselves, due to the fact that the simple analytical model fails to correctly represent the complex behavior that arises when congestion occurs, as specified before. To further confirm the goodness of the analytical predictions for non–critical traffic values, we also report the average energy consumption, normalized to the energy of an always–on radio, for the same network configurations described before for latency results. In Figs. 3 and 4 this metric is depicted. As before, the simulation results match well the analysis in low–traffic scenarios. At high

5 of 10

1000

Normalized Latency

Normalized Energy Consumption

d=0.01, analysis d=0.1, analysis d=0.01, simul. d=0.1, simul.

0.1

d=0.01, GeRaF, simul. d=0.1, GeRaF, simul. + d=0.01, GeRaF+ , simul. d=0.1, GeRaF , simul.

100

10

0.01 0.0001

0.001

0.01 net load

1 0.0001

0.1

Normalized Energy Consumption

Fig. 3. Normalized energy consumption as a function of effective network load for varying d. N = 50.

d=0.01, analysis d=0.1, analysis d=0.01, simul. d=0.1, simul.

0.1

0.01 0.0001

0.001 net load

0.01

Fig. 4. Normalized energy consumption as a function of effective network load for varying d. N = 5.

traffic the higher congestion probability limits the accuracy of the analytical model. The difference between analysis and simulations is limited for high values of the average degree and of the duty cycle (Fig. 3, case d = 0.1), but increases in more critical configurations (Fig. 4, case d = 0.01). The explanation for this fact is that, as d is sufficiently high (0.1), the main node activity follows the duty cycle, while rarely handling or originating packets. As traffic grows, the backoff events (for busy channel or unresolved collisions) dominate over the duty cycle, so that nodes are found unavailable more often than what optimistically predicted by the analysis. The difference between simulated and numerical values is particularly evident in the “most criticalº N = 5 and d = 0.01 case, in which the number of available relays is very limited and the packet transmission efforts are particularly intense. GeRaF offers some features to work on to optimize the overall protocol performance. Here, we modify one of these features in order to demonstrate that although the protocol

0.001

0.01 net load

0.1

Fig. 5. Normalized latency compared for GeRaF and GeRaF+ , for varying d. N = 50.

already has very good performance, there is still room for improvement. Consider the region scan to search for a relay. The basic GeRaF operations do not permit awaking nodes to enter contentions phases that have already started. When a low number of eligible relays are available (e.g., for low duty cycles or low density) this may prevent good nodes from competing to be selected as relays, lowering the probability of finding a relay, or of finding relays which can significantly advance the packet toward the sink. Thus, we modify GeRaF as follows: if a node wakes up after a contention phase has started, but its own region has not yet been called, it is allowed to take part in the contention. In Fig. 5 we show the effect of this protocol modification. The newly introduced feature lowers significantly the average per hop latency. The extent of this reduction is more pronounced for lower duty cycle or lower density networks, which are the cases where finding a relay is more challenging. Even if it is not shown here due to lack of space, simulations show that energy consumption decreases as well. In the following evaluation of the performance of packet transmission in a multi–hop setting, we will consider the GeRaF protocol modified according to this new rule (GeRaF + ). D. Multi–hop GeRaF+ performance evaluation Results on the GeRaF+ performance in a multi–hop scenario are depicted in Fig. 6 to Fig. 17. Fig. 6 and Fig. 9 show the percentage of generated packets which are successfully delivered to the sink, for a duty cycle equal to 0.1 and 0.5, when varying the parameter λ and the number of nodes in the network. Also, the reasons for packets mis– delivery are investigated. The percentage of packets not accepted at the source, pna , the percentage of in network discarded packets pdisc , and the fraction of these packets lost at a dead–end pnr or after unsuccessfully handshaking with a valid relay for 50 times (pout ) are reported in Fig. 7, 8, 10 and 11.

6 of 10

0.8

0.2

0.6

0.4

n=1000 n=800 n=600 n=400 n=300 n=200 n=100

0 0.05 0.1

0.25

0.5 lambda

0.15

0.1

Fig. 6. Percentage of packets successfully delivered to the sink, d = 0.1.

0 0.05 0.1

0.16

0.14 0.8

% of not accepted pkts (Pna)

% of successfully delivered pkts

0.12

0.6

0.4

0 0.05 0.1

0.25

0.5 lambda

0.4

0.5 lambda

0 0.05 0.1

1

0.25

0.5 lambda

Fig. 8. Percentage of in network discarding packets, d = 0.1. 1

n=1000 n=800 n=600 n=400 n=300 n=200 n=100

Pdisc, n=100 Pdisc, n=200 Pout, n=100 Pout, n=200 Pnr, n=100 Pnr, n=200

0.8

0.1

0.08

0.06

1

0.6

0.4

0.04

n=1000 n=800 n=600 n=400 n=300 n=200 n=100

0.2

0.25

Fig. 7. Percentage of not accepted packets, d = 0.1.

1

0.6

0.2

0.05

1

Pdisc, n=100 Pdisc, n=200 Pout, n=100 Pout, n=200 Pnr, n=100 Pnr, n=200

0.8

% of in network discarding pkts

0.2

1

n=1000 n=800 n=600 n=400 n=300 n=200 n=100 % of in network discarding pkts

0.25

% of not accepted pkts (Pna)

% of successfully delivered pkts

1

0.2 0.02

1

Fig. 9. Percentage of packets successfully delivered to the sink, d = 0.5.

0 0.05 0.1

0.25

0.5 lambda

1

Fig. 10. Percentage of not accepted packets, d = 0.5.

Results on the percentage of successfully delivered packets show that GeRaF reliably delivers generated packets in case of medium–high density scenarios (n > 300). For n = 100 (n = 200) up to 63.3% (19.2%) of the packets are either not accepted at the source or discarded while traveling to the sink, at d = 0.1. This percentage decreases to 61% (17.5%) for a duty cycle equal to 0.5. The case n = 300 is much less critical, resulting in a probability of successful delivery which is always greater than 92.4% (96.9%) at d = 0.1 (d = 0.5). In order to understand the reasons behind packet losses, we studied the pna , pdisc , pout and pnr metrics separately (results are depicted in Fig. 7 to Fig. 8 and in Fig. 10 to Fig. 11). For a given duty cycle, the percentage p na of packets which cannot be accepted at the sources increases as either the load increases or the density decreases. When n is small or λ is high it is more likely that a source generates a packet when it is already busy attempting to transmit or receive other packets. The reason for this is a combination of three effects. First, the rate at which packets are generated at each source λ/n increases when either the parameter λ increases or n decreases. Second, the actual traffic (in number of packets) handled per node increases whenever either λ/n increases, or packets are routed along longer routes. Let us denote as Gr = (N, Er ) the directed graph whose nodes are the sensor nodes and where there is a direct link (i, j) iff j is a valid relay for i. Then longer routes are traversed whenever the shortest paths on G r are longer (which is the case in low density scenarios), or

0 0.05 0.1

0.25

0.5 lambda

1

Fig. 11. Percentage of in network discarding packets, d = 0.5.

whenever routes longer than the shortest paths are followed (which is for example the case when the “bestº relays are not currently active). Finally, the time needed to relay a packet to the next hop also increases at low density (or for low duty cycles) as it becomes harder and harder to find an active relay in the direction toward the sink. These arguments also suggest that a lower d, thus smaller sets of active relays per node, should result in increased p na . This is confirmed by the comparison of the results depicted in the figures for d = 0.1, 0.5. The metric pna captures only one of the effects which lead to packets discarding. Results on the percentage of generated packets which are discarded after being accepted are reported in Fig. 8 and in Fig. 11 for the cases n = 100, 200. The other densities have not been reported as the in–network loss probability is negligible for n > 400, and quite limited for n = 400, 300. (pdisc ranges from 0.5% up to 3.2% when n = 400, and from 1.7% to 3.8% when n = 300.) As shown in the figure the cases n = 100, 200 instead experience severe performance degradation, resulting in 46 − 63% (41.5 − 61%) of the generated packets being discarded in–network when n = 100, d = 0.1 (n = 100, d = 0.5). Packet loss is lower but still very significant at n = 200, ranging from 14.6 − 19% (9.8 − 17.5%) of the generated packets when n = 100, d = 0.1 (n = 100, d = 0.5). In order to understand the reasons for in–network discarding we thus focus on n = 100, 200 and further investigate the effects which lead to in–network packet loss. We first distinguish between the

7 of 10

packets discarded at a “dead endº (i.e. a node for which no valid relay exists) and those discarded at a node for which valid relays exist but cannot be reached within the maximum allowed number of attempts. The fraction of packets lost in–network due to these two effects is also reported in Fig. 8 and in Fig. 11. We observe that in low density networks the major reason for packet discarding is the impossibility of further advancing the packets toward the sink (the fraction of packets lost because of this effect is denoted as pnr ). pnr accounts for 97% of the overall in–network losses at n = 100, d = 0.1, λ = 0.05, and for 54% in the same scenario at λ = 1. As the load increases, and the network gets congested, the longer and longer time needed to find a relay also results in discarding of packets after attempting to find a relay for 50 times (p out ). pout steadily increases with λ, approaching the pnr value in case of high λs. Results also show that, as expected, sparser topologies (n = 100) experience a more remarkable difference between the pnr and pout values as it is more likely in a sparse topology that dead ends are reached. At a given λ higher duty cycles result in decreased p out . This is due to the fact that increased duty cycles result into a larger set of active relays, thus into a higher probability of being able to find a relay within the maximum number of attempts. As an example at λ = 1, n = 100, pout = 46% when d = 0.1, while it equals 37% when d = 0.5. In order to understand the motivations for pout discarding, which may depend on multiple effects, we have first investigated the percentage of nodes which are unable to find a path to the sink following the greedy relay selection rule adopted by GeRaF. At n = 200 only a small fraction of the nodes (3%) are disconnected to the sink in Gr , while at n = 100 (where the average degree is equal to 4 − 5) wide parts of the networks (41% of the network nodes) are disconnected. For very low densities not only does the basic GeRaF protocol not perform well but it is also tough to envision simple, effective rules which can re–route packets so that they can be delivered to the sink without paying too much in terms of extra latency. We have investigated in detail the correlation between packet discarding after saturating the 50 attempts to find a relay and nodes topological properties. Results have shown that packet discarding is typically associated to nodes which are either disconnected to the sink in Gr or have a low out–degree (compared to their in–degree). The first type of nodes are the ones mostly responsible for the pout fraction of in–network discarding at low λs. Consider what happens in case of nodes which are not dead ends, are disconnected to the sink and are neighbors of one (or more) dead ends. These nodes find it difficult to select an active relay to forward the packet to as dead ends are often busy unsuccessfully trying to forward a packet they have received for 50 times. This in turn leads to a probability of discarding which is very high

at nodes neighbors of dead ends. As soon as we consider disconnected nodes which are far away from the dead ends, the probability decreases. As λ increases also nodes which are not disconnected in the network get congested, resulting in packet discarding. Though the λ we have considered result in nominal low data rates wrt the channel capacity, the high time needed to find a relay results in a significant decrease of the effective bandwidth available to a node to transmit data and leads to a situation close to saturation at λ = 1 in case of bottleneck nodes (with low out–degree). In Fig. 12 and in Fig. 15 we have reported the ratio between the energy consumption each node would have spent if in awake mode over the whole simulation time and the average energy consumption per node when the GeRaF+ protocol is operated (we call this metric energy saving factor). At low λ the energy saving factor closely follows the inverse of the duty cycle (which equals 10 for d = 0.1 and 2 for d = 0.5). This is expected based on the per hop normalized energy consumption results discussed in the previous subsection. At high load when the duty cycle is low (equal to 0.1) we observe a decrease in the energy saving factor wrt what predicted by the duty cycle. This is particularly evident at low densities. At λ = 1 the energy saving factor decreases from 9.04 to 6.4 (the latter corresponding to a 36% decrease wrt the energy saving factor associated to the duty cycle) when n decreases from 400 to 100. The trend is exactly the opposite when the duty cycle is high (0.5). At d = 0.5, λ = 1, n = 100 the energy saving factor is 3.5% higher than the energy saving associated to the duty cycle. This is because at n = 100 and for high λ, for both d = 0.1 and d = 0.5 it is challenging to find a relay, resulting in the need to backoff several times, on average, before a packet is successfully relayed. At d = 0.1 (d = 0.5), λ = 1, n = 100 a node has to backoff, on average, 7.5 (3.85) times before a valid relay is identified and the packet is successfully transmitted. In these scenarios the length of the backoff time becomes an important, dominant factor. If the length of the backoff time is short with respect to the time spent by the nodes in sleep according to the duty cycle (as in the case of a duty cycle equal to 0.1) then the higher number of attempts needed to successfully relay a packet, thus also the higher amount of control traffic transmitted, translates into higher energy consumption. As the length of the backoff time becomes longer than the time nodes should be asleep according to the duty cycle, then nodes which often experience backoffs will show a lower energy consumption than what predicted by the duty cycle. Fig. 13 and Fig. 16 report the average end–to–end latency experienced by the packets successfully delivered to the sink, while in Fig. 14 and Fig. 17 the average number of hops they traverse is depicted. In particular, Fig. 14 and Fig. 17 depict, for d = 0.1 and d = 0.5, the ratio h/hmin (G) between the average route length h of the

8 of 10

10

18

9.5

16 14

1.5

8

7.5

route length increase

8.5

10 8 6

6.5

6 0.05 0.1

Fig. 12. 2.08 2.07 2.06

0.25

0.5 lambda

1

Energy saving factor, d = 0.1.

0.25

Fig. 13. 2.6 2.4 2.2

0.5 lambda

0.9 0.05 0.1

1

End to end latency, d = 0.1.

end to end latency

2.03 2.02

Fig. 14.

n=1000 n=800 n=600 n=400 n=300 n=200 n=100

1.8 1.6 1.4

1

2

0.5 lambda

1

Route length, d = 0.1.

1.2

1.2

2.01

0.25

1.25

2

2.04

h/hmin(G), n=1000 h/hmin(G), n=600 h/hmin(G), n=300 h/hmin(G), n=100 hmin(Gr)/hmin(G), n=1000 hmin(Gr)/hmin(G), n=600 hmin(Gr)/hmin(G), n=300 hmin(Gr)/hmin(G), n=100

1.2

1

0 0.05 0.1

2.05

Fig. 15.

1.3

2

n=1000 n=800 n=600 n=400 n=300 n=200 n=100

1.99 0.05 0.1

1.4

1.1

4

n=1000 n=800 n=600 n=400 n=300 n=200 n=100

route length increase

7

energy saving factor

1.6

12 end to end latency

energy saving factor

9

1.7

n=1000 n=800 n=600 n=400 n=300 n=200 n=100

1.15

h/hmin(G), n=1000 h/hmin(G), n=600 h/hmin(G), n=300 h/hmin(G), n=100 hmin(Gr)/hmin(G), n=1000 hmin(Gr)/hmin(G), n=600 hmin(Gr)/hmin(G), n=300 hmin(Gr)/hmin(G), n=100

1.1

1.05

1

0.8

0.25

0.5 lambda

Energy saving factor, d = 0.5.

1

0.6 0.05 0.1

Fig. 16.

0.25

0.5 lambda

End to end latency, d = 0.5.

packets received at the sink, and the average route length hmin (G) packets would have experienced if transmitted over the shortest paths from the sources to the sink in the network topology G = (N, E).1 h/hmin (G) thus represents the increase in route length induced by GeRaF + relay selection rule wrt the shortest paths. To understand how much this increase depends on the greedy selection rule and how much it is instead due to the fact the duty cycle does not always allow to select the “bestº relays, we have also displayed the ratio hmin (Gr )/hmin (G), where hmin (Gr ) represents the average shortest paths length between the packet sources and the sink in Gr . hmin (Gr )/hmin (G) thus captures the increase in the route length due to the greedy relay selection rule which tries to choose each time as relay the neighbor closest to the sink. Results show that almost no performance degradation is due to the greedy selection rule. The value of hmin (Gr )/hmin (G) is never higher than 1.01%. The maximum increase in route length achieved by the protocol at d = 0.1 (d = 0.5) with respect to the shortest path length over the network topology is achieved at λ = 1, n = 300 and is equal to 70% (24.5%). As the density decreases h/hmin (G) generally increases to reflect the sparser topology (thus the higher hmin (G)). However at n = 100 the route lengths are shorter than at n = 300, 600, 1000. This is due to the fact that the route length is averaged only among the packets which reach the sink. As successful packet delivery becomes critical (e.g. 1 G = (N, E) is the graph which has a node for each network device and a link (i, j) between any two nodes i and j corresponding to devices which are in range of each other.

1

0.95 0.05 0.1

0.25

Fig. 17.

0.5 lambda

1

Route length, d = 0.5.

at n = 100, and for high λ), it becomes more and more unlikely that packets having to traverse a high number of hops will be ultimately delivered to the sink. This motivates the decrease in route length in these scenarios. Fig. 13 and Fig. 16 report the average end–to–end latency experienced by packets delivered to the sink at d = 0.1 and d = 0.5. Such average latencies range from 1.09s (0.79s) for λ = 0.05, n = 1000 up to 16.87s (2.5s) at λ = 1, n = 200 when d = 0.1 (d = 0.5). The case λ = 1, n = 100 has a lower latency than the case λ = 1, n = 200 for the same reasons which result in shorter routes in this scenario. Based on the results of GeRaF+ performance evaluation, we designed a second variant of GeRaF, GeRaF + (2). Our aim is to decrease the probability of unsuccessfully delivered packets. We have seen that a major reason of in– network discarding is packet loss at dead ends or at nodes which are disconnected from the sink in Gr . GeRaF+ (2) thus adds to the basic GeRaF+ protocol simple rules to backtrack a packet which has reached a dead end and to re–route it to the sink along a different path. The idea is to adopt the following simple heuristic. Whenever a packet reaches a node which is unable to relay it further for 50 times, the packet is sent back in the direction of the source for hback hops. This is implemented by setting a flag in the packet, stating that the packet is being backtracked, and by switching the source and destination fields. Once the packet is backtracked for hback hops we reset the backtrack flag and transmit the packet toward the sink according to the standard GeRaF+ rules. The backtracking and re–route

9 of 10

process is performed until the sink is reached, or for a maximum number r of re–route attempts. GeRaF + (2) also adopts a dynamic duty cycle to discourage nodes from selecting as relays those nodes which are likely to be dead ends or disconnected to the sink in Gr . The way this is performed is as follows. Whenever a node is unable to find a relay for a packet, it assigns itself to the lowest–priority region regardless of its actual location (thus participating to the contention phase only if no other relay is available in the other relay regions). If it keeps being unable to find relays for the packets it receives, it reduces its duty cycle, thus making it more and more unlikely to be selected as relay for a packet. This is implemented by halving the duty cycle each time the threshold of 50 attempts is reached without being able to find a relay. In case a node with reduced duty cycle receives a packet and is able to forward it further (which means the node is not a dead end), it is allowed to upgrade its priority by re–joining its original relay region and by operating at the standard duty cycle d. Although this is a simple heuristic approach which could still be improved, the adoption of this scheme is already able to significantly improve the protocol performance. We have tested GeRaF+ (2) performance for hback = 2 and r = 3. The percentage of successfully delivered packets in GeRaF+ (2), at d = 0.1 (d = 0.5) ranges from 48.6% to 58.3% (from 57.9% to 61.0%) at n = 100, and from 92.8% to 97.0% (96.1% to 98.0%) at n = 200. The percentage of successfully delivered packets instead varies between 36.7% and 38.3% (38.9% and 42.0%) at n = 100, d = 0.1 (d = 0.5), and between 80.8% and 83.5% (82.5% and 86.0%) at n = 200 when the GeRaF + protocol is adopted. These improvements come at the cost of an increase in packet latency. The latency of the packets which are not re–routed only slightly increases (up to 33.7% and 21.7% at n = 100, 200, d = 0.1; up to 23.1% and 5.0% at n = 100, 200, d = 0.5) to account for the increased network traffic, while the average latency of re–routed packets can be as high as 4 (8) times the latency of the other packets at d = 0.1 (d = 0.5). Packet re–routing is thus useful only in case of delay tolerant applications. IV. CONCLUSIONS In this paper we have presented a thorough performance study of the Geographic Random Forwarding (GeRaF) protocol. By means of a detailed ns–2 simulation model, we have considered a number of operating conditions and explored (and explained) in detail the protocol behavior. Based on the insight gained, we have been able to propose two variants of the protocol that are able to significantly improve the performance. Unlike in previous studies, we have also considered the energy and latency performance for a multihop scenario.

The overall conclusions we can draw from our study are that the GeRaF protocol is a promising solution for energy efficient MAC/routing in sensor networks, although some protocol fine tuning may lead to significant performance improvement, and is therefore an important step. Further investigation on these issues, as well as implementation of the protocol on real devices, are part of our future work. ACKNOWLEDGEMENTS The authors wish to thank Gabriele Mambrini for his help in the creation of the first GeRaF simulator version. This work has been supported in part by the Italian PATTERN and the European WiSeNt projects. R EFERENCES [1] B. Chen, K. Jamieson, H. Balakrishnan, and R. Morris, ªSpan: an energy–ef®cient coordination algorithm for topology maintenance in ad hoc wireless networks,” Proc. 7th ACM MOBICOM, pp. 85–96, July 2001. [2] I. Stojmenovic and X. Lin, ªGEDIR: loop–free location based routing in wireless networks,” Int'l. Conf. Parallel and Distrib. Comp. and Net., Nov. 1999. [3] B. Karp and H. T. Hung, ªGPSR: Greedy Perimeter Stateless Routing for wireless sensor networks,” Proc. 6th ACM MOBICOM, pp. 243–254, Aug. 2000. [4] P. Bose, P. Morin, I. Stojmenovic, and J. Urrutia, ªRouting with guaranteed delivery in ad hoc wireless networks,” Proc. 3rd ACM DIAL±M , pp. 48–55, Aug. 1999. [5] Y. Yu, D. Estrin, and R. Govindan, ªGeographical and energy– aware routing: a recursive data dissemination protocol for wireless sensor networks,” UCLA Comp. Sci. Dept., Tech. Rep. 010023, May 2001. [6] C. Intanagonwiwat, R. Govindan, D. Estrin, J. Heidemann, and F. Silva, ªDirected diffusion for wireless sensor networking,” IEEE/ACM Trans. Networking, vol. 11, no. 1, pp. 2–16, Feb. 2003. [7] D. Ferrara, L. Galluccio, A. Leonardi, G. Morabito, and S. Palazzo, ªMACRO: an integrated MAC/routing protocol for geographic forwarding in wireless sensor networks,” Proc. of IEEE INFOCOM, 2005. [8] S. Giordano and I. Stojmenovic, Ad Hoc Wireless Networking. Kluwer Academic Publisher, 2004, ch. Position based routing algorithms for ad hoc networks: A taxonomy, pp. 103–136, X. Cheng, X. Huang and D. Z. Du, editors. [9] M. Zorzi and R. R. Rao, ªGeographicrandom forwarding (GeRaF) for ad hoc and sensor networks: energy and latency performance,” IEEE Trans. Mobile Comput., vol. 2, no. 4, pp. 349–365, 2003. [10] ——, ªGeographic random forwarding (GeRaF) for ad hoc and sensor networks: multihop performance,” IEEE Trans. Mobile Comput., vol. 2, no. 4, pp. 337–348, 2003. [11] M. Zorzi, ªA new contention–based MAC protocol for geographic forwarding in ad hoc and sensor networks,” Proc. IEEE ICC, vol. 6, pp. 3481–3485, June 2004. [12] ªThe network simulator – ns-2.” [Online]. Available: http://www.isi.edu/nsnam/ns/ [13] A. Savvides and M. B. Srivastava, Mobile Ad-Hoc Networking. IEEE Press and Wiley, Inc., 2004, ch. Location Discovery, S. Basagni, M. Conti, S. Giordano, and I. Stojmenovic, editors. [14] R. A. Howard, Dynamic Probabilistic Systems. John Wiley & Sons, 1971.

10 of 10