142
Design of Reliable Communication Solutions for Wireless Sensor Networks Managing Interference in Unlicensed Bands LUCA STABELLINI Licentiate Thesis in Radio Communication Systems Stockholm, Sweden 2009

Design of Reliable Communication Solutions for Wireless Sensor Networks

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Design of Reliable Communication Solutions for Wireless Sensor Networks

Design of Reliable

Communication Solutions for

Wireless Sensor Networks

Managing Interference in Unlicensed Bands

LUCA STABELLINI

Licentiate Thesis inRadio Communication Systems

Stockholm, Sweden 2009

Page 2: Design of Reliable Communication Solutions for Wireless Sensor Networks
Page 3: Design of Reliable Communication Solutions for Wireless Sensor Networks

Design of Reliable Communication Solutions for

Wireless Sensor Networks

Managing Interference in Unlicensed Bands

LUCA STABELLINI

Licentiate Thesis in

Radio Communication Systems

Stockholm, Sweden 2009

Page 4: Design of Reliable Communication Solutions for Wireless Sensor Networks

TRITA–ICT–COS–0901ISSN 1653–6347ISRN KTH/COS/R--09/01--SE

KTH Communication SystemsSE-100 44 Stockholm

SWEDEN

Akademisk avhandling som med tillstånd av Kungl Tekniska högskolan framläggestill offentlig granskning för avläggande av teknologie licentiatexamen i radiosys-temteknik fredagen den 15 May 2009 klockan 14.00 i sal C1, Electrum1, KungligaTekniska Högskolan, Isafjordsgatan 26, Kista.

© Luca Stabellini, May 2009

Tryck: Universitetsservice US AB

Page 5: Design of Reliable Communication Solutions for Wireless Sensor Networks

i

Abstract

Recent surveys conducted in the context of industrial automationhave outlined that reliability concerns represent today one of the majorbarriers to the diffusion of wireless communications for sensing and con-trol applications: this limits the potential of wireless sensor networksand slows down the adoption of this new technology. Overcoming theselimitations requires that awareness on the causes of unreliability andon the possible solutions to this problem is created. With this respect,the main factor responsible for the perceived unreliability is radio in-terference: low-power communications of sensor nodes are in fact verysensitive to bad channel conditions and can be easily corrupted by trans-missions of other co-located devices. In this thesis we investigate differ-ent techniques that can be exploited to avoid interference or mitigateits effects.

We first consider interference avoidance through dynamic spectrumaccess: more specifically we focus on the idea of channel surfing anddesign algorithms that allow sensor nodes to identify interfered chan-nels, discover their neighbors and maintain a connected topology inmulti-channel environments. Our investigation shows that detectingand thus avoiding interference is a feasible task that can be performedby complexity and power constrained devices. In the context of spec-trum sharing, we further consider the case of networked estimation andaim at quantifying the effects of intra-network interference, induced bycontention-based medium access, over the performance of an estimationsystem. We show that by choosing in an opportune manner their prob-ability of transmitting, sensors belonging to a networked control systemcan minimize the average distortion of state estimates.

In the second part of this thesis we focus on frequency hopping tech-niques and propose a new adaptive hopping algorithm. This implementsa new approach for frequency hopping: in particular rather than aim-ing at removing bad channels from the adopted hopset our algorithmuses all the available frequencies but with probabilities that depend onthe experienced channel conditions. Our performance evaluation showsthat this approach outperforms traditional frequency hopping schemesas well as the adaptive implementation included in the IEEE 802.15.1radio standard leading to a lower packet error rate.

Finally, we consider the problem of sensor networks reprogrammingand propose a way for engineering a coding solution based on fountaincodes and suitable for this challenging task. Using an original geneticapproach we optimize the degree distribution of the used codes so asto achieve both low overhead and low decoding complexity. We furtherengineer the implementation of fountain codes in order to allow the

Page 6: Design of Reliable Communication Solutions for Wireless Sensor Networks

ii

recovery of corrupted information through overhearing and improve theresilience of the considered reprogramming protocol to channel errors.

Page 7: Design of Reliable Communication Solutions for Wireless Sensor Networks

Acknowledgements

This has been so far an amazing journey and I’m quite pleased to admit that thelast two years and a half have both required from me and given to me more thanI expected. I would like to take this opportunity to thank some of the people thathave supported me during my studies. My sincere gratitude goes to my advisor,Prof. Jens Zander: beside always providing relevant comments that have greatlyimproved the quality of my work I want to thank you Jens for giving me theopportunity to undertake this challenging experience. I’m grateful to Prof. MikaelJohansson (Automatic Control Lab, KTH) and Prof. Andreas Kassler (ComputerScience Department, Karlstad University) respectively for reviewing my Licentiateproposal and accepting the role of opponent in my Licentiate thesis defense.

I also would like to thank Dr. Alexandre Proutiere (Microsoft Research) andProf. Riku Jäntti (TKK) for providing valuable feedback on draft versions of someof the papers included in this thesis. Many thanks to Michele Rossi, Ömer Ileri andMaben Rabi who have closely collaborated with me. I should not forget all the col-leagues and former colleagues at the radio communication department: Pietro Lun-garo, Johan Hultell, Bogdan Timus, Klas Johansson, Mats Blomgren, Ali Özyagciand Aurelian Bria just to mention some of them.

For computer support and administrative matters I am grateful to Irina Rad-ulescu, Niklas Olsson, Lise-Lotte Wahlberg, Ulla Eriksson and Robin Gehrke.

A huge thank to my father, my grandmother and my sister, for supporting mein all the choices I’ve made. Finally, last but not least, for her continuous capabilityof understanding me and tolerating my difficult mood and for the amazing effortshe made to put even the most difficult situation under the best perspective, I’mindebted to Elfrid.

iii

Page 8: Design of Reliable Communication Solutions for Wireless Sensor Networks

Contents

Acknowledgements iii

Contents iv

List of Tables vi

List of Figures vii

I 1

1 Introduction 3

1.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.2 “High Level“ Problem Formulation . . . . . . . . . . . . . . . . . . . 61.3 Overview of Thesis Contributions . . . . . . . . . . . . . . . . . . . . 101.4 Thesis Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

2 Interference Avoidance Through Dynamic Spectrum Access 15

2.1 Related Literature . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152.2 Energy Efficient Detection of Intermittent Interference in Wireless

Sensor Networks (Paper 1) . . . . . . . . . . . . . . . . . . . . . . . 172.3 Interference Aware Self-Organization for Wireless Sensor Networks:

a Reinforcement Learning Approach (Paper 2) . . . . . . . . . . . . 212.4 Energy Optimal Neighbor Discovery for Single Radio Single Channel

Wireless Sensor Networks (Paper 3) . . . . . . . . . . . . . . . . . . 24

3 An Example of Spectrum Sharing: the Case of Networked Esti-

mation 27

3.1 Related Literature . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273.2 Networked Estimation Under Contention-Based Medium Access (Pa-

per 4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

4 Utility Based Adaptive Frequency Hopping 31

iv

Page 9: Design of Reliable Communication Solutions for Wireless Sensor Networks

CONTENTS v

4.1 Related Literature . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314.2 Utility Based Adaptive Frequency Hopping (Paper 5) . . . . . . . . . 32

5 Energy and Complexity Aware Design of Fountain Codes for

Sensor Network Reprogramming 35

5.1 Background and Related Literature . . . . . . . . . . . . . . . . . . . 355.2 SYNAPSE: A Network Reprogramming Protocol for Wireless Sensor

Networks Using Fountain Codes (Paper 6) . . . . . . . . . . . . . . . 385.3 Seed Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

6 Conclusions 45

6.1 Concluding Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . 456.2 Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

Bibliography 47

II Paper Reprints 53

7 Energy Efficient Detection of Intermittent Interference in Wire-

less Sensor Networks 55

8 Interference Aware Self Organization for Wireless Sensor Net-

works: a Reinforcement Learning Approach 69

9 Energy Optimal Neighbor Discovery for Single-Channel Single

Radio Wireless Sensor Networks 77

10 Networked Estimation Under Contention Based Medium Access 85

11 Utility Based Adaptive Frequency Hopping 109

12 SYNAPSE, A Network Reprogramming Protocol for Wireless

Sensor Networks Using Fountain Codes 117

Page 10: Design of Reliable Communication Solutions for Wireless Sensor Networks

List of Tables

1.1 Barriers to the use of wireless industrial technologies. . . . . . . . . . . 7

5.1 Optimized Sparse Degree Distribution K = 128 . . . . . . . . . . . . . . 38

vi

Page 11: Design of Reliable Communication Solutions for Wireless Sensor Networks

List of Figures

1.1 Standards used for industrial sensing applications [11]. . . . . . . . . . . 41.2 Overview of the problem area. The shaded area identifies the three

techniques considered in this thesis. . . . . . . . . . . . . . . . . . . . . 10

2.1 Sketch of the two regions (continuous lines) C and I defined on ID.The two dashed lines define two iso-curves that correspond to PI(ψ) =PI(ψMax) and PI(ψ) = PI(ψTol). . . . . . . . . . . . . . . . . . . . . . . 18

2.2 Sketch of the channel sensing strategy used by our interference detectionscheme. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

2.3 Contour plot of PI = 0.95 over the interference domain (black line) andexperimentally estimated PI . . . . . . . . . . . . . . . . . . . . . . . . . 20

2.4 Average number of slots required in order to achieve a connected networkfor different kind of policies. . . . . . . . . . . . . . . . . . . . . . . . . . 23

2.5 Average energy cost for the optimal power and contention window se-lection policy. Different number of cones are considered. . . . . . . . . . 25

3.1 The estimation problem setup: the states of N identical plants are es-timated via samples transmitted over a shared channel. Samples couldbe delayed and potentially lost because of contention. . . . . . . . . . . 29

3.2 Sample loss rate in a fully synchronized system and periodic sampling.Slotted Aloha is used at the MAC layer. . . . . . . . . . . . . . . . . . . 29

3.3 Average estimation distortion Je as a function of the sampling period hfor an unstable system. Nodes are synchronized and use slotted Aloha. . 30

4.1 Packet Error Rate as a function of average received SNR. . . . . . . . . 33

5.1 Degree Distribution implemented in SYNAPSE . . . . . . . . . . . . . . 395.2 E[N ] for different seed sets. . . . . . . . . . . . . . . . . . . . . . . . . . 415.3 Data dissemination over multiple hops. . . . . . . . . . . . . . . . . . . . 425.4 E[N ] using seeds belonging to R∗ and R3 for K ′ = 36. Vertical bars

indicate 95% confidence intervals. . . . . . . . . . . . . . . . . . . . . . . 435.5 Recovery probability using seeds belonging to R∗ and R3 for K ′ = 36.

Vertical bars indicate 95% confidence intervals. . . . . . . . . . . . . . . 44

vii

Page 12: Design of Reliable Communication Solutions for Wireless Sensor Networks
Page 13: Design of Reliable Communication Solutions for Wireless Sensor Networks

Part I

1

Page 14: Design of Reliable Communication Solutions for Wireless Sensor Networks
Page 15: Design of Reliable Communication Solutions for Wireless Sensor Networks

Chapter 1

Introduction

1.1 Background

A wireless sensor network (WSN) is a network comprising at least two nodes thatintegrate sensing, communication and computing capabilities [1]. This kind ofnetwork stands out as a promising alternative to wired systems in a multitude ofapplication scenarios ranging from industrial and building automation to healthmonitoring and has been identified as one of the ten emerging technologies thatwill most affect the way we live and work in the next years [2]. The use of wirelesscommunications provides in fact several benefits with respect to traditional wiredsolutions and for instance allows for wiring and installation cost reduction of up to90% [3], [4].

Several market forecasts1 have recently considered the possible evolution of sen-sor network technologies and predicted for the next few years exponential growthsleading to a multi-billion dollar market2. These projections however appear ratheroptimistic as outlined by recent surveys conducted in the context of industrial au-tomation ( [6], [11]): while highlighting how this market has been constantly grow-ing during the last years these studies also remark that the adoption of wirelesstechnologies for sensing and control industrial applications is still moderate. Sucha limited penetration might depend on the lack of a “killer“ application capable ofboosting the development of sensor networks but also on the existence of concretebarriers that practically limit the potential of WSNs ( [5]). We can classify suchbarriers within the following categories:

1These include “On World Expert survey - WSN Market size in 2007“ and “Active RFIDand Sensor Networks 2007-2017“ published by IDTechEx. ON World predicts a total market forWSN industrial applications of 4.6B$ by 2011 and a slightly more pessimistic figure for the SmartBuilding scenario (2.5B$ by 2011). IDTechEx foresees a total market size for WSNs and activeRFID of about 4B$ by 2012. More figures are presented in [5].

2R&D investments alone are expected to grow from 522M$ in 2007 to 1.3B$ in 2012.havingas main drivers energy management in the US and the potential for health care applications inEU countries.

3

Page 16: Design of Reliable Communication Solutions for Wireless Sensor Networks

4 CHAPTER 1. INTRODUCTION

IEEE 802.15.1

Proprietary

ZigBee

IEEE 802.11x

Others

IEEE 802.15.4

Figure 1.1: Standards used for industrial sensing applications [11].

• Standardization Issues: a big standardization effort has been made dur-ing the last years as witnessed by the increasing proliferation of new stan-dards for sensing applications including for instance IEEE 802.15.4 [7], IEEE802.15.1 [8], 6loWPAN [9], Wireless HART [10], ISA SP-100 and ZigBee [12].Nevertheless the lack of standards and of a unifying set of specifications atthe radio and network level, is still perceived as one of the barriers for thelarge scale diffusion of sensor networks [11]. This problematic issue is howeverexpected to vanish in the near future: the low-power, low-rate IEEE 802.15.4radio standard and ZigBee, that according to a recent survey already representmore than 50% of the market (see Figure 1.1), are in fact steadily emergingas the prevalent choice for industrial and smart building applications.

• Technical Issues: the two main challenges in this context are energy man-

agement and communication reliability. We here briefly discuss these twoaspects.Energy Management: sensor nodes are typically battery powered and thisrepresents a drawback with respect to traditional wired systems. Batteriesneed to be periodically replaced. Such operation results in additional mainte-nance costs and for specific applications it might not be economically feasible:in these cases nodes might have to be treated as disposable devices and in or-der to avoid costly maintenance new sensors might have to be deployed oncethe existing ones run out of power. Replacing batteries might further rep-resent a non-trivial task for instance if nodes are operating in environmentspresenting harsh conditions (high temperature or pressure). In order to mit-

Page 17: Design of Reliable Communication Solutions for Wireless Sensor Networks

1.1. BACKGROUND 5

igate these problems two directions are currently investigated. On one sideconsiderable research effort aims at maximizing battery lifetime through en-ergy aware design of sensor’s hardware, protocols and applications. With thisrespect the use of wireless communications has been identified as the majorsource of energy consumption: optimizing the design and the usage of theradio unit of sensor motes is therefore a key issue that has to be addressed.On the other hand the design of devices with energy harvesting capabilitiesis investigated3.Communication Reliability: the potential unreliability of wireless commu-nications has been identified by recent surveys as one of the major barriers forthe diffusion of wireless technologies in the context of industrial automation4.Many concerns are due to the harsh nature of the wireless channel, wherefading induced by multipath propagation or scattering might lead to packetlosses: in this context we remark that the site where sensors are deployedmight be dictated by the requirements of the specific application and it mightnot be possible to optimize the deployment of a sensor network accountingfor propagation aspects. With this respect, self configuration capabilitiesmight be exploited by nodes to establish and maintain a connected networkeven in environments presenting adverse propagation characteristics.

Nowadays the main issue connected to reliability is however the interference

generated by other co-located wireless devices. In fact, low power communi-cations of sensor nodes are easily corrupted by transmissions of other wirelessterminals operating in their close proximity and on the same frequency band.We remark that this problem has been tremendously enhanced during thelast years due to the increasing proliferation of wireless devices that has ledto overcrowded scenarios in the few available unlicensed spectrum bands. Inthis context, examples of crowded spectrum can be easily identified for in-stance considering the 2.4 GHz ISM band and the problem of coexistenceamong the IEEE 802.15.4 sensor standard and other WLAN (IEEE 802.11b/g) or WPAN (IEEE 802.15.1) technologies that due to their higher trans-mission power, if co-located with IEEE 802.15.4-based sensor networks, canbasically annihilate their communication capabilities5.

3The potential of different sources of ambient energy has been recently investigated: theseinclude solar, eolic, thermal and vibrational energy (see for instance [13], [14]). Sensor nodeswith energy harvesting capabilities are today commercially available and manufactured by severalcompanies such as AmbioSystems, Crossbow and Enocean.

4Reliability was mentioned as a concern for the adoption of wireless sensing and control tech-nologies by 43% of the respondents in [6]. Additionally during a survey conducted by ON World in2005, 90% of respondents expressed their worries for the unreliability of wireless communications.

5In this context several experimental studies have been conducted in order to evaluate theactual performance degradation induced by interference over sensor communications. Authorsof [25] report that interference generated by WiFi terminals (IEEE 802.11b/g) can lead to apacket error rate of up to 58% in IEEE 802.15.4-based wireless sensor networks. A similar studyconducted by Crossbow ( [16]) outlined that co-located WiFi networks can increase of 15% packetlosses in ZigBee networks.

Page 18: Design of Reliable Communication Solutions for Wireless Sensor Networks

6 CHAPTER 1. INTRODUCTION

We remark that energy management and communication reliability are twoconnected issues. Unreliable communications lead to packet losses that willrequire retransmissions: this increases the usage of the radio unit and con-sequently increases the energy consumption of sensor nodes. Therefore, inorder to achieve the highest energy efficiency, the loss of packets induced byinterference has to be prevented.

• Cost Issues: as previously outlined the use of wireless technologies has thepotential to significantly reduce expenditures due to wiring that for severalsettings represent a large fraction of the total application cost. In many caseshowever the cost of wireless sensors (which is mainly given by the cost for thesensor itself, the physical packaging and the battery, while the radio unit hasbasically negligible impact) is still significantly higher than expected. Marketforecasts (see for instance [17]) predict that the cost for wireless nodes is goingto constantly decrease during the next 2-3 years and that by 2011 the cost ofa single node might vary between 50$ (for a simple lighting sensor) and 350$-700$ (for more complex industrial nodes). These figures are still significantlyhigher if compared to early optimistic estimates6 that were targeting a costper sensor in the order of 10$ by 2010.

• Other Consumer Concerns: these include a large variety of issues rang-ing from the difficulties for embracing a new technology, that might not besufficiently known or easy to use, to privacy and security concerns connectedto the fact that data that might be confidential are transmitted over an open

and potentially insecure medium such as the wireless channel.

As an example, Table 1.1 presents the barriers for the diffusion of industrial wirelesstechnologies identified during a recent survey [6].

1.2 “High Level“ Problem Formulation

As mentioned above, interference concerns represent a serious issue in the contextof wireless sensor networks: we here discuss in more detail a typical applicationscenario, highlighting the main motivations for this problem and outlining possiblesolutions.

The “Interference Arena“

Data presented in Figure 1.1 show that more than 70% of the wireless nodes de-ployed for industrial sensing applications communicate using the 2.4 GHz ISM band.

6Alan Broad, Crossbow, Wireless Sensor Networks in Industry, available online at http://

www.citris-uc.org/system/files?file=Day-1-10-Alan-Broad--Wireless-Sensor-Net.pdf.

Page 19: Design of Reliable Communication Solutions for Wireless Sensor Networks

1.2. “HIGH LEVEL“ PROBLEM FORMULATION 7

Table 1.1: Barriers to the use of wireless industrial technologies.

Barrier % of RespondentsData Security 45.8

Reliability 43.0Too little knowledge 27.5

Too few industrial products 19.7Too expensive 14.8

Technology might not be available in the future 13.4Data transmission too slow 12.0

Communication distance too short 12.0Too few frequency channels 7.0

Other reasons 9.2There are no barriers 16.9

We have no requirements 24.6

This spectrum band, is unlicensed and thus open for use to all wireless devices thatcomply with a set of basic rules defined by spectrum regulators and for instancespecifying the maximum power that terminals can use while transmitting. The opennature of such frequency band is an extremely attractive feature since it allows theuse of the wireless medium without requiring a potentially expensive license andin fact during the last few years, several radio standards operating in this areaof the spectrum have been defined. In such a scenario, different co-located wire-less devices might interfere with each others and packet transmissions of differentnetworks might collide.

We remark however that effects of interference might be highly asymmetric. Aswe have mentioned above, spectrum regulators limit the maximum allowed trans-mission power, however the actual power level used for packet transmissions de-pends on the specific requirements of the considered application. In some cases,users demand a high data rate or a long transmission range: this might requirea high transmission power and eventually a large bandwidth. In other scenariosinstead, a lower power level and a smaller bandwidth can be used in low-data rate

and short-range communications to decrease energy consumption and prolong theduration of batteries: this is usually the case for sensor networks. As an example,the IEEE 802.15.4 radio standard defines a maximum transmission power equal to1mW. Such a value is well below the allowed threshold that is set to 100mW in Eu-rope and 1W in the US and that corresponds to the maximum power level specifiedfor transmissions of 802.11b/g devices. A collision arising among packets transmit-ted by terminals operating within these two standards will likely induce asymmetricconsequences: an 802.11 receiver might only be marginally affected by transmis-sions of co-located 802.15.4 devices, and packets involved in collisions might becaptured and correctly received with high probability. Instead, an 802.15.4 receivermight experience severe interference in presence of high power 802.11 transmissions

Page 20: Design of Reliable Communication Solutions for Wireless Sensor Networks

8 CHAPTER 1. INTRODUCTION

that might corrupt the received packets inducing a high packet error rate7.We note that terminals might act selfishly and might not be willing to cooperate

for instance transmitting without accounting for the interference that they generateto others: in such a scenario, energy constrained sensor nodes will basically bedominated by other less constrained devices and will have to adopt solutions foravoiding or mitigating effects of interference.

Mitigating or Avoiding Interference

Several approaches can be implemented for dealing with this problem: a first highlevel distinction can be made among centralized and distributed techniques. Inthe first case, potential conflicts arising among different devices are solved in acentralized manner by allocating the set of available spectral resources so as toavoid (or minimize) interference8. If instead the second strategy is implemented,nodes deal with interference in a distributed way; two options are possible in thislast case, in particular cooperative or non-cooperative schemes can be envisaged:

• Cooperative techniques require cooperation among the different users involved(for instance the nodes of a sensor network and WLAN terminals) that mightagree to share a certain portion of the spectrum in the time or frequencydomain9.

• Non-cooperative schemes instead do not involve cooperation among the dif-ferent networks that are competing for the available resources and might thusbe suitable for the scenario we consider, where selfish and heterogeneous10

users need to share an unlicensed band.

7We here have carried out some simple considerations based only on the maximum transmittingpower levels specified by these two standards. The problem of coexistence among 802.15.4 and802.11 is in fact extremely more complex and the effects caused by mutual interference dependon many factors such as the effective path gain among the considered transmitters and receivers(determined by the relative location of the devices of the involved networks), the frequency offsetbetween the carriers used, the actual transmission power levels (power control algorithm can beimplemented in both kind of devices in order to reduce energy consumption), traffic loads and themodulation used at the physical layer by 802.11 devices. These parameters are taken into accountduring the investigation included in Annex E of [7]: the presented results actually confirm theexistence of the asymmetry we have outlined.

8A commonly adopted centralized solution is frequency planning, where orthogonal channelsare assigned to different co-located networks. Frequency planning is today implemented in manyindustrial plants but it might not be effective if nodes are mobile or if interference is generate bydevices that do not comply with the established frequency allocation (for instance terminals thatare not part of the set of devices considered during the planning procedure and act selfishly whiletransmitting). Additionally, if more and more nodes are deployed, frequency planning solutionsmight not be scalable.

9As an example several cooperative techniques aiming at mitigating interference among theIEEE 802.11 and IEEE 802.15.1 radio standards have been proposed by the 802.15 Task Group 2(TG2): examples are the medium access control enhanced temporal algorithm (META) and thealternating wireless medium access schemes (AWMA)( [18]).

10As previously outlined users might be heterogeneous for instance in terms of data rate re-quirements, transmitting power level and energy constraints.

Page 21: Design of Reliable Communication Solutions for Wireless Sensor Networks

1.2. “HIGH LEVEL“ PROBLEM FORMULATION 9

We here focus on the non-cooperative case: a broad variety of techniques be-long to this category. Spread spectrum modulations schemes represent a commonlyadopted solution. Direct sequence (DSSS) and frequency hopping (FHSS) spreadspectrum transmission techniques allow to achieve a certain resilience against in-terference and are today widely adopted by many radio standards for personalarea network devices: for instance the direct sequence solution is used by the IEEE802.15.4 standard while frequency hopping is implemented in IEEE 802.15.1. Com-binations of these two approaches are also possible and are for instance included inthe Wireless HART and TSMP specifications ( [19]). Another approach that hasrecently received significant attention involves the use of Dynamic Spectrum Ac-

cess (DSA) mechanisms: in this case sensor nodes identify and consequently avoidtransmissions of other devices and opportunistically access the wireless mediumexploiting “spectrum holes“ ( [32]) in the time or frequency domain. Ultra WideBand (UWB) sensor networks, utilizing the underlay approach for spectrum access,have also been recently considered and for instance an UWB physical layer has beenincluded in the latest 802.15.4a specifications [20]. Channel coding is an additionalalternative: transmissions of sensor nodes might be encoded by adding redundantinformation that can potentially be exploited at the receiver side to recover cor-rupted packets. Other schemes such as power control or rate adaptation could beused as well but might not be suitable for complexity constrained devices such assimple sensor nodes that might not be able to modify their transmission rate. Fi-nally, more high-layer solutions might also be adopted and for instance interferencecould be avoided through opportunistic routing. Once nodes detect that a certainlink is experiencing interference, an alternative path could be identified and usedto avoid the interfered area by implementing a spatial retreat scheme [21].

Scope of Thesis

In this thesis we consider the energy efficient design of non-cooperative and dis-

tributed schemes that energy and complexity constrained sensor nodes can adoptfor avoiding or mitigating effects of interference in unlicensed bands. In particularwe investigate the potential of three of the aforementioned techniques as highlightedin Figure 1.2.

In chapters 2 and 3 we focus on dynamic spectrum access. Chapter 2 defines aDSA-like scheme that implements the idea of channel surfing and aims at avoidinginterference through the exploitation of spectrum holes in the frequency domain:special emphasis is given to energy efficient spectrum sensing and neighbor discoveryin multi-channel networks. In chapter 3 we consider as an example of distributedspectrum sharing the problem of networked estimation and investigate how a setof estimation plants that share a common channel can mitigate the intra-networkinterference originated by the contention-based protocol adopted at the MAC layer.

Chapter 4 deals with frequency hopping transmission techniques and proposesan interference aware adaptive frequency hopping algorithm.

Finally chapter 5 is devoted to the design of an original and energy efficient

Page 22: Design of Reliable Communication Solutions for Wireless Sensor Networks

10 CHAPTER 1. INTRODUCTION

Interference Avoidance Techniques

Cen

tral

ized

Sch

emes

Fre

quen

cyP

lannin

g

...

Distributed Schemes

Cooperative Solutions

Non-Cooperative Solutions

UW

B

DSSS

FH

SS

DSA

Chan

nel

Cod

ing

Spat

ial

Ret

reat

META AWMA ...

Figure 1.2: Overview of the problem area. The shaded area identifies the threetechniques considered in this thesis.

coding solution tailored to sensor devices and suitable for the challenging problemof sensor networks reprogramming.

1.3 Overview of Thesis Contributions

This thesis is a compilation of 4 conference papers and 2 journal articles: eachchapter briefly outlines the contributions and limitations of the studies presentedin the attached papers.

Chapter 2

Chapter 2 focuses on interference avoidance through dynamic spectrum access.With this respect, different sub-problems have been addressed in the followingpapers:

• Paper 1: Luca Stabellini, Jens Zander, “Energy Efficient Detection of Inter-mittent Interference in Wireless Sensor Networks“, submitted to InternationalJournal on Sensor Networks (IJSNET), March 2009.

• Paper 2: Luca Stabellini, Jens Zander, “Interference-Aware Self-Organizationfor Wireless Sensor Networks: a Reinforcement Learning Approach“, in Pro-ceedings of 4th annual IEEE Conference on Automation Science and Engi-neering (CASE), August 23-26,2008. Washington DC, USA.

• Paper 3: Luca Stabellini, “Energy Optimal Neighbor Discovery for Single-Channel Single Radio Wireless Sensor Networks“, in Proceedings of IEEEInternational Symposium on Wireless Communication Systems (ISWCS), Oc-tober 21 -24, 2008, Reykjavik, Iceland.

Page 23: Design of Reliable Communication Solutions for Wireless Sensor Networks

1.3. OVERVIEW OF THESIS CONTRIBUTIONS 11

Paper 1 proposes a spectrum sensing algorithm suitable for interference detec-tion in low complexity and energy constrained sensor nodes. The paper definesthe sensing algorithm and provides an analytical framework allowing to tune theparameters of the considered interference detection scheme so as to achieve a de-sired behavior while minimizing energy consumption. Results obtained during theexperimental evaluation of the developed procedure on real sensor motes are alsopresented. Paper 2 considers the problem of sensor networks initialization in pres-ence of interference and outlines the basic structure of an interference avoidancealgorithm designed for this purpose. Paper 3 provides the energy optimal imple-mentation of a combined neighbor discovery and topology control algorithm. Theauthor of this thesis developed all the original ideas included in these papers.

Chapter 3

Chapter 3 investigates the problem of networked estimation in the contest of dis-tributed spectrum sharing and analyzes how a set of estimation plants can share acommon channel. This investigation is presented in:

• Paper 4: Maben Rabi, Luca Stabellini, Alexandre Proutiere, Mikael Jo-hansson, “Networked Estimation Under Contention-Based Medium Access“,to Appear in International Journal of Robust and Nonlinear Control.

Paper 4 adopts an interdisciplinary approach and addresses the considered prob-lem from a joint perspective, considering both communication and control aspects.The author of this thesis developed the analytical models that have been usedfor quantifying packet delay and loss probability (the analysis was presented in apreliminary form in [43]): while carrying out this task valuable insight has beenprovided by Alexandre Proutiere. The effect of packet delay and losses over the per-formance of the estimation system has been quantified by Maben Rabi and MikaelJohansson that investigated the control-related aspects of the study. The paperwas jointly edited by the four authors.

Chapter 4

Chapter 4 considers frequency hopping transmission techniques and introduces anew adaptive frequency hopping algorithm: this algorithm has been presented in:

• Paper 5: Luca Stabellini, Lei Shi, Ahmad Al Rifai, Juan Espino, VeatrikiMagoula, “Utility-Based Adaptive Frequency Hopping“, submitted to IEEEInternational Symposium on Wireless Communication Systems (ISWCS), Septem-ber 2009.

This paper has been coauthored with the students of the wireless networkscourse. The author of this thesis proposed the original problem formulation andacted as leading author of the paper. Ideas were refined with the other coauthors,

Page 24: Design of Reliable Communication Solutions for Wireless Sensor Networks

12 CHAPTER 1. INTRODUCTION

that also developed the simulation code required to obtain the numerical resultspresented in the paper.

Chapter 5

Finally chapter 5 addresses the problem of sensor networks reprogramming andpresents the energy and complexity aware design of a coding solution based onfountain codes. The first part of the chapter deals with the optimization of thedegree distribution of fountain codes: this is described in:

• Paper 6: Michele Rossi, Giovanni Zanca, Luca Stabellini, Riccardo Crepaldi,Albert F. Harris, Michele Zorzi, “SYNAPSE, A Network ReprogrammingProtocol for Wireless Sensor Networks Using Fountain Codes“, in Proceedingsof 5th Annual IEEE Communications Society Conference on Sensor, Mesh andAd Hoc Communications and Networks (SECON), June 16-20, 2008. SanFrancisco, California, USA.

The author of this thesis developed the algorithm used for optimizing the consid-ered degree distribution, obtained the distribution that was actually implementedin the reprogramming protocol and edited Section IV of the aforementioned paper.While performing these tasks valuable insight was provided by Michele Rossi thatalso acted as leading author. The second part of the chapter presents additionalimprovements of the considered coding scheme: these aim at increasing the effi-ciency of the developed reprogramming protocol over multi-hop networks. Thisinvestigation has been included in P4 (see next subsection).

Other Related Papers

The following publications, although not included in this thesis, contain materialthat is similar or related to the aforementioned contributions:

P1. Luca Stabellini, “Energy Efficient Neighbor Discovery for Multi-Channel Single-Radio Wireless Sensor Networks“, in Proceedings of 8th Scandinavian Work-shop on Wireless Ad-Hoc Networks (ADHOC ´08), May 7-8, 2008, Johannes-bergs Slott, Sweden.

P2. Luca Stabellini, Alexandre Proutiere, “Evaluating Delay and Energy in Sen-sor Networks with Sporadic and Correlated Traffic“, in Proceedings of 7th

Scandinavian Workshop on Wireless Ad-Hoc Networks (ADHOC ´07), May2-3, 2007, Johannesbergs Slott, Sweden.

P3. Maben Rabi, Luca Stabellini, Peter Almström, Mikael Johansson, “Analysisof Networked Estimation under Contention-Based Medium Access“, in Pro-ceedings of the 17th IFAC World Congress, July 6-11, 2008. Seoul, Korea.

Page 25: Design of Reliable Communication Solutions for Wireless Sensor Networks

1.4. THESIS OUTLINE 13

P4. Michele Rossi, Nicola Bui, Giovanni Zanca, Luca Stabellini, Riccardo Crepaldi,Michele Zorzi, “SYNAPSE++: Code Dissemination in Wireless Sensor Net-works using Fountain Codes“, second submission to IEEE Transactions onMobile Computing, March 2009.

1.4 Thesis Outline

The remaining of this thesis is organized in two parts. The first one, comprisingChapters 2 through 5, highlights and briefly summarizes the performed studies:each Chapter contains short bibliographic studies that serve as a starting pointfor outlining the contributions in the different considered areas. The limitations ofeach contribution are also pointed out. Concluding remarks and open issues areoutlined in Chapter 6. The second part instead contains verbatim copies of all thepapers included in this thesis.

Page 26: Design of Reliable Communication Solutions for Wireless Sensor Networks
Page 27: Design of Reliable Communication Solutions for Wireless Sensor Networks

Chapter 2

Interference Avoidance ThroughDynamic Spectrum Access

Dynamic spectrum access has the potential to allow different classes of users to sharethe same pull of spectral resources and is today envisaged as a promising solutionto the current scarce utilization of many licensed frequency bands ( [22]). Algo-rithms exploiting the cognitive radio paradigm and allowing opportunistic spectrumaccess can however also be suitable for unlicensed scenarios and can be exploitedby frequency agile systems to avoid interference generated by co-located networks.In this chapter we investigate this possibility in the context of energy constrainedwireless sensor networks. In the following we outline our contributions with thisrespect and point out the limitations of our work.

2.1 Related Literature

In order to implement interference avoidance algorithms that can opportunisticallyexploit unused pieces of spectrum two main problems need to be addressed. A firstissue is connected to the identification of interference and spectrum opportunitieswhile a second problem involves the definition of communication schemes capableof utilizing the available resources. In the next two subsections we review worksthat have been considering the aforementioned problems.

Interference Detection

The problem of detecting interference in wireless sensor networks has previouslybeen addressed by several works that have proposed algorithms aiming at detect-ing different kinds of interfering activities. In order to review these works, we startby classifying the possible forms of interference: a first high level distinction canbe made among intra-network1 and inter-network interference. In the first case,

1Intra-network interference is sometimes referred to as self-interference.

15

Page 28: Design of Reliable Communication Solutions for Wireless Sensor Networks

16CHAPTER 2. INTERFERENCE AVOIDANCE THROUGH DYNAMIC

SPECTRUM ACCESS

transmissions of sensors belonging to the same network interfere with each otherwhile in the latter scenario interference is generated by devices that are not partof the considered sensor network. Inter-network interference can further be classi-fied in homogeneous and heterogeneous: the homogeneous scenario involves two ormore networks operating within the same radio standard while in the more generalheterogeneous case this condition does not hold and for instance the considereddevices might adopt different modulation schemes. Finally, we can also distinguishamong incidental interference, arising when transmissions of two or more networksincidentally overlap in time and frequency, and intentional jamming that is inten-tionally generated by malicious devices in order to corrupt communications of atarget network.

An algorithm for detecting intra-network interference has been proposed in[23]: authors have developed a scheme for identifying potential interference amongthe nodes of a sensor network and used this algorithm to design collision-freeTDMA protocols. Inter-network, homogeneous interference has been consideredin [24] where a protocol for detecting and mitigating interference among collocated802.15.4-based sensor networks has been proposed. The inter-network heteroge-neous case has instead been investigated in [25] where the problem of detecting WiFiinterference in IEEE 802.15.4-based sensor networks has been considered: differentinterference estimators based on received signal strength have been proposed andtheir effectiveness has been evaluated on real sensor nodes. The aforementionedworks always focus on incidental interference: intentional jamming has been in-stead considered in [26] where the feasibility of identifying jamming activities usingmeasurements of signal strength, carrier sensing time and packet delivery ratio hasbeen discussed.

Interference Avoidance

We here focus on the inter-network, incidental heterogeneous case: once interferencehas been detected, opportune schemes for avoiding interfering transmissions have tobe implemented. Two approaches have mainly been investigated so far. One possi-ble solution is to exploit the idea of channel surfing and implement frequency agilesensor networks that can avoid interfered frequencies selecting for their transmis-sions clear channels. This alternative, that basically aims at exploiting spectrumholes in the frequency domain, is investigated in [27] where two possible implemen-tation options are discussed: these are channel switching and spectral multiplexing;the first approach requires that all the nodes of the network switch channel afterinterference has been detected in a certain area of the network. The second solutioninstead allows only the sensors that are actually experiencing interference to selecta new channel: a connected topology is in this case maintained by boundary nodes(i.e. those sensors that have neighbors both in the interfered and not-interferedregion) that periodically switch their radio among the two channels used by neigh-boring nodes. We remark that both approaches require the existence of an already

Page 29: Design of Reliable Communication Solutions for Wireless Sensor Networks

2.2. ENERGY EFFICIENT DETECTION OF INTERMITTENTINTERFERENCE IN WIRELESS SENSOR NETWORKS (PAPER 1) 17

established topology and for instance assume that nodes are synchronized2. Adifferent solution is to avoid interference in the time domain: in this case sensornodes operate on a single channel and exploit spectrum holes in the time domain,transmitting in an opportunistic manner when interfering devices are silent. Thissecond option has been investigated in [29] where the possibility of reusing WLANchannels through dynamic spectrum access has been discussed.

2.2 Energy Efficient Detection of Intermittent Interferencein Wireless Sensor Networks (Paper 1)

Contribution

In this paper we propose a spectrum sensing algorithm suitable for detecting inter-network, heterogeneous interference. The scenario we consider consists of an un-licensed band partitioned in M orthogonal channels: these are shared by a set ofsensor nodes and a set of interfering devices. We model the channel occupancyusing a two-state semi-Markov model: at a defined time instant, a channel is in theBusy state if some of the interfering devices is transmitting packets and it is in theIdle state otherwise. Both an idle and a busy channel are perceived by a certainsensor node as white Gaussian processes with average power respectively equal toσ2

0 and σ21 (similar assumptions are used in several other related papers such as [29]

and [30] as well as in standard documents of the IEEE [7]). We characterize theinterference experienced over a certain frequency band using the interference vectorψ, defined as:

ψ ,

(

ρ, γI =σ2

1

σ20

)

where ρ ∈ (0, 1) denotes the average fraction of time during which the consideredchannel is on the busy state. Let’s now assume that the packet error rate PER(ψ)induced by a certain interference vector can roughly be estimated (or eventuallyupper-bounded) and that sensor nodes “perceive“ a channel as interfered or clear ifthe experienced PER is respectively greater than PERMax or lower than PERTol.This allows to identify over the interference domain ID, defined according to:

ID , {ψ = (ρ, γI) : ρ ∈ [0, 1], γI ∈ [1,+∞)}

the following two regions:

I ={

ψ : ψ ∈ ID, PER (ψ) ≥ PERMax}

C ={

ψ : ψ ∈ ID, PER (ψ) ≤ PERTol}

2Synchronization is here required in order to allow boundary nodes to receive packets fromtheir neighbors and avoid the multi-channel hidden terminal problem [28] arising when one nodeis transmitting but the intender receiver is listening on a different channel.

Page 30: Design of Reliable Communication Solutions for Wireless Sensor Networks

18CHAPTER 2. INTERFERENCE AVOIDANCE THROUGH DYNAMIC

SPECTRUM ACCESS

ρ

γI = σ21

σ20

C

PI(ψ) = PI(ψMax)

PI(ψ) = PI(ψTol)

I

ψTol

ψMax

PI(ψ) ≥ PI(ψMax)

PI(ψ) ≤ PI(ψTol)

Figure 2.1: Sketch of the two regions (continuous lines) C and I defined on ID.The two dashed lines define two iso-curves that correspond to PI(ψ) = PI(ψMax)and PI(ψ) = PI(ψTol).

Using definitions analogous to the ones introduced in [32] we might call channelswhose interference vectors belong to C or I respectively white and black spaces.If we denote with PI(ψ) the probability3 that a certain channel is classified asinterfered, our objective is to design an algorithm such that (see Figure 2.1):

• if the interference vector of the tested channel belongs to I (thus the channelis a black space) then the channel is classified as interfered with probabilitygreater than a minimum threshold PMin

D ;

• if a channel is classified as clear with probability greater than a referencevalue 1− PMax

F then its interference vector belongs to C (thus the channel issurely a white space);

• the energy cost ETot of the considered procedure is minimized.

In order to accomplish this objective, a sensor node performs spectrum sensingaccording to the scheme sketched in Figure 2.2.Note that intermittent sensing is used in order to cope with the intermittent natureof typical sources of interference affecting wireless sensor networks in unlicensedbands. Such a strategy allows to limit the use of the radio unit and reduces thusenergy consumption. With reference to figure 2.2 channel micro-samples xis arerandom variables that behave according to:

3The considered interference detection procedure will have a probabilistic outcome due topossible sensing errors and to the fact that channels present intermittent interfering activities andmight thus be sensed when interfering devices are transmitting or silent.

Page 31: Design of Reliable Communication Solutions for Wireless Sensor Networks

2.2. ENERGY EFFICIENT DETECTION OF INTERMITTENTINTERFERENCE IN WIRELESS SENSOR NETWORKS (PAPER 1) 19

t1 t2 tN t

y1 y2 yN

x11x

12 x1

L x21x

22 x2

L xN1xN2 xNL

Figure 2.2: Sketch of the channel sensing strategy used by our interference detectionscheme.

{

xi ∼ N(

0, σ20

)

if the channel is Idlexi ∼ N

(

0, σ21

)

if the channel is Busy(2.1)

while channel macro-samples yjs are defined by:

yj = I

{

L∑

i=1

|xji |2> ζ

}

(2.2)

I {·} being the indicator function. A channel is classified as interfered if the numberof macro-samples resulting in positive outcome is greater than a defined thresholdn, thus:

if∑N

j=1 yj > n the channel is classified as Interfered

if∑N

j=1 yj ≤ n the channel is classified as Clear

We provide an analytical framework that allows to select the parameters L, ζ, Nand n of the considered algorithm so as to satisfy the constraints specified above.In order to verify the behavior achieved by the developed interference detectionprocedure we implemented it on the TMote Sky sensor platform and run experi-ments over the 16 IEEE 802.15.4 channels in the 2.4 GHz ISM band. Examplesof the obtained results are shown in Figure 2.3 where we present the comparisonamong the experimentally estimated PI and the values computed analytically. Thegood match among experimental results and analytical model proofs the effective-ness of our algorithm that might for instance be used for performing clear channelassessment.

Limitations

We here outline the limitations of our contribution: we distinguish among limita-tions introduced by the used set of modeling assumptions and limitations connectedto the chosen interference avoidance approach.

In our analysis we have assumed that interfered frequencies behave accordingto a two-state semi Markov model and that both an Idle and a Busy channel are

Page 32: Design of Reliable Communication Solutions for Wireless Sensor Networks

20CHAPTER 2. INTERFERENCE AVOIDANCE THROUGH DYNAMIC

SPECTRUM ACCESS

γI [dB]

ρ

0 10 20 30 40 5010

−4

10−3

10−2

10−1

100

PI=0.95, Model

PI<0.95. Experiments

γI [dB]

ρ

0 10 20 30 40 5010

−4

10−3

10−2

10−1

100

PI=0.95, Model

PI>0.95. Experiments

Figure 2.3: Contour plot of PI = 0.95 over the interference domain (black line) andexperimentally estimated PI .

perceived as white Gaussian processes with average power equal to σ20 and σ2

1 respec-tively. We further assumed that channel states in two consecutive sensing instantsare uncorrelated and that the considered state does not change while the channelis sensed. These assumptions might not hold in reality however, our experimentalevaluation has shown that these potential inaccuracies do not significantly affectthe behavior of the developed interference detection scheme. We also remark thatwhile evaluating the energy cost of our algorithm we adopted a simplified energymodel that might not fully capture the actual energy consumption of the sensingprocedure (we neglected for instance the energy required by the CPU to processthe collected channel samples as well as the eventual energy cost for switching on

Page 33: Design of Reliable Communication Solutions for Wireless Sensor Networks

2.3. INTERFERENCE AWARE SELF-ORGANIZATION FOR WIRELESSSENSOR NETWORKS: A REINFORCEMENT LEARNING APPROACH(PAPER 2) 21and off the radio unit of the sensor).

With respect to the chosen interference avoidance approach, our algorithm aimsat identifying and consequently avoiding interfered frequencies: this might representan effective solution only if the dynamics of interference change slowly over time.If the interference pattern is instead highly dynamic, it might not be possible toavoid interfered channels and exploiting spectrum holes in the time domain couldresult in better performance. In our work we have not investigated under whichconditions one approach outperforms the other and addressing this problem is leftfor future work.

2.3 Interference Aware Self-Organization for WirelessSensor Networks: a Reinforcement Learning Approach(Paper 2)

Contribution

In this paper we define an interference avoidance scheme that exploits the idea ofchannel surfing and allows frequency agile sensor nodes to avoid channels presentinginterfering activities (i.e. transmissions of other wireless devices). Our algorithmdiffers from the scheme presented in [31] (where the concept of channel surfing wasfirst introduced) since it adopts a receiver centric approach where each node onlyreceives on a single (clear) channel: this presents several advantages if comparedto the transmitter centric strategy considered in [31]. The greatest among those issurely the fact that our approach does not require synchronization and for instanceit allows to avoid interference even when the network is still unstructured or lacksa global synchronization scheme. We further propose a neighbor discovery algo-rithm that sensor nodes can use to establish or reestablish a connected topology4

in multi-channel networks. Multi-channel scenarios are likely to arise in presenceof interference due to the fact that nodes might use different channels in differentregions of the network. Providing a way for carrying out neighbor discovery thuscompletes the definition of our interference avoidance scheme. We formulate theproblem of establishing a connected topology as a reinforcement learning episodictask: we model the state Xi(t) of node i at time t using the pair:

Xi(t) = (|Ni(t)|, Xci (t)) (2.3)

|Ni(t)| here denotes the number of neighbors discovered up to time t (Ni(t) is theset of neighbors of node i) and Xci (t) is defined according to:

Xci (t) =

{

1 if∑

j∈Ni(t)Xcj (t) > 0 or if i is the network sink

0 otherwise(2.4)

4The word connected here is used to denote a network where each node is able to reach thesink either through single-hop or multi-hop communications.

Page 34: Design of Reliable Communication Solutions for Wireless Sensor Networks

22CHAPTER 2. INTERFERENCE AVOIDANCE THROUGH DYNAMIC

SPECTRUM ACCESS

and thus assumes value 1 if node i is connected with the sink (or if i is the sink itself).During each episode a node takes actions i.e. broadcasts discovery queries over theM available channels aiming at identifying its neighbors: the episode ends when apath to the sink has been found and the state variable Xci (t) is equal to 1. To eachaction a, thus to each of the M channels, node i associates a utility function uai ,reflecting the fact that neighbors have previously been discovered after transmittingon that channel: this utility is updated after every transmissions according to:

uai (t+ 1) =

{

α1 + (1 − α1)uai (t) if new neighbors are discovered(1 − α2)uai (t) otherwise

(2.5)

where α1 and α2 are two parameters to be fixed: a similar approach has alreadybeen used in [33]. Utility functions are then used together with an opportunepolicy for selecting the next action to be taken. In order to compare the behaviorof different policies, a simple simulation study has been performed: in particularwe compared the average time E[Tc] required to achieve a connected network withrandomly placed interfering devices for the four following policies:

• Deterministic Policy for which the sequence of actions to be taken is defineda priori and is not modified while the node is discovering its neighbors;

• Stochastic Policy that randomly selects actions with uniform probability dis-tribution;

• Greedy Policy that at each step always selects the action with the highestutility function;

• Soft-max Policy that uses a Gibs or Boltzman distribution and at time t

selects a certain action a with probability euai

(t)/τ

beubi

(t)/τ, τ being a parameter of

the distribution;

More details on the setting used for the simulations are included in Paper 2. Ex-amples of the obtained results are shown in Figure 2.4: these outline that adoptinga learning approach that can exploit the information acquired during the neigh-bor discovery process for selecting on which frequency band looking for neighborscan reduce the time required to establish a connected network and consequentlydecrease energy consumption.

Limitations

Limitations of the considered interference avoidance approach, that aims at ex-ploiting spectrum holes in the frequency domain have been already outlined in theprevious subsection. We here focus on the proposed neighbor discovery procedure.

Page 35: Design of Reliable Communication Solutions for Wireless Sensor Networks

2.3. INTERFERENCE AWARE SELF-ORGANIZATION FOR WIRELESSSENSOR NETWORKS: A REINFORCEMENT LEARNING APPROACH(PAPER 2) 23

0.2 0.4 0.6 0.8 0.1 0.4 2 80

100

200

300

400

500

600

700

800

α τ

E[T

c] [sl

ots]

DeterministicStochasticGreedySoft−max α=0.6

Figure 2.4: Average number of slots required in order to achieve a connected networkfor different kind of policies.

This algorithm is handshake based5 and selects the channel for broadcasting discov-ery queries using a reinforcement learning approach [34]. In particular, as describedabove, the selection of the frequency band used for each particular transmission isperformed using an opportune policy: this policy takes as input a utility function,associated to each channel and accounting for the number of neighbors that havebeen previously discovered on that frequency. This utility is increased after everytransmission if the taken action (i.e. the broadcast of a discovery query on a certainchannel) resulted in a reward i.e. in the discovery of new neighbors and decreasedotherwise. The whole procedure is stopped as soon as the node performing neigh-bor discovery has identified a path to the network sink. Traditional reinforcementlearning algorithms aim at maximizing a certain long term reward: this is howevernot strictly the case for our scheme. The considered stopping condition does notforce nodes to explore all the available channels and in fact might lead to undiscov-ered neighbors potentially resulting in inefficient topologies. This allows howeverto stop the neighbor discovery procedure, during which nodes are listening to thechannel and consume thus precious energy, as soon as a way to the sink has beenidentified. This tradeoff among the quality of the network topology and the energyspent on the neighbor discovery phase has not been investigated.

5In handshake based neighbor discovery nodes broadcast discovery queries in order to find outwho’s in their proximity. A node hearing a discovery answers for instance with an acknowledge-ment packet. This differs from one-way neighbor discovery where no active response is requiredand nodes simply broadcast “hello“ messages to inform their neighbors of their presence.

Page 36: Design of Reliable Communication Solutions for Wireless Sensor Networks

24CHAPTER 2. INTERFERENCE AVOIDANCE THROUGH DYNAMIC

SPECTRUM ACCESS

2.4 Energy Optimal Neighbor Discovery for Single RadioSingle Channel Wireless Sensor Networks (Paper 3)

Contribution

This paper considers the handshake neighbor discovery algorithm proposed in [35]and provides a way for optimizing its energy consumption. This algorithm combinesthe process of neighbor discovery with a simple form of topology control and worksin the following way: the plane around each nodes is divided into M equal conesand while looking for neighbors a node progressively increases the power used tobroadcast discovery queries until at least a neighbor in each direction (the numberof directions M being a parameter of the algorithm) has been identified or themaximum power level has been reached. We formulate the discovery procedure asa Markov decision process evolving through steps: at each step a node is asked toselect the power level used to broadcast a discovery query as well as the size of thecontention window that nodes eventually hearing its query will use to reply. Wemodel the state of the node at step k using the couple:

X(k) = (Xfound(k), Xpower(k))

where Xfound(k) ∈ (0,M) denotes the number of directions on which the node hasdiscovered at least one neighbor and Xpower(k) the maximum power level used up tostep k. Transition state probabilities, describing the probability that new neighborsare discovered in one or more of the missing directions, have been computed usingan analytical model that accounts for the used transmission power as well as for theselected contention window: we remark that long contention windows will preventcollisions among reply messages, allowing reliable neighbor discovery but resultingin high energy cost; shorter windows instead limit the usage of the radio unit andcan potentially improve energy efficiency but might also cause collisions and leadto undiscovered neighbors. This might affect the resulting topology and the energyefficiency of the data gathering process. The use of a contention window of variablesize represents the novelty of this work. We note that a similar problem has alreadybeen investigated in [36] that however considered a very unrealistic energy modelonly accounting for transmitting power consumption and neglecting the energy costrequired for listening. Authors of [36] have shown that the average energy cost of thediscovery procedure decreases for increasing node densities: this however does notreflect the fact that in densely deployed sensor networks, long contention windowswill be required in order to prevent collisions. This intuition is in perfect agreementwith our results that as shown in Figure 2.5 outline that higher node densities resultin higher energy cost.

Limitations

Optimal policies for the selection of transmitting power and contention windowsize have been obtained through dynamic programming [37]: the size of the used

Page 37: Design of Reliable Communication Solutions for Wireless Sensor Networks

2.4. ENERGY OPTIMAL NEIGHBOR DISCOVERY FOR SINGLE RADIOSINGLE CHANNEL WIRELESS SENSOR NETWORKS (PAPER 3) 25

6 8 10 12 14 1610

2

103

Node Density λ

Ave

rage

Ene

rgy

Cos

t

M=3M=5M=7M=9M=11

Figure 2.5: Average energy cost for the optimal power and contention windowselection policy. Different number of cones are considered.

contention window has been dimensioned in order to achieve a certain probabilityof not having collisions. These optimal policies however, can be computed only ifthe expected number of nodes hearing a discovery query is known: this requiresfor instance that the distribution of the nodes and the channel model are bothknown. Such an assumption (that was also used in [36]) is highly unrealistic andthus limits the contribution of our work. Furthermore, in our optimization we haveconsidered a single node perspective, where only a node at a time transmits queries:a more realistic network scenario should account for multiple transmitters actingsimultaneously and for the fact that packets might be lost due to collisions. Finally,as we mentioned above, in order to dimension the size of the used contention windowwe have fixed a certain probability of not having collisions among the transmittedreply messages. This value was empirically set and we have not investigated how itshould have been chosen: in fact also in this case (as already mentioned for Paper2) there is a tradeoff among the energy spent by nodes while performing neighbordiscovery and the quality of the resulting topology. Low probabilities of collisionsdemand high energy but ensure that all the neighbors are discovered; on the otherhand using shorter contention windows requires lower energy but might lead toundiscovered neighbors and affect the network topology.

Page 38: Design of Reliable Communication Solutions for Wireless Sensor Networks
Page 39: Design of Reliable Communication Solutions for Wireless Sensor Networks

Chapter 3

An Example of Spectrum Sharing:the Case of Networked Estimation

In this chapter we investigate the problem of networked estimation. In particularwe consider a scenario comprising a set of N estimation plants: each plant consistsof a sensor that samples the state of a certain system and transmits the collectedmeasure to an estimator. Samples are transmitted over a wireless channel that theconsidered N plants share using a contention based medium access scheme. Due tothe shared nature of the considered channel the transmitted samples might colliderequiring thus retransmissions: this will result in delays and eventually in the lossof some sample. Our aim is to investigate the dependencies among the performanceof the estimation plants, quantified in terms of average distortion of the consideredestimates, and the level of contention experienced over the used channel. We remarkthat our contribution could be seen under different perspectives: on one side, thesetting of the problem we consider basically provides an example of distributedspectrum sharing. On the other hand it gives insight on how to design a systemand chose its parameters (for instance the used MAC protocol or the samplingperiod adopted by the considered sensors) so as to minimize the effects of intra-network interference. We further outline that in this investigation, unreliability(i.e. estimates with high distortion) is induced by the contention among nodesthat belong to the same networked control system: this differs from the scenariowe outlined in Chapter 1 where instead packet losses were caused by inter-networkinterference.

3.1 Related Literature

Several works have considered the problem of state estimation in presence of obser-vation delays or losses and different settings (discrete or continuous time estimationin scalar or multidimensional systems) have been analyzed. For instance in [38],the effect of observation delays has been investigated for a continuous-time scalar

27

Page 40: Design of Reliable Communication Solutions for Wireless Sensor Networks

28CHAPTER 3. AN EXAMPLE OF SPECTRUM SHARING: THE CASE OF

NETWORKED ESTIMATION

system: assuming that the interarrival times of observations are exponentially dis-tributed authors have determined the minimum arrival rate that results, with highprobability, in an estimator error covariance that is bounded by a fixed threshold.A similar problem but in the context of multidimensional discrete-time systems hasbeen addressed in [39] where the effect of observation losses has been investigated.In this case authors have modeled the probability of receiving a certain observationas a Bernoulli random process with parameter λ and shown the existence of a criti-cal value for the observation loss rate below which the expectation of the estimationerror covariance is finite. Higher observation loss rates result instead in this expec-tation to be unbounded. For an overview of these results and other studies carriedout in the context of networked control systems the reader is referred to [40].

These works analyze the performance of the particular considered control sys-tems accounting for observation losses and delays that might be induced by in-terference, bad channel conditions (as an example, the effect of fading over theperformance of Kalman filter was recently investigated in [41]) or by contentionat the MAC layer. However, communication aspects are somehow decoupled fromthe real nature of the analyzed systems and for instance there is no attempt toactually quantify the entity of delays or losses in a particular real scenario. Withthis respect, only a simulation study aiming at analyzing the interdependenciesamong the estimation performance and the delays induced by the architecture of anetworked control system has been performed in [42].

3.2 Networked Estimation Under Contention-BasedMedium Access (Paper 4)

Contribution

In the context of networked estimation our main contribution is the analyticalcharacterization of the interdependencies among control and communication aspectsfor a particular class of networked control systems. As previously outlined weconsider, as sketched in Figure 3.1, a set of N sensors that periodically measure thestate of N distinct scalar systems and transmit their measurements to estimatorsusing a shared wireless channel.

The shared nature of the considered channel results in collisions among thetransmitted packets, introducing delays and potentially leading to packet losses.The entity of these delays and the probability of dropping some of the measurementswill in general depend on different parameters such as the number of sensorsN beingpart of the system, the access mechanism adopted by sensors at the MAC layer,the sampling period h and the eventual correlation among the instants of time atwhich measurements are taken. As an example in Figure 3.2 we show how thepacket loss probability Ploss varies as a function of the sampling period h for a fullysynchronized system (i.e. a system where all sensors generate a packet and thustry to access the channel at the same time) using slotted Aloha.

Page 41: Design of Reliable Communication Solutions for Wireless Sensor Networks

3.2. NETWORKED ESTIMATION UNDER CONTENTION-BASED MEDIUMACCESS (PAPER 4) 29

dx(1)t = ax

(1)t dt+ dW

(1)t

dx(2)t = ax

(2)t dt+ dW

(2)t

dx(N)t = ax

(N)t dt+ dW

(N)t

x(1)(

s(1)k

)

x(2)(

s(2)k

)

x(N)(

s(N)k

)

D(h,N)

Ploss(h,N)

E1

E2

EN

x(1)(t)

x(2)(t)

x(N)(t)

Shared channel, contention-based MAC

Figure 3.1: The estimation problem setup: the states of N identical plants areestimated via samples transmitted over a shared channel. Samples could be delayedand potentially lost because of contention.

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.810

−4

10−3

10−2

10−1

100

Sampling Period h [s]

Pac

ket L

oss

Pro

babi

lity

p loss

N=2N=5N=25N=125

Figure 3.2: Sample loss rate in a fully synchronized system and periodic sampling.Slotted Aloha is used at the MAC layer.

Furthermore, the performance of the considered estimators will also be deter-mined by the particular nature (stable or unstable) of the sampled systems. Ac-counting for all these aspects we derive analytical expressions for the distributionof packet delay and loss probability (a preliminary version of the developed ana-lytical framework was also published in [43]): we then investigate how the averageestimator distortion defined according to:

Page 42: Design of Reliable Communication Solutions for Wireless Sensor Networks

30CHAPTER 3. AN EXAMPLE OF SPECTRUM SHARING: THE CASE OF

NETWORKED ESTIMATION

0 0.02 0.04 0.06 0.08 0.10

10

20

30

40

50

60

70

80

90

100

Sampling Period h [s]

J e

N=2N=5N=25

Figure 3.3: Average estimation distortion Je as a function of the sampling periodh for an unstable system. Nodes are synchronized and use slotted Aloha.

Je ,1

N

N∑

i=1

lim supM→∞

1

M

∫ M

0

E

[

(

x(i)t − x

(i)t

)2]

dt (3.1)

is affected by these two metrics. An example of the obtained results is providedby Figure 3.3 where Je is plotted as a function of h: note that in all the presentedcurves, an optimum sampling period, balancing the generation of new samples withthe losses induced by the contention access mechanism can be identified.

Limitations

We here outline the limitations of our contribution: these basically lie in the set ofmodeling assumptions used in the performed investigation. For analytical tractabil-ity we have considered a time-slotted system where all sensors are synchronized.This does not allow to account for packet losses induced by partial superpositionamong packets of different nodes and provides thus an optimistic estimate of ob-servation delay and loss probability.

Page 43: Design of Reliable Communication Solutions for Wireless Sensor Networks

Chapter 4

Utility Based Adaptive FrequencyHopping

In this chapter we consider frequency hopping (FH) transmission techniques andaim at designing an interference aware frequency hopping algorithm. Frequencyhopping is becoming a popular solution for interconnecting wireless devices oper-ating in unlicensed bands. In fact, the growing interest for this technique is wit-nessed by the recent proliferation of radio standards and communication protocolsadopting hopping schemes: examples are the IEEE 802.15.1 [8] and the WirelessHART [10] radio standards as well as the TSMP (Time Synchronized Mesh Pro-tocol) protocol [19]. The basic idea implemented by this scheme is to allow twoor more nodes to communicate through synchronous hopping over a defined setof channel (the hopset). The resulting frequency diversity guarantees a certainresilience against packet losses induced by interference. However, performance offrequency hopping systems can be severely degraded if some of the channels be-longing to the hopset is constantly experiencing bad conditions for instance due tothe presence of frequency static interfering devices or unfavorable fading. Adaptivehopping techniques can in these cases be exploited to mitigate such problems: wehere outline our contribution with this respect.

4.1 Related Literature

Several adaptive hopping algorithms have been proposed during the last years.The basic idea implemented by these schemes is to identify bad channels i.e. forinstance those frequency bands where nodes experience a high packet error rate andconsequently remove them from the hopping pattern. Adaptive hopping techniquesare included in the specification of many frequency hopping standards availabletoday such as IEEE 802.15.1 and Wireless HART.

The basic structure of these adaptive algorithms typically comprises three steps:assuming as a reference case the Adaptive Frequency Hopping specifications in-

31

Page 44: Design of Reliable Communication Solutions for Wireless Sensor Networks

32 CHAPTER 4. UTILITY BASED ADAPTIVE FREQUENCY HOPPING

cluded in IEEE 802.15.1 we have:

• channel classification, through which the channels belonging to the hopsetare classified and ranked based on a defined metric (for instance packet errorrate);

• channel classification information exchange, through which the nodes belong-ing to the network exchange their channel classification;

• hopping sequence adaptation, through which bad channels are removed fromthe hopset.

Several variants of this basic adaptive technique, aiming at improving its per-formance in presence of co-located networks or frequency static interfering deviceshave been proposed in the literature. For instance the Interference Source OrientedAdaptive Frequency Hopping (ISOAFH) scheme was defined in [44]. Based on theconsideration that each IEEE 802.11 channel overlaps with 22 of the frequenciesused by IEEE 802.15.1, the original hopset is divided into groups. The channelclassification procedure rather than identifying individual bad channels aims thenat localizing the WLAN carrier(s) and consequently avoids hopping over the in-volved group of channels. The idea of Adaptive Frequency Rolling, was introducedin [45]: in order to mitigate mutual interference among different networks the orig-inal hopset is partitioned in several orthogonal groups that are assigned to theconsidered piconets adopting a time division scheme.

All these procedures are basically on-demand algorithms that require the def-inition of an “initiating condition“: this has to be fulfilled in order to start theadaptive scheme. Furthermore, the new hopping sequence can be defined only afternodes have performed the channel classification. This introduces delays and slowsdown the process of interference avoidance. Finally, if channel conditions change,in order to allow for adaptation a new classification needs to be performed.

4.2 Utility Based Adaptive Frequency Hopping (Paper 5)

Contribution

Our main contribution is the definition of an interference aware adaptive frequencyhopping algorithm that overcomes the limitations outlined above. We have assumedas a reference case the IEEE 802.15.1 radio standards, thus considering an hopsethaving cardinality M = 79, and developed an adaptive hopping technique: thisdoes not require a dedicated channel classification phase due to the fact that nodesconstantly maintain estimates of channel conditions (i.e. of the packet error rateexperienced on each frequency of the hopset). These estimates are then mapped toa probability density function defining the usage probability of each channel andassigning higher usage probability to channels where nodes experience lower packeterror rate. This mapping procedure is implemented using the following expression:

Page 45: Design of Reliable Communication Solutions for Wireless Sensor Networks

4.2. UTILITY BASED ADAPTIVE FREQUENCY HOPPING (PAPER 5) 33

f : PER(x)→ f (PER(x)) =(1− PER(x))α

∑M=79y=1 (1− PER(y))α

(4.1)

that basically utilizes the estimated PER as a utility function. We note that thisapproach differs from traditional adaptive techniques where channels unsuitable fortransmissions are removed from the hopset while the remaining frequencies are allused with equal probability. We compared the performance of our algorithm withthe ones of traditional frequency hopping techniques as well as with the adaptivehopping implementation included in the specifications of IEEE 802.15.1 [8] showingthat our approach leads to lower packet error rates: an example of the obtainedresults is presented in Figure 4.1 where we show the PER achiever by the threeconsidered solutions in a frequency selective fading channel.

2 4 6 8 10 12 14 16 18 20

10−2

10−1

100

SNR [dB]

PE

R

IEEE 802.15.1IEEE AFHUBAFH, α=0.5UBAFH, α=1UBAFH, α=4

Figure 4.1: Packet Error Rate as a function of average received SNR.

We further remark that our algorithm does not involve any on-demand pro-cedure: this might reduce the time required to adapt the hopping pattern andpotentially allows for tracking varying channel conditions.

Limitations

The proposed algorithm introduces additional complexity due to the fact that nodesconstantly need to maintain and exchange estimates of channel quality and computethe utility associated to each of them. Furthermore, the channel used on each hopis synchronously selected by the nodes of the considered network using a commonseed: this is used to generate random numbers that on each slot allow to chose thecarrier to be used for the upcoming packet transmission. Implementing the randomnumber generator required for this purpose might represent a non-trivial task in

Page 46: Design of Reliable Communication Solutions for Wireless Sensor Networks

34 CHAPTER 4. UTILITY BASED ADAPTIVE FREQUENCY HOPPING

complexity constrained devices and the frequent generation of random values mightintroduce significant energy overhead. While gains resulting from this new adaptivetechnique have been evaluated and quantified in different channel scenarios, wehave not considered the effect of the added complexity that might in fact representa limiting factor for the practical implementation of the considered procedure incomplexity constrained devices such as sensor nodes. Furthermore, the algorithmhas been mainly developed for two-node topologies: while we believe that thisscenario arises in many practical applications, we are aware that this limit the valueof our contribution and that the algorithm should be applicable also to networkscomprising more than two nodes.

Page 47: Design of Reliable Communication Solutions for Wireless Sensor Networks

Chapter 5

Energy and Complexity AwareDesign of Fountain Codes forSensor Network Reprogramming

This Chapter considers the problem of energy efficient and scalable sensor networkreprogramming. Such a service, that is extremely valuable in large sensor networkswhere the manual reconfiguration of every node might not be feasible, requires codeupdates to be delivered over-the-air in an energy efficient, reliable and scalable man-ner. This task presents however several challenges: the typical size of code updatescould be in the order of some Kilobytes while the packet size commonly used bysensor devices is 20 to 100 Bytes. This means that the original program imageneeds to be partitioned in order to be transmitted and that opportune algorithmsfor code dissemination have to be designed. It should be noted that if code dissem-ination is performed on densely deployed networks, several nodes might transmitat the same time resulting in packet collisions. Traditional protocols for sensor net-works reprogramming [46]- [49] prevent this problem by adopting mechanisms forintelligent selection of senders and recover eventual data losses using NACK-basedARQ techniques. However, for high node densities or if bad channel conditionsarise (for instance due to the presence of external interference) the performance ofthe aforementioned reprogramming schemes are degraded by the so called feedback

implosion problem [50] induced by the fact that many of the originated NACKcontrol messages collide and are thus lost. This issue is solved in [51] by usinga data dissemination scheme exploiting fountain codes. We here summarize ourcontribution for the development of this reprogramming protocol.

5.1 Background and Related Literature

Fountain codes [52] are random linear codes that basically implement a Hybrid ARQstrategy and provide an effective solution for point to multi-point data dissemina-

35

Page 48: Design of Reliable Communication Solutions for Wireless Sensor Networks

36CHAPTER 5. ENERGY AND COMPLEXITY AWARE DESIGN OF

FOUNTAIN CODES FOR SENSOR NETWORK REPROGRAMMING

tion over binary erasure channels1 [53], [54] that perfectly suits the challenges ofsensor network reprogramming. The encoding procedure exploits the Digital Foun-tain paradigm introduced in [55] and is carried out in the following way: a filethat has to be disseminated (for our problem setting, the code update) is initiallydivided in K packets of equal length. The source transmits a certain number ofcoded blocks: each coded block yn is obtained as follows:

• first a block degree dn is randomly selected in the range {1, . . . ,K} accordingto an opportune degree distribution ρ(d): dn basically defines how many ofthe original K packets will be combined to obtain yn;

• then dn packets are randomly and uniformly selected among the K availableand the coded block yn is simply obtained through the bitwise modulo 2 sumof these dn packets.

The information identifying which packets have been used to obtain a certaincoded block defines the encoding vector and has to be known at the decoder2.The decoding process can be simply carried out by inverting the decoding matrixG obtained using the received encoding vectors, i.e. by solving on x the systemy = Gx; y and x respectively contain the received encoded blocks and the K originalpackets that will be retrieved once the decoding is completed. This task can forinstance be accomplished by means of Gaussian elimination and back-substitution.Note that this is possible only if the matrix G has full rank requiring thus that atleast K linearly independent coded blocks are received at the decoder. As outlinedabove coded blocks are obtained by randomly combining a certain number of theoriginal packets: in practice this might lead to linearly dependent combinations andin fact, N ≥ K coded blocks will have to be correctly received in order to allow todecode the original file.

The performance of a data dissemination algorithm exploiting fountain codescan be quantified using two metrics:

• the first one is the decoding overhead H defined as:

H = N −K (5.1)

denoting the number of additional coded blocks needed to properly decodethe original file;

• the latter is the decoding complexity, characterizing the complexity (for in-stance in terms of binary XOR operations) of the decoding process.

1In a binary erasure channel packets are either completely lost with a certain probability(referred to as erasure probability) or correctly received.

2Note that this can be achieved either by piggybacking on each coded block the particularused encoding vector or by simply communicating which seed has been used to initialize therandom generator used during the coding process, allowing thus the decoder to reproduce thesame sequence of random numbers used at the encoder side.

Page 49: Design of Reliable Communication Solutions for Wireless Sensor Networks

5.1. BACKGROUND AND RELATED LITERATURE 37

These two quantities are strongly dependent on the chosen decoding approach3

as well as on the adopted degree distribution which optimization is therefore a keyissue that needs to be addressed. This problem has for instance been consideredin [56] and [57]: authors of [56] provided a method for computing degree distribu-tions minimizing the decoding overhead of LT codes. This however is effective onlyfor messages of small length (i.e. small K) and in fact its complexity exponentiallygrows for higher K and becomes prohibitive for K > 30. An optimization schemeadopting a simulation approach that exploits importance sampling has been pro-posed in [57] and has been used to optimize the degree distribution of LT codes.In both cases authors achieve low decoding complexity by considering a messagepassing decoder (which is suboptimal in terms of overhead) and try to obtain smalldecoding overheads by optimizing the considered degree distributions. This ap-proach however might not represent the best solution for the scenario we considerthat typically involves small K: as already outlined, in these conditions LT codesresult in high decoding overhead and affect the efficiency of the data dissemination.A better solution could be to adopt a Gaussian elimination decoder and optimizethe chosen degree distribution so as to reduce the decoding complexity while main-taining low overhead.

A further problem is connected to how such a coding solution, exploiting foun-tain codes, is practically implemented. As outlined above fountain codes are randomlinear codes that require thus the use of a random number generator. This needsto be initialized with a seed: accurate choice of such seed is extremely importantsince for instance bad seeds might produce several linearly dependent coded blocksand decrease the performance of the dissemination procedure. Moreover, the choiceof the considered seed should be made accounting for the multi-hop nature of thedata dissemination and for instance seeds on adjacent links might be matched inorder to allow the recovery of corrupted information through overhearing.

3Different decoders can in fact be implemented: methods that aim at solving the system ofequations y = Gx, such as for instance Gaussian elimination are optimal in terms of overhead(meaning that any K linearly independent coded blocks are sufficient for recovering the transmit-ted file) but result in high computational complexity. For instance for Gaussian elimination thenumber of operations required to retrieve the original file is O(K3): for high K this results inprohibitive complexity and alternative approaches have been developed. One of this approaches isimplemented by LT codes [52]: these make use of a message passing decoder that is sub-optimalin terms of overhead but achieves significantly lower decoding complexity if compared to Gaussianelimination.

Page 50: Design of Reliable Communication Solutions for Wireless Sensor Networks

38CHAPTER 5. ENERGY AND COMPLEXITY AWARE DESIGN OF

FOUNTAIN CODES FOR SENSOR NETWORK REPROGRAMMING

5.2 SYNAPSE: A Network Reprogramming Protocol forWireless Sensor Networks Using Fountain Codes(Paper 6)

Contribution

Our main contribution for the development of the reprogramming protocol pre-sented in [51] is the optimization of the degree distribution of the used fountaincodes. In order to obtain degree distributions leading to both low decoding over-head and low decoding complexity we developed an optimization algorithm. Thisalgorithm adopts an iterative simulation approach that starts from an initial distri-bution which performance are progressively improved. In particular, during eachiteration, a certain number of transmissions is simulated: the ones leading to favor-able outcomes (i.e. resulting in low decoding overhead and decoding complexity)are selected and used to obtain a new distribution that is then used in the successiveiteration. The process continues until no further improvements are possible or acertain stopping criterion is met. We compared the performance of our optimiza-tion procedure with the one achieved by the algorithm proposed in [57]: examplesof the results obtained during this comparison are presented in Table 5.1 where theaverage decoding overheads for the two optimization schemes are shown. We herehave considered an LT decoder and a particular class of sparse degree distributionwhere only degrees that are power of 2 have non-zero probability of being selected.This comparison outlined the fact that our scheme basically lead to degree distri-butions whose performance are comparable and in few cases even better than theones achieved by the distributions obtained using the procedure introduced in [57]and at the same time presents a much lower computational complexity.

Table 5.1: Optimized Sparse Degree Distribution K = 128

k 16 32 64 128p1 0.221 0.212 0.161 0.187p2 0.457 0.351 0.400 0.339p4 0.188 0.288 0.256 0.275p8 0.134 0.101 0.101 0.101p16 - 0.048 0.045 0.046p32 - - 0.037 0.031p64 - - - 0.021

E[H ] 22.6 43.6 82.7 158.7Std. σ(H) 4.4 6.4 9.1 11.4

E[H ] in [57] 22.5 43.6 81.9 159.8Std. σ(H) in [57] 4.2 6.8 7.7 12.1

Page 51: Design of Reliable Communication Solutions for Wireless Sensor Networks

5.2. SYNAPSE: A NETWORK REPROGRAMMING PROTOCOL FORWIRELESS SENSOR NETWORKS USING FOUNTAIN CODES (PAPER 6) 39

0 5 10 15 20 25 300

0.02

0.04

0.06

0.08

0.1

0.12

0.14

0.16

j

p j

Figure 5.1: Degree Distribution implemented in SYNAPSE

We then used the developed algorithm to obtain optimized degree distributions:these present an overhead that is just slightly higher if compared to the one ofthe uniform distribution (which is asymptotically optimal with this respect) andreduce the decoding cost of 20-40% (depending on the specific considered K). Thedistribution obtained for K = 32, the one actually selected and implemented inSYNAPSE is plotted in Figure 5.1: it is interesting to observe the shape of theconsidered function. Low degrees have high probabilities of being selected: thisensures that the decoding matrix is sparse and that few operations are executedwhile performing Gaussian elimination. Furthermore, in order to avoid situationswhere all the coded blocks have low degrees and some of the original K packetsis never used during the encoding process the degrees close to K also have highdegree probabilities4.

Limitations

As outlined above the algorithm we have developed adopts a simulation approach:its convergence however has not been deeply investigated. This represents a draw-back with respect to the scheme proposed in [57] which convergence has been provedfor an opportune choice of the parameters of the algorithm. We further outline thatthe optimization we performed has been driven by two performance metrics: theseare decoding complexity and overhead. The chosen distribution basically imple-ments a tradeoff among these two metrics: this tradeoff however has been achieved

4This behavior can be observed also in the robust soliton distribution proposed in [52] where a“spike“ at high degrees is introduced in order to ensure that coded blocks are “connected“ (i.e. thesame packet is used in several coded blocks) and the message passing approach used for decodingcan be completed with reasonably low overhead.

Page 52: Design of Reliable Communication Solutions for Wireless Sensor Networks

40CHAPTER 5. ENERGY AND COMPLEXITY AWARE DESIGN OF

FOUNTAIN CODES FOR SENSOR NETWORK REPROGRAMMING

in an empirical way, by considering different settings for the parameters of our op-timization procedure. A different and more rigorous approach could instead adopta single metric, for instance the energy required to carry out the decoding process(comprising the energy required to receive the needed packets as well as the en-ergy consumed while performing the decoding process), and consequently designthe degree distribution so as to minimize this quantity.

5.3 Seed Optimization

In this section we further optimize the fountain codes (FC) used by the devel-oped reprogramming protocol in order to enhance the performance of its pipeliningscheme. This investigation is presented in P4 (see Section 1.3): this paper is notincluded in the thesis, thus the obtained results are here described with a level ofdetails greater than the one used in the previous chapters.

Practical implementations of FC encoders/decoders require random numbergenerators (RNG). The choice of the initialization seeds for these RNGs is partic-ularly important. In fact, the correlation among the encoding vectors of differentpackets depends on how these seeds are picked. Specifically, a wrong selection ofthe seed might lead to the transmission of linearly dependent encoded blocks andthis impacts the performance of the dissemination protocol in terms of decodingoverhead. We remark that an attractive property of fountain codes lies in the factthat the coding process can be carried out without having any a priori informationabout the channel error probability. However, while this is true when blocks areobtained through an ideal random number generator, pseudo-random number gen-erators, due to the correlation that they inherently introduce in the packet stream,cause the performance of the decoding process to depend on the particular experi-enced error rate. Nevertheless, the desirable features of FCs should not be alteredby implementation details and the chosen seeds must therefore lead to low decodingoverhead regardless of the specific channel conditions. In the following, we first de-scribe our optimization of the seed selection for a non-zero packet error probabilityand then we discuss a further optimization step that allows to use FC in conjunctionwith pipelining. Carrying out this study on real sensor nodes would have been timeprohibitive. In order to perform a significant number of experiments and charac-terize the performance of the seeds with high accuracy, we exactly reproduced theselected LFSR (Linear Feedback Shift Register) random generator in a simulatorand performed our investigations over the full set of available seeds.

Seed Optimization Against Channel Errors

For a given block length K = 32, given the set of all possible seeds, R, and inabsence of channel errors (p = 0), we first identified the set R0 including all seedsleading to a zero decoding overhead. We then restricted our investigation to theseseeds and characterized their performance over noisy channels, estimating for each

Page 53: Design of Reliable Communication Solutions for Wireless Sensor Networks

5.3. SEED OPTIMIZATION 41

of them the decoding overhead. We considered independent packet losses over anerasure channel with packet error probability p.

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.832

32.5

33

33.5

34

34.5

35

35.5

36

36.5

37

p

N(x

)

x=R0

x=Rx=R

2

x=R1

Figure 5.2: E[N ] for different seed sets.

Fig. 5.2 shows the average number of coded blocks that need to be successfullyreceived in order to allow the correct decoding of the original transmitted file.The solid line denotes the performance of the distribution presented in Section5.2 considering p = 0 and averaging over all seeds in R. In this case, E[N ] isN(R) = 34.92 which is slightly higher than the value computed using an idealrandom generator (E[N ] = 34.26), due to the non ideality of the implementedRNG. The dotted line shows the average performance for the seeds in R0, referredto as N(R0). The decoding overhead for these seeds increases for increasing p,approaching N(R) when p ≈ 0.8: this basically means that the choice of the seedis of little importance when p is very large. This behavior is expected as a large pwill lead to many lost packets thus reducing the correlation among the few packetsthat are successfully delivered. We noticed that different seeds in R0 do behavedifferently. Hence, we performed an exhaustive search over R0 and identified afurther set R1 ⊂ R0 comprising all seeds for which E[N ] ≤ N(R0). In principle,a different set R1 should be obtained for each value of p, as the same seed mightperform differently for different error rates. However, we noticed that, besides asmall number of exceptions, seed behaviors were quite uniform, i.e., seeds thatperform well when p is low usually perform well also at higher p. In other words,the ranking among seeds in terms of decoding performance is preserved as p varies.Therefore, we empirically obtained R1 for p = 0.4 as representative of all possiblesets. After this, we verified that every seed in R1 has in fact very low decodingoverhead for a wide range of channel error probabilities. In Fig. 5.2 we show E[N ] forthe seeds in R1 and denote their average performance by N(R1). In the same figure,

Page 54: Design of Reliable Communication Solutions for Wireless Sensor Networks

42CHAPTER 5. ENERGY AND COMPLEXITY AWARE DESIGN OF

FOUNTAIN CODES FOR SENSOR NETWORK REPROGRAMMING

we also show the performance (N(R2)) obtained from a third set R2, including allseeds for which E[N ] > N(R0).

Seed Selection for Pipelining

A further optimization step has investigated the behavior of SYNAPSE in multi-hop environments, considering the performance implications of the selected seedson pipelining algorithms. With reference to the scenario depicted in Fig. 5.3, hop-by-hop data dissemination techniques start transmitting to nodes in hop k+ 1 onlywhen all nodes in hop k have completely received all data blocks. Instead, schemesusing pipelining initiate the dissemination towards hop k + 1 as soon as the firstnode in hop k decodes a valid data block. A further advantage of pipelining isthe possibility of correcting transmission errors (at nodes within the current hop)while forwarding transport blocks towards the next hop through overhearing. Ifthe seeds used at hop k and k + 1 are matched for this purpose, overhearing couldspeed up the dissemination process, i.e., unsuccessful nodes at hop k could correcttheir losses thanks to the data being forwarded towards hop k + 1.

hop k hop k + 1

Figure 5.3: Data dissemination over multiple hops.

Set R1 has been extensively tested by quantifying the affinity of seed pairs(sk, sk+1) used over hops k and k + 1. In particular, ∀(sk, sk+1) ∈ R1, with sk 6=sk+1, we determined the recovery probability for a given node within hop k in thefollowing manner

• The transmission process starts at hop k sending a transport block of K ′

packets using seed sk.

• We considered only those cases where at least one node within hop k + 1successfully decodes the considered file and forwards it using seed sk+1 (againK ′ packets are encoded using sk+1).

• Conditioned on this, we finally computed the probability that any other nodewithin hop k + 1 can successfully decode only using the two transmissionsabove (thus a maximum of 2K ′ packets).

Page 55: Design of Reliable Communication Solutions for Wireless Sensor Networks

5.3. SEED OPTIMIZATION 43

We noticed that the behavior of seed pairs in terms of the above recovery prob-ability only marginally depends on p. Also, only a few seeds in R1 have shown asignificant performance loss when coupled with other seeds, while the large major-ity of them led to good multi-hop performance. Thus a fourth set R∗ ⊂ R1 hasbeen obtained by eliminating those few bad seeds from R1. Examples of the gainsachievable introducing this further optimization step are shown in Figs. 5.4 and 5.5where we plot respectively E[N ], i.e., the average number of packets after whichwe can recover a transmitted file, and recovery probability for R∗ and another setR3 having the same cardinality and containing seeds randomly picked in R. Forthese graphs we considered K ′ = K + 4 = 36. It should be observed that theoptimizations carried out in this section have led to large improvements for bothperformance measures.

0 0.1 0.2 0.3 0.4 0.532

34

36

38

40

42

44

46

48

50

52

p

N(x

)

x=R3

x=R*

Figure 5.4: E[N ] using seeds belonging to R∗ and R3 for K ′ = 36. Vertical barsindicate 95% confidence intervals.

We conclude this section with some considerations on the cardinality of thedifferent sets that were identified. Working with words of 16 bits means that Rcontains 216 − 1 = 65535 seeds. For computational reasons we restricted our studyto 5000 seeds, randomly picked in this set. About 10% of them, i.e., slightly morethan 500 seeds, belong to R0. The cardinality of R1 is |R1| = 50 and R∗ has 35elements meaning that, on average and for the considered RNG, only 1 out of 150seeds possesses all the required properties.

Page 56: Design of Reliable Communication Solutions for Wireless Sensor Networks

44CHAPTER 5. ENERGY AND COMPLEXITY AWARE DESIGN OF

FOUNTAIN CODES FOR SENSOR NETWORK REPROGRAMMING

0 0.1 0.2 0.3 0.4 0.50

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

p

Rec

over

y P

roba

bilit

y

x=R3

x=R*

Figure 5.5: Recovery probability using seeds belonging to R∗ and R3 for K ′ = 36.Vertical bars indicate 95% confidence intervals.

Page 57: Design of Reliable Communication Solutions for Wireless Sensor Networks

Chapter 6

Conclusions

6.1 Concluding Remarks

Reliability represents today one of the major barriers to the adoption of wirelesscommunications for sensing and control applications: this limits the potential ofwireless sensor networks and slows down the diffusion of this new technology. Inorder to overcome this problem awareness on the causes of unreliability and on thepossible solutions to this issue has to be created. In this thesis we investigatedthree different approaches that have the potential to improve reliability at thecommunication level and increase the resilience of sensor networks against radiointerference which is in fact the dominant factor among the ones responsible forunreliable communications.

In the first part of the thesis we considered dynamic spectrum access-basedinterference avoidance and developed and algorithm that implements the idea ofchannel surfing and aims at exploiting spectrum holes in the frequency domain. Wehave shown that identifying those holes through spectrum sensing is a feasible taskthat can be performed by devices with low capabilities but it requires energy andtime and might thus not be an effective solution if interference is highly dynamicor the specific application is delay sensitive. In the second part we focused ourattention on frequency hopping technologies and proposed a new adaptive algo-rithm: this scheme implements a new approach for frequency hopping systems andutilizes the available channels with probability proportional to experienced channelconditions. Our performance evaluation has shown that the developed algorithmoutperforms traditional frequency hopping as well as the adaptive hopping imple-mentations specified by current standards such as the IEEE 802.15.1 resulting inlower packet error rates. This might be used to reduce transmitting power andconsiderably improve energy efficiency. Finally in the third part we investigatedthe potential of fountain codes in the context of sensor network reprogramming andprovided a way for engineering this coding solution so as to meet the energy andcomplexity constraints of wireless sensor nodes.

45

Page 58: Design of Reliable Communication Solutions for Wireless Sensor Networks

46 CHAPTER 6. CONCLUSIONS

6.2 Future Work

We here outline possible directions for future work. As mentioned in the previoussection, if the interference pattern is highly dynamic it might not be possible toidentify and avoid interfered frequencies and a better solution could be to exploit inan opportunistic manner spectrum holes in the time domain for instance transmit-ting when interfering devices are idle. In order to implement this strategy dedicatedspectrum sensing algorithms will have to be developed. We further note that thesetwo approaches, respectively aiming at exploiting spectrum opportunities in the fre-quency or time domain might be suitable for different interference scenarios: if theinterference pattern is quite static and changes slowly over time the first strategymight be the best solution while the second ones might be more effective in highlydynamic channels. Identifying under which conditions one approach outperformsthe other is an interesting issue and we anticipate its investigation in our futurework.

Finally, in this thesis we have considered both interference avoidance throughdynamic spectrum access and interference mitigation by means of frequency hop-ping: comparing this two techniques for instance considering different channel set-tings and traffic patterns can provide guidelines that might be used to select thescheme that better suits a specific scenario.

Page 59: Design of Reliable Communication Solutions for Wireless Sensor Networks

Bibliography

[1] “Wireless Sensor Networks: Mass Market Opportunities“, ON World, 2004.

[2] “10 Emerging Technologies That Will Change the World“, MIT TechnologyReview, February 2003.

[3] Peter Harrop, “Wireless Sensor Networks 2009-2019“, November 2008.

[4] “Network Operations Platforms: a New Segment in an Expanded WirelessSensor & Control Network Market Category“, Network Operations PlatformWhite Paper.

[5] S. Methley, C. Forster, C. Gratton, S. Bhatti, N. J. Teh, “Wireless SensorNetworks Final Report“, May 2008.

[6] J. Morse, “Market Pulse: Wireless in Industrial Systems: Cautious Enthusi-asm“, Embedded Systems, Winter 2006

[7] “Part 15.4: Wireless Medium Access Control (MAC) and Physical Layer(PHY) Specifications for Low-Rate Wireless Personal Area Networks(WPANs)“, ANSI/IEEE Standard 802.15.4-2006, revision of IEEE Standard802.15.4-2003.

[8] “Part 15.1: Wireless medium access control (MAC) and physical layer (PHY)specifications for wireless personal area networks (WPANs )“, ANSI/IEEEStandard 802.15.1-2005.

[9] G. Mulligan, “The 6LoWPAN Architecture“ in Proceedings of the 4th work-shop on embedded networked sensors, June 2007.

[10] “Why Wireless HART? The Right Standard at the Right Time“, white paper,October 2007. Available online at www.hartcomm2.org.

[11] “WSN for Smart Industries: A Market Dynamics Report“, OnWorld, Septem-ber 2007.

[12] ZigBee Alliance, “ZigBee Specification“ Version 1.0, June 2005.

47

Page 60: Design of Reliable Communication Solutions for Wireless Sensor Networks

48 BIBLIOGRAPHY

[13] P. Dutta, J. Hui, J. Jeong, S. Kim, C. Sharp, J. Taneja, G. Tolle, K. White-house and D. Culler, “Trio: Enabling Sustainable and Scalable Outdoor Wire-less Sensor Network Deployments“ in Proceedings of the Fifth InternationalConference on Information Processing in Sensor Networks (IPSN), 2006.

[14] C. Park and P. H. Chou, “AmbiMax: Autonomous Energy Harvesting Platformfor Multi-Supply Wireless Sensor Nodes“ in Proceedings of IEEE SECON, June2006.

[15] Mousăloiu-E.,R. and Terzis, A., “Minimising the effect of WiFi Interference in802.15.4 Wireless Sensor Networks“, in International Journal on Sensor Net-works, Vol. 3, No. 1, pp. 43–54, 2008.

[16] Crossbow Technology Inc. “Avoiding RF interference between WiFi and Zig-bee“, 2004, Available at: http://www.xbow.com/products/Product_pdf_

files/Wireless_pdf/ZigBeeandWi\%FiInterference.pdf.

[17] “WSN for Smart Buildings“, ON World, 2007.

[18] IEEE 802.15 WPAN task group 2 (TG2). Available online at: http://www.

ieee802.org/15/pub/TG2-Coexistence-Mechanisms.html

[19] “Technical Overview of Time Synchronized Mesh Protocol (TSMP)“, whitepaper, Dust Networks, October 2007. Available online at www.dustnetworks.

com.

[20] “Part 15.4: Wireless Medium Access Control (MAC) and Physical Layer(PHY) Specifications for Low-Rate Wireless Personal Area Networks(WPANs)“, Amendment 1: Add Alternate PHYs, ANSI/IEEE Standard802.15.4a-2007, amendment to IEEE Standard 802.15.4-2006.

[21] W. Xu, T. Wood, W. Trappe, Y. Zhang, “Channel Surfing and Spatial Re-treats: Defenses against Wireless Denial of Service“, in Proceedings of the 3rd

ACM workshop on Wireless security (WiSe), 2004.

[22] M. A. McHenry, “NSF Spectrum occupancy measurements project summary“,Shared Spectrum Company, Tech. Rep., Aug. 2005. Available at http://www.

sharedspectrum.com/

[23] G. Zhou, T. He, J. A. Stankovic, T. Abdelzaher, “RID: Radio Interference De-tection in Wireless Sensor Networks“, in Proceedings of 24th Annual Joint Con-ference of the IEEE Computer and Communications Societies (INFOCOM),2005.

[24] R. C. Shah, L. Nachman, “Interference Detection and Mitigation in IEEE802.15.4 Networks“, in Proceedings of the IEEE/ACM International Confer-ence on Information Processing in Sensor Networks (IPSN), 2008.

Page 61: Design of Reliable Communication Solutions for Wireless Sensor Networks

BIBLIOGRAPHY 49

[25] R. Mousăloiu-E., A. Terzis, “Minimising the effect of WiFi Interference in802.15.4 Wireless Sensor Networks“, in International Journal on Sensor Net-works, Vol. 3, No. 1, 2008.

[26] W. Xu, W. Trappe, Y. Zhang and T. Wood, “The Feasibility of Launching andDetecting Jamming Attacks in Wireless Networks“, in Proceedings of the 6th

ACM International Symposium on Mobile ad hoc Networking and Computing(MobyHoc), 2005.

[27] W. Xu, W. Trappe and Y. Zhang, “Defending Wireless Sensor Networks fromRadio Interference through Channel Adaptation“ in ACM Transactios on Sen-sor Networks, Vol. 4, No. 4, August 2008.

[28] J. So and N. Vaidya, “Multi-Channel MAC for Ad Hoc Networks: HandlingMulti-Channel Hidden Terminals Using A Single Transceiver“, in Proceedingsof the Fifth ACM International Symphosium on Mobile Ad Hoc Networkingand Computing (MobiHoc), 2004.

[29] S. Geirhofer, L. Tong, B. M. Sadler, “Dynamic Spectrum Access in WLANChannels: Empirical Model and its Stochastic Analysis“, in Proceedings of thefirst International Workshop on Technology and Policy for Accessing Spectrum(TAPAS), 2006.

[30] Q. Zhao, L. Tong, A. Swami, Y. Chen, “Decentralized Cognitive MAC forOpportunistic Spectrum Access in Ad Hoc Networks: A POMDP Framework“,in IEEE Journal on Selected Areas in Communications, Vol. 25, No. 3, April2007.

[31] W. Xu, W. Trappe and Y. Zhang, “Channel Surfing: Defending Wireless Sen-sor Networks from Interference“, in Proceedings of International Conferenceon Information Processing in Sensor Networks (IPSN), 2007.

[32] S. Haykin, “Cognitive Radio: Brain-Empowered Wireless Communications“,in IEEE Journal on Selected Areas in Communications, Vol. 23, No. 2, 2005.

[33] G. Mainland, D. C. Parkes, M. Welsh, “Decentralized, Adaptive Resource Allo-cation for Sensor Networks“, Proceedings of the 2nd Symposium on NetworkedSystems Design and Implementation (NSDI), 2005.

[34] R. S. Sutton and A. G. Barto, “Reinforcement Learning: An Introduction“,MIT press, Cambridge, MA, 1998.

[35] R. Wattenhofer, L. Li, P. Bahl, and Y.-M. Wang. “Distributed Topology Con-trol for Power Efficient Operation in Multihop Wireless Ad Hoc Networks“, inProceedings of the 20th Joint Conference of the IEEE Computer and Commu-nications Societies (INFOCOM), 2001.

Page 62: Design of Reliable Communication Solutions for Wireless Sensor Networks

50 BIBLIOGRAPHY

[36] R. Madan and S. Lall, “An Energy-Optimal Algorithm for Neighbor Discoveryin Wireless Sensor Networks“, in Mobile Networks and Applications, Vol. 11,No. 3, June 2006.

[37] A. Lew, H. Mauch, “ Dynamic Programming - a Computational Tool“,Springer, 2007.

[38] M. Micheli and M. I. Jordan, “Random Sampling of a continuous-time stochas-tic dynamical system“, in Proceedings of the 15th International Symphosyumon Mathematical Theory of Networks and Systems, August 2002.

[39] B. Sinopoli, L. Schenato, M. Franceschetti, K. Poolla, M. I. Jordan, and S. S.Sastry, “Kalman Filtering with Intermittent Observations“, in IEEE Transac-tions on Automatic Control, Vol. 49, No. 9, September 2004.

[40] J. P. Hespanha, P. Naghshtabrizi and Y. Xu, “A Survey of Recent Resultsin Networked Control Systems“, in Proceedings of the IEEE, Vol. 95, No. 1,January 2007.

[41] Y. Mostofi and R. M. Murray, “Kalman filtering over wireless fading channels -How to handle packet drop“, in International Journal of Robust and NonlinearControl, 2008

[42] F.-L. Lian, J. Moyne and D. Tilbury, “Network Design Consideration for Dis-tributed Control Systems“, in IEEE Transactions on Control Systems Tech-nology, Vol. 10, No. 2, March 2002.

[43] L. Stabellini and A. Proutiere, “Evaluating Delay and Energy in Sensor Net-works with Sporadic and Correlated Traffic“, in Proceedings of 7th Scandina-vian Workshop on Wireless Ad-Hoc Networks (ADHOC ´07), May 2007.

[44] M. C.-H. Chek, Y.-K. Kwok, “Design and Evaluation of Practical CoexistenceManagement Schemes for Bluetooth and IEEE 802.11b Systems“, in ComputerNetworks, Vol. 51, Issue 8, June 2007.

[45] H. Yomo, P. Popovski, H. C. Nguyen, R. Prasad, “Adaptive Frequency Rollingfor Coexistence in the Unlicensed Band“, in IEEE Transactions on WirelessCommunications, Vol. 6, No. 2, February 2007.

[46] J. W. Hui, D. Culler, “The Dynamic Behavior of a Data Dissemination Pro-tocol for Network Programming at Scale“, in proceedings of ACM SenSys,Baltimore, Maryland, USA, November 2004.

[47] S. S. Kulkarni, L. Wang, “MNP: Multihop Network Reprogramming Servicefor Sensor Networks“, in proceedings of IEEE ICDCS, Columbus, Ohio, USA,June 2005.

Page 63: Design of Reliable Communication Solutions for Wireless Sensor Networks

BIBLIOGRAPHY 51

[48] M. D. Krasniewski, R. K. Panta, S. Bagchi, C.-L. Yang, W. J. Chappell,“Energy-efficient, On-demand Reprogramming of Large-Scale Sensor Net-works“, in ACM Transactions on Sensor Networks, Vol. 4, No. 1, 2008.

[49] R. K. Panta, I. Khalil, S. Bagchi, “Stream: Low Overhead Wireless Reprogram-ming for Sensor Networks“, in proceedings of IEEE INFOCOM, Anchorage,Alaska, USA, May 2007.

[50] J. Nonnenmacher, E. W. Biersack, D. Towsley, “Parity-Based Loss Recoveryfor Reliable Multicast Transmission“, in IEEE/ACM Transactions on Network-ing, Vol. 6, No. 4, 1998.

[51] M. Rossi, G. Zanca, L. Stabellini, R. Crepaldi, A. F. Harris III, M. Zorzi,“SYNAPSE: A Network Reprogramming Protocol for Wireless Sensor Ne-toworks using Fountain Codes“, in proceedings of IEEE SECON, San Fran-cisco, CA, US, June 2008.

[52] M. Luby, “LT Codes“, in Proceedings of the 43rd Annual IEEE Symphosiumon Foundations of Computer Science, Vancouver, B.C., Canada, November2002.

[53] D. J. C. MacKay, “Fountain Codes“, in IEE Proceedings - Communications,Vol. 152, No. 6, 2005.

[54] D. J. C. MacKay, “Information Theory, Inference and Learning Algorithms“,Cambridge University Press, 2003.

[55] J. W. Byers, M. Luby, M. Mitzenmacher, A. Rege, “A Digital Fountain Ap-proach to Reliable Distribution of Bulk Data“, in Proceedings of ACM SIG-COMM, Vancouver, B.C., September 1998.

[56] E. Hyytiä, T. Tirronen, J. Virtamo, “Optimal Degree Distribution for LTCodes with Small Message Length“, in Proceedings of the 26th IEEE Interna-tional Conference on Computer Communications (INFOCOM), 2007.

[57] E. Hyytiä, T. Tirronen, J. Virtamo, “Optimizing the Degree Distribution ofLT Codes with an Importance Sampling Approach“, in Proceedings of 6th

International Workshop on Rare Event Simulation, RESIM 2006 ,Bamberg,Germany, October 2006.

Page 64: Design of Reliable Communication Solutions for Wireless Sensor Networks
Page 65: Design of Reliable Communication Solutions for Wireless Sensor Networks

Part II

Paper Reprints

53

Page 66: Design of Reliable Communication Solutions for Wireless Sensor Networks
Page 67: Design of Reliable Communication Solutions for Wireless Sensor Networks

Chapter 7

Energy Efficient Detection ofIntermittent Interference inWireless Sensor Networks

Luca Stabellini, Jens ZanderSubmitted to International Journal on Sensor Networks (IJSNET), March 2009.

55

Page 68: Design of Reliable Communication Solutions for Wireless Sensor Networks
Page 69: Design of Reliable Communication Solutions for Wireless Sensor Networks

57

Energy Efficient Detection ofIntermittent Interference inWireless Sensor Networks

Abstract: Interference is a severe concern in wireless sensor networks (WSNs): sen-sors communications are easily corrupted by transmissions of other devices that leadingto packet losses might potentially increase data delay and energy consumption of sen-sor nodes. Dynamic Spectrum Access (DSA) mechanisms can mitigate these problems.These approaches allow frequency agile sensor networks to avoid frequency bands ex-periencing high interference levels and select channels suitable for their transmissions.In this context, detecting interference and identifying spectrum opportunities in a re-liable and efficient manner becomes a task of vital importance. This paper proposesa new interference detection algorithm for wireless sensor networks accounting bothfor energy and complexity constraints of sensor motes as well as for the intermittentnature of interference typically experienced by sensor networks in unlicensed bands.We develop an analytical framework that allows to explicitly characterize the perfor-mance of our algorithm and show how it is possible to tune its parameters so as toachieve a desired behavior while minimizing energy consumption. We implement theproposed interference detection scheme on the TMote Sky sensor platform and test itseffectiveness over the 16 IEEE 802.15.4 channels in the 2.4 GHz ISM band. Resultsobtained during our performance evaluation are in good agreement with the developedanalytical framework, showing the effectiveness of our interference detection scheme inidentifying interfered channels.

Keywords: Energy-Aware Spectrum Sensing; Interference Detection; Coexistence inUnlicensed Bands; Wireless Sensor Networks.

1 INTRODUCTION

1.1 Background

Packet transmissions of low-power sensor nodes are eas-ily corrupted by interference generated by other collocatedwireless devices that might induce packet losses eventuallyincreasing data delay and energy consumption. This re-sults in degraded performance and has to be prevented forinstance by avoiding interference. With this respect DSA-like interference avoidance algorithms tailored to wire-less sensor networks have been recently proposed: ex-amples can be found in Xu, Trappe, and Zhang (2007)and Stabellini and Zander (2008). These algorithms basi-cally implement interference-aware communication proto-cols where sensor nodes can detect and consequently avoidinterfering signals by selecting in an opportunistic mannerthe frequency channel used for their transmissions.

In order to make these schemes effective sensor devicesmust be capable of identifying sources of interference. Sucha procedure is normally carried out through spectrum sens-

ing and is indeed a demanding task that might requirecomplex algorithms aiming for instance at identifying sig-nals with unknown modulations or low power levels. Fur-thermore, it becomes even more challenging in the con-text of energy and complexity constrained wireless sensornetworks. Spectrum sensing requires extensive usage ofthe radio unit which represents the major source of en-

ergy consumption for wireless sensor nodes (Dunkels et al.(2007)). In order to meet the constraints of sensor net-works and enable the adoption of interference avoidanceschemes based on dynamic spectrum access energy effi-cient spectrum sensing algorithms for interference detec-tion have thus to be designed.

In particular an effective interference detection schememust meet several requirements which are specific to theconsidered scenario. It has to be simple and energy ef-

ficient in order to be suitable for energy and complexityconstrained devices. It has to provide reliable outcomesand correctly identify spectrum opportunities and inter-fered channels. Finally we note that common sources ofinterference for wireless sensor networks are packet trans-missions of other devices operating in the same frequencyband: with this respect a clear example is provided bythe problematic coexistence among the IEEE 802.15.4 andIEEE 802.11 radio standards in the 2.4 GHz ISM band(Petrova et al. (2006)). A properly designed algorithmfor spectrum sensing has to account for the intermittent

nature of such sources of interference. In fact interferedfrequencies might be perceived as idle for a significant frac-tion of time and in order to cope with this peculiarity anddetect interfering transmissions it might be necessary tosense the considered channel at different time instants.

Copyright c© 200x Inderscience Enterprises Ltd.

Page 70: Design of Reliable Communication Solutions for Wireless Sensor Networks

58CHAPTER 7. ENERGY EFFICIENT DETECTION OF INTERMITTENT

INTERFERENCE IN WIRELESS SENSOR NETWORKS

1.2 Related Work and Contribution

Interference detection in sensor networks has recently re-ceived considerable attention and for this purpose severalschemes have been proposed. These can be classified basedon the particular kind of interference that sensor nodeswant to detect. A first high level distinction can be madeamong intra-network and inter-network interference: inthe first case transmissions of sensors belonging to the samenetwork interfere with each other while in the latter sce-nario interference is generated by devices that are not partof the considered sensor network. An algorithm for detect-ing intra-network interference has been proposed by Zhouet al. (2007) that have developed a scheme for identifyingpotential interference among the nodes of a sensor networkand used this algorithm to design collision-free TDMA pro-tocols. Inter-network interference can further be classifiedin homogeneous and heterogeneous : the first case ariseswhen similar devices (for instance operating within thesame radio standard) mutually interfere while the secondsituation involves heterogeneous terminals. The homoge-neous case has been considered by Shah and Nachman(2008) that have presented a method for detecting andmitigating interference among collocated IEEE 802.15.4PANs. Mousaloiu and Terzis (2008) have instead focusedon the heterogeneous scenario and have developed an al-gorithm aiming at detecting WiFi interference in IEEE802.15.4 based wireless sensor networks. This has beendone considering different interference estimators based onRSSI (Received Signal Strength Indicator) and experimen-tally evaluating their effectiveness.

These works normally assume that interference is inci-dental: however in certain situations malicious users mightintentionally generate traffic that interferes with transmis-sions of sensor nodes. The detection of these forms of in-tentional jamming has been considered by Xu et al. (2006)that have discussed the feasibility of identifying jammingactivities using measurements of signal strength, carriersensing time and packet delivery ratio.

In this paper we focus on the general inter-network het-erogeneous case and consider a receiver centric perspectivewhere each sensor node independently chooses the channelused for receiving packets and avoid interference by ex-ploiting spectrum holes in the frequency domain. In thiscontext we address the problem of designing an energy effi-cient algorithm that can be used to select a frequency bandpresenting favorable interference conditions; these condi-tions will likely result in a packet error rate that is boundedby a defined maximum threshold. To this purpose:

1) we define a spectrum sensing algorithm suitable fordetecting interference in low-complexity wireless de-vices;

2) we provide a framework that allows to design the con-sidered algorithm and tune its parameters so as toachieve a specified performance level while minimiz-ing energy consumption;

3) we evaluate the obtained procedure on real motes, im-plementing our sensing scheme on the Tmote Sky sen-sor platform and testing its effectiveness over differentchannel scenarios.

Our work addresses a problem similar to the one in-vestigated by Mousaloiu and Terzis (2008). However, thealgorithm we propose classifies channels as Interfered orClear: the sensing procedure can therefore be stopped assoon as an interference-free channel is identified. Thissignificantly differentiates from the scheme developed byMousaloiu and Terzis (2008) where no absolute classifica-tion is adopted, all the available channels are sensed andconsequently ranked using a defined metric and the bestone is selected for packet transmissions. Identifying underwhich conditions one approach outperforms the other isout of the scope of this work.

The rest of this paper is organized as follows. Section 2outlines the models that have been considered in our in-vestigation. Section 3 introduces our problem formulation.Section 4 describes the structure of the sensing scheme andoutlines the importance of its parameters: the energy ef-ficient choice of these parameters is discussed in Section5. Section 6 shows with a simple example how the pro-posed algorithm can be designed in a specific applicationcase; finally Section 7 presents our performance evaluationon real sensor nodes and Section 8 draws conclusions andoutlines the limitations of our work.

2 SYSTEM MODEL

2.1 Scenario and Communication Model

The scenario we consider (see Figure 1) consists of an un-licensed spectrum band partitioned in a set of M channels{c1, c2, . . . , cM}. On these channels operate low-power andlow-complexity wireless sensor nodes (S1, S2, . . . , Sj) aswell as other devices (I1, I2, . . . ) that are less severely con-strained in energy and complexity. They can for instancetransmit with higher power in order to achieve a higherdata rate. We denote the location of sensor Si with ~Si:components of vector ~Si =

(

six, siy

, siz

)

define the positionof the considered sensor in an opportune reference system.All terminals are supposed to be selfish and do not tryto coordinate their transmissions: as outlined above thefrequency band we consider is unlicensed, and terminalscan therefore transmit without accounting for the interfer-ence that they eventually cause to others. Note that thisscenario differs from a typical licensed setting where sec-ondary users have to limit interference induced to primaryuser transmissions.

The interference avoidance scheme adopted by sensorsin order to handle interference generated by the set of in-terfering devices {I1, I2, . . . } is the one introduced by Sta-bellini and Zander (2008). Each node aims at identifyingits own frequency spectrum hole, i.e. a channel that thenode perceives as not interfered: this channel is used for

Page 71: Design of Reliable Communication Solutions for Wireless Sensor Networks

59

State of the M channels and interference vectors at ~Si:

Busy Idlef

t

I1

I2

S1

S2

Sj

Si

c1

cM ψ

(

cM , ~Si

)

ψ

(

c1,~Si

)

Figure 1: Considered scenario: node Si experiences in-terference from I1 and I2. The state of the available Mchannels is shown over the time-frequency domain.

receiving packets (with reference to Figure 1, Si might forinstance chose channel cM ). On the other hand, in or-der to communicate with its neighbors that might listenon different channels, a node dynamically switches its ra-dio unit on the appropriate frequency prior to each packettransmission. We remark that this scheme does not makeany assumption on the sensor communication paradigm oron the network topology and can therefore be applied to abroad variety of sensor network scenarios.

2.2 Interference Model

Interfering terminals (I1, I2, . . . ) use for their transmissionsa subset of the available channels. At a certain time in-stant a channel c used by interfering nodes can thereforebe in two different states (see Figure 1): Idle if no inter-fering traffic is generated and Busy if instead some of theinterfering devices is accessing c for packet transmissions.Unutilized channels are instead always in the idle state.According to the classification proposed by Xu, Trappe,and Zhang (2008) interfering traffic is supposed to be inci-

dental (thus transmissions of interfering devices do not in-tentionally overlap with sensors’ packets) and for instancewe do not consider intentional jamming: for an overviewof techniques allowing to detect and consequently avoid ormitigate jamming attacks in sensor networks the reader isreferred to Law et al. (2009); Wood, Stankovic and Gang(2007); Xu et al. (2006).

Following the model introduced by Geirhofer, Tong andSadler (2006) we describe the dynamics of interferenceusing a two-state semi-Markov model: busy periods last

for the time required to carry out packet transmissionswhile the length of idle periods is assumed to be expo-nentially distributed. Mean durations of busy and idleperiods on channel c are respectively equal to E[TB(c)]and 1

λI(c) . Channel occupancy is defined by the parameter

ρ(c) ∈ [0, 1]:

ρ(c) =E[TB(c)]

E[TB(c)] + 1λI (c)

(1)

that represents the average fraction of time during whichc is in the busy state. Finally, the level of interferenceexperienced on channel c at location ~Si is characterized bythe Interference Vector defined according to:

ψ

(

c, ~Si

)

,

(

ρ(c), γI

(

c, ~Si

))

(2)

where γI

(

c, ~Si

)

=σ21(c, ~Si)σ20(c)

. σ20(c) here denotes the aver-

age power of noise and σ21

(

c, ~Si

)

the average total power

in case of interference (the noise power is supposed to belocation independent). Note that this will basically mapthe set of available channels (at a certain location) ontothe Interference Domain defined by:

ID , {ψ = (ρ, γI) : ρ ∈ [0, 1], γI ∈ [1,+∞)} (3)

It should be remarked that while the definitions of Idleand Busy channel given above are not location dependent,the actual level of experienced interference depends on~Si thus the same interfering traffic over the same chan-nel might lead to different interference vectors and resultin different perceived interfering powers depending on theparticular considered location.

2.3 Sensing and Energy Model

In order to identify frequency spectrum holes and deter-mine the presence of interference, sensor nodes can sensethe medium and collect channel samples. Sensing is per-formed by means of energy detection. For channel c andat location ~Si we assume that the channel noise as well asthe superposition of noise and signals of interfering devicescan be modeled as white Gaussian processes with power

respectively equal to σ20(c) and σ

21

(

c, ~Si

)

(note that this

assumption generally does not hold if different interferingflows, which might be perceived by the same node with dif-ferent power levels, share the same channel(s)). Therefore

if we let X denote a sample collected over c at ~Si during asensing operation we will have that:

{

X ∼ N(

0, σ20(c)

)

if c is Idle

X ∼ N(

0, σ21

(

c, ~Si

))

if c is Busy(4)

A similar assumption has already been made by Geirhofer,Tong and Sadler (2006) and Zhao et al. (2007). Collectinga channel sample requires a sensor node to use its radiounit and has an associated elementary energy cost equalto EU .

Page 72: Design of Reliable Communication Solutions for Wireless Sensor Networks

60CHAPTER 7. ENERGY EFFICIENT DETECTION OF INTERMITTENT

INTERFERENCE IN WIRELESS SENSOR NETWORKS

3 PROBLEM FORMULATION

As already outlined, the algorithm we propose is executedby a sensor node to asses the available channels aimingat selecting a frequency band that will be used to receivepackets. After being tested a channel is classified eitheras interfered or clear. Given the interference vector ψ =ψ(c, ~S) of channel c at location ~S, we denote with PI(ψ)the probability that c is classified as interfered.

From a communication perspective we can character-ize the quality of channel c at a defined location ~S usingthe packet error rate (PER) induced by the interference

vector ψ(c, ~S). We here assume that such packet error

rate PER(

ψ(c, ~S))

can roughly be estimated (or eventu-

ally upper bounded) for instance by knowing the modula-tion technique employed by sensors at the physical layerand assuming that each bit/symbol is received with a cer-tain minimum power level. A properly designed interfer-ence detection algorithm should be able to identify andavoid channels with interference conditions leading to anunacceptably high packet error rate and select instead fre-quency bands that are not used by interfering devices orpresent interfering activities that result in sporadic loss ofpackets and induce a low packet error rate. The energyefficient design of such a scheme is the problem addressedin this paper.

Let’s assume that a node can’t tolerate a packet errorrate greater that a certain maximum threshold PER

Max

while it is willing to operate on a channel if the experiencedPER is less than PER

Tol< PER

Max. This allows todefine over the interference domain two regions:

I ={

ψ : ψ ∈ ID, PER (ψ) ≥ PERMax

}

C ={

ψ : ψ ∈ ID, PER (ψ) ≤ PERTol

}

Using definitions analogous to the ones introduced byHaykin (2005) we might call channels whose interferencevectors belong to C (Clear) or I (Interfered) respectivelywhite spaces or black spaces. Let’s further assume that itis possible to find two interference vectors ψMax and ψ

Tol

such that:

ψMax :

PER(

ψMax

)

= PERMax

,

I ⊆{

ψ : PI(ψ) ≥ PI(ψMax)

}

ψTol :

PER(

ψTol

)

= PERTol,

{

ψ : PI(ψ) ≤ PI(ψTol)

}

⊆ C

(5)

The considered situation is sketched in Figure 2. The prob-lem we want to solve is to design an interference detectionscheme such that:

• if the interference vector of a channel belongs to I(thus the channel is a black space) then that channelis classified as interfered with probability greater thana minimum threshold PMin

D ;

ρ

γI =σ21

σ20

C

PI(ψ) = PI(ψMax)

PI(ψ) = PI(ψTol)

I

ψTol

ψMax

PI(ψ) ≥ PI(ψMax)

PI(ψ) ≤ PI(ψTol)

Figure 2: Sketch of the two regions (continuous lines) Cand I defined on ID. The two dashed lines define two iso-curves that correspond to PI(ψ) = PI(ψ

Max) and PI(ψ) =PI(ψ

Tol).

• if a channel is classified as clear with probabilitygreater than a reference value 1−PMax

F then its inter-ference vector belongs to C (thus the channel is surelya white space);

• the energy cost ETot of the considered procedure isminimized.

These conditions can be formalized in the following way:

Minimize ETot

subject toPI

(

ψTol

)

≤ PMaxF

PI

(

ψMax

)

≥ PMinD

PMinD and P

MaxF are two parameters of the algorithm

defining respectively the minimum detection probability

(i.e. the minimum probability that a channel belongingto I is correctly classified as interfered) and the maximumfalse identification probability (i.e. the maximum proba-bility that a channel belonging to

{

ψ : PI(ψ) ≤ PI(ψTol)

}

,that is surely a white space, is erroneously classified asinterfered).

4 THE SENSING ALGORITHM

This section describes the interference detection algorithmand outlines the importance of its parameters. From nowon, we will focus on a single node and fix its position, omit-ting thus the dependence on the location through out therest of the paper. On channel c, with interference vectorψ = (ρ, γI) the node executing the interference detectionscheme collects N channel macro-samples y1, y2, . . . , yN attime instants t1, t2, . . . , tN (see Figure 3). Sensing instantsare such that ti+1 ≥ ti + tMin, ∀i = 1, . . . , N − 1: tMin

here denotes a minimum macro-sample time spacing, forinstance introduced by hardware constraints. Each macro-sample yj consists of L micro-sample x

j1, x

j2, . . . , x

jL: xj

i s

Page 73: Design of Reliable Communication Solutions for Wireless Sensor Networks

61

t1 t2 tN t

y1 y2 yN

x11 x

12 x

1L x

21x

22 x

2L x

N1x

N2 x

NL

Figure 3: Sketch of the channel sensing strategy used byour interference detection scheme.

are random variables whose behavior is described by equa-tion (4).

We here assume that the channel state does not changewhile the L micro-samples belonging to a certain macro-sample are collected. This assumption that has alreadybeen adopted by Kim and Shin (2008) is reasonable if thetime required to collect those samples is small if comparedto E[TB] and 1

λI. From the obtained L values the node esti-

mates the state of the channel at time tj using the Neyman-Pearson test that for this problem is given by the followingexpression (energy detector, see Zhao et al. (2007)):

L∑

i=1

|xji |

2≷

BusyIdle ζ (6)

The choice of the threshold ζ defines the notion of busychannel for the considered node and provides a trade-offamong the two figures that characterize the performanceof the Neyman-Pearson test. Those are the probability offalse alarm α defined according to:

α = α(L, ζ, σ20) , P

[

L∑

i=1

|xji |

2> ζ|Idle

]

=

= 1 − Γ

(

L

2,ζ

2σ20

)

(7)

and the probability of detection β, which is given by:

β = β(L, ζ, σ21) , P

[

L∑

i=1

|xji |

2> ζ|Busy

]

=

= 1 − Γ

(

L

2,ζ

2σ21

)

(8)

In the equations above Γ(a, x) = 1Γ(a)

∫ x

0ta−1

e−tdt denotes

the regularized incomplete lower gamma function. Macro-sensing outcomes yjs are set according to:

yj = I

{

L∑

i=1

|xji |

2> ζ

}

(9)

I {·} being the indicator function. We remark that in-creasing L will improve the accuracy of the performed testand for instance, for a given probability of false alarm α,higher values of L will result in higher detection probabili-ties as shown in Figure 4. This will produce highly reliable

macro-samples. On the other hand, this will also increasethe energy cost of the sensing procedure and for instance,for a given fixed energy budget, increasing L will decreasethe number of macro-samples that the node can collect.

0 5 10 15 200

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

L

βσ

12/σ

02=6 [dB]

σ12/σ

02=13 [dB]

Figure 4: Detection probability as a function of the num-ber of collected micro-samples L for a fixed false alarmprobability α = 10−3.

Varying the decision threshold ζ, will allow to achievedifferent trade-offs among false alarm and detection prob-abilities as shown in Figure 5: a low value of ζ guaranteeshigh detection probability but also results in high prob-ability of false alarm while higher values will produce ex-tremely conservative behaviors resulting in low probabilityof false alarm α but also decreasing the detection proba-bility β.

10−1

100

101

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

ζ/σ02

αβ, σ

12/σ

02=6 [dB]

β, σ12/σ

02=10 [dB]

Figure 5: Detection and false alarm probability as a func-tion of the decision threshold ζ. We here assumed L = 1.

Note that on channel c, with interference vectorψ = (ρ, γI) macro-sample outcomes yjs are by definitionBernoulli random variables with parameter p(ψ) equal to:

Page 74: Design of Reliable Communication Solutions for Wireless Sensor Networks

62CHAPTER 7. ENERGY EFFICIENT DETECTION OF INTERMITTENT

INTERFERENCE IN WIRELESS SENSOR NETWORKS

p(ψ) = p(ψ,L, ζ) = ρ·β(L, ζ, σ21)+(1−ρ)·α(L, ζ, σ2

0 ) (10)

After the N macro-samples have been collected, the fol-lowing test is performed:

if∑N

j=1 yj > n the channel is classified as Interfered

if∑N

j=1 yj ≤ n the channel is classified as Clear

In the first case a new channel is selected and assessed whilein the latter situation the procedure is stopped and theidentified frequency band is chosen for receiving packets.n is a parameter of the algorithm that basically defines howmany macro-samples with positive outcome are required inorder to mark a channel as interfered.

We suppose that the energy cost E of the sensing pro-cedure can be computed by simply considering the energyrequired to collect the N · L micro-samples, neglecting forinstance the energy needed by the CPU to process the ac-quired data thus:

E = N · L · EU (11)

Assuming that channel states in two consecutive macro-samples are uncorrelated we can compute as a function of ψthe probability PI(ψ) of classifying a channel as interfered:

in particular∑N

j=1 yj will be the sum of N identically dis-tributed Bernoulli random variables and will therefore havebinomial distribution with parameters p(ψ) and N . Thismeans that:

PI(ψ) = PI (ψ,L, ζ,N, n) = P

N∑

j=1

yj > n

=

=

N∑

k=n+1

(

N

k

)

p (ψ,L, ζ)k[1− p (ψ,L, ζ)]

N−k=

= 1− (N − n)

(

N

n

)∫ 1−p(ψ,L,ζ)

0

xN−n−1(1− x)ndx

(12)

Note that solving the problem formalized in Section3 basically boils down to identifying the set of parame-ters that allow to satisfy the two specified constraints onPI

(

ψMax

)

and PI(

ψMin

)

while minimizing the energy con-sumption of the algorithm.

We note that interference conditions might change overtime, and a channel that has been classified as clear mightbecome interfered. To handle this problem, we supposethat each node maintains an estimate of the packet errorrate: when this estimate exceeds a maximum threshold(for instance PERMax) then the interference detection al-gorithm is executed and a new channel is selected.

5 ALGORITHM DESIGN

In this Section the problem originally introduced in Section3 is decomposed in to two sub-tasks. First, we assume thata fixed energy budget E is available, and we identify theset of parameters LOpt, ζOpt and n

Opt allowing to maxi-mize PI

(

ψMax

)

for the given constraint on PI(

ψTol

)

. Let’sdenote this first sub-task with P1(E). Then, we identifythe minimum energy budget ETot, such that the set ofparameters obtained by solving P1(E

Tot) allows to fulfillalso the requirement on PI

(

ψMax

)

. We call this secondsub-problem P2.

5.1 Solution to P1(E)

Problem P1(E) can be formalized as follows:

Find:(

LOpt

, ζOpt

, nOpt

)

= argmaxζ∈R+,L∈L,n∈NL

PI

(

ψMax

)

s.t.PI

(

ψTol

)

≤ PMaxF

N =⌊

EL·EU

where N is the number of macro-samples of size L that thenode can collect with energy budget E and L and NL aredefined according to:

L =

{

l ∈ N : 1 ≤ l ≤

E

EU

⌋}

NL =

{

n ∈ N : 0 ≤ n <

E

L · EU

⌋}

A solution to the considered problem can be computedusing Algorithm 1.

Algorithm 1 Computes the solution to problem P1(E)

1: PMaxI = 0;

2: S← [ ];3: for all L such that L ∈ L do

4: N =⌊

EL·EU

;

5: for all n such that n ∈ NL do

6: Find pL,n :∑N

k=n+1

(

Nk

)

pkL,n(1 − pL,n)

N−k =

PMaxF ;

7: Find ζL,n : p(ψTol, L, ζL,n) = pL,n;

8: PI = PI

(

ψMax

, L, ζL,n, N, n)

;9: if PI > P

MaxI then

10: PMaxI = PI ;

11: S← (L, n, ζL,n);12: end if

13: end for

14: end for

15: return S;

The basic idea implemented by this algorithm is to com-pute, ∀L ∈ L and ∀n ∈ NL the value of ζ that allowsto satisfy the given constraint on PI(ψ

Tol) and then se-lect the set of parameters (L, n, ζ) leading to the highest

Page 75: Design of Reliable Communication Solutions for Wireless Sensor Networks

63

PI

(

ψMax

)

. Note that for fixed L and n it is straightfor-ward to prove that there always exists a unique ζ allowingto satisfy the relation PI(ψ

Tol, L, ζ,N, n) = P

MaxF . In fact,

PI(ψTol) is a continuous, monotonic increasing function on

p(ψTol) (see the last equality in equation 12), and:

PI(ψTol, L, ζ,N, n)|p(ψTol)=0 = 0

PI(ψTol, L, ζ,N, n)|p(ψTol)=1 = 1

thus, since 0 ≤ PMaxF ≤ 1, the equation on line 6 of algo-

rithm 1 always admits a unique solution, in this case pL,n.Furthermore, p(ψTol

, L, ζ) is a continuous monotonic de-creasing function on ζ, (since both α and β are monotonicdecreasing and continuous on ζ) and:

limζ→0

p(ψTol, L, ζ) = 1

limζ→∞

p(ψTol, L, ζ) = 0

therefore also the equation on line 7 always admits a uniquesolution, ζL,n. Both pL,n and ζL,n can easily be numeri-cally computed with arbitrary precision for instance usingthe bisection method (Burden and Faires (2004)).

It is interesting to observe how the optimal parametersof the algorithm vary while the interference vector ψMax

of the tested channel spaces over the interference domain.For instance let’s consider the macro-sample size L: as out-lined in Section 4 the chosen value will result in a trade-offamong the reliability of each macro-sample and the num-ber of samples that can be collected for a given energybudget. It is reasonable to suppose that many unreliablemacro-samples would be the best solution when dealingwith high power interfering devices, while more reliablesamples would be required to identify interfering activi-ties perceived at the node location with lower power. Thisintuition is in perfect agreement with Figure 6 where weshow the optimum macro-sample size LOpt as a functionof ρMax and γMax

I .

5.2 Solution to P2

Solution to problem P2 is trivial, and is simply obtained byprogressively increasing the energy budget E (starting forinstance from the initial value E = EU ) and solving P1(E)until the required constraint on PI(ψ

Max) is satisfied (seeAlgorithm 2).

Algorithm 2 Computes the solution to problem P2

1: E = 0;2: repeat

3: E = E + EU ;4: Compute LOpt

, nOpt

, ζOpt solving P1(E);

5: until PI

(

ψMax

, LOpt

, ζOpt

,

EEU ·LOpt

, nOpt

)

≥ PMinD ;

6: return E;

Note that depending on the chosen ψTol and ψ

Max,the interference detection algorithm will require a specific

Figure 6: Optimum L as a function of average channeloccupancy ρ

Max and average SNR of the interfering sig-nals γMax

I . Values have been obtained as a solution ofP1(1000EU ), assuming PMax

F = 0.05 and PMinD = 0.95.

amount of energy: to illustrate such a dependency in Fig-ure 7 we show how the probability of missed detection1 − PI(ψ

Max) varies as a function of the energy budgetE for four different ψ

Max. All curves are obtained forψ

Tol = (0, 1) and PMaxF = 0.05. For completeness in Table

1 we present the optimal setting of the algorithm parame-ters for the four considered ψMax and E = 800EU .

0 100 200 300 400 500 600 700 80010

−3

10−2

10−1

100

E [EU]

1−P

I(ψM

ax)

ρMax=0.01,γImax=6 [dB]

ρMax=0.01,γImax=10 [dB]

ρMax=0.1,γImax=6 [dB]

ρMax=0.1,γImax=10 [dB]

Figure 7: 1−PI(ψMax) as a function ofE for the consideredfour ψMax.

If we fix PMinD = 0.95, and ψ

Max = ψMax4 , the energy

budget required to satisfy the given constraints is equal toE

Tot4 = 109EU . Assuming instead ψ

Max = ψMax3 , we de-

crease the interfering power that can be tolerated and in-troduce more strict requirements on the interference condi-tions that a channel should present in order to be classified

Page 76: Design of Reliable Communication Solutions for Wireless Sensor Networks

64CHAPTER 7. ENERGY EFFICIENT DETECTION OF INTERMITTENT

INTERFERENCE IN WIRELESS SENSOR NETWORKS

Table 1: Algorithm Parameters

ρMax

γMaxI L

Opt ζOpt

σ20

nOpt

ψMax1 0.01 6 [dB] 8 27.80 0ψ

Max2 0.01 10 [dB] 1 15.98 0ψ

Max3 0.1 6 [dB] 5 18.66 1ψ

Max4 0.1 10 [dB] 1 10.79 2

as clear: in this case the cost of the detection algorithm isincreased by almost a factor 4 and we have ETot

3 = 382EU .Even higher energy budgets are required for the other twoconsidered cases.

6 EXAMPLE

We here show with a simple example how the algorithm canpractically be designed in order to achieve a desired behav-ior. Let’s for instance consider the IEEE 802.15.4 sensorstandard (IEEE 802.15.4 (2004)): assuming the physicallayer adopted in the 2.4 GHz ISM band, the bit error prob-ability Pb(γ) as a function of the signal to interference plusnoise ratio γ is given by (see Annex E of IEEE 802.15.4(2004)):

Pb(γ) =8

15·

1

16·

16∑

k=2

(−1)k

(

16

k

)

e20γ( 1

k−1)

We assume a minimum signal to noise ratio equal toγ0 = 2[dB]; if the effect of interfering signals is similar toadditive white Gaussian noise in the same bandwidth (seeE.4.1.7 in IEEE 802.15.4 (2004)) we have that the signal tointerference plus noise ratio is simply obtained as γ = γ0

γI.

In order to compute the packet error probability inducedby a certain interference vector ψ = (ρ, γI), we furtherneed a temporal model, describing how packets received bysensor nodes overlap in time with the ones transmitted byinterfering devices: developing such a model is out of thescope of this paper, therefore we here simply assume thatwith probabilities ρ and 1 − ρ a packet is received whenthe channel is respectively in the busy and idle state (asimilar assumption has already been used in IEEE 802.15.4(2004)). The resulting packet error probabilities for thetwo cases will be:

PBp (γI , γ0) = 1 −

[

1 − Pb

(

γ0

γI

)]Nb

(Busy Rx)

PIp (γ0) = 1 − [1 − Pb (γ0)]

Nb (Idle Rx)

where Nb is the length of packets used by sensor nodesthat according to the already mentioned Annex E of IEEE802.15.4 (2004) we will assume equal to 22 bytes (i.e. Nb =22 · 8 bits). Note that this simple model does not accountfor partial temporal overlap among packets of sensors andinterfering devices. The mean packet error probability asa function of the interference vector can now be obtainedas:

Pp = Pp(ρ, γI , γ0) = ρPBp (γI , γ0) + (1 − ρ)P I

p (γ0)

By fixing PERTol = 0.005 and PERMax = 0.05, we havethat the two regions I and C are as in Figure 8. Now forgiven PMax

F and PMinD , identifying ψTol and ψMax will basi-

cally involve determining two interference vectors allowingto satisfy the conditions defined by (5). This task can beaccomplished following a simple empirical procedure thatstarts by fixing two initial points and adjusts ρTol, ρMax,γ

TolI and γ

MaxI until the situation depicted in Figure 3 is

achieved. For instance if we want to have PMaxF = 0.05

and PMinD = 0.95, after some attempts we empirically find:

ψTol ≈ (6.3 · 10−3

, 4.4[dB])

ψMax ≈ (5.6 · 10−2

, 4.7[dB])

and using the algorithms developed in Section 5 we com-pute the following setting for the parameters of our detec-tion scheme:

ETot = 2380EU L

Opt = 9

nOpt = 3 ζOpt

σ20

= 25.39

The two iso-curves defined by PI(ψ) = PMinD and

PI(ψ) = PMaxF are plotted in Figure 8: as clearly shown

the behavior achieved by the algorithm perfectly matchesthe desired one and in fact all channels belonging to Iare classified as interfered and consequently rejected withprobability greater than P

MinD while all channels accepted

with probability greater than 1 − PMaxF belong to C.

γI [dB]

ρ

0 2 4 6 8 10 1210

−3

10−2

10−1

C

ψMax

ψTol

Pp=0.05

PI(ψ)=0.95

Pp=0.005

PI(ψ)=0.05

I

Figure 8: Plot of the I and C regions (continuous lines)for the considered problem. We have also plotted the twoiso-curves (dotted lines) defined by PI(ψ) = P

MinD and

PI(ψ) = PMaxF .

Page 77: Design of Reliable Communication Solutions for Wireless Sensor Networks

65

7 EVALUATION

7.1 Scope of the Evaluation

In this Section we present a performance evaluation of ourinterference detection scheme. The algorithm was imple-mented on TMote Sky sensor nodes (TMote (2006)) featur-ing an IEEE 802.15.4 2420 Chipcon radio transceiver andtested over the 16 IEEE 802.15.4 channels in the 2.4 GHzISM band. We developed the application using the Contikioperating system (Dunkels, Gronvall and Voigt (2004)).Experiments were performed both in office and residentialindoor environments in order to fully capture the algorithmbehavior under different interference conditions.

The purpose of this simple evaluation test is two-fold:first we aim at verifying if the real behavior achieved bythe algorithm matches the desired one. Second, we intendto check if and how this behavior is sensible to our set ofmodeling assumptions. In particular:

i. during our evaluation we didn’t attempt to control theinterference level of the considered channels; while inour analysis we have assumed that all packets trans-mitted by interfering devices are perceived with thesame average power, this assumption might not holdin real scenarios where for instance different packetflows sharing the same frequency band might be per-ceived with different powers by the same sensor nodeor interfering devices might vary the power level usedfor their transmissions.

ii. It has been assumed that the channel noise as well assignals of interfering devices are both white Gaussianprocesses.

iii. In Section 4 we have further supposed that channelstates in two consecutive macro-samples are uncorre-lated: this might not always be the case.

Implementing our detection scheme and evaluating itsperformance on real settings allows to easily verify if thesepotential modeling inaccuracies have any relevant influenceon the behavior of the algorithm.

7.2 Approach and Results

In order to estimate PI , the probability of classifying achannel as interfered, we followed a three-step procedure:

1) we first collected a continuous sequence of macro-samples: each of them is obtained by using the built-inReceiver Signal Strength Indicator (RSSI) of TmoteSky that assumes L = 8 and provides the energy levelmeasured over the channel averaged over 8 symbolperiods (each symbol period is here a micro-sample).Even if this choice is in general not optimal (since asshown in Section 5.1 the optimum L depends on thechosen ψMax and ψTol), there is no easy way of chang-ing this setting;

2) we then computed the parameter ρ as the average frac-tion of time during which the measured energy levelwas 3[dB] above the noise level (that we estimated tobe around -95 [dBm]) and σ2

1 as the average energy ofsignals over c;

3) we finally run the algorithm several times over differ-ent sets of macro-samples obtained by re-sampling theoriginally stored sequence.

During our experiments 3600 sequences were collected(225 for each of the 16 IEEE 802.15.4 channels in the 2.4GHz ISM band): one third in residential indoor environ-ments and the remaining two thirds in office spaces. Anexample of the obtained data is shown in Figure 9 where wepresent the measured received signal strength as a functionof time for two different sequence of channel samples.

0 0.1 0.2 0.3 0.4 0.5−100

−90

−80

−70

−60

−50

−40

time [s]

Sig

nal A

mpl

itude

[dB

m]

a) Office Environment

0 0.1 0.2 0.3 0.4 0.5−100

−90

−80

−70

−60

−50

−40

time [s]

Sig

nal A

mpl

itude

[dB

m]

b) Residential Environment

Figure 9: Examples of channels considered for our experi-ments. We have ρ ≈ 0.23, σ2

1 ≈ −45.2 [dBm] (case a) andρ ≈ 0.04, σ2

1 ≈ −84.1 [dBm] (case b).

We fixed:

ψTol = (0; 1) PI(ψ

Tol) ≤ 0.05ψ

Max = (0.1; 6[dB]) PI(ψMax) ≥ 0.95

In order to satisfy the specified constraints, approxima-tively N = 50 macro-samples need to be collected: assum-ing periodic sampling with period equal to 2 [ms] the totalexecution time for this procedure (on a single channel) willbe equal to 0.1 [s]. Using the algorithm proposed in Section5.1 we computed the following parameters:

ζOpt = σ

20[dBm] + 5.12[dB] ≈ −89[dBm]

nOpt = 0

Page 78: Design of Reliable Communication Solutions for Wireless Sensor Networks

66CHAPTER 7. ENERGY EFFICIENT DETECTION OF INTERMITTENT

INTERFERENCE IN WIRELESS SENSOR NETWORKS

γI [dB]

ρ

0 10 20 30 40 5010

−4

10−3

10−2

10−1

100

PI=0.95, Model

PI<0.95. Experiments

γI [dB]

ρ

0 10 20 30 40 5010

−4

10−3

10−2

10−1

100

PI=0.95, Model

PI>0.95. Experiments

Figure 10: Contour plot of PI = 0.95 over the interferencedomain (black line) and experimentally estimated PI .

0 200 400 600 8000

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

E [EU]

PI

ρ=0.17, γI=20 [dB], Model

ρ=0.17, γI=20 [dB], Experiments

ρ=0.047, γI=10 [dB], Model

ρ=0.047, γI=10 [dB], Experiments

Figure 11: PI as a function of E: comparison among ana-lytical model and experimental results.

The black line shown in the two graphs presented in Fig-ure 10 represents a contour plot obtained (analytically) for

PI = 0.95. On the same plots we have added the valuesof PI experimentally estimated: crosses (top graph) de-note channels for which PI < 0.95 while asterisks (bottomgraph) correspond to PI > 0.95. The behavior achieved bythe algorithm matches very closely the desired one and infact, beside few exceptions, all channels whose interferencevectors fall in the region defined by the black line, thusall the black spaces, are correctly identified and can con-sequently be avoided. We observed an analogous matchamong theory and experiments for the white spaces. Notethat as outlined in Section 5.2, higher detection probabil-ities can be achieved by increasing the energy budget ofthe sensing procedures: this is shown in Figure 11 wherePI is plotted as a function of E for two different interfer-ence vectors. Also in this case experimental results closelymatch the developed analytical model.

8 CONCLUSIONS

In this paper we have considered the problem of detectingpacket-based interference in wireless sensor networks. Forthis purpose we have proposed a simple spectrum sensingalgorithm: this algorithm accounts for energy and compu-tational constraints of sensor nodes as well as for the inter-mittent nature of typical sources of interference affectingwireless sensor networks in unlicensed bands. We have ex-plicitly characterized the performance of our scheme andprovided a framework that allows to select its parametersso as to achieve a desired behavior while minimizing energyconsumption. We have implemented our algorithm on theTMote Sky sensor platform and tested its effectiveness onthe 16 IEEE 802.15.4 channels in the 2.4 GHz ISM band:results obtained during our performance evaluation werein good agreements with the developed analytical frame-work showing the strength of the proposed scheme that cantherefore be exploited by interference avoidance algorithmsin order to perform channel assessment.

We here highlight the limitations of our contribution. Asshown in Sections 5 and 6 detecting the presence of inter-ference might require a significant amount of energy andthus represents an efficient solution only if channel con-ditions change slowly over time. If this assumption doesnot hold and the interference pattern is highly dynamic itmight be unfeasible to identify and avoid interfered chan-nels: a better approach could be instead to opportunis-tically exploit spectrum opportunities in the time domain(Geirhofer, Tong and Sadler (2007)). Energy efficient sens-ing schemes will be required also if this last strategy wouldbe adopted and we anticipate the investigation of this prob-lem in our future work.

REFERENCES

Burden, R. L. and Faires,J. D. (2004) ‘Numerical Analy-

sis ‘, Brooks Cole.

Page 79: Design of Reliable Communication Solutions for Wireless Sensor Networks

67

Dunkels, A., Gronvall, B. and Voigt, T.(2004), ‘Contiki -a Lightweight and Flexible Operating System for TinyNetworked Sensors‘, in Proceedings of the First IEEE

Workshop on Embedded Networked Sensors (Emnets),

November 16, 2004. Tampa, Florida, USA.

Dunkels,A., Osterlind, F., Tsiftes, N. and He,Z. (2007),‘ Software Based On-line Energy Estimation for Sen-sor Nodes‘, in Proceedings of the 4th workshop on Em-

bedded networked sensors (EmNets),June 25-26, 2007.Cork, Ireland.

Geirhofer, S., Tong, L. and Sadler,B. M. (2006), ‘DynamicSpectrum Access in WLAN Channels: Empirical Modeland Its Stochastic Analysis‘, in Proceedings of the first

international workshop on Technology and policy for ac-

cessing spectrum (TAPAS),August 5, 2006. Boston, MA,USA.

Geirhofer, S., Tong, L. and Sadler,B. M. (2006), ‘AMeasurement-Based Model for Dynamic Spectrum Ac-cess in WLAN Channels‘, in Proceedings of Military

Communications Conference, (MILCOM), October 23-

25, 2006. Washington DC, USA.

Geirhofer,S., Tong, L. and Sadler, B. M.(2007),‘DynamicSpectrum Access in the Time Domain: Modeling andExploiting White Space‘, in IEEE Communication Mag-

azine, Vol. 45, No. 5, pp.66–72, May 2007.

Haykin, S. (2005), ‘Cognitive Radio: Brain-EmpoweredWireless Communications‘, in IEEE Journal on Selected

Areas in Communications, Vol. 23, No. 2, pp. 201–220.

‘Part 15.4: Wireless Medium Access Control (MAC)and Physical Layer (PHY) Specifications for Low-RateWireless Personal Area Networks (WPANs)‘ (2006),ANSI/IEEE Standard 802.15.4-2006, revision of IEEEStandard 802.15.4-2003.

Kim, H. and Shin, K. G. (2008), ‘Fast Discovery of Spec-trum Opportunity in Cognitive Radio Networks‘, in

Proceedings of IEEE International Symposium on New

Frontiers in Dynamic Spectrum Access Networks (DyS-

PAN), October 14-17, 2008. Chicago, Illinois, USA.

Law, Y. W., Palaniswami, M., van Hoesel, L., Doumen, J.,Hartel, P. and Havinga,P. J. M., (2009),‘Energy-EfficientLink-Layer Jamming Attacks Against Wireless SensorNetwork MAC Protocols‘, in ACM Transactions on Sen-

sor Networks, Vol. 5, No. 1, Article No.6.

Mousaloiu-E.,R. and Terzis, A. (2008), ‘Minimising theeffect of WiFi Interference in 802.15.4 Wireless Sen-sor Networks‘, in International Journal on Sensor Net-

works, Vol. 3, No. 1, pp. 43–54.

Petrova, M., Riihijarvi, J.,Mahonen, P. and Labella,S.(2006), ‘Performance Study of IEEE 802.15.4 Us-ing Measurements and Simulations‘, in Proceedings of

Wireless Communications and Networking Conference

(WCNC),April 3-6, 2006. Las Vegas, NV, USA.

Shah, R. C. and Nachman,L. (2008), ‘Interference De-tection and Mitigation in IEEE 802.15.4 Networks‘, in

Proceedings of the IEEE/ACM International Conference

on Information Processing in Sensor Networks (IPSN),

April 22-24, 2008. St. Louis, Missouri, USA.

Stabellini,L. and Zander, J. (2008), ‘Interference AwareSelf-Organization for Wireless Sensor Networks: a Rein-forcement Learning Approach‘, in Proceedings of the 4th

annual IEEE Conference on Automation Science and

Engineering (CASE), August 23-26,2008. WashingtonDC, USA.

‘Tmote Sky Data Sheet‘ (2006) Moteiv, San Fran-cisco, CA. [Online]. Available: http://www.moteiv.

com/products/docs/tmote-skydatasheet.pdf.

Wood, A. D., Stankovic, J. A. and Gang,Z.(2007), ‘DEE-JAM: Defeating Energy-Efficient Jamming in IEEE802.15.4-based Wireless Networks‘, in Proceedings of 4th

Conference on Sensor, Mesh and Ad Hoc Communica-

tions and Networks (SECON), June 18-21, 2007. SanDiego, California, USA.

Xu, W., Ma, K.,Trappe, W. and Zhang, Y. (2006), ‘Jam-ming Sensor Networks: Attack and Defense Strategies‘,in IEEE Network, Vol. 20, No. 3, pp 41–47.

Xu,W., Trappe,W. and Zhang,Y. (2007), ‘Channel Surf-ing: Defending Wireless Sensorn Networks from In-terference‘, in Proceedings of the IEEE/ACM Interna-

tional Conference on Information Processing in Sensor

Networks (IPSN), April 24-27,2007. Cambridge, Mas-sachusetts, USA.

Xu,W., Trappe,W. and Zhang,Y. (2008), ‘Defending Wire-less Sensor Networks from Radio Interference throughChannel Adaptation‘, in ACM Transactions on Sensor

Networks, Vol. 4, No. 4, Article No. 18.

Zhao, Q., Tong, L., Swami, A. and Chen, Y. (2007), ‘De-centralized Cognitive MAC for Opportunistic SpectrumAccess in Ad Hoc Networks: A POMDP Framework‘,in IEEE Journal on Selected Areas in Communications,Vol. 25, No. 3, pp. 589–600.

Zhou, G., He, T., Stankovic,J. A. and Abdelzaher,T.(2005), ‘RID: Radio Interference Detection in WirelessSensor Networks‘, in Proceedings of the 24th Annual

Joint Conference of the IEEE Computer and Commu-

nications Societiesm (INFOCOM), March 13-17, 2005.Miami, Florida, USA.

Page 80: Design of Reliable Communication Solutions for Wireless Sensor Networks
Page 81: Design of Reliable Communication Solutions for Wireless Sensor Networks

Chapter 8

Interference Aware SelfOrganization for Wireless SensorNetworks: a ReinforcementLearning Approach

Luca Stabellini, Jens ZanderProceedings of 4th annual IEEE Conference on Automation Science and Engineer-ing, CASE 2008.

69

Page 82: Design of Reliable Communication Solutions for Wireless Sensor Networks
Page 83: Design of Reliable Communication Solutions for Wireless Sensor Networks

71

Interference Aware Self-Organization for Wireless Sensor Networks:

a Reinforcement Learning Approach

Luca Stabellini, Jens Zander

Wireless@KTH, The Royal institute of Technology, Electrum 418, SE-164 40 Kista, Sweden

Email: {luca.stabellini,jens.zander}@radio.kth.se

Abstract—Reliability is a key issue in wireless sensor networks.Depending on the targeted application, reliability is achieved byestablishing and maintaining a certain number of network func-tionalities: the greatest among those is certainly the capability ofnodes to communicate. Sensors communications are sensible tointerference that might corrupt packets transmission and evenpreclude the process of network formation. In this paper wepropose a new scheme that allows to establish and maintain aconnected topology while dealing with this problem. The ideaof channel surfing (already introduced in [1]) is exploited toavoid interference; in the resulting multi-channel environmentnodes discover their neighbors in a distributed fashion using areinforcement learning (RL) algorithm. Our scheme allows theprocess of network formation even in presence of interference,overcoming thus the limit of algorithms currently implemented instate of the art standards for wireless sensor networks. By meansof reinforcement learning the process of neighbor discovery iscarried out in a fast and energy efficient way.

I. INTRODUCTION

Wireless sensor networks represent an attractive and promis-

ing alternative to wired systems in a multitude of application

scenarios such as distributed sensing, environmental and health

monitoring and traffic control. Such networks are usually

comprised of a set of sensors, often with limited capabilities

and severe energy constraints, and one or more central units

or sinks, to which the sensed data must be delivered in

order to be treated. In large and densely deployed sensor

networks, the process of data gathering normally involves

multi-hop communications either to achieve energy efficiency

and extend nodes lifetime or simply because source and

destination of a certain transmission are not within mutual

range. In such conditions sensors deliver their messages to

the sink via intermediate nodes that act as relays and provide

the communication infrastructure allowing full operability

without the need of any additional backbone network. The

manual configuration of such an infrastructure is a costly

operation requiring skilled personnel: in many cases, due to the

large number of nodes or to the deployment site that might

be remote and with harsh environmental conditions, manual

configuration is unfeasible and sensors belonging to the same

network must be able to self-assembly a structured multi-hop

topology, discovering their neighbors and establishing reliable

point to point connections in a distributed fashion. This initial

phase of the network lifetime, involving the transition from an

unstructured set of nodes to an organized entity able to operate

and to accomplish a designed function is called initialization

[2]. Initializing a network is in fact the first problem arising

after the deployment: however, self-organizing capabilities

further include the ability to re-establish the required com-

munication infrastructure when due to unpredictable events

such as nodes failure, interference or jamming, connectivity is

broken. In this work we will focus on interference effects: the

available spectrum bands are in fact becoming more and more

crowded, therefore finding a way to deal with interference

is an important issue that must be addressed in order to

design reliable applications. We point out that this problem

is extremely relevant in the context of industrial automation:

in a typical industrial environment in fact several networks,

eventually using different radio technologies, operate in close

proximity and share the same frequency bands thus, to achieve

the required application reliability, coexistence issues need to

be addressed and interference aware communication protocols

have to be designed.

Most of the initialization schemes proposed in the literature

are based on neighbor discovery and subsequent clustering.

The basic idea of these protocols is to establish a hierarchical

structure in which few selected nodes, the cluster heads,

coordinate all the others. Examples of such algorithms can be

found in [2] and [3]: in [2] every cluster head (a dominator)

periodically broadcasts messages to inform newly deployed

nodes of its presence: every node, after waking up waits for a

certain amount of time to verify if in its neighborhood there

is already a cluster head, otherwise it becomes a dominator

itself. A similar idea was also developed in [3]. In [4] and

[5] different randomized initialization protocols suitable for

single and multi-channel ad-hoc networks are presented and

their convergence is proved analytically.

These algorithms assume that the same channel can be used

by the whole network, and don’t provide dynamic channel

selection mechanisms for dealing with interference; if the

considered channel is not available due i.e. to interference or

jamming originated by external devices, the initialization pro-

cedure will most likely fail, leaving the network in the original

chaotic and unconnected state or creating several isolated sub-

networks unable to communicate within each other. Methods

for dynamic channel selection have been proposed in the

literature: for instance the idea of channel surfing presented in

[1] and [6] allows nodes to dynamically adapt their frequency

allocation depending on the experienced interference. Another

example is the DEEJAM protocol introduced in [8] where four

different mechanisms are designed for coping with different

kinds of jamming attacks. The jamming avoidance schemes

Page 84: Design of Reliable Communication Solutions for Wireless Sensor Networks

72

CHAPTER 8. INTERFERENCE AWARE SELF ORGANIZATION FORWIRELESS SENSOR NETWORKS: A REINFORCEMENT LEARNING

APPROACH

are respectively based on frame masking, channel hopping,

packet fragmentation and redundant encoding. In most cases

however, these algorithms require the existence of an already

established hierarchical structure, of a global synchronization

scheme or at least the knowledge of one hop neighbors and are

thus not suitable for the initialization phase, where the network

is still unorganized. To the best of our knowledge no protocols

have been proposed so far to address the task of initializing a

wireless sensor network in presence of interference.

We here outline the main contributions of our work:

• we formulate the problem of establishing connectivity in

a wireless sensor network as an episodic reinforcement

learning task;

• we provide a RL algorithm that can be used in each

episodic task to establish or re-establish connectivity;

In this work we focus on episode 1, i.e. the initialization:

this is in fact the most challenging situation due to the fact

that the network is still unstructured and for instance nodes

do not know the identities and the number of their neighbors.

The rest of this paper is organized as follows: Section II

introduces the models we are considering. Section III provides

the formalization of the problem of establishing connectivity

in a WSN as a RL episodic task. Section IV specifies our RL

algorithm, Section V presents some simulation results, and

Section VI concludes the paper.

II. MODEL

We consider a mesh network of N − 1 nodes and one sink

randomly deployed over a surface S with arbitrary distribution.

Each node is equipped with a radio transmitter/receiver that

can be tuned over M different frequency channels (if we

consider the IEEE 802.15.4 radio standard [9], in the physical

layer operating at 2.4 GHz, M = 16 channels). The availabil-

ity of multiple channels is used for dealing with interference

or jamming. In our model nodes are very simple devices

and their radio interface is a single half-duplex transceiver,

meaning that sensors can either transmit or listen but not do

both simultaneously. Moreover, even if they can select the

channel to use among the M available, they can only receive

or transmit on one frequency at a time.

Just for the sake of simplicity we consider a time slotted

system and assume that at the MAC layer slotted Aloha is

adopted. Actions such as packet transmissions are taken at the

beginning of a slot. The scheme we propose doesn’t assume

the existence of a global synchronization scheme thus time-

slots don’t need to be synchronized. No a priori restrictions

are introduced regarding the channel model that can thus be as

general as possible. We suppose that packet transmissions can

start and end within the same slot and a packet is correctly

received at the destination only if no other nodes in the

neighborhood are transmitting in the same time slot: this

means that collisions will always result in loss of packets and

no capture effects are thus taken into account.

Nodes select the channel to be used according to local

interference conditions, therefore we suppose that they are

able to check for the presence of interference or jamming i.e.

by means of sensing. This capability is integrated in the MAC

layer of many radio standards: for example in the case of IEEE

802.15.4, using the Clear Channel Assessment primitive [9],

sensor nodes can detect the activity of other devices operating

in the same frequency band. We further assume that nodes

select for packet reception, the first interference-free channel

of a globally known Preferable Channel List which we refer

to as CList throughout the rest of the paper.

We assume that the interference is slowly varying in time,

particularly when compared to packet transmission dynamics;

several packets can be transmitted under same interference

conditions. This is typically assumed in many other works

that propose interference avoidance algorithms (see e.g. [10]).

III. RL PROBLEM FORMULATION

In this Section we provide the formalization of the problem

of establishing connectivity in a wireless sensor network as an

episodic reinforcement learning task ( [11]).

We begin by providing some basic definitions. A network

is connected when all nodes are connected: a node is said to

be connected if it has discovered a path to the sink, either

through single or multi-hop communications. The problem of

establishing connectivity in a sensor network can be naturally

formulated as an episodic task: the first episode corresponds

to the initialization of the network while successive episodes

begin every time the connectivity is broken and end when it

is re-established. Each task is carried out on a local basis by

the nodes of the network that in our model are the agents of

the reinforcement learning problem. The environment of each

agent, let’s say node i, is given by the set of its neighbors

that we denote using Ni. Each node or agent interacts with

its environment through actions, aiming at discovering the

state of the environment itself. In our framework an action

corresponds to the transmission of a broadcast query on a

certain channel, chosen among the M available; if no action

is considered profitable, the agent decides to lower its duty-

cycle and sleep: sleeping is also considered as one of the

available actions. The action space is therefore given by A ={{

c|c ∈ CList}⋃

{0}}

where {0} corresponds to sleeping

while c ∈ CList represents the transmission of a broadcast

query on channel c.

If we denote with Ni(t) the set of neighbors discovered by

node i up to time t, a possible representation of the state Xi(t)will be:

Xi(t) = (|Ni(t)|, Xci (t)) (1)

where |Ni(t)| denotes the cardinality of the set Ni(t) and

Xci (t) ∈ {0; 1} is defined according to:

Xci (t) =

{

1 if∑

j∈Ni(t)X

cj (t) > 0

0 otherwise(2)

Xci (t) is equal to one if node i is connected to the sink(s)

through single or multi-hop communication: clearly, Xci (t) =

1,∀t if node i is itself a sink. Each episode ends when the

terminal state Xci (t) = 1 is reached.

Page 85: Design of Reliable Communication Solutions for Wireless Sensor Networks

73

After taking a certain action, the agent waits for a defined

fixed amount of time for rewards that in our model are

represented by the acknowledgements sent by neighbors.

The utility function associated to a certain action is defined

as the “profitability“ in taking that particular action and in

fact, reflects the possibility of discovering neighbors while

transmitting on the considered frequency. Utility functions for

each action are locally stored in every nodes: for node i we

will denote these functions using Ui(t) ={

u1i (t), ..., u

Mi (t)

}

A policy is a map which assigns to the actual state Xi(t)an action of the set A and basically defines the way nodes

decide which action should be taken. We remark that nodes

might not be aware of which channels are selected by their

neighbors. Also the underlying distribution of the interference

pattern over the available channels might be unknown. This

doesn’t allow to formulate our problem in the context of

Markov Decision Processes (MDP) or Partially Observable

MDP (POMDP). Such a lack of models capable of describing

the environment of each agent precludes the computation of

optimal policies and in fact makes dynamic programming tools

unsuitable for our problem: we instead consider as a valid

alternative learning techniques.

IV. ALGORITHM DESCRIPTION

In this Section we specify the algorithm executed by nodes

during the first episode: minor changes are required to make

the same algorithm suitable for the successive episodes. The

proposed scheme evolves during three different phase: the

Sensing & Select phase, the pre-Agent and the Agent phase.

The agent phase ends when a node reach the terminal state

and becomes connected.

After being deployed a node needs to configure its radio

interface, selecting the channel that will be used while listening

for incoming packets: this is done during the Sensing &

Select phase. We suppose that nodes, by running a dedicated

algorithm, can verify the state of a channel and detect the

presence of interference. The definition of such an algorithm

is out of the scope of this work: typical procedures of this

kind (as for example the one presented in [6] or in [7])

will involve collecting channel samples by means of sensing

and processing the obtained data to estimate the presence

of external interference. The order used while checking the

available frequencies is defined by a preferable channel list

CList that is a permutation of the M available channel and

is common to all nodes that belong to the same network.

This procedure is stopped as soon as a channel that satisfies a

certain criterion (i.e. a noise or interference level lower than

a predefined threshold) is found: for node i we denote this

channel using ci. This channel is used for receiving packets.

Note that using the same channel sequence for all nodes will

results in nodes belonging to the same neighborhood and

experiencing similar interference conditions to select the same

frequency, speeding up the process of neighbor discovery.

When using different channels in different regions of the net-

work, the problem of channel multiplexing must be addressed,

in order to allow communications between these regions. In

previously proposed interference avoidance schemes, channel

multiplexing is carried out at the receiver: as an example in

[1] the authors consider a tree topology in which a parent hav-

ing children using different frequencies, periodically switches

between various channels in order to receive packets. In our

model the channel multiplexing is implemented at the trans-

mitter instead, meaning that one node listens only on a single

channel and selects the frequency to be used while transmitting

according to the destination of the current transmission. To

this purpose nodes need to maintain a local table where these

information i.e. the association between neighbor’s ID and

used channel are stored and retrieved on demand. We observe

that implementing the channel multiplexing at the transmitter

presents several advantages: the greatest among those is surely

the fact that no synchronization is required. In fact if a node

while listening has to switch between different channels, it also

needs to be synchronized with all the potential transmitters

to avoid the multi-channel hidden terminal problem ( [12])

in which a packet is lost because the radio of the receiver

is not tuned on the correct frequency. Moreover, switching

between channels has an associated time and energy cost:

a node in the receiving state might not be aware of other

nodes transmission’s and might thus tune its radio without

receiving any packets, wasting energy. The maximum energy

efficiency is instead achieved implementing this mechanism

at the transmitter side, where channel switching is performed

only when needed.

The goal of the pre-Agent phase is to initialize the vari-

ables and the records needed to properly execute the RL

algorithm: the most important operation carried out during

this phase is in fact the initialization of the utility functions

associated to each action. The values initially assigned to

these utility functions depend on a default utility vector

UDefault ={

u1Default, ..., u

MDefault

}

and on the estimated spatial

correlation among the node itself and its neighbors. The

default utility vector is a default sequence of values that

might for example be related to the probability of experiencing

interference on a certain channel. To take advantage of the

channel ordering strategy used by nodes to select the used

channel, this vector can be a monotonic decreasing function

on the channel position in the preferable channel list. The

spatial correlation among a node i and its neighbors can be

expressed using a parameter, ρi, that in our model represents

the probability that the channel used by the agent is also

selected in its neighborhood and is thus defined during a

certain episode as:

ρi =

j∈NiI {cj = ci}

|Ni|(3)

where I {.} is the indicator function and |Ni| denotes the

cardinality of the set of neighbors Ni of node i. Note that

ρi will not be known and will change during time due to the

variation of interference conditions. However, ρi can be set at

the begin of episode one taking into account factors such as

the environment where sensors are deployed and eventually the

Page 86: Design of Reliable Communication Solutions for Wireless Sensor Networks

74

CHAPTER 8. INTERFERENCE AWARE SELF ORGANIZATION FORWIRELESS SENSOR NETWORKS: A REINFORCEMENT LEARNING

APPROACH

Algorithm 1 RL algorithm executed by node i during the

Agent phase of Episode 1

1: Connected := false;2: while not Connected do

3: select a, the action to be taken;4: if a > 0 then

5: turn the radio on channel CList(a);6: send a query ;7: turn the radio on channel ci;8: wait for rewards (ACKs);9: if reward received then

10: uai := α + (1 − α)ua

i ;11: check the received ACKs and update Connected

12: update the Local Table

13: else

14: uai := (1 − α)ua

i ;15: end if

16: else

17: sleep for Ts slots;18: end if

19: end while

expected node distance or channel characteristics and might be

estimated by nodes during successive episodes. Values for the

utility function are then obtained as a linear combination of

the default utility vector and a Kronecker function centered in

the frequency selected by the agent. For node i, listening on

channel ci the initial utility function of action j will then be:

uji (0) = (1 − ρi)u

jDefault + ρiδcij , j = 1, . . . , M (4)

where:

δcij =

{

1 if CList(j) = ci

0 otherwise(5)

Note the behavior obtained in the two limiting case: if

ρi = 0, we obtain the default utility vector, meaning that the

information acquired by the node while sensing the channel

cannot be used for the discovery of neighbors; on the other

hand, if ρi = 1, we obtain δcij meaning that all nodes will be

listening on the same channel chosen by the considered agent.

During the Agent phase, a node takes actions and interacts

with its environment following the scheme outlined in Algo-

rithm 1. Nodes will keep behaving as agents until the terminal

state is reached. Each agent starts by performing a transmis-

sion round during which NA actions are taken: note that in the

pseudo-code description of the algorithm, the parameter NA

has been hidden in line 3 and in fact the policy also takes care

of keeping track of the number of taken actions. As already

mentioned, an action corresponds to transmitting a broadcast

query in one of the M available channels which is selected

using the policy adopted by the agent. The broadcasted packet

contains the following information about the sender: the node

ID, the channel used to receive packets ci (that might be

different from the one used for the current transmission), and

the state variable Xci . After transmitting, the node switches

back its radio to ci and waits for ACKs for a certain number of

time slots, Tmax. An ACK packet sent by node j contains the

node ID as well as the state variable Xcj . The utility function

of the taken action a is then updated according to:

uai (t + 1) =

{

α1 + (1 − α1)uai (t) if a received a reward

(1 − α2)uai (t) otherwise

(6)

where 0 ≤ α1, α2 ≤ 1; for simplicity we considered α1 =α2 = α. A similar approach for the update of utility functions

in Reinforcement Learning has already been used in [13].

Upon receiving rewards, the agent also updates its local

table adding as a new entry the neighbor just discovered and

the frequency corresponding to the taken action. Note that

while broadcasting the query, the agent also specifies which

frequency should be used to reply, therefore, a corresponding

entry can be added also in the local table of the discovered

nodes. In fact, we point out that a new neighbor can be

discovered either by actively broadcasting queries and receiv-

ing acknowledgements, or by passively receiving the query

broadcasted by other nodes. We further emphasize the fact that

rewards are awarded only after discovering a new neighbor:

receiving queries from already known neighbors will result in

a table update and a consequent reward only if the considered

node has specified a different frequency for the reply message,

meaning that it has recently switched channel e.g. for dealing

with mutated interference conditions. In the same way, an

agent receiving acknowledgment from a known neighbor will

update the corresponding entry and receive a reward only if

the channel used for transmitting was different from the one

already associated to the considered neighbor. The exchange

of state variables, allows node that are not within the range

of the sink, to realize when they become connected: a node

receiving a packet with the state variable Xci set to one, will

set its state variable to one, ending the current episode. He

will also inform all its neighbors that he is now connected.

After completing the transmission round, the agent will

decide to start a new transmission round or, in case none of

the actions of the previous one received a reward, to sleep for

a defined period of time of length Ts slots.

We outline the fact that our algorithm, allows to exploit

different kind of learning; in particular we have:

• Intra-episode Learning which starts and ends within the

same episode and is related to the conditions experienced

by each agent: in particular nodes learn which frequencies

are used among the M available and when it is profitable

to transmit queries or it is more convenient to sleep;

• Inter-episode Learning that depends on conditions that

doesn’t change (or change very slowly) between differ-

ent episodes: as an example nodes might estimate the

spatial correlation ρi within their neighbors and use this

parameter to initialize the utility function of each action

at the episode beginning.

We further remark that our neighbor discovery algorithm

does not implement any form of topology control and just

Page 87: Design of Reliable Communication Solutions for Wireless Sensor Networks

75

A

B

C

D

c1 c2 c1 c2

Fig. 1. Considered network scenario: node A is experiencing interferenceon c1 and is not able to discover nodes B, C and D.

aims at establishing a network where each node is connected

to the sink. If the the graph defined by the final network

needs to satisfy certain properties, dedicated topology control

algorithms will have to be executed after the discovery phase.

V. ANALYSIS OF FEASIBILITY AND SIMULATION RESULTS

Claim 1: there is not any scenario in which our protocol will

fail a priori in establishing a connected network as long as

each node can identify at least an interference free channel.

We point out that the statement above is not an obvious

conclusion and it is not the case for currently implemented

algorithm for network formation in state of the art standards

for Wireless Sensor Networks i.e. the ZigBee standard that we

will here assume as a reference case. Let consider for example

the scenario depicted in Fig. 1. We look at a very simple 4-

nodes network: to achieve connectivity, we need node A to

discover its neighbors and join the already established PAN

comprising node B, C and D. We assume for simplicity that 2

channels (c1 and c2) are available: this example can easily be

extended to M > 2. According to the specification defined in

[14] and [9], node A upon invoking the NLME-NETWORK-

DISCOVERY.request primitive, will start performing an active

scan of the channels specified in the Scan Channels list (see

[14] and [9] for more details), broadcasting on each channel

beacon request messages. Depending on channel conditions,

different scenarios might arise: the one of interest for us

consists in the case where node A experiences interference

on channel c1 used by the existing PAN. Note that queries

broadcasted by A on c2 will not be received by the other

nodes that have tuned their radio on a different frequency.

On the other hand, when channel c1 is selected, interference

might corrupt the transmitted beacons, which might not be

correctly received by A. In fact, node A might not be able to

communicate with the other nodes.

This problem is easily solved by our scheme: after sensing

the channel node A will classify c1 as interfered selecting thus

c2. While broadcasting a beacon request message, he will then

ask to generate beacons on this channel. Packet collision at the

receiver is then the only problem that might arise however,

by introducing opportune random delays the probability of

such event can be made arbitrarily small, allowing node A to

discover and communicate with the other sensors even in pres-

ence of interference. We stress the fact that allowing each node

to independently select the channel used to receive packets,

overcomes the limitations of traditional interference avoidance

schemes, where it is supposed that the same frequency can be

used for all the hops of a certain route (as in [7]) or simply

that source and destination nodes of a certain transmission

can communicate using the same channel (see for example

[1]). These hypothesis might not hold in large sensor networks

and might require nodes to waist energy while looking for a

common channel that might not even exist.

An interesting problem that needs to be addressed is to de-

termine which policy must be adopted while selecting actions:

the algorithm for network formation currently defined in the

ZigBee specifications, adopts a deterministic policy, where the

sequence of actions that will be taken by a node trying to

discover its neighbors is defined and known a priori. Typically

adopted policies in Reinforcement Learning problems instead,

take advantage of the interaction within the environment to

assess which actions are more profitable than others and use

the estimated utility functions to select the action to be taken.

Depending on how this selection is done, we can have

different options: we here consider two of them, in particular:

• greedy policies where the agent always takes the action

with the highest utility function;

• soft-max policies that use a Gibs or Boltzman distribution

and at time t select a certain action a ∈ A with prob-

ability euai(t)/τ

beub

i(t)/τ

; here τ is a positive parameter called

the temperature of the distribution. High temperature will

result in all actions to be almost equi-probable, while

in the limit as τ → 0 the soft-max action selection

degenerates in the greedy policy;

We here do not consider the ǫ-greedy case (see [11]

for more details). Beside deterministic and learning policies,

also stochastic policies, where actions are randomly selected

might be implemented. The performances achievable by these

options can be evaluated, in first instance, by means of

simulations. For this aim we implemented the aforementioned

policies in a simulator: we considered N-1 nodes and one sink

randomly scattered and uniformly distributed over a square

10x10 area. We modeled the channel using the Unit Disc

Graph model. Four pairs of interfering devices, with different

interfering ranges and different characteristics, were randomly

placed in the network: in particular, the i-th device pair, gener-

ates interference in the first i channels of the channel list CList

that has M = 16 available frequencies. This could be the

case of an IEEE 802.15.4-based sensor networks experiencing

WLAN interference from devices operating within the IEEE

802.11b radio standard. Slotted Aloha was adopted at the MAC

layer. An example of a simulated network scenario is presented

in Fig. 2. We here consider the case where nodes are deployed

and become all active at the same time: this might be the case

e.g. if sensors are airdropped. As a performance metric, we

selected the time Tc needed to establish a connected network,

i.e. the time after which all nodes in the network are aware of

Page 88: Design of Reliable Communication Solutions for Wireless Sensor Networks

76

CHAPTER 8. INTERFERENCE AWARE SELF ORGANIZATION FORWIRELESS SENSOR NETWORKS: A REINFORCEMENT LEARNING

APPROACH

0 2 4 6 8 100

2

4

6

8

10

x [a.u.]

y [a.u

.]

Fig. 2. Example of a simulated network. The star is the sink. Areas delimitedby dashed lines are the ones where nodes experience interference.

0.2 0.4 0.6 0.8 0.1 0.4 2 80

100

200

300

400

500

600

700

800

α τ

E[T

c] [s

lots

]

Deterministic

Stochastic

Greedy

Soft−max α=0.6

Fig. 3. E[Tc] for the different considered policies.

being able to reach the sink. The results presented in Fig. 3

are obtained averaging over Ns simulations runs with different

random seeds: Ns was dynamically adjusted to obtain 95%confidence intervals with a relative error smaller than 0.05.

For the greedy case we considered 4 different values of α

(see. Eq. (6)) i.e. α = {0.2, 0.4, 0.6, 0.8}. For the soft-max

case instead we used α = 0.6 and varied the temperature τ .

Note that for all the considered settings, RL policies out-

perform deterministic and stochastic action selection methods

allowing to establish a connected network in a shorter time.

Using the feedback obtained by sensors while interacting with

the environment, learning policies allows each node of the

network to identify the set of channels effectively used in

its neighborhood. If we consider the fact that during the

initialization phase nodes are suppose to be awake all the

time, this translate in higher energy efficiency. Moreover, even

greater energy savings can be achieved by considering that

our RL algorithm allows nodes to learn when it is profitable

to transmit queries, or when instead it is better to sleep. This

capability can be fully exploited in the case of incremental/non

simultaneous deployment, i.e. when nodes are deployed during

a certain period of time. In this case, a node will lower its duty

cycle while its neighbors are not yet deployed, reducing the

quantity of energy wasted during the initialization phase. The

benefits that might be achieved in these conditions as well as

the evaluations of the performance of the proposed scheme in

successive episodes are the objective of our current research.

VI. CONCLUSIONS

In this paper, we presented a new completely distributed

scheme that allows to establish and maintain a connected

topology in wireless sensor networks even in presence of

interference. We exploited the idea of channel surfing to

dynamically adapt the frequency allocation of each node to

local interference conditions. In the resulting multi-channel en-

vironment, we proposed a Reinforcement Learning algorithm

that can be used to carry out the channel multiplexing in a

fast an energy efficient way, allowing nodes to discover their

neighbors. Our scheme is effective as long as each node is

able to identify a clear channel, used to receive packets, and

thus overcomes limitations of algorithms implemented in state

of the art radio standards for WSNs.

REFERENCES

[1] W. Xu, W. Trappe, Y. Zhang, “Channel Surfing: Defending WirelessSensorn Networks from Interference“, in Proceedings of the IEEE/ACMInternational Conference on Information Processing in Sensor Networks(IPSN), 2007.

[2] F. Kuhn, T. Moscibroda, R. Wattenhofer, “Initializing Newly DeployedAd Hoc and Sensor Networks“, in Proceedings of 10

th InternationalConference on Mobile computing and networking (MOBICOM), 2004.

[3] Li Jin, Lu Fang, H. Zailu, “Initialization Algorithm Based onSINR Model for Wireless Sensor Networks“, International Confer-ence on Wireless Communications, Networking and Mobile Computing(WiCOM), 2006.

[4] K. Nakano, S. Olariu, “Randomized Initialization Protocols for Ad HocNetworks“, IEEE Transaction on Parallel and Distributed Systems, Vol.11, No. 7, July 2000.

[5] K. Nakano, S. Olariu, “Energy-Efficient Initialization Protocols forSingle-Hop Radio Networks with No Collision Detection“, IEEE Tran-sation on Parallel and Distributed Systems, Vol. 11, No. 8, August 2000.

[6] W. Xu, T. Wood, W. Trappe, Y. Zhang, “Channel Surfing and SpatialRetreats Defenses against Wireless Denial of Service“, In Proceedingsof the Second ACM Workshop on Wireless Security (Wise 2004), 2004.

[7] R. Musaloiu-E., A. Terzis, “Minimizing the effect of WiFi interferencein 802.15.4 wireless sensor networks“, International Journal of SensorNetworks, Vol.3, No. 1, 2008.

[8] A. D. Wood, J. A. Stankovic, G. Zhou, “DEEJAM: Defeating Energy-Efficient Jamming in IEEE 802.15.4-based Wireless Networks“, 4

th

Annual IEEE Communications Society Conference on Sensor, Mesh andAd Hoc Communications and Networks (SECON ’07), 2007.

[9] “Part 15.4: Wireless medium access control (MAC) and Physical layer

(PHY) specification for Wireless Personal Area Networks (WPANs)”,ANSI/IEEE Standard 802.15.4-2006.

[10] S. Pollin, M. Ergen, A. Dejonghe, L. Van der Perre, F. Catthoor, I.Moerman , A. Bahai, “Distributed cognitive coexistence of 802.15.4with 802.11“, in Proceeding of CROWNCOM 2006.

[11] R. S. Sutton, A. G. Barto, “Reinforcement Learning: an Introduction“,MIT press, 1998.

[12] J. So, N. Vaidya, “Multi-Channel MAC for Ad Hoc Networks: Han-dling Multi-Channel Hidden Terminals Using a Single Transceiver“,Proceedings of the 5

th ACM international symposium on Mobile adhoc networking and computing (MOBIHOC), 2004.

[13] G. Mainland, D. C. Parkes, M. Welsh, “Decentralized, Adaptive Re-source Allocation for Sensor Networks“, Proceedings of the 2

nd Sympo-sium on Networked Systems Design and Implementation (NSDI), 2005.

[14] ZigBee Alliance, “ZigBee Specification, Version 1.0”, 2004.

Page 89: Design of Reliable Communication Solutions for Wireless Sensor Networks

Chapter 9

Energy Optimal NeighborDiscovery for Single-ChannelSingle Radio Wireless SensorNetworks

Luca Stabellini,Proceedings of IEEE International Symposium on Wireless Communication Sys-tems, ISWCS 2008.

77

Page 90: Design of Reliable Communication Solutions for Wireless Sensor Networks
Page 91: Design of Reliable Communication Solutions for Wireless Sensor Networks

79

Energy Optimal Neighbor Discovery forSingle-Radio Single-Channel Wireless Sensor

NetworksLuca Stabellini

Wireless@KTH, The Royal institute of Technology, Electrum 418, SE-164 40 Kista, [email protected]

Abstract—Neighbor discovery is a fundamental procedure thatneeds to be carried out in every wireless sensor network in orderto enable communication capabilities. If nodes are mobile ormultiple channels are used in the network, the same algorithmmay be needed to be carried out several times during the networklifetime, consuming precious energy. In this paper we propose away for optimizing a neighbor discovery procedure suitablefor asingle-radio single-channel scenario. Assuming a realistic energymodel which accounts for energy required for transmitting dis-covery queries and listening for acknowledgements and explicitlyaccounting for collisions we exploit power control and the use ofa contention window of variable size to minimize sensors’ energyconsumption while both transmitting and receiving. We formulatethe neighbor discovery problem as a Markov decision processandthrough dynamic programming we compute an optimal policydefining the power level and the contention window size thatmust be used while broadcasting queries. This policy minimizesthe energy cost of the discovery procedure for a given constrainton the maximum probability of having collisions. We furtherprovide guidelines usefull for implementing sub-optimal policieswhich perform asymptotically optimal for high node densitiesand can be computed on-line by motes with low capabilities.

I. I NTRODUCTION

Wireless sensor networks stand out a promising alternativeto wired systems in a multitude of application scenarios suchas environmental and health monitoring, industrial automationand traffic control. Even though each application has its ownfunctional requirements, a certain number of common tasksalways need to be carried out in order for instance to establishthe basic communication infrastructure used by nodes. One ofthese tasks is the process ofneighbor discovery.

Several distributed procedures for neighbor discovery havebeen proposed in the literature: examples of such algorithmscan be found in [1, 2]. In many cases this process is combinedwith a preliminary form of topology control that exploitingpower control leads each node to discover only a subset of itsneighbors. This induces a sparse topology that contains energyefficient paths while still maintaining network connectivity.For instance in [3], a cone-based topology control schemeis proposed. In this algorithm the plane around a node isdivided in M equal cones and while looking for neighborseach node gradually increases its transmission power untila neighbor in each cone has been found. It is shown thatM ≥ 3 leads to a connected network and higher values ofM promote energy efficient routes. Another algorithm based

on the notion ofenclosure graph (already introduced in [4])has been proposed in [5]: also in this case by progressivelyincreasing the transmission power nodes form in a distributedway a network that contains minimum energy paths.

We remark that if nodes are mobile, neighbor discoverymay have to be carried out more than once during thenetwork lifetime. Moreover, if multiple channels are used inthe network (for example to avoid interfered frequencies),eachnode may have to perform the same discovery procedure onmore than one channel. Algorithms for neighbor discovery asthe ones cited above involve broadcast transmissions throughwhich a node learns who’s in its proximity and require theradio interface of sensors to be active for a significant amountof time thus consuming precious energy. Energy efficientalgorithms therefore need to be designed to optimize energyconsumption. Authors of [6] have proposed an algorithmoptimizing the energy consumption of the cone-based schemedescribed in [3] by formulating the considered neighbor dis-covery procedure as a Markov decision process where at eachstep a node has to choose the power to be used for broadcastingdiscovery messages. An optimal policy for power selectionwhich minimizes the energy consumption is also presented.We point out however that only the power used by sensorsfor transmitting packets has been taken into account whileenergy waisted for listening has been neglected. For manylow-power sensor devices however, power consumptions whilelistening and transmitting are comparable (see for instanceconsiderations carried out in [7] and [8]). Moreover the lengthof an acknowledgement can be compared to the one of a shortbroadcast query and the contention window, which is used incontention based MAC protocols by nodes hearing the queryto replay, should be long enough to avoid collisions whichmight lead to anomalies in the discovery procedure or affectthe resulting topology. Therefore the energy waisted by nodeslistening cannot be neglected and must be taken into accountwhile optimizing the algorithm. We point out that accordingtothis consideration, determining the power that must be selectedfor transmitting is not the only possible way to achieve energyefficiency: in fact also choosing the rightcontention windowsize can lead to great energy savings. For instance when thediscovery message reaches a large number of nodes, then along contention window is needed to prevent collisions whileinstead if fewer nodes hear the query shorter windows can

Page 92: Design of Reliable Communication Solutions for Wireless Sensor Networks

80CHAPTER 9. ENERGY OPTIMAL NEIGHBOR DISCOVERY FOR

SINGLE-CHANNEL SINGLE RADIO WIRELESS SENSOR NETWORKS

be adopted. The main contributions of this paper are hereoutlined: we modified the Markov decision process formulatedin [6] to account for energy consumption due to listening andobtained an optimal policy for joint power and contentionwindow selection which minimizes the energy consumptionfor the neighbor discovery procedure described in [3]. Wefurther provided some guidelines on how to implement sub-optimal policies that perform asymptotically optimal for highnode densities but don’t need to be stored in advance on eachmote (as in [6]) and can be evaluated on-line by sensors withvery low computational capabilities.

The rest of the paper is organized as follows: Section IIintroduces the system model and outlines the basic assump-tions. Section III formalizes the process of neighbor discoveryas a Markov decision process and Section IV explains how tocompute an optimal policy. Numerical results are presentedinSection V and conclusions are drawn in Section VI.

II. SYSTEM MODEL

We consider a sensor network where nodes are randomlyscattered on a plane surface according to a two dimensionalPoisson process of known intensityλ. The probability ofhavingn nodes in a given areaA will thus be equal to:

P2D(n, |A|) =(λ|A|)n

n!e−λ|A| (1)

where |.| is the Lebesgue measure inR2. Each sensor isequipped with a single half-duplex radio transmitter, whichallows the node to either transmit or receive but not do bothsimultaneously. We here assume that the same radio channelcan be used in the whole network. The output power thatcan be used to transmit is limited by a certain maximumpower levelpmax and can be chosen among a discrete setof possible valuesP = {p1, p2, . . . , pmax}. The extensionto the continuous case is discussed in Section V. We furtherassume that the plane around each sensor is partitioned intoM equal cones and nodes can determine the direction of thesender while receiving packets. This can be accomplishedeither by means of an antenna configuration that allows todetect the angle of arrival (AoA) of incoming signals orusing information about the node position in the network,which has then to be known and must be inserted in everyexchanged message. We define two different kinds of packets:broadcast queries, through which the transmitting node looksfor neighbors in its proximity andacknowledgement packetsthat nodes hearing the query use to answer. We assume thatthese two kinds of messages have the same length i.e. containthe same number of bits.

Nodes consume energy both while transmitting and listen-ing. In particular we quantify the energy used for transmittinga packet (fix rate is assumed) according to:

ETx = p

TxTT (2)

wherepTx is the output power level of the radio transmitterandTT the time required for a packet transmission while theenergy consumed during a listening period is equal to:

ERx = p

RxTR (3)

where pRx is the power used by the radio unit in listeningmode that we will assume equal to a fraction ofpmax, thusp

Rx = pmax

c andTR the time spent in the listening state. Thevalue of c is hardware dependent and can significantly varyacross different radio platforms (see for some examples [8,9]).We assumec = 5. We suppose thatpRx doesn’t depend on thestate of the channel and is therefore the same both when thechannel is idle (no nodes are transmitting) or busy (at leastonenode is transmitting). For the sake of simplicity we considera time slotted system and normalize all power consumptionsto the slot length. The time required to transmit a packet isequal to the length of a single slot.

Signal propagation in the network is described using adistance dependent model where the path-loss is a functionof the distanced between transmitter and receiver and thereceived power can be expressed as:

pR = c0

pT

dα(4)

where c0 is a constant term,α the path-loss exponent andp

T the power used by the transmitter. A packet is correctlyreceived if the received power is greater than a threshold valuep

th i.e. if the distance between transmitting and receiving node

is less thandmax =(

pth

pT c0

)1α

. A node transmitting with power

p, can then reach a distanced(p) =(

pth

pc0

)1α

and cover an area

A(p) = πd(p)2. This model is also known as the Friis freespace model. Packets colliding at the receiver are lost and nocapture is taken into account.

III. M ARKOV DECISION PROCESSFORMULATION

A. State and Action Spaces

In this section we reformulate the Markov decision processintroduced in [6]. The process we consider evolves throughcycles: each cycle consists of a broadcast transmission ofa discovery query and of a contention window where thetransmitting node waits for acknowledgements. We focus ona single node and express its stateX(k) at the beginning ofcycle k using the pair:

X(k) = (Xfound(k), Xpower(k))

whereXfound(k) is the number of cones where the node hasfound at least one neighbor, thusXfound(k) ∈ {0, . . . ,M}, andXpower(k) is the power level used during cyclek−1, thereforeXpower(k) ∈ {{0} ∪ P}. Following the notation used in [6]we denote the set of possible states byS and call a state aterminating state if it belongs to the set:

Sterm = {s = (sfound, spower) ∈ S : sfound = M ∨ spower = pmax}

For all non-terminating statess ∈ Snon-term = S − Sterm wedefine theaction space as:

As = {(p, w) : p ∈ P , p > spower, w ∈ {1, . . . ,Wmax}}

Page 93: Design of Reliable Communication Solutions for Wireless Sensor Networks

81

We assume that the contention window can be at mostWmax slots. Finally apolicy is a functionf(.) which assignsto each non-terminating states an action a = f(s) =(pa = fpower(s), wa = fwindow(s, pa)): only stationary policiesare considered.

B. Transition State Probabilities

We need now to determine how the state of the consideredprocess evolves through each cycle. Using the given statedefinition it is straightforward to have:

Xpower(k + 1) = fpower(X(k)) (5)

It should be noted that the evolution of the other state variableXfound now depends on the probability of having some nodesin the areaAd(k + 1) = A(Xpower(k + 1)) − A(Xpower(k))(as in [6]) as well as on the probability that those nodessuccessfully transmit their ACKs without colliding in thecontention window. We point out that in absence of any formof coordination, the probability of having at least one collisionis surprisingly high even for a low number of contendingnodes: for instance, consideringN = 6 sensors contendingover W = 32 slots, at least one collision will happen withprobability:

pc(N,W ) = 1 −W !

(W −N)!WN≈ 0.4

meaning that in 40% of the cases at least two neighbors canbe lost: this may lead to energy inefficient topologies andeventually decrease the network lifetime.

Once a policy has been fixed, it is possible to determine thetransition matrix of the considered Markov process: for policyf we denote this matrix withP(f). Therefore:

pi,j(f) = P [X(k + 1) = j|X(k) = i, f ] (6)

Xfound(k) andXpower(k) are respectively a non-decreasing anda strictly increasing random variable onk, thus fori ∈ Snon-term

we have that:

pi,j(f) = 0 if jpower 6= fpower(i) or jfound < ifound (7)

If jpower = fpower(i) andjfound ≥ ifound we have that:

pi,j(f) ≈

(

M − ifound

jfound− ifound

)

p(i, j)jfound−ifound(1− p(i, j))M−ifound

(8)where p(i, j) is the probability of having at least one nodein an areaAij =

A(jpower)−A(ipower)M and that at least one of

those nodessucceed, i.e. successfully transmit its ACK. Forthe given nodes distribution we have that:

p(i, j) =∞∑

k1=1

P2D (k1, Aij) ·∞∑

k2=0

P2D (k2, (M − 1)Aij) ·

·

min(W,k1+k2)∑

k3=1

π (k3, k1 + k2,W )[

1 − pAij(k1, k2, k3)

]

(9)

whereπ (k3, k1 + k2,W ) is the probability that a set of ex-actly k3 nodes succeed when a total ofk1 +k2 are contending

in W slots andpAij(k1, k2, k3) the probability that none of

thosek3 succeeding nodes belong to the set ofk1 located inthe areaAij . Now the probabilityπ (k3, k1 + k2,W ) can beevaluated according to:

π (k3, k1 + k2,W ) = Ck1+k2,k3fr(k1 + k2 − k3,W ) (10)

where the recursive functionfr(k1 + k2 − k3,W ) is definedby:

fr(N,W ) =W !

(W −N)!WN(11)

if k = 0 and:

fr(N − k,W ) =W !(W −N + k)k

(W −N + k)!WN+

−k−1∑

x=0

Ck,k−xfr(N − x,W ) (12)

if 0 < k ≤ N = k1 + k2. In expressions (10) and (12)Cn,mdenotes the number of possiblem-combinations from a sethavingn elements, thus:

Cn,m =

(

n

m

)

=n!

m!(n−m)!(13)

Finally, given thatk3 nodes overk1 + k2 succeed we havethat the probability that none of them belong to the set ofk1

sensors located inAij is given by:

pAij(k1, k2, k3) =

{

1 − k2!(k1+k2−k3)!(K2−k3)!(k1+k2)! if k3 ≤ k2

0 otherwise(14)

We note that while expression (9) is exact, transition proba-bilities are instead given in approximated form by expression(8): this because successes of nodes coming from differentcones are not independent (as it happens assuming the modelin [6]) and for instance the fact that at least a node in a certaincone succeeds, reduces the number of available slots for thenodes in other cones and consequently modifies their successprobabilities. It must further be remarked that asW goes toinfinity, we have that:

limW→∞

p(i, j) =

∞∑

k=1

P2D (k,Aij) = 1 − P2D (0, Aij) (15)

which is the same expression obtained in [6] (with a contentionwindow of infinite size no collisions are possible). However, ifW is finite, transition probabilities in the two cases, might besignificantly different. A comparison among the two models ispresented in Table 1, where we report transition probabilities

TABLE ICOMPARISON AMONG TRANSITION STATE PROBABILITIES.

p0→0 p0→1 p0→2 p0→3 p0→4

Model in [6] 0.0067 0.0671 0.2507 0.4163 0.2592Eq. (8),W = 16 0.0231 0.1447 0.3396 0.3541 0.1385

Simulation,W = 16 0.0159 0.1344 0.3624 0.3686 0.1187Eq. (8),W = 32 0.0129 0.1016 0.2996 0.3928 0.1931

Simulation,W = 32 0.0101 0.0961 0.3076 0.4049 0.1813

Page 94: Design of Reliable Communication Solutions for Wireless Sensor Networks

82CHAPTER 9. ENERGY OPTIMAL NEIGHBOR DISCOVERY FOR

SINGLE-CHANNEL SINGLE RADIO WIRELESS SENSOR NETWORKS

from states = (0, 0) given thatM = 4 cones, the selectedpower is p1 and thatλπ (d(p1))

2= 5, thus in average 5

nodes hear the discovery query. In the tablep0→k denotesthe probability of discovering at least one neighbor inkcones. Note that transition state probabilities obtained usingour model closely match simulation results.

IV. OPTIMAL POLICY

The algorithm of neighbor discovery ends when one of theterminating states is reached, i.e. when a neighbor in eachcone has been found or the maximum power has been reached.Given a certain policyf , probabilities to end in each of theterminating states of the Markov chain and associated costscan be easily evaluated using transition probabilities obtainedwith the model developed in Section III-B: this allows tocompute the average energy costC(f) associated with theconsidered policy (see for more details [6]). A policyf∗ isenergy optimal if:

f∗ : C(f∗) = min

fC(f) (16)

The optimal policy can be obtained through dynamic program-ming recursion (see [10] and [6]), however, in order to properlysolve the problem we need to:

• associate to terminating states of types =(pmax,m),m ∈ {0, . . . ,M − 1} a cost reflectingthe fact that some cone is empty. This cost, preventsnodes from trying to reach immediately a terminatingstate, i.e. by transmitting with the highest power andusing a short contention window; setting the right costhowever might not be easy. In alternative it is possibleto

• dimension the contention window such that given theexpected number of nodes that a certain transmission willreach, the probability of having a collision is less than acertain threshold value.

The second option is preferable for its simplicity. The con-tention window can vary from cycle to cycle, therefore at everytransmission the computed value must be piggybacked in thediscovery query in order to be used, by the hearing nodes, toreply. Given that in averageN new nodes hear the message(nodes that already received a query from the same transmitterdo not reply) the probability of having no collisions overWslots is given by:

PNo-Coll =

W∑

k=0

W !

(W − k)!W k·N

k

k!e−N =

(

1 + NW

)W

eN(17)

Expression (17) can be used in the dynamic programmingrecursion to dimension contention windows for the availabletransmission powers and obtain the respective costs.

V. NUMERICAL RESULTS

We computed the average energy cost of the optimal policythrough dynamic programming, considering different nodedensities and different values ofM . We have assumedα = 4,c0 = 1, P th = 1 and the set of available power levels:

P ={

n

4: n ∈ N, 1 ≤ n ≤ 20

}

Considering the model used in [6], results are presentedin Fig. 1. Note that the average computed energy cost isincreasing inM (since more neighbors need to be found) andmonotonically decreases with the node density. The maximumenergy consumption corresponds to a single transmission withmaximum power.

6 8 10 12 14 160

1

2

3

4

5

Node Density λ

Ave

rage

Ene

rgy

Cos

t

M=3M=5M=7M=9M=11

Fig. 1. Average energy cost for an optimal policy obtained using the modelin [6].

We point out that this behavior, which has been predictedonly accounting for transmission power consumption mightnot reflect reality. When nodes are densely deployed, evenif power control is adopted to limit the expected numberof receivers, energy costs due to contention windows andcollisions (which will lead to undiscovered neighbors andrequires additional transmissions) will result in increased av-erage power consumption. This is clearly shown in Fig. 2,presenting average costs obtained using the model developedin this paper. We here have assumedPNo-Coll > 0.8: such ahigh value results in long contention windows and thus highenergy cost but allows areliable discovery of all neighborsand prevents degradation of the final network topology.

6 8 10 12 14 1610

2

103

Node Density λ

Ave

rage

Ene

rgy

Cos

t

M=3M=5M=7M=9M=11

Fig. 2. Average energy cost for an optimal policy obtained using the modeldeveloped in Section III.

Page 95: Design of Reliable Communication Solutions for Wireless Sensor Networks

83

1.5 2 2.5 3 3.5 4 4.5 5

30

50

100

Node Density λ

Ave

rage

Ene

rgy

Cos

t

Optimal Policy M=3Sub−Optimal Policy M=3Optimal Policy M=5Sub−Optimal Policy M=5

Fig. 3. Comparison among the optimal policy and a sub-optimal power-window selection scheme which always uses the smallest possible power level.

By inspecting the obtained optimal policies we observedthat the maximum energy efficiency was achieved by alwayschoosing small power increments: this is due to the non-linearity of equation (17) (if we double the average number ofnodes the contention windows must be increased by a factorlarger than 2 to achieve the samePNo−Coll) as well as to thefact that a more granular discovery procedure can be stoppedas soon as one neighbor has been found in each cone, avoidingunnecessary waste of energy. These observations might beuseful while implementing sub-optimal policies which as anadvantage, doesn’t need to be pre-computed and can insteadbe evaluated on-line by nodes, with very low computationalrequirements. In the considered example for instance, selectingthe smallest available power level is asymptotically optimal asshown in Fig. 3.

In a more general case, a good choice could be to increasethe transmitting power such that the expected number of newreached nodes is close to one (as also mentioned in [3]).This strategy might also be used for instance if we relaxthe assumption that the transmitting power is quantized andallow nodes to transmit using any power level in the range[0, pmax]. Implementing this last policy leads to the averagecosts reported in Fig. 4. Note that the obtained curves are notmonotonically increasing as for instance as in Fig. 2. For lowdensities the cost increases because the number of performedtransmissions increase: once a certain threshold value hasbeenreached (which corresponds to the density that allows to findin average at least a neighbor in each cone) the cost dueto listening stays constant while the one due to transmissiondecreases (since smaller power increments are used), thus thetotal cost also decreases.

VI. CONCLUSIONS

In this paper we have proposed a way for optimizing theneighbor discovery algorithm for wireless ad-hoc and sensornetworks presented in [3]. Following the same approach usedin [6], but using a more realistic model explicitly accountingfor collisions and power consumed by sensors while listening,

2 4 6 8 10 12 14 160

20

40

60

80

100

120

140

160

180

Node Density λ

Ave

rage

Ene

rgy

Cos

t

M=3M=5M=7M=9M=11

Fig. 4. Average cost for a sub-optimal policy which selects power incrementssuch that a single new neighbors (in average) is reached at every transmission.

we obtained through dynamic programming an optimal policyfor joint power and contention window selection minimizingthe average energy cost of the considered discovery procedurefor a given constraint on the collision probability. We furtherprovided guidelines which might be useful for implementingsub-optimal policies that perform asymptotically optimalforhigh node densities but don’t require to be pre-computedand can thus be evaluated on line by each node. The mainlimitation of the obtained results relies in the channel modeland the node distribution, which both must be known inadvance.

REFERENCES

[1] G. Alonso, E. Kranakis, R. Wattenhofer, P. Widmayer, “Probabilistic pro-tocols for node discovery in ad-hoc, single broadcast channel networks“,in Proceedings of International Parallel and Distributed ProcessingSymposium (IPDPS), 2003.

[2] S.A. Borbash, A. Ephremides, M. J. McGlynn, “An AsynchronousNeighbor Discovery Algorithm for Wireless Sensor Networks“, in AdHoc Networks 5, 998-1016, 2007.

[3] R. Wattenhofer, L. Li, P. Bahl, Y.M. Wang, “Distributed TopologyControl for Power Efficient Operation in Multihop Wireless Ad HocNetworks“, in Proceedings of Twentieth Annual Joint Conference of theIEEE Computer and Communications Societies (INFOCOM) 2001.

[4] V. Rodoplu, T. H. Meng, “Minimum Energy Mobile Wireless Networks“,IEEE Journal on Selected Areas on Communications (JSAC), Vol. 17,No. 8, 1333-1344, August 1999.

[5] L.Li, J. Y. Halpern, “Minimum-Energy Mobile Wireless Networks Re-visited“ in Proceedings of International Conference of Communications(ICC), 2001.

[6] R. Madan and S. Lall, “An Energy-Optimal Algorithm for Neighbor Dis-covery in Wireless Sensor Networks“, Mobile Network and Applications11, 317-326, 2006.

[7] A. Dunkels, F. Osterlind, N. Tsiftes, Z. He, “ Software Based On-line Energy Estimation for Sensor Nodes“, in Proceedings ofthe 4

th

workshop on Embedded networked sensors (EmNets ’07), 2007.[8] S. Kellner, M. Pink, D. Meier, E.-O. Blab, “Towards a Realistic Energy

Model for Wireless Sensor Networks“, in Proceedings of Fifth AnnualConference on Wireless on Demand Network Systems and Services(WONS 2008), 2008.

[9] O. Landsiedel, K. Wehrle, S. Gotz, “Accurate prediction of power con-sumption in sensor networks“, in Proceeding of the Second Workshopon Embedded Networked Sensors (Em-NetS-II), 2005.

[10] A. Lew, H. Mauch, “ Dynamic Programming - a computational tool“,Springer, 2007.

Page 96: Design of Reliable Communication Solutions for Wireless Sensor Networks
Page 97: Design of Reliable Communication Solutions for Wireless Sensor Networks

Chapter 10

Networked Estimation UnderContention Based Medium Access

Maben Rabi, Luca Stabellini, Alexandre Proutiere and Mikael Johanssonto appear in International Journal on Robust and Nonlinear Control.

85

Page 98: Design of Reliable Communication Solutions for Wireless Sensor Networks
Page 99: Design of Reliable Communication Solutions for Wireless Sensor Networks

87

Networked estimation under contention-based medium access

Maben Rabi1, Luca Stabellini2, Alexandre Proutiere3, Mikael Johansson1,∗

1 Automatic Control Lab, School of Electrical Engineering, Royal Institute of Technology (KTH), Osquldasvag 10 SE-100 44 Stockholm, Sweden. [email protected] ,

2 Department of Communication Systems, School of Information and communication Technology, RoyalInstitute of Technology (KTH), Electrum 418, SE-164 40 Kista, Sweden. [email protected],3 Microsoft Research 7 JJ Thomson Avenue CB3 0FB, Cambridge, [email protected].

SUMMARY

This paper studies networked estimation over a communication channel shared by a contention-basedmedium access protocol. A collection of N identical and physically decoupled scalar systems aresampled without sensor noise and transmitted over a common channel, using a contention-basedmedium access mechanism. We first carry out a calculation of the average distortion in estimationwith irregular samples. Given the rate of packet generation at sensors, we characterize the trafficcharacteristics of some contention based MAC schemes. This lets us derive the statistics of inter-arrival times which in turn allows us to compute the packet loss rates and also the statistics ofdelay within a sample period. Using these results, we track the estimation performance as the samplegeneration rate and the number of contending nodes are varied. We provide a heuristic rule-of-thumbfor choosing the sampling interval which minimizes the average distortion. By combining the networktraffic characterization with that of the estimation performance, we show this rule performs pretty well.Carrying along the same lines, we are able to compute the scaling limits of estimation performancewith respect to the number of contending nodes.

key words: Int. J. Robust Nonlinear Control ; LATEX2ε; class file

1. Introduction

Since the first application of wireless in industrial control almost a 100 years ago, the numberof actual deployments have remained small [19]. For a long time, the market has been limitedto specific target applications (e.g. wireless remote controls) engineered using customizedtechnologies and sometimes even operating on licensed spectrum. There is a growing consensusthat this trend is now about to change: the enormous success of short-range wireless in homeand office applications has raised consumer confidence in wireless technologies; the emergence ofstandardized, low-cost, low-power radios has made industrial wireless economically attractive

∗Correspondence to: Mikael Johansson, [email protected].†Support

Contract/grant sponsor: European Commission through the SOCRADES project; contract/grant number: FP6

Received 14 May 2008Revised 21 November 2008

Page 100: Design of Reliable Communication Solutions for Wireless Sensor Networks

88CHAPTER 10. NETWORKED ESTIMATION UNDER CONTENTION

BASED MEDIUM ACCESS

2 RABI ET.AL.

compared to cabled sensors [11]. Intense efforts on wireless sensor networks [13] and networkedcontrol [2] indicate that a large class of industrial process could be reliably controlled despitedeficiencies of the wireless medium. All together, this raises expectations of a wide deploymentof industrial wireless [15]. The trend is supported by major standardization bodies andautomation system vendors working actively on several standards for industrial wireless,including Zigbee [3], 6loWPAN [16], wirelessHART [8], ISA SP-100 and Bluetooth ULP.

A typical industrial process might have several thousands of sensors and actuators, and awide adoption of wireless technologies could mean that several hundreds of these are candidatesfor cable replacement by wireless. Since the wireless medium is shared, there are naturallimits on the number of control loops that can be accommodated. Such limits could either betheoretical (e.g. combining the Shannon capacity of the wireless channel [7] with a minimumbit-rate requirement for stabilization of a linear system [23, 24]) or practical (e.g. combiningconstraints on actual medium access control (MAC) mechanisms with performance objectivesbeyond stabilization [25, 1, 6]). The contributions of this paper are of the second kind.

Specifically, we consider the problem of state estimation where sensor measurements aresent over a medium shared using a contention-based access mechanism. We believe thatthis problem is particularly relevant, since state estimation is a key component of modernautomation systems while, contention-based medium access is supported in most standards(e.g. as contention access periods in Zigbee, or in shared time slots in wirelessHART). Clearly,the estimator performance depends on the dynamics of the individual systems and the nominalsampling interval. More interestingly, it also depends on the distribution of transmission delaysand loss rates of sensor packets which, in turn, depend on the specific MAC scheme and thenumber of contending nodes. The key contribution of this paper is to analytically quantifythese interdependencies. For analytical tractability, we assume that the dynamic systemswhose states we want to track are scalar and have the same time constants, and derive anexplicit formula of how the expected estimator performance depends on sampling frequency,packet loss rate and inter-arrival times of samples. Although the problem of state estimationunder random sampling and loss have received significant attention (e.g. [9, 14, 21, 10]), weare aware of few papers in the literature analyzing the interaction between sampling rates,network performance statistics and the estimation performance. A simulation study of theeffect of sampling rates in Networked control systems was carried out in [12]; it points out thechoice of sampling rate involves a trade-off between congestion in the network and informationcontent of the sampled sequence.

We briefly comment on implications of our results on sampling policies and highlight theimportance of carrying out an adequate continuous-time analysis of the system performance.Admittedly, the time constants of individual systems vary in real deployments, but wedemonstrate that homogeneous time constants is a worst-case (since, everything else beingequal, the achievable performance improves if some time constants are smaller) which justifiesour approach. To characterize packet loss rates and packet inter-arrivals, we focus on thecase where the sensor measurements are taken at the same time instant, and analyze the MACperformance for systems with geometrically distributed (as in classic slotted-Aloha systems) oruniformly distributed (as suggested by IEEE802.15.4 standard) contention window. Also in thisarea, we are aware of very few results (e.g., [18]). In addition, the analysis of queueing systemswith transient and correlated traffic is substantially harder than for saturated sources. Wecombine these two contributions into an analytical model for how the estimator performancescales with the number of nodes. Extensive numerical examples highlight the analytical results.

Int. J. Robust Nonlinear Control 20; :–

Prepared using rncauth.cls

Page 101: Design of Reliable Communication Solutions for Wireless Sensor Networks

89

NETWORKED ESTIMATION UNDER CONTENTION-BASED MAC 3

The paper is organized as follows. Section 2 describes the problem formulation and generalassumptions. Section 3 studies estimation under random delays and packet losses, and derivesclosed-form expression for the expected estimator performance. In Section 4, we carry out thetraffic calculation which lead to the statistics of inter sample times and also of the packetloss rate. In Section 5, we combine the results of sections 3, 4 and provide a heuristic rulefor choosing the optimal sampling interval and provide justification for it. We also describethe scaling behaviour with respect to the number of competing nodes. In the final section, wesummarize the conclusions of this work.

2. Problem formulation and assumptions

We consider N scalar plants, each given by the dynamics

dx(i)t = ax

(i)t dt+ dW

(i)t , i = 1, . . . , N (1)

where W(i)t is a standard one dimensional Wiener process independent of x

(i)0 . The noise

processes W(i)t and W

(j)t are mutually independent for distinct i, j ∈ {1, . . . , N}. For analytical

tractability, we assume that the states can be measured exactly, i.e. without noise. We assumethat sensor i samples the ith plant state at times:

s(i)k = kh+ φ

(i)k , k ∈ {0, . . . ,∞} ,

where, h is the common sampling period and φ is a possible phase shift. We consider two

particular cases: synchronized sensing, where φ(i)k = 0 for all k and all i, and independent

sensing where φ(i)k are independent random variables uniformly distributed on the interval

[0, h).

The samples are transmitted over a shared communications channel to the correspondingestimator nodes, see Figure 1. The N transmitters contend for the channel using a contention-based medium access scheme. For sake of simplicity we consider a slotted system where, timeis divided into slots of length L, which is also the nominal time needed to transmit a datapacket. After the sample is generated, the transmitter waits a random number of slots beforeits first transmission attempt: the waiting time is either geometrically distributed (as in theclassical slotted ALOHA) or uniformly distributed (similar to CSMA). The contention causescollisions which require retransmissions and give rise to random delays between the samplinginstants and the times when estimator nodes receive their data. If a sensor has not been ableto deliver its data before a new sample is generated, it attempts to transmit the new data anddiscards the old one. Denote the sequence of times when the estimator node i receives packets

by{

q(i)j

}∞

j=0. Denote the delay of the sample generated at s

(i)k−1 from sensor i by D

(i)k . If the

delay D(i)k exceeds the sampling period h, the sample is declared lost and the next sample

from the sensor will be attempted to be transmitted.

Assuming without any loss of typicality that the first sample has not transmitted successfully,

Int. J. Robust Nonlinear Control 20; :–

Prepared using rncauth.cls

Page 102: Design of Reliable Communication Solutions for Wireless Sensor Networks

90CHAPTER 10. NETWORKED ESTIMATION UNDER CONTENTION

BASED MEDIUM ACCESS

4 RABI ET.AL.

dx(1)t = ax

(1)t dt+ dW

(1)t

dx(2)t = ax

(2)t dt+ dW

(2)t

dx(N)t = ax

(N)t dt+ dW

(N)t

x(1)

(

s(1)k

)

x(2)

(

s(2)k

)

x(N)

(

s(N)k

)

D(h,N)

Ploss(h,N)

E1

E2

EN

x(1)(t)

x(2)(t)

x(N)(t)

Shared channel, contention-based MAC

Figure 1. The estimation problem setup: the states of N identical plants are estimated via samplestransmitted over a shared channel. Samples could be delayed and potentially lost because of contention.

we get:

q(i)0 = s

(i)0 +D

(i)0 ,

q(i)j+1 = inf

{

s(i)k +D

(i)k

∣D(i)k ≤ h, s

(i)k +D

(i)k > q

(i)j

}

,

j =

k∑

n=1

1{

D(i)n ≤h

} ≤ k.

At these reception times, the estimator i updates its estimate waveform according to:

x(i)t = x

(i)

q(i)j

ea(

t−q(i)j

)

, ∀ t ∈[

q(i)j , q

(i)j+1

)

.

We are interested in maintaining estimates of the process states so that the average distortion

Je ,1

N

N∑

i=1

lim supM→∞

1

M

∫ M

0

E

[

(

x(i)t − x

(i)t

)2]

dt (2)

is minimized. The distortion depends on the process time constant a and the noise intensities,but also on the MAC delays and loss probabilities, and hence on the number of contendingnodes. Our goal is to develop an analytical model for these dependencies: how the distortiondepends on the process time constants, average sampling rates, MAC delay and loss rate; howthe delays and loss rates depends on sampling scheme, MAC protocol, sampling interval andnumber of contending nodes; and how the overall system performance can be made to scalewith the number of contending nodes and the system time constants.

Int. J. Robust Nonlinear Control 20; :–

Prepared using rncauth.cls

Page 103: Design of Reliable Communication Solutions for Wireless Sensor Networks

91

NETWORKED ESTIMATION UNDER CONTENTION-BASED MAC 5

3. Estimation under random delays and losses

In this section, we study the expected performance for estimators operating under randomdelays and losses. We focus on scalar systems with noise-free observations and derive closed-form expressions for the mean-square distortion, first for the case of no contention delay,and later for the combined delay and loss scenario We give some insight related to optimalrandomized sampling policies, highlight why it is important to consider a continuous-timeanalysis, and demonstrate that in this framework, our assumption that all systems have thesame drift term corresponds to analyzing the worst-case scenario.

3.1. Analytical expressions for expected performance under time-varying sampling

Consider a scalar continuous-time process that obeys the stochastic differential equation,

dxt = axtdt+ dWt, (3)

with Wt being a standard one dimensional Wiener process independent of x0. The state processis assumed to be received with zero transmission delay at (possibly irregular but always causal)instants q0 < q1 < · · · < qk < · · · < ∞. The q-sequence can be seen as a subsequence (toaccount of packet losses) of the s-sequence from the previous section. But the discussion belowis valid for any causal sequence {qk} of reception times.

Assume that the process is estimated between the instants of successful transmissions bythe least squares estimator:

xt = xq(i)j

ea(t−qj), ∀ t ∈ [qj , qj+1) . (4)

Consider the mean-square distortion:

Je , lim supM→∞

1

M

∫ M

0

E

[

(xt − xt)2]

dt,

The error process is given by et = xt − xt, which obeys:

det = dxt − dxt = aetdt+ dWt.

Let Yt = e2t , and use Ito’s formula [17] to determine:

dYt = de2t = 2etdet +

1

2dt = (2aYt + 1) dt+ 2Y

1/2t dWt.

This equation is solved to be:

Yt =

∫ t

0

(2aYs + 1) ds+

∫ t

0

2Y 1/2s dWs.

Take the expectation, and use the fact that the expected value of an Ito integal is zero, to get:

E [Yt] =

∫ t

0

(2aE [Ys] + 1) ds,

which can be rewritten as:

dE [Yt] = 2aE [Ys] dt+ dt. (5)

Int. J. Robust Nonlinear Control 20; :–

Prepared using rncauth.cls

Page 104: Design of Reliable Communication Solutions for Wireless Sensor Networks

92CHAPTER 10. NETWORKED ESTIMATION UNDER CONTENTION

BASED MEDIUM ACCESS

6 RABI ET.AL.

0 0.1 0.2 0.3 0.4 0.510

−4

10−2

100

102

104

Sampling Period h [s]

J e

a=−1a=1a=10

0 0.2 0.4 0.6 0.8 110

−2

10−1

100

101

Packet Loss Probability ploss

J e

a=−1a=1a=10

Figure 2. Estimation performance under periodic sampling and and IID losses.On the left,we plot (in logarithmic scales) the estimation distortion under periodic generation and reception ofsamples (no losses). Notice that the distortion is always finite regardless of the value of h. On theright, we plot (in logarithmic scales) the estimation distortion for a fixed h (sample generation period),but with varying loss rates. Notice that for unstable systems, finite distortion is possible only if the

sample loss rate is small enough.

The solution to Equation (5) gives the expected value of the squared error process as:

E[

e2t

]

= E [Yt] =e2at − 1

2a+ e

2atE

[

e20

]

.

Because the expected error variance at time t = 0 is zero, we have:

E[

e20

]

= 0,

and hence:

E[

e2t

]

=e2at − 1

2a, (6)

which gives the integral of the squared estimation error under an inter-sample interval is givenby

∫ qj

qj−1

E[

e2t

]

dt =e2a(qj−qj−1) − 1

4a2−

qj − qj−1

2a. (7)

Performance under Bernoulli packet losses As an example of the above result, considerthe situation where the variations in the sample reception times is caused by packet losses,and the underlying loss process is Bernoulli with loss probability p. Then,

P [qj − qj−1 = nh] = (1 − p)p(n−1),

so that

E [qj − qj−1] =

∞∑

n=1

(1 − p)pn−1nh =

h

1 − p,

Int. J. Robust Nonlinear Control 20; :–

Prepared using rncauth.cls

Page 105: Design of Reliable Communication Solutions for Wireless Sensor Networks

93

NETWORKED ESTIMATION UNDER CONTENTION-BASED MAC 7

and,

Je =1

E[qj − qj−1]

∞∑

n=1

(1 − p)pn−1

(

e2anh − 1

4a2−nh

2a

)

.

Under the assumption:

2a <1

hln

(

1

p

)

, (8)

the series converges and we find

Je =1

4a2h

(1 − p)2e2ah

(1 − pe2ah)−

1 − p

4a2h−

1

2a. (9)

Combined with the expression for how the loss probability during the contention phase dependson MAC parameters and the number of contending nodes, the above expression will be anintegral part of our study of networked estimation under contention-based medium access.

Random sampling policies and continuous vs discrete time analysis Thecalculations in the previous section can also be useful for establishing more general results onhow the estimation performance depends on the distribution of inter-sample times. Specifically,assume that the mean sampling interval E[qj − qj−1] is fixed and equal to h. Then (7) givesthat

Je =1

hE [fc(qj − qj−1)] ,

with,

fc(∆k) =e2a∆k

4a2−

∆k

2a.

Since fc is a convex function, Jensen’s inequality implies that Je increases with increasingvariance in the inter-sample times. This formalizes the folklore that “jitter hurts” andestablishes that the optimal deterministic sampling policy is the conventional periodicsampling. As a consequence, for equal average sampling rate h, Bernoulli sampling is betterthan Poisson sampling (see [14] for a thorough examination of Poisson sampling). This followsfrom the fact that variance of the Poisson process σ2

p = h is greater than the variance of the

Bernoulli process σ2b = h(1−p), where p is the success probability. We also note in passing that

the situation is very different if we only consider the performance at the sampling instants.Specifically, let

J(d)e , lim sup

M→∞

1

M

M∑

j=1

E

[

(

xqk− xqj

)2]

= E[fd(qj − qj−1)],

where, by (6),

fd(∆k) =e2a∆k − 1

2a.

Int. J. Robust Nonlinear Control 20; :–

Prepared using rncauth.cls

Page 106: Design of Reliable Communication Solutions for Wireless Sensor Networks

94CHAPTER 10. NETWORKED ESTIMATION UNDER CONTENTION

BASED MEDIUM ACCESS

8 RABI ET.AL.

Then, since fd is convex for a > 0 and concave for a < 0, J(d)e increases with increasing

variance of the sampling interval when a > 0, but decreases with increasing variance of thesampling interval for a < 0 (indicating that jitter would actually be beneficial, cf. [14]). Thus,neglecting intersample behavior can be misleading and our subsequent investigations focusessolely on the continuous-time estimator performance.

3.2. Taking the MAC delay into account

In this part, we compute the effect of the delay within a sampling period in addition to theeffect of the sample losses. Note that a sample is declared lost if it could not be deliveredwithin one sample period. Consider a sample generated at time instant sk = kh. Assume thatthis sample has been successfully delivered within that sample period itself, but at a later timekh+Dk, where the MAC delay Dk is such that: 0 ≤ Dk ≤ h; see Figure 3. Denote by m− 1,the number of samples lost continuously henceforth. This means that the next successfullydelivered sample is the sample generated at time sk+m = kh + mh. Let the MAC delay forthe delivery of this sample be Dk+m. By this convention, when a sample generated at timenh is not delivered within a following period, it simply means that Dn > h. Note also thethe random sequence {Dn} is an IID one. The sequence of reception times is denoted by {qj}where,

q0 = s0 +D0,

qj+1 = inf {sk +Dk |Dk ≤ h, sk +Dk > qj },

j =

k∑

n=1

1{Dn≤h} ≤ k.

Because the samples are noise-free values of the state at sampling instants, despite thedelayed delivery, the corresponding least-squares estimator is still quite similar to the one inthe equation (4).

xt =

......,

x...h ea(t−...h)

, if . . . h+D... ≤ t < kh+Dk,

xkh ea(t−kh)

, if kh+Dk ≤ t < (k +m)h+Dk+m,

x(k+m)h ea(t−(k+m)h)

, if (k +m)h+Dk+m ≤ t < . . . h+D...,

.......

(10)

This is because of the Markov property of the x-process. If t, s1, s2, . . . , sK are times such that

t > s1 > s2 > . . . > sK ,

then,

P

[

xt ∈ A

∣x

s1, x

s2, . . . , x

sK

]

= P

[

xt ∈ A

∣x

s1

]

.

Since we incorporate the effect of the MAC delay, the recalculated mean-square distortion:

Je , lim supM→∞

1

M

∫ M

0

E

[

(xt − xt)2]

dt,

Int. J. Robust Nonlinear Control 20; :–

Prepared using rncauth.cls

Page 107: Design of Reliable Communication Solutions for Wireless Sensor Networks

95

NETWORKED ESTIMATION UNDER CONTENTION-BASED MAC 9

s

Ee

0 s1 s2 s3 s4

q0 q1 q2 q3

D1

D0 D > h2 D4

D3

Sample lost

Samples received at times q j

Samples generated at times s k

2

s0 s1 s2 s3 s4

q0 q1 q2 q3

Figure 3. Timing of production and reception of samples: samples are generated at times sk andsubject to a contention-induced delay Dk. If a new sample is generated before the previous has beensuccessfully transmitted, the old packet is discarded (resulting in a packet loss) and the more recent

sample is transmitted. The reception times of samples are denoted qj .

will be higher than before.The error process is given by et = xt − xt, which obeys:

det = dxt − dxt = aetdt + dWt

But with probability one, the estimation error variance is non-zero even at instants when asample is delivered. The expected value of the squared error process is:

E[

e2t

]

=e2a(t−kh) − 1

2a, ∀ kh + Dk ≤ t < (k + m)h + Dk+m.

Hence, the expected integral of the squared estimation error under an inter-sample intervalis given by:

∫ qj+1

qj

E[

e2t

]

dt =

∫ (k+m)h+Dk+m

kh+Dk

E[

e2t

]

dt,

=e2a[mh+Dm+k] − 1

4a2−

e2aDk − 1

4a2−

mh

2a. (11)

Int. J. Robust Nonlinear Control 20; :–

Prepared using rncauth.cls

Page 108: Design of Reliable Communication Solutions for Wireless Sensor Networks

96CHAPTER 10. NETWORKED ESTIMATION UNDER CONTENTION

BASED MEDIUM ACCESS

10 RABI ET.AL.

Since the underlying loss process is Bernoulli with loss probability p, as before,

E [qj+1 − qj ] = E [mh+Dm+k −Dk] ,

= E [mh] ,

=

∞∑

n=1

(1 − p)pn−1nh =

h

1 − p,

and

Je =1

E [qj+1 − qj ]

{

−E[

e2aDk

]

− 1

4a2+

∞∑

n=1

(1 − p)pn−1

(

e2a[nh+Dn+k] − 1

4a2−nh

2a

)

}

.

Now, under the same stability condition as before:

2a <1

hln

(

1

p

)

,

the series converges and we find

Je = E[

e2aDk

] (1 − p)(

e2ah − 1

)

4a2h (1 − pe2ah)−

1

2a. (12)

The quantity E[

e2aDk

]

in the above expression needs to be evaluated. There are three meansavailable to us. We could compute it exactly by numerical computation using the delaydistribution calculated in section 4. We could also evaluate it approximately by fitting a simpleparametric distribution such as the exponential one for the delay statistics. Another route ofapproximation would be to assume the worst case MAC delay of h seconds.

3.3. Assuming the same drift coefficient leads to the worst case

Here, we will see that the assumption of the same value for the drift coefficient (a) for theN different plants is a worst case assumption. Suppose that the a-values were different forthe different plants, then the average estimation distortion (12) for the plants is a monotonicfunction of a with the result that the plant with the largest a value will be estimated with thelargest average distortion. Hence, all other parameters being fixed, assuming that all systemshave the largest possible value of a leads to a systems with the largest sum of aggregatedistortions. Similarly, assigning the smallest values of a as the common value leads to thesmallest sum of aggregate distortions. However when the a values are all different, the optimalsampling intervals could be all different. In sections 4, 5 we will see that the optimal samplinginterval h∗ is somewhat insensitive to the value of a. The practical solution would be computethe optimal sampling interval for the largest and median values of the a-coefficient.

The aggregate error (Je) is a monotonically increasing function of a and will see this now.For any finite realization (κ1, κ2) of the pair (qj , qj+1), the integral

∫ κ2

κ1

e2at − 1

2adt,

is a differentiable and increasing function of Clearly, the above integral is a monotonicallyincreasing function of a. To see this, notice that,

d

da

e2at − 1

2a= e

2at 2at− 1 + e−2at

4a2t2,

Int. J. Robust Nonlinear Control 20; :–

Prepared using rncauth.cls

Page 109: Design of Reliable Communication Solutions for Wireless Sensor Networks

97

NETWORKED ESTIMATION UNDER CONTENTION-BASED MAC 11

which is non-negative because the function x − 1 + e−x is non-negative. To verify this last

claim, notice that:

e−x ≥ 1 − x, ∀x ∈ R,

because the straight line defined by y = 1 − x is a tangent to the convex function e−x.

Hence whenever the expectation of the integral is finite in an interval of a, it is also non-decreasing function of a in that interval.

4. Delay analysis in networks with independent or correlated traffic

As illustrated in the previous section, the estimation performance critically depends on thesample delays, as well as of the sample loss rate. In this section, we aim at characterizing thedistribution of these delays and at evaluating the sample loss rate in a network of N interferingsensors. For simplicity, we assume that sensors directly transmit samples to estimator nodes;in other words, we consider a single-hop network, although we expect similar results in thecase of multi-hop networks.

Traffic scenarios We investigate the sample delays in two extreme traffic scenarios. First weanalyze the case where the interfering sensors generate estimates simultaneously, i.e., they aresynchronized. Then, we consider the case where estimates at the various sensors are generatedindependently. In both scenarios, at a given sensor i, estimates are assumed to be generated

according to a renewal process: if s(i)l denotes the time at which the k-th sample is generated,

then the random variables (s(i)k+1 − s

(i)k ), k = 0, 1, . . ., are IID with distribution Si. Note also

that in the case of synchronized sensors, we have for any sensor i, and any sample k, s(i)k = sk,

and hence S(i) = S, the common distribution for inter-sample times. An important example isobtained when samples are periodically generated every h seconds; in this case, we have simply

S(i) = δ (t− h), the Dirac-delta function. The delays D(i)k at sensor i are determined by the

mechanics of the MAC protocol. We assume that if a sensor has not been able to transmit

successfully a sample before a new sample is generated (in our notation, D(i)k ≥ h), it then

tries to transmit the new estimate and discards the previous one.

MAC protocols The sample delays are due to the fact that the sensors compete to accessa common radio channel using some adaptive or non-adaptive MAC protocols. The objectiveof adaptive MAC protocols is usually to let each sensor continuously learn about the numberof active interfering sensors. Often in sensor networks, the number of sensors is not evolvingand actually, this number might be even known. This justifies why in the analysis we mainlyfocus on non-adaptive protocols. The results can be generalized to adaptive protocols as thoseused in IEEE802.15.4 systems. Unless otherwise specified, sensors use a non-adaptive CSMAprotocol: time is slotted and the slot duration is denoted by L; when a sensor has a new sampleto transmit, a contention window is drawn randomly according to some distribution C withmean 1/µtr slots. The contention window is decremented after each empty slot, and the sensormay start transmitting only when it reaches zero. If two sensors attempt to transmit samplesat the same time, they suffer from a collision and the samples have to be retransmitted. Aftera collision, a new contention window is drawn. Of particular interests are the cases where

Int. J. Robust Nonlinear Control 20; :–

Prepared using rncauth.cls

Page 110: Design of Reliable Communication Solutions for Wireless Sensor Networks

98CHAPTER 10. NETWORKED ESTIMATION UNDER CONTENTION

BASED MEDIUM ACCESS

12 RABI ET.AL.

the contention window distribution C is the uniform distribution on [0, 2/µtr] (as suggestedin 802.15.4 standards), and where C is a geometric distribution. In the latter case, a sensorstarts transmitting at the beginning of each empty slot with probability µtr as in classicalslotted-Aloha. To facilitate the analysis, and unless otherwise specified, we assume that thecontention window is geometrically distributed. Finally the transmission of a sample requiresa single time-slot.

In the following we provide an analytical characterization of the processes representing thereceptions of the samples generated by sensor i by the corresponding estimator node. Denote

by D(i)l the delay of the k-th sample generated by sensor i, keeping in mind that if D

(i)k is such

that s(i)k +D

(i)k > s

(i)k+1, then the sample is discarded. We restrict our attention to symmetric

systems where sensors have similar sample generation processes. The delays at the variousnodes are dependent but because of symmetry, they all have the same distribution. Hence, wemay drop superscript i and denote by Dk the generic delay of the k-th sample.

4.1. Synchronized sensors

In such a scenario, the system evolution can be represented by a renewal process with renewalepochs coinciding with those of sample generations. We then define by D the typical delay ofa sample generated by a given sensor. Let us evaluate the distribution of D.

Let rj be the random delay expressed in slots required for exactly j sensors to successfully

transmit their samples. Then rj =∑j

i=1 vi where vi is the duration in slots of the intervalof time between the transmissions of the samples of the (i − 1)-th successful sensor and i-thsuccessful sensor. We have: for all k ≥ 1,

P[vi = k] = ai(1 − ai)k−1

, where ai = (N − i+ 1)µtr(1 − µtr)N−i

. (13)

The Moment generating function of vi is then defined by:

φvi(z) =

aiz

1− (1− ai)z,

and that of rj is:

φrj(z) = z

j

j∏

i=1

ai

1− (1− ai)z

= zj

j∑

i=1

bi

z − 11−ai

,

with

bi =

[(

z −1

1− ai

)

· φrj(z)z−j

]

z= 11−ai

.

Hence, using similar arguments as in [22], we deduce the distribution of rj to be:

P [rj = k] =

{

0 if k < j,∏j

i=1 ai

∑jl=1

(al−1)j

∏j

h=1,h6=l(al−ah)

(1− al)k−j

, otherwise. (14)

Int. J. Robust Nonlinear Control 20; :–

Prepared using rncauth.cls

Page 111: Design of Reliable Communication Solutions for Wireless Sensor Networks

99

NETWORKED ESTIMATION UNDER CONTENTION-BASED MAC 13

By symmetry, we know that: for all k ≥ 0, P [D = kL] = 1N

∑Nj=1 P[rj = k], and hence,

P[D = kL] =1

N

N∑

j=1

j∏

i=1

ai

j∑

l=1

(al − 1)j

∏jh=1,h 6=l(al − ah)

(1 − al)k−j1{k≥j}. (15)

From the distribution of D we can derive other quantities of interest. For example, the sampleloss rate p is equal to:

p =

∫ ∞

0

S(du)∑

k:kL>u

P[D = kL]. (16)

The above formula is obtained conditioning on the duration of the interval between thegenerations of two successive samples (remember that S is the distribution of this duration).Given that the next sample is generated after the previous one and a delay u, the sample is lostif and only if D > u. When the sensors generate samples periodically once every h seconds,the sample loss rate becomes:

p = P [D > h] =∑

k≥⌊h/L⌋

P [D = kL] . (17)

We can also derive the distribution of a typical sample inter-arrival time τ at a estimatornode. In the case of periodic sampling with period h, we can write: τ = Dl+M − Dl + Mh,where M − 1 is the number of samples lost between the two received samples, Dl and Dl+M

are the delays of the first and second received samples respectively. Note that the randomvariables Dl, Dl+M and M are independent, and then the distribution of τ is obtained bysimple convolutions. In other words, it is characterized by:

P[τ = t] =

∞∑

n=1

k1,k2

1{nh+k1L+k2L=t}pn−1

P[D = k1L]P[D = k2L]. (18)

4.1.1. Heuristic choice for the probability of attempting transmissions We want to tune thevalue of the transmission probability µtr so as to minimize the sample loss rate. In [20], it hasbeen shown that in the case of periodic sampling, a good approximation for the optimal µtr

was given by:

µtr =2

N + 2.

We will arrive at such an assignment after some approximations.Firstly, we consider an approximate scheme to maximize the probability (πN ) that all N

nodes succeed in transmitting their packets within a sampling period.

πN = P

[(

N∑

i=1

νi

)

h

L

(h) − N

]

The approximation consists in claiming that πN is maximized by choosing µtr to minimize:

E

[(

N∑

i=1

νi

)

(⌊

h

L

− N

)

]

.

Int. J. Robust Nonlinear Control 20; :–

Prepared using rncauth.cls

Page 112: Design of Reliable Communication Solutions for Wireless Sensor Networks

100CHAPTER 10. NETWORKED ESTIMATION UNDER CONTENTION

BASED MEDIUM ACCESS

14 RABI ET.AL.

Here,⌊

hL

− N does not depend on µtr. Using this observation and the fact that each νi hasa geometric distribution, we see that µtr should minimize the expression:

N∑

i=1

1 − aN−i+1

aN−i+1

. (19)

Now we adopt a second approximation. To derive an (approximate) expression for the loss ratep, we use the form of the expression in equation (16) and claim that p is minimized when

N∑

i=1

(N − i)1 − a

N−i+1

aN−i+1

. (20)

is minimized. The difference between the two expressions (19), (20) is in the weightingfactor N − i present in the one for p(h). This factor reflects the fact that νi affects thestatistics of the timing for the i

th successful transmission, but also those of the remainingsuccessful transmissions; we have used a linear factor i− 1 to model this dependence. The lastapproximation step is to replace the weighting term N − i with N − i + 1, so that we canobtain a closed form expression.

Hence the suboptimal µtr we are seeking is the one that minimizes:

N∑

i=1

(N − i + 1)1 − a

N−i+1

aN−i+1

=

N∑

i=1

(N − i + 1)1 − (N − i)µtr(1 − µtr)

N−i

(N − i + 1)µtr(1 − µtr)N−i

.

Notice that this is the same as minimizing:

N∑

i=1

(N − i + 1)1

(N − i + 1)µtr(1 − µtr)N−i

,

=

N∑

i=1

1

µtr(1 − µtr)N−i

,

=1 − (1 − µtr)

N+1

µ2tr(1 − µtr)

N.

The above minimization gives us:

µ∗tr ≈

2

N + 2.

4.2. Independent sensors

Let us now evaluate the delays in the case of independent sensors. In general, an exact analysisis not possible, because of the inherent correlations between the transmission attempts of thevarious sensors. To circumvent this difficulty, we use the heuristic developed by Bianchi [4] toquantify the performance of the IEEE802.11 DCF in saturated Wireless LANs. The heuristicsconsists in analyzing the transmissions of a single sensor assuming that the other sensors create

Int. J. Robust Nonlinear Control 20; :–

Prepared using rncauth.cls

Page 113: Design of Reliable Communication Solutions for Wireless Sensor Networks

101

NETWORKED ESTIMATION UNDER CONTENTION-BASED MAC 15

a constant random interference. This approach can be generalized to the case of un-saturatednodes (which is usually more realistic in sensor networks), and it has been recently theoreticallyjustified [5].

Denote by λ the stationary probability that a given sensor has a sample to transmit. Thenthe probability c that a sensor experiences a collision when attempting to use the wirelesschannel can be approximated by:

c = 1 − (1 − λµtr)N−1

. (21)

As previously, when isolating a given sensor, the system evolution can be represented asa renewal process with renewal epochs coinciding with those of sample generations. Let usconsider that at time 0, a sample is generated, and let us fix the epoch u at which the nextsample is generated. Define s = ⌊u/L⌋. Consider a time-slot before the successful transmissionof the sample created at time 0. The probability that the sample is not transmitted in this slotis α = (1 − µtr) + µtrc. Now for all k = 1, . . . , s, the probability that the sample generated attime 0 is transmitted successfully at time-slot k is:

P [D = kL] = µtr(1 − c) × αk−1

.

Similarly:P [D > sL] = α

s.

Note that D > sL means that the sample is not transmitted before the generation of a newsample. We deduce the average proportion of time where the sensor has a sample to transmitin the interval [0, u]:

1

u

(

µtr(1 − c)

s∑

k=1

kαk−1 + uα

s

)

. (22)

Finally applying the renewal theorem and averaging over all possible values of u, we get:

λ =

∫∞

0 S(du)(

µtr(1 − c)∑s

k=1 kαk−1 + uα

s)

∫∞

0 S(du)u. (23)

When sampling is performed periodically once every h seconds, the stationary probability thata sensor has a sample to transmit simplifies to:

λ =µtr(1 − c)

h

⌊h/L⌋∑

k=1

kαk−1 + α

⌊h/L⌋. (24)

Solving the system of equations (21)-(23), we get c and λ and the delay distribution. Fromthere, as previously, we can deduce the sample loss rate and the inter-arrival of samples at theestimator nodes.

4.3. Numerical experiments

We conclude this section by presenting numerical calculations and simulations to illustratethe results obtained above. We consider periodic sampling only and set the slot length L tobe 10ms. All the results are obtained using the optimal heuristic choice for µtr. The accuracyof this heuristic is illustrated in the last figure of the section. Unless otherwise specified, thedistribution of the contention window is geometric.

Int. J. Robust Nonlinear Control 20; :–

Prepared using rncauth.cls

Page 114: Design of Reliable Communication Solutions for Wireless Sensor Networks

102CHAPTER 10. NETWORKED ESTIMATION UNDER CONTENTION

BASED MEDIUM ACCESS

16 RABI ET.AL.

0 0.2 0.4 0.6 0.810

−4

10−3

10−2

10−1

100

Sampling Period h [s]

Pac

ket L

oss

Pro

babi

lity

p loss

N=2N=5N=25N=125

Figure 4. Sample loss rate in a fully synchronized system and periodic sampling.

0 0,04 0,08 0,1210

−2

10−1

100

Sampling Period h [s]

Pac

ket L

oss

Pro

babi

lity

p loss

Sync. src., geom. CWSync. src, uniform CWIndep. src., geom. CWIndep. src, uniform CW

Figure 5. Sample loss rate with fully synchronized or independent sensors and geometric or uniformcontention windows. Here, the number of competing nodes N = 25, and, in the legend, ’src’ stands

for source.

In Figure 4, we evaluate the sample loss rate in the case of a fully synchronized system as afunction of the sampling period h for various numbers of sensors N . Figure 5 is the analog ofFigure 4, but here we add the case of independent sensors, and also compare the performancewhen choosing geometrically or uniformly distributed contention windows. The difference isnot negligible, and uniform contention windows yield smaller loss rates.

Finally, in Figure 6, we compare our heuristic optimal transmission probability to the actualoptimal probability obtained using numerical optimization. As shown, the heuristic is veryaccurate.

Int. J. Robust Nonlinear Control 20; :–

Prepared using rncauth.cls

Page 115: Design of Reliable Communication Solutions for Wireless Sensor Networks

103

NETWORKED ESTIMATION UNDER CONTENTION-BASED MAC 17

10 20 30 40 50 60 70 80 9010

−6

10−4

10−2

100

Number of Contending Nodes N

Pac

ket L

oss

Pro

babi

lity

p loss

Numerically estimated optimal qtr

Heuristic choice of qtr

Figure 6. Accuracy of the heuristic choice for µtr.

5. Networked estimation under contention-based medium access

As demonstrated in Section 3, real-time estimation based on a stream of samples has a qualitydependent on the statistics of the inter-sample intervals and, to a lesser extent, also onthe statistics of the MAC delay (since the delay is upper bounded by h). In section 4 wederived analytical models for how these parameters depend on the MAC scheme, the numberof contending nodes and the rate at which new samples are generated. Our aim now is tostudy the achievable performance of estimation under contention-based medium access andcharacterize how this depends on critical system parameters.

To develop a basic intuition for the compound problem, consider the case of IID losses andzero MAC delay. The mean packet loss rate then completely determines the statistics of theinterarrival times for samples. As illustrated in Figure 2(left) in Section 3, the estimationperformance improves with decreasing sampling interval. On the other hand, as shown inSection 4, as the sampling interval decreases, fewer sensors succeed in transmitting theirsamples before the next one is generated, which results in an increased packet loss rate(see Figures 4 and 5) and a rapid deterioration in the estimation performance (Figure 2,right). Thus, when the sampling interval is small, the rate of samples being generated ishigh but so is the packet loss rate p. Increasing h lowers p but also decreases the rate ofsample generation. Consequently, there should be an optimal sampling rate which balancesthe benefit of generating samples at a high rate with the deterioration caused by increasedcontention-induced MAC delays and loss rates. This behavior is clearly seen in Figure 5, whichshows the estimator performance as function of sampling interval for a stable and an unstablesystem, respectively. In the stable case, the performance goes towards the steady state variance(1/2a = 1/2 in this case) as h → 0 while in the unstable case, the distortion grows unboundedwhen the sampling rate is so high that the packet loss rate approaches the stability bound (8).

In the case of synchronized transmissions with a geometric contention window, we can drawan useful guideline. Although the distribution of inter-sample times is not exponential, roughlyspeaking, its higher moments are lowered when its mean is lowered. A glimpse of this propertycan be discerned in figure 8 . This property suggests a rule-of-thumb for picking a suitable

Int. J. Robust Nonlinear Control 20; :–

Prepared using rncauth.cls

Page 116: Design of Reliable Communication Solutions for Wireless Sensor Networks

104CHAPTER 10. NETWORKED ESTIMATION UNDER CONTENTION

BASED MEDIUM ACCESS

18 RABI ET.AL.

0 0.01 0.02 0.03 0.04 0.05 0.06

0.46

0.47

0.48

0.49

0.5

Sampling Period h [s]

J e

N=2N=5N=25

0 0.02 0.04 0.06 0.08 0.10

20

40

60

80

100

Sampling Period h [s]

J e

N=2N=5N=25

Figure 7. Estimator performance as function of sampling interval for a stable system with a = −1(left) and an unstable system with a = 0.001 (right). In both cases, the number of contending nodesN = 25. The performance plots display a clear minimum which balances the generation of new samples

with the contention-induced loss rate.

0 0.1 0.2 0.3 0.4 0.5 0.60

0.1

0.2

0.3

0.4

0.5

0.6

Sampling Period h [s]

Mea

n In

tera

rriv

al T

ime

E[q

j+1−

q j]

N=2N=5N=25N=125

10−2

10−1

100

102

104

106

Sampling Period h [s]

E[(

q j+1−

q j)2 ]

N=2N=5N=25N=125

Figure 8. Variation of the first and second moments of the time between sample receptions as thesample generation period h changes.

sampling interval, namely the h that minimizes E [qj+1 − qj ]. As observed in Figure 8, thesampling period h

⋆ minimizing the average sample inter-arrivals, and thus leading to the bestestimation performance, grows linearly with the number N of sensors. This observation seemsvalid both in the cases of independent and synchronized sensors. For independent sensors, wemay justify the observation as follows. We know that the transmission probability µtr has toscale as 1/N . This implies that α = (1 − µtr) + µtrc roughly behaves as 1 − g/N for somepositive constant g. The sample loss rate p = α

⌊h/L⌋ then scales as exp(−g′h/N) where g

′ isanother positive constant. Finally, the average sample inter-arrivals can be approximated byh/(1 − p), and one can easily show that the latter quantity is minimized for a value h

⋆ of h

that grows linearly with N . Justifying the linear growth in the case of synchronized sensors is

Int. J. Robust Nonlinear Control 20; :–

Prepared using rncauth.cls

Page 117: Design of Reliable Communication Solutions for Wireless Sensor Networks

105

NETWORKED ESTIMATION UNDER CONTENTION-BASED MAC 19

0 0.02 0.04 0.06 0.080.496

0.4965

0.497

0.4975

0.498

0.4985

0.499

0.4995

0.5

Sampling Period h [s]

J eSync. src, geom. CWSync. src, uniform CWIndep. src, geom. CWIndep. src, uniform CW

Figure 9. Estimation distortion for the four cases we considered. The curves have been generatedassuming N = 25 nodes and a = −1.

more intricate, but the numerical experiments clearly illustrate this growth.Now, comparing this rule-of-thumb with the optimal sampling time selection shown in

Figure 9,10 reveals that it works quite well also when we target the estimation distortion.For instance considering when there are 25 synchronized sources with stable plants, withuniform/geometric contention window (CW), the estimation distortion is minimized whenh = 0.051 seconds. Instead, if we consider an unstable plant, the h minimizing the estimationdistortion is 0.07 seconds. The value of h minimizing the mean inter-arrival time is h = 2NL =0.05 seconds. However, the rule does not provide the true optimum.

When comparing the performance of independent and synchronized sensor transmissions, asdescribed in Figures 9 and 10, the delays and the sample loss rate are usually better when sensortransmissions are independent. This echoes a popular theorem in traffic/queueing analysis thatsays that having batch arrivals (synchronized sensors) leads to a worse performance than thatobtained when traffic is not generated in batches. However, while the performance metrics(delays and loss rate) are different for different transmission schemes, they are always ofthe same order. This explains also why we have a linear growth of h

⋆ even in the case ofsynchronized sensors.

In Figures 9 and 10, we also notice a double-chin in the performance plots for transmissionschemes with uniform contention windows. This is perhaps due to the sampling interval beingclose to the contention window.

We finally make a remark on scalability issues: once we fix the sampling period h, the packetloss rate p will monotonically increase with the number of contending nodes N . Depending onthe specific value of a this will lead to a critical threshold which basically gives the maximumnumber of contending sensors which can be included in the system to maintain a bounded Je

(see equation (8)). As an example, we reported in figure 11 how the packet loss rate varieswith the number of nodes assuming a sampling period h = 0.1 seconds, with fully synchronizedsources and geometrically distributed back-off counters. The three horizontal lines denote themaximum acceptable loss rate to ensure stable estimation. Increasing the level of instabilityof the system decreases the maximum allowable number of nodes; in the same way, for a fixeda, increasing the sampling period will reduce the loss rate and thus allows to accommodate

Int. J. Robust Nonlinear Control 20; :–

Prepared using rncauth.cls

Page 118: Design of Reliable Communication Solutions for Wireless Sensor Networks

106CHAPTER 10. NETWORKED ESTIMATION UNDER CONTENTION

BASED MEDIUM ACCESS

20 RABI ET.AL.

0.02 0.04 0.06 0.08

40

50

60

70

80

90

100

Sampling Period h [s]

J eSync. src, geom. CWSync. src, uniform CWIndep. src, geom. CWIndep. src, unifrom CW

Figure 10. Estimation distortion for the four cases we considered. The curves have been generatedassuming N = 25 nodes and a = 0.001.

50 100 150 2000

0.2

0.4

0.6

0.8

1

Number of Contending Nodes N

p(h,

N)|

h=0.

1[s]

a=1a=2a=10

Figure 11. Packet loss rate for h = 0.1[s] as a function of N . The three horizontal curves identify themaximum values of p which result in a bounded estimation.

more sensors in the system.

Analogous considerations apply if we have a constraint on the maximum acceptableestimation distortion: increasing the number of nodes will also result in increased Je as shownin Figure 12.

6. Conclusions

We have considered the problem of networked estimation over a communication channelshared by a contention-based medium access protocol. For analytical tractability, we havestudied the situation when N identical scalar systems are sampled without sensor noise andtransmitted over the channel, and focused on contention-based medium access mechanisms

Int. J. Robust Nonlinear Control 20; :–

Prepared using rncauth.cls

Page 119: Design of Reliable Communication Solutions for Wireless Sensor Networks

107

NETWORKED ESTIMATION UNDER CONTENTION-BASED MAC 21

20 40 60 80

10−1

100

Number of Contending Nodes N

J ea=−1a=1a=2

Figure 12. Estimation distortion as a function of N for a = −1, 1, 2.

with geometric (ALOHA-like) and uniform (CSMA-like) contention windows. This has allowedus to derive closed-form expressions for how the expected estimator performance dependson the system dynamics, sampling interval, MAC delay and packet loss probability. Thecalculations give insight into optimal randomized sampling policies and establishes theimportance of considering a continuous-time performance criterion. We have also derivedanalytical models for the delay and loss probability distributions for MAC protocols withgeometric and uniform contention windows under both synchronized and independent sensingtimes. For the case of geometric contention window, we derive a heuristic for optimal selectionof the transmission probabilities, and discuss the optimal sampling time selection from acommunications perspective. Integrating the two models allows us to study the compoundproblem, deriving guidelines for sampling time selection, and studying how the systemperformance scales with the number of sensor nodes and the degree of instability of theindividual plants.

There are many open issues in our work. On the estimation side, it would be interesting toextend the work to cover noisy observations and (at least classes of) vector-valued systems.On the networking side, it would be useful to develop improved tools for studying networkswith transient and correlated traffic, as well as short buffers where delayed packets must bediscarded. It would also be interesting to study systems with adaptive back-off counters suchas 802.15.4, and develop improved and control-relevant MAC protocols.

Int. J. Robust Nonlinear Control 20; :–

Prepared using rncauth.cls

Page 120: Design of Reliable Communication Solutions for Wireless Sensor Networks

108CHAPTER 10. NETWORKED ESTIMATION UNDER CONTENTION

BASED MEDIUM ACCESS

22 RABI ET.AL.

REFERENCES

1. S. Adlakha, B. Sinopoli, and A. Goldsmith. Optimal sensing rate for estimation over shared communication

links. In Proceedings of American Control Conference, pages 5043–5045, N.Y., N.Y., July 2007.

2. P. Antsaklis and Eds. J. Baillieul. Special issue on technology of networked control systems. Proceedingsof the IEEE, 95(1), January 2007.

3. P. Baronti, P. Oillai, V. Chook, S. Chessa, A. Gotta, and Y. F. Hu. Wireless sensor networks: a survey on

the state of the art and the 802.15.4 and ZigBee standards. Computer Communication, 30(7):1655–1695,

2007.

4. G. Bianchi. Performance analysis of the IEEE 802.11 distributed coordination function. IEEE Journalon Selected Areas in Communications, 18(3):535–547, March 2000.

5. C. Bordenave, D. McDonald, and A. Proutiere. Performance of random medium access control: an

asymptotic approach. In Proc. of ACM Sigmetrics, 2007.

6. M. S. Branicky, V. Liberatore, and S. M. Phillips. Networked control system co-simulation for co-design.

In Proc. American Control Conference, volume 4, Denver, USA, June 2003.

7. T. Cover and J. Thomas. Elements of Information Theory. John Wiley & Sons, 1991.

8. HART Communications Foundation. Hart protocol specifications, revision 1.0.

http://www.hartcomm.org, August 2007.

9. M.T. Hadidi and S.C. Schwartz. Linear recursive state estimation under uncertain observations. IEEETransactions on Automatic Control, 24:944–948, 1979.

10. J.P. Hespanha, P. Naghshtabrizi, and Yonggang Xu. A survey of recent results in networked control

systems. Proceedings of the IEEE, 95(1):138–162, Jan. 2007.

11. K. Koumpis, L. Hanna, M. Andersson, and M. Johansson. Wireless industrial control and monitoring

beyond cable replacement. In Proc. 2nd PROFIBUS International Conference, Coombe Abbey, UK,

June 2005.

12. F-L. Lian, J. Moyne, and D. Tilbury. Network design consideration for distributed control systems. IEEETransactions on Control Systems Technology, 10(2):297–307, Mar 2002.

13. P. J. Marron, D. Minder, and the Embedded WiSeNts Consortium. Embedded WiSeNts research roadmap.Logos Verlag, Berlin, 2006.

14. M. Micheli and M. I. Jordan. Random sampling of a continuous-time stochastic dynamical system. In

Proc. of the 15th International Symposium on the Mathematical Theory of Networks and Systems, Notre

Dame, Indiana, August 2002.

15. J. Morse. Market pulse: Wireless in industrial systems: cautious enthusiasm. Industrial EmbeddedSystems, 2(7):10–11, 2006.

16. G. Mulligan. The 6LoWPAN architecture. In Proceedings of the 4th workshop on Embedded networkedsensors, pages 77–82, Cork, Ireland, June 2007.

17. B. Øksendal. Stochastic differential equations. Universitext. Springer-Verlag, Berlin, sixth edition, 2003.

An introduction with applications.

18. S. Pollin, M. Ergen, S. Coleri Ergen, B. Bougard, L. Van der Perre, F. Catthoor, I. Moerman, A. Bahai,

and P. Varaiya. Performance analysis of slotted carrier sense IEEE 802.15.4 medium access layer. IEEETransactions on Wireless Communications, 2007. Accepted.

19. A. Prez-Yuste. Early developments of wireless remote control: The Telekino of Torres-Quevedo.

Proceedings of the IEEE, 96(1):186–190, 2008.

20. M. Rabi, L. Stabellini, P. Almstrom, and M. Johansson. Analysis of networked estimation under

contention-based medium access. In Proceedings of the 2008 IFAC World congress, 2008.

21. B. Sinopoli, L. Schenato, M. Franceschetti, K. Poolla, M. I. Jordan, and S. S. Sastry. Kalman filtering

with intermittent observations. IEEE Transactions on Automatic Control, 49(4):1453–1464, September

2004.

22. L. Stabellini and A. Proutiere. Evaluating delay and energy in sensor networks with sporadic and

correlated traffic. In AdHoc’07, may 2007.

23. W. S. Wong and R. W. Brockett. Systems with finite communication bandwidth - part I: state estimation

problems. IEEE Transactions on Automatic Control, 49(9):1294–1299, September 1997.

24. W. S. Wong and R. W. Brockett. Systems with finite communication bandwidth - II: stabilization with

limited information feedback. IEEE Transactions on Automatic Control, 44(5):1049–1053, May 1999.

25. L. Xiao, M. Johansson, H. Hindi, S. Boyd, and A. Goldsmith. Joint optimization of communication rates

and linear systems. IEEE Transactions on Automatic Control, 48(1):148–153, January 2003.

Int. J. Robust Nonlinear Control 20; :–

Prepared using rncauth.cls

Page 121: Design of Reliable Communication Solutions for Wireless Sensor Networks

Chapter 11

Utility Based Adaptive FrequencyHopping

Luca Stabellini, Lei Shi, Ahmad Al Rifai, Juan Espino, Veatriki Magoulasubmitted to International Symposium on Wireless Communication Systems (ISWCS),2009.

109

Page 122: Design of Reliable Communication Solutions for Wireless Sensor Networks
Page 123: Design of Reliable Communication Solutions for Wireless Sensor Networks

111

Utility Based Adaptive Frequency Hopping

Luca Stabellini, Lei Shi, Ahmad Al Rifai, Juan Espino, Veatriki MagoulaWireless@KTH, The Royal institute of Technology, Electrum418, SE-164 40 Kista, Sweden

Email: {lucast,lshi, ahmadar, espino, veatriki}@kth.se

Abstract—Frequency hopping technology represents a com-mon solution for interconnecting personal area network devicesoperating in unlicensed bands. Through synchronous hoppingover a defined set of channels, thehopset, frequency hoppingsystems achieve a certain degree of frequency diversity evenif, in presence of interference or bad channel conditions, theirperformance can be severely degraded. In this paper we pro-pose Utility Based Adaptive Frequency Hopping (UBAFH), anadaptive hopping technique implementing a new paradigm forfrequency hopping systems. Traditional adaptive algorithms aimat identifying bad channels that are consequently removed fromthe hopset. UBAFH instead utilizes all the available frequenciesbut assigns different usage probabilities to different channelsaccording to the experienced channel conditions. Opportuneupper and lower limits are used in order to bound these usageprobabilities and achieve a desired level of frequency diversity.We simulate the behavior of UBAFH over frequency selectivefading channels and compare the achieved packet error ratewith the one of IEEE 802.15.1 and with the adaptive frequencyhopping implementation proposed by IEEE 802.15.2 showing thatUBAFH outperforms both approaches.

I. I NTRODUCTION

Unlicensed frequency bands enable extensive usage ofwireless communications allowing open access to spectrumfor devices complying with a set of basic rules defined byspectrum regulators (see for instance the ones defined by FCCin [1]). The open nature of such portions of spectrum is anattractive incentive for the diffusion of wireless systemsthatchoosing to operate in unlicensed frequencies can access thewireless medium without the need of a license. On the otherhand, due to the increasing proliferation of wireless devices,the few available unlicensed bands are becoming more andmore crowded and the resulting interference poses severalchallenges that need to be addressed in order to guaranteeapplication reliability. A clear example of a crowded scenariois given by the 2.4 GHz ISM band, where several radiostandards operate in the few MHz of available spectrum.

One common way adopted for dealing with problemsinduced by interference is to use frequency hopping (FH)communication techniques. The basic idea implemented bythese schemes is to “jump“ over a set of channels (thehopset) according to a hopping sequence known by all devicesbelonging to the same network: this allows to achieve acertain degree of frequency diversity that can guarantee someresilience against packet losses. Examples of radio standardsexploiting this solution are the Bluetooth [2] and the WirelessHART [3] standard. A common limitation of FH systems isthat all channels belonging to the hopset are used for packettransmissions. For instance taking as a reference case the

Bluetooth standard, interconnection among a master deviceand at most seven active slaves is achieved by means ofsynchronous hopping over a set of 79 1 MHz channels inthe 2.4 GHz ISM band. The hopping sequence, which isdetermined by the master and then communicated to activeslaves, comprises all the available channels that are in factused with equal probabilities. A network of devices adoptingthe same hopping sequence is referred to aspiconet. It iswell known that the performance of a piconet can be severelydegraded in presence of interference generated by collocatednetworks. This interference can induce packet losses, de-creasing throughput and consequently increasing delay andenergy consumption. A typical scenario that could arise inthe considered 2.4 GHz ISM band might involve Bluetoothdevices collocated with a WLAN network operating within theIEEE 802.11b/g [4] radio standard. In this case the piconet willsuffer from interference and frequencies overlapping withthechannels used by WLAN devices will experience high packeterror rate (see for instance [5], [6] and references therein).

To avoid these problems, adaptive FH techniques (AFH, [7],[8]) have been developed. The basic idea implemented by theseschemes is to remove from the hopping sequence frequen-cies experiencing bad channel conditions (for instance highPER), consequently reducing the cardinality of the hopset.Tothis purpose the resulting algorithms make use of a channelclassification procedure that is basically required to identifychannels unsuitable for packet transmissions. This procedurehowever introduces delays. Moreover, channels removed fromthe hopping sequence need to be periodically checked toverify if they still don’t meet the specified performancerequirements. Finally if channel conditions change, a newclassification procedure has to be carried out in order to allowfor adaptation. All these limitations (already partially outlinedin [9]) contribute in reducing the effectiveness of adaptivehopping schemes. In this paper we propose a new AFHalgorithm, namely Utility Based Adaptive Frequency Hopping(UBAFH) that adopts a different approach and overcomes theaforementioned problems. In UBAFH each node belonging tothe same piconet constantly maintains estimation of packeterror rate for all frequencies of the hopset: the estimatedPERs are then mapped to a probability density functiondefining usage probabilities for each channel and assigninghigher usage probabilities to channels with better conditions.The same mapping procedure produces identical probabilitydensity functions on all the nodes of the piconet that willtherefore be able, for instance by sharing a common seed forgenerating random numbers, to synchronously select channels

Page 124: Design of Reliable Communication Solutions for Wireless Sensor Networks

112 CHAPTER 11. UTILITY BASED ADAPTIVE FREQUENCY HOPPING

for packet transmissions.The rest of the paper is organized as follows. Section II

reviews related works. Section III describes our Utility BasedAdaptive Frequency Hopping Algorithm while Section IVpresents simulation results. Finally conclusions are outlinedin Section V.

II. RELATED WORK

Adaptive techniques were included in the Bluetooth speci-fications since version 1.2 where the first adaptive frequencyhopping algorithm jointly developed by the IEEE 802.15.2Coexistence Task Group and the Bluetooth Special InterestGroup (SIG) was proposed. We will refer to this algorithmusing the acronym IEEE AFH. IEEE AFH involves threedifferent steps:

i. channel classification that allows to classify the channelsof the hopset as “good“ or “bad“ according to a prede-fined metric such as packet error rate or received signalstrength;

ii. channel classification information exchange, occurringwhen the slaves of a piconet report to the master channelinformation;

iii. hopping sequence adaptation, carried out by the masterof the piconet which removes from the hopping sequencebad channels and communicates the new sequence to allactive slaves.

For further details on IEEE AFH the reader is referredto [7]. Several variants aiming at improving IEEE AFHperformance have been proposed: these include methods fordetecting mutual interference among collocated piconets andfrequency static interference such as the one originated byWLAN devices. For instance in [10] the Interference SourceOriented Adaptive Frequency Hopping (ISOAFH) scheme waspresented. Based on the fact that each IEEE 802.11b channeloverlaps with 22 of the Bluetooth subcarriers the originalhopset is divided into groups. Then the channel classificationprocedure rather than identifying individual bad channelsaims at localizing the WLAN carrier(s) and consequentlyavoids hopping over the involved group of channels. In [11]the Adaptive Frequency Rolling (AFR) algorithm has beenintroduced. To limit mutual interference, AFR partitions thehopset in several groups and then assigns different groups todifferent piconets adopting a time division scheme. Mitigationof mutual interference among collocated piconets has alsobeen the focus of [12], that introduced the Dynamic AdaptiveFrequency Hopping (DAFH) algorithm. Based on the observedpacket error rate DAFH allows different networks to self-allocate in an adaptive manner a subset of channels to behopped such that the experienced interference is minimized.The Enhanced Adaptive Frequency Hopping (EAFH) schemehas been proposed in [13]: EAFH reduces the size of theused hopset by removing channels with high packet errorrate. Furthermore a specific packet length is selected for eachfrequency of the hopset so as to optimize performances. In[14] an algorithm aiming at increasing the spectral efficiencyof hopping systems has been proposed: the basic idea tailored

by this scheme was to dynamically adapt the spacing amonghopping carriers according to experienced load and channelconditions.

III. UBAFH: A LGORITHM DESCRIPTION

In this Section we provide a complete overview of ourUtility Based Adaptive Frequency Hopping Algorithm. Just forthe sake of simplicity we will consider a two nodes network.As outlined in Section II, different variants of the originalIEEE AFH implementation have been proposed: however allthe developed algorithms basically exploit the same principleand aim at reducing the cardinality of the hopset by removingfrom the used hopping sequence channels that don’t satisfya certain performance criterion. UBAFH adopts instead adifferent paradigm and utilizes all the available frequencieswith usage probabilities that are determined according to theexperienced channel conditions. An opportune upper limit onsuch usage probabilities is introduced to comply with FCCregulations; a lower limit is also used in order to ensurea certain degree of frequency diversity. UBAFH basicallycomprises three different procedures:

1. PER Estimation through which nodes maintain estimatesof packet error rate (PER) for each channel of the hopset;

2. Channel Mapping involving the mapping of the estimatedPER into a probability density function defining channelusage probabilities;

3. Next Hop Frequency Selection through which nodes carryout synchronous selection of the channel used in theupcoming hop.

These three procedures will be detailed in the followingsubsections. In section III-D we present an additional improve-ment of our algorithm while in section III-E we discuss theextension to multi-node topologies.

A

B

Seeds

Seeds

i− 2NT i− 2NT + 2

i− 1

i

i− 2NT + 1

f1 f2 f3 f4 f5

Fig. 1. Example of a two-node topology.

A. PER Estimation

With reference to the scenario sketched in Figure 1, nodesA and B constantly maintain packet error rate estimations foreach channel belonging to the hopset. These PER estimatesare implemented using a window moving average filter thatcomputes the average packet error rate for a certain channelaccounting for the lastN packet transmissions. For thispurpose, outcomes of packet transmissions are stored in a localtable (thePER table, see Figure 2) containingM ·N binaryvariables (M being the number of available channels: if we

Page 125: Design of Reliable Communication Solutions for Wireless Sensor Networks

113

Memory Buffer

NT

PER Table

Estimated PERChannel Usage Probabilities

N

M

MM Channel Mapping

PER Estimation

0 0 0 00

0

0

0

0

11

1

1

0 0.05 0.250.025 0.020 0.001

Fig. 2. Sketch of the different steps of UBAFH.

consider the IEEE 802.15.1 standard we will therefore haveM = 79) where a binary 1 is associated to a lost packetwhile binary 0s correspond to successful transmissions. Rowsof this table implement shift registers that are updated adoptinga FIFO policy: when a new binary value is available the lastand oldest element of the row is removed, the remainingN−1are shifted of one position and the new value is inserted. Eachrow contains zeros at the beginning of the algorithm.

We remark that outcomes of packet transmissions might notalways be available at both sides of a certain link: for instancenode A will surely have those outcomes for transmissionswhere it is the receiver. On the other hand it will have to relyon node B to obtain such information for transmissions wherenode B is on the receiver side. Estimated PERs are howeverused to select the frequency used on the next hop, thus it iscrucial that both nodes have the same information at the sametime, in order to be able to carry out synchronous hopping. Forthis purpose nodes exchange outcomes of packet transmissionsusing a vector that contains outcomes for the lastNT receivedpackets: this vector that we will refer to as thememory vectorcould for instance be inserted in the ACK that follows everypacket.NT > 1 values are needed to deal with packet lossesthat might lead to lack of information. In particular eachnode maintains a buffer of2 ·NT binary variables containingoutcomes for the last2 ·NT packet transmissions. This bufferimplements once again a shift register: after every hop theoldest value on the buffer is removed and inserted in the PERtable. In case of packet losses, some field of the mentionedbuffer might remain empty: however as soon as a packet iscorrectly received it will be possible to fill those empty spaceswith the appropriate values that will be retrieved from thereceived memory vector.

B. Channel Mapping

Channel mapping identifies the procedure through whichthe estimated packet error rates are mapped into a probabilitydensity function assigning to each channel of the hopset anappropriate usage probability. If we denote withPER(fi) theestimated PER for frequencyfi, channel mapping is definedby a functionf :

f : [0, 1] → [PMIN , PMAX ] (1)

that takes as inputPER(fi) and computes the usage probabil-ity for channelfi. HerePMIN andPMAX respectively denotethe lower and upper bounds for channel usage probabilities.PMIN is introduced to ensure that evenbad channels areoccasionally used (to verify their status).PMAX instead guar-antees a minimum level of frequency diversity and preventsthe algorithm to converge to a situation where only a fewchannels are used. We remark that FCC regulations set to 15the minimum number of channels that have to be used foroperating in unlicensed bands [1]: we therefore decided to setPMAX = 1

15 accordingly. This will ensure that no channelis used with probability higher than the one established bycurrent regulations. The mapping functionf is given by thecomposition of three different functionsf = f1 ◦ f2 ◦ f3.f1(·) simply maps the estimated PER into a probability densityfunction. We chosef1 according to:

f1 : PER(x) → f1 (PER(x)) =(1 − PER(x))α

∑M=79y=1 (1 − PER(y))

α

(2)The parameterα is called thetemperature of the distributionand can be suitably tuned to achieve different behaviors: lowtemperatures determine almost equiprobable channel usageprobabilities, while higher values ofα lead to scenarioswhere only the best frequencies are actually used. The term(1 − PER(x)) basically denotes the utility function used toassign usage probabilities to the different channels.f2(·) andf3(·) respectively introduce the lower and upper boundsPMIN

andPMAX . f2(·) is defined according to:

f2 : x→ f2(x) = PMIN + x · (1 −MPMIN ) (3)

while f3(·) truncates channel usage probabilities eventuallygreater thanPMAX and proportionally reallocates the trun-cated parts over all the other probabilities.

C. Next Hop Frequency Selection

As outlined in Section III-A nodes A and B can maintainsynchronous estimates of channel error rates. Using the samemapping function will therefore produce the same probabilitydensity function on both transmitter and receiver side, allowingnodes to select the same frequency for the incoming hop. Inparticular, we suppose that nodes share a common seeds,used to initialize a random number generator. With referenceto Figure 1, at time sloti both nodes generate a randomnumber that is used with the probability density functionobtained after the channel mapping procedure to select thechannel used for the hop on sloti + 1. For dealing withpacket losses that might cause temporary lack of information,the choice of the channel to be used on sloti + 1 is carriedout using the information that nodes have up to time sloti−2NT . This allows forNT consecutive packet losses on eachside and prevents asynchronous behaviors. If more thanNT

consecutive losses arise, a dedicated synchronization algorithm(not presented here due to space constraints) allows nodes torealize that synchronization might be lost and interrupts the

Page 126: Design of Reliable Communication Solutions for Wireless Sensor Networks

114 CHAPTER 11. UTILITY BASED ADAPTIVE FREQUENCY HOPPING

update of the PER table until a new packet is correctly receivedand new information becomes available.

D. Accounting for Asymmetric Channel Conditions

Bluetooth specifications allow for transmission powers of upto 20 dBm which translate in a communication range that canbe greater than 100 meters. Different channel conditions mightthus arise at the two sides of a certain link and for instance,with reference to Figure 1 nodes A and B might experiencesignificantly different packet error rate on the same channel. Inthis setting, traditional adaptive algorithms (such as theIEEEAFH scheme proposed in [7]) estimate packet error rates ina centralized way and allow thus to capture onlyaveragechannel conditions. However, better performance could beachieved accounting for channel asymmetries, allowing nodeA to receive on those frequencies where it experiences a lowpacket error rate and scheduling instead its transmissionsinorder to match channel conditions at node B (and vice versa).This approach can be easily implemented in UBAFH and infact it is sufficient that each of the two nodes maintains twodifferent estimates of packet error rate, reflecting conditionsat the two sides of the link: these two estimates will producetwo different probability density functions, one used to selectchannels in receiving slots (i.e. slots where the node isreceiving) and the other one used instead for transmitting slots.

E. Extension to Multi-node Topologies

We here briefly discuss the extension of UBAFH to multi-node topologies. We consider a piconet operating inactivemode where one master is connected to multiple slaves. Wefurther assume that each slave decodes the header of allmaster’s transmissions however only the intended destinationactually decodes the packet payload and replies to the masterin the next slot (see [2] for more details). In this case thememory vector is inserted by the master in the header ofeach packet, allowing all the nodes belonging to the piconetto maintain estimates of packet error rate and synchronouslyselect the same channel in every hop.

IV. SIMULATION RESULTS

We here compare the performance of our adaptive algo-rithm with the ones achieved by the standard IEEE 802.15.1frequency hopping implementation as well as with the AFHalgorithm proposed in [7] (the parameters used for this lastcase are the same used in [9] where a PER threshold equalto 0.5 and an update interval of 10s have been assumed). Forsimplicity we focus on a two nodes topology and considera frequency selective channel with log-normal distributedshadow fading with variance equal toσ2

f . We simulate twodifferent scenarios as detailed below.

A. Symmetric Channel Conditions

In the first case, we assume that channel conditions atthe two nodes are symmetric, thus the fading profile is thesame. Given the received SNR, packet error probabilities forthe different channels can be obtained using the analytical

framework developed in [6]. Average PERs have then beencomputed simulatingNP packet transmissions for every SNRvalue. In our simulations we fixedNP = 96000 correspondingto a 60 seconds connection. We considered DM1 packets witha payload of 15 bytes,N = NT = 16, PMIN = 10−3

and PMAX = 115 . The obtained PER as a function of the

average received SNR is presented in Figure 2. We remarkthat different choices for the parameterα will lead to differentperformance as shown by the different curves presented inFigure 3.

2 4 6 8 10 12 14 16 18 20

10−2

10−1

100

SNR [dB]

PE

R

IEEE 802.15.1IEEE AFHUBAFH, α=0.5UBAFH, α=1UBAFH, α=4

Fig. 3. Packet Error Rate as a function of average received SNR. We haveassumedσ2

f= 4 [dB].

2400 2420 2440 2460 24800

0.005

0.01

0.015

0.02

0.025

0.03

Channel Frequency [MHz]

CU

P

(b)

2400 2420 2440 2460 24800

0.005

0.01

0.015

0.02

0.025

0.03

Channel Frequency [MHz]

CU

P

(c)

2400 2420 2440 2460 24800

0.005

0.01

0.015

0.02

0.025

0.03

Channel Frequency [MHz]

CU

P

(d)

2400 2420 2440 2460 24804

6

8

10

12

14

16

18(a)

Channel Frequency [MHz]

SN

R [d

B]

Fig. 4. Example of a channel realization (a), and channel usage probabilitiesof IEEE AFH (b), UBAFH with α = 4 (c) UBAFH with α = 0.01 (d).

It is interesting to compare the effective channel utilizationfor the different considered AFH schemes. In Figure 4(a),we present the average received SNR for one of the fadingrealization considered in our simulation. Figure 4(b) presentschannel usage probabilities (CUP) for the IEEE AFH im-plementation: channels experiencing deep fades are removedfrom the hopping pattern while the remaining frequenciesare all used with the same probability. Figure 4(c) considers

Page 127: Design of Reliable Communication Solutions for Wireless Sensor Networks

115

instead our adaptive scheme withα = 4. Note that thealgorithm successfully identifies the deep fade located in thefrequency band[2440, 2460]: channels belonging to this bandare consequently used with lower probabilities. Finally Figure4(d) has been obtained assumingα = 0.01: such a low valueresults in a very homogeneous behavior where all channels areused almost with the same probability. We remark that we areaware of the fact that current FCC regulations for operationinunlicensed bands using frequency hopping techniques requirethat all channels belonging to the hopset, which minimumcardinality is set to 15, are used with the same probability (see[1], clause 15.247). These rules aim at containing the levelofinterference experienced by other eventual receivers operatingon the same band. The algorithm we propose does not strictlycomply with the mentioned clause: this is also the case forother adaptive algorithms as for instance the one proposed in[12]. On the other hand we remark that our adaptive frequencyhopping scheme hops over all the 79 available channels andthe usage probability of every channel is upper bounded. Thishowever means that the worst interference pattern originatedby devices operating within UBAFH, will always be betterthan the one originated by a network adopting the standardIEEE AFH technique ( [7]) and only hopping over 15 channels.

B. Asymmetric Channel Conditions

In our second investigation we consider instead a ratherdifferent scenario and suppose that the fading profiles at thetwo nodes are obtained as independent realizations of thesame stochastic process. Results for this case are presentedin Figure 5 where we compare the PER achieved by UBAFHwith the ones of 802.15.1 and IEEE AFH. We considered twodifferent implementations of our algorithm: in the first onesnodes maintain a single estimate of the packet error rate oneach channel while in the second one two values, one fortransmitting and one for receiving slots, are used. The IEEEAFH algorithm captures average channel conditions while ourapproach allows nodes to exploit channel asymmetries: thisresults in better performance. For instance for a fixed PER of2%, UBAFH outperforms IEEE AFH of about 4 dB.

V. CONCLUSIONS

In this paper we introduced a new paradigm for improvingperformances of frequency hopping systems. While tradi-tional adaptive techniques proposed in the literature aim atidentifying bad channels that are consequentially removedfrom the hopping sequence our Utility Based Adaptive Fre-quency Hopping algorithm constantly maintains estimationofpacket error rates for each channel belonging to the adoptedhopset and accordingly assigns different usage probabilitiesto frequencies with different behaviors. Opportune boundson such usage probabilities are introduced. A lower limitensures that even bad channels are occasionally used allowingto verify their status. On the other hand an upper boundprevents the algorithm to converge to a setting where onlya few channels are utilized. We compared the performanceof UBAFH with the ones of the standard frequency hopping

2 4 6 8 10 12 14 16 18 20

10−2

10−1

100

SNR [dB]

PE

R

IEEE 802.15.1IEEE AFHUBAFH, α=4, 1 EstimateUBAFH, α=4, 2 Estimates

4 dB

Fig. 5. Packet Error Rate as a function of average received SNR.

scheme implemented in IEEE 802.15.1 as well as with theadaptive frequency hopping technique proposed in [7] showingthat our adaptive scheme outperforms both approaches leadingto lower packet error rates.

REFERENCES

[1] FCC, “Operation within the Bands 902-928 MHz, 2400-2483.5 MHz and5725-5850 MHz“, Part 15: Radio Frequency Devices, October 2002.

[2] “Part 15.1: Wireless medium access control (MAC) and Physical layer(PHY) specification for Wireless Personal Area Networks (WPANs)“,ANSI/IEEE Standard 802.15.1.

[3] “Why Wireless HART? The Right Standard at the Right Time“, whitepaper, October 2007, available online at www.hartcomm2.org.

[4] “Part 11: Wireless LAN Medium Access Control (MAC) and PhysicalLayer (PHY) specifications: Higher-Speed Physical Layer Extension inthe 2.4 GHz Band“, ANSI/IEEE Standard 802.11b-1999 (R2003).

[5] N. Golmie, R.E. van Dyck, A. Tonnerre A. Soltanian, O. Rebala,“Interference Evaluation of Bluetooth and IEEE 802.11b Systems“, inWireless Networks Journal, Vol 9, No. 3, Kluwer Publisher, 2003.

[6] A. Conti, D. Dardari, G. Pasolini, O. Andrisano, “Bluetooth and IEEE802.11b coexistence: analytical performance evaluation in fading chan-nels“ in IEEE Journal on Selected Areas in Communications, Vol. 21,Issue 2, February 2003.

[7] “Part 15.2: Coexistence of Wireless Personal Area Networks withother Wireless Devices Operating in Unlicensed Frequency Bands“,ANSI/IEEE Standard 802.15.2-2003.

[8] P. Popovski, H. Yomo, R. Prasad, “Strategies for Adaptive FrequencyHopping in the Unlicensed Bands“ in IEEE Wireless Communications,Vol. 13, No. 6, December 2006.

[9] N. Golmie, O. Rebala, N. Chevrollier, “Bluetooth adaptive frequencyhopping and scheduling“, in Proceedings of Military CommunicationsConference (MILCOM), Boston, USA, October 2003.

[10] M. C.-H. Chek, Y.-K. Kwok, “Design and Evaluation of PracticalCoexistence Management Schemes for Bluetooth and IEEE 802.11bSystems“, in Computer Networks, Vol. 51, Issue 8, June 2007.

[11] H. Yomo, P. Popovski, H. C. Nguyen, R. Prasad, “AdaptiveFrequencyRolling for Coexistence in the Unlicensed Band“, in IEEE Transactionson Wireless Communications, Vol. 6, No. 2, February 2007.

[12] P. Popovsky, H. Yomo, R. Prasad, “Dynamic Adaptive FrequencyHopping for Mutually Interfering Wireless Personal Area Networks“, inIEEE Transactions on Mobile Computing, Vol. 5, No. 8, August2006.

[13] A. C.-C. Hsu, D. S. L. Wei, C.-C. J. Kuo, “Enhanced AdaptiveFrequency Hopping for Wireless Personal Area Networks in a Coex-istence Environment“, in Proceedings of Global TelecommunicationsConference (GLOBECOM), 2007.

[14] K. A. Hamdi, O. A. Bamahdi, “A New Adaptive Frequency HoppingTechnique“, in Proceedings of Vehicular Technology Conference (VTCFall 2004), 2004.

Page 128: Design of Reliable Communication Solutions for Wireless Sensor Networks
Page 129: Design of Reliable Communication Solutions for Wireless Sensor Networks

Chapter 12

SYNAPSE, A NetworkReprogramming Protocol forWireless Sensor Networks UsingFountain Codes

Michele Rossi, Giovanni Zanca, Luca Stabellini, Riccardo Crepaldi, Albert F. Har-ris, Michele ZorziProceedings of 5th Annual IEEE Communications Society Conference on Sensor,Mesh and Ad Hoc Communications and Networks, SECON 2008.

117

Page 130: Design of Reliable Communication Solutions for Wireless Sensor Networks
Page 131: Design of Reliable Communication Solutions for Wireless Sensor Networks

119

SYNAPSE: A Network Reprogramming Protocol forWireless Sensor Networks using Fountain Codes

Michele Rossi†, Giovanni Zanca†, Luca Stabellini§,

Riccardo Crepaldi‡, Albert F. Harris III⋆ and Michele Zorzi†

†Dept. of Information Engineering, University of Padova, 35131 Padova, Italy.‡Dept. of Computer Science, University of Illinois, Urbana-Champaign, 61801 Illinois, USA.§Wireless@KTH, Royal Institute of Technology, Electrum 418, SE-164 40 Kista, Sweden.

⋆CReSIS, University of Kansas, 2335 Irving Hill Road, Lawrence, KS, USA.

Email: {rossi, zancagio, zorzi}@dei.unipd.it, [email protected], [email protected], [email protected]

Abstract—Wireless reprogramming is a key functionality inWireless Sensor Networks (WSNs). In fact, the requirements forthe network may change in time, or new parameters might have tobe loaded to change the behavior of a given protocol. In large scaleWSNs it makes economical as well as practical sense to upload thecode with the needed functionalities without human intervention,i.e., by means of efficient over the air reprogramming. This posesseveral challenges as wireless links are affected by errors, datadissemination has to be 100% reliable, and data transmission andrecovery schemes are often called to work with a large numberof receivers. State-of-the-art protocols, such as Deluge, implementerror recovery through the adaptation of standard Automatic Re-peat reQuest (ARQ) techniques. These, however, do not scale wellin the presence of channel errors and multiple receivers. In thispaper, we present an original reprogramming system for WSNscalled SYNAPSE, which we designed to improve the efficiencyof the error recovery phase. SYNAPSE features a hybrid ARQ(HARQ) solution where data are encoded prior to transmissionand incremental redundancy is used to recover from losses, thusconsiderably reducing the transmission overhead. For the coding,digital Fountain Codes were selected as they are rateless andallow for lightweight implementations. In this paper, we designspecial Fountain Codes and use them at the heart of SYNAPSEto provide high performance while meeting the requirements ofWSNs. Moreover, we present our implementation of SYNAPSE forthe Tmote Sky sensor platform and show experimental results,where we compare the performance of SYNAPSE with that ofstate of the art protocols.

I. INTRODUCTION

Many applications currently exploit wireless sensor networks

(WSNs) for long term data gathering, ranging from environ-

mental sensing, manufacturing plant control, etc., and many

more are under development. We note that the requirements

for the network (which translate into functionalities to support)

may change in time. Also, the WSN itself might be moved

to a different place thus requiring reconfiguration. Finally, we

might want to reconfigure on the fly a given protocol through,

e.g., the upload of new specifications for its rules and general

behavior. These needs all call for energy efficient, scalable,

topology independent and fast methods to wirelessly reprogram

the WSN. In order to reach these goals, a protocol must meet

This material is based upon work partially supported by the EuropeanCommission under contract number INFSO-ICT-215923 (SENSEI), by theItalian Foundation Cassa di Risparmio di Padova e Rovigo (CARIPARO) andby the Swedish Agency for Innovation Systems (VINNOVA).

several requirements which are peculiar to WSNs. First, it is

crucial that the code delivery is 100% reliable and reaches all

intended destination nodes. It shall be so regardless of channel

errors, link variability and topology changes. Second, program

sizes can be as large as 48 Kbytes, usually packets are 26 bytes

long and sensor nodes have a limited amount of RAM (4 or

10 Kbytes, depending on the sensor hardware) and FLASH

memory (usually 512 Kbytes). This means that the code cannot

be entirely stored in RAM, i.e., we are dealing with large

data transfers if compared with the actual memory capabilities

of the sensors: as a result, dedicated dissemination/Automatic

Repeat reQuest (ARQ) schemes are to be designed. Third, the

WSN environment is inherently multi-hop, which implies that

special protocols are needed to ensure reliable dissemination

over multiple hops without requiring any a priori knowledge

about the network topology. Fourth, WSNs are usually highly

populated with wireless devices, thus if no proper countermea-

sures are taken, it is likely that many senders will transmit at the

same time. This will translate into collisions, that result in an

overall slow-down of the delivery process as well as decreased

energy efficiency. Therefore, special algorithms are needed

to properly handle the selection of senders and intelligent

schemes for feedback suppression (e.g., ARQ NACKs) shall

be implemented to reduce collisions [1].

A few practical algorithms have been designed to solve the

above problems. The state of the art is represented by the

following four protocols: Deluge [2], MNP [3], Freshet [4]

and Stream [5]. These schemes all transfer data in chunks

(referred to as pages) in multi-hop WSNs. Some form of

epidemic routing (all), intelligent sender election (MNP) as

well as transmission/feedback suppression (all), pipelining (all)

and aggressive sleeping behavior (MNP and Freshet) have been

used. However, we observe that the transmission of pages and

the subsequent error recovery is always obtained through the

adaptation of standard ARQ techniques. That is, the erroneous

reception of part(s) of the code is notified through some sort of

status messages (basically NACKs, even though bit-masks can

be used for improved efficiency see, e.g., [3]), which are sent

to the sender upon the completion of their transmission.

In this paper we present SYNAPSE, an original protocol for

reprogramming WSNs. While incorporating many of the above

techniques, SYNAPSE adopts an extremely efficient (and differ-

Page 132: Design of Reliable Communication Solutions for Wireless Sensor Networks

120CHAPTER 12. SYNAPSE, A NETWORK REPROGRAMMING PROTOCOL

FOR WIRELESS SENSOR NETWORKS USING FOUNTAIN CODES

ent) data transmission/recovery paradigm. In fact, a Fountain

Code [6] (FC), specifically designed to meet the needs of sensor

network reprogramming, is used at the heart of the data dissem-

ination/recovery process. This code is designed to maintain a

high efficiency, in terms of overhead, in the face of small packet

sizes and typical program lengths. These codes were selected

due to their desirable properties: FCs are rateless and have a

low computational complexity, as encoding and decoding are

performed efficiently through XOR operations. Our Fountain

Code has been implemented on Tmote Sky nodes and shown

to execute efficiently even with the limited available processing

power. Our experiments show that we achieve reliable network

programming with very low overhead compared to other current

in-network reprogramming techniques [2]. It shall be observed

that our present research work is complementary in nature to

what previously done: while others mainly concentrated their

study upon devising smart algorithms (e.g., modified epidemic

schemes) for sender selection, sleeping modes etc., our focus

is on extremely efficient solutions for the local delivery of the

data (i.e., between the senders and their neighbors), as well as

their proper integration with previous techniques.

The rest of the paper is organized as follows. Section II

surveys related work. Section III describes the structure and the

algorithms used in SYNAPSE. Section IV presents the design

of the Fountain Code we adopt in our framework as well as its

performance. Section V shows our experimental results, where

the performance of SYNAPSE is compared with that of state-

of-the-art algorithms. Finally, Section VI concludes the paper.

II. RELATED WORK

XNP [7] is the first network reprogramming protocol pro-

posed for WSNs. It operates only over a single hop and does

not support incremental updating of the program image. The

Multihop Over the Air Protocol (MOAP) [8] extended the code

delivery to multi-hop networks. It introduced some interesting

features for the local recovery of data (NACKs, local broadcast,

sliding window recovery), which are all used by the most recent

protocols. MOAP disseminates data in a hop-by-hop fashion,

i.e., a node has to receive the whole program before starting

the dissemination over the next hop.

Next, we discuss the four protocols that define the state of

the art for wireless sensor network reprogramming: Deluge [2],

MNP [3], Freshet [4] and Stream [5]. Deluge disseminates

the code in multi-hop environments exploiting an epidemic

routing algorithm, which uses a three-way handshake based on

advertisement (ADV), request (REQ) and actual code (CODE)

transfer. Note that ADVs and REQs have smaller sizes if com-

pared to data packets; this reduces the transmission overhead

when nodes contend for the channel. In Deluge, the code is

subdivided into pages, which are disseminated using a NACK-

based ARQ protocol. The code is transmitted, page by page,

via broadcast, and pipelining is implemented. Pipelining allows

a node that correctly receives a page from a neighboring sensor

to promptly start the dissemination of this page to the next hop.

The randomization of the transmission of the advertisement

within predetermined time windows, as well as advertisement

suppression, are implemented to reduce the congestion in the

propagation of the code through multiple hops. MNP [3]

has many features in common with Deluge. In addition, it

implements special algorithms to reduce the problems due to

collisions and hidden terminals. This is achieved through a

distributed priority assignment so that, in a neighborhood, there

is at most one sender transmitting the program at any given

time. The sender election is greedy and distributed, i.e., there

is no need to know the topology in advance. In MNP the

senders with a higher number of potential receivers are assigned

higher priority and sleeping modes are also used to reduce

energy consumption; a sender can go to sleep when a neighbor

with higher priority has data to send. Freshet [4] is based

on Deluge and aggressively optimizes the energy consumption

during reprogramming. In an initial phase, some meta-data

(information) about the code to be transferred and the topology

(in terms of number of hops from the front wave where the

code is currently being transmitted) are disseminated to sensor

nodes. Using this topology information, nodes estimate when

the code will actually reach their vicinity and enter a sleeping

period accordingly. Some other features, such as the dynamic

adjustment of the frequency at which meta-data is transmitted,

are implemented as well. Stream [5] builds on Deluge and

optimizes what is actually sent over the channel. Common

intuition would suggest to transfer only what actually needed,

i.e., the program image. However, Deluge, MNP and Freshet

all disseminate the image of the programming protocol together

with that of the program to be transferred. This considerably

inflates the amount of data to be disseminated (up to 20 times

for the transmission of a program image consisting of a single

page [5]). Stream obviates this problem by pre-installing in each

sensor node, before its actual deployment, the re-programming

application. This is done through the segmentation of the

FLASH into multiple partitions so that the re-programming

protocol and the program to be transferred are stored in

different image areas. Hence, at dissemination time Stream

transmits over the channel the minimal support (about one page)

needed for the activation of the re-programming image together

with the actual program image. In reference [5] this strategy

is implemented on Deluge and is shown to provide substantial

performance improvements.

SYNAPSE adopts many of the above techniques. It uses

three way handshakes as per the ADV-REQ-CODE paradigm

introduced above. It implements randomization when sending

advertisements. It exploits broadcast transmissions for the code

and NACKs to request missing data and it implements the

method proposed in Stream [5]. On the other hand, it fea-

tures new elements such as the extension of Deluge’s FLASH

memory partition management (see PartitionManager in

Section III) as well as a novel hybrid ARQ error recovery

mechanism. A demonstration of the SYNAPSE reprogramming

system was presented in [9].

III. A DATA DISSEMINATION SYSTEM FOR WIRELESS

SENSOR NETWORKS

In the following Section III-A we illustrate SYNAPSE’s

architecture. Section III-B introduces the BootLoader, which

we realized to allow the management of the FLASH (format-

ting, partitioning, etc.) and load new programs. In Section III-C

we present the Fountain Based dissemination protocol.

Page 133: Design of Reliable Communication Solutions for Wireless Sensor Networks

121

DataDisseminationBootLoader

SingleHop BootLoader

CommunicationRadio Partition

ManagerCodec

Fig. 1. SYNAPSE’s component architecture in TinyOS-2.x.

A. General Architecture

In what follows, we describe the SYNAPSE data dissemina-

tion system by discussing its main functional blocks.Structure of the software: the software was developed in

a modular and portable way to facilitate its extension or

the modification of any of its parts. The software architec-

ture is shown in Fig. 1. There are two independent macro-

blocks: BootLoader and DataDissemination, which

cannot be executed concurrently as the micro-controller is

single-task. The communication between BootLoader and

DataDissemination is possible thanks to the Information

Memory, a portion of the internal FLASH, which is preserved

even after a device reset.BootLoader: Our sensor nodes feature a TI MSP430 micro-

controller with direct access to an internal FLASH of

48 Kbytes; additional storage is provided by an external FLASH

of 1024 Kbytes. The BootLoader is loaded at boot time,

and handles read and write operations between these mem-

ories. It can copy applications into the external FLASH and

load them on demand. Due to its importance, we present the

BootLoader in greater detail in Section III-B.BootLoader Communication: this is a TinyOS module

allowing the communication between TinyOS applications

(in our case the DataDissemination module) and the

BootLoader. It is implemented to hide hardware details. This

module provides a reboot command which is used to reset the

device. This command is executed when a new application is

received and needs to be loaded in place of the current program.DataDissemination: the DataDissemination module

communicates directly with the SingleHop and the

BootLoaderCommunication modules. This is the only

module that has to be included in a TinyOS project to

support in-network reprogramming. DataDissemination

implements an epidemic routing algorithm as well as a three-

way-handshake similar to the one in [2].SingleHop: DataDissemination uses the SingleHop

module to send/receive data to/from the devices in the cur-

rent node’s neighborhood. Hence, SingleHop manages lo-

cal transmissions, whereas DataDissemination decides

whether or not the current node should contribute itself to the

data dissemination, by initiating a local dissemination proce-

dure. When a node actively participates in the dissemination,

the SingleHop module reads transport blocks of data from

the external FLASH and sends them to the Radio module.Radio: it is responsible for transmitting and receiving data

packets. For improved efficiency, the Radio module imple-

ments a Hybrid ARQ (HARQ) strategy, where packets are

encoded according to a digital fountain approach [6]. These

issues are discussed in greater detail in Sections III-C and IV.

The Radio module provides the Codec with the current set

of original packets (the current transport block), which are

used by the Codec to obtain encoded packets. These are then

passed to the Radio module for their actual transmission.

To summarize, the main functionalities of the Radio module

are: 1) transmission and reception of encoded data packets, 2)

implementation of a HARQ retransmission strategy, 3) control

of the Codec, determining how many packets are to be

encoded, when incremental redundancy has to be created, etc.

Codec: the codec implements the Fountain Code coding rou-

tines, which were specifically designed for sensor devices, see

Section IV for further details.

Partition Manager: it is a TinyOS module we wrote to provide

functionalities for reading, writing and creating memory parti-

tions in the external FLASH. The FLASH is partitioned and

used as an external disk through the definition of a partition

table, which is stored at the beginning of the memory. This

allows for a hardware independent approach which facilitates

the porting to a new type of memory chip. More details are

given in the next section.

B. Boot Loader for Wireless Network Reprogramming

The BootLoader can copy applications between internal

and external FLASH memories and subsequently restart the

device with the copied application. In addition, it can create

new memory partitions on the external FLASH and format it.

To this end, we implemented a dynamic partitioning system

that allows the use of the external FLASH memory as a

WORM (Write Once Read Many) device, without knowing in

advance the number and the size of the partitions. To keep

track of the first memory location for each application we

store in the external FLASH, we use a hash-function returning

an identifier (application ID) calculated as a function of the

application object’s code. This generation is performed by the

compiling system, which usually resides in a PC having the

necessary computational power. In the external FLASH we

maintain a partition table which relates application IDs to

the memory location where the corresponding application is

saved. The application ID is subsequently used by the boot

loader to retrieve the application from the external FLASH,

copy it to the internal FLASH and load it. In summary,

the BootLoader supports the following functionalities: ex-

ecute an application, format the external FLASH, copy ap-

plications from the internal to the external FLASH, load

applications from the external FLASH. Finally, a portion of

the internal FLASH is used to support the communication

between BootLoader and DataDissemination, which

can thus exploit the above functionalities at runtime using the

BootLoaderCommunication interface.

C. Data Dissemination Protocol

Next, we present the data dissemination and error recovery

algorithms we implemented in SYNAPSE. Efficient dissemi-

nation requires the subdivision of files into so called transport

blocks of appropriate size, so that they can be processed in the

available RAM. Transport blocks are composed of K packets,

Page 134: Design of Reliable Communication Solutions for Wireless Sensor Networks

122CHAPTER 12. SYNAPSE, A NETWORK REPROGRAMMING PROTOCOL

FOR WIRELESS SENSOR NETWORKS USING FOUNTAIN CODES

whose reliable transmission to neighboring nodes is obtained

through a Fountain Codes based HARQ protocol. Next, we

detail the dissemination protocol in the single-hop case as well

as the current implementation of the multi-hop scheme.

Single-hop dissemination: We observe that plain ARQ is

inefficient as its throughput quickly decreases as a function

of the number of receivers [10]. To overcome this, we adopted

a HARQ solution where transport blocks are encoded prior

to transmission. Differently from ARQ, all we need to know is

how many redundancy packets are still needed by each receiver

to recover the original data. In addition, the same redundancy

packets can correct losses at multiple receivers. Fountain Codes

were selected as they allow for lightweight implementations,

with advantages in terms of memory requirements and compu-

tational needs. They are rateless, i.e., incremental redundancy

can be obtained on the fly with no need to know in advance

the worst case error probability, the number of receivers, etc.

Moreover, they retain the good properties of standard forward

error correcting (FEC) codes. The design of FCs is described

in Section IV.

Consider a given node i and let Ni be the set of devices

in its communication range. The objective of the single-hop

dissemination protocol (SingleHop module) is to reliably

and efficiently disseminate the transport blocks stored at node

i to all interested devices in Ni. Each transport block is sent

during a so called dissemination round. A new round should be

initiated only when all nodes in Ni have received and decoded

the current transmission block.

At the beginning of a round, node i broadcasts K + δ1

encoded packets, where δ1 = 4 is selected to guarantee a

recovery probability higher than 0.8 for typical packet error

rates, p ≈ 0.05 and K = 32. These packets are followed by a

DECODE message. Data packets are used to build a decoding

matrix G (see Section IV). In case a receiver j ∈ Ni is still

unable to invert G after receiving the DECODE message, it

will ask the transmitter for additional redundancy packets. In

this request (NACK) it will indicate the rank of its decoding

matrix rj . The transmitting node i collects incoming NACKs

and calculates ξ = minj rj . Note that at least K−ξ redundancy

packets need to be transmitted to have a full rank G at all

receivers. We chose to transmit K − ξ + δ packets to provide

extra protection. δ = 4 gives good performance in practical

settings where packet error rates can be as high as 0.3. Also, δ is

kept fixed for all subsequent retransmission requests. Timeouts

and a limit on the maximum number of re-transmission cycles

are used to avoid deadlocks. In case no NACKs are received

after a predefined timeout, node i assumes an implicit ACK

from the receivers.

We observe that receiving nodes may have different memory

writing times, due to, e.g., different error patterns, battery level,

etc. Hence, different nodes will finish writing the transport

block at different time instants and the transmitter needs to syn-

chronize with the slowest node in order to start the transmission

of a new block. This is achieved by electing a synchronizer

node which, round-by-round, is the slowest node to decode.

This node shall provide an explicit acknowledgment to the

transmitter upon the completion of each transmission round.

Multi-hop dissemination: in its current version, SYNAPSE

implements a hop-by-hop data dissemination protocol. In detail,

when a node receives the whole file it starts broadcasting

advertisement (ADV) messages. ADVs are de-synchronized

through random back-offs as multiple nodes may complete the

reception of the file at the same time. Upon the reception of an

ADV, a node which does not have the data to be disseminated

responds with a request (REQ) message; feedback suppression

is used to limit the amount of signaling traffic. Thus, the sender

starts a new single-hop dissemination phase, intended to all

its potential receivers. Network allocation vectors (NAV) are

inserted in each ADV/REQ and used to infer the amount of

time an overhearing sender should wait before sending its own

ADV(s). The details of the ADV/REQ phase are similar to

what implemented in [2]. It is observed that the use of FEC

allows for smart implementation of pipelining. The focus of the

present paper is on the design of codes with good performance

as well as their usage within data dissemination schemes in

WSNs. Enhanced pipelining techniques exploiting such codes

are the objective of our current research and will be integrated

in future versions of the system.

IV. FOUNTAIN BASED ENCODING

In section IV-A we discuss the main characteristics of

Fountain Codes, why we use them in our framework and

which are their main differences with respect to other encoding

methods. In section IV-B we detail the Fountain Codes we

use in SYNAPSE, discussing the approach we considered

for the optimization of the degree distribution at the encoder

and the decoding technique we use at the receiving side. In

Section IV-C we give some important implementation details.

A. Introduction to Fountain Codes

Digital Fountain Codes were presented by M. Luby in [11]

and were the first example of codes realizing the Digital

Fountain paradigm of [12]. FCs are near optimal rateless codes

designed for erasure channels [6], [13]. Common methods

for reliably transmitting packets over these channels are ARQ

protocols where receivers send back to the transmitter status

reports to identify missing packets. The transmitter, in turn,

decodes incoming reports and retransmits what is lost. ARQ has

the advantage of working regardless of the erasure probability p

but often requires a large amount of feedback. In addition, the

forward channel (transmitter → receivers) performance (e.g.,

delay and throughput efficiency) is heavily impacted even for

a small number of receivers and low error rates [10]. As

a solution, researchers used HARQ schemes, see, e.g., [1],

[10]. HARQ scales considerably better than ARQ as a single

redundancy packet can recover different losses at multiple

receivers. We advocate the use of Fountain Codes based HARQ

for network programming. These, in fact, retain the good per-

formance of previous HARQ schemes [1], [10] while presenting

additional advantages:

• Due to the rateless nature of these codes, we do not need

to know in advance the error probability p. This simplifies

implementation and increases efficiency. In fact, the actual

amount of redundancy to use within our dissemination

protocol can be decided on the fly.

Page 135: Design of Reliable Communication Solutions for Wireless Sensor Networks

123

• Packets are encoded using arithmetic on the Galois field

GF (2), i.e., by means of bitwise XOR operations. This

substantially speeds up the execution time with respect

to traditional packet-based Reed Solomon codes [1], [10],

which use more complex operations among polynomial

coefficients in GF (q), with q > 2. In fact, fast operations

over GF (q) require the use of look-up tables, which

is substantially slower than XORing symbols. This is

a tremendous advantage for resource constrained sensor

devices. We also observe that, while Tornado codes [14]

also perform encoding in GF (2), they are not rateless.

Encoding Procedure: the encoding process is very simple.

Its key ingredient is the degree distribution ρ(d), which is a

probability distribution determining the number of input packets

to combine to form any given encoded packet tn. The input file

is subdivided into a number of, say, K packets of b bits each

and the following operations are executed:

• Pick a degree dn, 1 ≤ dn ≤ K from the distribution ρ(d),whose characteristics depend on the file length K, as well

as on the targeted performance (e.g., in terms of coding

complexity and overhead, see Section IV-B).

• Randomly and uniformly pick dn packets among the K

given as input. The encoded packet tn is obtained through

the bitwise, modulo 2 sum of these dn packets, i.e., by suc-

cessively XORing them. dn is the degree of the encoded

packet so obtained, while the information about which dn

packets were XORed together forms the corresponding

encoding vector. Continue from the previous step until

the desired number of packets is encoded.

Due to the above procedure, all encoded packets are equally

representative of the whole input file, as they are independently

generated using the same distribution. Hence, it is not important

which packets are lost during transmission, what matters is how

many packets are correctly received. Moreover, the goodness

of the encoding process is totally captured by the adopted

degree distribution, whose optimization is thus crucial to obtain

good performance. This optimization is the subject of the

following section IV-B. Finally, rateless codes require the

correct reception of N ≥ K encoded packets for decoding

the original K packets; N depends on the selected distribution

ρ(d). For large K, there are encoding distributions requiring a

small overhead [11]. The overhead (O) is defined as the extra

redundancy needed for recovery, i.e., O = N − K.

Decoding Procedure: decoding can be done by inverting a

decoding matrix G, which is formed by the received encoding

vectors, i.e., solving for s the system t = Gs, where t is

the vector containing the received encoded packets, whereas s

contains the K original packets to be retrieved. Very efficient

decoding procedures, based on message passing, were proposed

for large K [11]; these heuristically solve the above linear

system. Our focus in this paper is however different as K

in our setting is small. Here, with K we mean the number

of packets in a transport block, see Section III-C. We remind

that, due to the inherent RAM limitations of sensor devices,

we cannon work with large K values. Hence, the suboptimal

decoding in [11] is not an option in our case due to its poor

performance (O ≫ 1) for small K. On the other hand, we note

that optimal decoding amounts to reducing the decoding matrix

G to upper triangular form via Gaussian elimination [13]. For

large K, this method is not efficient as its complexity grows as

O(K3). However, in our case this complexity is acceptable

due to the small values of K (e.g., K = 32). Hence, we

decided to implement an optimal decoder, according to an

efficient Gaussian elimination routine. This, together with the

optimization of the degree distribution at the encoder, led us to

small overhead at the cost of a reasonable complexity.

B. Optimization of the Degree Distribution ρ(d)

For properly designed fountain codes, N should be close to

K. Some overhead is unavoidable and depends on the adopted

ρ(d). In this section, we present an original algorithm for

the optimization of the degree distribution according to given

performance objectives. As we show later, our optimization

technique is very effective and competitive with state-of-the-art

optimizers for Fountain Codes. The optimized degree distribu-

tions we present in this section are used within SYNAPSE’s

error recovery scheme. We optimize our codes for transmission

over error-free channels. For full recovery at the receiver(s), all

we need is to receive K independent packets so that G can be

inverted. This implies the reception of N ≥ K packets as not

all packets we generate through ρ(d) are linearly independent.

However, a probability p > 0 does not change anything at the

receiver side (K independent packets are still needed). Hence,

as packets are generated independently of each other, losses

will preserve all the properties of the distribution designed for

p = 0. In practice, a good distribution for error-free channels

will preserve its good performance over error-prone links [13].

Before describing our optimization algorithm we introduce

a few definitions. A sample of the algorithm involves the

generation of encoded packets until these allow full recovery

at the decoder. An iteration of the algorithm is composed

of a fixed number of samples, M . To optimize the degree

distribution we adopt an iterative approach: we start from an

initial distribution, we generate samples and, for each of them,

we calculate a cost, which is subsequently used to refine the

distribution itself. The procedure is terminated when a stopping

condition, which is defined below and depends on the latest

distribution obtained, is verified. A new iteration is started

otherwise. In the following, we define some parameters:

• K is the number of packets in the input file.

• pj , j = 1, 2, . . . ,K are the point probabilities defining the

degree distribution ρ(d).• M is the number of samples generated during each itera-

tion of the algorithm.

• C(i), i = 1, 2, . . . , M is the cost (used to drive the

optimization) associated with the i-th sample of the current

iteration.

• N(i), i = 1, 2, . . . ,M is the number of encoded packets

needed for correct decoding of the original K packets for

sample i.

• nj(i), i = 1, 2, . . . ,M ; j = 1, ..,K is the number of

degree j packets generated within the i-th sample.

We use ideas from the theory of genetic algorithms to iter-

atively obtain, through subsequent refinements, an optimized

degree distribution. We start by generating a population of

Page 136: Design of Reliable Communication Solutions for Wireless Sensor Networks

124CHAPTER 12. SYNAPSE, A NETWORK REPROGRAMMING PROTOCOL

FOR WIRELESS SENSOR NETWORKS USING FOUNTAIN CODES

M samples and evaluating for each sample i its cost C(i).C(i) may for example be a function of the overhead (defined

as O(i) = N(i) − K) and/or of the number of elementary

operations (XORs) required for decoding. Once we have the

costs for all samples 1, 2, . . . ,M , we select the most promising

samples as follows. We compute the α-percentile, Cα, of the

observed costs C(1), C(2), . . . , C(M) and pick all samples k

having cost C(k) ≤ Cα. These samples are subsequently used

to refine the degree distribution ρ(d). The refined distribution

survives to the next iteration. Let S be the set containing the

selected samples: S = {k : C(k) ≤ Cα} and let pj be the

point probabilities associated with the current distribution. The

new distribution is obtained as:

pnewj =

k∈S

nj(k)

N(k)

|S|j = 1, 2, . . . ,K , (1)

where |S| is the cardinality of set S. Since this new distribution

(it is easy to verify that∑Kj=1 p

newj = 1) is obtained from the

smallest cost samples, it is reasonable to suppose that adopting

pnewj for the generation of new samples, i.e., at the next iteration

of the algorithm, will result in outcomes with smaller cost.

These are in turn used to generate a new distribution and

this procedure is iterated until a certain stopping condition is

verified. In our algorithm, the stopping condition is defined in

terms of the expected value of the cost during the last two

iterations. In particular, the optimization process is continued

if and only if the mean cost obtained in the current iteration is

strictly lower than that obtained previously.

We tested our algorithm, comparing its performance against

that of the optimization scheme in [15]. In [15] an iterative sim-

ulation approach based on importance sampling and gradient

search is proposed and used to optimize the degree distribution

of LT codes [11], i.e., considering a message passing decoder.

As a benchmark to test the effectiveness of our optimization

approach, we considered the sparse degree distributions of [15],

i.e., pj = 0 for j �= 2ℓ, where ℓ = 0, 1, . . . , ℓmax, 2ℓmax < K.

We initialized each of the non-zero probabilities to the same

value, pj = 1/γ (for j = 2ℓ), such that∑K

j=1 pj = 1.

We set C(i) = N(i), ∀ i, M = 1000, α = 0.05 and Cα

was updated only when the cardinality of S was found to be

higher than M/2, and left unchanged otherwise. We empirically

verified that updating Cα only when S contains a sufficient

number of samples leads to better performance. The value M/2was empirically found to give the best performance in our

tests. The results of the optimization are shown in Table I;

for comparison we also show the values obtained in [15].

As shown in the table, even though our algorithm adopts an

empirical approach and no rigorous criteria are defined for its

convergence, the performance achieved by our distributions is

comparable with that of [15]. Further, it is observed that the

results in Table I (and the corresponding distributions) were

obtained with at most 20 iterations of M = 1000 samples

each, i.e., we achieve a gain of orders of magnitude in terms

of computational complexity with respect to the optimization

technique in [15] (that requires millions of iterations).

As discussed in Section IV-A the message passing (LT)

TABLE IOPTIMIZED SPARSE ρ(d) FOR LT CODES (MESSAGE PASSING DECODER).

K → 16 32 64 128p1 0.221 0.212 0.161 0.187p2 0.457 0.351 0.400 0.339p4 0.188 0.288 0.256 0.275p8 0.134 0.101 0.101 0.101p16 - 0.048 0.045 0.046p32 - - 0.037 0.031p64 - - - 0.021

E[N ] 22.6 43.6 82.7 158.7Std. σ(N) 4.4 6.4 9.1 11.4

E[N ] in [15] 22.5 43.6 81.9 159.8

Std. σ(N) in [15] 4.2 6.8 7.7 12.1

decoder [11] is not suitable for our settings, i.e., for small K

values. On the other hand, in our case an optimal decoder, based

on Gaussian elimination, can be used at a reasonable compu-

tational cost. We thus applied our optimization algorithm to a

Gaussian elimination decoder to obtain distributions having low

decoding cost as well as low overhead. For this purpose we used

two cost functions. The first one, as in the previous example,

is the number of packets needed to decode the transmitted file,

i.e., C1(i) = N(i). The second one, C2(i), is instead defined

as the number of XORs between 16-bit words performed at

the decoder to recover the original K packets. In detail, C2(i)is given by the sum of the XORs necessary for the reduction

of the received encoding matrix G in upper triangular form

and those needed to recover the original data once G has been

reduced. These two cost functions were used to define a new set

of useful samples S ′ = {k : C1(k) ≤ Cα1

C2(k) ≤ Cα2}, to

be used in Eq. (1), that in this case was obtained considering

two different values for the α-percentiles for C1 and C2; M

was set to 50000 and the initial distribution was pj = 1/K,

j = 1, 2, . . . ,K. In order to adhere to our experimental settings,

we considered packets of 25 bytes that for K = 32 correspond

to transport blocks of 800 bytes. XORs operate on 16 bit words,

as for the TI MSP430 micro-controller of our sensor nodes.

Optimizations were carried out for K ∈ {32, 48, 64, 128}.

Due to space constraints, here we only present results for

K = 32, which was also considered for the results in Section V.

The selection of the parameters α1 and α2 to use within the

algorithm is not trivial; by tuning these two coefficients it is

in fact possible to obtain degree distributions with different

properties in terms of overhead (O = N − K) and decoding

cost (number of XORs to obtain the K original packets). Note

that a lower decoding cost will result in a higher overhead

and vice versa. We ran an extensive optimization campaign

varying these parameters. The distributions leading to minimum

overhead and minimum decoding cost were obtained setting

(α1, α2) to (0.05, 1) and (1, 0.05), respectively. For K = 32 we

obtained the distributions shown in Figs. 2 and 3. Besides these

two distributions, we also consider the uniform distribution

as it is known to give asymptotically optimal performance in

terms of overhead [6] (even though it has unsatisfactory cost

performance). For our decoder the uniform distribution achieves

an average overhead of E[C1] = 34.09 ± 0.03 packets and an

average decoding cost of E[C2] = 6481±10 XORs; 95% confi-

dence intervals were obtained considering 10000 samples of the

decoding process. In Fig. 2 we plot our optimal distribution in

Page 137: Design of Reliable Communication Solutions for Wireless Sensor Networks

125

0 5 10 15 20 25 30 350

0.005

0.01

0.015

0.02

0.025

0.03

0.035

j

pj

Fig. 2. ρ(d): optimal encoding distribution interms of transmission overhead.

0 5 10 15 20 25 30 350

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0.45

j

pj

Fig. 3. ρ(d): optimal encoding distribution interms of overall decoding cost.

0 5 10 15 20 25 30 350

0.02

0.04

0.06

0.08

0.1

0.12

0.14

0.16

j

pj

Fig. 4. ρ(d): encoding distribution obtaining agood tradeoff between overhead and cost.

0 1000 2000 3000 4000 5000 6000 7000 80000

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

x [XOR]

P[C

2≤ x

]

Uniform Distribution

Optimal C1 (OH)

Optimal C2

Selected Distribution

Fig. 5. Empirically measured cumulative distribution of the computationalcost at the decoder for different degree distributions. The cost is measured asthe number of XORs between 16-bit words.

terms of overhead, having E[C1] = 33.65± 0.03 packets and a

slightly higher decoding cost of E[C2] = 6586±9.8 XORs. For

small K it performs better than the uniform distribution. The

best performance in terms of decoding cost is achieved with the

distribution in Fig. 3 having E[C2] = 3249±16 XORs, i.e., its

decoding cost is more than 50% smaller than that achievable

with the uniform distribution (see Fig. 5). However, this last

distribution is not interesting in practice as its average overhead

is unacceptably high, i.e., E[C1] = 50.7 ± 0.2 packets.

As one might expect, suitable tradeoffs between overhead

and decoding cost can be obtained through a judicious choice

of the pair (α1, α2). For the selection of these parameters we

have done an exhaustive search in the region {(α1, α2) : 0 ≤α1 ≤ 1, 0 ≤ α2 ≤ 1}, from which we selected the distribution

in Fig. 4, obtained considering α1 = 0.05 and α2 = 0.075.

For this distribution we have E[C1] = 34.26 ± 0.04 and

E[C2] = 5142± 12, thus we reduce the decoding cost of more

than 20% with respect to the uniform case (see Fig. 5) whilst

maintaining almost the same overhead. The optimized degree

distribution for this case is shown in Table II. We observe

that these results substantially improve the results shown in

TABLE IIOPTIMIZED ρ(d) FOR A GAUSSIAN ELIMINATION DECODER, K = 32.

j = 1 → 16 pj j = 17 → 32 pj

1 0.1005 17 0.0108

2 0.1493 18 0.0113

3 0.0993 19 0.0118

4 0.0622 20 0.0121

5 0.0489 21 0.0128

6 0.0357 22 0.0135

7 0.0258 23 0.0147

8 0.0230 24 0.0156

9 0.0174 25 0.0169

10 0.0154 26 0.0202

11 0.0134 27 0.0271

12 0.0126 28 0.0321

13 0.0116 29 0.0482

14 0.0111 30 0.0650

15 0.0106 31 0.0391

16 0.0108 32 0.0012

Table I: this is mainly due to the higher performance of

Gaussian elimination with respect to message passing decoding.

In addition, in these last optimizations we did not restrict

ourselves to a specific class of distributions, as we instead

did for the results in Table I. We finally observe that higher

gains can be obtained considering larger values for K. As an

example, with K = 128 a cost reduction of up to 40% can

be achieved with respect to the uniform distribution, whilst

maintaining almost the same overhead. This K, however, hardly

fits our memory requirements.

C. Implementation Details

First of all, encoding vectors are not transmitted along with

encoded packets. We instead use the same random number

generator at both transmitter and receivers and associate random

seeds with packets identifiers. An initial seed is communicated

at the beginning of transmission rounds, whereas the seeds used

for the subsequent packets are incrementally obtained from

their sequence numbers. In this way, no overhead is introduced

for the transmission of encoding vectors. In addition, the choice

of the pseudo random generator deserves particular attention.

In SYNAPSE we adopt a generator based on Linear Feedback

Shift Registers (LFSR) [16] working with registers of 16 bits.

This method, which is optimized for the TI MSP430 micro-

controller of our sensor nodes, is very fast. Decoding a block

of K = 32 packets (800 bytes) with LFSR takes about 462

Page 138: Design of Reliable Communication Solutions for Wireless Sensor Networks

126CHAPTER 12. SYNAPSE, A NETWORK REPROGRAMMING PROTOCOL

FOR WIRELESS SENSOR NETWORKS USING FOUNTAIN CODES

0 0.05 0.1 0.15 0.2 0.25 0.340

60

80

100

120

140

160

180

200

Packet loss, p

Tra

nsm

itte

d d

ata

[K

byte

]

SYNAPSE 5 nodes

SYNAPSE 15 nodes

SYNAPSE 30 nodes

Deluge 5 nodes

Deluge 15 nodes

Deluge 30 nodes

Fig. 6. Data traffic vs. p.

0 0.05 0.1 0.15 0.2 0.25 0.3

40

60

80

100

120

140

160

180

200

220

240

260

Packet loss, p

Dis

se

min

atio

n t

ime

[s]

SYNAPSE 5 nodes

SYNAPSE 15 nodes

SYNAPSE 30 nodes

Deluge 5 nodes

Deluge 15 nodes

Deluge 30 nodes

Fig. 7. Data dissemination time vs. p.

0 0.05 0.1 0.15 0.2 0.25 0.3

10

20

30

40

50

60

70

Packet loss, p

Contr

ol tr

affic

[K

byte

]

SYNAPSE 5 nodes

SYNAPSE 15 nodes

SYNAPSE 30 nodes

Deluge 5 nodes

Deluge 15 nodes

Deluge 30 nodes

Fig. 8. Signaling traffic vs. p.

ms. For comparison, the same operation with a more accurate

Linear Congruential random Generator takes about 660 ms. A

drawback of LFSR is that a few random seeds exist which

provide unsatisfactory performance. There is, however, a large

number of seeds for which LSFR performs properly.

V. EXPERIMENTAL RESULTS

The experimental results that we show in this section were

obtained in the SignetLab testbed deployed in the Department

of Information Engineering of the University of Padova [17].

The hardware platform consists of Tmote Sky sensor nodes,

featuring an IEEE 802.15.4 2420 Chipcon wireless transceiver

working at 2.4 GHz and allowing a maximum data rate of

250 Kbps. These sensors have a TI MSP430 micro-controller

with 10 Kbytes of RAM and 48 Kbytes of internal FLASH.

These nodes are also equipped with an external FLASH mem-

ory of 1 Mbyte. SYNAPSE was developed using the nesC

programming language in TinyOS v2.x [18].

In what follows, the performance of SYNAPSE is compared

to that of Deluge [2]. In our comparison between SYNAPSE

and Deluge, exactly the same amount of data was transmitted

by the two dissemination protocols in all experiments. Note

that, as mentioned in Section II, the optimizations introduced

in Stream [5], where the actual amount of data to disseminate

is reduced by pre-installing the re-programming software in

all sensor nodes, can be used in SYNAPSE as well. The

performance enhancement of optimized SYNAPSE compared

to Stream would be similar to that of SYNAPSE compared to

standard Deluge.

We ran a series of tests to assess the performance of

SYNAPSE in a single hop environment with one sender and a

variable number of receiving nodes. In order to have full control

of the packet error probability over the wireless links, the

receivers were positioned sufficiently close to the transmitter so

as to have a negligible packet error probability due to channel

impairments, and we emulated channel errors by discarding the

received packets through a software defined probability p. In

the following plots, vertical bars are used to represent 95%

confidence intervals.

As a first result, Fig. 6 shows the total number of data bytes

transmitted by all nodes to successfully disseminate a program

of 27100 bytes to all receivers. The results for 5, 15 and 30

receivers are plotted as a function of p ∈ [0, 0.3]. Considering

the experiments with 5 receivers, we note that there is an

initial gap for p = 0, which is due to the publishing procedure

implemented in Deluge. In detail, as soon as any node receives a

correct page, it starts publishing this information through ADV

messages. This is necessary to achieve spatial multiplexing [2],

which is a distributed and very efficient technique for multi-hop

dissemination and ARQ. However, drawback of this mechanism

is that data packets may collide; this effect is more pronounced

for an increasing network density (see curves for 15 and 30nodes and p = 0).

It is observed that, with this phenomenon alone, Deluge’s

and SYNAPSE’s curves would be parallel. This, however, does

not occur but the performance gap between the two protocols

increases with p. This is mainly due to the higher efficiency

of SYNAPSE’s HARQ technique. Note that the authors of

Deluge [2] decided against using error correcting codes as they

found that, for realistic network settings, this did not offer good

results, which is expected if traditional fixed-rate FEC is used.

On the other hand, SYNAPSE uses a more sophisticated FEC

technique which is efficient in these cases, as the rateless codes

we use do not need to know the error probability experienced by

the receivers in advance, but rather adapt to the actual channel

conditions. Also, the code is efficient for a large number of

receivers as additional redundancy can be generated on the fly

until full recovery.

In Fig. 7, we show the reprogramming time as a function of

p for the same network configurations as above. We observe a

trend similar to that in Fig. 6, as well as substantial improve-

ments in terms of reprogramming time. Note also that the gap

between Deluge’s curves is mainly due to the higher number

of collisions of ADVs, REQs and DATA packets experienced

for an increasing number of nodes. In SYNAPSE, instead,

this gap is mainly due to the collisions occurring over the

feedback channel, i.e., among NACKs. These collisions slow

down the dissemination and are more likely to occur when the

node density increases. A feedback suppression mechanism is

however used in SYNAPSE to mitigate this problem.

We continue our discussion with Fig. 8, where we show

the signaling traffic sent by the two dissemination protocols

as a function of p. Interestingly, Deluge performs very close to

SYNAPSE at low densities (5 nodes), whereas for an increasing

Page 139: Design of Reliable Communication Solutions for Wireless Sensor Networks

127

8 18 280

20

40

60

80

100

120

140

160

180

Application size [Kbyte]

Dis

sem

ination tim

e [s]

1st

hop

2nd

hop

3rd

hop

4th

hop

Fig. 9. SYNAPSE’s dissemination time for a multihop network with 4 hopsand 30 nodes.

number of receivers its performance is considerably impacted

by the transmission of control packets. This is not due to the

Trickle algorithm [2] that Deluge uses for the suppression of

ADVs, but rather to the fact that all receivers have to send

their error bit-vectors (REQs). This is not necessary in our case

as redundancy packets are effectively used to correct different

losses at multiple receivers. Hence we only need to receive at

least one NACK requiring a sufficient number of packets, rather

than multiple specific retransmission requests.As a sample result for SYNAPSE’s dissemination time in

multi-hop scenarios, in Fig. 9 we show the reprogramming time

for the first 4 hops of a grid network. In Fig 10 we show a

snapshot of the reprogramming times for the same network.

As expected from the hop-by-hop nature of the implemented

multihop mechanism, the dissemination time is linear with the

number of hops. This shows that SYNAPSE is also effective in

multi-hop environments. Improvements of SYNAPSE in these

scenarios are the objective of our future research.

VI. CONCLUSIONS

In this paper we presented SYNAPSE, a system for re-

programming WSNs exploiting rateless Fountain Codes. We

first reviewed the advantages offered by these codes. We

subsequently designed, through a novel genetic optimization

approach, an encoding distribution which is tailored to the

specific needs of WSNs. This distribution is used at the heart

of SYNAPSE’s dissemination and error recovery mechanisms.

Finally, we tested our TinyOS implementation of the protocol

on the Tmote Sky sensor platform. Experimental results, ob-

tained for single as well as multi-hop environments, confirm

the effectiveness of our approach in disseminating data to a

large number of receivers, especially in the presence of channel

impairments. In conclusion, rateless codes proved to be a viable

and very promising practical method for disseminating data in

WSNs. The SYNAPSE’s TinyOS open source code distribution

can be found at [19].

REFERENCES

[1] J. Nonnenmacher, E. W. Biersack, and D. Towsley, “Parity-based LossRecovery for Reliable Multicast Transmission,” IEEE/ACM Trans. onNetworking, vol. 6, no. 4, pp. 349–361, 1998.

0 1 2 3 4 50

1

2

3

4

X Position

Y P

ositio

n

20

40

60

80

100

120

140

160

180

Fig. 10. SYNAPSE: snapshot of a single dissemination for a grid network of30 nodes. Different colors represent different dissemination times (in seconds).

[2] J. W. Hui and D. Culler, “The Dynamic Behavior of a Data DisseminationProtocol for Network Programming at Scale,” in ACM SenSys, Baltimore,Maryland, USA, Nov. 2004.

[3] S. S. Kulkarni and L. Wang, “MNP: Multihop Network ReprogrammingService for Sensor Networks,” in IEEE ICDCS, Columbus, Ohio, USA,Jun. 2005.

[4] M. D. Krasniewski, R. K. Panta, S. Bagchi, C.-L. Yang, and W. J.Chappell, “Energy-efficient, On-demand Reprogramming of Large-scaleSensor Networks,” ACM Trans. on Sensor Networks, vol. 4, no. 1, 2008.

[5] R. K. Panta, I. Khalil, and S. Bagchi, “Stream: Low Overhead WirelessReprogramming for Sensor Networks,” in IEEE INFOCOM, Anchorage,Alaska, USA, May 2007.

[6] D.J.C. MacKay, “Fountain Codes,” IEE Proceedings – Communications,vol. 152, no. 6, pp. 1062–1068, 2005.

[7] J. Jeong, S. Kim, and A. Broad, “Network Reprogramming,”Berkeley, California, USA, Aug. 2003. [Online]. Available: http://www.tinyos.net/tinyos-1.x/doc/

[8] T. Stathopoulos, J. Heidemann, and D. Estrin, “A remote code updatemechanism for wireless sensor networks,” Los Angeles, California, USA,2003, CENS Technical Report no. 30.

[9] R. Crepaldi, A. F. Harris III, M. Rossi, G. Zanca, and M. Zorzi, “FountainReprogramming Protocol (FRP): a Reliable Data Dissemination Schemefor Wireless Sensor Networks Using Fountain Codes,” in ACM SenSys,Sidney, Australia, Nov. 2007, Demonstration.

[10] M. Rossi, M. Zorzi, and F. H. Fitzek, “Link Layer Algorithms forEfficient Multicast Service Provisioning in 3G Cellular Systems,” in IEEEGlobecom, Dallas, Texas, US, Nov. 2004.

[11] M. Luby, “LT Codes,” in The 43rd Annual IEEE Symposium on Founda-tions of Computer Science, Vancouver, B.C., Canada, Nov. 2002.

[12] J. W. Byers, M. Luby, M. Mitzenmacher, and A. Rege, “A DigitalFountain Approach to Reliable Distribution of Bulk Data,” in ACMSIGCOMM, Vancouver, B.C., Canada, Sep. 1998.

[13] D.J.C. MacKay, Information Theory, Inference, and Learning Algorithms.Cambridge University Press, 2003.

[14] M. Luby, M. Mitzenmacher, A. Shokrollahi, D. Spielman, and V. Ste-mann, “Practical loss-resilient codes,” in 29-th annual ACM symposiumon Theory of computing, El Paso, Texas, US, May 1997.

[15] E. Hyytia, T. Tirronen and J. Virtamo, “Optimizing the Degree Distri-bution of LT Codes with an Importance Sampling Approach,” in RESIM2006, 6-th International Workshop on Rare Event Simulation, Bamberg,Germany, Oct. 2006.

[16] D. E. Knuth, The Art of Computer Programming, volume 2: Seminumer-ical Algorithms, 3rd ed. Addison-Wesley, 1997.

[17] R. Crepaldi, S. Friso, A. F. Harris III, M. Mastrogiovanni, C. Petrioli,M. Rossi, A. Zanella, and M. Zorzi, “The Design, Deployment, andAnalysis of SignetLab: A Sensor Network Testbed and Interactive Man-agement Tool,” in IEEE Tridentcom, Orlando, Florida, US, May 2007.

[18] “TinyOS: an open source OS for the networked sensor regime.” [Online].Available: http://www.tinyos.net

[19] “SYNAPSE’s TinyOS v2 Open Source Code Distribution,” University ofPadova, Italy, Jun. 2007. [Online]. Available: http://telecom.dei.unipd.it/pages/read/59/

Page 140: Design of Reliable Communication Solutions for Wireless Sensor Networks
Page 141: Design of Reliable Communication Solutions for Wireless Sensor Networks
Page 142: Design of Reliable Communication Solutions for Wireless Sensor Networks