• 沒有找到結果。

利用網路編碼增進網格網路的效能

N/A
N/A
Protected

Academic year: 2021

Share "利用網路編碼增進網格網路的效能"

Copied!
66
0
0

加載中.... (立即查看全文)

全文

(1)

網路工程研究所

利 用 網 路 編 碼 增 進 網 格 網 路 的 效 能

Performance Improvement by Network Coding on Grid

Network

研 究 生:甘効原

(2)

利用網路編碼增進網格網路的效能

Performance Improvement by Network Coding on Grid Network

研 究 生:甘効原 Student:Hsiao-Yuan Kan

指導教授:易志偉 Advisor:Chih-Wei Yi

國 立 交 通 大 學

網 路 工 程 研 究 所

碩 士 論 文

A Thesis

Submitted to Institute of Network Engineering College of Computer Science

National Chiao Tung University in partial Fulfillment of the Requirements

for the Degree of Master

in

Computer Science

November 2008

(3)

利用網路編碼增進網格網路的效能

學生:甘効原 指導教授:易志偉

網路工程研究所

國立交通大學

摘要

近年來無線隨意繞徑協定開始利用地理資訊在大型的無線隨意網路中進行繞徑。 其中一個廣為人知的地理資訊繞徑協定-網格繞徑協定-目前已有許多的應用 架構於此之上。然而,隨著科技的進步和裝置價格越來越便宜,使得一個裝置將 同時負責越來越多的工作,以及無線隨意網路的裝置密度會越來越高,如此會造 成無線網格網路負載將越來越重,因此如何增進無線網格網路傳輸效能將會是一 個重要的議題。有人提出一個技術-網路編碼,網路編碼主要用來增進網路傳輸 效能、網路頻寬等。由於網格網路有多點傳播和路徑分岔的特性,所以網路編碼 適用於網格網路之中。 在此篇論文中,我們利用網路編碼演算法- XOR 編碼演算法,建構於貪婪網格繞 徑協定上面-來增進網格網路的傳輸效能。我們假設網格網路中,每個節點在每 個時間槽會以某個機率產生封包,並以隨機媒體存取控制(Random MAC)的方式單 點傳播封包。每個封包的容量一樣而且來源點和目的點都是均勻分布在網格網路 中。在網格網路達到穩定狀態的模擬實驗中(執行 500000 時間槽),XOR 編碼演 算法可以增進網格網路吞吐量 74.0%,點對點延遲 55.7%。當節點緩衝存儲器儲 存容量小於 30 個封包量時,儲存容量對網格網路的吞吐量有明顯的改變,但超 過 30 個封包後,增加儲存容量對吞吐量的影響即不顯著。在經過一系列的各種

(4)

不同的網路環境實驗模擬和分析後,我們可以得到以下結論:在網格網路中使用 網路編碼傳遞封包時,不但可以增加網路吞吐量並且可以降低點對點延遲。在未 來我們將會對這作相關的理論分析,並把網路編碼應用到三角形和六角形等網路 拓墣,以了解網路編碼和網路拓撲的關係。 關鍵字 網格網路,網路編碼,XOR 編碼,效能增進。

(5)

Performance Improvement by Network

Coding on Grid Networks

Student: Hsiao-Yuan Kan

Advisor: Dr. Chih-Wei Yi

Institute of Network Engineering

National Chiao Tung University

Abstract

In the recent years, geographic information is exploited for routing in large scale ad

hoc networks. One of most famous geographic-based routing protocol, GRID routing,

is applied to many applications nowadays. Moreover, with the advance of information

technology and cost down in wireless devices, each device can take many more tasks

and the device density becomes even denser than before. As, the traffic load becomes

heavier and heavier, and how to efficiently utilize the limited wireless resource

becomes the most important issue. Recently, a novel technique, network coding, is

proposed to improve network throughput and bandwidth. Due to the broadcast nature

and path diversity of wireless networks, network coding is applicable to grid

networks.

In this thesis, to improve the throughput of grid network, a network coding

algorithm, XOR encoding, is exploited in the grid networks with greedy grid routing.

(6)

packets followed Random MAC model in the grid network. Each packet has the same

size, and the source and destination pairs are randomly chosen and distributed

uniformly over the grid network. Under the stable state run for 500000 time slots, the

XOR encoding algorithm improves network throughput and end-to-end delay about

74.0% and 55.7%, respectively. Meanwhile, the network throughput increases when

the buffer size is smaller than 30 and slows down when the buffer size exceeds 30. As

a summary of the series simulation analyses, it can be concluded that the network

coding can both increase network throughput and reduce end-to-end delay for the grid

network under different network environments. In the future, we will do some

theoretical analysis of grid networks with network coding and exploits network

coding to delauney network, hexagonal network, etc. to know the relationship

between network topologies and network coding.

Keywords

(7)

Contents

1 Introduction 1

1.1 Background of Wireless Ad Hoc Network . . . 1

1.2 Motivation of Thesis and Simulation Environment . . . 2

1.3 Main Results and Organization . . . 6

2 Related Work 8 2.1 Background of Grid Network . . . 8

2.2 Trac Load of Grid Cell . . . 13

2.3 Background of Network Coding . . . 14

3 Network Coding Algorithm and Implementation 18 3.1 XOR Coding Algorithm . . . 18

3.2 Network Model and Assumptions . . . 24

3.3 Network Coding Implementation . . . 26

4 Simulation Analysis 31 4.1 Simulation Settings and Scenarios . . . 31

4.2 Distribution of Trac Load of Grid Cell . . . 33

4.3 The Impact of Packet Generating Rate . . . 36

(8)

4.3.2 Packet Loss . . . 39

4.3.3 End-to-End Delay . . . 42

4.4 The Impact of Buer Size . . . 44

4.4.1 Packet Loss . . . 45

4.4.2 Throughput . . . 47

(9)

List of Figures

1.1 Alice and Bob scenario . . . 4

2.1 Neighboring cells of cell 1 and neighbor nodes of node a. . . 10

2.2 (a) Routing table utilizes grid IDs to route packets and this oers more re-silient route maintenance. (b) GRID routing protocol has highly rere-silient for node mobility, because a new leader takes over the relaying jobs when the current one wanders out of the grid. . . 11

2.3 Trac distribution over celss for 60 × 60 grids . . . 14

2.4 Buttery example . . . 15

3.1 Let the primitive packets to be encoded maximal numbers in each transmis-sion. . . 23

3.2 Flow chart of transmitter side for encoding. . . 27

3.3 Flow chart of receiver for decoding. . . 29

3.4 Flow chart of transmitter side for ACK. . . 30

4.1 Distribution of number of times for transmission using Unicast. . . 34

4.2 Distribution of number of times for transmission using XOR coding algorithm. 35 4.3 Packet generating rate v.s. Throughput . . . 37

4.4 Packet generating rate v.s. Packet loss . . . 39

(10)

4.6 Packet generating rate v.s. End-to-End delay . . . 42

4.7 Buer size v.s. Packet loss (at arrival 0.0333 packet/time slot) . . . 45

4.8 Buer size v.s. Packet loss (at arrival 0.0167 packet/time slot) . . . 45

4.9 Buer size v.s. Packet loss (at arrival 0.0083 packet/time slot). . . 46

4.10 Buer size v.s. Throughput (with packet generating rate 0.0333) . . . 47

4.11 Buer size v.s. Throughput (with packet generating rate 0.0167) . . . 48

(11)

List of Tables

4.1 Simulation parameters with 500000 primitive packets. . . 34

4.2 Simulation parameters in 500000 time slot. . . 36

4.3 Average throughput and ratio of throughput in XOR coding algorithm to that in Unicast.(Saturation point indicates packet generating rate 0.014286 at the

maximal throughput in the curve of the XOR coding algorithm.) . . . 37

4.4 Average number of primitive packets in the buer. (Saturation point is max-imal throughput in the curve of the XOR coding algorithm at packet

gener-ating rate 0.014286.) . . . 37

4.5 Ratio of packet loss caused by buer overow to total packet loss. . . 40

4.6 Average end-to-end delay and ratio of that in XOR coding algorithm to that in Unicast. (Saturation point indicates packet generating rate 0.025 at the

maximal end-to-end delay in the curve of the XOR coding algorithm.) . . . 42

4.7 Average number of primitive packets in the buer. (Saturation point indicates packet generating rate 0.025 at the maximal end-to-end delay in the curve of

the XOR coding algorithm.) . . . 42

4.8 Simulation parameters in 500000 time slot. . . 44

4.9 Decrease of packet loss by increase of per buer size. . . 46

4.10 Ratio of throughput increase in buer size 30 (or 80) to that in buer size 10

(12)

Chapter 1

Introduction

1.1 Background of Wireless Ad Hoc Network

With the advance of the communication technology, the Internet is popular around the world and plays a more and more important role in our daily lives. In the traditional network, computers communicate with each other using a wire link through routers or end systems, and must be located in xed positions due to lack of mobility. In the past, when people wanted to access the Internet, they had to nd xed locations equipped with computers, but it was considered very inconvenient. Hence, in recent years, researchers invented wireless devices and developed wireless network, which can be generally categorized as infrastructure wireless network and ad hoc network, namely independent basic service set network.

Three components involve in the infrastructure wireless network: access point, wireless distribution system and mobile node. Mobile nodes access the Internet with wireless medium through access points which act like bridges, and an access point can only serve mobile nodes, which are its one-hop neighbors. Thus, devices within the service range of an access point form a small wireless network, namely a basic service set with a unique ID. Wireless

(13)

distribu-networks, so that a mobile node can communicate with other mobile nodes in other basic ser-vice sets or computers in the Internet through wireless distribution systems. In other words, wireless distribution systems can extend a basic service set to many other systems, and the so-called extended service set, also has a unique ID. However, the infrastructure network has a major drawback, which is its poor survivability. Once an access point is destroyed in any articial or natural manner, such as by typhoon, earthquake, power failure and so on, the mobile nodes would be unable to communicate with others, and consequently the basic service set served by it would be paralyzed. In view of this, an ad hoc network does not require a base station, in other words, it does not contain any component acting as an access point. Thus, it has more survivability than the infrastructure network.

An ad hoc network, contrary to a infrastructure network, is a self-organized network without the aid of any infrastructure. Ad hoc nodes, dierent from the devices in the traditional wire network or the infrastructure wireless network, have mobility and act both as routers and end systems, and the topology changes frequently due to the mobility of ad hoc nodes. Two ad hoc nodes can directly communicate with each other if they are within the transmission range of each other, but they can still communicate with the aid of intermediate nodes while they are not. Moreover, an ad hoc network can be formed by itself and has good survivability as compared to a infrastructure wireless network. Because of the frequent changes in the network topology due to the movement of ad hoc nodes, the strategy of routing protocols in the ad hoc network, unlike that of the wire network and the infrastructure wireless network, has a great impact on the performance and is extensively studied by the researchers in recent years.

1.2 Motivation of Thesis and Simulation Environment

In recent years, there are many proposed routing protocols, which can be categorized into topology-based and geographic-based routing protocols. Among the literatures [1,2], Li and

(14)

Jain showed that topology-based routing protocols are not scalable because of the enormous overhead for maintenance. To develop a scalable routing protocol, geographic-based routing protocols are proposed, such as GRID routing protocol (GRID) [3], Grid Location Service [1], and Geographic Perimeter Stateless Routing protocol (GPSR) [4]. Although GPS and some other positioning systems are becoming popular in recent years, dierent positioning systems have dierent positioning accuracy, and therefore geographic routing protocols requiring highly accurate geographic information are not practical. GRID routing protocol, one of the famous geographic routing protocols, has much tolerance to inaccurate location information and is easy to implement with hierarchical architecture. Hence, on the practical side, GRID routing protocol has high potential to be implemented in the practical environment in the future. With more applications widely used over grid networks and lower prices for wireless devices, the network density would also increase. Moreover, the trac load would also increase in a heavy situation since there are a large number of transmissions going on at the same time. Therefore, how to eciently transmit data over wireless network with limited wireless resources becomes a critical issue.

In recent years, a novel technique, network coding, is proposed to improve network throughput by mixing dierent ow packets into a single packet. To utilize the network coding over the underlying networks, it is required that the network possesses two charac-teristics: multicast and path diversity. Because wireless devices transmit packets through broadcasting, and each node acts as an intermediate node for some data ows, it is clear that the wireless network meets the two above-mentioned requirements.

To provide a simple explanation of how network coding improves throughput, it is illus-trated with the well-known Alice-and-Bob scenario [5] in Figure 1.1. In this gure, three network devices, the relay station, Alice and Bob are involved in the process. The relay station is a device necessary for Alice and Bob to exchange their information. Suppose that

(15)

trans-P1 P2 P1XOR P2 P1 P2 P1XOR P2 1 2 3 3 Alice Bob Relay

Figure 1.1: Alice and Bob scenario

mit one packet P2 to Alice. One possible transmission schedule without applying network

coding is as follows. First of all, Alice transmits P1 to the relay station, which relays P1

to Bob. The number of transmission required for Alice to transmit packets P1 to Bob is 2.

On the other hand, while transmitting P2 to Alice, Bob has a transmission schedule similar

to Alice'. Therefore, if Alice and Bob exchange their own one packet with each other, the total number of transmission for Alice and Bob would be 4. However, if network coding

is adopted in this scenario, Alice would transmit packet P1 to the relay station in the rst

place. At the same time, Bob also transmits packet P2 to the relay station. After receiving

packets P1 and P2, the relay station encodes packets P1 and P2 with XOR operation into

an coded packet P1⊕ P2 and broadcasts it to its one hop neighbors, Alice and Bob, instead

of simply unicasting packets P1 and P2. Alice and Bob will then receive the coded packet

P1⊕ P2. Because Alice has packet P1 and Bob has packet P2, they can extract their desired

packet by calculating (P1⊕ P2) ⊕ P1 or (P1⊕ P2) ⊕ P2 . Therefore, the total number of

trans-mission is 3, and the total latency for exchanging packets is reduced by 1

4. In this scenario,

the total number of transmission with network coding is less than that with unicasting. In other words, a network device using network coding can transmit more than one content

(16)

of information to its one hop neighbors during a single transmission. However, it can only transmit a single content of information during a single transmission while using traditional unicasting. Therefore, in general, network coding can improve network throughput.

Katti et al. [5] proposed a localized wireless network coding heuristic, called COPE, that adopts the idea illustrated in the previous example. Each node in COPE is informed of knowledge of its one hop neighbors without knowing the global topology of the entire network. Each node obtains knowledge of one hop neighbors by overhearing packets trans-mitted by its one hop neighbor or piggyback information in the successive transmissions. To prevent ambiguity, in the following discussion the original packets before encoding are called primitive packets, and packets after encoding are called coded packets. While a node is ready to transmit a primitive packet over the wireless channel, it encodes as many primitive packets in its buer as possible into one coded packet by XOR operation and broadcasts the coded packet to their nexthops if all these primitive packets of their nexthops are capable of decoding their demand packets. A node overhears a coded packet and stores it into its infor-mation pool. After receiving a packet, a node tries to extract its demand packet by decoding it with packets stored in its information pool and buer. Thus, packets in the information pool are the fundamental knowledge for decoding the incoming packets. Because there is high potential to implement ad hoc networks with grid networks, which routes packets by GRID routing protocol, we can utilize the network coding technique as a powerful tool to eciently make use of the wireless resource in the real environment as the network trac load becomes heavier and heavier in the future. Furthermore, we can investigate the impact of network coding on the performance of the network throughput. The mechanism of the network coding used in this work is referred to as COPE [5].

The environment of simulation used in this work is described as follows. Each ad hoc node in the grid network operates in the synchronized TDMA-Similar mode and performs slotted random MAC, called Rand-MAC in this thesis. For easy simulation analysis, each

(17)

grid cell contains only one ad hoc node, which works all the time without crash. Nodes located in neighboring cells can communicate with each other, and thus the deliverability of each node is asymptotic and almost surely guaranteed. Moreover, the bandwidth of each link in the grid networks is the same, so it is assumed that the payload of each packet is one unit. The grid network model has collisions and retransmissions and utilizes greedy grid unicast routing, called Unicast in this thesis. COPE [5] suggested that packet knowledge can be collected by piggybacking information in successive transmission and assumed that there exists such mechanisms without too much overhead. The same assumption is adopted in this work. Actually, each node needs to know whether previous transmissions are successfully received and decoded by its neighbors and which packets has been overheard by its one hop neighbors. These are important implementation issues. However, in this work we do not really discuss and handle related issues, which will be left to our future works.

1.3 Main Results and Organization

In their previous work, Huang et al. [6] derived the theoretical value and the distribution of trac load in each grid cell, and found that the trac load distribution of the grid networks resembles a hill under the ideal network environment, i.e. without collisions and retransmissions. The hot spot occurs at the center of the deployment region. Simulation analyses and evaluations are conducted in this work. The evaluations are focused on the throughput improvement by the network coding, namely the XOR coding algorithm as compared to the greedy grid unicast routing, called Unicast in this work. According to our simulation, the information exchange using XOR coding algorithm can improve the throughput of the grid network eciently as compared with Unicast. For each grid cell, the trac load distribution is similar to that of the theoretical value, except for the less trac load due to collision and packet loss. Our simulations show the throughput using the

(18)

(During 500000 time slots, the 10 × 10 grid network achieves a stable state.), the average improvement rate of throughput and end-to-end delay using the XOR coding algorithm is about 74.0% and 55.7%. Thus, our simulation shows that the XOR coding algorithm can improve the throughput of the grid network and reduce end-to-end delay.

The rest of this thesis will be organized as follows. Chapter 2 introduces related works, including GRID routing protocol, Huang's work, which presents the theoretical value of trac load of grid network, as well as related works on network coding. Our simulation is based on GRID routing protocol [3] which is compared to the preliminary trac load analysis done by Huang [6]. Chapter 3 shows the XOR coding algorithm used in this thesis. Chapter 4 presents our simulation results and the analyses of simulation data. Chapter 5 concludes this thesis and describes future works.

(19)

Chapter 2

Related Work

2.1 Background of Grid Network

Ad hoc nodes act both as routers and end systems, and an ad hoc network can be organized by itself. The topology of the traditional wire network does not change, because devices are xed to specic locations. In the infrastructure wireless network, there is a base station, namely access point, which serves its one-hop neighbor mobile nodes in its basic service set. If mobile nodes roam inside the radio range of its access point, they can access the network; otherwise, they are disconnected from the network. Hence, the topology of the infrastructure wireless network of mobile nodes can change, but its access point always stays in the same place. In addition, mobile nodes communicate with others in the network directly through its access point, but not through any mobile nodes in the same basic service set. However, each ad hoc node has mobility and communicates with others through many intermediate ones. Therefore, in the ad hoc network, unlike the traditional wire network and the infrastructure wireless network, information transmitted by an ad hoc node may be relayed through many intermediate ones, and the entire network topology can change while passing on information. Thus, routing protocols utilized for the traditional wire network and infrastructure wireless

(20)

network are not applicable for the ad hoc network.

In recent years, many routing protocols of the ad hoc network are proposed, and can be generally categorized into topology-based and geographic-based routing protocols. In the topology-based routing protocols, such as Dynamic Destination-Sequenced Distance-Vector Routing (DSDV) [7], Optimized Link State Routing (OLSR) [8], Topology Broadcast based on Reverse-Path Forwarding (TBRPF) [9,10], Dynamic Source Routing (DSR) [11] and Ad hoc On Demand Distance Vector (AODV) [12], the logical link information in the network is utilized to determine the packet forwarding route. Recent researches [1,2] showed that these topology-based routing protocols without geographical information are not scalable due to serious maintenance overhead. To decrease the maintenance overhead of topology-based routing protocols, researchers proposed scalable geographic-based routing protocols, such as GRID routing protocol [3], Grid Location Service [1], and Geographic Perimeter State-less Routing protocol (GPSR) [4]. Although many researchers have made great progress on positioning accuracy of global positioning systems (GPS) and other positioning systems in recent years, nowadays location errors still exist in all location estimating engines. More-over, in the realistic point of view, some geographic routing protocols relying on accurate positioning devices to route packets cannot work well and be implemented in the realistic environment. However, in the ad hoc network, there is one famous routing protocol, GRID routing protocol, which has much location error tolerance and is scalable to be implemented in the practical environment due to the hierarchical architecture. Today many applications, such as agriculture monitoring in paddy elds, tracking of an object, gathering data and others, are based on this protocol. In short, GRID routing protocol has high potential to be applied to many spheres in the realistic environment in the future.

GRID routing protocol, which is reactive, geographic-based and fully location-aware, is proposed by Tseng et al. [3]. It exploited location information about route discovery, packet relay, and route maintenance, and assumed that each node equipped with a GPS device

(21)

0

0

1

1

00

00

11

11

00

00

11

11

00

11

00

11 0

0

1

1

00

00

11

11

0

1

0

0

1

1

00

00

11

11

0

0

1

1

0

1

00

00

11

11

00

11

00

00

11

11

00

00

11

11

0

0

1

1

0

1

0

1

00

00

11

11

00

00

11

11

00

00

11

11

00

11

00

00

11

11

00

11

0

1

0

1

00

00

11

11

e

f

2

4

1

a

d

5

c

b

3

g

Figure 2.1: Neighboring cells of cell 1 and neighbor nodes of node a.

knows its location in the network. GRID tessellates the geographic area of the MANET into the 2D logic equal square areas called grid cells, and assigns a tuple (x, y) to each grid cell as its xy-coordinate. Two grid cells are called neighboring grids if they share a common edge, and two nodes are called neighboring nodes if they are located in neighboring cells and are within each other's transmission range. For instance, in Figure 2.1, the grid cells 2, 3, 4, 5 are neighbor cells of the grid cell 1. In each grid cell, the node closest to the geographic center of that grid cell, is elected as the leader of a grid cell among the other ad hoc nodes. A leader acts as a gateway and takes responsibility for routing packets in a grid-by-grid manner, while other non-leader ad hoc nodes do not. The leader of a grid cell takes responsibility for many tasks, such as forwarding route requests to neighboring grids, propagating data packets to neighboring grids, and maintaining routes which pass the grid in which it resides. Therefore, for power consumption, it would be better to choose only one node as the leader rather than to choose more than one. While a node moves closer to the geographic center of a grid cell

(22)

than its current leader, it would be elected the new leader. As a consequence, many leaders may reside in a grid cell at the same time. In this case, when a leader gets a packet from another leader closer to the geographic center of the grid cell, it turns into a nonleader and stops forwarding any packets. While a leader roams out of its grid cell, a new leader would be elected and the old leader would pass its routing table to the new one by broadcasting. If an active leader exists in a grid cell, the grid cell is considered alive; otherwise, it would be considered crashed, and another ad hoc node in this grid cell will be elected as the new leader. 3 0 0 1 2 1 2 3 S A B C D

(a)

R 3 0 0 1 2 1 2 3 S A B C D

(b)

R

Figure 2.2: (a) Routing table utilizes grid IDs to route packets and this oers more resilient route maintenance. (b) GRID routing protocol has highly resilient for node mobility, because a new leader takes over the relaying jobs when the current one wanders out of the grid.

Three tasks, forwarding route requests to neighboring grids, propagating data packets to neighboring grids, and maintaining routes which pass through the grid it resides, are carried out by a leader. If leaders and nonleaders can communicate with neighboring nodes, it is possible that the leader and nonleaders send out a large number of redundant request packets during route discovery for one source node. This situation causes poor routing

(23)

allowed to communicate with neighboring nodes. With this ltering mechanism, the GRID routing protocol is insensitive to high host density and can eciently route packets with less network resources in high density environments. Because only the leaders can communicate with neighboring nodes, they are responsible for route discovery. When a source node is ready to transmit a packet, rst of all, a request packet is transmitted to its leader, and the leader then relays this request to neighboring nodes in an on-demand manner. A route discovery from the leader to a destination in the GRID routing protocol works in a similar way as the AODV mechanism. Finally, a destination receives a request packet from its leader and replies to the source following a corresponding reverse routing path. A routing table records the next grid ID which heads to the destination, rather than a host ID, because they oer stronger, more resilient route maintenance. For example, in Figure 2.2(a), node

B registers grid (2, 2) instead of the address of node B. This mechanism renders routing

highly resilient to node mobility. While node B roams out of grid (2, 2), a newly elected leader, node R, takes over the relaying job. Long routing paths are often lost due to node's mobility, however routing packets following grid ID overcome this drawback. Thus, GRID routing protocol can sustain longer than other protocols, which are less vulnerable to node mobility in the long route.

Because GRID partitions the network into several grid cells and routes packets in a grid-by-grid manner, a network using GRID routing protocol is called a grid network. To facilitate the analysis, we conne the receiver to the ad hoc nodes in the neighbor cells of the sending node. In other words, the sender in the grid cell can only communicate in four directions. In Figure 2.1, the ad hoc node a can communicate with the ad hoc nodes b, c, d, e, f, g. In order for the deliverability to be asymptotic and almost surely guaranteed, we assume that

the transmission radius of the ad hoc nodes in the network is √5 times of the grid size or

larger for every node to reach any node in neighboring cells [6]. Hence, a node in a grid cell can communicate directly with a node in any of the four neighbor cells. In this thesis, our

(24)

simulation on the grid network are aimed at facilitating future analyses.

2.2 Trac Load of Grid Cell

A previous work [6], has derived the trac load sent or relayed by any particular cell in the deployment region by applying grid routing. In the network model, nodes are represented by a Poisson random point process with mean n over the unit-area square region D. The

deployment region D is tessellated into N2 equal sized square cells. Each cell is given a grid

coordinate (i, j), where 1 ≤ i, j ≤ N. The routing distance between two nodes is measured by L1 grid distance, also known as the Manhattan distance. In other words, if node u is in the cell (iu, ju) and node v is in the cell (iv, jv), the routing distance between them is given

by |iu − iv| + |ju − jv|. It is assumed that each node knows the cell in which it is located

by utilizing geometric information. Each node has the same probability of being a sender and every source node has equal probability of choosing any other nodes as destinations. The network has no packet collisions and retransmissions. Let (is, js, i0, j0, id, jd)denote the

percentage of trac going from cell (is, js) through cell (i0, j0) to cell (id, jd), then

f (is, js, i0, j0, id, jd) =   |i0− is| + |j0− js| |i0− is|     |id− i0| + |jd− j0| |i0− id|     |id− is| + |jd− js| |id− is|  

, where (is, js)is the cell containing the source node and (id, jd)is the cell containing the

destination node. The total trac ow in the network is one with a random trac pattern. It shows that the trac loads of grid cell (i0, j0)is

f (i0, j0) = 2 N4 i0 X is=1 j0 X js=1 N X id=i0 N X jd=j0 + N X is=i0 j0 X js=1 i0 X id=1 N X jd=j0 ! f (is, js, i0, j0, id, jd)

(25)

0 20 40 60 0 20 40 600 0.005 0.01 0.015 X coordinate Y coordinate Traffic load

Figure 2.3: Trac distribution over celss for 60 × 60 grids

, where f(i0, j0) is the trac load of a cell (i0, j0). Hence, the hot spot occurs at the center

of the deployment region, and Figure 2.3 shows the trac load distribution over 60 × 60grid cells.

2.3 Background of Network Coding

As mentioned in the previous section, the grid network is practical, scalable, simple im-plemented, and will be applied to many elds in the future. In general, most grid network applications, such as agriculture monitoring in paddy elds, tracking of an object and others, are served by multi-hops communication. Moreover, the advancement of technology has led to great progress in computers, and as more kinds of network applications are invented in the upcoming years, the computers can not only become cheaper but would also be able to take up many more tasks than in the past. The grid network density and the utility rate of network communications can be increased enormously year by year. Since the grid net-work throughput and capacity directly aect the eciency in services involving grid netnet-work applications, the improvement of both is a critical issue. Fortunately, a novel and powerful tool, network coding, is proposed by Ahlswede et al. [13] in recent years to improve network

(26)

throughput and capacity, which seems to have provided a solution to the above-mentioned problem.

У

Figure 2.4: Buttery example

The buttery network is a well-known example [13] for illustrating the idea underlying network coding. In Figures 2.4(a) and 2.4(b), it is assumed that the capacity of each link is one message stream during one unit of time, and the middle routers W and X only

forward received message stream. S1 and S2 represent two source nodes, which prepare for

transmission message stream of both P1 and P2 to both destinations D1 and D2. In Figure

2.4(a), in the network without network coding, it is easy to predict that the bottleneck will happen at the middle routers W and X, because the middle routers W and X can only relay

(27)

2.4(b) describes the network with network coding. When the middle router W receives the

message streams of both P1 and P2, it combines them into P1⊕ P2 by mixing two message

of bits and forwards it to the destinations D1 and D2. The destinations D1 and D2 receive

the message stream of both P1 and P2 by extracting its message stream from P1⊕ P2 using

one of received message stream of P1 and P2. Thus, the network throughput with network

coding is 2 message stream per unit of time, and is better than that without network coding. Network coding was rst proposed in the pioneering work by Ahlswede et al. [13] in which they showed that multicast capacity can be increased by properly mixing information from dierent sources at intermediate nodes. Following Ahlswede's work, a large number of works are focused on coding packets based on network topology to improve network capacity. Li et al. [14] extend the work and show that a linear coding scheme for multicast trac that can achieve the maxow from the source to each receiving node that is the maximum capacity bound [15]. In [16], polynomial time encoding and decoding algorithms are presented by Koetter and Me'dard and are extended to random coding by Ho et al. [17]. In the sensor network, Dimakis and Dan et al. [18,19] exploit the network coding approach to achieve ecient data storage, collection, and dissemination. Recent researches show that network coding in specic unicast topologies can induce better throughput than in traditional transmissions [2022]. Moreover, [5, 23] indicate that implementing network coding using

XOR coding on the MAC layer of IEEE 802.11 can eectively improve end-to-end unicast

throughput.

Most of the works described above focus on the coding algorithms. There are also some theoretic works on analyses of the impact of network coding on network throughput. In [24], the authors developed the theoretical foundation for analyses of the throughput capacity of wireless network. The main results are fold. First, the throughput capacity of

two-dimensional arbitrary wireless networks is in the order of O(√n), where n is the number of

(28)

scale with O( n

logn ). Since such results were published, the throughput capacity of random

wireless networks has been studied extensively in the literatures [2527]. In the random wireless network, Lu et al. [28] show that network coding on the physical-layer can improve the throughput capacity substantially, minimize delay and provide condentiality. It also derives tighter bounds in two-dimensional random wireless networks with unicast trac, which is uniformly distributed among all nodes. Except for adapting network coding to networks, MAC, physical layers, David et al. [29] proposed a modication for TCP of IEEE 802.11 back-o mechanism using the feedback approach. It XORs the forwarding ow of TCP data packets and reverses the owing TCP data packets to improve the throughput. In [30], the authors show that the total number of transmissions with network coding, as compared to that without network coding, is a constant factor under the xed network, such as the circular network and the grid network. According to related works, network coding is a powerful tool which, unquestionably, can improve the network throughput of multicasts, broadcasts, TCP mechanisms, and other network transmission mechanisms. To implement network coding, the network should include two properties: path diversity and multicast.

In wireless networks, the broadcast nature of wireless communications provides an envi-ronment for implementing network coding schemes. In other words, packets are transmitted by a transmitter over the air interface. Thus, wireless devices can receive the packets while located within the radio range of the transmitter. Moreover, while a wireless device transmits packets to the nexthops by broadcasting, it is very likely for one-hop neighbor devices to overhear packets. The broadcasting feature can satisfy both requirements for implementing network coding: path diversity and multicast. Hence, the environment of the wireless grid network is applicable for implementing network coding.

(29)

Chapter 3

Network Coding Algorithm and

Implementation

3.1 XOR Coding Algorithm

XOR coding algorithm uses basic xor for its major operations, and has been implemented

between the MAC layer and the IP layer in the practical network environment. Thus, this thesis uses the XOR coding algorithm refered to in the COPE [5]. COPE suggested that packet knowledge can be collected by piggybacking information in ACK and assumed that there exists such ACK mechanisms without too much implementation cost. The same as-sumption is adopted in this work. Each node needs to know whether previous transmissions are successfully received and decoded by its neighbors and which packets has been overheard by its one hop neighbors. These are important implementation issues. However, like COPE, we do not really discuss and handle related issues in this paper and leave them for future studies. The XOR coding algorithm works in the following procedure, but the details of which are depicted in PROCEDURE 1. Each node maintains two buers: one buer stores all the primitive packets ready for transmission and the other, the information pool, stores

(30)

undemanded coded packets and primitive packets. In general, primitive packets in the buer are categorized into virtual queues by dierent nexthops, and the number of virtual queues is the same as that of one-hop neighbor nodes. The node maintains a virtual queue that are sequence of the buers and indicates which packet is demanded by its neighbor. In other words, primitive packets in dierent virtual queues are transmitted to dierent nexthops. Due to the broadcast nature of wireless devices, one-hop neighbor nodes have many oppor-tunities to overhear coded packets. Information pools store undemanded primitive or coded packets overheard as fundamental knowledge for decoding coded packets, and buers store

demanded primitive packets. Let buer denote the buffer, and virtualQueuew the virtual

queue for neighbor w.

As one node has a transmission opportunity, it rst dequeues a primitive packet p from its buer buffer and assigns it to coded packet codedP acket. The node records the nexthop of p into nextHop to keep a list of all the possible receiving nodes in this coding procedure. Then, for all its one-hop neighbors w from its one-hop neighbor list neighbor, it extracts a

primitive packet q from the virtual queue virtualQueuew and checks whether for all nodes

v in nextHop ∪ w can successfully retrieve their demanded primitive packets after coding

the content of this packet into codedP acket. If there exists any node that is unable to successfully retrieve its demanded primitive packet, it takes out another primitive packet

q' from the virtual queue virtualQueuew to substitute for primitive packet q and re-runs

the previous step, until new coded packet codedP acketcan be retrieved successfully by all nodes v in nextHop ∪ w or until there is no unveried primitive packet in the virtual queue

virtualQueuew. The content of a primitive packet is rstly encoded into codedPacket if its

receivers can both retrieve it from codedPacket and the content of the retrieved primitive packet is the desired one for its receiver. If q can be encoded into codedP acket, codedP acket is encoded with q and nextHop is updated to nextHop ∪ w. The coding procedure for which the greedy heuristic is to increase as many receiving nodes as possible.

(31)

A node retrieves information from the coded packet followed by the decoding procedure as shown in Procedure 2. Each node maintains an information pool infoP ool that records a copy of the information of a packet it has received, sent out or retrieved from the coded packet. A node can retrieve information from the coded packet codedP acket with n primitive packets by XOR operation if it has exactly the same n − 1 primitive packets in its infoP ool. The coding and decoding procedures of the XOR coding algorithm are described in the algorithm 1 and the algorithm 2. While a transmitter has a transmission opportunity and is in preparation of selecting primitive packets from its virtual queues, four conditions should be considered while decideing on what kind of primitive packets should be selected. The four conditions are as follows:

PROCEDURE 1 XOR−encoding (buf f er, neighbor)

Require: buffer stores primitive packet and neighbor is a list of one hop neighbors. dequeue a packet p from buffer.

the coded packet codedP acket = p

nextHop = {the next hop of packet p}

for ∀w ∈ neighbor do

extract a primitive packet q from virtualQueuew

while ∃v ∈ nextHop ∪ {w}, v cannot decode the coded packet p && virtualQueuew

has unveried primitive packet do

extract a primitive packet q from virtualQueuew

end while

codedP acket = codedP acket ⊕ q nextHop = nextHop ∪ {w} remove q from buffer end for

(32)

PROCEDURE 2 XOR−decoding (v, codedP acket)

Require: node v that wants to decode the received coded packet codedP acket if codedpacket is unscramble then

extract the primitive packet q from coded packet codedP acket if v is the next hop of q then

put q into the bufferv

else

put q into the infoP oolv for the future decoding purpose

end if else

put codedpacket into the infoP oolv

end if

1. Any of the primitive packets' nexthops are not the same. If a transmitter selects the primitive packets P1,P2,..., Pn and two or more primitive packets Pi,Pi+1,..., Pj are

transmitted to the same nexthop N, when nexthop N receives the coded packet P0 =

P1⊕ P2⊕ ... ⊕ Pn, it cannot recover primitive packets Pi⊕ Pi+1⊕ ... ⊕ Pj from coded

packet P0, and P

i ⊕ Pi+1⊕ ... ⊕ Pj is still a scramble for a receiver. Therefore, path

diversity must be satised.

2. All the receivers R1, R2, .., Rnhave the packets P0 = P1⊕ P2⊕ ... ⊕ Pi−1⊕ Pi+1⊕ ... ⊕ Pn

XORed from their information pools, if a transmitter selects the primitive packets P1,P2,..., Pn to be XORed together. In other words, all the receivers R1, R2, .., Rn have

the packets P1 ⊕ P2 ⊕ ... ⊕ Pi−1⊕ Pi+1⊕ ... ⊕ Pn, meaning that all the receivers can

recover their demanded primitive packet Pi by calculating Pi = (P1⊕ P2⊕ ... ⊕ Pn) ⊕

(P1⊕ P2⊕ ... ⊕ Pi−1⊕ Pi+1⊕ ... ⊕ Pn).

(33)

trans-to its one-hop neighbor nodes, a large number of nexthops would receive them and may recover its demanded primitive packet in one single transmission. Thus, the more primitive packets are encoded in each transmission the more ecient the network throughput can become.

4. The primitive packets selected to be encoded together should have the similar bit length. Should any dierence in bit length exist between primitive packets selected by a transmitter, the shorter ones are padded with trailing zeros to their data until their bit length is as long as the largest one's. Then, a transmitter can begin to encode them by the XOR coding algorithm and broadcast the coded packets to one-hop neighbors. In such a transmission, some bandwidths are wasted because useless padded zeroes are also transmitted, the process of which consumes the network capacity. Thus, enlarging the shorter primitive packets by padding zeros wastes the bandwidths of the network. Therefore, by selecting primitive packets with similar lengths to be encoded, the eciency of network bandwidth use can be boosted.

The following example (in [5]) shows how the XOR coding algorithm works and gains benets, and the previous conditions avail. In Figure 3.1(a), node A has packets P1, P2, P3, P4

in its buer and its one-hop neighbors B, C, D overhear some packets. It is assumed that

A knows which packets one-hop neighbors have. When A has a transmission opportunity,

if A picks up packets P2 and P3 to be encoded into P2⊕ P3 and transmits it, C receives it

but can neither extract packet P2 nor packet P3 with packets P1 and P4 in its information

pool. Since packets P2 and P3 have the same nextstop, they are not able to be selected to

be mixed at the same time. Therefore, any of the primitive packets' nexthops are not the same. (see the previous condition 1).

If A picks up packets P1, P2 and P3, which are to be encoded into P1⊕ P2⊕ P3, which is

received by D, D would decode P1⊕P2⊕P3 into P1⊕P2 = (P1⊕ P2⊕ P3)⊕P3. But it cannot

(34)

A

B

C

D

P1 P2 P3 P4 A’s Buffer P3 P4 P4 P1 P3 P1 D’s Pool C’s Pool B’s Pool P3 P1 P2 P4

D

C

C

B

Primitive packets in A’s Buffer Next Hop

(a) A can encode primitive packets to transmit. (b) Nexthops of primitive packets in A's buer.

Figure 3.1: Let the primitive packets to be encoded maximal numbers in each transmission. from P1⊕ P2⊕ P3 with packets P2 and P3. Therefore, all the receivers R1, R2, .., Rn have the

packets P0 = P

1⊕ P2⊕ ... ⊕ Pi−1⊕ Pi+1⊕ ... ⊕ Pn XORed from their information pools, if a

transmitter selects the primitive packets P1,P2,..., Pnto be XORed together (see the previous

condition 2). This certainly ensures that all nexthops can recover their demanded primitive packets from the received coded packet.

Because B and D have packet P33, and none of the nodes has packet P2, packet P3 is

more likely to be decoded and is better than packet P2. Therefore, four conditions may occur

in terms of packet selection. First, if A selects packets P1 and P3 to be encoded, because

C has packet P1, and D has packet P3, C and D can recover their demanded packets from

P1 ⊕ P3. Thus, A delivers two packets in one transmission. Second, if A selects packets

P1 and P4 to be encoded, because B has packet P1, and D has packet P4, B and D can

recover their demanded packets, and A also delivers two packets in this one transmission.

Third, if A selects packets P3 and P4, the same result would occur, and B and C can extract

(35)

packets P1 and P4, and D has packets P3 and P4, each one can recover its demanded packet

from P1 ⊕ P2 ⊕ P3. In this case, A delivers three packets in one transmission. Thus, the

more primitive packets to be encoded in each transmission, the better it is for network throughput (see condition 3 mentioned above). Therefore, four approaches should be taken while selecting which primitive packets to be encoded.

3.2 Network Model and Assumptions

In this work, the assumptions of our grid network model is consistent with that of the previous work [6], except for its ignorance of collisions, retransmissions and any trac pattern, and listed in the following.

• Every grid cell has only one node, which presents the leader of the grid cell and works

all the time without crash, and all nodes are synchronized.

• Each node can directly communicate with other nodes in neighboring cells, and while

routing packets, local minimal situation never happens here.

• The payload of each packet is the same, and in our simulation, we assume that the

payload of each packet is one unit. In other words, this guarantees that the bandwidth of each link is the same.

• The grid network model, dierent from that in the previous paper, has collisions and

retransmissions, and utilizes greedy grid unicast routing, Unicast, with which packets are randomly transmitted via the shortest route to neighbor cells.

• Each node needs to know whether previous transmissions are successfully received

and decoded by its neighbors and which packets have been overheard by its one hop neighbors.

(36)

In this thesis, we assume that the grid network operates in a synchronized-TDMA-manner, and all the ad hoc nodes communicate with each other in Rand-MAC mode. The following is to introduce our simulation network mechanism in detail. In our simulation, time is divided into time slots similar to TDMA system. During each time slot, each node generates one packet with the same probability, called packet generating rate, if its buer has enough storage. The source and destination pairs of each node are generated randomly and uniformly distributed over all nodes. The operation of Rand-MAC, random MAC, in each node is simple. If one or more packets have transmission opportunities, a node would wait until the beginning of the next time slot, when it has the probability, called Rand-MAC probability, to decide whether to transmit one single packet at each time slot. Only one single packet can be completely transmitted in each time slot. In other words, a node spends one complete single time slot on transmitting one packet from a transmitter to a nexthop.

Collision is dened as the following. Due to the broadcast nature of wireless communi-cations, collision occurs, when two or more of its one-hop neighbors transmit packets during the same time slot. If a node receives two or more packets from dierent transmitters at the same time slot, it receives either none or only one single packet among these. Thus, when there is no collision, a node would spend one time slot on a successful transmission of one packet. If a node fails to transmit one packet, it does not receive an ACK from a receiver before the end of time slot, and it inserts the packet into its buer. When the failed trans-mission packet is taken out next time, a node retransmits it with the Rand-MAC probability to decide whether to retransmit it.

Our simulation network mechanism sets a time limit on retransmission, called maximal retransmission time. If the retransmission of a packet by a transmitter exceeds the maximal retransmission time, it would be discarded by the transmitter. Thus, a node retransmits one packet, until successful retransmission or the times of transmission exceed the maximal retransmission time. In addition, packet loss may occur by another situation. If a buer in a

(37)

receiver does not have enough storage, it would discard incoming packets. Therefore, packet loss is caused by two factors, one being retransmission exceeding the maximal retransmission time and the other being buer overow.

3.3 Network Coding Implementation

COPE architecture is taken form the paper [5] and adopted in our work. Our XOR coding algorithm is built on Unicast. Each node maintains two buers: one buer stores demanded primitive packets and the other, the information pool, stores undemanded packets. A node classies primitive packets into virtual queue by dierent nexthops. Due to each grid cell with the existence of one node and limitation on the transmission range of nodes, each grid cell maintains at most four virtual queues.

In the system, during each time slot, each packet is generated with the same packet generating rate, if a buer has enough storage. Each node is prepared to transmit one packet with the Rand-MAC probability in this time slot, if it has primitive packets in its buer. If one node has transmission opportunities in this time slot, the procedures of the

XOR coding algorithm can be carried out. The procedures in our work are divided into

three parts: the coding procedures of a transmitter, the decoding procedures of a receiver, and the retransmission procedures of a transmitter.

In the rst part, a transmitter takes out four primitive packets in four virtual queues by the XOR coding algorithm (as described in the previous section), if its buer has primitive packets. Before encoding them, a transmitter would check whether coded packets are re-trieved successfully by all nexthops. As mentioned in the previous section, a node takes out as many primitive packets in four virtual queue as possible, which is 1 4 primitive packets due to existence of four grid neighbors. In the second part, the primitive packets taken out in the previous step are encoded, primitive packet IDs are inserted into the header of the coded packet, and nally, the coded packet is transmitted to all the nexthops by broadcast.

(38)

A transmitter sets up a timer to wait for ACKs from all the nexthops. If one neighbor node has collision, it cannot receive a coded packet from a transmitter; otherwise, it would be able to receive the packet. The step described above is depicted in Figure 3.2.

Figure 3.2: Flow chart of transmitter side for encoding.

Decoding procedures of a receiver are described below. When a coded packet arrives at a one-hop neighbor node, it checks whether it is a nexthop. If not, and if the information pool has enough storage, the coded packet is stored into the information pool. If the in-formation pool is full of coded packets, it would be discarded. Each coded packet stays in

(39)

node maintains its information pool by discarding coded packets over the packet alive time. Thus, a node discards coded packets in cases of information pool overow or when packet alive time is passed. If a nexthop receives a coded packet, it tries to retrieve its primitive packet by checking IDs in the header of that the coded packet. If a coded packet is scramble, the node would take it as a coded packet received by a none-nexthop. Otherwise, a nexthop recovers a primitive packet and stores it into its buer when there is enough storage. If there is no storage in the buer, the primitive packet would be discarded. This is one factor contributing to packet loss. Then, primitive packets are categorized into virtual queues by dierent nexthops. If the information pool has enough storage, the primitive packets would also be stored into it; if not, the packets would be discarded. And it responds an ACK with a packet ID to the transmitter. The decoding procedures of a coded packet conducted by a receiver is depicted in Figure 3.3.

Finally, there is the retransmission procedures of a transmitter. When an ACK arrives to a transmitter within the allotted time, it removes the primitive packet corresponding to the packet ID from its buer. However, when the timer expires, the transmitter would discard the primitive packets selected within the encoding procedures and exceeding the maximal retransmission time. This procedures is described in Figure 3.4.

(40)

Am I nexthop? Store coded packet into information pool Encoded ? Yes Recover primitive packet Yes Store primitive packet into buffer Information pool full ? No No Drop coded packet Yes No Queue full ? No Categorize primitive packet into virtual queue Drop primitive packet Yes Transmit ACK Coded packet arrival

Receiver side - decoding

Store primitive packet into information pool Information pool full ? Drop primitive packet No Yes

(41)

Remove primitive packet relative to ACK from queue No Keep primitive packet in buffer Over maximal retransmission time ? Drop primitive packet No Yes Transmitter side - ACK

Time out ? Yes ACK arrival

(42)

Chapter 4

Simulation Analysis

4.1 Simulation Settings and Scenarios

Each experiment written in Java program language runs on 50 tasks and the results are averaged. We evaluate the XOR coding algorithm as compared with Unicast. Parameters of our simulation are introduced below and most of them, such as packet generating rate, Rand-MAC probability, maximal retransmission time and packet alive time, have been presented in the previous sections and re-introduced here.

• Packet generating rate: The probability is utilized while deciding whether to

gener-ate one primitive packet during each time slot, if a node has enough buer storage. Otherwise, it does not generate any primitive packet.

• Rand-MAC probability: The probability is utilized while deciding whether a node has

transmission opportunities in each time slot, if a node has packets in its buer.

• Maximal retransmission time: The maximal times are for the retransmission of one

(43)

• Buer size: The maximal number of primitive packets that can be stored by a buer. When the buer is full of primitive packets, the incoming ones would overow the buer, until the buer regains storage by sending out or discarding packets.

• Information pool size: The maximal number of coded packets that can be stored by

an information pool. When an information pool is full of packets, it would discard incoming ones, until there is enough storage. A node has an information pool manager to maintain its information pool.

• Maximal packet alive time: The maximal time slot during which each packet can be

stored in an information pool. The pool manager would discard coded packets kept in its information pool over the maximal packet alive time.

The following parameters are used to evaluate the XOR coding algorithm as compared to U nicast:

• End-to-end delay: The average time slots are spent by per primitive packet on

deliv-ering to its destination. When an algorithm has a larger end-to-end delay, it would spend more time slots on relaying. Thus, in this respect, the less time slot end-to-end delay is, the faster packets can be delivered.

• Throughput: The average number of primitive packets delivered to their destinations

within one time slot. If an algorithm has better throughput, the network would have a better consumption of packets. In this respect, we know how many packets can arrive at their destinations within one time slot.

• Number of times for transmission: The times for one node to transmit packets. If

the number of times for transmission is fewer, the nodes would transmit packets less frequently. In this respect, while transmitting the same number of packets, networks with fewer number of times for transmission are more ecient.

(44)

• Packet loss: The number of primitive packets discarded by buer overow or retrans-mitted over the maximal retransmission time. Packet loss is caused by two factors: buer overow and collision. If a network has much packet loss, the network obliquely would have poor throughput. In this respect, we clearly understand how much packet loss would have impact on the network throughput through buer overow and colli-sion.

We evaluate XOR coding algorithm in three scenarios. One has 500000 primitive packets successfully transmitted under light trac load (in the section 4.2). Another scenario (in the section 4.3) has the same buer size, 60 primitive packets in each node, and 10 × 10 grid networks in a stable state by running 500000 time slots. Last scenario (in the section 4.4) has

0.0083, 0.0167 and 0.0333 as its three packet generating rates, and its 10 × 10 grid networks

are also in a stable state. Because the graph of packet generating rate V.S. throughput (in Figure 4.3) is a curve, 0.0083, 0.0167 and 0.0333 is used to present the rise of throughput, the maximal throughput, and the decline of throughput.

4.2 Distribution of Trac Load of Grid Cell

In the following simulation, the 20 × 20 grid networks with the XOR coding algorithm or

U nicastrandomly produce 500000 primitive packets, which are distributed uniformly over all

nodes. It runs with perfect, successful transmissions without any packet loss. Our simulation parameters are described in detail in Table 4.1. Figures 4.1 and 4.2 show the distribution of the number of times for transmission in each grid cell with the XOR coding algorithm and U nicast.

(45)

Table 4.1: Simulation parameters with 500000 primitive packets.

Parameters type Parameter value

Width of grid network ×Height of grid network 20 × 20

Packet generating rate per node 0.01 packet/ time slot

Rand-MAC probability 0.25 packet/time slot

Buer size 1024 packets

Information pool size 8192 packets

Maximal retransmission times 4 times

Maximal packet alive time 10 time slots

Number of primitive packets delivered 500000packets

0 5 10 15 20 0 5 10 15 200 1 2 3 4 5x 10 4 X coordinate Y coordinate

Number of times for transmission

(46)

0 5 10 15 20 0 5 10 15 200 1 2 3 4 5 x 104 X coordinate Y coordinate

Number of times for transmission

Figure 4.2: Distribution of number of times for transmission using XOR coding algorithm. Figure 4.1 and Figure 4.2 indicate that the number of times for transmitting 500000 primitive packets in the 20 × 20 grid network using the XOR coding algorithm is fewer than that using Unicast (The ratio of that using the XOR coding algorithm to that using Unicast is about 0.6987. In other words, by contract, the XOR coding algorithm improves the number of times for transmission in the grid network about 30.0%.). Thus, the distribution of the number of times for transmission is atter using the XOR coding algorithm than that using Unicast. The maximal number of times for transmission is 26489.2 and 43064.4 for the XOR coding algorithm and Unicast, so the XOR coding algorithm improves the number by about 39.5% as compared with Unicast. With successful transmissions of 500000 primitive packets, the ratio of time slots consumed while using the XOR coding algorithm to that while using Unicast is about 0.7233. It shows that the XOR coding algorithm spends fewer time slots on delivering all packets than Unicast. Consequently, the XOR coding algorithm has less end-to-end delay. Since shorter time is used for totally successful transmissions, collisions caused by the XOR coding algorithm are fewer than those caused by Unicast. (The ratio of collisions caused by the XOR coding algorithm to that by Unicast is about 0.6038, which means the ratio is improved by 40.0%.) Finally, in the grid network,

(47)

can improve the throughput by about 44.4% as compared to Unicast. According to the previous simulation analysis, it can be concluded that grid networks using the XOR coding algorithm can cut down on the use of time slots, decrease collision occurrences, increase the total network throughput and reduce end-to-end delay as compared with Unicast.

4.3 The Impact of Packet Generating Rate

Table 4.2: Simulation parameters in 500000 time slot.

Parameter type Parameter value

Width of grid network ×Height of grid network 10 × 10

Packet generating rate per node 0.005 ∼ 0.1 packet/time slot

Ran-MAC probability 0.1 packet/time slot

Buer size 60 packets

Information pool size 600 packets

Maximal retransmission time 5 times

Maximal packet alive time 10 time slots

Simulation duration 500000time slots

Here is a Table 4.2, which shows the simulation parameters in details. Each experiment also runs on 50 tasks, and the results are averaged. In the section 4.3, in each node, the size of the output buer and that of the information pool are 60 and 600 respectively. We analyze the impact of the packet generating rates from the aspects of throughput, packet loss and end-to-end delay time in the grid network using the XOR coding algorithm as compared with Unicast.

(48)

4.3.1 Throughput

0 0.02 0.04 0.06 0.08 0.1 0 0.002 0.004 0.006 0.008 0.01

Packet generating rate

Throughput

XOR Unicast

Figure 4.3: Packet generating rate v.s. Throughput

Table 4.3: Average throughput and ratio of throughput in XOR coding algorithm to that in

U nicast.(Saturation point indicates packet generating rate 0.014286 at the maximal

through-put in the curve of the XOR coding algorithm.)

Packet generating rate p XOR U nicast XOR/U nicast

p ≤saturation point 0.007280 0.005020 1.450227

saturation point < p 0.008159 0.003686 2.213481

Overall 0.007805 0.004466 1.747443

Table 4.4: Average number of primitive packets in the buer. (Saturation point is maximal throughput in the curve of the XOR coding algorithm at packet generating rate 0.014286.)

Packet generating rate p XOR Unicast

p ≤saturation point 5.475 10.750

(49)

Figure 4.3 shows that the grid network throughput using the XOR coding algorithm is better than that using Unicast. At a packet generating rate smaller than the saturation point (It indicates packet generating rate 0.014286 at the maximal throughput in the curve of the

XOR coding algorithm), the XOR coding algorithm improves the average throughput by

about 45.0% (see Table 4.3); moreover, at a packet generating rate larger than that point, the average throughput can be improved by up to 121.3%. It is obvious that the XOR coding algorithm at a packet generating rate larger than the saturation point can improve the throughput much better. At a packet generating rate smaller than that point, the buer would have fewer primitive packets on average. Table 4.4 shows that a buer averagely has 5.475 and 43.45833 primitive packets, respectively at packet generating rate smaller and larger than that point. Hence, at little packet generating rate smaller than that point, cases in which no primitive packets are available for transmission would occur more frequently even with the transmission permission. The XOR coding algorithm also has less combination choices. It leads to coded packets combined with less primitive packets. Thus, in one transmission, a node using the XOR coding algorithm transmits less primitive packets at packet generating rate smaller than the saturation point. Therefore, the average throughput improvement is better at packet generating rate larger than the saturation point. In this simulation, the average throughput improvement using the XOR coding algorithm is about

74.7%.

At packet generating rates smaller than the saturation point, the throughput increases by the packet generating rate. However, at packet generating rates larger than that point, it decreases through packet loss due to buer overow. With the packet generating rate smaller than the saturation point, the number of primitive packets transmitted increases by the packet generating rate owing to more combination choices and less buer emptiness, until the throughput arrives at its maximum value. Hence, the throughput increases along with the increase of the packet generating rate. However, at packet generating rates larger

(50)

than that point, the throughput decreases along with the increase of the packet generating rate. In Table 4.4 , at packet generating rates larger than that point, 43.45833 and 46.756 primitive packets exist in the buer on average, respectively in the XOR coding algorithm and in Unicast. At packet generating rates larger than that point, the possibility for a buer to function without storage increases as the packet generating rate increases. Consequently, buer overow leads to more and more packet loss, and the throughput decreases along with the increase of the packet generating rate. Because of better throughput with the XOR coding algorithm, the grid network can consume more packets and can withstand larger packet generating rates. Thus, the maximal throughput of the XOR coding algorithm occurs at larger packet generating rate as compared with Unicast. Thus, it is certain that the XOR coding algorithm can eectively improve the grid network throughput.

4.3.2 Packet Loss

0 0.02 0.04 0.06 0.08 0.1 0 0.5 1 1.5 2 2.5 x 106

Packet generating rate

Packet loss

XOR Unicast

(51)

0 0.02 0.04 0.06 0.08 0.1 0 0.5 1 1.5 2 x 106

Packet generating rate

Packet loss caused by buffer overflow

XOR Unicast

Figure 4.5: Packet generating rate v.s. Packet loss caused by insucient buer size Table 4.5: Ratio of packet loss caused by buer overow to total packet loss.

Packet generating rate p XOR U nicast

p ≤ 0.01 0.076566 0.745196

0.01 < p < 0.03 0.842201 0.938083

0.03 ≤ p 0.965153 0.975923

Figure 4.4 shows that at packet generating rate smaller than about 0.03, packet loss while using the XOR coding algorithm is less than that while using Unicast, whereas at packet generating rate more than 0.03, the packet loss while using the former is more than that while using the latter. Figure 4.5 indicates that at packet generating rate smaller than about 0.01, buer overow in the XOR coding algorithm causes less packet loss than that in Unicast. This is because the XOR coding algorithm consumes more packets owing to better throughput than Unicast, and thus buer overow occurs rarely in the XOR coding algorithm. Moreover, Table 4.5 implies that in the XOR coding algorithm, collisions cause most of the packet loss at packet generating rate smaller than about 0.01. However, using

數據

Figure 1.1: Alice and Bob scenario
Figure 2.1: Neighboring cells of cell 1 and neighbor nodes of node a.
Figure 2.2: (a) Routing table utilizes grid IDs to route packets and this oers more resilient route maintenance
Figure 2.3: Trac distribution over celss for 60 × 60 grids
+7

參考文獻

相關文件

Now, nearly all of the current flows through wire S since it has a much lower resistance than the light bulb. The light bulb does not glow because the current flowing through it

The Seed project, Coding to Learn – Enabling Primary Students to Experience a New Approach to English Learning (C2L), aims to explore ways to use coding as a means of motivating

This kind of algorithm has also been a powerful tool for solving many other optimization problems, including symmetric cone complementarity problems [15, 16, 20–22], symmetric

„ An adaptation layer is used to support specific primitives as required by a particular signaling application. „ The standard SS7 applications (e.g., ISUP) do not realize that

Microphone and 600 ohm line conduits shall be mechanically and electrically connected to receptacle boxes and electrically grounded to the audio system ground point.. Lines in

This thesis applied Q-learning algorithm of reinforcement learning to improve a simple intra-day trading system of Taiwan stock index future. We simulate the performance

The purpose of this thesis is to propose a model of routes design for the intra-network of fixed-route trucking carriers, named as the Mixed Hub-and-Spoke

This thesis studies how to improve the alignment accuracy between LD and ball lens, in order to improve the coupling efficiency of a TOSA device.. We use