42
Network Coding with Limited Overhearing in Wireless Sensor Networks KASUN SAMARASINGHE Master’s Degree Project Stockholm, Sweden XR-EE-LCN 2011:004

Network Coding with Limited Overhearing in Wireless Sensor

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Network Coding with Limited Overhearing in Wireless Sensor

Network Coding with Limited Overhearingin Wireless Sensor Networks

KASUN SAMARASINGHE

Master’s Degree ProjectStockholm, Sweden

XR-EE-LCN 2011:004

Page 2: Network Coding with Limited Overhearing in Wireless Sensor
Page 3: Network Coding with Limited Overhearing in Wireless Sensor

Network Coding with Limited Overhearing in

Wireless Sensor Networks

Kasun Samarasinghe

May 10, 2011

Page 4: Network Coding with Limited Overhearing in Wireless Sensor

Contents

1 Introduction 11.1 Motivation and Problem Statement . . . . . . . . . . . . . . . . . 11.2 Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.3 Alternative Approaches . . . . . . . . . . . . . . . . . . . . . . . 21.4 Scientific Contribution . . . . . . . . . . . . . . . . . . . . . . . . 31.5 Report Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2 Background 42.1 Wireless Sensor Networks . . . . . . . . . . . . . . . . . . . . . . 4

2.1.1 Energy Consumption in Wireless Sensor Networks . . . . 42.1.2 Low Duty Cycle Medium Access Control . . . . . . . . . . 52.1.3 Performance Controlled Wireless Sensor Networks . . . . 5

2.2 Network Coding . . . . . . . . . . . . . . . . . . . . . . . . . . . 62.2.1 Wireless Network Coding . . . . . . . . . . . . . . . . . . 6

2.3 Network Coding in Wireless Sensor Networks . . . . . . . . . . . 7

3 Design 93.1 Design Rationale . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

3.1.1 Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93.1.2 Coding Scheme . . . . . . . . . . . . . . . . . . . . . . . . 103.1.3 Performance Model for Binary Tree Topology . . . . . . . 10

3.2 Generalization . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123.2.1 Protocol for Three Node Topology . . . . . . . . . . . . . 123.2.2 Extension for General Topologies . . . . . . . . . . . . . . 15

3.3 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173.3.1 Coding Layer . . . . . . . . . . . . . . . . . . . . . . . . . 173.3.2 Packet Structure . . . . . . . . . . . . . . . . . . . . . . . 18

4 Evaluation 194.1 Experimental Setup . . . . . . . . . . . . . . . . . . . . . . . . . 194.2 Priliminary Experiments . . . . . . . . . . . . . . . . . . . . . . . 194.3 Experimental Analysis . . . . . . . . . . . . . . . . . . . . . . . . 20

4.3.1 Three Node Binary Tree Topology . . . . . . . . . . . . . 204.3.2 Four Node Tree Topology . . . . . . . . . . . . . . . . . . 24

1

Page 5: Network Coding with Limited Overhearing in Wireless Sensor

4.3.3 General Tree Topologies . . . . . . . . . . . . . . . . . . . 26

5 Conclusions and Future work 28

A Mathematical Background for Network Coding 30

2

Page 6: Network Coding with Limited Overhearing in Wireless Sensor

List of Figures

2.1 Application of Network Coding in a Unicast Scenario . . . . . . . 7

3.1 Three Node Topology and Corresponding TDMA Schedule forNetwork Coding . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

3.2 Naive Performance Model (Power Consumption) . . . . . . . . . 133.3 Naive Performance Model (Packet Reception Rate) . . . . . . . . 133.4 Three Node Topology and Corresponding TDMA Schedule for

Network Coding . . . . . . . . . . . . . . . . . . . . . . . . . . . 143.5 Probability of Error Recovery for two and three child node topolo-

gies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153.6 Linear Network Coding for longer Schedules . . . . . . . . . . . . 153.7 Probability of Error Recovery for two and three child node topolo-

gies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163.8 Application of Network Coding Independetly for two child nodes

at a time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173.9 Implementation of Network Coding with respect to the layered

view of GINMAC . . . . . . . . . . . . . . . . . . . . . . . . . . . 173.10 Coding Header Added to a GINMAC packet . . . . . . . . . . . 18

4.1 Analytical Model and Experimental Results for Power Consump-tion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

4.2 Analytical Model and Experimental Results for Packet ReceptionRate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

4.3 Analytical Model and Experimental Results for Power Consump-tion for Packet Loss Probability less than 10% . . . . . . . . . . 22

4.4 Analytical Model and Experimental Results for Packet Receptionless than 10% . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

4.5 Improvement of Power Consumption with ACKs . . . . . . . . . 234.6 Analytical Model and Experimental Results for Power Consump-

tion for Packet Loss Probability for Optimized Packet ReceptionBehavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

4.7 Analytical Model and Experimental Results for Power Consump-tion for Four Node Topology . . . . . . . . . . . . . . . . . . . . 24

4.8 Analytical Model and Experimental Results for Power Consump-tion for packet loss probability less than 10% . . . . . . . . . . . 25

3

Page 7: Network Coding with Limited Overhearing in Wireless Sensor

4.9 Analytical Model and Experimental Results for Packet ReceptionProbability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

4.10 Analytical Model and Experimental Results for Power Consump-tion for the Generic Model . . . . . . . . . . . . . . . . . . . . . . 26

4.11 Analytical Model and Experimental Results for Packet ReceptionRate for the Generic Model . . . . . . . . . . . . . . . . . . . . . 27

A.1 Arithmatic over binary field . . . . . . . . . . . . . . . . . . . . . 30

4

Page 8: Network Coding with Limited Overhearing in Wireless Sensor

Abstract

Network Coding as a recently emerged concept in Communication NetworksResearch, has attracted a lot of attention in networking research community.Previous research on applying Network Coding in Wireless Sensor Networks, donot consider most crucial constraints inherent to sensor networks. Especiallymost of them assume overhearing of neighboring transmissions for free, which isunrealistic in practical sensor network environments where nodes have limitedenergy. Therefore these applications fail to make an impact on real world sensornetwork deployments. In some sensor networking scenarios it is possible to ma-nipulate overhearing in a controlled manner. In this research we apply networkcoding in to improve throughput of a Time Division Multiple Access(TDMA)based Medium Access Control(MAC) protocol called GINMAC , manipulatingoverhearing appropriately. Our results show that network coding can improvethe throughput while trading off with other network performance characteristicslike reliability and power consumption.

Page 9: Network Coding with Limited Overhearing in Wireless Sensor

Chapter 1

Introduction

Wireless Sensor Networks (WSN) consist of devices capable of sensing environ-mental or physical quantities. These devices communicate with each other overwireless links and once deployed, meant to operate autonomously without hu-man intervention. Furthermore these devices operate on limited energy sources,making the environment even more restrictive in terms of processing powerand energy. With the advances of research and development in WSNs, theyhave become widely applicable in areas ranging from conventional environmen-tal monitoring applications to applications consisting of smart objects connectedto the Internet providing different services. Therefore WSNs attracts not onlythe communication networks research community but also various researchersfrom other Science and Engineering domains. With the inherent constraintson energy consumption, WSN research primarily focused on developing hard-ware and software to maximize the life time of an individual sensor node andin turn the whole network. Especially, since wireless communication accountsfor a greater portion of energy consumption of a sensor node, network protocoldesign and implementation plays an important role in WSNs. Therefore manyresearch focused on proposing energy efficient protocols while maintaining de-sirable network throughput, robustness and reliability.

1.1 Motivation and Problem Statement

Network Coding [1] is a considerably novel concept in communications networksand information theory, which was introduced to improve the throughput andreliability of certain network topologies. As network coding has been employedin wireless networks to obtain promising results, several research focused onapplying it in WSNs. Some of these research were theoretical extensions ofnetwork coding for certain WSN scenarios, which have limited resemblance tomost of the popular WSN protocols. On the other hand several other researchwere based on assumptions which are unrealistic in WSNs. For example theyassume that nodes always have their radio on for overhearing. Therefore a

1

Page 10: Network Coding with Limited Overhearing in Wireless Sensor

careful investigation on applicability of network coding is required in order torealize it in practical WSN context. In other words, benefits of network codinghas to be evaluated, trading off with the costs which should be incurred inpractical WSN scenarios.

1.2 Method

In this study we apply network coding for a data collection protocol [2], whichis one of the fundamental operations in WSNs. Data collection is done forminga logical tree topology rooted at the collection point (or sink). This protocol de-signed to achieve a desired level of reliability and delay. Furthermore it is basedon a Medium Access Control (MAC) protocol based on Time Division MultipleAccess (TDMA) named GINMAC. This is an important property when incorpo-rating network coding, since each node share the knowledge on medium accessof each other. We introduce limited amount of overhearing in the MAC layerusing this property and perform network coding to reduce the delay while main-taining a similar level of reliability. Compared to the feedback error correctionmechanism employed in GINMAC, our approach can be viewed as a forwarderror correction scheme. This is because our approach does not perform re-transmissions based on receiver’s acknowledgments, where as GINMAC relieson acknowledgements when retransmitting.

When applying network coding encoding and decoding is a key concern. Anencoding scheme decides how to combine two or more packets whereas decodingscheme performing the reverse of encoding operation. Random linear networkcoding [9] suggests probabilistic encoding algorithm, which needs costly com-putation, specially in resource constrained sensor nodes. Computationally lightweight encoding was proposed in [11], which simply does a bitwise XOR oper-ation to combine two packets, hence decoding also can be done with an XORoperation. Our approach uses XOR operations for encoding and decoding.

initially we investigate the application of network coding for a binary treetopology, which subsequently extends to a more general one. We analyzed ourprotocol both analytically and experimentally, comparing the reliability andenergy consumption with [2]. Analytical models are formulated assuming anindependent packet loss model, which also simulated in the experimental envi-ronment accordingly. Based on the observations further relaxations of certainassumptions and design decisions are made.

1.3 Alternative Approaches

Network Coding was studied in the context of WSNs to improve energy efficiencyand reliability. Most of the research were focusing on the theoretical aspect ofcoding while having less attention on applicability in common protocols andcommunication patterns. A more practical approach which is related to ours canbe found in [12], where it applies network coding in a data collection scenario. It

2

Page 11: Network Coding with Limited Overhearing in Wireless Sensor

used network coding to improve reliability, by achieving higher degree of spatialdiversity. In other words it allows normal transmissions to be overheard byseveral other nodes, hence forming multiple paths between a given node andthe sink. Similar to our approach it proposes a limited amount of overhearing,without considering behavior of MAC layer explicitly. Furthermore they donot evaluate the additional cost of overhearing comparatively, whereas in ourapproach it is a key contribution.

1.4 Scientific Contribution

This research primarily focused on applying network coding in practical WSNscenario. Therefore we consider state of the art MAC protocol called GIN-MAC [2], to analyze the network coding gains. We extend the GINMAC ap-plying network coding and compress the TDMA schedule, hence reducing thedelay. Our protocol act as a forward error correction scheme.

The key contribution of our approach is the introduction of limited over-hearing in a MAC layer of a sensor network. Also we evaluated the additionalenergy consumption incurred by overhearing and comparatively analyzed thegains of network coding. Even though we base and analyze our approach onGINMAC, which is a TDMA protocol with static medium access behavior, thiswould encourage to investigate overhearing costs in contention based MAC pro-tocols too. We propose that, with limited overhearing wireless sensor networkprotocols can exploit the broadcast behavior of wireless medium, which is usefulin cooperative communication context. Furthermore we evaluate our approachboth analytically and experimentally.

1.5 Report Structure

Following chapters are organized as below. Chapter 2 will traverse though wire-less sensor networks in general and some key research concerns present in them.Especially energy consumption and MAC layer protocols will be revisited topresent some insight into the difficulty of applying network coding in currentWSN MAC protocols. This will be followed by an introduction to network cod-ing and summarization of research attempts to apply network coding in sensornetworks. Design of the protocol and corresponding background for certain de-sign criterion will be presented in Chapter 3, followed by an overview of theimplementation of our protocol. Evaluation of experimental results will be pre-sented in Chapter 4, where as a discussion of conclusions and future work willbe in Chapter 5.

3

Page 12: Network Coding with Limited Overhearing in Wireless Sensor

Chapter 2

Background

In this chapter, a review on wireless sensor networks will be discussed. Especiallyit focuses MAC layer’s impact on energy consumption in WSNs. This will befollowed by a discussion on related work.

2.1 Wireless Sensor Networks

Wireless Sensor Network is a set of devices capable of sensing physical quantitieslike environmental properties, which also can communicate with each other overwireless links. Inherently these devices are constrained in processing power,memory and energy. Therefore operating and system software are designed tomeet these constraints. Contiki [5] and Tiny OS [8] are two operating systemswidely used in both research and industry.

Most of the applications of wireless sensor networks are tailer made for cer-tain scenarios. This makes sensor networks communication model and its associ-ated concepts different from common layered communication models. Two mostcommonly applicable patterns in sensor networks are data collection and datadissemination. In data collection protocols, geographically distributed sensorsreport their sensor reading to a central collection point. Most common approachis to organize a logical tree rooted at the collection node and each sensor for-warding data to their parent nodes, hence recursively reaching the root node [7].Data dissemination meant to perform the reverse operation of the above, whereit spreads information from a central node to all the nodes in the network. Thisis another common communication pattern in scenarios like disseminating codeupdates [10] to the network in order to maintain the network with out humanintervention

2.1.1 Energy Consumption in Wireless Sensor Networks

Sensor nodes are devices with radio communication capabilities with limitedpower and processing resources. Hence almost all the system software including

4

Page 13: Network Coding with Limited Overhearing in Wireless Sensor

the network protocol implementations are designed to meet these requirements.In general radio communication is an energy consuming operation in any radiocommunicating device including sensor nodes. Especially in sensor nodes withstringent energy requirements, communication protocol design should focus onthe energy efficiency while trading off with performance characteristics. There-fore substantial amount of research devoted to, analysis of energy consumptionin individual sensor nodes, communication protocols and various WSN applica-tion scenarios.

2.1.2 Low Duty Cycle Medium Access Control

Medium Access Control (MAC) layer governs the behavior of wireless mediumaccess of a sensor node. This is done by controlling the radio device driveraccordingly. Since radio communication is the main consumer of a sensor node’senergy, MAC protocol plays a crucial role in energy consumption of a sensornode. Therefore research on energy efficient MAC protocols is an interestingresearch area in WSNs. Duty cycling is one of the primary mechanisms usedin WSNs to achieve low energy consumption. This approach controls the radiotransceiver of a sensor node cycling its state between sleep and awake states.Duty cycling introduces the challenge of achieving higher throughput and lowlatency given the nodes in the network switching between sleep and awake states.

B-MAC and X-MAC are two widely implemented MAC protocols publishedin [14] and [3], where B-MAC is the default MAC protocol in TinyOS where asContiki. B-MAC relies on the concept of low power listening where a node sendsa preamble which is at least as long as the sleep period of a node. A receiver ofthe preamble switches on its radio and listen to the subsequent data transmissionby the sender. Since any node who receives a preamble wakes up and startlistening, unintended receivers unnecessarily listen to neighboring transmissions.X-MAC proposes to improve energy efficiency of low power listening by furtherimproving certain aspects of it. It introduces sending a series of short preamblesinstead of a single long one, including the target address thus by avoiding theproblem of overhearing. These two protocols are experimented and verified forits energy efficiency and therefore implemented widely in most practical sensornetwork deployments.

2.1.3 Performance Controlled Wireless Sensor Networks

Deploying WSNs with guaranteed performance is a challenging task, since theunderlying communication takes place over an inherently unreliable wirelesschannel. Energy constrains in sensor node hardware further amplifies the prob-lem, restricting applying the physical layer techniques to overcome unreliablechannels. Therefore upper layers have to take measures to ensure performancerequirements met the desired level. Another approach to achieve performancecontrol is to do a planned deployment with an offline dimensioning to meetthe target performance guarantees. GINMAC is a MAC protocol proposedin [2], dimensioned for certain environment with estimated characteristics such

5

Page 14: Network Coding with Limited Overhearing in Wireless Sensor

as packet loss probability. GINMAC employs Time Division Multiple Access(TDMA) as the medium access control protocol. According to a globally sharedstatic topology, nodes join the network identifying its logical position. Based onthe position of the node in the network, corresponding medium access scheduleis also identified by all the nodes. Reliability is ensured with retransmissions ofpackets according to the receiver acknowledgements. Retransmission slots arepreallocated according to the reliability requirement and the estimated packetloss probability [2].

2.2 Network Coding

In its seminal work [1], Network Coding was introduced as an utility to improvethe throughput of a multicast traffic flow in a wired network. It proposed thefundamental idea of mixing packets in an intermediary node in the network,thus it will not only replicates the packets but also encode them according toa particular scheme. They modeled the network in graph theoretic notation,representing network nodes as vertices and network links as edges. Informationsources are associated with nodes, which are capable of transmitting informationin a certain rate which is called the entropy rate of the source. The edgesof the graph are weighted with the associated capacity of the link in termsof bits per second. Then the problem of Network Coding is formulated withregard to a fundamental theorem in graph theory, namely Max-Flow Min-Cut.Max-Flow Min-Cut theorem shows that the maximum flow in the network isequivalent to the minimum cut, which is the separation between the source andthe sink of a particular flow with minimum cumulative edge weights (channelcapacity in information flow). In terms of the above problem formation theyprove that, Network Coding can achieve the maximum information flow of amulticast network, hence improving the throughput of the network.

Subsequently in [15], they proved that a linear combination of packets [seeAppendix] can also achieve the maximum throughput of the multicast network.A linear combination is formed using a coefficient vector multiplied by a packetvector, where the coefficients are selected accordingly [15]. In [9], they ex-tended the linear network coding and proved that with random coefficients vec-tor achieves the maximum throughput provided that the coefficients are takenfrom a sufficiently large finite field. In general these developments suggestednetwork coding as a way to improve network throughput.

2.2.1 Wireless Network Coding

Network Coding was applied in wireless networks in [11], taking the inherentwireless communication characteristics into account. This work applies the Net-work Coding in an unicast traffic flow scenario proposing a protocol which canbe integrated into the network stack. Apart from being the first approach toapply network coding in practice, the distinguishing idea is to use the sharedwireless medium and exploit the packets which are not intended to a node while

6

Page 15: Network Coding with Limited Overhearing in Wireless Sensor

(a) Without Network Coding (b) With Network Coding

Figure 2.1: Application of Network Coding in a Unicast Scenario

performing network coding. In other words, nodes overhear the neighboringtransmissions and collect packets to encode and transmit accordingly. This isa desirable idea for wireless networks without strict energy constraints in thenodes. This idea is illustrated in the Figure 2.1 below.

Node A wants to transmit a packet Pa to Node B and Node B wants totransmit packet Pb to node A via the relay node R as depicted in Figure 1. In thegeneral relaying setting Node A transmits Pa and Node R relays it to be reachingB with two transmissions. Pb to reach A costs the same number of transmissionadding up the total number of transmissions to 4. In the Network Codingsetting, Node R can perform a simple XOR operation on the two packets insteadof just relaying the transmission and then broadcast the packets. Once Node Aand Node B receive the XORed packet, they can decode the packets intendedto be received by them. Thus with the simple XOR based network codingscheme saves a single transmission improving the throughput of the networkfor the above communication setting. The protocol COPE, proposed based onthe above illustrated idea, was evaluated on a wireless network setup and fordifferent transport protocols and congestion levels to demonstrate its gains [11].

2.3 Network Coding in Wireless Sensor Networks

One of the first applications of network coding in WSNs was presented in [4].They consider data collection of a large scale sensor network. They considern nodes as storage nodes which needed to be queried to collect data, while knodes generating data. A decentralized erasure coding approach is employed,where they diffuse k data packets among n nodes at random. At each storagenode Random Linear Network Coding is performed on each received data packetwhere they pick coefficients from a sufficiently large finite field and constructinglinear combinations of packets. A collector node contact any sub set of k nodesand perform the decoding of native packets. Since energy and storage capabili-ties are main concerns in WSNs they establish a minimum requirement for thenumber of storage nodes needed for a successful decoding at the collector. In

7

Page 16: Network Coding with Limited Overhearing in Wireless Sensor

this approach they use Network Coding to achieve reliable data storage specif-ically in node failures. While distributed nature of this approach suits WSNdata gathering it does not address the multi-hop nature of WSNs which mightnot suitable for randomly deployed sensor network as usual in practical settings.

More practical approach on applying network coding for data gathering pro-posed in [12]. It applied network coding for Collection Tree Protocol (CTP) [7],a state of the art data collection protocol for WSNs. CTP builds a logical treetopology from nodes, where each node maintaining a pointer to its parent node.In this work they open up the strict single path routing from sensor nodes tothe sink in collection tree. They assume that, a node cannot only overhearits child’s transmissions but also several other neighboring transmissions, thusby introducing logically redundant flows from a given sensor node redundantly.Network coding is performed on the packets it overhears, based on a finite field ofsize 16 which has a higher probability of successful decodability. They comparetheir protocol with a variant of CTP which improved for reliability. Simulationresults shows that network coding approach with different redundancy levels (i.eNumber of packets injects to the network by a node) improves the reliabilityof CTP protocol. They discuss overhearing and effect of different amounts ofoverhearing on reliability. Even though, since overhearing is not geared in MAClayer, they do not consider overhearing from an energy perspective.

8

Page 17: Network Coding with Limited Overhearing in Wireless Sensor

Chapter 3

Design

In this chapter we build up the relavant arguments to form the design of ourapproach. Extension of our basic scheme is also discussed.

3.1 Design Rationale

3.1.1 Protocol

Radio communication consumes a major portion of a sensor node’s energy.Medium Access Control (MAC) protocols govern the medium access behav-ior interfacing with the radio drivers. Therefore MAC protocol tries to optimizethe time radio hardware operates, turning off the radio communication as muchas possible. This is not a favorable property when applying network coding,since network coding may rely on overhearing neighboring transmissions. Asdescribed in chapter 2, GINMAC employs a TDMA schedule with global timesynchronization. Therefore each node knows each others medium access sched-ule, hence providing room for a network coding scheme. Exploiting this weintroduce limited overhearing in GINMAC TDMA schedule in order to performan XOR based network coding scheme. We introduce this idea for a data collec-tion scenario forming a logical tree topology and demonstrate the scheme for asimple binary tree with three nodes as illustrated in Figure 3.1a. Applicabilityof this scheme for larger trees will be discussed later in the chapter.

Figure 3.1a illustrates a binary tree topology we considered to demonstratethe network coding scheme. We assume both child nodes are within the radiorange of each others, which is a reasonable assumption in a carefully plannedsensor network environment. Figure 3.1b (right) demonstrates the GINMACTDMA schedule for the binary tree topology. It allocates a basic transmissionslot (denoted by TX) for a given node, followed by a retransmission slot (denotedby RTX) to be used when the original transmission failed. Hence for the binarytree topology, it allocates four time slots. Similarly GINMAC allocates time slotsglobally to each node in the network, according to the traffic flow demanded bythe application. Therefore time schedule is preallocated statically at the time of

9

Page 18: Network Coding with Limited Overhearing in Wireless Sensor

(a) Binary Tree Topology (b) TDMA Schedule

Figure 3.1: Three Node Topology and Corresponding TDMA Schedule for Net-work Coding

the deployment. Therefore, when the number of nodes increases, upper boundof the delay increases.

Main motive of applying network coding in this scenario is to compress thebasic GINMAC TDMA schedule ensuring better delay performance. This is fa-vorable in WSN deployments which implement control feedback loops with smalldelay bounds. Power consumption and packet reception rate considered as theperformance metrics, which has to be traded-off with the delay improvements.

3.1.2 Coding Scheme

Overhearing is introduced in the TDMA schedule as depicted in the Figure 3.1b.Node overhears (denoted by OH) its neighboring transmission and gathers adata packet in order to be used in the coding. Coding is done by performingan XOR operation on the overheard packet and its native packet. With respectto the binary tree topology and the TDMA schedule depicted in the Figure,Node A sends its native packet Pa in the first slot, in which Node B overhears.Subsequently Node B sends its native packet Pb followed by the coded packetcontaining Pa⊗Pb. A Transmitting node does not wait for the acknowledgement(ACKs) from the recipient. As demonstrated in the Figure 3.1b (left) node Aand B together perform three transmissions (third transmission is denoted asRTX), if overhearing of the packet was successful. This scheme can recover onepacket loss when the coded packet receives the root along with another nativepacket. Decoding is simple as the encoding where an XOR operation with thecoded packet and one of the native packets recovers the lost packet. This schemecan be considered as a forward error recovery scheme since it does not rely onACKs.

3.1.3 Performance Model for Binary Tree Topology

Network coding compresses the schedule, reducing the amount of redundancy.As mentioned earlier this introduces a traded-off between the delay and perfor-mance metrics, such as Packet Reception Rate (PRR) and Power Consumption.

10

Page 19: Network Coding with Limited Overhearing in Wireless Sensor

To study the impact of network coding compared to GINMAC, we formulatea performance model. We start with a naive model which captures the mostfundamental behavior of two protocols providing the grounding to build up amore fine grained model.

We model the radio environment assuming an uncorrelated packet loss model,where a constant packet loss probability prevails between every link. We denoteErx as the power consumed during a packet reception. This model assumes thatthe receiving node turns on their radio during the whole slot period without fur-ther optimizations. Furthermore it assumes that the parent node avoid listeningduring the retransmission slots if the earlier transmissions were successful.

We calculate power consumption based on a energy estimation model buildfor Contiki [6]. It models the energy based on the Central Processing Unit(CPU) ticks a certain operation takes and convert it to actual power consump-tion. Power Consumption(PC) for a data collection instance of the binary tree,is derived accordingly for both protocols and can be expressed as below assum-ing a Etx power consumption for a single transmission. As the first performancemodel, here we capture the most basic behavior of both the protocols in termsof receiving slots (RTX). We assume that receiving nodes, stop listening whenthe basic transmission was successful in both GINMAC and Network Coding.This model does not exactly relates to an implementation, rather hold as abenchmark.

We calculate the expected number of transmissions (denoted by E[.]) andreceptions based on the simple packet loss model and derive the power con-sumption for a single node in GINMAC as below. Similarly expected numberof receptions can be derived.

E[transmissions]GM = 1× P[one transmission] + 2× P[two transmissions]

= 1 + p

Similarly expected number of transmissions and receptions for network cod-ing approach can be derived as below.

E[transmissions]NC = 2× P[two transmissions performed]

+3× P[three transmissions performed]

= 2× (1− 2p(1− p)2) + 3× (2p(1− p)2)

= 2(1 + p(1− p)2)

E[receptions]NC = 2× P[two receptions performed]

+3× P[three receptions perfomed]

= 2× p(1− p + 3× (1− 2p(1− p))

= 2(1 + p(1− p))

11

Page 20: Network Coding with Limited Overhearing in Wireless Sensor

Accordingly, we derive the total power consumption for a single data collec-tion instance of a binary tree topology as follows.

PC =

{2(1 + p)Etx + 2(1 + p)Erx GINMAC(2(1− p(1− p)2))Etx + 2(1 + p(1− p))Erx NC

With the estimated values of 0.15 mW for Erx and 0.034 mW for Etx, corre-sponding graph is illustrated in Figure 3.2 for both protocols. Packet ReceptionRate(PRR) at the parent can be expressed in the following equation while thecorresponding graph is illustrated in Figure 3.3.

As described earlier, GINMAC allocates additional transmission slots in or-der to achieve better reliability. On the other hand, Network Coding approachreduces the redundancy and hence the reliability, compared to GINMAC. Westudy this trade-off analyzing the Packet Reception Rate (PRR) in both ap-proaches. Packet Reception Rate (PRR) is defined to be the probability of apacket being reached it’s parent node, within the allocated time slots, includingthe retransmission slots.

According to the uncorrelated packet loss model assumed, PRR for eachapproach can be derived based on following equations.

When GINMAC has one additional transmission slot, the probability ofpacket not being received by the parent node is p2 resulting the following PRR.In network coding packet can reach the parent either by succeeding its basictransmission with a probability of 1− p or allowing the parent node to recovereven if the basic transmission lost. This corresponds to a probability of p(1−p)3.This results in the following PRR for the network coding approach.

PRR =

{1− p2 GINMAC(1− p) + p(1− p)3 NC

3.2 Generalization

3.2.1 Protocol for Three Node Topology

The basic idea established in preceding sections illustrates the fundamental ap-plication of network coding within GINMAC. A generalization of this schemewould be applicable in larger sub trees with several child nodes. In these situa-tions it is important to identify the extent to which we can achieve compressionin the schedule while maintaining the performance metrics up to desired levels.

We apply the above protocol for a subtree with three child nodes as depictedin the Figure 3.4 to study the extendability of this approach. CorrespondingTDMA schedule illustrated in Figure 3.4b that network coding compress theGINMAC schedule by two time slots which is a 30% improvement with respectto the time schedule.

In this scheme the node which retransmits has to overhear for two neighbor-ing transmissions. Therefore coding scheme varies depending on the overheard

12

Page 21: Network Coding with Limited Overhearing in Wireless Sensor

0

0.2

0.4

0.6

0.8

1

0 0.2 0.4 0.6 0.8 1

Po

wer

Co

nsu

mp

tio

n (

mW

)

Packet Loss Probability

GINMACWith NC

Figure 3.2: Naive Performance Model (Power Consumption)

0

0.2

0.4

0.6

0.8

1

0 0.2 0.4 0.6 0.8 1

Pac

ket

Rec

epti

on

Rat

e

Packet Loss Probability

Without NCWith NC

Figure 3.3: Naive Performance Model (Packet Reception Rate)

13

Page 22: Network Coding with Limited Overhearing in Wireless Sensor

(a) Three Node Topol-ogy

(b) TDMA Schedule

Figure 3.4: Three Node Topology and Corresponding TDMA Schedule for Net-work Coding

packets, since overhearing is not perfect. If both the neighboring transmissionsare successfuly overheard it can send Pa ⊗ Pb ⊗ Pc, whereas it would only senda combination of two packets if it overhears only one packet. For example whenonly Pb is overheard it would send Pb ⊗ Pc.

It is clear that network coding approach is more cooperative in nature thanbasic retransmissions. In other words, in network coding for a successful recep-tion of a certain packet, intended packets has to reach the parent node accordingto the coding scheme. For example, if an original transmission failed, packet canbe recovered according to the overhearing and coded transmissions. Therefore itis important to analyze the probability of successful decoding of a packet giventhat the original transmission is lost. We define this as the decodability of thescheme.

P [Decodability] = P[successfuly recovering a packet given Original transmission is failed]

Decodability relates to the PRR as below.

PRR = P[Original transmission is sucessfull] + P[Decodability]

Therefore it is important to analyze decodability of a network coding ap-proach. Accordingly decodability of this scheme varies depending on the num-ber of overheard packets and the probability of coded packet reaching the parentnode. Probability of decodability of this scheme can be stated as below.

P [Decodability] = 2× P[One packet being overheard] + P[Both packets being overheard]

= 2p(1− p)4 + (1− p)5

Figure 3.5 illustrates the decodability of two and three child node topologiescompared to the basic retransmission scheme. As it shows, network coding per-forms bad in both the topologies compared to the basic retransmission scheme.

14

Page 23: Network Coding with Limited Overhearing in Wireless Sensor

0

0.2

0.4

0.6

0.8

1

0 0.2 0.4 0.6 0.8 1

Pro

bab

ilit

y o

f E

rro

r R

eco

ver

y

Packet Loss Probability

Basic RetransmissionsNC with 2 child nodesNC with 3 child nodes

Figure 3.5: Probability of Decodability for two and three child node topologies

Figure 3.6: Linear Network Coding for longer Schedules

This is mainly due to the reduced redundancy and the fact that coding schemesrely on overhearing neighboring transmissions.

3.2.2 Extension for General Topologies

As depicted in the Figure 3.4b, TDMA schedule only uses a single retransmis-sion slot. It would be interesting to investigate the impact of network coding fordifferent numbers of child nodes and multiple retransmission slots. Figure illus-trates GINMAC schedule for a general subtree with n child nodes. This sched-ule incorporates one additional transmission slot there by making the schedulelength to 2n

Following the same rational for two child node topology, network coding canbe applied to compress the length of the GINMAC schedule. The most basiccoding scheme is to extend the two node model to all the child nodes. Duringretransmission slots node sends different linear combination of the packets ithas. Figure 3.6 illustrates this coding scheme.

Parent node can consider the packets it receives as a set of linear equations.Therefore it has to decode the packets by applying an algorithm to solve a set oflinear equations. In order to decode, these linear combinations has to be linearlyindependent. In a carefully deployed protocol like GINMAC, it can configurethe nodes such a way that linear independence hold. In this scenario, comparedto the corresponding GINMAC schedule which uses 2n slots, network coding

15

Page 24: Network Coding with Limited Overhearing in Wireless Sensor

0

0.2

0.4

0.6

0.8

1

0 0.2 0.4 0.6 0.8 1

Pro

bab

ilit

y o

f E

rro

r R

eco

ver

y

Packet Loss Probability

n=2 m=1n=3 m=1n=4 m=2

Figure 3.7: Probability of Error Recovery for two and three child node topologies

approach uses up to n + m slots.It is important to analyze the reliability of this scheme based on the PRR,

comparing with the basic retransmission scheme. Figure 3.7 illustrates the prob-ability of decodability for several schedules with different n and m values, ac-cording to the following expression.

P [Decodability] = P[Overhearing 1 to n-2 packets and successful coded transmission]

= (1− p)(

n−2∑i=1

(

(n− 2

i

)(1− p)ipn−2−i)(

(m + i

i + 1

)(1− p)i+1pm−1))

According to the Figure 3.7, when n is equal to 4 with two retransmissionslots decodability reduces. Especially when the packet loss probability is lessthan 10%, decodability degrades. This is due to the fact that coding requiresoverhearing of four packets and decoding requires three of them to be reachedat the parent. Therefore when the number of native packets in a coded packetsincreases, performance of the coding scheme degrade in terms of packet receptionrate.

Based on the argument of decodability it is better to decompose a generaltopology into set of binary subtrees and apply network coding independently.In other words, it is better to apply network coding for two nodes at a timerather than applying it to more than two nodes at once. An example of thisscheme for a four node topology is illustrated in Figure 3.8. It compresses theschedule by 75% times while maintaining comparatively reasonable amount ofreliability.

16

Page 25: Network Coding with Limited Overhearing in Wireless Sensor

(a) Five Node Topology (b) TDMA Schedule

Figure 3.8: Application of Network Coding Independetly for two child nodes ata time

Figure 3.9: Implementation of Network Coding with respect to the layered viewof GINMAC

3.3 Implementation

3.3.1 Coding Layer

In Wireless Sensor Networks there are no rigid boundaries between differentlayers in the networking stack. Therefore most applications interact back andforth with the underlying MAC and Networking layers. Network Coding imple-mentation in this research followed the same reasoning and implemented as adifferent layer between Network and MAC layers. A schematic representationof the implementation of network coding protocol in GINSENG can be foundin Figure 3.9.

Our implementation was based on GINSENG over contiki operating sys-tem. GINSENG implements GINMAC, which is a MAC layer based on TDMA.We implement a seperate layer to perform network coding. This coding layermaintains an overhearing buffer to temporarily store packets overheard from itsneighboring transmissions. Encoding and decoding algorithms are implementedin this layer. In Encoding, coding layer gathers appropriate packets overheardin the buffer and perform the coding of packets. Similarly decoding performswhen coded packets are received.

17

Page 26: Network Coding with Limited Overhearing in Wireless Sensor

Figure 3.10: Coding Header Added to a GINMAC packet

3.3.2 Packet Structure

With the additional coding layer, there should be additional coding parametersincorporated into the packet structure. These parameters are added to theexisting GINMAC packet in the form of an additional header field called thecoding header. The additional coding header added to the packet is illustrated inthe Figure 3.10. Coding header encapsulates the information needed to decodea coded packet. As depicted in the Figure 3.10, ”No of Native Packets” fieldcarries the number of native packets in the coded packet. In order to identifythese packets uniquely we add sequence numbers and source addresses of thenative packets. Therefore depending on the native packets encoded, codingheader length increases, since it should include all the native packet details.

This introduces an additional overhead in terms of the packet size. Whenconsidering the source address and sequence number sizes this can be significantwhen there is a higher number of native packets. But when considering simplecoding scheme for the binary sub tree this overhead is considerably small.

18

Page 27: Network Coding with Limited Overhearing in Wireless Sensor

Chapter 4

Evaluation

4.1 Experimental Setup

We test our implementation on COOJA [13], a simulator for contiki operat-ing system. COOJA can simulate an environment with constant packet lossprobability, which is the desired environment for our experiments. Since packetloss probability is the only stochastic property present in the experimental en-vironment, we consider a sample time of around 50 seconds and performed theexperiment for 10 times forming 10 samples for a particular experiment instance,ensuring the statistical significance of data.

4.2 Priliminary Experiments

The naive performance model of the power consumption as described in sec-tion 3.1.3, assumes a constant power consumption for a packet reception duringa given time slot. Real behavior of the power consumption during a time slotdeviates from this model due to the low level radio driver behavior of GINMAC.More specifically GINMAC turns on its radio according to the GINMAC pa-rameters when a packet reception suppose to take place and turns on when itreads from the radio and send the acknowledgement. Therefore the time radio ison, is a fraction of the slot time. Furthermore, GINMAC’s radio driver detectsthe packet losses performing the Cyclic Redundancy Check (CRC) and if thepacket is erroneous it turns off the radio.

This lead us to perform preliminary experiments on the fine grained detailsof the radio behavior in GINMAC. In addition to these different behaviors ofpacket reception, network coding protocol consists of an additional coding over-head. Our preliminary experiments designed to capture these different powerconsumption components and their contribution to the overall power consump-tion. These experiments also were carried out according to the experimentalsetup described in section. Table summarizes the power consumption com-ponents identified and their associated costs with respect to the computation

19

Page 28: Network Coding with Limited Overhearing in Wireless Sensor

Table 4.1: Power Consumption of Different Components

Component Clock Ticks Power Consumption(mW)Normal Packet Reception (GINMAC) 31 0.056

Normal Packet Reception (NC) 34 0.064Errorneous Packet Reception 17 0.031

Transmission 19 0.034

and power consumption. We denote a power consumption for a normal packetreception with Enp in network coding protocol and with Enpg in GINMAC.Furthermore Eep denotes the power consumption for an erroneous packet, whileEtx denotes the power consumption for a transmission.

4.3 Experimental Analysis

4.3.1 Three Node Binary Tree Topology

Based on the preliminary experiments we formulate a fine grained power con-sumption model for the binary tree topology. This model captures the basicGINMAC protocol which does not turn off the radio even if the packet receivedsuccessfuly. Power consumption for transmissions in GINMAC can be stated asbelow.

PCtransmissions = E[transmissions]× Etx

= 2(1 + p)Etx

For receptions with the fine grained model, power consumption can be statedas below. Here unless both the transmissions failed, power consumption remainsEnpg + Eep due to the behavior of radio reception in GINMAC.

PCreceptions = E[successful receptions]× (Enpg + Eep) + E[failed receptions]× (Eep)

= 2(1− p2)(Enpg + Eep) + 2p2Eep

Similarly for network coding power consumption for transmission and recep-tion can be stated as below.

PCtransmissions = E[transmissions]× Etx

= (2× p + 3× (1− p))Etx

= (3− p)Etx

PCreceptions = E[successful receptions]× E[power consumption per reception]

+E[failed receptions]× Eep

= (3− p)(Enpg + Eep) + pEep

20

Page 29: Network Coding with Limited Overhearing in Wireless Sensor

0

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0 0.2 0.4 0.6 0.8 1

Po

wer

Con

sum

pti

on

(m

W)

Packet Loss Probability

With NCWithout NC

(a) Analytical Model

0

0.05

0.1

0.15

0.2

0.25

0.3

0 0.2 0.4 0.6 0.8 1

Po

wer

Con

sum

pti

on

(m

W)

Packet Loss Probability

With NCWithout NC

(b) Experimental Results

Figure 4.1: Analytical Model and Experimental Results for Power Consumption

Accordingly, following power consumption model can be expressed and cor-responding graphs illustrate in Figure 4.1 for both protocols.

PC =

{2(1 + p)Etx + 2(1− p2)(Enpg + Eep) + 2p2Eep GINMAC(3− p)Etx + (3− p)((1− p)Enp + pEep) + pEep NC

Note that the above derivations are followed in different variations of themodel discussed later in the chapter.

Packet Reception Rate (PRR) is the other performance metric analyzed com-paring with GINMAC. PRR can be derived based on the following argument,where P (.) denotes the probability of a certain even while P (.|.) denotes theconditional probability.

PRR = P (native packet being reached parent) +

+ P (Decodability|native packet being lost)

Accordingly for three node topology PRR is expressed as below.

PRR =

{1− p2 GINMAC(1− p) + p(1− p)3 NC

Figure 4.2a illustrates the corresponding analytical graphs while Figure 4.2billustrates experimental results obtained from the simulations.

Analytical model resembles with the experimental results validating the ac-curacy of it. Following the intuition GINMAC performs better as it injects moreredundancy to the network while network coding reduces that amount. Espe-cially when the packet loss probabilities are higher network coding performancedegrades due to the cooperative nature of network coding. In other words dueto the high packet loss probability, probability of decodability degrades affectingnegatively on the PRR for network coding.

21

Page 30: Network Coding with Limited Overhearing in Wireless Sensor

0

0.2

0.4

0.6

0.8

1

0 0.2 0.4 0.6 0.8 1

Pac

ket

Rec

epti

on R

ate

Packet Loss Proabability

Without NCWith NC

(a) Analytical Model

0

0.2

0.4

0.6

0.8

1

0 0.2 0.4 0.6 0.8 1

Pac

ket

Rec

epti

on R

ate

Packet Loss Probability

Without NCWith NC

(b) Experimental Results

Figure 4.2: Analytical Model and Experimental Results for Packet ReceptionRate

0

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0 0.02 0.04 0.06 0.08 0.1

Po

wer

Co

nsu

mp

tion

(m

W)

Packet Loss Probability

With NCWithout NC

(a) Analytical Model

0

0.05

0.1

0.15

0.2

0.25

0.3

0 0.02 0.04 0.06 0.08 0.1

Po

wer

Co

nsu

mp

tion

(m

W)

Packet Loss Probability

With NCWithout NC

(b) Experimental Results

Figure 4.3: Analytical Model and Experimental Results for Power Consumptionfor Packet Loss Probability less than 10%

As GINSENG assumes a steady environment of deployment, packet lossprobability can assumed to be low. Figure 4.3 and 4.4 illustrate the performanceof two protocols when the packet loss probability is less than 10%.

According to both analytical and experimental results in Figure 4.4, PRRremains same for both GINMAC and network coding. Power consumption per-forms bad compared to GINMAC in network coding mainly due to ACKs notbeing processed. In other words network coding protocol performs the retrans-missions even if both the packets arrived at the parent.

Enabling ACKs would make network coding protocol power efficient. Con-trarily if overhearing node continues overhearing to the neighboring ACK itwould provide complete knowledge on packet receptions at the parent node,thus allowing the overhearer only to send the lost packet. This optimizationcannot be implemented in GINMAC due to the fact that GINMAC uses hard-

22

Page 31: Network Coding with Limited Overhearing in Wireless Sensor

0

0.2

0.4

0.6

0.8

1

0 0.02 0.04 0.06 0.08 0.1

Pac

ket

Rec

epti

on R

ate

Packet Loss Probability

Without NCWith NC

(a) Analytical Model

0

0.2

0.4

0.6

0.8

1

0 0.02 0.04 0.06 0.08 0.1

Pac

ket

Rec

epti

on R

ate

Packet Loss Probability

Without NCWith NC

(b) Experimental Results

Figure 4.4: Analytical Model and Experimental Results for Packet Receptionless than 10%

0

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0 0.2 0.4 0.6 0.8 1

Pow

er C

onsu

mpti

on

(m

W)

Packet Loss Probability

NC without ACKNC with ACK

Figure 4.5: Improvement of Power Consumption with ACKs

ware ACKs. An analytical expression of power consumption for network codingprotocol with ACKs can be expressed as below. Corresponding graph whichdepicts the improvement of incorporating ACKs plotted in Figure 4.5.

PC = (2 + p2)Etx + (3− p)((1− p)Enp + pEep) + pEep

Another possible optimization is to turn off the radio in the parent when itreceives the basic transmissions, thus by saving energy for idle listening duringthe retransmission slot. The power consumption model with respect to thisoptimization is expressed as below.

PC =

{2(1 + p)Etx + 2p2Eep + 2((Enpg + Eep)p(1− p) + Enpg(1− p)) GINMAC(3− p)Etx + (4− (1− p)2)((1− p)Enp + pEep) + pEep NC

Both analytical and experimental results for above optimization is plottedin Figure 4.6. It is evident that both protocols improves in power consumptionwith this optimization.

23

Page 32: Network Coding with Limited Overhearing in Wireless Sensor

0

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0 0.2 0.4 0.6 0.8 1

Po

wer

Con

sum

pti

on

(m

W)

Packet Loss Probability

Without NCWith NC

(a) Analytical Model

0

0.05

0.1

0.15

0.2

0.25

0.3

0 0.2 0.4 0.6 0.8 1

Po

wer

Con

sum

pti

on

(m

W)

Packet Loss Probability

With NCWithout NC

(b) Experimental Results

Figure 4.6: Analytical Model and Experimental Results for Power Consumptionfor Packet Loss Probability for Optimized Packet Reception Behavior

0

0.1

0.2

0.3

0.4

0.5

0 0.2 0.4 0.6 0.8 1

Po

wer

Co

nsu

mp

tion

(m

W)

Packet Loss Probability

With NCWithout NC

(a) Analytical Model

0

0.1

0.2

0.3

0.4

0.5

0 0.2 0.4 0.6 0.8 1

Po

wer

Co

nsu

mp

tion

(m

W)

Packet Loss Probability

With NCWithout NC

(b) Experimental Results

Figure 4.7: Analytical Model and Experimental Results for Power Consumptionfor Four Node Topology

4.3.2 Four Node Tree Topology

As described in the design chapter, we experimented the extension of basicscheme to a four node sub tree with three children, running simulations onCOOJA. Similarly we analyze power consumption and PRR with analyticalmodel and simulation results. Power consumption can express analytically ac-cording to the following equation. Corresponding graph is plotted in Figure 4.7.

PC =

{3(1 + p)Etx + 3((1− p2)(Enp + Eep) + 2p2Eep) GINMAC(4− p2)Etx + (4− p)((1− p)Enp + pEep) + pEep NC

This scheme compresses the GINMAC schedule in two time slots. There-fore from the PRR perspective it performs poor while in power consumptionperforming comparatively better than the three node topology. Still it sends

24

Page 33: Network Coding with Limited Overhearing in Wireless Sensor

0

0.1

0.2

0.3

0.4

0.5

0 0.02 0.04 0.06 0.08 0.1

Po

wer

Con

sum

pti

on

(m

W)

Packet Loss Probability

With NCWithout NC

(a) Analytical Model

0

0.1

0.2

0.3

0.4

0.5

0 0.02 0.04 0.06 0.08 0.1

Po

wer

Con

sum

pti

on

(m

W)

Packet Loss Probability

With NCWithout NC

(b) Experimental Results

Figure 4.8: Analytical Model and Experimental Results for Power Consumptionfor packet loss probability less than 10%

0

0.2

0.4

0.6

0.8

1

0 0.2 0.4 0.6 0.8 1

Pac

ket

Rec

epti

on

Rat

e

Packet Loss Probability

Without NCWith NC

(a) Analytical Model

0

0.2

0.4

0.6

0.8

1

0 0.2 0.4 0.6 0.8 1

Pac

ket

Rec

epti

on

Rat

e

Packet Loss Probability

Without NCWith NC

(b) Experimental Results

Figure 4.9: Analytical Model and Experimental Results for Packet ReceptionProbability

the retransmission packet if overhearing takes place, consuming unavoidableamount of power. When considering the packet loss probability less than 10%this scheme performance almost similar in power consumption with GINMAC.This behavior is illustrated in Figure 4.8.

Packet Reception Rate for this configuration expressed below, based on thesimilar assumptions on the radio environment.

PRR =

{1− p2 GINMAC(1− p) + p(1− p)5 + 4p2(1− p)2 NC

Figure 4.9 shows the degradation in PRR in network coding scheme, whileGINMAC performing better specially while network coding approach performscomparatively better when packet loss probability is lower.

25

Page 34: Network Coding with Limited Overhearing in Wireless Sensor

0

0.2

0.4

0.6

0.8

1

0 0.2 0.4 0.6 0.8 1

Po

wer

Con

sum

pti

on

(m

W)

Packet Loss Probability

n=4 m=2n=3 m=2n=3 m=1n=2 m=1

(a) Analytical Model

0

0.2

0.4

0.6

0.8

1

0 0.2 0.4 0.6 0.8 1

Po

wer

Con

sum

pti

on

(m

W)

Packet Loss Probability

n=4 m=2n=3 m=2n=3 m=1n=2 m=1

(b) Experimental Results

Figure 4.10: Analytical Model and Experimental Results for Power Consump-tion for the Generic Model

4.3.3 General Tree Topologies

As described in Chapter 3.2.2 basic protocol for topology with two nodes canbe extended to a general topology with n child nodes and m retransmissionslots. We model the power consumption and packet reception rate consideringthe same radio environment and evaluate it for a selected set of n and m values.Generic power consumption and packet reception rate models can be expressedas below according to the notation introduced in section 4.2.

PC = (n+m)Etx−mEtxp(n−1)+(n+m(1−p)−1)((1−p)Enp +pEep)+pEep

PRR = (1−p)+p(1−p)

n−2∑i=1

(

(n− 2

i

)(1−p)ipn−2−i)(

(n− 2 + m

i

)(1−p)ipn−2+m−i)

Figure 4.10 illustrates the analytical and experimental results for power con-sumption for selected n and m values. As it suggests when the schedule becomelonger with multiple retransmission slots power consumption increases. Sinceanalytical results matches experimental results closely, resembles the accuracyof the generic model for power consumption.

Figure 4.11 illustrates the analytical and experimental results for packetreception rate for selected n and m values similar to power consumption plots.

Important observation here is that, when the schedule gets longer and thecoded packet contains more native packets packet reception rate performancedegrades. This is due to the number of packet a give node has to overhear ishigh and hence probability of decodability being less. Therefore when extendingthe schedule it is useful to restrict to subtrees of either two or three child nodes.This yields the same performance as an individual sub tree.

26

Page 35: Network Coding with Limited Overhearing in Wireless Sensor

0

0.2

0.4

0.6

0.8

1

0 0.2 0.4 0.6 0.8 1

Pac

ket

Rec

epti

on

Rat

e

Packet Loss Probability

n=2 m=1n=3 m=1n=3 m=2n=4 m=2

(a) Analytical Model

0

0.2

0.4

0.6

0.8

1

0 0.2 0.4 0.6 0.8 1

Pac

ket

Rec

epti

on

Rat

e

Packet Loss Probability

n=2 m=1n=3 m=1n=4 m=2

(b) Experimental Results

Figure 4.11: Analytical Model and Experimental Results for Packet ReceptionRate for the Generic Model

27

Page 36: Network Coding with Limited Overhearing in Wireless Sensor

Chapter 5

Conclusions and Futurework

Network Coding was studied both in theoretical and practical point of view .There were several research on applying network coding in wireless sensor net-works. Since in WSNs communication protocols and paradigms are differentfrom conventional communication networks, network coding applications can-not be adapted in WSNs. Additionally with the inherent constraints in WSNenvironment does not permit manipulating certain key assumptions in networkcoding.

In this research network coding applies to a data collecting tree topologywhich is layered on top of a Medium Access Protocol called GINMAC. Distin-guishing feature in GINMAC compared to the other MAC protocols in WSNs isthat GINMAC tries to control the performance metrics with an offline dimen-sioning process. GINMAC employs a TDMA medium access control guarantee-ing mutual exclusive access of the medium. GINMAC uses a simple ARQ likeretransmission scheme in order to achieve the required amount of overhearing.Other than the reliability GINMAC pays attention on delay requirements whereit tries to ensure a bounded delay. Main motivation of applying network codingin this scenario is to improve the throughput of GINMAC. In other words net-work coding applied across the time schedule compressing the number of slotsallocated in GINMAC to a lesser number of slots. It employs a simple XORbased coding scheme for encoding and decoding packets. We use the globalknowledge available in GINMAC TDMA scheme to apply limited amount ofcontrollable overhearing which is one of the unique contributions of our work.

As a consequence of compressing the schedule, amount of redundancy injectsto the network reduces. Therefore the reliability of the protocol has become oneof the important criterion we evaluated. On the other hand power consumptionneeded to be analyzed in order to evaluate the effect of additional overhear-ing employed in network coding protocol. We simulate basic topologies afteranalytically modeling the power consumption and packet reception rate. We

28

Page 37: Network Coding with Limited Overhearing in Wireless Sensor

focused mainly when packet loss probability is lower since GINMAC meant forcontrolled environments with careful deployment. Both from simulation resultsand analytical models we can conclude that network coding can improve thethroughput of GINMAC with the cost of reduced reliability and increased powerconsumption. But for specific environment of GINMAC we can conclude thatnetwork coding gains more in throughput while achieving the same reliabilityand a paying small additional power consumption.

We extended our basic scheme to a more general topology and evaluated theperformance. But there is room to explore more on different network codingschemes for multiple levels of data collection tree. Furthermore it would beinteresting to investigate on bulk data transfers from a certain node. From thenetwork coding perspective it is possible to further look into the computationaloverhead involved in coding operations and their possible optimizations.

29

Page 38: Network Coding with Limited Overhearing in Wireless Sensor

Appendix A

Mathematical Backgroundfor Network Coding

Finite Fields

In general terms network coding is based on abstract algebraic structures calledfinite fields and their associated arithmetic operations. An informal, but suffi-cient definition of a finite field as follows.

Definition A Finite Field is a finite set of elements associated with, a set ofarithmetic operations which comply with commutative, associative and distribu-tive lows of algebra. Finite Field is also called as a Galois field and denote aseither Fq or GF (q) where q is the number of elements of the field and followingq = pn for any prime number p.

Finite Field of size two can be defined with elements 0 and 1. Arithmeticoperations + and X over this finite field performs in modulo 2 as in Figure A.1.Most simplest form of network coding is performed over GF(2). It treats pack-ets as binary vectors over GF(2) and form linear combination using coefficientschosen from GF(2).

Considering following three packets P1, P2 and P3 in their binary form;P1 = 1101, P2 = 1001, P3 = 1000

Figure A.1: Arithmatic over binary field

30

Page 39: Network Coding with Limited Overhearing in Wireless Sensor

With coefficients (1,1,1) and (1,0,1), P1+P2+P3 = 1101 and P1+P2=0101can be formed. Since modulo 2 addition is similar to logical XOR operation itforms the basis to the XOR based simple network coding scheme, where packetsare simply XORed to form the combinations. Similarly due to the nature ofmodulo 2 arithmetic, given P1+P2 and either of P1 and P2, other one can beobtained with a simple XOR operation.

Linear Network Coding

Since GF(2) only contains two elements it restricts the use of XOR based net-work coding to certain scenarios. Finite fields with more elements can be usedto form many linear combinations, thus extending the applicability of the cod-ing scheme.

Considering packet vectors P1, P2 and P3 over GF(3)=0,1,2, for examplefollowing linear combinations can be formed.

C1 = P1 + 2P2 + P3

C2 = 2P1 + P3

Since GF(3) arithmetic is formed over modulo 3, in order to obtain the pack-ets a set of linear equations has to be solved.

In general, given a set of k equations, each combining k packets (linear com-bination of k packets), the problem of obtaining packets is similar to solving aset of k linear equations. In linear algebric terms in order to have a solution fora set of linear equations, they have to be linearly independent. Following is aninformal illustration of the idea of linear independence

Consider following two linear equations with packets P1 and P2 where coef-ficients are taken GF(5) =0,1,2,3,4

C1 = 1P1 + 2P2

C2 = 2P1 + 4P2

From basic algebra it is evident that these two equations cannot be solved.This is due to the fact that coefficient vectors (1,2) and (2,4) are linearly de-pendent, since 2(1,2) = (2,4).

In linear network coding, picking right coefficient vectors is crucial since theperformance of coding scheme depends on that. Even though in this researchcoefficient vectors can be statically allocated achieving linear independence, inmore complex distributed algorithms it is not trivial.

31

Page 40: Network Coding with Limited Overhearing in Wireless Sensor

Random Linear Network Coding

Random Linear Network Coding suggests to choose the coefficient vectors inrandom from a sufficiently large finite field. This is very important when con-sidering distributed algorithms, since each coding node can independently pickthese coefficients and perform coding, which would eventually lead to the de-sired goal of network coding. The finite field size has to be sufficiently large inorder to ensure that the receiving node can decode the coded packets.

32

Page 41: Network Coding with Limited Overhearing in Wireless Sensor

Bibliography

[1] Rudolf Ahlswede, Ning Cai, Shuo yen Robert Li, Raymond W. Yeung,Senior Member, and Senior Member. Network information flow. IEEETransactions on Information Theory, 2000.

[2] James Brown, Ben McCarthy, Utz Roedig, Thiemo Voigt, and Cormac J.Sreenan. Burstprobe: Debugging time-critical data delivery in wirelesssensor networks. In European Conference on Wireless Sensor Networks(EWSN), Bonn, Germany, February 2011.

[3] M. Buettner, G. V. Yee, E. Anderson, and R. Han. X-MAC: a short pream-ble MAC protocol for duty-cycled wireless sensor networks. In SenSys ’06:Proceedings of the 4th international conference on Embedded networked sen-sor systems, pages 307–320, Boulder, Colorado, USA, 2006.

[4] Ros G. Dimakis, Vinod Prabhakaran, and Kannan Ramch. Ubiquitous ac-cess to distributed data in large-scale sensor networks through decentralizederasure codes. 2005.

[5] A. Dunkels. The Contiki Operating System. Web page. Visited 2011-01-04.

[6] Adam Dunkels, Fredrik Osterlind, Nicolas Tsiftes, and Zhitao He. Software-based sensor node energy estimation. In Proceedings of the 5th internationalconference on Embedded networked sensor systems, 2007.

[7] Omprakash Gnawali, Rodrigo Fonseca, Kyle Jamieson, David Moss, andPhilip Levis. Collection Tree Protocol. In Proceedings of the 7th ACMConference on Embedded Networked Sensor Systems (SenSys’09), 2009.

[8] J. Hill, R. Szewczyk, A. Woo, S. Hollar, D. Culler, and K. Pister. Sys-tem architecture directions for networked sensors. In Proceedings of the 9thInternational Conference on Architectural Support for Programming Lan-guages and Operating Systems, November 2000.

[9] Tracey Ho, Muriel Medard, Ralf Koetter, David R. Karger, Michelle Effros,Jun Shi, and Ben Leong. A random linear network coding approach tomulticast. IEEE TRANS. INFORM. THEORY, 2006.

33

Page 42: Network Coding with Limited Overhearing in Wireless Sensor

[10] J. W. Hui and D. Culler. The dynamic behavior of a data disseminationprotocol for network programming at scale. In Proc. SenSys’04, Baltimore,Maryland, USA, November 2004.

[11] Sachin Katti, Hariharan Rahul, Wenjun Hu, Dina Katabi, Muriel Medard,and Jon Crowcroft. Xors in the air: practical wireless network coding.SIGCOMM Comput. Commun. Rev., 2006.

[12] Lorenzo Keller, Emre Atsan, Katerina Argyraki, and Christina Fragouli.SenseCode: Network Coding for Reliable Sensor Networks. Technical re-port, 2009. Latest update (July 2010).

[13] Fredrik Osterlind, Adam Dunkels, Joakim Eriksson, Niclas Finne, andThiemo Voigt. Cross-Level Sensor Network Simulation with COOJA. InProceedings of the First IEEE International Workshop on Practical Issuesin Building Sensor Network Applications (SenseApp ’06), 2006.

[14] J. Polastre, J. Hill, and D. Culler. Versatile low power media access forwireless sensor networks. In SenSys ’04: Proceedings of the 2nd interna-tional conference on Embedded networked sensor systems, pages 95–107,New York, NY, USA, 2004. ACM Press.

[15] Shuo yen Robert Li, Senior Member, Raymond W. Yeung, and Ning Cai.Linear network coding. IEEE Transactions on Information Theory, 2003.

34