cross-layer publish/subscribe forwarding for low … · cross-layer publish/subscribe forwarding...

122
CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW POWER AND DELAY TOLERANT WIRELESS SENSOR NETWORKS Relatore prof. MICHELE ZORZI Correlatori dott. ZACH SHELBY prof. CARLOS POMALAZA RÁEZ Laureando GIORGIO QUER Corso di laurea in INGEGNERIA DELLE TELECOMUNICAZIONI Anno Accademico 2006-2007

Upload: others

Post on 08-Aug-2020

28 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW POWER

AND DELAY TOLERANT WIRELESS SENSOR NETWORKS

Relatore prof. MICHELE ZORZI

Correlatori dott. ZACH SHELBY prof. CARLOS POMALAZA RÁEZ

Laureando GIORGIO QUER

Corso di laurea in

INGEGNERIA DELLE TELECOMUNICAZIONI

Anno Accademico 2006-2007

Page 2: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi
Page 3: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

Key Words

• Ambient Intelligent

• Wireless Sensor Network

• Publish/Subscribe

• IEEE 802.15.4

• forwarding

• O1T

• hop count

Page 4: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

ii Key Words

Page 5: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

Sommario

L’informazione assume un ruolo chiave per lo sviluppo e il benessere della so-cieta. L’importanza di avere informazioni sempre piu dettagliate sull’ambienteche ci circonda, sia esso industriale, abitativo o naturale, e monitorare costan-temente alcuni valori del corpo umano quali temperatura, pressione o battitocardiaco, rappresenta una nuova frontiera nel mondo delle telecomunicazioni.

Il lavoro di tesi propone due tecniche di forwarding da utilizzare nello sce-nario del progetto europeo e-SENSE per la raccolta di informazioni tramite retidi sensori wireless, in diversi ambienti, dal corpo umano ad ambienti abitativi,industriali o naturali.

Le tecniche di forwarding proposte sono ottimizzate per essere utilizzate inuna interazione di tipo Publish/Subscribe, in cui ogni nodo della rete di sensoripuo agire come pubblicatore di una determinata informazione o sottoscrittore,vedi consumatore, di una determinata informazione.

La prima tecnica proposta agisce in un ambiente privo di qualsisi infor-mazione geografica o deterministica, per l’inoltro dei pacchetti senza la conoscenzadell’indirizzo della destinazione. Sfruttando le informazioni cross-layer in ogninodo, la tecnica si propone di raggiungere il massimo numero di nodi minimiz-zando i costi per la rete.

La seconda tecnica agisce invece in un ambiente dove sono gia presentiin ogni nodo informazioni deterministiche sulla destinazione del pacchetto. Leinformazioni non sono di tipo geografico, ma tengono conto semplicemente delladistanza dalla destinazione in termini di numero di hop. La tecnica permettedi ottimizzare il numero di trasmissioni con un protocollo molto semplice chenon richiede grosse capacita computazionali.

Le prestazioni delle due tecniche vengono studiate tramite analisi matema-tica e confrontate con alcune delle piu comuni tecniche di forwarding nello stesso

Page 6: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

iv Sommario

scenario. I risultati analitici vengono poi confrontati con i risultati simulativinelle medesime ipotesi.

Infine tramite simulazione vengono analizzate le prestazioni delle tecnichedi forwarding in diversi casi specifici e realistici.

Page 7: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

Abstract

The information plays a key role in the development and well-beings of this so-ciety. There is a need to have detailed information about the present conditionsof a location, be it an industrial or private building, or even a natural place.There is also a need to have direct values of the human body, like temperature,blood pressure or pulse beat. Gaining access to this information is a new goalfor the telecommunication world.

This thesis work proposes two forwarding techniques which are suitable forthe scenario of the e-SENSE project. The purpose of e-SENSE is to collect in-formation through a wireless sensor network for many applications from sensingthe human body to monitoring an industrial environment.

The forwarding techniques proposed are optimized to be used in a Pub-lish/Subscribe interaction, in which every node of the sensor network can ei-ther be a publisher for a certain information or a subscriber, which acts as aconsumer of information.

The first technique works in absence of any geographical or deterministicinformation, without even knowing the address of the destination of the packet.Using the cross-layer information, which is available in every node, the task ofthe technique is to reach the maximum number of nodes minimizing the energycost.

The second technique works in a scenario in which there is deterministicinformation in every node about the destination of the packet. The informa-tion is not geographical, it simply represents the distance in hop count to thedestination. This technique optimizes the number of transmissions using a verysimple protocol with low computational complexity.

The performances of the two techniques are evaluated through mathematicalanalysis and are compared to some of the most common forwarding techniques

Page 8: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

vi Abstract

in the same scenario. Then the analytical results are compared with simulationresults in the same hypothesis.

Finally, the performances of the forwarding techniques in some specific andrealistic cases are evaluated through simulation.

Page 9: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

Contents

Key Words i

Sommario iii

Abstract v

1 Introduction 11.1 WSN in the scenario of the e-Sense project . . . . . . . . . . . . 11.2 Routing and forwarding techniques for WSN . . . . . . . . . . . 41.3 Publish/Subscribe interaction . . . . . . . . . . . . . . . . . . . . 51.4 Contribution of this thesis to Pub/Sub WSNs’ research . . . . . 8

2 Forwarding technique for Publish/Subscribe in absence of de-terministic information (D.I.) 112.1 Cross-layer information . . . . . . . . . . . . . . . . . . . . . . . 142.2 Implementation of the O1T technique . . . . . . . . . . . . . . . 172.3 Network layer packet . . . . . . . . . . . . . . . . . . . . . . . . . 192.4 The utility table . . . . . . . . . . . . . . . . . . . . . . . . . . . 212.5 Options of the forwarding technique . . . . . . . . . . . . . . . . 22

3 Forwarding technique for Publish/Subscribe in presence of de-terministic information (D.I.) 273.1 Implementation of the technique . . . . . . . . . . . . . . . . . . 29

3.1.1 Forwarding of the first publish packet . . . . . . . . . . . 293.1.2 Filling of the utility table . . . . . . . . . . . . . . . . . . 303.1.3 Forwarding after the first publish packet . . . . . . . . . . 31

3.2 Issues of deterministic forwarding . . . . . . . . . . . . . . . . . . 33

Page 10: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

viii CONTENTS

4 Analysis 37

4.1 Scenario of the analysis . . . . . . . . . . . . . . . . . . . . . . . 384.1.1 Geometrical parameters . . . . . . . . . . . . . . . . . . . 40

4.2 Techniques in absence of deterministic information (D.I.) . . . . 454.2.1 Flooding . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454.2.2 Gossip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494.2.3 O1T . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

4.3 Results in absence of D.I. . . . . . . . . . . . . . . . . . . . . . . 524.4 Analysis in the P/S scenario in absence of D.I. . . . . . . . . . . 58

4.4.1 Method A: . . . . . . . . . . . . . . . . . . . . . . . . . . 584.4.2 Method B: . . . . . . . . . . . . . . . . . . . . . . . . . . 594.4.3 Comparison between the two methods . . . . . . . . . . . 60

4.5 Techniques in presence of D.I. . . . . . . . . . . . . . . . . . . . . 614.5.1 Sleeping period . . . . . . . . . . . . . . . . . . . . . . . . 624.5.2 Mobile subscriber . . . . . . . . . . . . . . . . . . . . . . . 63

5 Simulation 67

5.1 Scenario of the simulation . . . . . . . . . . . . . . . . . . . . . . 695.2 Techniques in absence of deterministic information (D.I.) . . . . 71

5.2.1 Comparison with the analysis results . . . . . . . . . . . . 715.2.2 Comparison in a scenario with edge effects . . . . . . . . . 725.2.3 Option: neighbors of the publisher are aware of the pub-

lisher interest . . . . . . . . . . . . . . . . . . . . . . . . . 765.3 O1T technique in a realistic Publish/Subscribe scenario . . . . . 77

5.3.1 Option: Ptransm2. . . . . . . . . . . . . . . . . . . . . . 80

5.3.2 Option: 2-hops neighbors knowledge . . . . . . . . . . . . 805.4 Techniques in presence of D.I.: comparison in a Publish/Subscribe

scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 825.4.1 Simulation with mobility of the nodes . . . . . . . . . . . 835.4.2 Simulation with sleeping behavior of the nodes . . . . . . 86

6 Conclusion 89

A Departures’ process 91

A.1 Demonstration: a sampled Poisson process is still Poisson . . . . 92

Page 11: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

CONTENTS ix

A.2 Demonstration: a Poisson process delayed by a variable uni-formly distributed is still Poisson . . . . . . . . . . . . . . . . . . 93A.2.1 Demonstration part (ii) . . . . . . . . . . . . . . . . . . . 93A.2.2 Demonstration part (i) . . . . . . . . . . . . . . . . . . . . 96

Ringraziamenti 103

Acknowledgements 105

Page 12: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

x CONTENTS

Page 13: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

Chapter 1

Introduction

The growing of wireless technology in everyday life is joined to an increasingof research in this field, since the middle of the 1990s. The advances in thehardware of embedded microprocessor have made possible the production ofvery small nodes in a cost-effective way.

An interesting and very promising field is the one of Low Rate Wireless Per-sonal Area Network (LR-WPANs), that has been recently standardized withthe standard IEEE 802.15.4 [1] [2] [3]. This MAC protocol is made to workwith Wireless Sensor Networks (WSNs), a particular kind of network with keyissues like: low cost, low energy requirement, scalability, dynamic self manage-ment and reliability. They are an evolution of the well known Ad-Hoc wirelessnetworks, in order to answer to an ongoing request by the industrial field ofnew cheap devices suitable for many growing up applications.

In the next sections it describes the e-Sense scenario of research for sen-sor networks, it presents a brief literature overview about routing techniquessuitable for sensor networks, it is described the Publish/Subscribe interaction,which is the basis of this work, and finally it introduces the contribution of thisthesis to the research on this field.

1.1 WSN in the scenario of the e-Sense project

In recent years, with the advent of ubiquitous computing and ambient intel-ligence, a new concept of information dissemination has arisen. The e-Sense

Page 14: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

2 Introduction

project1 is an Integrated Project of the Information Society Technologies (IST)supported by the European 6th Framework Programme (FP6), with 24 partnersfrom 11 countries, including the Centre for Wireless Communication (CWC) atthe University of Oulu, in which the research for this work was performed.

The main task of the project is capturing Ambient Intelligent for mobilecommunication through WSNs, by integrating WSNs in Beyond 3 GenerationSystems (B3G). Wireless sensors are expected to operate in a harsh environ-ment, over a long period of time, coexisting with other wireless networks. Theyrequest bandwidth efficiency and robustness to interference, and they have tobe of a very small size. On the other hand, due to the ubiquitous nature andto the quantity of sensors within such a system, key requirements are ultralow power operation and multidimensional scalability. Another key issue is selfmanagement, in order to react to the changing of the topology of the network,due to mobility or sleeping periods of the nodes.

The e-Sense architecture, addressed by the Work Package 2 [4], supportsheterogeneous networking, provides connectivity for a wide range or sensornodes, while managing mobility, limited bandwidth and power resources.

Another key task, depending on the importance of the information in thenetwork, is the security [5] [6], at the different layers of the communication.The security at the MAC and PHY layers has already been studied [7], whilethere is still the need of some security solution for the upper layer, for examplea security system thought for the Publish/Subscribe interaction.

In WP1 [8] three kinds of applications have been defined, to capture ambientintelligence in three very different scenarios:

Personal application space: devices which sense the identity, presence, lo-cation, mood of private users;

Community application space: in a health care field, devices which senseidentity, physiology, location, activity of patients and caretakers;

Industrial application space: devices which sense the profile, location, func-tionality of the product.

In these three use-cases scenarios, there are three types of logical sensornetworks considered:

1http://www.ist-e-sense.org

Page 15: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

1.1 WSN in the scenario of the e-Sense project 3

Body Sensor Network (BSN): provides connectivity between body sensordevices; they have low mobility, linked with body movement, the numberof nodes is limited and they have a small coverage area;

Object Sensor Network (OSN): provides connectivity between sensors be-longing to the same object (e.g. a ship, a container, a car); the size ofthe network, as well as the mobility, are different from a BSN, and thenumber can be up to 100 sensors;

Environmental Sensor Network (ESN): provides connectivity between sen-sors spread in a private or public area; the environment (e.g. an open fieldor a thick forest) and the number of nodes (from a dozen up to hundredsof nodes) are key points to define this kind of network.

In this thesis the attention is focused in an indoor scenario (e.g. some officesin the same building), but the work is general and can be applied to all kindsof scenarios, depending on the requirements of the applications.

The IEEE has provided a standard for the MAC layer, flexible enoughto be suitable for all these new applications, that is the IEEE 802.15.4: asurvey is found in [9]. It has the characteristic requested by the applications oflow complexity, low cost and ultra-low power, in order to provide connectivityamong inexpensive, portable and moving devices. It is suitable for applications,like the ones in the e-Sense project, that require cheap WPAN solutions withlow energy consumptions, but they don’t need the performance of a technologysuch as Bluetooth.

A comparison with other existing WPAN standards, in terms of range anddata rate, is presented in Fig. 1.1.

The standard provides two kinds of nodes, the Full Function Device (FFD)and the Reduced Function Device (RFD). A FFD can act as a producer or aconsumer of information, as well as a relaying node. A RFD is very simpleand it has very modest resource and communication requirements, so it cancommunicate only with a FFD. In this work, a sensor node is a FFD: the RFDare not taken into account, because they can not take part on the forwardingof a packet, that is the main topic of this work.

A more detailed scenario, with an in depth presentation about the e-Senseproject, an overview about the MAC and PHY layer and a more details aboutthe Pub/Sub interaction can be found in [10], a thesis work that defines the

Page 16: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

4 Introduction

Figure 1.1: WPAN standards, [10]

basis of the current work.

1.2 Routing and forwarding techniques for WSN

If suitable MAC and PHY layers have been found with 802.15.4, appropriatefor many applications, there is not a standard for the upper layers, the networklayer and the middleware layer (between network and application layer). Manysolutions have been proposed, a good survey about can be found in [11], butthere is still not a standard that can satisfy all the kinds of needs of the differentapplications.

A more detailed survey about the existing routing technique is in [10], hereit is proposed a fast overview, to present the state of the art.

The routing protocols in WSNs can be divided according to the networkstructure in:

• flat-based routing, like SPIN, Direct Diffusion [12] and Rumor Routing[13];

Page 17: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

1.3 Publish/Subscribe interaction 5

• hierarchical-based routing, like LEACH [14] and PEGASIS [15];

• location-based routing, like GAF [16], GEAR [17];

or according to their protocol operation in:

• multipath-based;

• negotiation-based;

• Quality of Service (QoS)-based;

• query based;

• event based

In order to understand which is the suitable routing technique for the spe-cific application analyzed in this thesis, it is necessary to have a firm under-standing of the application and middleware layer, described in next section.

1.3 Publish/Subscribe interaction

The Publish/Subscribe (Pub/Sub) interaction is a key technology for the dis-semination of information in a low power network, in one of the scenarios of thee-Sense project. It was introduced by Costa in [18], where he still supposes alink based wired scenario. The Pub/Sub interaction is a middleware techniqueto allow the exchange of information between the producer of information andthe consumer of information, also if the two nodes are not in direct communi-cation and there is not a predefined route between the two nodes. The pathis defined at the beginning of the interaction and it easily changes due to thechanging topology of the network. The general architecture of the Pub/Subinteraction is the one explained in Fig. 1.2.

The logic of the Pub/Sub in [18] is the same logic used in the successivewireless approaches. A generic Pub/Sub communication system is composed ofa set of nodes distributed over a communication network. Clients to the systemare divided according to their role into publishers, which act as producers ofinformation, and subscribers, which act as consumers of information. Thisdivision is not absolute and static within the network since some nodes canbe at the same time, depending on the data and application, a publisher andsubscriber.

Page 18: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

6 Introduction

Figure 1.2: Architectural model of the Publish/Subscribe interaction, [10]

The main semantic characterization of Pub/Sub is in the way events flowfrom senders to receivers: receivers are not directly addressed by publishers, butrather they are indirectly addressed according to the content of packets (contentbased routing). Besides a receiver node, or subscriber, looking for interest j (aspecific content) asks the network for this interest. The publisher, the producerof information matching interest j, sends its packets to the network and theywill be forwarded by the relaying node to the subscriber.

Thanks to this anonymity, publishers and subscribers exchange informationwithout directly knowing each other: this is why a Pub/Sub network per-forms a simple forwarding of the packets without a destination address andpre-determined route. In this way, the packets reach the destination proba-bilistically and the forwarding of the packet is taken according to a specificalgorithm, that can use the cross-layer information available at the node. InWSNs, where the topology changes due to the mobility and failure of nodes,a broker overlay is unfeasible because of the limited reliability and computa-tional capability of devices. Instead a better solution for event routing is apeer-to-peer unstructured overlay [19].

Page 19: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

1.3 Publish/Subscribe interaction 7

Successively, Costa proposed some other solutions for the forwarding in aPub/Sub scenario, in [20], where it is taken into account the broadcast natureof the wireless channel, and in [21], where it is proposed a more efficient solutionfor a sub-optimal forwarding in a network with stringent energy constraints.

The solution proposed in in [20] is similar to a gossip forwarding [22]: whilewith flooding every node forwards the packet as soon as it is received, withthe gossip technique the packet is forwarded by a node with Probability ofForwarding PF , while with probability 1 − PF it is not forwarded by thatnode. This solution of a probabilistically forwarding is not very efficient andnot reliable because there is a finite probability that the destination is neverreached. In [23] it is demonstrated that the gossip has probability P = 1 ofreaching the destination node, but this is true only in the hypothesis of aninfinite density of nodes.

In the second approach proposed by Costa in [21] the idea is to use somecross-layer information to perform a better forwarding decision, node by node,independently by the other nodes in the neighborhood. The forwarding decisionis taken based on the Utility Function, that calculates a probability of forward-ing at every node, in function of some cross-layer parameters. This idea is usedalso in this thesis, but slightly modified, because the cross-layer informationis not used to calculate a probability but a delay, with the logic explained inchapter 2. The problems of the approach in [21] are, in three points:

• the cross-layer information affects only probabilistically the forwarding;this information can play a more important rule driving the forwardingin a semi-deterministic way;

• it has not taken into account the behavior of the neighbor nodes, so thattwo nodes closed to each other can both transmit to the same neighbors;

• it is not specified how and how often the information should be updated:this is a key point for the technique.

These problems are solved in this work, as explained in the following section.

Page 20: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

8 Introduction

1.4 Contribution of this thesis to Pub/Sub WSNs’

research

This thesis starts from the state of the art briefly presented in the previoussections and from the work in [10] that is a complete overview about the existingtechniques in the literature. This is a good starting point to develop newsolutions for the Pub/Sub scenario.

The main contribution of this thesis is the development and analysis of someforwarding techniques, that use some of the ideas proposed in [21], in a differentway, reaching high performance, without loosing too much in reliability, andreducing prominently the energy consumptions of the network. The approachstarts from a hypothesis different from the classical Pub/Sub scenario outlinedin [18]: in that paper it is supposed that the publisher publishes its data for afew hops, no matter if there is a node interested in this data. Instead in thisthesis it is supposed that a publisher sends its data only after it has received arequest for it, so there is at least one node (subscriber) interested in that data.This avoids a lot of useless transmissions of publish packets while there is nosubscriber for the matching interest. The Pub/Sub interaction adopted in thisthesis is composed by the following events, in chronological order:

1. a subscriber S asks with a subscribe packet for interest j;

2. the subscribe packet is forwarded in the network, reaching the highernumber of nodes possible;

3. the subscribe packet reaches a publisher matching interest j;

4. only after it is reached, the publisher starts to send publish packets;

5. every publish packet follows the way back using D.I. and it reaches thesubscriber.

This approach forces definition between two different forwarding techniques,in presence and in absence of D.I., one specific for the subscribe packet and theother for the publish packets.

The forwarding technique proposed in chapter 2, named “Only One Trans-mits” (O1T), is used by the subscriber to send a request (subscribe packet) tothe publisher matching the requested interest j. This technique works in ab-sence of any geographical or deterministic information. It is an evolution of the

Page 21: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

1.4 Contribution of this thesis to Pub/Sub WSNs’ research 9

gossip technique and it uses the cross-layer information, like in [21], but with avery different approach. The performances of O1T is then evaluated in chapter4, through mathematical analysis, and in chapter 5, through simulation. Theperformance of O1T is compared with the performances of flooding and gossip.It should be noticed that if the MAC collisions do not influence significantlythe forwarding, the flooding gives the higher number of nodes reachable, fixedthe number of hops from the source node, because it guarantees that all thepossible transmissions are performed. The technique proposed is compared alsoto the Fireworks technique from [23], another forwarding technique useful for asimilar scenario. Moreover, some options of O1T are proposed in chapter 2 andthe increasing of the performance due to these options is analyzed in chapters4 and 5.

In chapter 3 it proposes a second forwarding technique, specific for the pack-ets containing the information requested (publish packets) in the way from thepublisher to the subscriber. This technique uses the D.I. in order to route thepublish packet performing the minimum number of transmissions allowed. TheD.I. that helps the forwarding is distributed by the subscribe packet requestinginterest j, so it is already present in the network while the first publish packetis forwarded. The D.I. allows to define a type of virtual semi-deterministicpath from the publisher to the subscriber. In chapter 3 it is analyzed, also,how to update dynamically the D.I. and some options are specified to react toa changing in the topology of the network, due to mobility or sleeping periods,in order not to loose all the D.I. already present in the network. The D.I. ismemorized as distance, in terms of Hop Count from the subscriber (HCS) andfrom the publisher (HCP ), using the idea presented in the routing techniqueusing Hop Count in [24] and in SARA [25]. The logic is very different fromthese papers, because in this thesis the HC is not used to route the packet to-ward a specific destination, but it is used in every node to take the decision onwhether to forward or not the packet. The forwarding is of course less reliablethan the routing technique proposed in [24] and [25], but it is much simplerand it requests very low energy. The spreading of the HC information does notneed any specific packet, but it is spread by the subscribe packet that requestsa new interest j, so only when it is necessary.

The technique with D.I. is analyzed mathematically in chapter 4 and throughsimulation in chapter 5. Moreover, it should be noticed that in a very fast

Page 22: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

10 Introduction

moving network, the D.I. are easily out of date and this can drive to a wrongforwarding of the publish packets. In chapter 5 the performances of the tech-nique in function of the mobility of the network are analyzed. It is found out,for some specific cases, that in the presence of a fast changing topology it is notuseful to use the D.I. for the forwarding, but it is better to forward the publishpackets using the O1T technique.

Finally, in chapter 6 the conclusions of this work are driven, underlining theresults found out from the analysis of the performances of the new forwardingtechniques proposed and the advantage of these techniques in the low energyscenario considered.

Page 23: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

Chapter 2

Forwarding technique for

Publish/Subscribe in absence

of deterministic information

(D.I.)

The task of a forwarding technique suitable for a Publish/Subscribe scenariois to forward hop by hop the subscribe packet, that requests interest j, till itreaches the publisher, which publishes interest j. In the way from the subscriberto the publisher, the subscribe packet has also to disseminate some deterministicinformation (D.I.), as shown in section 2.1. Then the publish packet should beforwarded in the way back to the subscriber, using a technique described in thenext, chapter 3, that exploits this D.I. .

In the network there is not any geographical information and at the be-ginning there are neither any D.I. to route the packet, the nodes do not knowthe position and neither the existence of the publisher, so the subscribe packetshould be forwarded randomly in the network and it should reach as many newnodes as possible to increment the probability of reaching the publisher itself.It is important that the technique guarantees the maximum number of nodesreached at the minimum energy cost, because of the stringent energy constrainttypical of a WSN (wireless sensor network). In the hypothesis adopted, the net-work spends the same amount of energy at every transmission, that is the costin energy terms of one transmission and in average M reception by the neigh-

Page 24: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

12Forwarding technique for Publish/Subscribe in absence of

deterministic information (D.I.)

bors nodes, where M is the average number of neighbors of a node. The lengthof a packet is supposed to be constant. It is also supposed that a node is able toreach only the nodes inside its Region Of Transmission (RoT), so all the nodesdistant from the transmitting node less than RRoT, the radius of the RoT.

The basis of the new technique is the gossip technique. As shown in [22] andas analyzed in chapter 4, gossip has better performances than pure flooding, inenergy terms, even if it is able to reach less nodes than pure flooding. At everynode with the gossip technique the choice to retransmit or not is made simplyat random, the packet is retransmitted with probability p and discarded withprobability 1− p, without taking into account the information available at thenode to take a better decision.

The Only One Transmits technique (O1T) has the same principle of thegossip, that every node chooses by itself to retransmit or not, but the choice ismade with the help of all the information already available at the moment ofthe decision, that is:

• information about the state of the node, e.g. residual energy at the node;

• information about the neighbors of the node: if the node hears otherneighbors that retransmit, it will not retransmit.

The logic of this technique is different from the logic of the other techniquesin literature: for every new region discovered during the transmission of a packetthere are n new nodes that can hear each other, so that they are in the sameRoT. With gossip the choice of the node to retransmit is made at random: itis possible that none of the nodes retransmits, so a region of the network is notreached, or that more than one node retransmits. In the latter case only thefirst node that retransmits discovers a new region and new nodes, while all thesuccessive retransmissions by the other nodes can reach approximatively thesame area, so they can not reach many other new nodes and the transmissionis not efficient.

The best choice is to elect the nodes to retransmit, or eventually morethan one in particular scenarios. This choice is made at the transmitting node,that choose which of the receiving nodes should retransmit. The choice of therelaying node can be made at the transmitting node, that elects some of itsneighbors to re-forward the packet. This is, for example, the logic of Fireworks[23], in which every node with probability p broadcasts the message to all its

Page 25: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

13

neighbors, while with probability 1 − p it sends the message only to a finitesubset of them. In the scenario of this work, where the nodes do not have theknowledge of their neighbors, this is not possible.

In the O1T technique the choice is made at the receiving nodes: the mostsuitable node to retransmit retransmits first, as described in section 2.2, andall the other nodes in the same RoT, after hearing a second transmission of thesame packet, they do not retransmit at all. In doing this, at least one nodealways retransmits in every new region discovered, and only one, maximizingthe efficiency. Therefore the transmitting node is the best one according tosome cross-layer parameters.

The following example in Fig. 2.1 clarifies the logic of the O1T technique:node S is the transmitting node and the circumference with solid line delimitsits RoT; the receiving nodes are node A, B, C and D. After node S, node B

decides to retransmit, according to the algorithm explained in section 2.2; theRoT of B is delimited with a dash-dotted line. Node A and C receives a secondcopy of the packet from B and they do not retransmit any more. Instead nodeD does not receive a second copy of the packet, so it will retransmit, accordingto the O1T algorithm.

AB

S C

R R o T

D

Figure 2.1: Example showing the Region Of Transmission of the nodes and thelogic of the O1T technique.

Page 26: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

14Forwarding technique for Publish/Subscribe in absence of

deterministic information (D.I.)

The rest of the chapter is organized as follows:

• in section 2.1 all the cross-layer information used by the technique aredescribed;

• in section 2.2 the implementation of the O1T technique is presented, withall the formulas used by the technique;

• in section 2.3 the fields in a network layer packet, that implements boththe Publish/Subscribe interaction and the O1T technique are described;

• in section 2.4 the utility table, that collects all the information neededby the Publish/Subscribe interaction and used by the O1T technique, isdescribed and how it works;

• in section 2.5 there is a list of the possible options to improve the perfor-mances of the O1T technique.

2.1 Cross-layer information

The main idea of the O1T technique is to use all the cross-layer informationavailable to perform the best choice in the forwarding. It is necessary to analyzeat first the information available at the node and to put it in a format that canbe easily used in the formulas. Every cross-layer information i is representedby a parameter that regards a specific packet p received by a specific node n;this parameters is:

Ci(n, p) ∈ [0, 1] (2.1)

The value of the parameter is inversely proportional to the suitability of thenode n to retransmit packet p regarding the cross-layer information i, so forexample if i is the residual energy of the node:

• Ci(n, p) = 1 means that the node has little residual energy, so it is notsuitable to retransmit;

• Ci(n, p) = 0 means that the node has the maximum of residual energy,so it is suitable to retransmit the packet.

Two of the parameters depend on the packet p received and not on thereceiving node n (so the parameters is Ci(·, p), without any reference to thenode n):

Page 27: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

2.1 Cross-layer information 15

• the number of hops the packet has already passed through from the Sourcenode: Nhops ∈ [1, Nhops], with Nhops ∈ N, supposing that the maximumnumber of hops is Nhops; this information should be contained in thepacket and the value in the packet should be incremented by every nodebefore re-forwarding the packet: Nhops = Nhops + 1; the parameter,according to the format in (2.1), can be calculated as: CNhops(·, p) =

(Nhops − 1)/(Nhops − 1);

• the priority of the packet, PR ∈ [0, 1]: every packet can have a normalpriority, or it can be a very important packet for the network, e.g. anemergency message about the heart pulse in a body network. In this caseit should be forwarded as soon as possible by every node; it makes senseto have only CPR

(·, p) = 1 for a normal packet and CPR(·, p) = 0 for an

emergency packet;

Then there is a parameter that depends only on the receiving node, not onthe packet (so it is Ci(n, ·), without any reference to the packet p):

• the residual energy of the node, an information that comes from thephysical layer; the residual energy is E ∈ [0, Emax], so the parameterbecomes CE(n, ·) = 1− (E/Emax);

And finally there is another parameter, that depends on both the receivingnode and the received packet:

• the signal strength SS measured by node n receiving packet p: this pa-rameter that comes from the physical layer gives an idea of the distancebetween the transmitting and the receiving node; with a big distance,the flooding of the packet is faster, with high probability to avoid use-less retransmission; this parameter is represented by a normalized value:SS ∈ [0, SMAX

S ], so CSS(n, p) = SS/SMAX

S .

The most important parameter for the technique is the number of copies ofthe packet p1 received by node n, Ncopies ∈ [0,m]; this parameter gives an ideaof the probability that the forwarding of the packet p1 by the node n can reachnew nodes: if the node n receives more than one copy of the same packet, itmeans that other nodes in the neighborhood have already retransmitted beforeit, so there is a high probability that the rebroadcast is useless. It is necessary

Page 28: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

16Forwarding technique for Publish/Subscribe in absence of

deterministic information (D.I.)

to pay attention to counting the number of copies received by a node n: ifn received at first a packet p1 with Nhops = x, n must consider as copiesof p1 only the packets p with the same content and Nhops ≥ x + 1; all thepackets p received by n with the same content but with Nhops = x come froma “lower level” and n can anyway discover a new region of the network. Thiscomplicate concept is better explained in Fig. 2.2, where node A1, in red,(Nhops(A1) = x− 1) transmits to node B1 and B2, in blue. They can not heareach other, so they both retransmit (Nhops(B1) = Nhops(B2) = x). Node C1,in green, receives two copies of the packet, but both with Nhops = x, so it willretransmit anyway, and it is able to discover a significant new area, as shownin the figure.

A C

RR o T

B

1

1

B 2

1

Figure 2.2: Example of a transmission from node A1 to node C1.

In general, the number of copies can be evaluated as the other parame-ters, CNcopies(n, p) = Ncopies/m ∈ [0, 1]; in the O1T algorithm instead it hasa stronger value, so if Ncopies = 0, the packet p can be forwarded by node n,otherwise if Ncopies > 0 the packet is simply discarded.

In the next section, it is shown how all these parameters are used to electthe best forwarding node. For the moment, it is important to underline that

Page 29: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

2.2 Implementation of the O1T technique 17

the parameter of the above are only some of the possible parameters that canbe utilized for the election of the forwarding node and it is not necessary touse all of them: the choice of the parameters should be done according tothe specific network and the specific application. In the following sections, ituses the general notation Ci(n, p), referring to a specific parameter only whennecessary or in order to make a concrete example.

2.2 Implementation of the O1T technique

The election of the best forwarding node is made by the receiving nodes usingall the cross-layer information available. Nonetheless, it is important that thechoice (to forward or not the packet) has a random component (r in the rest ofthe section), because of the random spatial distribution and the high dynamismof the nodes: the best choice selected with all this information is not alwaysthe best choice in reality, it is simply the best choice with high probability; forexample, there could be a node B with really bad parameters, so it retransmitswith very low probability, but maybe it is the only neighbor of node C, that isthe destination of the packet, so the technique must assure that, at least withfinite probability PT > 0, also that node B retransmits.

After the introduction of all the parameters that influence the choice of thebest node, it is possible to understand the core of the technique: the transmit-ting node is node S and the receiving nodes are nodes n = 1, .., N . All the N

nodes, that receive the packet p for the first time, set a delay, calculated usingthe cross-layer parameter according to the following formula:

D(n, p) = r + ∆m∑

i=1

Ci(n, p)wi (2.2)

The symbology used is:

• r is a random variable with exponential distribution , with probabilitydensity function:

fe(t) =

{λ exp−λt for t ≥ 00 for t < 0

where λ = − ln(0.01)∆ , so that the probability P[e > ∆]= 0.01; with this

definition, r > ∆ with probability P < 0.01;

Page 30: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

18Forwarding technique for Publish/Subscribe in absence of

deterministic information (D.I.)

• ∆ is an interval of time, that depends on the characteristic and the con-straints of the network, as well as on the MAC layer adopted;

• Ci(n, p) is the value of the cross-layer parameter i for the forwarding ofpacket p by node n;

• wi is the normalized weight of the parameter i in the election of theforwarding node: wi ∈ [0, 1] and

∑i wi = 1.

In this hypothesis the delay is limited to D(n, p) < 2∆ with a probability ofP > 0.99. It should be noticed that the priority parameter can not be used inthis way. A possible solution is that, if the priority parameter is CPR

(·, p) = 1,it has used the usual O1T technique, while if CPR

(·, p) = 0 (emergency packet),the packet is re-forwarded in any case, so it is using the flooding technique,more expensive in energy terms, but faster than the other techniques.

Every node that receives the packet calculates autonomously its delay andthe best node, according to the cross-layer parameters, has the smallest delay,so it will retransmit first. After the first transmission, all the nodes that receivethe packet p for the second time will not wait the expiration of the delay, butthey will not retransmit at all. It is important to notice that, at every hop,more than one node retransmits the packet, as better shown in the examplein Fig. 2.3: the source node is node S, which transmits first reaching all thenodes inside its RoT (in Fig. 2.3 delimited by the solid line circumference), sonodes A, B, C, D and E. The nodes which receives the packet set their delay,in the example they set:

• A set a delay D(A) = 0.6∆;

• B set a delay D(B) = 0.9∆;

• C set a delay D(C) = 0.3∆;

• D set a delay D(D) = 0.8∆;

• E set a delay D(E) = 1.1∆;

The first node to transmit is node C, because it has the smallest delay. Itreaches nodes S, A and B that are inside its RoT (red dash-dotted circumfer-ence); node A and B receive in this way a second copy of the packet, and theydo not retransmit any more. After 0.5 ·∆ seconds node D transmits reaching

Page 31: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

2.3 Network layer packet 19

node S and E inside its RoT (blue dash-dotted circumference), so node E doesnot retransmit. The green dotted line is showing the RoT of node E: its trans-mission would be quite useless after the transmission of node D, because it canreach a very small new area of the network, as shown in the figure, so it canreach with lower probability new nodes not yet reached by the packet.

AS

C

RR o T

D

E

B

Figure 2.3: Example showing the behavior of O1T technique.

2.3 Network layer packet

The O1T technique is specifically thought to be suitable for a Publish/Subscribescenario, in absence of D.I. . In this section it analyzes the structure of asubscribe packet, that should contain all the information from the upper layer,so all the information regarding the Publish/Subscribe interaction, used tomake the forwarding decision node by node till the publisher. These fields are:

INTEREST: it is the interest j requested from the subscriber; a node can bethe publisher, if it has the information requested, it can have some D.I.about the publisher of interest j, otherwise it simply follows the usualalgorithm of O1T technique, registering the interest in the utility table;the interest can be expressed in two different ways:

• Type of Data: it must univocally identify the type of the data re-quested, e.g. “heart pulse” in a medical environment, or “state ofthe waterwheel”, in an industrial environment;

Page 32: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

20Forwarding technique for Publish/Subscribe in absence of

deterministic information (D.I.)

• Data Condition: it identifies a condition that must be verified bythe DATA of the publish packet: the subscriber needs only publishpacket which verify this condition, e.g. in a medical environment“heart pulse < 50 pulse/minute” or in an industrial environment“state of the waterwheel = not normal”

EXPIRATION TIME: Texp, this is the time of the duration of the request;this value should be registered in the utility table, as described in nextsection; this value can be an absolute time (e.g. time x of day y), or itcan be a relative value (e.g. Texp = z seconds: in this case the Texp shouldbe modified in every node it passes through); after Texp is expired, thenode should delete the information about that specific interest from theutility table;

SAMPLE RATE: this field specifies what should be the sampling rate of theData sensed, as it is requested by the subscriber; this field is useful onlyfor the publisher;

NUMBER of HOPS: Nhops, it is the number of hops the subscribe packethas already passed through from the source node (subscriber); this fieldshould be incremented by every node which forward the packet, as Nhops =Nhops + 1;

PRIORITY: PR ∈ [0, 1], this field identifies a normal request or an emer-gency request, e.g. in medical environment a subscriber can request withmaximum priority the heart pulse of a patient if the information does notreach the subscriber after more than 30 seconds.

All this information that regards the Publish/Subscribe interaction shouldbe used together with the information from the physical layer, like the signalstrength, as well as from the MAC layer, like the number of copies of the samepacket received, in order to make the forwarding decision. The O1T technique,that use information from all the layers to make a forwarding decision, uses avery cross-layer approach.

Page 33: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

2.4 The utility table 21

2.4 The utility table

The idea of the utility table is to collect the information, which helps theforwarding decision in a Publish/Subscribe scenario, and it comes from Costa[21]. In this paper, it is proposed to keep an utility table in every node ofthe network, with a row for every interest j, which contains the probabilityto forward a packet with the matching interest. This probability is calculatedthrough the utility function, which enables you to determine whether a hostis a “good carrier” for a given message. The utility function uses the cross-layer parameters available and determines the probability to forward the packetmatching interest j.

In this work the approach is quite different: the utility table does not containa probability, but all the information used to calculate the delay for a subscribepacket matching interest j, in section 2.2. The utility table is used to take thedecision to forward the subscribe packet, according to the O1T algorithm, andto forward the publish packet, according to a different algorithm, described inchapter 3.

Every time it is received a new subscribe packet, with a new interest j, itis created in the utility table of the receiving node a new row, which containsthe following fields:

INTEREST: this is the interest requested by the subscriber, that acts as alabel for the row: when a node receives a packet, it should search if it hasinformation about the packet in the utility table for the correspondinginterest;

Ncopies: this number represents the number of copies already received of thesubscribe packet matching interest j; it is the fundamental informationto decide to forward or not the packet, as explained before;

HCS: hop count from the subscriber, this information, contained in the sub-scribe packet, is the number of hops the subscribe packet has travelledthrough from the subscriber to the present node; the idea to collect thisinformation comes from [26]. The HCS is the basis of the forwardingtechnique in presence of D.I.: after the subscribe packet has reached thepublisher, the publish packet comes back to the subscriber and it is for-warded thanks to this hop count information registered in every node ofthe path;

Page 34: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

22Forwarding technique for Publish/Subscribe in absence of

deterministic information (D.I.)

Texp: this value is contained in the subscribe packet received: after the expi-ration of this time the row in the utility table corresponding to interest j

should be deleted.

The information registered in the utility table is used to make the forwardingdecision with the O1T technique, using the value Ncopies registered, but it isused also to forward a publish packet in the presence of D.I., as describedin chapter 3. The first publish packet is routed till the subscriber using theinformation of the HCS , but while the packet is forwarded node by node it isregistered in the utility table of every node, with a procedure similar of the oneof above, also the HCP (distance in number of hops from the publisher). Thisinformation is more flexible than the HCS and it allows to easily solve some ofthe problems due to the mobility of the nodes, as shown in chapter 3.

2.5 Options of the forwarding technique

The forwarding technique proposed in the precedent sections is very simple,it does not require any exchange of packets to perform a better decision, thatcould be really expensive if the network is mobile and fast changing. In O1T theonly packets which travel the network are the request for information and theinformation itself. However it requires less energy in every node to computethe operations to decide to forward or not a packet. In this section someimprovements of the techniques are proposed, to reduce the energy consumptionor to increase the performances of the technique, achieving a higher probabilityfor a subscribe packet of reaching the publisher.

The first problem to solve is that the subscribe packet should flood all thenetwork to reach the publisher, without knowing the distance in hop countfrom the subscriber to the publisher. The risk is that the publisher is closeto the subscriber, but the subscribe packet travels the network anyway till themaximum number of hops, introducing a big overhead and useless transmis-sions. The solution adopted is to set a maximum number of hops Nhops = 1for the first subscribe packet, then if it is not able to reach a publisher in onehop, after the expiration of a timeout, a second subscribe packet is sent, withNhops = Nhops + 1, and so on till the publisher is reached, or till Nhopsreaches a maximum predetermined value. It seems that this option introducesan overhead, because the neighbors of the subscriber have to send more than

Page 35: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

2.5 Options of the forwarding technique 23

one copy of the subscribe packet, but it is the less expensive way to reach thepublisher, in the hypothesis it is not known the distance and neither the exis-tence of the publisher itself. Obviously this should be optimized case by case,depending on the characteristic of the network.

Another useful option of the O1T technique is that the publisher sendsits interest j to its 1-hop neighbors, in piggy-backing to some other packetsforwarded by the node. In this way, the 1-hop neighbors of the publisher knowthat there is a publisher for interest j at 1-hop distance, so whenever theyreceive a subscribe packet for interest j, they rebroadcast it with probabilityP = 1, using this D.I. . The subscribe packet has to reach one of the neighborsof the publisher, not just the publisher itself, before the communication canproceed using D.I. . This is a big improvement, it increases significantly theprobability of reaching a publisher and it reduces the number of transmissionsneeded to reach the publisher, as explained in the analysis in chapter 4 and asshowed in the simulation in chapter 5.

This idea can be extended if the publisher also uses other nodes in thenetwork, not only the neighbors, as sort of “kiosks” that contain the interestof the publisher. This is similar as having magazines and newspapers beingsold at kiosks across a city. This option should be analyzed and optimized, inorder to have the maximum of the probability of reaching the publisher, withthe minimum energy consumption. Anyway, this option is not analyzed in thiswork, it is only proposed for future analysis.

The knowledge of the 2-hops neighbors is other information that can helpsignificantly the forwarding decision and can improve significantly the perfor-mances, as shown in the simulation in chapter 5. This information is at thebasis of SARA, an efficient routing technique, in absence of a routing table, de-scribed in [25]. The problem is that sharing the information about the neighborsof every node can introduce a big overhead: every node has to send to all itsneighbors a packet containing the list of its neighbors, so Ntot packets in thenetwork, where Ntot is the number of nodes; moreover every node has to memo-rize on average M2 identification numbers of nodes, to have the complete 2-hopneighbors information. On the other hand, also the processing, node by node,to use this information for the forwarding decision becomes quite expensive inenergy terms.

This thesis proposes an easier and cheaper, even if less efficient, solution that

Page 36: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

24Forwarding technique for Publish/Subscribe in absence of

deterministic information (D.I.)

uses a non complete 2-hop neighbors knowledge and that is not so expensive inenergy terms, with a technique that follows the logic used in the basic algorithmof the O1T technique, as explained in the following points:

• every node memorizes a list of its neighbors, registering the identificationnumbers (IDs) of all the nodes transmitting in its neighborhood: in thisway, the information about the neighbors node is not always completeand it can be out of date, it depends on the mobility’s characteristics ofthe network, but the exchange of this information does not require anyspecific packet, so no energy cost;

• a transmitting node A should send, in piggy-baking to the packet it isforwarding, the IDs of its neighbors, with a small energy cost;

• in this way, node B which receives the packet from A has both the knowl-edge of its own neighbors and of the neighbors of A;

• node B can calculate the number of new neighbors it can reach (neighborsof B but not of A), again with a small energy cost;

• node B transmits the packet with a delay inversely proportional to thenumber of new neighbors it can reach, putting this information as a pa-rameter in (2.2) to calculate the delay;

• in doing this, with the logic of O1T technique, nodes with the biggernumber of new neighbors will transmit first, nodes with a small numberof new neighbors will transmit only after a bigger delay, or they will notretransmit at all if they have a more suitable node in the neighborhoodthat retransmits first.

With this option the nodes does not have a complete knowledge of their 2-hopneighbors, but on the other hand the technique can improve the performancewithout introducing a big overhead. It is necessary to underline that the infor-mation about the neighbors is not complete: node B that receives the packetknows in this way the neighbors of A, the transmitting node, but not theneighbors of its other neighbors. This option represents a compromise and theevaluation of the performances are calculated through simulation in chapter 5.This option also represents a good alternative to the use of the signal strength of

Page 37: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

2.5 Options of the forwarding technique 25

the packet received to determine if the node is in a good position to retransmitor not.

Finally, if the energy constrain is not so stringent, to increase the perfor-mances of the technique it is possible to introduce a probability Ptrasm2 totransmit the packet after the node has received more than one copy of thesame packet. Two cases have already been presented so far:

• Ptrasm2 = 0, that is the basic O1T technique: after a node receives thesecond copy of the packet, it will not retransmit at all;

• Ptrasm2 = 1 that is pure flooding: it does not matter if a node has receivedjust one or more copies of the packet, it will retransmit the packet anyway.

The simulation in chapter 5 also considers this option and it evaluates theperformances of the technique varying the probability Ptrasm2 ∈ [0, 1]. The useof this option is very application dependent and it should be an optimal valuefor Ptrasm2 depending on the energy constraint, on the performances requestedand on the density of the nodes in the specific scenario considered.

Page 38: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

26Forwarding technique for Publish/Subscribe in absence of

deterministic information (D.I.)

Page 39: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

Chapter 3

Forwarding technique for

Publish/Subscribe in presence

of deterministic information

(D.I.)

In the second phase of the Publish/Subscribe interaction, the publish packetshave to travel the network till the subscriber which has requested these packets.Differently from the subscribe packet, the publish packets can follow a prede-fined path to the subscriber, using the deterministic information (D.I.) presentin every node of the path. They use a different forwarding algorithm, that isable to drastically reduce the energy consumption compared to the O1T tech-nique. Moreover, it should be able to react to the mobility of the nodes, thatforces the technique to change the path from the publisher to the subscriberevery time that some nodes change position or fall asleep.

Before describing the technique, it is important to underline that this is stilla forwarding, not a routing technique: it is different from O1T, because nowthe source node is the publisher, that is aware of the existence of a destinationnode, the subscriber. It is a forwarding technique because it only helps thetransmitting node to take the decision to rebroadcast or not a specific packet,based on D.I. in the utility table of the node, but it does not choose any routefor the packet. The nodes that receive the packet elect, based on the D.I., thenode which retransmits, with a logic similar to the one used to calculate the

Page 40: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

28Forwarding technique for Publish/Subscribe in presence of

deterministic information (D.I.)

delay in the O1T technique. The path followed by the packet is not fixed andit is defined for every packet hop by hop.

The implementation of the technique, described in section 3.1, follows adifferent approach from the one proposed by Costa [27]. In [27] it is supposedthat both the subscriber and the publisher start to send their packets at thesame time and that both subscribe packet and publish packet reach a commonnode in the network. After this event, a semi-deterministic route from thepublisher to the subscriber is already defined, so the publish packets can followthis route.

The forwarding in this work starts with a different hypothesis, that therecould be publisher for interest j without a corresponding subscriber. In thiscase, if every publisher sends its packet in the network, with the approach ofCosta the packets have to travel at least for a few hops in the network, but theyare completely useless because not requested by any node and they introduceoverhead. To overcome this problem, it is supposed that a publisher starts topublish only after it is reached by a subscribe packet requesting that interest j.This means also that the publish packet does not have to flood the network, butit is sent only after a corresponding subscribe packet has already covered thepath and reached the publisher, so it can use the D.I. that the correspondingsubscribe packet has left in the nodes in the path.

The last thing to underline, before starting with the implementation of thetechnique, is what is the D.I. used to forward the packet. While for the firstpacket it uses the parameter HCS(j), present in every node in the path, asexplained in section 3.1, from the second publish packet it uses the HCP (j)parameter, that is the distance in hop count from the publisher. In sections3.1.2 and 3.1.3 it is explained how this parameter is calculated and used. Theapproach is similar to the one used in [24], where the HC parameter is used toroute the packet to the destination. In that paper, it is supposed that the D.I. ispresent in every node in the network , that is possible supposing a singular sink(or subscriber node). In the scenario of this paper, where there can be morethan one subscriber and the network can change its topology quite fast, it isnecessary to follow a different scheme, in order not to introduce a high overheadto spread the D.I. . In the following sections it shows a technique which triesto reduce the energy consumption, reducing the number of transmissions, butkeeping the advantages of the forwarding with the use of HC.

Page 41: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

3.1 Implementation of the technique 29

3.1 Implementation of the technique

3.1.1 Forwarding of the first publish packet

The technique in presence of D.I. uses the parameter HCS (already introduced):the distance from the subscriber in terms of number of hops. This parameteris written in the utility table of each node of the path from the subscriber tothe publisher, because each of these nodes have been previously reached by thesubscribe packet and this parameter has been registered in the utility table, asexplained in section 2.4. Using this information, the first publish packet is sentto the subscriber, as described step by step in the following points:

• the publish packet is broadcasted by the publisher and it has the fieldHCS(packet) = HCS(publisher);

• if node B receives the packet and it has HCS(node B) < HCS(packet), itchanges the value in the packet HCS(packet) = HCS(node B) and it com-petes with the other neighbors with the same characteristic HCS(noden) < HCS(packet) to forward the packet, as explained later;

• if node B receives the packet and it has HCS(node B) ≥ HCS(packet),it simply discards the packet;

• the forwarding of the packet goes on till the HCS(packet) = 0, that canhappen only when the packet has reached the subscriber.

If at a certain hop there is more than one suitable node, with HCS(noden) < HCS(packet), the election of the transmitting node is made in a similarway as in the O1T technique: every node calculates a delay, and after a nodehas received a second copy of the packet, it does not retransmit at all. Thecross-layer information used to calculate the delay could be the residual energyof the node and the priority of the packet. Another parameter that can be usedis the number of hops that the packet can travel with a single retransmission:N1TX

hops(node n) = HCS(packet)−HCS(node n); usually N1TXhops(node n) is equal

to 1, but there are some particular cases in which it can be 2 or higher, and thisis an occasion to perform the forwarding with one transmission less, as shownin the example in Fig. 3.1. The node with the higher value of this parameterwins the contention and it is able to perform a less expensive transmission.

Page 42: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

30Forwarding technique for Publish/Subscribe in presence of

deterministic information (D.I.)

In Fig. 3.1, a couple of nodes that are in the same RoT, so they cancommunicate, are linked with a solid black line; the transmission of a subscribepacket is represented by a red arrow, while the transmission of a publish packetis a green arrow; the arrow is a solid line if the packet reaches a node that willretransmit the packet itself, otherwise it is a dotted line if the packet reachesthe node and it is discarded. The packet follows the path explained in thefollowing points:

• the subscriber S transmits the subscriber packet, and it has a valueHCS = 0; the subscribe packet reaches nodes B1 and B2;

• node B1 and B2 start a contention, because they have both HCS(B1) =HCS(B2) = 1; node B2 wins the contention and it retransmits, reachingnodes S, B2, C1 and C2;

• S and B2 discard the packet, C1 and C2 receive the packet, they bothhave HCS(C1) = HCS(C2) = 2, and node C2 wins the contention and itretransmits, reaching nodes B1, B2, C1 and P ;

• nodes B1, B2 and C1 discard the packet, node P (publisher) starts tosend the publish packet, with HCS(packet) = 3 and HCP (packet) = 0,reaching nodes B2 and C2;

• B2 and C2 start the contention to retransmit the publish packet; they cal-culate the cross-layer parameter of above, N1TX

hops(B2) = HCS(packet) −HCS(B2) = 2 and N1TX

hops(C2) = HCS(packet)−HCS(C2) = 1; node B2

has a higher value and it wins the contention, it retransmits and it reachesnodes P , C2 and B1 that discards the packet, and node S, the subscriber;

• from Fig. 3.1 it is clear that node B2 can reach the subscriber with onehop less than node C2, so in a more efficient way.

3.1.2 Filling of the utility table

In order to react to some problems described in section 3.2, it is useful tointroduce another parameter and to write it in the utility table of every nodein the path: the distance from the publisher, HCP , in terms of the number ofhops. This parameter is calculated node by node when they receive the firstpublish packet, as explained in the following points:

Page 43: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

3.1 Implementation of the technique 31

C

B

SC

B 1

1

2

2 P

Figure 3.1: Example of the use of the parameter N1TXhops to perform a more

efficient transmission.

• the publish packet is broadcasted by the publisher, with fields HCS(packet) =HCS(publisher) = n > 0 and HCP (packet) = 0;

• only nodes with HCS(node n) < HCS(packet) = n rebroadcast thepacket and they set HCP (node n) = 1 in the corresponding row ofthe utility table; moreover they change the values in the packet, settingHCS(packet) = HCS(node n), then HCP (node n) = HCP (packet) + 1and finally HCP (packet) = HCP (node n), as shown in the example inFig. 3.2;

• the forwarding goes on in the same way till the packet reaches the sub-scriber, which has HCS(subscriber) = 0 and it sets HCP (subscriber) =HCP (packet) + 1 6 n.

3.1.3 Forwarding after the first publish packet

The first publish packet of every interaction between subscriber and publisherfollows the procedure above. After this, all the others publish packets areforwarded using only the D.I. HCP , with a procedure illustrated in the followingpoints:

Page 44: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

32Forwarding technique for Publish/Subscribe in presence of

deterministic information (D.I.)

• the publish packet is broadcasted by the publisher with HCP (packet) = 0;

• only nodes with HCP (node n) > HCP (packet) rebroadcast the packet;they change the HCP field in the packet, setting HCP (packet) = HCP (noden), as shown in the example in Fig. 3.2;

• the forwarding goes on till the packet reaches the subscriber.

The procedures followed by the subscribe packet and by the publisher pack-ets, with the filling of the utility table, are showed in a simple example, in Fig.3.2. In the example, two nodes with reciprocal distance d 6 RRoT, so thatthe two nodes can communicate through the wireless channel, are linked witha solid line.The subscriber (SUBS. in Fig. 3.2) searching for interest j sends a subscribepacket, represented as a solid arrow; at the first step, it reaches nodes C andD, that set HCS(C) = HCS(D) = 1; at the second step, D retransmits firstand it reaches nodes C and B; C discards the packet, because it has receivedtwo copies of the same packet, B sets HCS(B) = 2 and retransmits the packet,reaching node A and the publisher of interest j (PUB. in the figure). Obvi-ously also node C and D receives the packet but they discard it. The publishersets HCS(PUB.) = HCS(packet) = 3 and HCP (packet) = 0, then it sendsthe publish packet, represented with a dashed arrow in the figure. The publishpacket follows the way back through the subscriber and it is retransmitted bynodes B and D. It also sets node by node the value of HCP , as shown inFig. 3.2. After the first publish packet, there are two different paths to thesubscriber, PUB. → B → D → SUB. and PUB. → B → C → SUB., thatcan both be used, because the D.I. (HCP ) is the same. The path, as explainedin subsection 3.1.1, is chosen every time at the receiving nodes, accordingly toother cross-layer information like the residual energy at the transmitting nodes.

Another important facet of the forwarding technique is how to refresh andto manage the information spread in the network. Every row in the utility tablehas an expiration time Texp, specified in the corresponding subscribe packet atthe beginning of the communication, as described in section 2.3. Expired thistime, the row is deleted and the interaction between subscriber and publishermust restart from the beginning with a new subscribe packet.Furthermore, if node A has in his utility table a value HCS for a certain interest,but it does not receive any publish packet that sets the value of HCP , the

Page 45: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

3.2 Issues of deterministic forwarding 33

Figure 3.2: Example of the forwarding of a subscribe packet (solid arrow) andof publish packets (dashed arrow).

corresponding row in the utility table should be deleted after another predefinedexpiration time, different and shorter than the previous one. In the exampleshown in Fig. 3.2, node A is the only node with a value for HCS(A) = 3, butwithout a value for HCP (A), so it deletes the row corresponding to interest j

after a certain time and it will remain without any D.I. about the interest j.

3.2 Issues of deterministic forwarding

In this section some of the problems that can stop the forwarding of the publishpackets in the presence of D.I. are analyzed. If the network is not able to reactwhen a problem arises, the interaction between publisher and subscriber isstopped and the communication must start again with the subscribe packetthat floods the network looking for a publisher. Explaining the problems, it isshown also how the use of the parameter HCP instead of HCS helps to solvesome of them, at least under specific hypothesis. Three different problems areanalyzed:

1. A second subscriber subscribes for interest j: it is supposed that in the

Page 46: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

34Forwarding technique for Publish/Subscribe in presence of

deterministic information (D.I.)

network there is already a subscriber S1 for interest j and it is currentlyreceiving the corresponding publish packets. A second subscriber S2 triesto subscribe for the same interest, using the O1T technique. The sub-scribe packet from S2 can reach, during the path to the publisher, a nodeB with D.I. for interest j, or it can reach directly the publisher. In thefirst case, node B, which has HCP (node B) = m > 0, broadcasts thepublish packets and the nodes in the path between B and the subscriberS2 have to set their HCP and they have to forward the publish packettill S2. In this case, the path between the publisher and node B remainsunchanged and from node B the publish packet is forwarded in two dif-ferent paths, one towards S1 and the other one towards S2.In the latter case, the subscribe packet from S2 directly reaches the pub-lisher, which is already broadcasting publish packets for the matchinginterest: the procedure is the same as described in section 3.1.

2. The subscriber changes its position: in this work it is supposed that thesubscriber can move, but not too fast, so it can change its position ofa maximum one or two radius of a RoT (RRoT), before the network isable to set a new path for the publish packets; if the subscriber movesin the direction of the publisher, it can be reached by a different nodein the path, in the example in Fig. 3.2 it can receive the publish packetfrom node B instead of node D, and the path remains unchanged. Onthe other hand, if the subscriber moves in the opposite direction after acertain limit it is not reached any more by the publish packets broadcastedby the last node in the path. After it has lost one publish packet, thesubscriber waits an expiration time and then it refreshes the D.I. in thenetwork, with the technique of Fast Recovery: it sends a subscribe packetwith a maximum number of hops Nmax = 1. With high probability, thispacket would reach a node G between the subscriber and the path: nodeG receives both the subscribe packet and the publish packet for the sameinterest, so it starts to forward the publish packets and the path is setagain. In this way it is not necessary to flood the network searching for apublisher and it is possible to use the D.I. already in the network, simplyby extending the path by one more hop.If the Fast Recovery is not successful, the subscriber has to send a newsubscribe packet, with Nmax = Nmax +1, incrementing the value of Nmax

Page 47: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

3.2 Issues of deterministic forwarding 35

till a subscribe packet reaches a node with D.I., or till a maximum value ofNmax. We have analyzed how this technique works in a specific scenariothrough simulation, in chapter 5;

3. A node along the path starts a sleeping period: in this work it is supposedthat the relaying nodes are not mobile, but they can start a sleeping pe-riod at any moment. The results are the same as in a dynamic topology,as it is usually defined. However the nature of the changes in time aredifferent than the more conventional dynamic topologies: if it is assumedthat the nodes are stationary, there is an underlaying topology that isthe same all the time. It is proposed for future work a deeper analysis ofthis type of dynamic topology in different cases. In the specific scenarioof this work, if a node in the path starts a sleeping period, e.g node B

in the example in Fig. 3.2, and if there are not any other node withD.I. which can rebroadcast the packet in that point, the communicationbetween publisher and subscriber stops. The nodes in the path from thepublisher to the breaking point do not know that the path is broken at acertain point and they continue to send publish packets. A possible solu-tion is similar to the previous point: after it has lost one publish packet,the subscriber waits an expiration time and then it refreshes the D.I. inthe network sending a subscribe packet, using the O1T technique with-out D.I. . The subscribe packet floods the network till it reaches a nodecurrently receiving the corresponding publish packets, or till it reachesthe publisher itself. In chapter 5 we have found for a specific scenario theprobability that the communication stops depending on the probabilitythat a node in the network falls asleep.

The three problems listed above are typical of a WSN and it is necessaryto take them into consideration in the formulation of an efficient forwardingtechnique. As underlined, the use of the parameter HCP makes possible toreuse the D.I. also in these special situations, without changing the D.I. in allthe nodes in the path. For example, if only the parameter HCS is used, as soonas the subscriber moves it is necessary to change all the D.I. in the path, whileusing the HCP parameter it is easier and less expensive, as seen above.

Another possible problem is that the subscriber goes out of the network,so the publish packets can not reach the subscriber, but they continue to beforwarded from the publisher till the nodes which were closest to the subscriber.

Page 48: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

36Forwarding technique for Publish/Subscribe in presence of

deterministic information (D.I.)

In order to avoid useless transmissions, it is necessary a feedback from thesubscriber, but we do not take into consideration this specific case in this work.

In this chapter the forwarding technique in the presence of D.I. has beendescribed with its different facets and it has been shown also how the techniqueis able to react to some of the most common problems that can arise in a WSNscenario. It is important to underline that, if it is supposed a sort of mobility inthe network, the technique in the presence of D.I. is not able to guarantee thedelivery of the publish packet with probability P = 1, as analyzed in chapter5. Anyway, since in this kind of network there are stringent energy constraints,the technique represents a compromise between a high probability of deliveryand low energy consumption.

Page 49: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

Chapter 4

Analysis

The main task of this thesis is to compute an analysis of the performances of theforwarding techniques existing in literature and to compare them to the O1Ttechnique proposed in chapter 2. The mathematical analysis starts from thethesis work of Stramazzotti [10]; in this work he analyzes the literature aboutthe forwarding techniques suitable in the specific scenario of WSN, withoutgeographical information and he finds some mathematical methods to analyzethe performances. He adapts a more general work [28], about the performanceof pure flooding in wireless multi-hop networks. He firstly calculates the prob-ability of a successful transmission PS , supposing a CSMA MAC layer withoutcollision avoidance, depending on the background traffic. Then he calculatesthe total number of nodes receiving the initial packet after l hop, dependingalso on the density of the nodes. Afterwards, he calculates the probability fora subscribe packet of reaching the publisher and then he generalizes it with n

publishers, again in a specific scenario with fixed density and characteristic. Fi-nally, he calculates the overhead in the network and he explains how to extendthe analysis to a more general model.

In this work some of the hypothesis in [10] are changed, in order to extendthe analysis to other more complicated forwarding techniques, and some geo-metrical inconsistencies are solved, as explained in detail in section 4.2. Thechapter is organized in five sections, the first presents the scenario in which allthe analysis is performed, the second section explains in detail the mathematicalanalysis of the three forwarding techniques in absence of deterministic infor-mation (D.I.) compared in this work. The third section shows the main results

Page 50: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

38 Analysis

found out from the analysis, the fourth section analyzes the performances ofthe techniques in a Publish/Subscribe interaction, and the fifth section presentsa simplified analysis of the forwarding technique in the presence of D.I. .

4.1 Scenario of the analysis

A simplified analysis of the techniques is proposed in this work, which takesinto account only the behavior of the nodes at the network layer, assumingsimplified physical and MAC layers. This allows to evaluate the performance ofthe different forwarding techniques presented and to compare them in differentscenarios, with a different density of sensor nodes.

At the physical layer a transmission is successful if and only if the distancebetween the transmitting and the receiving node is less than RRot, withoutconsidering a real channel model.

As a matter of fact, the choice of the MAC layer is very critical, becauseit is the heart of any distributed network of any kind. The performances of arouting as well as of a forwarding technique depend directly on the MAC used.

The analysis in this work is performed using a slotted CSMA (Carrier Sens-ing Multiple Access) without CA (Collision Avoidance); the well known prob-lem of the hidden terminal [29], typical of a CSMA (no collision detection)protocol, is not considered, in order to simplify the analysis. In the followingthe key points are underlined in which the MAC layer strongly influences theperformances of the forwarding techniques. Future work, starting from thisanalysis, can deal also with this kind of problem, completing the analysis withdifferent and more realistic MAC layers.

The nodes in the network are randomly deployed following a two-dimensionalPoisson process with parameter µ = M

πR2Rot

, described by the probability:

Pr{k nodes in RoT} = e−µπR2RoT · (µπR2

RoT )k

k!(4.1)

The parameter M = µπR2Rot is the density of nodes of the process, supposed

constant everywhere, as well as the expected number of nodes in a RoT:

E[k] = Pr{k nodes in RoT} = µπR2RoT = M (4.2)

By the memoryless property of a Poisson process [30], M represents boththe average number of nodes in an area equal to a RoT and the average number

Page 51: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

4.1 Scenario of the analysis 39

of neighbors of a node. An example of this scenario is represented in Fig. 4.1,where a single region of transmission is also depicted.

−5 0 5 −5

0

5

Figure 4.1: Poisson distribution of nodes with M = 8; the circle delimits thearea of a RoT.

In the analysis, it is supposed that the subscriber, the source of the packet,is in the center of the network, and that in the finite number of hops analyzedthe packet is not able to reach the edges of the network.

The probability of no collision Pnc of the MAC CSMA (no collision detec-tion) protocol becomes in this scenario the probability of a successful transmis-sion. It is estimated supposing that the process of packets’ arrivals in everynode is a Poisson process, and also that the process of departures of packetsfrom every node is a Poisson process: in this way, it is a good approximationto consider that the generation of packets in every node is independent fromthe other nodes and not time varying. In appendix A it is shown why also theprocess of departures of packets in every node is Poisson distributed: this isnot so obvious because only some of the packets received are re-forwarded andthat packets are re-forwarded after a delay chosen according to the algorithmin (2.2).

In this hypothesis, to express the Pnc it is necessary to define some variables:

• M is again the average number of nodes in a RoT;

• Tv is the vulnerable period in [sec] of the transmission of a packet (so

Page 52: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

40 Analysis

the fraction of the transmission period that can cause a collision, using aCSMA (no collision detection) MAC protocol); it is supposed in the restof the work to use a QPSK modulation (2 bits per symbol), it is supposedthat a slot has 20 symbols, so it is made of 40 bits; the vulnerable periodis the period of 1 slot;

• g is the amount of traffic generated in average by a node in [packets/sec].

With the definitions of above, the probability of no collision Pnc becomes:

Pnc = (exp−gTv)M (4.3)

It is possible to express the Pnc in function of other parameters, like thetraffic in the network (in [bit/sec]) that can be heard by a node: BRot. Thetotal amount of traffic (in [packet/sec]) that can be heard by a node, supposingall the packets are of the same length Lpacket, is in average:

BRoT

Lpacket= g ·M (4.4)

The probability of no collision in (4.3) becomes:

Pnc = e−gMTv = e− BRoT

LpacketTv (4.5)

In order to give an idea on how the traffic in the network influences thePnc, in Fig. 4.2 it is shown how the Pnc varies depending on the traffic in thenetwork, expressed in bit per second. Because of the definition given, the Pnc

depends on the traffic, not on the value of the density M . This is due to thedefinition of BRot: fixed a value of BRot and of Lpacket, it is fixed also a valueof g ·M , so increasing M , g decreases but the product remains constant.

4.1.1 Geometrical parameters

Starting from the work of Viswanath [28], adapted to the different hypothe-sis of this thesis, there are three geometrical parameters that are used in allthe analysis of the techniques, represented in Fig. 4.3. In the figure, node A

transmits to node B and node B re-forwards the packet to node C; the cir-cles represents the RoT of the nodes. In this section, the symbology RoT (x)indicates the RoT of node x.

The three geometrical parameters are defined as:

Page 53: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

4.1 Scenario of the analysis 41

103

104

105

106

0

0.2

0.4

0.6

0.8

1

Bitrate in [bit/sec] in a RoT

Pnc

− P

roba

bilit

y of

no

colli

sion

∀ M

Figure 4.2: Pnc for a node, for different values of M, in function of the totaltraffic in a RoT (BRoT )

α: it is the average value of α′ = RoT (A) ∩ RoT (B) ∩ RoT (C), so it is thearea reached by the transmissions of all the three nodes, expressed as afraction of the area of a RoT (As(RoT )), so α′ ∈ [0, 1];

β: it is the average value of β′ = (RoT (C) \RoT (B)) \Rot(A), so it is the newarea discovered by node C, not previously reached by node A neither bynode B, expressed as a fraction of As(RoT );

γ: it is the average value of γ′ = (RoT (B) ∩ RoT (C)) \ Rot(A), so it is thefraction of the new area reached by node B that contains node C and allthe nodes that can compete with node C to retransmit, expressed as afraction of As(RoT ).

The parameter β is calculated through geometrical consideration; first ofall, the distance between the transmitting (source) node A and the receivingnode B, at the first hop, is a value x ∈ [0, RRoT ], represented in Fig. 4.4. In thehypothesis that the nodes are Poisson distributed, so the position of a node hasno correlation with the other nodes, the probability density function associate

Page 54: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

42 Analysis

RRoT

Figure 4.3: Example of the regions α′, β′, γ′; the circles delimits the RoT; thetransmission is from A to B and from B to C.

with the distance is:P [x] =

2x

R2RoT

(4.6)

The total area of a RoT is defined as As(RoT ) = πR2RoT . Supposing a fixed

value for the distance x it is possible to calculate the area of the region β; atthe end it is evaluated the expectation of this area. The area of the intersectionbetween the two RoT of the source and of the receiving node (in Fig. 4.4) is:

As

(RoT (A) ∩RoT (B)

)= As(RoT ) · 2 ·

π− sin(2ϕ)

](4.7)

where ϕ = arccos( x2RRoT

) (in Fig. 4.4 this is the angle φ = QB0 ); at this pointit is possible to calculate the area of the region β′, supposing that x has a fixedvalue:

As(β′|x) = As(RoT ) · {1−As

(RoT (A) ∩RoT (B)

)](4.8)

= As(RoT ) ·{

1− 2[ϕ

π− sin(2ϕ)

]}(4.9)

It is now possible to calculate the expectation of the area of the region β′,integrating in the interval x ∈ [0, RRot]:

E[As(β′)

]=

∫ RRoT

0As(β′|x) · P [x]dx (4.10)

Page 55: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

4.1 Scenario of the analysis 43

AB

x

Q

O

R

Figure 4.4: Parameters used to calculate the average value of β′ at the firsthop.

Finally, the average value of β, expressed as a fraction of the area of a RoTis:

β =E

[As(β)

]

As(RoT )' 0.41 (4.11)

After the first hop, the calculation of the average value of β is not the same:node B retransmits the packet, but the distance between B and the receivingnode C is in average bigger than the distance from A to B. The average distancebetween A and B is:

E[x] =∫ RRoT

0x · P [x]dx =

23RRot (4.12)

but the average distance from B to C is bigger; for example, fix the valueof x = 2

3RRoT (between A and B), the distance between B and C can notbe less than 1/3RRoT , because C can not be inside the RoT of A, as shownin Fig. 4.3. This fact is not considered in [28] and neither in [10], but itinfluences significantly the results of the analysis. It is not calculated in thiswork the average value of β from the second hop because it requires a morecomplicated geometrical analysis, so this value is estimated through simulation.The simulation is performed in the same hypothesis of above and it confirmsthe average value of β at the first hop calculated by analysis is correct. It also

Page 56: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

44 Analysis

shows that the average values of β from the second hop are oscillating arounda value β2 = 0.46. The results are reported in the simulation chapter 5 in Tab.5.1.

The calculation in the analysis, considers an average value of β = 0.41 atthe first hop and an approximated value of β2 = 0.46 from the second hoponwards.

It is not possible to calculate in a close and simple form the other para-meters, α and γ, if not introducing a significant approximation, because theydepend on too many geometrical variables. For this reason, the two parametersare calculated by simulation, in the same conditions as above, and the resultsare in Tab. 5.1. It comes out that also the average values of these two para-meters change hop by hop and they oscillate around a fixed value. In order toprint significant graphs in section 4.3, the values of the parameters is consideredfixed at the values: α = 0.21 an γ = 0.27. Anyway, the analysis is performedalso varying these parameters, as explained in section 4.3.

In the rest of the chapter these parameters are used to calculate the numberof nodes inside the corresponding area. For example, here is calculated thenumber of nodes inside the region α, then in the same way it is possible tocalculate the number of nodes in β and γ. First of all, by definition of α, thenumber of nodes is constrained to be at least one. Taking it into account, inthe scenario analyzed, with a Poisson distribution of the nodes described in(4.1) with an expectation in (4.2), the distribution of the number of nodes inα is given by the probability:

Pα ((k + 1) nodes in region α) = e−µπR2Rot·α · (µπR2

Rot · α)k

k!(4.13)

where k ∈ N and the corresponding expectation of the number of the nodes inregion α is:

Eα[k + 1] = µπR2Rot · α = M · α + 1 (4.14)

All these geometrical parameters are used in the next section to computethe analysis of the performances of the forwarding techniques.

Page 57: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

4.2 Techniques in absence of deterministic information (D.I.) 45

4.2 Techniques in absence of deterministic informa-

tion (D.I.)

The analysis of the performances of the three techniques is performed in the sce-nario presented in the previous section . It is calculated the number of nodesreached using a determined technique and then the number of transmissionsneeded at every hop by the technique. The analysis is performed using geo-metrical consideration and exploiting the properties of the Poisson distributionof the nodes. However, some approximations are introduced in certain pointsand it is necessary to verify if they are correct or not. All the results found outwith the analysis are compared in chapter 5 with the simulation results. On theother hand, the analytical results are a very useful instrument to compare theperformances of the forwarding techniques, faster to compute and more flexiblethan the simulation.

The three techniques compared are:

Flooding: in subsection 4.2.1;

Gossip: in subsection 4.2.2;

O1T: in subsection 4.2.3;

4.2.1 Flooding

Pure flooding is the most common and most simple technique to forward apacket in the absence of any geographical or D.I. . Every node which receivesa packet retransmits it with probability p = 1 in the next hop.

In the hypothesis of the analysis, at the first hop, the source simply broad-casts the packet to all the nodes in its RoT. The average number of nodes in aRoT is M , by definition of density, but the nodes are distributed with a Pois-son process, that is memoryless [30]. Thanks to the memoryless property it ispossible to assert that the average number of nodes in a circle of area As(RoT )is M , but the average number of nodes in a circle of the same area, centered ina specific node in the network, so conditioned by the fact that there is a nodein the center of the circle, is M + 1. In other words, every node in the networkhas in average M neighbors, as verified through simulation in section 5.1.

By this fact, the average number of neighbors of the source node is M , notM − 1. It is now possible to calculate the average number of nodes successfully

Page 58: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

46 Analysis

reached in the first hop:N1 = PncM (4.15)

where Pnc is calculated in (4.3). The levels of the transmission, used in thefollowing, are defined as:

• the source node is the only node of the first level;

• the nodes reached at the first hop are part of the second level;

• the nodes reached for the first time at the second hop are part of the thirdlevel;

• the other levels are defined in the same way.

At the first hop there is only the transmission by the source node, so thenumber of transmissions is

NT1 = 1 (4.16)

and the average number of nodes aware of the packet is the sum of the averagenumber of nodes reached (N1) plus the number of nodes that are previouslyaware of the packet (the source node):

NAW1 = 1 + N1 = 1 + M · (exp−gTv)M (4.17)

The average values found with the previous formulas are the same for all thetechniques we deal with, because we reasonably suppose that the first transmis-sion (from the source) is the same broadcast transmission for all the techniques.

In order to give an idea on how the traffic in the network influences theaverage number of nodes reached at the first hop, in Fig. 4.5 it is shown theaverage number of nodes aware of the packet after the first hop, in functionof the traffic in the network (bit per second), for many values of the densityM ∈ [2, 9]. This graph is calculated using the formula for the Pnc in (4.5).

From the second hop onwards, all the new nodes reached (Ni−1, i = 2, 3, . . .

, nodes of the ith level) try to transmit. The average number of new nodesthat each transmitting node can reach is β2M , where β2 is a parameter fromsubsection 4.1.1 that represents the new area every node can discover with atransmission, expressed as a fraction of a RoT. There is another problem totake into account, that is not considered in [28] and neither in [10]: if a nodeB1 of the second level is close to node B2 and they both retransmit, the new

Page 59: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

4.2 Techniques in absence of deterministic information (D.I.) 47

103

104

105

106

1

2

3

4

5

6

7

8

9

10

Bitrate in [bit/sec] in a RfT

Nno

des r

each

ed in

1 h

op

M=2M=3M=4M=5M=6M=7M=8M=9

Figure 4.5: Number of nodes aware of the packet after one hop, in function ofBRot for different values of M ∈ [2, 9]

area discovered by the two nodes is less than 2 · β2 ·As(RoT ), because the twoareas can overlap. So it is necessary to change the parameter β2 referred to asingle node in:

βeff2 = β2/N

B2 (4.18)

where NB2 represents, given that node B1 is transmitting to a node of the third

level C, the number of nodes at the same level of B1 that can transmit tothe same node C. Referring to Fig. 4.3, NB

2 is the average number of nodesinside region α, reached by node A and that are going to retransmit to nodeC. This number is calculated, thanks to the memoryless property of a Poissondistribution [30], as:

NB2 = D2α + 1 (4.19)

where D2 is the density of nodes (in number of nodes per RoT) aware of thepacket after the first hop, in the new area discovered by the first hop (that isRoT(A) ). This value is calculated as:

D2 = N1 = M · Pnc (4.20)

Page 60: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

48 Analysis

In this way, D2 · α represents the number of neighbors of node B inside regionα that are aware of the packet and that are going to retransmit at the secondhop.

Summing up (always referring to the notation if Fig. 4.3):

• in the first hop node A reach N1 nodes, that are distributed inside itsRoT with density: D2;

• node C, at the third level, can be reached by average NB2 nodes of the

second level;

• on the other hand, every node B at the second level can discover a newregion of average area βeff

2 ·As(Tot).

It is now possible to calculate the probability that a node in the third levelC is reached successfully by at least one node in the second level B:

PB2 = 1− (1− Pnc)NB

2 (4.21)

where this formula is used also in [10].At this point, taking into account that the average number of new nodes

inside the coverage area of the nodes of the second level is:

Nmax2 = N1(βeff

2 M) (4.22)

it is possible to calculate the real number of nodes reached, taking into consid-eration also the probability of collision Pnc:

N2 = Nmax2 · PB

2 = N1(βeff2 M)PB

2 (4.23)

The total number of transmissions performed, in the first and in the secondhop, is:

NT2 = NT

1 + N1 (4.24)

and after the second hop, the total number of nodes aware of the packet is

NAW2 = NAW

1 + N2 (4.25)

For all the following hops, it is necessary to reiterate the same formulas ofabove. In general for the ith hop, the density of nodes in the new area discoveredby the previous (i− 1)th hop, in number of nodes per RoT, is expressed as:

Di = PBi−1M (4.26)

Page 61: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

4.2 Techniques in absence of deterministic information (D.I.) 49

and it depends only by the parameters already calculated at the previous step.The average number of nodes at the (i− 1)th level that can reach a node in theith level is:

NBi = Diα + 1 (4.27)

The average new area discovered by every transmitting node at the (i−1)th

hop is:βeff

i = β2/NBi (4.28)

At this point it is possible to calculate the probability of successfully reach-ing a node at the ith level that is inside the discovered area of at least onetransmitting node of the (i− 1)th level:

PBi = 1− (1− Pnc)NB

i (4.29)

Finally, the formulas to calculate the number of new nodes reached (4.30),the total number of transmissions including the ith hop (4.31) and the totalnumber of nodes aware of the packet (4.32) are:

Ni = Ni−1(βiM)PBi (4.30)

NTi = NT

i−1 + Ni−1 (4.31)

NAWi = NAW

i−1 + Ni (4.32)

All these formulas are used in section 4.3 to draw the graphics of the per-formances of the pure flooding technique.

4.2.2 Gossip

The gossip forwarding technique, from [22], is an improvement of the floodingtechnique in a scenario in absence of any geographical or D.I., in order toavoid the broadcast storm problem [31]. Every node which receives a packetretransmits it with probability p in the next hop, while with probability 1− p

it does not retransmit at all.The analysis of the gossip technique uses formulas similar to the one used in

the previous subsection, adding simply the probability to re-forward the packet,PF . The first two hops are always performed using the flooding technique,while from the third hop onwards the formulas change, according to the gossipalgorithm.

Page 62: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

50 Analysis

Considering a generic ith hop, the density of the node in the region discov-ered at the previous hop that are going to retransmit the packet is:

Di = PF (PBi−1M) (4.33)

It is the same density found in the flooding technique, but in this casethe nodes reached retransmit only with probability PF , so the total numberof nodes that retransmit, and consequently the density, should be multipliedby PF . The average number of nodes that can reach a node discovered in thenext hop is still calculated with (4.27), and also the new area discovered byevery transmitting node is calculated as in the case of flooding with (4.28).The probability of successfully reaching a node at the ith level, that is insidethe coverage area of at least one transmitting node of the (i− 1)th level, is stillcalculated with (4.29), but the average number of new nodes reached at the ith

hop change, taking into account the probability PF :

Ni = (PF Ni−1)(βeffi M)PB

i (4.34)

Also the total number of transmissions including the ith hop becomes:

NTi = NT

i−1 + (Ni−1PF ) (4.35)

while the total number of nodes aware of the packet after the ith hop is stillcalculated by (4.32).

In section 4.3 it is shown how the probability to re-forward the packetdrastically change the performances of the technique.

4.2.3 O1T

The O1T forwarding technique is described in detail in chapter 2. The analysisof this technique is different from the previous two, because the node whichretransmits is chosen according to the algorithm of O1T technique.

In this analysis the cross-layer information is not taken into account. It isnot simulated a scenario with an energy value at every node that can influencethe forwarding. Also the cross-layer parameters that can improve the perfor-mances of the technique are not simulated, parameters like SS (signal strength)or the option of the knowledge of the two hop neighbors. Indeed, it is takeninto account only the information about how many copies of the same packet

Page 63: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

4.2 Techniques in absence of deterministic information (D.I.) 51

are received: it is supposed that a node can transmit only if none of the nodesin its neighborhood, at the same level of the node, has already transmitted. Inthis way, a lower bound of the performances of the O1T technique have beenfound.

The first two hops are performed using flooding, while from the second hoponwards a node reached at the previous hop can retransmit only if none of thenodes inside region γ (in Fig. 4.3) have previously retransmitted. Region γ

contains all the nodes at the same level of the potential retransmitting nodethat are inside its RoT. Supposing that all the nodes have the same probabilityto retransmit, this probability becomes:

PT =1

1 + γD(4.36)

It is important to notice that the density of the nodes reached in the regiondiscovered in the previous hop does not change hop by hop as in (4.26) or(4.33). In the case of O1T only one node at the ith level transmits to node C,so at every hop there is always the same probability of successfully reachingnode C that is inside the new area discovered, that is equal to the probabilityof a successful transmission Pnc. Every node C can receive only one packetfrom the previous level, no matter if it is successful or not, so the density ofnodes reached in a new discovered area is:

D = Pnc ·M (4.37)

A node transmits at the next hop with a probability PT , but it is also theonly node that transmits in its neighborhood, so with a high probability thenew region discovered by this node is not reached by any other node. Thismeans that any node that transmits is able to discover a new region of area β2

(in fraction of RoT, parameter calculated in subsection 4.1.1), that is a biggerarea than the βeff

i calculated in (4.28), valid for the previous techniques. Thisis the formal reason why the O1T technique is more efficient than the othertechniques, as shown in section 4.3.

It is now possible to calculate directly the average number of nodes reachedin the generic ith hop, that is:

Ni = [(Ni−1PT )β2M ]Pnc (4.38)

this is similar to (4.30), the differences from that formula are:

Page 64: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

52 Analysis

• the number of nodes reached at the previous hop is multiplied by PT :this means that not every node retransmits, but only a selected subset ofthem;

• the new area discovered by each node becomes β2 > βeffi ;

• the probability of reaching a new node C inside the discovered regiondecreases a little bit, Pnc < PB

i , but supposing a high value of Pnc thisdoes not affect the performance, as seen in section 4.3.

The total number of transmissions including the ith hop decreases to:

NTi = NT

i−1 + (Ni−1PT ) (4.39)

that is less than the one calculated in (4.31), again because of the probabilityPT . The number of nodes aware of the packet after the ith hop is still calculatedby (4.32).

The new technique, as shown in the formulas, performs less transmissionsthan the other two techniques, so it has a lower energy consumption, but onthe other hand it reaches less nodes than the pure flooding. In the section 4.3it is shown that it has better performances than the previous two techniques,specially with a high density of nodes per RoT, M > 5.

4.3 Results in absence of D.I.

The mathematical analysis allows evaluation of the performances of the tech-niques; it is necessary to fix some values for the capacity of the wireless channeland for the background traffic, in order to obtain the results from the formulasand to compare them. These values restrict the analysis to a specific case, butthe formulas are general and applicable to all specific cases, in the hypothesisof this work.

The MAC and physical layers’ parameters chosen for the analysis are:

• the capacity of the wireless channel, C = 5 · 104 bit/sec, value chosenaccording to the results in [10];

• the number of symbols per slot (QPSK modulation): Ns = 20 sym-bols/slot, so Nb = 40 bit/slot;

Page 65: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

4.3 Results in absence of D.I. 53

• the value of the vulnerable period, Tv = Nb/C = 8 · 10−4 sec, that is thetime necessary to transmit one slot;

• the value of the average background traffic in the network, BRot = 104

bit/sec, so the channel is not overloaded and the probability of no colli-sions becomes Pnc = 0.98.

The choice of the values of the geometrical parameters, that are approxi-mated, restricts the analysis to a specific case. The values chosen are the onesin subsection 4.1.1. However, this choice does not influence the comparisonbetween the techniques, as shown in the second part of this section. Finallythe value for the probability of forwarding in gossip is PF = 0.7.

The graph in Fig. 4.6 represents the number of nodes reached by the threetechniques, after Nhops = 5 hops. In order to find a more significant result,in the first two hops for every technique it uses the flooding technique (so thesource node and all its neighbors that receive the packet always re-forward thepacket): this prevents the forwarding being stopped at the third hop. From thethird hop onwards it uses the technique specified in the legend.

From Fig. 4.6 it turns out that the best technique, in terms of number ofnodes reached, is flooding, as expected. On the other hand, this graph does nottake into account the energy consumption of the techniques needed to performall the transmissions.

In order to find the efficiency of the forwarding technique, Fig. 4.7 depictsthe number of reached nodes in the network divided by the number of trans-missions performed, that is the definition of efficiency adopted in this thesis.It is supposed that the network spends the same amount of energy for everytransmission, that is the cost in energy terms of one transmission and in averageM receptions by the neighbors of the node. Moreover, a node consumes thesame energy to receive or to reject a packet, that is the energy consumed in thephysical and MAC layers: the packet should be received and processed in theMAC before the node can check that the packet is not addressed to itself. Itis not supposed, as in other papers like [23], that a node can process the MACheader of the packet and reject the packet before receiving it, because in thehypothesis of this work the packet length is comparable to the length of theMAC header.

In Fig. 4.7 it represents the number of nodes reached for a unit energy cost,that is the cost of one transmission.

Page 66: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

54 Analysis

3 4 5 6 7 8 9 100

20

40

60

80

100

120

140

160

M = number of nodes in a RoT

NA

W

Pure FloodingGossip, P

F=0.7

O1T

Figure 4.6: Number of nodes aware of the packet NAW after 5 hops using thethree techniques analyzed.

In terms of efficiency, the best technique is O1T, which is much better thanflooding and gossip, specially for a high density of nodes. For example, forM = 10, the O1T technique has an efficiency that is approximately 75% higherthan gossip and more than 100% higher than flooding.

The results found in Fig. 4.6 and 4.7 are relative to a specific case for aspecific choice of the parameters. In order to prove that the results are moregeneral, and not linked to a specific case, it is performed the same analysis inthe following range of parameters:

1. the density of the network already varies in the two graphs in a rangeM ∈ [3, 10];

2. the probability of forwarding of the gossip varies in the range PF =[0.5, 0.9], that is the significant range for the gossip technique;

3. the traffic in the network, the MAC and physical layer vary, so do theprobability of no collisions, that keeps them in account; it varies in therange Pnc ∈ [0.6, 1], a significant wide range to generalize the analysis;

Page 67: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

4.3 Results in absence of D.I. 55

3 4 5 6 7 8 9 101

1.5

2

2.5

3

3.5

M = number of nodes in a RoT

NA

W /

Ntr

ansm

issi

ons

Pure FloodingGossip, P

F=0.7

O1T

Figure 4.7: Number of nodes aware of the packet NAW divided by the numberof transmissions, after 5 hops, using the three techniques analyzed.

4. the three geometrical parameters, that oscillates hop by hop around anaverage value, vary in the ranges α ∈ [0.21, 0.25], β2 ∈ [0.44, 0.48] andγ ∈ [0.27, 0.34].

The graphs obtained varying all these parameters are not reported, becausethey are not very significant. In this thesis it simply explains the meaning ofthe results obtained varying the parameters one by one, reporting only the mostsignificant graph.

1. M ∈ [3, 10]: this range is already represented in in Fig. 4.6 and 4.7.

2. PF = [0.5, 0.9]: changing this parameter, only the performances of thegossip technique varies; referring to Fig. 4.6, for PF = 0.9 the numberof nodes that receive the packet after 5 hops using gossip, NAW (gossip),is close to the NAW (flooding), while for PF = 0.5 it is lower than theNAW (O1T); the efficiency of the gossip technique varies about 33% fromPF = 0.9 to PF = 0.5, but is is still significantly lower than O1T. Itshould be noticed that the efficiency of the technique increases while PF

Page 68: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

56 Analysis

decreases, with the definition of efficiency adopted. This seems paradox-ical, but it is explainable looking at the NAW , value that decreases withPF . With a low value of PF , the transmissions are very rare, and everytransmission can reach a lot of nodes, without superposition; the problemis that the technique does not guarantee the forwarding of the packet farfrom the source node, as the O1T technique.

3. Pnc ∈ [0.6, 1]: the Pnc affects the performances of all the techniques, butspecially of O1T: the probability that a node transmits in O1T, dependingon the probability that it receives a second copy of the packet, changesaccording to (4.36) and (4.37):

PT =1

1 + γPncM(4.40)

With Pnc = 1 the performances are close to the ones in Fig. 4.6 and 4.7,instead with Pnc = 0.6 the NAW decreases for all the techniques and theefficiency decreases specially for O1T, as seen in Fig. 4.8. This is dueto the fact that O1T does not work properly with a low value of Pnc: ifthere are frequent collisions, a node is reached with a lower probability,but it also with low probability aware of the fact that a neighbor nodehas already retransmitted or not. In other words, in this situation a nodeis not able to properly use the algorithm of O1T to take the decision toforward or not the packet, and consequently the performances significa-tively decrease. Anyway, in the hypothesis of a sensor network with lowdata rate, it is reasonable to suppose that the Pnc is higher than 0.9, sothe O1T is a suitable technique.

4. α ∈ [0.21, 0.25], β2 ∈ [0.44, 0.48] and γ ∈ [0.27, 0.34]: varying the first twoparameters in their range, the performances of the techniques change sig-nificantly, but the relative comparison between them remains unchanged;the parameter γ instead influences only the performances of the O1T tech-nique: with γ = 0.34 the performances of the O1T decreases, in termsof NAW , but the comparison with the other techniques does not vary somuch and the O1T still has a significantly higher efficiency compared toflooding and gossip with PF = 0.7.

In this subsection the main results of the analysis, with the comparisonof the performances of the three techniques analyzed, are shown. It has also

Page 69: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

4.3 Results in absence of D.I. 57

3 4 5 6 7 8 9 101

1.5

2

2.5

3

3.5

M = number of nodes in a RoT

NA

W /

Ntr

ansm

issi

ons

Pnc

=0.6, flooding

Pnc

=0.6, gossip PF=0.7

Pnc

=0.6, O1T

Pnc

=1, flooding

Pnc

=1, gossip PF=0.7

Pnc

=1, O1T

Figure 4.8: Number of nodes aware of the packet NAW divided by the numberof transmissions, after 5 hops, for Pnc = 0.6 and Pnc = 1.

analyzed the influence of all the parameters that are used in the analysis: itcomes out that the approximation made in the analysis for the geometricalparameters does not significantly affect the results, as well as the values chosenfor PF . The density of the nodes is chosen as variable for the two graphs in Fig.4.6 and 4.7; the only parameter that can change significantly the comparisonof the performances of the techniques is the Pnc, that takes into account thegeneral traffic in the network. In the hypothesis of this paper, the value chosenis Pnc > 0.9, for the reason expressed above.

With these assumptions, flooding can reach the maximum number of nodes,but the O1T has a higher efficiency; adding to the O1T also the option thatall the neighbors of the publisher are aware of the existence of the publisher,as explained in section 4.4 and more in chapter 5, O1T can reach performancesvery close to flooding, with a significant lower power consumption.

Page 70: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

58 Analysis

4.4 Analysis in the P/S scenario in absence of D.I.

It is important to evaluate the performances of the O1T technique also ina Publish/Subscribe interaction, the application for which the technique wasthought and optimized. The task of this subsection is to find the probability fora subscribe packet of reaching the publisher. In the hypothesis all the neighborsof the publisher know the existence of the publisher, that is an option explainedin section 2.5, it is sufficient for the subscribe packet to reach one of them.Afterwards the communication goes on using D.I. and the packet reaches thepublisher with probability P = 1.

In this work two methods to find this probability of reaching the publisherare analyzed, subsection 4.4.1 and 4.4.2, then a proposed comparison in sub-section 4.4.3.

4.4.1 Method A:

The parameters of the analysis are the average number of neighbors M = m,the total number of nodes in the network NTOT = n, the number of nodesreached after Nhops hops NR(Nhops) = nr, for the O1T technique that is ana-lyzed. To perform the analysis, it is supposed that there is the same probabilityof reaching every node in the network, no matter of its position. So the proba-bility of reaching at least one of the publisher neighbors is the complementaryprobability of reaching none of them, expressed as:

PP,1 = 1− n−m

n· . . . · n−m− (nr − 1)

n− (nr − 1)=

= 1− (n−m)!n!

· (n− nr)!(n−m− nr)!

(4.41)

In this way the probability of reaching the publisher is expressed in a closed-form expression, easy to calculate, but it does not take into consideration theposition of the nodes: the neighbors of the publisher are not randomly distrib-uted, but they are closer to each other, inside the circular RoT of the publisher.In other words, they form a sort of cluster, and the packet simply has to reachthis cluster to reach the publisher, thanks to the D.I. .

Page 71: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

4.4 Analysis in the P/S scenario in absence of D.I. 59

4.4.2 Method B:

In order to find a better approximation which takes into consideration the factthat the publisher’s neighbors are a sort of cluster in the network, the secondmethod uses a slightly different approach based on geometrical considerations.The idea is that using the technique of O1T, the nodes reached are approxi-mately inside a certain circle with the subscriber in the center. Inside this circle,the technique does not allow to reach all the nodes, only with pure flooding isthere a high probability of reaching all of them. There is a high probabilityP ' 1 of reaching at least one node of every RoT placed inside the circle. Thisis reasonable thinking on how the O1T technique works, spreading the packetin the widest area, with just one transmission for every region γ.

With this method, the probability of reaching at least one neighbor of thepublisher becomes the probability that the distance from the publisher to thesubscriber is less than a defined L. The parameter L depends on the numberof hops Nhops and on the average number of neighbors M . In order to finda reasonable value, it has been performed in a simulation in a scenario witha Poisson distribution of the nodes and transmissions without D.I., using thetechnique O1T. In Fig. 4.9 it represents the distance from the source of thenodes reached in the last hop, for different values of Nhops ∈ [1, 6], and fordifferent values of M. This distance is a good approximation of L. For example,just to give an idea of the meaning of these values: for M = 5 and nhops = 5,from the graph L = 2.6, so the total number of nodes inside the circle reachedduring the transmission is NC = M · πL2

πR2Rot

= 34, where RRot is the radiusof a RoT. From Fig. 4.6 the number of nodes reached in this hypothesis isNR = nr = 27, that is the 80% of NC ; the probability of reaching at least oneof the neighbors of a publisher, if the publisher has a distance D < L, is veryhigh.

Supposing that if the publisher is at a distance D < L from the subscriber,it is reached by the subscribe packet, the probability of reaching the publisheris simply given by:

PP,2 =NC

NT=

M ·πL(M,Nhops)2

πR2Rot

NTOT(4.42)

Page 72: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

60 Analysis

1 2 3 4 5 60.5

1

1.5

2

2.5

3

3.5

Nhops

= number of hops from the source

L =

ave

rage

dis

tanc

e fr

om th

e so

urce

(1

unit

= R

RoT

)

M = 3M = 5M = 7M = 10

Figure 4.9: Average distance of nodes reached in Nhops (in the x-axis) fromthe source

4.4.3 Comparison between the two methods

The two methods presented have a different approach: the first one gives theexact probability of reaching at least one of the neighbors of the publisher, ifthey are randomly distributed in the scenario, but it does not take into accountthe geometrical distribution of these nodes, that are in a cluster around thepublisher. The latter method is an approximation and it is based on parametersderived by simulation, but it takes into consideration the main hypothesis ofthe problem and provides a better approximation.

The following example is thought to compare the two methods. It is fixed,with a notation already used, M = 5, Nhops = 5 and NTOT = 100. Thetotal number of nodes reached is NR = 27, so method A gives a probability ofreaching the neighbors of the publisher PP,1 = 0.80, method B gives PP,2 = 0.34.

The results of these two methods are very different, so in order to choosea good approximation, this scenario has been simulated and the results are inFig. 5.5. The probability for a subscribe packet of reaching the publisher isP ' 0.35, so method B is very closed and suitable for this analysis, with anerror < 3% due to approximation, in this specific case.

Page 73: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

4.5 Techniques in presence of D.I. 61

4.5 Techniques in presence of D.I.

The transmission in the presence of D.I. is the transmission of publish packetsfrom the publisher to the subscriber. It starts only after the subscribe packethas reached the publisher and a deterministic path has been established. Themain assumptions adopted in this work till this point are:

• a fixed and constant radius for transmission for every node: RRot;

• the channel is modelled only by the RRot, without taking into considera-tion any fading, shadowing or simply attenuation;

• it is supposed, till this point, that the nodes are fixed and not mobile.

Under these assumptions, the transmission of a publish packet to the sub-scriber, in presence of D.I., is successful with a probability of PS = 1. Thetransmission, from the publisher to the subscriber, described in chapter 3, ismuch more efficient than the transmission in absence of D.I. because it requiresonly the nodes along the predefined path to transmit and it does not requireflooding of a packet through the network, looking for a suitable destinationnode.

Anyway, the Publish/Subscribe interaction is made to work also in a net-work with fast changing topology, so it is necessary to take into account thepossibility of the network changes. A topology change does not affect the trans-mission in the absence of D.I., because no positional information (like HCS orHCP ) is used, but it becomes very important in the case of a transmission inthe presence of D.I., because, if the network changes, the positional informationbecomes out of date and can drive the publish packet in the wrong direction.It is necessary to analyze the different causes of a changing in the topology andto make the network able to react to them.

There are different reasons that can make the transmission fail, so the pub-lish packet is not able to reach the subscriber; two problems already mentionedin chapter 3 are:

A node along the path starts a sleeping period: it is necessary to renewthe path, because the publish packet can not reach the subscriber withthe old information in the network; this problem is analyzed in subsection4.5.1.

Page 74: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

62 Analysis

The subscriber changes its position: it is supposed in this work that theonly mobile node is the subscriber; this is reasonable in a scenario like in[32], where the nodes of the network are usually fixed in the environment,and the subscriber is a gateway to another network, like a mobile phone;this problem is analyzed in subsection 4.5.2.

There are also other problems that are not considered in this analysis:

The channel: the channel between two nodes can change and make the trans-mission unsuccessful.

A node in the path gets its energy over and turns off: this problem isnot considered in this work, otherwise it would have been necessary toconsider the density in the network can change with a certain probabilityafter a certain time; a simpler way to analyze this problem, without takinginto account any change in the density of the network, is to consider theevent “a node turns off” in the same way as the event “a node starts asleeping period”.

The nodes along the path change their position: in this work it is sup-posed that this event can happen with very low probability and it is notconsidered in the analysis; this is reasonable in a scenario like in [32].

It is important to analyze the characteristics of the specific network and todescribe probabilistically the behavior of the nodes, e.g. if and how fast theychange position. With some information about the mobility, it is possible tochoose if the technique in presence of D.I. is preferable to the O1T techniqueto forward the publish packets. Indeed, if the network is changing too fast, it isnot convenient to use the D.I., that becomes out of date and useless after a theforwarding of a few publish packets. It is better to forward the publish packetswith the O1T technique, or with a technique that does not use any informationabout the network topology.

In the following two subsections the two facets of the problem are analyzedand some formulas useful to make this choice are found out.

4.5.1 Sleeping period

In the literature different sleeping behaviors are presented, like in [23]. In thispaper, the sleeping behavior of a node is not synchronized to the other nodes,

Page 75: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

4.5 Techniques in presence of D.I. 63

and this is reasonable also in the hypothesis of this thesis, in which the nodescommunicate only to exchange a packet for the Publish/Subscribe interaction.On the other hand, in [23] it is supposed that the sleeping behavior is linked withthe MAC (CSMA based) superframe: this means that a node in that hypothesiscan turn from a sleeping period to an awake period a few times in less thana second. Taking into consideration that in practice it is expensive, in energyterms, for a node to turn on and off [33], in this work it is assumed that theduration of a sleeping period is simply random, with exponential distribution,and independent, with an average awake or sleeping time of at least someseconds. With this assumption, the active nodes at every time are still Poissondistributed, as explained in [34].

Defined P as the probability of a node to be asleep and M/P the averagenumber of nodes in a RoT, by the property of a Poisson process, the activenodes are still Poisson distributed, with an average number of nodes in a RoTof P ·M/P = M .

It is assumed that every node can start a sleeping period during an inter-val ∆Tinter between the transmission of one packet and the next one with aprobability Psleep, that depends on the frequency of the packets sent: if ∆Tinter

is shorter, the Psleep is accordingly lower. With this sleeping behavior, theprobability that at least one node in the path starts a sleeping period during a∆Tinter is:

P = 1− (1− Psleep)n (4.43)

where n is the number of nodes in the path between the publisher and thesubscriber. We suppose that a publisher can not start a sleeping period afterit is reached by a subscribe packet and it starts to transmit.

4.5.2 Mobile subscriber

Another problem arises if the subscriber changes its position. In order to studyanalytically this event, two types of subscriber’s mobility are considered:

• the subscriber changes its position but it moves quite slow, in terms ofRRot, during the time between the arrivals of 2 consecutive publish packets(∆Tinter); in this case the publisher remains in its position with proba-bility 1− Pmove,1 and it change its position assuming a random positioninside its RoT with probability Pmove,1; so the maximum distance it isable to cover in ∆Tinter is a radius of a RoT;

Page 76: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

64 Analysis

• the subscriber changes its position and it moves faster: in this casethe publisher remains in its position with probability 1 − Pmove,2 andit changes its position assuming a random position inside a circle of aradius equal to 2 times the radius of a RoT with probability Pmove,2; sothe maximum distance it is able to cover in ∆Tinter is 2 radius of a RoT.

The first case is easy to analyze, using the results about the geometry of thenetwork already discovered in the analysis of the technique in absence of D.I..The subscriber moves with probability Pmove,1: when it moves, with probabilityP = 1−β it remains inside the coverage of the first node, B1, in the path fromthe subscriber to the publisher. As a matter of fact, 1−β is the average fractionof the subscriber’s RoT covered by a 1-hop neighbor of the subscriber.

On the other hand, with probability P = β the subscriber moves outsidethe coverage of the first node in the path, B1. Using again the geometricalresults already discovered, it is possible to calculate the probability that thereis at least one node in the intersection between the RoT of the subscriber inthe new position and the RoT of B1. If it happens, with just one hop thesubscriber can reach a node that is already reached by the publish packets, sothis node becomes part of the deterministic path and it starts to re-forward thepublish packets. The probability that there is at least one node in the intersec-tion between the publisher in the new position and node B1 can be calculatedremembering that the nodes are Poisson distributed, with a probability massfunction in (4.1), and with expectation µ, calculated in (4.2).

The average intersection between the two nodes has area α · As(RoT ), asseen in subsection 4.1.1, so the average number of nodes is M · α, differentlyfrom (4.14), because in this case the probability is not constrained by having atleast one node in α. The probability to have at least one nodes in this regionof area α ·As(RoT ) becomes:

Pα(k nodes in the region α, k > 0) = 1− Pα(k = 0) = 1− e−M ·α (4.44)

In the worst case, with probability Pmove,1 ·e−M ·α, the subscriber moves andit is not able to reach the path in one hop. In this case the subscriber starts toflood the network seeking for a node in the path or the publisher itself.

The latter case, in which when the subscriber changes its position it couldassume a position randomly distributed inside a circle of radius 2 times theradius of a RoT, is more difficult to analyze. The subscriber could go in the

Page 77: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

4.5 Techniques in presence of D.I. 65

direction of the publisher, so it remains connected to at least one node in thepath, or it could go in the opposite direction, so it should start to flood thenetwork with a new subscribe packet. It is difficult to find a close and usableformula to describe the probability of these events, so this scenario is analyzedthrough simulation in chapter 5.

In conclusion, the analysis of the technique in the presence of D.I. simplyshows some usable formula to understand the behavior of the network in thepresence of some problems, but it does not calculate the performances of thetechnique compared to the other techniques in absence of D.I. . The perfor-mances are calculated through simulation in chapter 5, where also the mobilityproblems of above are taken into account, to better understand the behavior ofthe techniques analyzed in a realistic scenario.

Page 78: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

66 Analysis

Page 79: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

Chapter 5

Simulation

The simulation of the techniques is made first of all in order to verify the resultsof the analysis in chapter 4, for the techniques in the absence of deterministicinformation (D.I.) in section 5.2. Moreover, with the simulation it is possibleto analyze the performances of the techniques in some specific and more real-istic scenarios, in subsection 5.2.2, and to evaluate in section 5.3 the effects ofsome of the options of the O1T technique proposed in section 2.5 that are notimplemented in the analysis. With simulation it is possible also to analyze insection 5.4 some facets of the technique in presence of D.I., described in chapter3, comparing this technique with the O1T technique, in order to decide if it isbetter or not to use the D.I. for the forwarding. The technique in the presenceof D.I. requires a set up energy to spread the D.I. in the network, every timethat the topology changes significantly, so that a predefined path in the networkis not a valid path any more.

As a matter of fact, in some very mobile and changing scenarios, it is prefer-able to use the O1T technique, that requires more energy, because it performsmore transmissions, but it does not require a new setup if the position of thenodes changes.

In the section 5.1 it proposes the model used in the simulation, with theassumptions made.

In order to have a summary of the content of this chapter, it shows a list ofall the graphs of the results found out through simulation:

• Fig. 5.1: Number of nodes aware of the packet NAW after 5 hops usingthe four techniques simulated.

Page 80: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

68 Simulation

• Fig. 5.2: Number of nodes aware of the packet NAW divided by the num-ber of transmissions, after 5 hops, using the four techniques simulated.

• Fig. 5.3: Probability of reaching the publisher in function of the numberof hops, M = 5.

• Fig. 5.4: Probability of reaching the publisher in function of the numberof hops, M = 10.

• Fig. 5.5: Probability of reaching the publisher in function of the numberof hops, with M = 5, in the hypothesis that the neighbors of the publisherare aware of the publisher interest.

• Fig. 5.6: Probability of reaching the publisher in function of the num-ber of hops, with M = 10, in the hypothesis that the neighbors of thepublisher are aware of the publisher interest.

• Fig. 5.7: Probability of reaching the publisher in function of the numberof hops, with M = [5, 10], in the hypothesis that the neighbors of thepublisher are aware of the publisher interest, with edge effects.

• Fig. 5.8: Probability of reaching the publisher in function of the numberof hops, with M = [5, 10], in the same scenario of Fig. 5.7, with theoption of Ptransm2

.

• Fig. 5.9: Probability of reaching the publisher in function of the numberof hops, with M = [5, 10], in the same scenario of Fig. 5.7, with theoption of the knowledge of the 2 hops neighbors.

• Fig. 5.10: Number of transmissions performed by techniques in the ab-sence and in the presence of D.I., in function of the density of the network,for a distance between publisher and subscriber of Nhops = 5.

• Fig. 5.11: Number of consecutive successful transmissions from the pub-lisher: to the subscriber before the first update of the D.I., with andwithout Fast Recovery, for M = 5 and M = 10, for Rmove = RRoT, infunction of Pmove.

• Fig. 5.12: Number of consecutive successful transmissions from the pub-lisher: to the subscriber before the first update of the D.I., with and

Page 81: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

5.1 Scenario of the simulation 69

without Fast Recovery, for M = 5 and M = 10, for Rmove = 2 · RRoT,in function of Pmove.

• Fig. 5.13: Number of consecutive successful transmissions from the pub-lisher to the subscriber before the first update of the D.I., for M = 5 andM = 10, in function of Psleep.

5.1 Scenario of the simulation

The simulation is realized using MatlabTM:

• a node is represented by the couple of number (x, y) that are the coordi-nates in a cartesian plane;

• the state of the node (e.g. “the node is going to retransmit at the nexthop”) is represented by putting the node in a specific subset; it is thesubset in which the node is that represents the state of the node;

• for every iteration of the simulation, the position of every node is chosenrandomly and the three techniques are analyzed in the new distributionof nodes.

The scenario of the simulation is similar to the one of the analysis, but itis not possible to use an infinite number of nodes, like in the analysis in whichthe network is supposed to be without edges. In the simulation scenario, thenetwork is circular and the subscriber is in the center in position (0, 0). In orderto have a comparison to the results from the analysis, the network is plannedto be big enough that it is impossible for a packet to reach the edges of thenetwork, so the radius of the network is Rn = RRoT ·Nhops, where Nhops isthe maximum number of hops analyzed. In planning the size of the networklike this, it is impossible for a transmission that starts from the subscriber toreach the edge of the network.

The nodes are distributed with a two dimensional Poisson process, like thenodes in the analysis, with distribution in (4.1). In order to simulate a Poissondistribution of the nodes:

• the number of nodes is chosen as the average number of nodes in an areaAs = (2Rn)2;

Page 82: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

70 Simulation

Table 5.1: Values of the geometrical parameters, hop by hop, obtained throughsimulationParameter 1st hop 2nd hop 3rd hop 4th hop 5th hop

α - - 0.247 0.232 0.231β 1 0.415 0.470 0.441 0.459γ - - 0.290 0.333 0.316

• inside the square of area As, the nodes are distributed following a uniformtwo dimensional distribution;

• in the simulation, only the node inside the circle of radius Rn, inscribedin the square of area As = (2 · Rn)2, are considered as active nodes, sothe network is circular.

A demonstration that the nodes in a two dimensional Poisson process insidea finite area, fixed the number of nodes, are distributed with a two dimensionaluniform distribution can be easily derived from Theorem 4.1 in [30], which as-serts, referring to a Poisson process, that: “conditioned on a fixed total numberof events in an interval, the location of those events are uniformly distributedin a certain way”. A similar conclusion is drawn also in [34], after a mathe-matical analysis of the deployment of the nodes. This point is very importantfor the reliability of the simulation, because the hypothesis of the Poisson dis-tribution of nodes is the basis for all the assumptions and calculations made inthe analysis, and the first task of the simulation is to confirm the results of theanalysis. Because of this, in this thesis it also verifies the memoryless propertyof a Poisson process in the scenario of above with a uniform deployment ofnodes, with an error lower than 10%.

In this scenario, it is calculated also the values of the parameters α, β and γ

that are used in the analysis. The simulation results for these three parametersare summarized in Tab. 5.1.

In subsection 4.1.1 it is found a suitable value for the parameters, takinginto account these simulation values, in order to perform a suitable analysis,without varying the parameter at every hop, but keeping them constant fromthe third hop onwards.

Page 83: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

5.2 Techniques in absence of deterministic information (D.I.) 71

5.2 Techniques in absence of deterministic informa-

tion (D.I.)

In this scenario, the simulation shows the performances of the three techniquesdescribed in the analysis (flooding, gossip and O1T) and also the performanceof the Fireworks technique from [23].

The Fireworks technique is a forwarding technique working as follows. Whena node receives a new packet, it rebroadcasts the packet to all its neighbors withprobability PB (Probability of Broadcasting), while with probability 1− PB itsends it to a finite number of neighbors, c < M , randomly selected. If the totalnumber of neighbors of the node is d < c, the node broadcasts the packet to allits d neighbors with probability P = 1.

As it was already underlined, in the assumptions of this paper it is sup-posed that a node has to receive the entire packet before it understands thatthe packet was not addressed to it. So every transmission, whatever it is broad-casting or not, has on average the same cost for the network, the cost spentby one transmitting node and in average M receiving nodes. This assumptionis different from the basic assumptions in [23], where they suppose that it ispossible that a node discards the packet if it does not match the address of thenode, without any energy cost. In these assumptions the Fireworks has goodperformances, better than the O1T itself, but in the assumption of this thesishas performances worse than the flooding, reaching less nodes and consumingthe same amount of energy.

5.2.1 Comparison with the analysis results

The results of the simulation are presented in two graphs with the same axesas the two respective graphs of the analysis. In the first graph in Fig. 5.1 itshows the number of nodes aware of the packet (NAW ), after five hops, usingthe four techniques, with the same axes as in Fig. 4.6 of the analysis. As inthe analysis, the Probability of forwarding for the gossip is PF = 0.7. For thefireworks technique, the Probability of Broadcasting is PB = 0.7, while withprobability 1− PB the node transmits the packet to c = d0.5Me neighbors.

The two graphs in Fig. 4.6 and 5.1 are very similar, even if the numberof nodes aware of the packet changes significantly from the analysis to thesimulation, due to some approximation in the evaluation of the geometrical

Page 84: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

72 Simulation

3 4 5 6 7 8 9 100

20

40

60

80

100

120

140

160

M = number of nodes in a RoT

NA

W

FloodingGossip, P

F=0.7

O1TFireworks, P

B=0.7

Figure 5.1: Number of nodes aware of the packet NAW after 5 hops using thefour techniques simulated.

parameter used in the analysis. However, the important result is that therelative comparison between the technique is exactly the same, in the analysisand in the simulation, confirming the correctness of the analysis.

The second graph in Fig. 5.2 represents the efficiency of the four techniquessimulated, with the same definition of number of nodes aware of the packet(NAW ) after five hops divided by the total number of transmissions performed.The graph corresponds to Fig. 4.7 presented in the analysis chapter. The resultfrom Fig. 4.7 and Fig. 5.2 are very similar, confirming another time the goodapproximation of the analysis.

5.2.2 Comparison in a scenario with edge effects

The simulation is performed to confirm the correctness of the analysis results,but also to go on with the comparison of the forwarding techniques in morerealistic scenarios. The first step is to consider the specific case of a networkwith a radius Rn = 3.5RRoT and with a total number of sensor nodes:

Page 85: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

5.2 Techniques in absence of deterministic information (D.I.) 73

3 4 5 6 7 8 9 101

1.5

2

2.5

3

3.5

M = number of nodes in a RoT

NA

W /

Ntr

ansm

issi

ons

FloodingGossip, P

F = 0.7

O1TFireworks, P

B = 0.7

Figure 5.2: Number of nodes aware of the packet NAW divided by the numberof transmissions, after 5 hops, using the four techniques simulated.

Ntot =πR2

n ·MπR2

RoT(5.1)

In this scenario the publisher is one node chosen randomly between theNtot nodes: this means that the forwarding of the packet can easily reach theedges of the network and in this way the performances can change significantly.The edge effect is not studied in the analysis in chapter 4, because it introducesa more complicate geometrical scenario, difficult to be represented by not toocomplicate formulas. It is analyzed only through simulation.

Two graphs are chosen to show the performances of the techniques in thisrealistic case. They represent the probability of reaching the publisher for asubscriber packet, in function of the number of hops the subscribe packet hastravelled in the network. The subscriber is a node at the center of the network,while the publisher is one node randomly chosen between the nodes in thenetwork. The two graphs are:

• in Fig. 5.3 it is depicted the probability of reaching the publisher in a

Page 86: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

74 Simulation

network with density M = 5, for the four techniques simulated: the totalnumber of nodes in this scenario is Ntot = 61;

• in Fig. 5.4 it is depicted the probability of reaching the publisher in anetwork with density M = 5, for the four techniques simulated: the totalnumber of nodes in this scenario is Ntot = 122.

1 2 3 4 5 60

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Nhops

= number of hops

Pr(

reac

h th

e P

ublis

her)

FloodingGossip, P

F=0.7

O1TFireworks, P

B=0.7

Figure 5.3: Probability of reaching the publisher in function of the number ofhops, M = 5.

Looking at the graphs in Fig. 5.3 and 5.4, it is possible to compare thefour techniques simulated: the probabilities relative to the gossip and the O1Ttechniques are lower than the two probabilities of the flooding and of the fire-works. For example for M = 10 and Nhops = 6, the probability of reachingthe publisher for the flooding is approximately the 20% higher than the sameprobability for the O1T. On the other hand, the number of transmissions per-formed by the O1T is one third of the number of transmissions performed bythe flooding, as seen in Tab. 5.2.2.

The number of transmissions, as already underlined, it is proportional to thetotal energy consumption of the network. In this specific case the O1T performs

Page 87: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

5.2 Techniques in absence of deterministic information (D.I.) 75

1 2 3 4 5 60

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Nhops

= number of hops

Pr(

reac

h th

e P

ublis

her)

FloodingGossip, P

F=0.7

O1TFireworks, P

B=0.7

Figure 5.4: Probability of reaching the publisher in function of the number ofhops, M = 10.

Table 5.2: Number of transmission performed, in the condition of above.Density Flooding O1T

M = 5 39 108M = 10 19 33

much better than flooding, specially for M = 10, where after Nhops = 6 theflooding has a probability of reaching the publisher of P = 0.99, while theflooding has P = 0.87, but the O1T needs about one third of the energy neededby the flooding.

The conclusion driven from this specific case is that, like in the analysisresults of chapter 4 and like in the simulation results with an infinite network insubsection 5.2.1, the O1T technique performs a little bit worse than flooding,in terms of number of nodes reached or in terms of probability of reachingthe publisher, but it is drastically cheaper in energy terms, so it is an efficientalternative in the forwarding for wireless sensor networks. In the next section itshows how an option of the forwarding techniques can improve the performances

Page 88: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

76 Simulation

of the O1T technique, without introducing a significant overhead.

5.2.3 Option: neighbors of the publisher are aware of the pub-

lisher interest

The option simulated in this subsection is already explained in section 2.5: allthe neighbors of the publisher are aware of its presence at one hop distance, andif they receive a subscribe packet matching the interest of the publisher, theyforward the packet using D.I.; besides if a subscribe packet reaches a neighborof the publisher, it is forwarded to the publisher with probability P = 1.

This option significantly increases the performances of the techniques be-cause a subscribe packet has just to reach a neighbor of the publisher, not thepublisher itself, then the communication goes on using D.I. . Referring to thetwo graphs of the previous subsection:

• in Fig. 5.5 it is depicted the same probability of Fig. 5.3, in the samescenario with Ntot = 61, but in the hypothesis that the neighbors of thepublisher are aware of the publisher interest;

• in Fig. 5.6 it is depicted the same probability of Fig. 5.4, in the samescenario with Ntot = 122, but in the hypothesis the neighbors of thepublisher are aware of the publisher interest.

A comparison between Fig. 5.3 and Fig. 5.5 shows that the option used inthis simulation is able to improve the performances of the techniques of about10%, without introducing a significant overhead, as already explained.

Comparing Fig. 5.4 and Fig. 5.6, in a scenario with a higher density ofnodes (M = 10), it is possible to see that, after Nhops = 6, the probabilityof reaching the publisher is very high also for the O1T technique, using theoption of above. This probability reaches P = 0.96, while the correspondingprobability for the flooding is closed to P = 1.

This improvement corresponds to the same number of transmissions shownin Tab. 5.2.2. This means that O1T performs significantly better with theoption introduced in this subsection, especially in case of a high density ofnodes.

Page 89: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

5.3 O1T technique in a realistic Publish/Subscribe scenario 77

1 2 3 4 5 60

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Nhops

= number of hops

Pr(

reac

h th

e P

ublis

her)

FloodingGossip, P

F=0.7

O1TFireworks, P

B=0.7

Figure 5.5: Probability of reaching the publisher in function of the number ofhops, with M = 5, in the hypothesis that the neighbors of the publisher areaware of the publisher interest.

5.3 O1T technique in a realistic Publish/Subscribe

scenario

After the comparison of the four techniques in the absence of D.I. presented inthe previous section, the simulation focus on the O1T technique, in order toevaluate its performance in a realistic Publish/Subscribe scenario, with differentoptions already introduced in section 2.5. The same scenario will be used alsoin section 5.4 to compare the O1T with the technique in the presence of D.I. .

The scenario is thought in order to take into account the edge effect, thatin the previous section it is taken into account only partially. In this scenario,while the publisher is one node chosen randomly between the nodes of the net-work, the subscriber is located at the edge of the network, that is a reasonableassumption, thinking about a mobile subscriber node (e.g. a mobile phone)that is able to ask for interest j as soon as it enters the network in which thereis a publisher for interest j.

Page 90: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

78 Simulation

1 2 3 4 5 6 0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Nhops

= number of hops

Pr(

reac

h th

e P

ublis

her)

FloodingGossip, P

F=0.7

O1TFireworks, P

B=0.7

Figure 5.6: Probability of reaching the publisher in function of the number ofhops, with M = 10, in the hypothesis that the neighbors of the publisher areaware of the publisher interest.

The nodes are still Poisson Distributed in a circle of radius Rn = 2.5·RRoT,so the maximum distance between the subscriber and the publisher is D =5 ·RRoT. It also uses the option that the neighbors of the publisher are awareof its interest.

The performance of O1T, in terms of probability of reaching the publisheras in the previous graphs, is depicted in this new scenario and compared withthe corresponding performance of flooding in Fig. 5.7. Two different densitiesof nodes are simulated:

1. the number of neighbors per node is M = 5 so the total number of nodesin the network is Nnodes = 31;

2. the number of neighbors per node is M = 10 so the total number of nodesin the network is Nnodes = 62.

In Fig. 5.7 it is shown that the O1T has performances close to the ones offlooding also in this realistic scenario with edge effect. The number of trans-

Page 91: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

5.3 O1T technique in a realistic Publish/Subscribe scenario 79

1 2 3 4 5 60

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Nhops

= number of hops

Pr(

reac

h th

e P

ublis

her)

Flooding, M=5O1T, M=5Flooding, M=10O1T, M=10

Figure 5.7: Probability of reaching the publisher in function of the number ofhops, with M = [5, 10], in the hypothesis that the neighbors of the publisherare aware of the publisher interest, with edge effects.

Table 5.3: Number of transmission performed, in the condition of section 5.3.Density Flooding O1T

M = 5 17 39M = 10 10 15

missions performed by the two techniques is reported in Tab. 5.3.With M = 5 the flooding has a probability of reaching the publisher that

is 13% higher than O1T, with an energy consumption, in terms of number oftransmissions, that is approximately the double of O1T. With M = 10, as inthe previous case, O1T performs much better than flooding, with a probabilityof reaching the publisher of about P = 0.94%, while the one of flooding isP = 0.99, but with an average number of transmissions that is about one thirdof the number of transmissions requested by flooding.

This confirms again the fact that O1T is a technique suitable for networkswith a high density of nodes, M > 5.

Page 92: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

80 Simulation

5.3.1 Option: Ptransm2

In this subsection the performances of O1T are evaluated, in terms of probabil-ity of reaching the publisher, in function of Ptrasm2 : this option is introducedin section 2.5.

A node B1 receives the first copy of a packet from node A, with HCS(A) = n

and it sets its HCS(B1) = n+1. If it receives a second copy of the packet froma node of the same level, B2 with HCS(B2) = n + 1, it transmits anyway withprobability Ptransm2

. If Ptrasm2 = 0 the technique is the basic O1T of above,while if Ptrasm2 = 1 it becomes the flooding technique.

In Fig. 5.8 the performances of the O1T technique with this option areevaluated in the same scenario described in section 5.3, with the two densities ofnodes already simulated, M = 5 and M = 10. The graph presents the same fourlines of Fig. 5.7, these are the probability of reaching the publisher respectivelyfor flooding (Ptransm2

= 1) and for the classical O1T (Ptransm2= 0), for

both the densities simulated. Between every couple of lines, there are the linesrelative to the O1T technique with Ptransm2

= 0.33 and Ptransm2= 0.66, the

performances of which are between flooding and O1T.It is important to underline that also in this case there is not a technique that

is more suitable in every case. As already underlined, flooding and Fireworkshave better performances in terms of probability of reaching the publisher,while O1T is much cheaper in energy terms. The option of Ptransm2

is simplya compromise between the two extremes: e.g. varying Ptransm2

it is possibleto reach the value of the probability of reaching the publisher requested by theapplication with the minimum energy consumption. In other words, Ptransm2

is a tool to adapt the technique to the specific network constraints.

5.3.2 Option: 2-hops neighbors knowledge

The last option simulated in this section is the knowledge of the 2-hops neigh-bors, presented in section 2.5, with the specific assumptions presented in thatsection. The forwarding decision is taken by the receiving node based also onthe number of new nodes it is able to reach, respect to the nodes reached bythe previous node in the path from the subscriber.

This option introduces an overhead, because the IDs of the neighbors of theforwarding node are sent in piggy-backing to the subscribe packet at every hop.On the other hand, the 2-hops neighbors knowledge is used by the algorithm in

Page 93: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

5.3 O1T technique in a realistic Publish/Subscribe scenario 81

1 2 3 4 5 60

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Nhops

= number of hops

Pr(

reac

h th

e P

ublis

her)

O1T, M=5, Ptransm 2

=0

O1T, M=5, Ptransm 2

=0.33

O1T, M=5, Ptransm 2

=0.66

Flooding, M=5O1T, M=10, P

transm 2=0

O1T, M=10, Ptransm 2

=0.33

O1T, M=10, Ptransm 2

=0.66

Flooding, M=10

Figure 5.8: Probability of reaching the publisher in function of the number ofhops, with M = [5, 10], in the same scenario of Fig. 5.7, with the option ofPtransm2

.

section 2.5 to improve the performances of the technique and to take a betterforwarding decision at every node.

In Fig. 5.9, the probability of reaching the publisher using this option isdepicted for the two values of the densities, M = 5 and M = 10, together withthe corresponding graphs of the probability for the flooding technique, alreadyin Fig. 5.7.

The probability of reaching the publisher for the O1T technique increasesfrom P = 0.67 to P = 0.72 for M = 5 and from P = 0.95 to P = 0.958for M = 10. Especially in the case of M = 10, the performances are veryclose to the one of flooding, that is an upper bound, maintaining the samenumber of transmissions, significantly lower than the one of flooding. Theoverhead introduced is significant in energy terms, but the energy consumptioncan increase to about (40 ± 20)%. For sure, the O1T technique also with thisoption remains much cheaper than flooding.

Anyway, it should be valued in the specific scenario if it is useful or not to use

Page 94: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

82 Simulation

1 2 3 4 5 60

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Nhops

= number of hops

Pr(

reac

h th

e P

ublis

her)

O1T, M=5Flooding, M=5O1T, M=10Flooding, M=10

Figure 5.9: Probability of reaching the publisher in function of the number ofhops, with M = [5, 10], in the same scenario of Fig. 5.7, with the option of theknowledge of the 2 hops neighbors.

this kind of option, depending if it is more stringent on the energy constraint orif it is more important to have a higher probability of reaching the publisher inthe specific case. The task of this simulation is only to underline the advantageof using this option, in terms of performances of the technique.

5.4 Techniques in presence of D.I.: comparison in a

Publish/Subscribe scenario

The main assumptions and problems of the forwarding in the presence of D.I.have already been explained in section 4.5.

After the publisher is reached by a subscribe packet, the nodes in the pathbetween the subscriber and the publisher have already memorized D.I. abouttheir position in the path, in terms of the number of hops from the subscriberHCS ; after the delivery of the first publish packet every node knows its positionalso in terms of the number of hops from the publisher HCP . The nodes in the

Page 95: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

5.4 Techniques in presence of D.I.: comparison in aPublish/Subscribe scenario 83

path can use this information to set a sort of virtual path to drive the publishpackets back to the subscriber that has requested them, as shown in section4.5.

The task of this section is to calculate how much the D.I. can increase theperformance and reduce the energy consumption. The simulation takes placein the scenario described in subsection 5.3, with the density of nodes M = 5and M = 10.

In the hypothesis that the nodes are not mobile and can not start a sleepingperiod, after a subscribe packet has reached the publisher, the publish packetis able to reach the subscriber with probability close to P = 1. The only factorthat can make the transmission of the publish packet fail is the Pnc, but it doesnot affect this simulation, as explained later in this section.

The first graph in Fig. 5.10 shows the number of transmissions neededby the forwarding for flooding, gossip and O1T compared to the transmissionneeded by the forwarding in the presence of D.I., in the realistic scenario withedge effect of section 5.3 in function of the density of the nodes, supposing thatthe distance between the publisher and the subscriber is of 5 hops.

The technique in the presence of D.I. needs approximately 5 transmissions,that is obvious when the distance between the publisher and the subscriber isof 5 hops, no matter of the density of nodes in the network.

The D.I. is very useful especially in case of a high density of nodes (M = 10),because in this scenario it needs 5 transmissions, while flooding needs 40 andgossip 33. In these assumptions, supposing that after the request of data bythe subscribe packet it follows a flux of publish packets, the use of D.I. is verysuitable and much cheaper in energy terms.On the other hand, in a mobilescenario, where the D.I. should be continuously updated, it can be useful touse the O1T also to forward publish packets, without using any D.I. .

In the next subsections it simulates the behavior of the technique withD.I. in presence of mobility, in subsection 5.4.1, and in presence of a sleepingbehavior of the node, in subsection 5.4.2. It is underlined when the D.I. arenot useful for the forwarding, because the use of them becomes too expensive.

5.4.1 Simulation with mobility of the nodes

In subsection 4.5.2 it analyzes the problem of the mobility of the nodes, thatcan affect the reliability of the forwarding. In this section, in order to find

Page 96: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

84 Simulation

5 6 7 8 9 10 0

5

10

15

20

25

30

35

40

45

M = number of nodes in a RoT

RA

W/T

FloodingGossip, P

F=0.7

O1TForwarding withDeterministic Information

Figure 5.10: Number of transmissions performed by techniques in the absenceand in the presence of D.I., in function of the density of the network, for adistance between publisher and subscriber of Nhops = 5.

when it is useful to use D.I. and when not to, because of the mobility thatmakes the D.I. out of date, it is simulated a deterministic forwarding in thescenario of the previous section 5.3 and it is depicted in the graphs the numberof publish packets that successfully reach the subscriber before the transmissionis stopped.

The probability of collision (1−Pnc) does not affect these graphs, because,even if it can stop the forwarding of one publish packet, that will be lost by thesubscriber, the following packets are forwarded correctly, without any changeof the D.I. spread in the network.

The only event that can stop the forwarding of the publish packets, in thehypothesis of this subsection, is the movement of one node. It is supposedthat the only mobile node is the subscriber, for reasons already explained insubsection 4.5.2, and the probability that the subscriber moves between thereception of two consecutive publish packets is Pmove. Two mobility behaviorsare considered in this simulation:

Page 97: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

5.4 Techniques in presence of D.I.: comparison in aPublish/Subscribe scenario 85

• the subscriber changes its position but it moves quite slowly, in terms ofRRoT, between the arrivals of two consecutive publish packets: it remainsin its position with probability 1 − Pmove and it changes its positionassuming a random position inside a circle of radius Rmove = RRoTwith probability Pmove (for random position it is assumed a positionuniformly distributed in the circle). The maximum distance it is able tocover between two arrivals is d = RRoT;

• the subscriber changes its position and it moves faster, in terms of RRoT:it remains in its position with probability 1 − Pmove and it changes itsposition assuming a random position inside a circle of radius Rmove =2 · RRoT with probability Pmove (for random position it is assumed aposition uniformly distributed in the circle). The maximum distance it isable to cover between two arrivals is d = 2 ·RRoT.

The first case is depicted in Fig. 5.11, with Rmove = RRoT, for the twodensities M = 5 and M = 10. In the graph is printed the number of consecutivesuccessful transmissions from the publisher to the subscribers, in function ofPmove. It is proposed also the result with the use of Fast Recovery, an optionof the technique with D.I. introduced in section 3.2, that allows in some casesto go on with the deterministic forwarding without updating the D.I., after thesubscriber has moved.

The second case is depicted in Fig. 5.12, with Rmove = 2 ·RRoT, with thesame axes as in Fig. 5.11.

Looking at the graphs, it seems not reasonable that the number of con-secutive successful transmissions goes to infinity while Pmove → 0. This istrue, because if there is no mobility, there is nothing that can stop the publishpackets, so the communication can theoretically go on forever. Indeed the Pnc

can stop one publish packet, but then the communication can go on withoutupdating the D.I. .

Knowing the average behavior of the subscriber ( the value of its Pmove),it is possible to evaluate the average number of consecutive publish packetsdelivered, before it is necessary to update the D.I. . It is possible to evaluate if itis convenient or not to use the D.I. : e.g. if M = 5, in absence of Fast Recovery,for Pmove = 0.5 and Rmove = RRoT, the average number of consecutivepublish packets is less than 3, so the updating of the D.I. becomes too expensiveand it is convenient to use O1T also to the forward publish packets.

Page 98: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

86 Simulation

0 0.1 0.2 0.3 0.4 0.50

5

10

15

20

25

30

35

40

45

50

Pmove

Ntr

ansm

issi

on

D.I., M=5D.I, M=10D.I, M=5, with Fast RecoveryD.I, M=10, with Fast Recovery

Figure 5.11: Number of consecutive successful transmissions from the publisherto the subscriber before the first update of the D.I., with and without FastRecovery, for M = 5 and M = 10, for Rmove = RRoT, in function of Pmove.

5.4.2 Simulation with sleeping behavior of the nodes

The sleeping behavior of the nodes is another facet that can stop the forwardingof the publish packet, as presented in subsection 4.5.1. As well as a movement ofthe subscriber, if a node of the path falls asleep the communication is stopped.After the subscriber has lost two publish packets, it should start again with asubscribe packet and the spread of updated D.I. .

It is supposed as in subsection 4.5.1 that the sleeping period starts ran-domly: every node in the path starts a sleeping period with probability Psleepin the time between the arrival of two consecutive publish packets, indepen-dently from the past and from the neighbor nodes’ behavior.

In Fig. 5.13 it depicts the number of consecutive successful transmissionsfrom the publisher to the subscriber, in function of Psleep, for two values of thedensity: M = 5 and M = 10. Also in this graph, the number of consecutivesuccessful transmissions goes to infinity while Psleep → 0, for the same reasonalready explained in subsection 5.4.1.

Page 99: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

5.4 Techniques in presence of D.I.: comparison in aPublish/Subscribe scenario 87

0 0.1 0.2 0.3 0.4 0.50

5

10

15

20

25

30

35

40

45

50

Pmove

Ntr

ansm

issi

on

D.I., M=5D.I., M=10D.I., M=5, with Fast RecoveryD.I., M=10, with Fast Recovery

Figure 5.12: Number of consecutive successful transmissions from the publisherto the subscriber before the first update of the D.I., with and without FastRecovery, for M = 5 and M = 10, for Rmove = 2 · RRoT, in function ofPmove.

From Fig. 5.13 it shows that the number of consecutive successful publishpackets for Psleep > 0.1 is lower than 4, so the use of D.I. is not suitable for thisscenario. It is necessary to modify the sleeping behavior of the nodes, or if it isnot possible it is better to use the O1T technique also to forward the publishpackets, because the continuous updating of the D.I. becomes too expensive.On the other hand, for a value of Psleep < 0.012 for M = 10 or Psleep < 0.008for M = 5 the number of successful consecutive publish packets explodes: inthis scenario the use of D.I. gives a great advantage in terms of reliability andlow energy consumption compared to the forwarding technique in the absenceof D.I. .

Page 100: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

88 Simulation

0 0.1 0.2 0.3 0.4 0.50

5

10

15

20

25

30

35

40

45

50

Psleep

Ntr

ansm

issi

on

M=5M=10

Figure 5.13: Number of consecutive successful transmissions from the publisherto the subscriber before the first update of the D.I., for M = 5 and M = 10, infunction of Psleep.

Page 101: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

Chapter 6

Conclusion

During the last years wireless technology has entered into the everyday life withnew services and applications. The goal is to introduce a completely new kindof application, based on very cheap devices that are able to collect informationfrom the environment as well as from a singular person. This information isexchanged through a Wireless Sensor Network (WSN), a new kind of networkmade to work with very low energy consumption. The network should alsotake into account the possibility of frequent node failures and changing in thetopology.

There is a need for a new MAC, network and upper layers’ solutions forWSN and this is the task of an international project like e-Sense which is thestarting point of this work.

This thesis proposes the development of a first forwarding technique suit-able to work with very simple devices and with very strict energy constraints,without any geographical or deterministic information (D.I.) and without theknowledge of the destination node. The forwarding is content-based and it usesthe cross-layer information available at every node to reduce the number oftransmissions and the energy consumption. It is optimized to work in a Pub-lish/Subscribe scenario like the one described in [20], but it can be adapted toa more general scenario without geographical information and without strictenergy constraints.

The technique is analyzed and simulated: it figures out that it performsmuch better than flooding, gossip [35] and Fireworks [23], in the hypothesisconsidered. It has a lower reliability or a lower probability of reaching the

Page 102: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

90 Conclusion

destination node, but not significantly lower. On the other hand it performsa very lower number of transmissions, after the same number of hops, so ithas a significant lower energy consumption. The efficiency of the technique,calculated as the number of nodes reached by the packet divided by the numberof transmissions performed, is about double compared to other techniques. Theefficiency is also directly proportional to the density of the network.

Also a second forwarding technique is developed, which uses the D.I. interms of hop count (HC) from the source node and HC to the destinationnode. This information allows the use of a semi-deterministic path, which isvery efficient in this particular kind of networks, as analyzed and simulated.

Also found out, in function of some parameters describing the mobility ofthe network, when it is better to use the D.I. and when it is better not touse them. In absence of D.I. the technique is less efficient but not affected bytopology changes.

Future work on this topic should should use a more realistic MAC modeland a realistic indoor PHY layer for the analysis. In [33] it is presented theMAC protocol IEEE 802.15.4 with an energy model, that is a key point inevaluating the performances of the technique.

The two techniques proposed could be improved with the use of some ofthe options suggested in this work and it should be implemented in a realisticsimulation environment to understand which of the options are suitable for thespecific scenario.

Moreover, the forwarding techniques presented in this paper should be com-pared with techniques aware of geographical information. The comparisonshould be in energy terms, based on a realistic energy model, and in relia-bility terms. Then it is possible to derive more accurate conclusions and to finda suitable compromise depending on the network constraints.

Finally, the technique should be integrated in a complete scheme, from PHYto the application layer, with a particular attention to the security aspect.

The goal is to find a good solution that allows the use of the AmbientIntelligence with low energy, low cost and protected by external attacks. Thecontinuous progress will drive a technological and economical improvement, butthe hope is that it will also mean an actual human advancement.

Page 103: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

Appendix A

Departures’ process

In chapter 4 it is supposed that the generation of packets at every node followsa Poisson process. If it is reasonable that the process of packets’ arrivals at anode is a good approximation of a Poisson process, because the packets comefrom many (in average M) neighbors node, so an arrival time is very random,on the other hand the process of departures from a node is not simply thearrivals’ process sampled and delayed. A node decides to retransmit some ofthe packet received (sampling), after a random delay, according to the algorithmin the formula (2.2). In this context the delay of every packet is considered anindependent and random variable with uniform distribution, in order to simplifythe more general case.

In other words, to prove that the departures’ process from a node is stillPoisson distributed, it is necessary to demonstrate that, if P1 is a Poissonprocess:

1. process P2, obtained from P1 randomly sampling its events with proba-bility q, is a Poisson process;

2. process P2, obtained from P1 adding at every arrival time a random vari-able with uniform distribution u1 ∈ (0, c], is a Poisson process.

The first item to demonstrate asserts that a Poisson process P1 with para-meter λ is sampled with probability q, so an event of the process P1 is also anevent of process P2 with probability q, while with probability 1− q it is not.

As defined in [30], a Poisson process of intensity λ > 0 is an integer valuedstochastic process {X(t); t > 0} for which:

Page 104: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

92 Departures’ process

(i) for any time points t0 < t1 < t2 < · · · < tn the process increments

X(t1)−X(t0), X(t2)−X(t− 1), . . . , X(tn)−X(tn−1) (A.1)

are independent random variables, where X(t) is the number of arrivalsin the interval (0, t];

(ii) for s ≥ 0 and s > 0 the random variable X(t + s)−X(s) has the Poissondistribution:

Pr [X(s + t)−X(s) = k] =(λt)ke−λt

k!(A.2)

(iii) X(0) = 0 .

While it is possible to assume (iii) defining the process, (i) and (ii) aresufficient condition to prove that a process P2 is Poisson. From this pointonwards, the notation X(s+t)−X(s) adopted in [30] is changed in Ni((s, s+t]),to indicate the number of events in the interval (s, s + t] of the process Pi.

A.1 Demonstration: a sampled Poisson process is

still Poisson

In order to prove that a sampled Poisson process is still Poisson, it is necessaryto prove that (A.2) is still true for a sampled Poisson process. It is reasonableto assume that the intervals of the sampled process are independent: given twodistinct intervals of process P2, they come from two corresponding intervals inP1 that are distinct and independent for the hypothesis.

The number of events in the interval (s, s + t] of P2, named N2((s, s + t]),has distribution:

Pr [N2((s, s + t]) = k] == Pr [N2((s, s + t]) = k|N1((s, s + t]) = i] · Pr [N1((s, s + t]) = i] =

=∑+∞

i=k

(ik

)qk(1− q)i−k (λt)ie−λt

i! = (λtq)ke−λtq

k!

(A.3)

and this proves that the sampled process P2 is a Poisson process of intensityλq.

Page 105: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

A.2 Demonstration: a Poisson process delayed by a variableuniformly distributed is still Poisson 93

A.2 Demonstration: a Poisson process delayed by a

variable uniformly distributed is still Poisson

It is now necessary to prove that a process P2, obtained from a Poisson processP1 adding at every event of the process a random variable with uniform dis-tribution u1 ∈ (0, c], is still a Poisson process, so it verifies (i) and (ii) in thedefinition of a Poisson process of above.

A.2.1 Demonstration part (ii)

Considering the interval (s, s+ t]2, where subscript 2 indicates that the intervalis referred to process P2, the events in (s, s+ t]2 are the events from the interval(s− c, s+ t]1, at which is added the uniform variable u1 ∈ (0, c]. It is necessaryto distinguish two cases:

t > c . In this case, the events in P1 should be divided in three intervals, asseen in Fig. A.1:

• (s− c, s]1;

• (s, s + (t− c)]1;

• (s + (t− c), s + t]1.

P

P

1

2

ss - c s+ ( t - c ) s + t

s s + t

Figure A.1: Intervals of the Poisson process P1 and P2, in the first case.

The events inside the interval (s, s + (t − c)]1 are also events inside theinterval (s, s+ t]2 with probability Pr = 1, so they contribute to the number ofevents in (s, s+t]2 with a Poisson variable of intensity λ(t−c) and distribution:

p1(k) =(λ(t− c))ke−λ(t−c)

k!(A.4)

Page 106: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

94 Departures’ process

The events inside the interval (s − c, s]1 are also events inside the interval(s, s+t]2 with finite probability Pr = q. In order to calculate this probability q,conditioning in the number of events inside (s− c, s]1, the events are uniformlydistributed inside the interval, so every event can be considered as a variableu2 ∈ (s − c, s], or with a simple time translation u2 ∈ (0, c]. The probabilitythat one event of (s− c, s]1 falls inside the interval (s, s + t]2 becomes simply:

Pr[u1 + u2 > c] =∫ c0 Pr[u1 + u2 > c|u1 = h] · fu1(h)dh =

=∫ c0 Pr[u2 > c− h] · 1

c dh == 1

2

(A.5)

where the probability density function is fu1(h) = 1c in (0, c] and fu1(h) = 0

elsewhere, definition of uniform distributed variable. The independence of thetwo variables u1 and u2 is also used.

The events in the interval (s−c, s]1 (represented with a Poisson variable withparameter λc) fall inside (s, s + t]2 with probability Pr = 1

2 , that is equivalentto say that they are sampled with probability Pr = 1

2 . As seen in (A.3), theprocess sampled is still Poisson, so the events in (s − c, s]1 contribute to thenumber of events in (s, s + t]2 with a Poisson variable of intensity λ1

2c.The events in the interval (s + (t − c), s + t]1 behave in the same way, so

they contribute to the number of events in (s, s + t]2 with a Poisson variable ofparameter λ1

2c.Finally, the total number of events in (s, s+ t]2 is given by the sum of three

Poisson variables. They are independent because they come from different(and independent) intervals of the process P1. The sum of independent Poissonvariables is still Poisson [30], with intensity µ given by the sum of the intensities:

µ = λ(t− c) + λ12c + λ

12c = λt (A.6)

This proves the (ii) assertion of the Poisson process definition. Before provingthe (i) assertion, in the next paragraph it considers the second case.

t < c . Also in this case, all the events in (s, s + t]2 come from the interval(s − c, s + t]1 and it is necessary to calculate the probability Π that an eventfrom (s−c, s+t]1 falls inside the interval (s, s+t]2. Conditioning on the numberof events in (s− c, s+ t]1, these events are distributed uniformly, so every event

Page 107: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

A.2 Demonstration: a Poisson process delayed by a variableuniformly distributed is still Poisson 95

in the interval can be represented as a uniform variable u2 ∈ (0, t + c]. Theprobability Π is derived from Fig. A.2 and expressed as:

Π = Pr[u1 + u2 ∈ (c, c + t]

](A.7)

P

P

1

2

ss - c s + t

s s + t

Figure A.2: Intervals of the Poisson process P1 and P2, in the second case.

Firstly, it is possible to calculate the probability density function of thevariable u1 + u2, that is the convolution of the probability density functionsof u1 and u2 [36]. It can be simply calculated graphically as in [37], and theprobability density function becomes:

fu1+u2(h) =

hc(t+c) if h ∈ [0, c]1

t+c if h ∈ (c, t + c]− 1

c(t+c)h + 2c+tc(t+c) if h ∈ (t + c, t + 2c]

0 elsewhere

(A.8)

Looking at (A.7) the interval of interest is u1 + u2 ∈ (c, c + t], and from(A.8) the variable is uniformly distributed, as expected. The probability thatan event in (s−c, s+t]1 falls in (s, s+t]2 is calculated integrating the probabilitydensity function in the interval:

Pr[u1 + u2 ∈ (c, c + t]

]=

∫ c+t

cfu1+u2(h) =

t

t + c(A.9)

At this point, the events in (s−c, s+t]1 are simply sampled with probabilitygiven by (A.9), so using (A.3) the number of events in (s, s + t]2 is given againby a Poisson variable with distribution:

p2(k) =

(λ(t)

)ke−λ(t)

k!(A.10)

as expected, and this proves (ii) also for t < c.

Page 108: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

96 Departures’ process

A.2.2 Demonstration part (i)

Given two distinct intervals in process P2, named ∆A2 and ∆B2, the demon-stration of the independence is obvious if they are divided by an interval r oflength r > c. In this case, the events of ∆A2 come from an interval ∆A1 of P1

and the events of ∆B2 from ∆B1, but ∆A1 and ∆B1 are distinct for hypothesisand so independent: it comes necessarily that ∆A2 and ∆B2 are independent.

The only case of interest, in which it is necessary to demonstrate the inde-pendence of the number of events in ∆A2 and ∆B2 is when the two intervalsare divided by an interval r < c. In this case there is an interval in P1 the eventof which can fall in ∆A2 or in ∆B2: it is not obvious that the number of eventsin ∆A2 is statistically independent from the number of events in ∆B2 also inthis case.

The general case for which it is demonstrated the independence is repre-sented in Fig. A.3.

P

P

1

2

s - c s+ t - ( c - r )s + t

s s + t s + t + r

( s + t + r ) + q

( s + t + r ) + q

Figure A.3: Intervals of the Poisson process P1 and P2, in the demonstrationof the independence.

The two intervals in P2 considered are ∆A2 = (s, s+ t]2 and ∆B2 =(s+ t+r, s + t + r + q]2, so the distance between the two intervals is r ∈ (0, c], becauseif r > c the demonstration becomes obvious, as explained above. The lengthsof the two intervals are L(∆A2) = t > 0 and L(∆B2) = q > 0. The intervalof interest, the events of which can fall in ∆A2 or in ∆B2 or in the intervalbetween the two ((s + t, s + t + r]2), is ∆I1 = (s + t− (c− r), s + t]1.

In the same way as in the previous demonstrations, conditioning on thenumber of nodes in the interval ∆I1, the events are uniformly distributed insidethe interval. The probability that one event in ∆I1 falls in an interval in P2

are:

Page 109: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

A.2 Demonstration: a Poisson process delayed by a variableuniformly distributed is still Poisson 97

• p1 that it falls inside (s, s + t]2;

• p2 that it falls inside (s + t, s + t + r]2;

• p3 that it falls inside (s + t + r, s + t + r + q]2;

• 0 that is falls elsewhere.

It means that p1 + p2 + p3 = 1.The notation M2((s, s + t]) represents the number of events in the interval

∆A2 = (s, s + t]2 that comes from the interval ∆I1 = (s + t + r − c, s + t]1.In order to demonstrate the independence of the two intervals ∆A2 and ∆B2

it is sufficient to prove the probability to have n events from ∆I1 that fallinside ∆A2 does not depend on the probability to have m events from ∆I1 thatfall inside ∆B2 and l events that fall in the region between ∆A2 and ∆B2,(s + t, s + t + r]2. In mathematical terms, it is necessary to demonstrate that:

Pr{

M2((s, s + t]) = n , M2((s + t, s + t + r])+

+ M2((s + t + r, s + t + r + q]) = l + m}

=

= Pr {M2((s, s + t]) = n} ·· Pr {M2((s + t, s + t + r + q]) = l + m}

(A.11)

Making some calculation in the same way as above:

Pr{

M2((s, s + t]) = n , M2((s + t, s + t + r])+

+ M2((s + t + r, s + t + r + q]) = l + m}

=

= Pr {N1((s + t− (c− r), s + t]) = m + n + l} ·· Pr {M2((s + t, s])) = m|N1((s + t− (c− r), s + t]) = m + n + l} =

= (λc)l+m+ne−λc(l+m+n)

(l+m+n)! · (m+n+ln

)pn1 (1− p1)l+m =

= (p1λc)ne−λcp1

n! · [(p2+p3)λc]m+le−λc(p2+p3)

(l+m)!

(A.12)and this proves also the independence of two general intervals in the processP2, so it is possible to assert that the process P2 is a Poisson process.

In this appendix it is demonstrated that if a Poisson process is randomlysampled and if an independent uniform distributed variable is added to everytime points of the process, the resulting process is still Poisson.

Page 110: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

98 Departures’ process

Page 111: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

List of Figures

1.1 WPAN standards, [10] . . . . . . . . . . . . . . . . . . . . . . . . 4

1.2 Architectural model of the Publish/Subscribe interaction, [10] . . 6

2.1 Example showing the Region Of Transmission of the nodes andthe logic of the O1T technique. . . . . . . . . . . . . . . . . . . . 13

2.2 Example of a transmission from node A1 to node C1. . . . . . . . 16

2.3 Example showing the behavior of O1T technique. . . . . . . . . . 19

3.1 Example of the use of the parameter N1TXhops to perform a more

efficient transmission. . . . . . . . . . . . . . . . . . . . . . . . . 31

3.2 Example of the forwarding of a subscribe packet (solid arrow)and of publish packets (dashed arrow). . . . . . . . . . . . . . . . 33

4.1 Poisson distribution of nodes with M = 8; the circle delimits thearea of a RoT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

4.2 Pnc for a node, for different values of M, in function of the totaltraffic in a RoT (BRoT ) . . . . . . . . . . . . . . . . . . . . . . . 41

4.3 Example of the regions α′, β′, γ′; the circles delimits the RoT;the transmission is from A to B and from B to C. . . . . . . . . 42

4.4 Parameters used to calculate the average value of β′ at the firsthop. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

4.5 Number of nodes aware of the packet after one hop, in functionof BRot for different values of M ∈ [2, 9] . . . . . . . . . . . . . . 47

4.6 Number of nodes aware of the packet NAW after 5 hops usingthe three techniques analyzed. . . . . . . . . . . . . . . . . . . . . 54

Page 112: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

100 LIST OF FIGURES

4.7 Number of nodes aware of the packet NAW divided by the num-ber of transmissions, after 5 hops, using the three techniquesanalyzed. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

4.8 Number of nodes aware of the packet NAW divided by the num-ber of transmissions, after 5 hops, for Pnc = 0.6 and Pnc = 1. . . 57

4.9 Average distance of nodes reached in Nhops (in the x-axis) fromthe source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

5.1 Number of nodes aware of the packet NAW after 5 hops usingthe four techniques simulated. . . . . . . . . . . . . . . . . . . . . 72

5.2 Number of nodes aware of the packet NAW divided by the num-ber of transmissions, after 5 hops, using the four techniques sim-ulated. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73

5.3 Probability of reaching the publisher in function of the numberof hops, M = 5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74

5.4 Probability of reaching the publisher in function of the numberof hops, M = 10. . . . . . . . . . . . . . . . . . . . . . . . . . . . 75

5.5 Probability of reaching the publisher in function of the numberof hops, with M = 5, in the hypothesis that the neighbors of thepublisher are aware of the publisher interest. . . . . . . . . . . . 77

5.6 Probability of reaching the publisher in function of the numberof hops, with M = 10, in the hypothesis that the neighbors ofthe publisher are aware of the publisher interest. . . . . . . . . . 78

5.7 Probability of reaching the publisher in function of the numberof hops, with M = [5, 10], in the hypothesis that the neighborsof the publisher are aware of the publisher interest, with edgeeffects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79

5.8 Probability of reaching the publisher in function of the numberof hops, with M = [5, 10], in the same scenario of Fig. 5.7, withthe option of Ptransm2

. . . . . . . . . . . . . . . . . . . . . . . . 81

5.9 Probability of reaching the publisher in function of the numberof hops, with M = [5, 10], in the same scenario of Fig. 5.7, withthe option of the knowledge of the 2 hops neighbors. . . . . . . . 82

Page 113: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

LIST OF FIGURES 101

5.10 Number of transmissions performed by techniques in the ab-sence and in the presence of D.I., in function of the density ofthe network, for a distance between publisher and subscriber ofNhops = 5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84

5.11 Number of consecutive successful transmissions from the pub-lisher to the subscriber before the first update of the D.I., withand without Fast Recovery, for M = 5 and M = 10, for Rmove =RRoT, in function of Pmove. . . . . . . . . . . . . . . . . . . . . 86

5.12 Number of consecutive successful transmissions from the pub-lisher to the subscriber before the first update of the D.I., withand without Fast Recovery, for M = 5 and M = 10, for Rmove =2 ·RRoT, in function of Pmove. . . . . . . . . . . . . . . . . . . . 87

5.13 Number of consecutive successful transmissions from the pub-lisher to the subscriber before the first update of the D.I., forM = 5 and M = 10, in function of Psleep. . . . . . . . . . . . . . 88

A.1 Intervals of the Poisson process P1 and P2, in the first case. . . . 93A.2 Intervals of the Poisson process P1 and P2, in the second case. . . 95A.3 Intervals of the Poisson process P1 and P2, in the demonstration

of the independence. . . . . . . . . . . . . . . . . . . . . . . . . . 96

Page 114: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

102 LIST OF FIGURES

Page 115: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

Ringraziamenti

Vicino al traguardo della laurea, il risultato tanto atteso si rivela un punto di partenza:sono appagato di arrivare alla fine di un percorso, impegnativo e ricco di soddisfazionie nel contempo impaziente di percorrere le strade che mi si aprono di fronte in questomomento. Voglio ringraziare chi mi ha aiutato ad arrivare fin qui.

Ringrazio il prof. Zorzi, Zach e Carlos, che mi hanno seguito nell’attivita di ricerca.Tutto il CWC, Ikram, Kaveh, Leo, Alberto, per i loro suggerimenti ed i tanti caffe! Imiei amici dell’universita patavina, Teo, Ricky, Silvia, Manuel ed Elena.

Mamma, papa, grazie per il sostegno che mi avete dato ogni giorno, grazie per ladisponibilita e l’aiuto nelle scelte difficili, grazie per i suggerimenti e per avermi lasciatoi miei spazi. Laura, grazie per i piccoli litigi, che mi hanno aiutato a crescere, e peressermi stata vicina sempre, a casa come nella mia esperienza finlandese.

Un caloroso ringraziamento a chi ha condiviso con me questi splendidi sei mesi dipermanenza ad Oulu, Marco ed Ema per le tante sere passate assieme, Kati, Gaia eBoris per i consigli e la comprensione, Laura, Tara per il prezioso aiuto nell’Inglese,Alex per avermi sopportato, Mauro, un valido collega ma soprattutto un grande amico,e tutti gli amici di Tellervontie!

Un grazie agli amici di sempre: Elena, sei semplicemente insostituibile, Luca eRenzo, in attesa del prossimo viaggio in Russia, Nicola, ti ringrazio per i tuoi ringra-ziamenti, Giandomenico, Caterina e Luciana, tre professori che mi hanno dato tantis-simo. Grazie! Amici del collegio Santa Giustina, cito solo Massimo, Nicola e Pol, maringrazio davvero tutti per questi cinque anni di collegio. Grazie a Peg, il mio migliorcompagno di stanza. Un ringraziamento particolare a Renato, per la sua disponibilitaad aiutarmi nelle mie scelte.

Dani, e impossibile ringraziarti per quello che rappresenti per me in un paio dirighe. Grazie per avermi spiegato che i pinguini preferiscono l’emisfero australe, grazieper avermi accompagnato fin qui, lungo tutto lo svolgimento di questa tesi, per esserequi con me alla mia discussione, e per tutto quello che sara.Grazie di essere come sei!

. Giorgio

Page 116: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

104 Ringraziamenti

Page 117: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

Acknowledgements

I’m close to the goal of my degree, a conclusion so desired that becomes a startingpoint: I’m happy to arrive to the end of such a hard and rewarding path, but at thesame moment I’m impatient to start the new paths that are disclosing in this moment.I want first of all to thank all the people that have helped me till now.

I thank prof.Zorzi, Zach and Carlos, that have helped me in my research work. AllCWC, Ikram, Kaveh, Leo, Alberto, for their suggestions and for the many coffes. Myfriends from university, Teo, Ricky, Silvia, Manuel ed Elena.

Mum, dad, thank you so much for the every day support, thanks for the helpfulnessin my difficult choices, thanks for the suggestions and thanks to have left me my spaces.Laura, thank you for the small quarrels, that have helped me to grow up, thanks tohave been always close to me, at home as well as in my Finnish experience.

A very big thank you to the people that have shared with me the wonderful days inOulu, Marco and Ema for the so many evenings together, Kati, Gaia and Boris for theadvices and the sympathy, Laura, Tara for the precious help with the English, Alex tohave stood me, Mauro, a valid colleague but mainly a great friend, and all the friendsfrom Tellervontie.

A special thanks to the friends of everyday life: Elena, simply unreplaceable, Lucaand Renzo, waiting for next travel in Russia, Nicola, thank you for the your acknowl-edgements, Giandomenico, Caterina and Luciana, three professors that have given mea lot. Thank you! Friends of my college of Santa Giustina, I cite only Massimo, Nicolaand Pol, but I really thank you all for these five years in the college. Thanks to Peg,my favorite roommate. A special thanks to Renato, for his helpfulness in my choices.

Dani, it is impossible to thank you in just a few rows for what you are for me.Thank you to have explained me that penguins prefer the southern hemisphere, thankyou to have accompanied me till now in my thesis work, thank you to be with me thedate of my degree, and thank you for all that will be.Thank you to be as you are!

. Giorgio

Page 118: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

106 Acknowledgements

Page 119: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

Bibliography

[1] E. Callaway, P. Gorday, L. Hester, J. Gutierrez, M. Naeve, B. Heile, and V. Bahl,“Home networking with IEEE 802.15.4: a developing standard for low-rate wire-less personal area networks,” Communications Magazine, IEEE, vol. 40, no. 8,pp. 70–77, Aug. 2002.

[2] I. Howitt and J. Gutierrez, “IEEE 802.15.4 low rate - wireless personal areanetwork coexistence issues,” in Wireless Communications and Networking, 2003.WCNC 2003. 2003 IEEE, vol. 3, 16-20 March 2003, pp. 1481–1486.

[3] J. Zheng and M. Lee, “Will ieee 802.15.4 make ubiquitous networking a reality?:a discussion on a potential low power, low bit rate standard,” CommunicationsMagazine, IEEE, vol. 42, no. 6, pp. 140–146, June 2004.

[4] WP2, “Early reference model,” in e-SENSE Capturing Ambient Intelligence forMobile Communications through Wireless Sensor Networks, 2006, deliverable re-port D2.1.1.

[5] A. Perrig, J. Stankovic, and D. Wagner, “Security in wireless sensor networks,”Communication of the ACM, vol. 47, No. 6, June 2004.

[6] J. Walters, Z. Liang, W. Shi, and V. Chaudhary, Security in Distributed, Grid,and Pervasive Computing (Chapter 17: Wireless Sensor Network Security: ASurvey), C. Press, Ed. Auerbach Publications, 2006.

[7] N. Sastry and D. Wagner, “Security considerations for ieee 802.15.4 networks,” inWiSE’04, Philadelphia, Pennsylvania, USA., 2004.

[8] WP1, “Scenarios, Requirements and Socio-Economic Impact,” in e-SENSE Cap-turing Ambient Intelligence for Mobile Communications through Wireless SensorNetworks, 2006, deliverable report D1.2.1.

[9] J. Gutierrez, M. Naeve, E. Callaway, M. Bourgeois, V. Mitter, and B. Heile,“IEEE 802.15.4: a developing standard for low-power low-cost wireless personalarea networks,” Network, IEEE, vol. 15, no. 5, pp. 12–19, Sept.-Oct. 2001.

Page 120: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

108 BIBLIOGRAPHY

[10] M. Stramazzotti, “Cross-layer Analysis for Publish-Subscribe Forwarding,” Mas-ter’s thesis, University of Bologna, 2007.

[11] J. Al-Karaki and A. Kamal, “Routing techniques in wireless sensor networks: asurvey,” Wireless Communications, IEEE [see also IEEE Personal Communica-tions], vol. 11, no. 6, pp. 6–28, Dec. 2004.

[12] C. Intanagonwiwat, R. Govindan, D. Estrin, J. Heidemann, and F. Silva, “Di-rected Diffusion for Wireless Sensor Networking,” IEEE, Tech. Rep., 2003.

[13] D. Braginsky and D. Estrin, “Rumor Routing Algorithm for Sensor Networks,”October 2002, in the Proceedings of the First Workshop on Sensor Networks andApplications (WSNA).

[14] W. B. Heinzelman, A. P. Chandrakasan, and H. Balakrishnan, “An Application-Specific protocol architecture for wireless microsensor networks,” IEEE, Tech.Rep., 2002.

[15] S. Lindsey and C. S. Raghavendra, “PEGASIS: Power-Efficient Gathering inSensor Information Systems,” pp. 3–1125 – 3–1130, 2002. [Online]. Available:citeseer.ist.psu.edu/461251.html

[16] Y. Xu, J. Heidemann, and D. Estrin, “Geography-informed Energy Conservationfor Ad Hoc Routing,” 2001, in the Proocedings of the Seventh Annual ACM/IEEEInternational Conference on Mobile Computing and Networking.

[17] Y. Yu, R. Govindan, and D. Estrin, “Geographical and Energy Aware Routing: arecursive data dissemination protocol for wireless sensor networks,” UCLA Com-puter Science Department, Tech. Rep., May 2001.

[18] P. Costa and G. P. Picco, “Semi-probabilistic Content-Based Publish-Subscribe,”in Proceedings of the 25th IEEE International Conference on Distributed Comput-ing Systems (ICSCS’05), 2005.

[19] R. Baldoni and A. Virgillito, “Distributed Event Routing in Publish/SubscribeCommunication Systems: a Survey (revised version),” MIDLAB 1/2006 -Dipartimento di Informatica e Sistemistica , Universita di Roma la Sapienza,Tech. Rep., 2006. [Online]. Available: http://www.dis.uniroma1.it/ midlab

[20] P. Costa, G. Picco, and S. Rossetto, “Publish-subscribe on sensor networks: asemi-probabilistic approach,” in Mobile Adhoc and Sensor Systems Conference,2005. IEEE International Conference on, 7-10 Nov. 2005, p. 10pp.

[21] P. Costa, M. Musolesi, C. Mascolo, and G. P. Picco, “Adaptive Content-basedRouting for Delay-tolerant Mobile Ad Hoc Networks,” Tech. Rep., 2006.

Page 121: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

BIBLIOGRAPHY 109

[22] Z. Haas, J. Halpern, and L. Li, “Gossip-based ad hoc routing,” in INFOCOM 2002.Twenty-First Annual Joint Conference of the IEEE Computer and Communica-tions Societies. Proceedings. IEEE, vol. 3, 23-27 June 2002, pp. 1707–1716vol.3.

[23] M. Mastrogiovanni, C. Petrioli, M. Rossi, A. Vitaletti, and M. Zorzi, “Wsn19-6:Integrated data delivery and interest dissemination techniques for wireless sensornetworks,” in Global Telecommunications Conference, 2006. GLOBECOM ’06.IEEE, Nov. 2006, pp. 1–6.

[24] M. Rossi, M. Zorzi, and R. Rao, “Cost efficient routing strategies over virtual co-ordinates for wireless sensor networks,” in Global Telecommunications Conference,2005. GLOBECOM ’05. IEEE, vol. 5, 28 Nov.-2 Dec. 2005, p. 6pp.

[25] M. Rossi, M. Zorzi, and R. R. Rao, “Statistically assisted routing algorithms(sara) for hop based forwarding in wireless sensor network.” Springer NetherlandsJournal : Wireless Network, 2006.

[26] M. Rossi and M. Zorzi, “Integrated cost-based mac and routing techniques forhop count forwarding in wireless sensor networks,” IEEE Transactions on MobileComputing, vol. 6, April 2007.

[27] P. Costa, G. P. Picco, and S. Rossetto, “Publish-Subscribe on Sensor Networks:A Semi-probabilistic Approach,” IEEE, Tech. Rep., November 2005.

[28] K. Viswanath and K. Obraczka, “Modeling the performance of flooding in wirelessmulti-hop ad hoc networks,” Computer Communications, vol. 29, pp. 949–956,2006.

[29] L. Wu and P. K. Varshney, “Performance Analysis of CSMA and BTMA Protocolsin Multihop Networks (I), Single Channel Case,” Information Sciences, vol. 120,no. 1-4, pp. 159–177, 1999. [Online]. Available: citeseer.ist.psu.edu/386051.html

[30] H. M. Taylor and S. Karlin, An Introduction to Stochastic Modeling, A. Press,Ed., 1998.

[31] S. Y. Ni, Y. C. Tseng, Y. S. Chen, and J. P. Sheu, “The Broadcast Storm Problemin a Mobile Ad Hoc Network,” in Proceedings of the fifth annual ACM/IEEEinternational conference on Mobile computing and networking, 1999, pp. 151–162.

[32] E-Sense, “Deliverable report 2.1.1 - 3.2.1,” 2006. [Online]. Available:http://www.ist-esense.org

[33] J. Haapola, Z. Shelby, C. Pomalaza-Raez, and P. Mahonen, “Multihop MediumAccess Control for WSNs: an Energy Analysis Model,” EURASIP Journal onWireless Communications and Networking, vol. 4, pp. 523–540, march 2005.

[34] E. Zhang, G. Neglia, J. Kurose, and D. Towsley, “Performance Modeling of Epi-demic Routing,” in Proc. of Networking, May 2006.

Page 122: CROSS-LAYER PUBLISH/SUBSCRIBE FORWARDING FOR LOW … · cross-layer publish/subscribe forwarding for low power and delay tolerant wireless sensor networks relatore prof. michele zorzi

110 BIBLIOGRAPHY

[35] Z. Haas, J. Halpern, and L. Li, “Gossip-based ad hoc routing,” Networking,IEEE/ACM Transactions on, vol. 14, no. 3, pp. 479–491, June 2006.

[36] G. Cariolaro and G. Pierobon, Teoria della Probabilita e dei processi Aleatori,P. Editore, Ed., 1979.

[37] G. Cariolaro, G. Pierobon, and G. Calvagno, Segnali e Sistemi, McGraw-Hill, Ed.Publishing Group Italia, 2003.