• No results found

Network Coding with Limited Overhearing in Wireless Sensor Networks

N/A
N/A
Protected

Academic year: 2021

Share "Network Coding with Limited Overhearing in Wireless Sensor Networks"

Copied!
42
0
0

Loading.... (view fulltext now)

Full text

(1)

Network Coding with Limited Overhearing in Wireless Sensor Networks

KASUN SAMARASINGHE

Master’s Degree Project

Stockholm, Sweden

(2)
(3)

Network Coding with Limited Overhearing in Wireless Sensor Networks

Kasun Samarasinghe

May 10, 2011

(4)

Contents

1 Introduction 1

1.1 Motivation and Problem Statement . . . 1

1.2 Method . . . 2

1.3 Alternative Approaches . . . 2

1.4 Scientific Contribution . . . 3

1.5 Report Structure . . . 3

2 Background 4 2.1 Wireless Sensor Networks . . . 4

2.1.1 Energy Consumption in Wireless Sensor Networks . . . . 4

2.1.2 Low Duty Cycle Medium Access Control . . . 5

2.1.3 Performance Controlled Wireless Sensor Networks . . . . 5

2.2 Network Coding . . . 6

2.2.1 Wireless Network Coding . . . 6

2.3 Network Coding in Wireless Sensor Networks . . . 7

3 Design 9 3.1 Design Rationale . . . 9

3.1.1 Protocol . . . 9

3.1.2 Coding Scheme . . . 10

3.1.3 Performance Model for Binary Tree Topology . . . 10

3.2 Generalization . . . 12

3.2.1 Protocol for Three Node Topology . . . 12

3.2.2 Extension for General Topologies . . . 15

3.3 Implementation . . . 17

3.3.1 Coding Layer . . . 17

3.3.2 Packet Structure . . . 18

4 Evaluation 19 4.1 Experimental Setup . . . 19

4.2 Priliminary Experiments . . . 19

4.3 Experimental Analysis . . . 20

4.3.1 Three Node Binary Tree Topology . . . 20

4.3.2 Four Node Tree Topology . . . 24

(5)

4.3.3 General Tree Topologies . . . 26

5 Conclusions and Future work 28

A Mathematical Background for Network Coding 30

(6)

List of Figures

2.1 Application of Network Coding in a Unicast Scenario . . . 7 3.1 Three Node Topology and Corresponding TDMA Schedule for

Network Coding . . . 10 3.2 Naive Performance Model (Power Consumption) . . . 13 3.3 Naive Performance Model (Packet Reception Rate) . . . 13 3.4 Three Node Topology and Corresponding TDMA Schedule for

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

gies . . . 15 3.6 Linear Network Coding for longer Schedules . . . 15 3.7 Probability of Error Recovery for two and three child node topolo-

gies . . . 16 3.8 Application of Network Coding Independetly for two child nodes

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

view of GINMAC . . . 17 3.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 Reception

Rate . . . 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 Reception

less than 10% . . . 23 4.5 Improvement of Power Consumption with ACKs . . . 23 4.6 Analytical Model and Experimental Results for Power Consump-

tion for Packet Loss Probability for Optimized Packet Reception Behavior . . . 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

(7)

4.9 Analytical Model and Experimental Results for Packet Reception Probability . . . 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 Reception

Rate for the Generic Model . . . 27 A.1 Arithmatic over binary field . . . 30

(8)

Abstract

Network Coding as a recently emerged concept in Communication Networks Research, has attracted a lot of attention in networking research community.

Previous research on applying Network Coding in Wireless Sensor Networks, do not consider most crucial constraints inherent to sensor networks. Especially most of them assume overhearing of neighboring transmissions for free, which is unrealistic in practical sensor network environments where nodes have limited energy. Therefore these applications fail to make an impact on real world sensor network deployments. In some sensor networking scenarios it is possible to ma- nipulate overhearing in a controlled manner. In this research we apply network coding in to improve throughput of a Time Division Multiple Access(TDMA) based Medium Access Control(MAC) protocol called GINMAC , manipulating overhearing appropriately. Our results show that network coding can improve the throughput while trading off with other network performance characteristics like reliability and power consumption.

(9)

Chapter 1

Introduction

Wireless Sensor Networks (WSN) consist of devices capable of sensing environ- mental or physical quantities. These devices communicate with each other over wireless 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 power and energy. With the advances of research and development in WSNs, they have become widely applicable in areas ranging from conventional environmen- tal monitoring applications to applications consisting of smart objects connected to the Internet providing different services. Therefore WSNs attracts not only the communication networks research community but also various researchers from other Science and Engineering domains. With the inherent constraints on energy consumption, WSN research primarily focused on developing hard- ware and software to maximize the life time of an individual sensor node and in turn the whole network. Especially, since wireless communication accounts for a greater portion of energy consumption of a sensor node, network protocol design and implementation plays an important role in WSNs. Therefore many research 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 networks and information theory, which was introduced to improve the throughput and reliability of certain network topologies. As network coding has been employed in wireless networks to obtain promising results, several research focused on applying it in WSNs. Some of these research were theoretical extensions of network coding for certain WSN scenarios, which have limited resemblance to most of the popular WSN protocols. On the other hand several other research were based on assumptions which are unrealistic in WSNs. For example they assume that nodes always have their radio on for overhearing. Therefore a

(10)

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

1.2 Method

In this study we apply network coding for a data collection protocol [2], which is one of the fundamental operations in WSNs. Data collection is done forming a 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 based on a Medium Access Control (MAC) protocol based on Time Division Multiple Access (TDMA) named GINMAC. This is an important property when incorpo- rating network coding, since each node share the knowledge on medium access of each other. We introduce limited amount of overhearing in the MAC layer using this property and perform network coding to reduce the delay while main- taining a similar level of reliability. Compared to the feedback error correction mechanism employed in GINMAC, our approach can be viewed as a forward error correction scheme. This is because our approach does not perform re- transmissions based on receiver’s acknowledgments, where as GINMAC relies on acknowledgements when retransmitting.

When applying network coding encoding and decoding is a key concern. An encoding scheme decides how to combine two or more packets whereas decoding scheme performing the reverse of encoding operation. Random linear network coding [9] suggests probabilistic encoding algorithm, which needs costly com- putation, specially in resource constrained sensor nodes. Computationally light weight 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 XOR operation. Our approach uses XOR operations for encoding and decoding.

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

1.3 Alternative Approaches

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

(11)

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

1.4 Scientific Contribution

This research primarily focused on applying network coding in practical WSN scenario. 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 the delay. 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 additional energy consumption incurred by overhearing and comparatively analyzed the gains of network coding. Even though we base and analyze our approach on GINMAC, which is a TDMA protocol with static medium access behavior, this would encourage to investigate overhearing costs in contention based MAC pro- tocols too. We propose that, with limited overhearing wireless sensor network protocols can exploit the broadcast behavior of wireless medium, which is useful in cooperative communication context. Furthermore we evaluate our approach both 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 to present some insight into the difficulty of applying network coding in current WSN MAC protocols. This will be followed by an introduction to network cod- ing and summarization of research attempts to apply network coding in sensor networks. Design of the protocol and corresponding background for certain de- sign criterion will be presented in Chapter 3, followed by an overview of the implementation of our protocol. Evaluation of experimental results will be pre- sented in Chapter 4, where as a discussion of conclusions and future work will be in Chapter 5.

(12)

Chapter 2

Background

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

2.1 Wireless Sensor Networks

Wireless Sensor Network is a set of devices capable of sensing physical quantities like environmental properties, which also can communicate with each other over wireless links. Inherently these devices are constrained in processing power, memory and energy. Therefore operating and system software are designed to meet these constraints. Contiki [5] and Tiny OS [8] are two operating systems widely 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 most commonly applicable patterns in sensor networks are data collection and data dissemination. In data collection protocols, geographically distributed sensors report their sensor reading to a central collection point. Most common approach is 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, where it spreads information from a central node to all the nodes in the network. This is another common communication pattern in scenarios like disseminating code updates [10] to the network in order to maintain the network with out human intervention

2.1.1 Energy Consumption in Wireless Sensor Networks

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

(13)

the network protocol implementations are designed to meet these requirements.

In general radio communication is an energy consuming operation in any radio communicating device including sensor nodes. Especially in sensor nodes with stringent energy requirements, communication protocol design should focus on the energy efficiency while trading off with performance characteristics. There- fore substantial amount of research devoted to, analysis of energy consumption in 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 medium access of a sensor node. This is done by controlling the radio device driver accordingly. Since radio communication is the main consumer of a sensor node’s energy, MAC protocol plays a crucial role in energy consumption of a sensor node. Therefore research on energy efficient MAC protocols is an interesting research area in WSNs. Duty cycling is one of the primary mechanisms used in WSNs to achieve low energy consumption. This approach controls the radio transceiver of a sensor node cycling its state between sleep and awake states.

Duty cycling introduces the challenge of achieving higher throughput and low latency given the nodes in the network switching between sleep and awake states.

B-MAC and X-MAC are two widely implemented MAC protocols published in [14] and [3], where B-MAC is the default MAC protocol in TinyOS where as Contiki. B-MAC relies on the concept of low power listening where a node sends a preamble which is at least as long as the sleep period of a node. A receiver of the preamble switches on its radio and listen to the subsequent data transmission by the sender. Since any node who receives a preamble wakes up and start listening, unintended receivers unnecessarily listen to neighboring transmissions.

X-MAC proposes to improve energy efficiency of low power listening by further improving certain aspects of it. It introduces sending a series of short preambles instead of a single long one, including the target address thus by avoiding the problem of overhearing. These two protocols are experimented and verified for its energy efficiency and therefore implemented widely in most practical sensor network deployments.

2.1.3 Performance Controlled Wireless Sensor Networks

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

(14)

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

2.2 Network Coding

In its seminal work [1], Network Coding was introduced as an utility to improve the throughput of a multicast traffic flow in a wired network. It proposed the fundamental idea of mixing packets in an intermediary node in the network, thus it will not only replicates the packets but also encode them according to a particular scheme. They modeled the network in graph theoretic notation, representing network nodes as vertices and network links as edges. Information sources are associated with nodes, which are capable of transmitting information in a certain rate which is called the entropy rate of the source. The edges of the graph are weighted with the associated capacity of the link in terms of bits per second. Then the problem of Network Coding is formulated with regard 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 is equivalent to the minimum cut, which is the separation between the source and the sink of a particular flow with minimum cumulative edge weights (channel capacity in information flow). In terms of the above problem formation they prove that, Network Coding can achieve the maximum information flow of a multicast network, hence improving the throughput of the network.

Subsequently in [15], they proved that a linear combination of packets [see Appendix] can also achieve the maximum throughput of the multicast network.

A linear combination is formed using a coefficient vector multiplied by a packet vector, 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 taken from a sufficiently large finite field. In general these developments suggested network 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 inherent wireless communication characteristics into account. This work applies the Net- work Coding in an unicast traffic flow scenario proposing a protocol which can be integrated into the network stack. Apart from being the first approach to apply network coding in practice, the distinguishing idea is to use the shared wireless medium and exploit the packets which are not intended to a node while

(15)

(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 neighboring transmissions and collect packets to encode and transmit accordingly. This is a desirable idea for wireless networks without strict energy constraints in the nodes. This idea is illustrated in the Figure 2.1 below.

Node A wants to transmit a packet P a to Node B and Node B wants to transmit packet P b to node A via the relay node R as depicted in Figure 1. In the general relaying setting Node A transmits P a and Node R relays it to be reaching B with two transmissions. P b to reach A costs the same number of transmission adding up the total number of transmissions to 4. In the Network Coding setting, Node R can perform a simple XOR operation on the two packets instead of just relaying the transmission and then broadcast the packets. Once Node A and Node B receive the XORed packet, they can decode the packets intended to be received by them. Thus with the simple XOR based network coding scheme saves a single transmission improving the throughput of the network for the above communication setting. The protocol COPE, proposed based on the above illustrated idea, was evaluated on a wireless network setup and for different 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 consider n nodes as storage nodes which needed to be queried to collect data, while k nodes generating data. A decentralized erasure coding approach is employed, where they diffuse k data packets among n nodes at random. At each storage node Random Linear Network Coding is performed on each received data packet where they pick coefficients from a sufficiently large finite field and constructing linear combinations of packets. A collector node contact any sub set of k nodes and perform the decoding of native packets. Since energy and storage capabili- ties are main concerns in WSNs they establish a minimum requirement for the number of storage nodes needed for a successful decoding at the collector. In

(16)

this approach they use Network Coding to achieve reliable data storage specif- ically in node failures. While distributed nature of this approach suits WSN data gathering it does not address the multi-hop nature of WSNs which might not 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 tree topology 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 to the sink in collection tree. They assume that, a node cannot only overhear its child’s transmissions but also several other neighboring transmissions, thus by introducing logically redundant flows from a given sensor node redundantly.

Network coding is performed on the packets it overhears, based on a finite field of size 16 which has a higher probability of successful decodability. They compare their protocol with a variant of CTP which improved for reliability. Simulation results shows that network coding approach with different redundancy levels (i.e Number of packets injects to the network by a node) improves the reliability of CTP protocol. They discuss overhearing and effect of different amounts of overhearing on reliability. Even though, since overhearing is not geared in MAC layer, they do not consider overhearing from an energy perspective.

(17)

Chapter 3

Design

In this chapter we build up the relavant arguments to form the design of our approach. 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 optimize the time radio hardware operates, turning off the radio communication as much as possible. This is not a favorable property when applying network coding, since network coding may rely on overhearing neighboring transmissions. As described in chapter 2, GINMAC employs a TDMA schedule with global time synchronization. Therefore each node knows each others medium access sched- ule, hence providing room for a network coding scheme. Exploiting this we introduce limited overhearing in GINMAC TDMA schedule in order to perform an 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 a simple binary tree with three nodes as illustrated in Figure 3.1a. Applicability of this scheme for larger trees will be discussed later in the chapter.

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

(18)

(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 bound of the delay increases.

Main motive of applying network coding in this scenario is to compress the basic GINMAC TDMA schedule ensuring better delay performance. This is fa- vorable in WSN deployments which implement control feedback loops with small delay bounds. Power consumption and packet reception rate considered as the performance 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 a data packet in order to be used in the coding. Coding is done by performing an XOR operation on the overheard packet and its native packet. With respect to 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 packet containing Pa⊗Pb. A Transmitting node does not wait for the acknowledgement (ACKs) from the recipient. As demonstrated in the Figure 3.1b (left) node A and B together perform three transmissions (third transmission is denoted as RTX), if overhearing of the packet was successful. This scheme can recover one packet loss when the coded packet receives the root along with another native packet. Decoding is simple as the encoding where an XOR operation with the coded packet and one of the native packets recovers the lost packet. This scheme can be considered as a forward error recovery scheme since it does not rely on ACKs.

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.

(19)

To study the impact of network coding compared to GINMAC, we formulate a performance model. We start with a naive model which captures the most fundamental behavior of two protocols providing the grounding to build up a more 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 denote Erxas the power consumed during a packet reception. This model assumes that the receiving node turns on their radio during the whole slot period without fur- ther optimizations. Furthermore it assumes that the parent node avoid listening during the retransmission slots if the earlier transmissions were successful.

We calculate power consumption based on a energy estimation model build for 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 Etxpower consumption for a single transmission. As the first performance model, here we capture the most basic behavior of both the protocols in terms of receiving slots (RTX). We assume that receiving nodes, stop listening when the basic transmission was successful in both GINMAC and Network Coding.

This model does not exactly relates to an implementation, rather hold as a benchmark.

We calculate the expected number of transmissions (denoted by E[.]) and receptions based on the simple packet loss model and derive the power con- sumption for a single node in GINMAC as below. Similarly expected number of 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]N C = 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]N C = 2 × P[two receptions performed]

+3 × P[three receptions perfomed]

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

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

(20)

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

P C =

 2(1 + p)Etx+ 2(1 + p)Erx GIN M AC (2(1 − p(1 − p)2))Etx+ 2(1 + p(1 − p))Erx N C

With the estimated values of 0.15 mW for Erxand 0.034 mW for Etx, corre- sponding graph is illustrated in Figure 3.2 for both protocols. Packet Reception Rate(PRR) at the parent can be expressed in the following equation while the corresponding 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 approach reduces the redundancy and hence the reliability, compared to GINMAC. We study this trade-off analyzing the Packet Reception Rate (PRR) in both ap- proaches. Packet Reception Rate (PRR) is defined to be the probability of a packet being reached it’s parent node, within the allocated time slots, including the retransmission slots.

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

When GINMAC has one additional transmission slot, the probability of packet not being received by the parent node is p2resulting the following PRR.

In network coding packet can reach the parent either by succeeding its basic transmission with a probability of 1 − p or allowing the parent node to recover even 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.

P RR =

 1 − p2 GIN M AC

(1 − p) + p(1 − p)3 N C

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 scheme would 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 compression in the schedule while maintaining the performance metrics up to desired levels.

We apply the above protocol for a subtree with three child nodes as depicted in the Figure 3.4 to study the extendability of this approach. Corresponding TDMA schedule illustrated in Figure 3.4b that network coding compress the GINMAC schedule by two time slots which is a 30% improvement with respect to 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

(21)

0 0.2 0.4 0.6 0.8 1

0 0.2 0.4 0.6 0.8 1

Power Consumption (mW)

Packet Loss Probability GINMAC

With 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

Packet Reception Rate

Packet Loss Probability Without NC

With NC

Figure 3.3: Naive Performance Model (Packet Reception Rate)

(22)

(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 transmissions are successfuly overheard it can send Pa⊗ Pb⊗ Pc, whereas it would only send a combination of two packets if it overhears only one packet. For example when only Pb is overheard it would send Pb⊗ Pc.

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

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

Decodability relates to the PRR as below.

P RR = 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 parent node. 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 topologies compared to the basic retransmission scheme. As it shows, network coding per- forms bad in both the topologies compared to the basic retransmission scheme.

(23)

0 0.2 0.4 0.6 0.8 1

0 0.2 0.4 0.6 0.8 1

Probability of Error Recovery

Packet Loss Probability Basic Retransmissions NC with 2 child nodes NC 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 schemes rely 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 for different 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 schedule length to 2n

Following the same rational for two child node topology, network coding can be applied to compress the length of the GINMAC schedule. The most basic coding scheme is to extend the two node model to all the child nodes. During retransmission slots node sends different linear combination of the packets it has. 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 of linear equations. In order to decode, these linear combinations has to be linearly independent. In a carefully deployed protocol like GINMAC, it can configure the nodes such a way that linear independence hold. In this scenario, compared to the corresponding GINMAC schedule which uses 2n slots, network coding

(24)

0 0.2 0.4 0.6 0.8 1

0 0.2 0.4 0.6 0.8 1

Probability of Error Recovery

Packet Loss Probability n=2 m=1 n=3 m=1 n=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

X

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 retransmission slots decodability reduces. Especially when the packet loss probability is less than 10%, decodability degrades. This is due to the fact that coding requires overhearing of four packets and decoding requires three of them to be reached at the parent. Therefore when the number of native packets in a coded packets increases, performance of the coding scheme degrade in terms of packet reception rate.

Based on the argument of decodability it is better to decompose a general topology 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 time rather than applying it to more than two nodes at once. An example of this scheme for a four node topology is illustrated in Figure 3.8. It compresses the schedule by 75% times while maintaining comparatively reasonable amount of reliability.

(25)

(a) Five Node Topology (b) TDMA Schedule

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

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

3.3 Implementation

3.3.1 Coding Layer

In Wireless Sensor Networks there are no rigid boundaries between different layers in the networking stack. Therefore most applications interact back and forth with the underlying MAC and Networking layers. Network Coding imple- mentation in this research followed the same reasoning and implemented as a different layer between Network and MAC layers. A schematic representation of the implementation of network coding protocol in GINSENG can be found in 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 layer maintains an overhearing buffer to temporarily store packets overheard from its neighboring transmissions. Encoding and decoding algorithms are implemented in this layer. In Encoding, coding layer gathers appropriate packets overheard in the buffer and perform the coding of packets. Similarly decoding performs when coded packets are received.

(26)

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 parameters incorporated into the packet structure. These parameters are added to the existing GINMAC packet in the form of an additional header field called the coding header. The additional coding header added to the packet is illustrated in the Figure 3.10. Coding header encapsulates the information needed to decode a coded packet. As depicted in the Figure 3.10, ”No of Native Packets” field carries the number of native packets in the coded packet. In order to identify these packets uniquely we add sequence numbers and source addresses of the native packets. Therefore depending on the native packets encoded, coding header length increases, since it should include all the native packet details.

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

(27)

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 loss probability, which is the desired environment for our experiments. Since packet loss probability is the only stochastic property present in the experimental en- vironment, we consider a sample time of around 50 seconds and performed the experiment 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 during a given time slot. Real behavior of the power consumption during a time slot deviates 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 it reads from the radio and send the acknowledgement. Therefore the time radio is on, is a fraction of the slot time. Furthermore, GINMAC’s radio driver detects the packet losses performing the Cyclic Redundancy Check (CRC) and if the packet is erroneous it turns off the radio.

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

(28)

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.064

Errorneous Packet Reception 17 0.031

Transmission 19 0.034

and power consumption. We denote a power consumption for a normal packet reception with Enp in network coding protocol and with Enpg in GINMAC.

Furthermore Eepdenotes the power consumption for an erroneous packet, while Etx 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 basic GINMAC protocol which does not turn off the radio even if the packet received successfuly. Power consumption for transmissions in GINMAC can be stated as below.

P Ctransmissions = E[transmissions] × Etx

= 2(1 + p)Etx

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

P Creceptions = 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.

P Ctransmissions = E[transmissions] × Etx

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

= (3 − p)Etx

P Creceptions = E[successful receptions] × E[power consumption per reception]

+E[failed receptions] × Eep

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

(29)

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

Power Consumption (mW)

Packet Loss Probability With NC Without 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

Power Consumption (mW)

Packet Loss Probability With NC Without 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.

P C =

 2(1 + p)Etx+ 2(1 − p2)(Enpg+ Eep) + 2p2Eep GIN M AC (3 − p)Etx+ (3 − p)((1 − p)Enp+ pEep) + pEep N C

Note that the above derivations are followed in different variations of the model 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 the conditional probability.

P RR = P (native packet being reached parent) + + P (Decodability|native packet being lost) Accordingly for three node topology PRR is expressed as below.

P RR =

 1 − p2 GIN M AC

(1 − p) + p(1 − p)3 N C

Figure 4.2a illustrates the corresponding analytical graphs while Figure 4.2b illustrates 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 more redundancy to the network while network coding reduces that amount. Espe- cially when the packet loss probabilities are higher network coding performance degrades due to the cooperative nature of network coding. In other words due to the high packet loss probability, probability of decodability degrades affecting negatively on the PRR for network coding.

(30)

0 0.2 0.4 0.6 0.8 1

0 0.2 0.4 0.6 0.8 1

Packet Reception Rate

Packet Loss Proabability Without NC

With NC

(a) Analytical Model

0 0.2 0.4 0.6 0.8 1

0 0.2 0.4 0.6 0.8 1

Packet Reception Rate

Packet Loss Probability Without NC

With NC

(b) Experimental Results

Figure 4.2: Analytical Model and Experimental Results for Packet Reception Rate

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

Power Consumption (mW)

Packet Loss Probability With NC Without 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

Power Consumption (mW)

Packet Loss Probability With NC

Without NC

(b) Experimental Results

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

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

According to both analytical and experimental results in Figure 4.4, PRR remains same for both GINMAC and network coding. Power consumption per- forms bad compared to GINMAC in network coding mainly due to ACKs not being 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 it would provide complete knowledge on packet receptions at the parent node, thus allowing the overhearer only to send the lost packet. This optimization cannot be implemented in GINMAC due to the fact that GINMAC uses hard-

(31)

0 0.2 0.4 0.6 0.8 1

0 0.02 0.04 0.06 0.08 0.1

Packet Reception Rate

Packet Loss Probability Without NC

With 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

Packet Reception Rate

Packet Loss Probability Without NC

With NC

(b) Experimental Results

Figure 4.4: Analytical Model and Experimental Results for Packet Reception less 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

Power Consumption (mW)

Packet Loss Probability NC without ACK

NC with ACK

Figure 4.5: Improvement of Power Consumption with ACKs

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

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

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

P C =

 2(1 + p)Etx+ 2p2Eep+ 2((Enpg+ Eep)p(1 − p) + Enpg(1 − p)) GIN M AC (3 − p)Etx+ (4 − (1 − p)2)((1 − p)Enp+ pEep) + pEep N C Both analytical and experimental results for above optimization is plotted in Figure 4.6. It is evident that both protocols improves in power consumption with this optimization.

(32)

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

Power Consumption (mW)

Packet Loss Probability Without NC

With 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

Power Consumption (mW)

Packet Loss Probability With NC Without NC

(b) Experimental Results

Figure 4.6: Analytical Model and Experimental Results for Power Consumption for 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

Power Consumption (mW)

Packet Loss Probability With NC Without 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

Power Consumption (mW)

Packet Loss Probability With NC Without NC

(b) Experimental Results

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

4.3.2 Four Node Tree Topology

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

P C =

 3(1 + p)Etx+ 3((1 − p2)(Enp+ Eep) + 2p2Eep) GIN M AC (4 − p2)Etx+ (4 − p)((1 − p)Enp+ pEep) + pEep N C

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

(33)

0 0.1 0.2 0.3 0.4 0.5

0 0.02 0.04 0.06 0.08 0.1

Power Consumption (mW)

Packet Loss Probability With NC Without 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

Power Consumption (mW)

Packet Loss Probability With NC Without NC

(b) Experimental Results

Figure 4.8: Analytical Model and Experimental Results for Power Consumption for 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

Packet Reception Rate

Packet Loss Probability Without NC

With NC

(a) Analytical Model

0 0.2 0.4 0.6 0.8 1

0 0.2 0.4 0.6 0.8 1

Packet Reception Rate

Packet Loss Probability Without NC

With NC

(b) Experimental Results

Figure 4.9: Analytical Model and Experimental Results for Packet Reception Probability

the retransmission packet if overhearing takes place, consuming unavoidable amount 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 the similar assumptions on the radio environment.

P RR =

 1 − p2 GIN M AC

(1 − p) + p(1 − p)5+ 4p2(1 − p)2 N C

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

(34)

0 0.2 0.4 0.6 0.8 1

0 0.2 0.4 0.6 0.8 1

Power Consumption (mW)

Packet Loss Probability n=4 m=2 n=3 m=2 n=3 m=1 n=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

Power Consumption (mW)

Packet Loss Probability n=4 m=2 n=3 m=2 n=3 m=1 n=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 can be extended to a general topology with n child nodes and m retransmission slots. We model the power consumption and packet reception rate considering the 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 expressed as below according to the notation introduced in section 4.2.

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

P RR = (1−p)+p(1−p)

n−2

X

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 become longer with multiple retransmission slots power consumption increases. Since analytical results matches experimental results closely, resembles the accuracy of the generic model for power consumption.

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

Important observation here is that, when the schedule gets longer and the coded packet contains more native packets packet reception rate performance degrades. This is due to the number of packet a give node has to overhear is high and hence probability of decodability being less. Therefore when extending the 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.

(35)

0 0.2 0.4 0.6 0.8 1

0 0.2 0.4 0.6 0.8 1

Packet Reception Rate

Packet Loss Probability n=2 m=1 n=3 m=1 n=3 m=2 n=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

Packet Reception Rate

Packet Loss Probability n=2 m=1 n=3 m=1 n=4 m=2

(b) Experimental Results

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

(36)

Chapter 5

Conclusions and Future work

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 different from conventional communication networks, network coding applications can- not be adapted in WSNs. Additionally with the inherent constraints in WSN environment does not permit manipulating certain key assumptions in network coding.

In this research network coding applies to a data collecting tree topology which is layered on top of a Medium Access Protocol called GINMAC. Distin- guishing feature in GINMAC compared to the other MAC protocols in WSNs is that 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 like retransmission scheme in order to achieve the required amount of overhearing.

Other than the reliability GINMAC pays attention on delay requirements where it tries to ensure a bounded delay. Main motivation of applying network coding in this scenario is to improve the throughput of GINMAC. In other words net- work coding applied across the time schedule compressing the number of slots allocated in GINMAC to a lesser number of slots. It employs a simple XOR based coding scheme for encoding and decoding packets. We use the global knowledge available in GINMAC TDMA scheme to apply limited amount of controllable overhearing which is one of the unique contributions of our work.

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

(37)

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

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

(38)

Appendix A

Mathematical Background for Network Coding

Finite Fields

In general terms network coding is based on abstract algebraic structures called finite 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 of arithmetic operations which comply with commutative, associative and distribu- tive lows of algebra. Finite Field is also called as a Galois field and denote as either Fq or GF (q) where q is the number of elements of the field and following q = pn for any prime number p.

Finite Field of size two can be defined with elements 0 and 1. Arithmetic operations + 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 coefficients chosen from GF(2).

Considering following three packets P1, P2and P3 in their binary form;

P1= 1101, P2= 1001, P3= 1000

Figure A.1: Arithmatic over binary field

(39)

With coefficients (1,1,1) and (1,0,1), P1+P2+P3 = 1101 and P1+P2=0101 can be formed. Since modulo 2 addition is similar to logical XOR operation it forms the basis to the XOR based simple network coding scheme, where packets are simply XORed to form the combinations. Similarly due to the nature of modulo 2 arithmetic, given P1+P2 and either of P1 and P2, other one can be obtained 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 used to 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 example following 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 a set of k linear equations. In linear algebric terms in order to have a solution for a set of linear equations, they have to be linearly independent. Following is an informal illustration of the idea of linear independence

Consider following two linear equations with packets P1and P2where 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 the performance of coding scheme depends on that. Even though in this research coefficient vectors can be statically allocated achieving linear independence, in more complex distributed algorithms it is not trivial.

(40)

Random Linear Network Coding

Random Linear Network Coding suggests to choose the coefficient vectors in random from a sufficiently large finite field. This is very important when con- sidering distributed algorithms, since each coding node can independently pick these 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 in order to ensure that the receiving node can decode the coded packets.

References

Related documents

organisationen är många arbetsuppgifter sammansatta och komplexa och därför är det inte möjligt för en medarbetare att vara bra på alla delar i processen, därför finns behovet av

In this study, we aim to analyse the rate and the physician-documented indications, primary and secondary, for caesarean sections performed on patients in TGCS groups 1 and 2,

In this paper, I will have my starting point of view based on the decision tree for determining appropriate coding structure, which has been published by Davis [2] (see Figure 1).

The current implementation allows the user to trigger sending of a synchronization message, which we used to send these messages based on HMAC configuration and which phase the

x Gateway selection and handover decision based on the analysis of network- layer metrics. x Deploying multihomed mobility into global connectivity networks. x Maintenance of

In our design, the direct transmission (directly transmitting between source and destination) is allowed when the channel condition is better than the other channels

Denna rapport utgör slutrapport för Swerea SWECASTs forskningsprogram ”Energieffektiv gjutning” och för administrationsprojektet 1833 ”Samordning, teknikspridning

The work in this thesis is built on the following hypothesis: It is possible to develop a wireless medium access control protocol using IEEE 802.11 hardware that provides access to