Practical throughput analysis for two-hop wireless network coding

Practical throughput analysis for two-hop wireless network coding

Computer Networks 60 (2014) 101–114 Contents lists available at ScienceDirect Computer Networks journal homepage: www.elsevier.com/locate/comnet Pr...

692KB Sizes 0 Downloads 33 Views

Computer Networks 60 (2014) 101–114

Contents lists available at ScienceDirect

Computer Networks journal homepage: www.elsevier.com/locate/comnet

Practical throughput analysis for two-hop wireless network coding Kaikai Chi a,b,⇑, Yi-hua Zhu a, Xiaohong Jiang c, Xianzhong Tian a a

School of Computer Science and Technology, Zhejiang University of Technology, Hangzhou 310023, China State Key Laboratory of Integrated Services Networks, Xidian University, China c School of Systems Information Science, Future University Hakodate, Hakodate 041-8655, Japan b

a r t i c l e

i n f o

Article history: Received 4 March 2013 Received in revised form 23 September 2013 Accepted 19 December 2013 Available online 27 December 2013 Keywords: Network coding Two-hop wireless networks Cross-layer analysis Throughput improvement

a b s t r a c t Network coding (NC) has been regarded as a promising technology for throughput improvement in wireless networks, so a thorough understanding on the possible throughput gain from using NC is essential for the application of such technology. Available studies of throughput gain from NC, which mainly focus on only coding sub-layer or both MAC layer and coding sub-layer but largely neglect the primary impact of physical-layer, may lead to an inaccurate (or even qualitatively incorrect) estimation of possible coding gain. To have a more thorough understanding on the practical throughput gain of NC, this paper explores the possible coding gain in the typical two-hop wireless relay network with a careful consideration of interactions among physical layer, MAC layer and coding sublayer. We first develop an embedded Markov chain theoretical framework to capture the complicated interactions among physical layer, MAC layer and coding sub-layer, based on which the close-form expression of throughput is then derived. We further explore the optimal bandwidth allocation problem in relay nodes for throughput maximization, and also provide a coding condition to clarify the scenarios where network coding does improve the throughput. Our analysis indicates that network coding may actually degrade throughput under some scenarios that were misjudged as being beneficial by previous studies without a careful consideration of primary impact of physical-layer. Ó 2013 Elsevier B.V. All rights reserved.

1. Introduction Multihop wireless networks have been a class of attractive networks with many promising applications like wireless sensor networks, wireless mesh networks, wireless ad hoc networks, etc. In such networks, there is no network infrastructure or centralized administration, and each mobile node operates not only as a host but also as a router, forwarding packets for other nodes. One main challenge for the applications of multihop wireless networks is that ⇑ Corresponding author at: School of Computer Science and Technology, Zhejiang University of Technology, Hangzhou 310023, China. Tel.: +86 15258866460. E-mail addresses: [email protected] (K. Chi), [email protected] (Y.-h. Zhu), [email protected] (X. Jiang), [email protected] (X. Tian). 1389-1286/$ - see front matter Ó 2013 Elsevier B.V. All rights reserved. http://dx.doi.org/10.1016/j.bjp.2013.12.017

they suffer from a severe throughput limitation and do not scale well as the number of network nodes increases [1–3]. Network coding (NC) technique [4], which allows network nodes to perform the coding operation in addition to the traditional routing function, has been proved promising for significantly improving the throughput of wireless networks. The NC was originally proposed to reduce bandwidth consumption and increase the throughput of the multicast session [4], and later was shown to be able to offer benefits for other connection cases as well [5–9]. Some recent studies indicate that network coding can significantly improve network throughput in multihop wireless networks, in particular for unicast traffic, which accounts for a large percentage of the total traffic in such networks.

102

K. Chi et al. / Computer Networks 60 (2014) 101–114

To understand the potential throughput benefits of using NC, two important questions that need to be answered are: under what scenarios NC can improve the throughput and how much throughput improvement we may have under these scenarios. The approaches for answering above questions can be roughly classified as two main categories: experimental studies [10,11] and theoretical analysis [12–22]. Regarding the experimental studies of NC, one typical and practically implemented system is COPE [10], a network coding-based packet forwarding architecture to improve the network throughput for multihop wireless networks. The COPE experimentally implemented an XOR-based network coding sub-layer between IP and MAC layers to evaluate the throughput enhancement from network coding, and the corresponding experimental results there indicate that network coding is able to significantly improve the networks throughput, especially when the network are congested with excessive traffic. For the theoretical analysis of NC-based throughput improvement, the available works mainly focus on the pure coding gain [12,13] or the coding + MAC gain in the typical two-hop wireless relay network [16,17,20–22], where only coding sub-layer or both MAC layer and coding sub-layer are considered in the analysis. Although experimental studies can reveal the practical coding gain under some specified test scenarios, they cannot provide a full and systematic evaluation for all different scenarios. The available theoretical analysis, on the other hand, systematically evaluated the coding gain but largely neglected the primary impact of physical layer parameters (like packet length, bit-rate of channel, etc.). It is notable that the operation way of physical layer significantly affects the network throughput [23]. If the influence of physical layer on network coding is omitted, the analyzed throughput may be much inaccuracy due to the following reasons. First, the coding packets of different flows are simply treated to be with the same length and then the throughput gain of encoding K packets to deliver via a single transmission is inaccurately considered to be K folds. In fact, encoding a small packet with a large packet only provides a limited bandwidth saving as the encoded packet has the same size as the largest one of native packets [10]. Second, the links from relay node to destination nodes are simply treated to be with the same physicallayer transmission rate and then the throughput gain of delivering an encoded packet involving K native packets is inaccurately considered to be K folds. Actually, encoding a packet having a high transmission rate with a packet having a low transmission rate only provides a limited bandwidth saving as the encoded packet must be transmitted with the low transmission rate [25]. So neglecting the impact of physical layer parameters in throughput analysis may lead to a rather inaccurate estimate of throughput gain achieved by using NC. Actually, it may happen that under some scenarios using network coding will even degrade the throughput as compared to the non-coding case, while such scenarios will be misjudged as beneficial when the impact of physical layer is neglected in throughput analysis. As a step toward to a more practical throughput analysis of general NC-based wireless networks, this paper

explores the throughput gain from using NC in the typical two-hop wireless relay network with a careful consideration of interactions among physical layer, MAC layer and coding sub-layer. It is notable that the two-hop wireless relay network, although simple, serves as the basic unit (structure) of creating coding opportunities in general multihop wireless networks [10,13,16,17,22]. Thus, the study on two-hop wireless relay network provides important insights on the throughput gain from using network coding and also lays the foundation for further practical analysis of general NC-based multihop wireless networks. In [26], we have made a preliminary attempt to investigate the throughput with the consideration of physical layer. In this old work, a simple scenario is considered where relay node has the same probability of obtaining transmission opportunities as the source nodes. Additionally, the used analysis model simply treats the dynamics of different queues’ lengths as independent and approximately analyzes the throughput. The work in this article differs from (or improves) the above work in two dimensions. First, the considered scenario is more general. The relay node has ‘‘k-priority’’ to access the medium over source nodes. When k = 1, the considered scenario reduces to the scenario considered in [7]. Second, the Markov chain model proposed in this new work accurately reflects the dependence between the dynamics of different queues’ lengths, and thus helps us accurately obtain the throughput. The main contributions of this paper are summarized as follows: (1) A general theoretical framework based on the embedded Markov chain is proposed to capture the interactions among physical layer, MAC layer and coding sub-layer in a two-hop wireless relay network. (2) Based on the theoretical framework, the close-form expressions of throughput are then derived under both the non-network-coding scheme and the network-coding scheme. (3) The optimal bandwidth allocation problem of the relay node is further explored for throughput maximization, and a coding condition is also provided to clarify the scenarios where network coding does improve the throughput. The rest of this paper is organized as follows. Section 2 introduces two-hop relay networks and also the coding scheme considered in this paper. In Sections 3 and 4, we conduct the throughput analysis for both the non-network-coding scheme and network-coding scheme, respectively. Section 5 provides numerical results and discussions. Finally, Section 6 concludes this paper.

2. System model In this section we first introduce the typical two-hop wireless relay network, and then define the non-network-coding and network-coding schemes adopted in

K. Chi et al. / Computer Networks 60 (2014) 101–114 Table 1 List of notations. Notation

Meaning

Si R Di M Li r 0i ri k

Source node i Relay node Destination node i Buffer size of relay node i Size of the packets transmitted by Si Transmission rate of link Si  > R Transmission rate of link R > Di Ratio of relay node’s transmission opportunities to source node’s transmission opportunities Average length of transmission slot Average amount of data forwarded by relay node per transmission slot Throughput of relay node

T

X

g

our analysis. For clarity, the notations used in this article are summarized in Table 1.

2.1. Two-hop relay networks The two-hop relay wireless network is the basic but essential coding unit of general multihop wireless networks. Some typical two-hop wireless network structures are shown in Fig. 1, where two flows S1  D1 and S2  D2 coexist, and each source node (S1 ; S2 ) is within the transmission range of a node R but out of the transmission range of its corresponding destination node (D1 ; D2 ). As the network throughput is usually limited by those bottleneck nodes where all flows passing through this node almost always have buffered packets, the investigation of throughput gain brought by network coding for such saturated bottleneck nodes is very meaningful. Like much related work [13,20,21], etc., in this work we investigated the saturated case where source nodes S1 and S2 are saturated (i.e., each source node always has backlogged packets to transmit). Node R does not generate its own packets and is only responsible for relaying packets received from a source node to its destination node. Since D2 has or can overhear the packets transmitted from S1 to R and D1 has or can overhear the packets transmitted from S2 to R, coding opportunities are available at node R. We assume that all nodes work on the same channel and thus cannot conduct packet transmission simultaneously. Like the related work [10,13,22], etc., the relay node R uses the queue management mechanism which sets a maximum queue length (i.e., a threshold) in terms of the number of packets for each queue. Each packet occupies one unit of fixed buffer space in the queue, regardless of the size of the packet. When the number of queued packets of a queue exceeds the threshold M, newly received packet is dropped. The relay node has ‘‘k-priority’’ to access the medium over source nodes, namely, it gets k times (k > 0) of the transmission opportunities that another competing source node gets. If k ¼ 1, then the source nodes and relay node have the same medium access probability (called ‘‘equal access’’ mechanism in [13]). Note that, only when the buffer of node R is non-empty, it will compete with source nodes for medium access chance.

103

Denote by L1 the packet size (in bits) of the packets from S1 and by L2 the packet size (in bits) of the packets from S2 . For the four wireless links S1 ! R; S2 ! R; R ! D1 and R ! D2 here, we denote their transmission rates as r01 ; r02 ; r1 and r2 bps, respectively. We assume the rates r01 ; r02 ; r1 and r 2 are well determined so that the links are error-free.1 Note that, in this system model, the physical layer, MAC layer and coding sub-layer are jointly taken into account to accurately evaluate the throughput.

2.2. Non-network-coding scheme We call a packet forwarding scheme without using network coding as Non-NC scheme in this paper. In the Non-NC scheme, node R maintains a FIFO queue that can store up to M packets. If the queue is nonempty, R will compete for the transmission opportunity of next transmission with ‘‘k-priority’’ over source nodes. Once R successfully obtains the transmission opportunity, it simply forwards the head packet in its queue.

2.3. Network-coding scheme We call a packet forwarding scheme with network coding as NC scheme. In the NC scheme considered in this paper, node R maintains two separated queues A and B to store the packets received from S1 and S2 , respectively, and each of them can store up to M=2 packets. If both queues are nonempty, the R applies the bitwise XOR operation to encode the two head packets of A and B together as a coding packet and broadcasts it in its next transmission with the bit-rate of minfr1 ; r2 g. On the other hand, if one queue is nonempty but the other is empty, the packet to be forwarded is just the head of the nonempty queue (we call such packet as a native packet hereafter). When a destination node receives one coding packet from node R, it retrieves its desired packet by applying the bitwise XOR operation between the received coding packet and the packet it possessed. In this paper, the coding gain is defined as the throughput improvement achieved from using network coding as compared with the throughput of Non-NC scheme.

3. Throughput performance of Non-NC scheme In this section, we first develop a Markov chain-based theoretical framework to model the overall behavior of a two-hop wireless relay network with the Non-NC scheme, and then study its throughput performance and also the related throughput optimization problem.2 1 Some rate adaptive mechanisms can be adopted to select an appropriate transmission rate to achieve a quite low packet loss rate. 2 As these typical two-hop wireless networks shown in Fig. 1 share the same logical coding structure, our following analysis applies to each one of them.

104

K. Chi et al. / Computer Networks 60 (2014) 101–114

S1

S2

r1 '

r2'

S1

r1'

R

r1 '

r1

S1 (D2)

D2 D2

r2'

r2

r1

r1

r2

S2 (D1)

R

(a)

r2

S2 (D1)

R

r2'

D1

(b)

(c)

Fig. 1. Basic structures of two-hop wireless relay network having network coding chances. Here node Si transmits packets to node Di via a relay node R. (a) Chain structure: 2 flows in reverse directions. (b) ‘‘X’’ structure: 2 flows intersecting at R. (c) Hybrid structure: 2 flows intersecting at R.

PR 0

PR

PR

PS

PR M -1

1 PS

M

PS

PS

PS

Fig. 2. Embedded Markov chain model for relay’s queue length states in the Non-NC scheme.

3.1. Markov chain model for Non-NC scheme For a two-hop wireless relay network with the Non-NC scheme, the queue length states in relay R can be modeled as an embedded Markov chain shown in Fig. 2, where P0S denotes the transition probability from state 0 to state 1; PS denotes the transition probability from state i to state i þ 1 for i ¼ 1; . . . ; M  1, and PR denotes the transition probability from state i to state i  1 for i ¼ 1; . . . ; M. The embedded observation points are right before each packet transmission by a source node or the relay node, and we call the interval between two consecutive observation points a transmission slot. The transmission slot time is a random variable depending on the length of packet transmitted in this slot, the transmission rate adopted, and the amount of idle time elapsed after the packet transmission inside this slot. Under the assumption that source nodes S1 and S2 are saturated, the amount of idle time is negligible. Notice that the transition from state i to state i  1 occurs if the relay node transmits in the corresponding slot. As the relay node has ‘‘k-priority’’ to access the medium over the source nodes, the transition probability PR can be determined as

PR ¼ k=ðk þ 2Þ: The transition from state j to state j þ 1 occurs if one of the source nodes transmits in the corresponding slot. Specifically, the transition probability P0S (resp. P S ) is just the probability that one of the source nodes transmits in the corresponding slot under the condition that the buffer of relay node is empty (resp. non-empty). Thus, we have

P0S ¼ 1;

Lemma 1. The Markov chain of the Non-NC scheme is finite, irreducible and non-periodic. Proof. The state space of this Markov chain is finite as it has M þ 1 states. Additionally, a state i ði 2 f0; 1; . . . ; MgÞ is reachable from any other state j ðj 2 f0; 1; . . . ; Mg n figÞ because if the Markov chain starts in state j, then state i can be reached with a non-zero probability after jj  ij-step transition. So this Markov chain is irreducible. Finally, we show that this Markov chain is non-periodic by showing that any state i is non-periodic. The period di of state i is the greatest integer such that the n-step transition probabilðnÞ

ity P ii ¼ 0 unless n is a multiple of di . For an arbitrary nonnegative integer k, there exists a ð2ðM  iÞ þ kÞ-step transition from state i to itself with a non-zero transition probabilk

zfflfflfflfflfflfflfflfflfflfflffl}|fflfflfflfflfflfflfflfflfflfflffl{ ity: i ! i þ 1 ! . . . ! M ! . . . ! M ! M  1 ! . . . ! i. So di ¼ 1 and consequently state i is non-periodic. Since the Markov chain of the Non-NC scheme shown in Fig. 2 is finite, irreducible and non-periodic, it possesses a steady-state distribution to which the distribution converges, starting from any initial state. Based on the results for P R ; P 0S and P S , we now have the following lemma regarding the steady-state probability distribution of this embedded Markov chain. Lemma 2. In the Markov chain model of the Non-NC scheme, let PðnÞ denote its steady-state probability that the number of packets in the buffer of node R is n; 0 6 n 6 M, then we have M

Pð0Þ ¼

2k

 ðk þ 2Þ2M

ð1Þ

;

and

and

PS ¼ 2=ðk þ 2Þ:

ðk  2Þk Mþ1

PðnÞ ¼

ðk  2Þðk þ 2Þk 2k

Mþ1

2M1

 ðk þ 2Þ2M

 n1 2 ; 1 6 n 6 M: k

ð2Þ

105

K. Chi et al. / Computer Networks 60 (2014) 101–114

Proof. Notice that in the steady-state, the probability of transitions from state n  1 to state n is equal to the probability of transitions from state n to state n  1. Therefore, the balance equations for the concerned Markov chain can be determined as

Pð1Þ ¼

P0S Pð0Þ; PR

Pðn þ 1Þ ¼

ð3Þ

PS PðnÞ; n P 1; PR

ð4Þ

and

We further analyze the average amount of data X forwarded by relay R per transmission slot. When the process is in state 0, the consequent packet transmission is conducted by either S1 or S2 , and thus R does not forward any data. When the process is in non-zero states, R has  to obtain the consequent transmisthe probability PðRj0Þ sion chance. Once R transmits one packet, the average amount of data is ðL1 þ L2 Þ=2. Therefore

  PðRj0Þ  X ¼ Pð0Þ ¼

M X PðiÞ ¼ 1:

k

Mþ1

Mþ1

4k

L1 þ L2 2

 2M k

 ðk þ 2Þ2Mþ1

ðL1 þ L2 Þ:

ð8Þ

ð5Þ

i¼0

By solving these equations, the results (1) and (2) then follow. h

The result (6) then comes directly by substituting (7) and (8) into formula gM;k ¼ X=T. 3.3. Optimal bandwidth allocation

3.2. Throughput analysis We are now ready to establish the following theorem about the throughput of the Non-NC scheme. Theorem 1. For the Non-NC scheme with buffer size M and k-priority at relay node R, its throughput gM;k is given by Mþ1

gM;k ¼

k Mþ1

ðk

where qu ¼

Mþ1

2



L1 r 01

 2M k

Þqu þ ðk

Mþ1

 2M kÞqd

;

ð6Þ

   þ Lr02 =ðL1 þ L2 Þ and qd ¼ Lr11 þ Lr22 =ðL1 þ L2 Þ.

The transmission priority k actually determines the bandwidth sharing among the source nodes and the relay node. This section explores the optimal setting of k (and thus an optimal bandwidth allocation) for throughput maximization, as summarized in the following Corollary. Corollary 1. For the Non-NC scheme with buffer size M in the relay node, the corresponding maximum throughput gM is achieved at k ¼ 1, where

2

Proof. We first analyze the average length T of transmission slot. Let PðSj jiÞ be the probability that Sj obtains the transmission chance when the Markov chain is currently in state i, and let PðRjiÞ be the probability that R obtains the transmission chance when the Markov chain is currently in state i. If the Markov chain is currently in state 0, then the probability that S1 obtains the transmission chance is equal to that of S2 obtaining the transmission chance due to the symmetry of two flows, i.e., PðS1 j0Þ ¼ PðS2 j0Þ ¼ 0:5. In state 0, relay node will not compete for the consequent transmission chance since its buffer is empty.  to denote all non-zero states, and use Pð0Þ  to We use 0 denote the overall probability of all non-zero states, i.e.,  ¼ 1  Pð0Þ. If the chain is currently in non-zero states, Pð0Þ the probability of S1 obtaining the transmission chance is  ¼ 1 , the probability of S2 obtaining the transmisPðS1 j0Þ kþ2  ¼ 1 and the probability of R sion chance is PðS2 j0Þ kþ2  ¼ k . obtaining the transmission chance is PðRj0Þ kþ2 Therefore,

L1 L2  þ Pð0Þ  PðS2 j0Þ 0 þ Pð0Þ r 01 r2    L1 þ Pð0Þ   PðS2 j0Þ  L2 þ Pð0Þ   PðRj0Þ  L1 þ L2 =2  PðS1 j0Þ r01 r0 r1 r2   2   Mþ1 M Mþ1 M L1 L2 L1 L2 ðk 2 Þ r0 þ r0 þ ðk  2 Þk r1 þ r2 1 2 ¼ : ð7Þ Mþ1 4k  ðk þ 2Þ2Mþ1

gM ¼

1

qu þ qd

ð9Þ

:

Proof. We first prove that for any M, the throughput gM;k increases monotonously as priority k increases. Notice that the derivative of the function gM;k with respective to k is given by dgM;k ¼h dk

Mþ1

Mk ðk

Mþ1

M

 2ðM þ 1Þk þ 2Mþ1

 2Mþ1 Þqu þ ðk M

¼

Mþ1

 2M kÞqd

M1

i2 2

M

qu

M2

ðk  2ÞðMk  2k  22 k  . . .  2M1 k  2M Þ M 2 qu : h i2 Mþ1 Mþ1  2Mþ1 Þqu þ ðk  2M kÞqd ðk ð10Þ

We now show that

dgM;k dk

> 0 holds for any k > 0.

(1) Scenario 1: 0 < k < 2. In this scenario, k  2 < 0 and M

Mk  2k M

M1

 22 k M1

< Mk  kk

T ¼ Pð0Þ  PðS1 j0Þ

Thus

dgM;k dk

M2

 . . .  2M1 k  2M

2 M2

k k

 ...  k

M1

M

k  k ¼ 0:

> 0 when 0 < k < 2.

(2) Scenario 2: k ¼ 2. When k ¼ 2, it is not hard to see dg M that dkM;k ¼ 2Mþ2 ðMþ1Þð > 0. q þq Þ2 u

d

(3) Scenario 3: k > 2. In this case, we have k  2 > 0 and

106

K. Chi et al. / Computer Networks 60 (2014) 101–114

PR 0, 0 PB

PR

PA PR

PB

PA

0, 1

1, 1 PB

PR

PB

PR

PB

PR

PR

PA PR

PA PR

PR

0. M

PA

PA

PR

PR

PB

PA

1, M

PB

PB

PA PR

M-1, 1

PA

PA

PA PR

PR PA

PA

PB M-1, M-1 PB M-1, M

M, 0 PB M, 1

PR

PA

PA PR PA

PB M, M-1

PA

PB M, M

PB

PB

PA

PB

PB

PR

1, M-1

PR M-1, 0

PB

PA

0, M-1 PB

PR 1, 0

PA+PB

Fig. 3. The embedded Markov chain of relay’s buffer states for the NC scheme.

M

Mk  2k

M1

 22 k

M

¼ ðMk Þ  ð2k > ð2k

M1

þ 22 k

M2

M1

2 M2

þ2 k

M2

 . . .  2M1 k  2M 2 M2

M1

þ2 k

þ ... þ 2 M1

þ ... þ 2

M

kþ2 Þ M1

M

k þ 2 Þ  ð2k

þ . . . þ 2M1 k þ 2M Þ

¼ 0: Thus

dgM;k dk

> 0 when k > 2. dg

Summarizing (1), (2) and (3) we know that dkM;k > 0 always holds for any k > 0. Thus, the maximum throughput gM for any given buffer size M is given by

gM ¼ lim gM;k ¼ k!1

1

qu þ qd

: 

ð11Þ

Remark. The reason behind this conclusion is as follows. Buffer overflow occurring at the relay node R wastes the bandwidth of links S1 ! R and S2 ! R. Given the buffer size M, the buffer overflow probability decreases with the increasing k because a larger medium access probability makes the relay node drain its buffered packets faster. If k is set to infinity, once the relay receives one packet, it competes with the source nodes and definitely get the medium access chance to deliver this newly received packet. Therefore, whatever the buffer size is, the buffer overflow never occur (i.e., each received packet will be delivered to its destination) and the same maximum throughput is achieved. Case Study: Based on above results, we can easily see that for the simple homogeneous scenario with r1 ¼ r 2 ¼ r 01 ¼ r 02 ¼ r and L1 ¼ L2 , we have qu ¼ qd ¼ 1=r and

r 2

gM ¼ :

This can be explained as follows. On one hand, as the access priority k of R is large enough, there is no packet loss due to buffer overflow inside R (even for a very small M) and each received packet at R will be forwarded to its destination; on the other hand, successful delivery of one packet from the source to the destination consumes two transmission slots (one on the uplink from the source to R and the other on the downlink from R to the destination). 4. The NC scheme In this section, we first develop a more powerful twodimensional Markov chain model to capture the overall behavior of two-hop wireless relay network with the NC scheme, we then explore the corresponding throughput performance and the related throughput optimization problem. 4.1. Markov chain model for NC scheme For the sake of readability, we assume that in the NC scheme each of queues A and B can store up to M packets rather than M=2 packets in throughput analysis.3 For the NC scheme, we use a two-tuple ðn; mÞ to denote the queue length state at relay node R, where n and m denote the queue length of queues A and B, respectively. The transitions of queue length state at node R can then be modeled as a two-dimensional embedded Markov chain shown in Fig. 3. The embedded points are right before each packet transmission by a source node or the relay node. In this Markov chain, PR denotes the transition probability either from ðn; mÞ to ðn  1; m  1Þ, from ðn; 0Þ to ðn  1; 0Þ or from ð0; mÞ to ð0; m  1Þ; P0A (resp. P 0B ) denotes 3 However, for a fair performance comparison between the Non-NC scheme and NC scheme in Section 5, the buffer size for each of queues A and B is still assumed as M=2 packets there.

K. Chi et al. / Computer Networks 60 (2014) 101–114

the transition probability from ð0; 0Þ to ð1; 0Þ (resp. state ð0; 1Þ), and PA (resp. P B ) denotes the transition probability from ðn; mÞ to ðn þ 1; mÞ (resp. to ðn; m þ 1Þ) when at least one of n and m is non-zero. Notice that the transition either from ðn; mÞ to ðn  1; m  1Þ, from ðn; 0Þ to ðn  1; 0Þ or from ð0; mÞ to ð0; m  1Þ occur when the relay node successfully gets the transmission chance and also the relay node has ‘‘k-priority’’ to access the medium over two source nodes. Thus, the transition probability P R can be determined as

PR ¼ k=ðk þ 2Þ: Since P 0A (resp. P 0B ) is just the probability that the source S1 (resp. S2 ) obtains the transmission chance when the relay node does not compete for medium access, we have

P0A ¼ P0B ¼ 1=2: When at least one of n and m is non-zero, the transition from ðn; mÞ to ðn þ 1; mÞ occurs when S1 gets the transmission chance, and the transition from ðn; mÞ to ðn; m þ 1Þ occurs when S2 gets the transmission chance. Thus, PA (resp. P B ) is just the probability that S1 (resp. S2 ) obtains the transmission opportunity when the relay node R also competes for medium access, so we have

PA ¼ PB ¼ 1=ðk þ 2Þ: Remark: It is notable that this two-dimensional embedded Markov chain can capture the complicated interactions among the physical layer, MAC layer and coding sub-layer. The medium access priority k at the MAC layer determines the frequency of medium access (i.e., P A ; PB and P R ) and consequently determines the probability of having coding opportunity at the coding sub-layer (i.e., the steady-state probability of states ðn; mÞ with n P 1 and m P 1.). Conversely, the number of coding opportunities influences the buffer-overflow-induced packet loss probability at the data link layer. The packet sizes (L1 and L2 ) and the bit-rates (r 1 and r 2 ) at the physical layer jointly determine the transmission slot length and consequently determine the coding gain achieved from transmitting one coding packet at the relay node. 4.2. Throughput analysis Again, we use T to denote the average transmission slot length in time and use X to denote the average amount of data forwarded by relay R per transmission slot. Then the throughput gM;k under the NC scheme is given by

gM;k ¼ X=T:

Lemma 3. The Markov chain of the NC scheme is finite, irreducible and non-periodic. The proof of this lemma is similar to that of Lemma 1. So we omit this proof due to the limit of space. Since the finite-state Markov chain of the NC scheme in Fig. 3 is finite, irreducible and non-periodic, it possesses a steadystate distribution. Based on this Markov chain model, we have the following lemma regarding the calculation of T:

107

Lemma 4. We use Q ðn; mÞ to denote the steady-state probability of state ðn; mÞ, and use Q A ðnÞ (resp. Q B ðnÞ) to denote the steady-state probability that the number of packets in queue A (resp. in queue B) is n. The average transmission slot length T under the NC scheme is then determined as





  1 k L1 L2 þ Q ð0; 0Þ þ k þ 2 2ðk þ 2Þ r 01 r 02 " # Mþ1 M Mþ1 k k 3k k2 þ  Q ð0; 0Þ Mþ1 Mþ1 k 1  1Þ 2ðk   k L1 L2 þ  k þ 2 r1 r2 " Mþ1 # M Mþ1 k þ 2k  1 2k k1 þ Q ð0; 0Þ þ Mþ1 Mþ1 1 1 k k 

k maxfL1 ; L2 g k þ 2 minfr1 ; r 2 g

ð12Þ

Proof. In state (0, 0), only nodes S1 and S2 compete for the consequent transmission chance. In those states (0, m) where m P 1, relay node R will compete for the transmission chance, and R will send the packet of size L2 with bit-rate r2 if it wins the transmission chance. Similarly, in those states (n, 0) where n P 1, relay node R will also compete for the transmission chance, but R will send the packet of size L1 with bit-rate r1 if it wins the transmission chance. In more general states (n; m) where n P 1 and m P 1, relay node R will compete for the transmission chance and it will send the coding packet of size maxfL1 ; L2 g with bit-rate minfr1 ; r 2 g if it wins the transmission chance. Therefore, we have   L1 L2 T ¼ Q ð0; 0Þ P0A 0 þ P 0B 0 r1 r2   M X L1 L2 L2 Q ð0; mÞ P A 0 þ P B 0 þ P R þ r1 r2 r2 m¼1   M X L1 L2 L1 þ Q ðn; 0Þ PA 0 þ P B 0 þ PR r1 r2 r1 n¼1   M X M X L1 L2 maxfL1 ; L2 g þ Q ðn; mÞ P A 0 þ P B 0 þ P R minfr 1 ; r 2 g r1 r2 n¼1 m¼1   L1 L2 ¼ Q ð0; 0Þ P0A 0 þ P 0B 0 þ ½Q A ð0Þ r1 r2   L1 L2 L2  Q ð0; 0Þ PA 0 þ P B 0 þ PR þ ½Q B ð0Þ r1 r2 r2   L1 L2 L1  Q ð0; 0Þ PA 0 þ P B 0 þ PR þ ½1  Q A ð0Þ  Q B ð0Þ r1 r2 r1   L1 L2 maxfL1 ; L2 g þ Q ð0; 0Þ PA 0 þ P B 0 þ PR : minfr 1 ; r 2 g r1 r2    1 k L1 L2 ¼ þ Qð0; 0Þ þ k þ 2 2ðk þ 2Þ r 01 r 02 k L2 k L1 þ ½Q A ð0Þ  Q ð0; 0Þ k þ 2 r2 k þ 2 r1 k maxfL1 ; L2 g þ ½1  Q A ð0Þ  Q B ð0Þ þ Qð0; 0Þ k þ 2 minfr 1 ; r 2 g

þ ½Q A ð0Þ  Q ð0; 0Þ

ð13Þ

108

K. Chi et al. / Computer Networks 60 (2014) 101–114

PB

PB PR 0

1 P'

PR

PR

PR M-1

1 P'

M

PA

PA

PA+PB

PA

Fig. 4. The embedded Markov chain of queue A’s states for the NC scheme.

Now we show that Q A ð0Þ and Q B ð0Þ can be calculated based on Q ð0; 0Þ. Similar to that of the Non-NC scheme, the state transition of queue A (resp. queue B) can be also modeled as an embedded Markov chain shown in Fig. 4, where P0 denotes the transition probability from state 0 to state 1; P A denotes the transition probability from state i to state i þ 1 for i ¼ 1; . . . ; M  1, and P R denotes the transition probability from state i to state i  1 for i ¼ 1; . . . ; M. Notice that for the Markov chain shown in Fig. 3, the transition probability from state (0, 0) to state (1, 0) is P0A and the transition probability from any state (0, i) with i P 1 to state (1, i) is P A . Therefore, the transition probability P0 in Fig. 4 can be expressed as

P0 ¼ P0A

  Q ð0; 0Þ Q ð0; 0Þ : þ PA 1  Q A ð0Þ Q A ð0Þ

ð14Þ

In the steady-state, the frequency of transitions from n  1 to n is equal to the frequency of transitions from n to n  1. Therefore, the detailed balance equations are expressed as

Q A ð1Þ ¼

P0 1 1 Q ð0Þ ¼ Q A ð0Þ þ Q ð0; 0Þ k 2 PR A

and

Q A ðn þ 1Þ ¼

PA 1 Q ðnÞ ¼ Q A ðnÞ; n P 1: k PR A

Notice also that

The above formula also holds for Q B ð0Þ. We then have the formula (12) by substituting the above expressions for Q A ð0Þ and Q B ð0Þ into (13). h About the calculation of X, we have the following lemma. Lemma 5. Under the NC scheme, the average amount of data X forwarded by the relay per transmission slot is

"



By solving the above balance equations and the normalized condition of probability, the steady-state probability Q A ð0Þ is expressed by Mþ1

k

M

k

Mþ1

1

þ

Mþ1 Mþ1

2ðk

k  1Þ

# Qð0; 0Þ

k ðL1 þ L2 Þ: kþ2

ð16Þ

Proof. In state (0, 0), the consequent packet transmission is conducted by either S1 or S2 and R does not forward any packet. For those states (0, m) where m P 1; R has the probability P R to obtain the consequent transmission chance, and R will be able to transmit L2 amount of data when it wins transmission chance there. Similarly, in those states (n, 0) where n P 1; R also has the probability PR to obtain the consequent transmission chance, but the amount of data it can transmit becomes L1 then. For those states (n; m) where n P 1 and m P 1; R still has the probability P R to obtain the consequent transmission chance, and the amount of data it can transmit will be L1 þ L2 .

n¼0

k

k

Mþ1

k

Therefore, we have

M X Q A ðnÞ ¼ 1:

Q A ð0Þ ¼

M

k 1

1



k

Mþ1

2ðk

Mþ1

k  1Þ

Q ð0; 0Þ:

ð15Þ



M X

Q ð0; mÞP R L1 þ

m¼1

M M X M X X Q ðn; 0ÞPR L2 þ Q ðn; mÞPR ðL1 n¼1

n¼1 m¼1

þ L2 Þ k k L1 þ ½Q B ð0Þ  Qð0; 0Þ L2 kþ2 kþ2 k þ ½1  Q A ð0Þ  Q B ð0Þ þ Q ð0; 0Þ ðL1 þ L2 Þ kþ2 " M # Mþ1 k 1 k k k þ Qð0; 0Þ ðL1 þ L2 Þ:  ¼ Mþ1 Mþ1 kþ2  1 2ðk  1Þ k

¼ ½Q A ð0Þ  Q ð0; 0Þ

The formulas (12) and (16) indicate clearly that we still need to determine Q ð0; 0Þ for the calculation of both T and X. It is notable, however, that it is very challenging (if not impossible) to derive the exact close-form expression for Q ð0; 0Þ due to the large number of states and the complex correlations among the states. Here, we provide an approximation of Q ð0; 0Þ based on Kleinrock’s independence assumption between two buffers [24], under which the actions of both buffers are considered as independent from each other.4

Fig. 5. Throughput r2 ¼ 2 Mbps, L1 ¼ L2 .

versus

buffer

size

M.

r 01 ¼ r 02 ¼ r 1 ¼ 1 Mbps,

4 As to be verified in Section 5, even with this approximation our analysis is still very efficient in capturing the throughput performance of the NC scheme.

109

K. Chi et al. / Computer Networks 60 (2014) 101–114

Lemma 6. Under the Kleinrock’s independence assumption that the actions of two buffers in the relay node are considered as independent each other, we have Q ð0;0Þ ¼

k 4k

2Mþ2

 2k

2M1

2M

þk

3

2

ð2k  3k þ 1Þ

2M1

 2k

Mþ2

 4k

Mþ1

þkþ2

ð17Þ

:

qu ¼

  L1 L2 =ðL1 þ L2 Þ; þ r 01 r02

qd ¼

  L1 L2 =ðL1 þ L2 Þ; þ r1 r2

and Proof. Based on the Kleinrock’s independent assumption, we have

Q ðn þ 1; mÞ ¼ Q ðn; m þ 1Þ ¼

PA Q ðn; mÞ; PR

ð18Þ

for all ðn; mÞ – ð0; 0Þ. In the Markov chain shown in Fig. 3, we can easily see that

Q ð0; 0Þ ¼ Q ð0; 1ÞPR þ Qð1; 0ÞPR þ Q ð1; 1ÞPR : Due to the symmetry of two flows, Q ð0; 1Þ ¼ Q ð1; 0Þ. Also, we can know from Eq. (18) that Q ð1; 1Þ ¼ PPAR Q ð0; 1Þ. Thus, the above equation can be arranged as

Q ð0; 1Þ ¼ Q ð1; 0Þ ¼

1 kþ2 Q ð0; 0Þ ¼ Q ð0; 0Þ: 2P R þ PA 2k þ 1

From (18) we know that for all ðn; mÞ – ð0; 0Þ,

Q ðn; mÞ ¼

 nþm1  nþm1 PA PA kþ2 Q ð0; 1Þ ¼ Q ð0; 0Þ: 2k þ 1 PR PR

P PM Based on the fact that M n¼0 m¼0 Q ðn; mÞ ¼ 1, we can see that Q ð0; 0Þ is determined by (17). h By substituting (17) into (12) and (16) and then substituting (12) and (16) into gM;k ¼ X=T, we have the following theorem regarding the throughput under the NC Scheme. Theorem 2. Under the NC scheme with buffer size of M and k priority at relay node, the corresponding throughput is

K1 ; K 2 qu þ K 3 qd þ K 4 qc

gM;k ¼

qc ¼

maxfL1 ; L2 g =ðL1 þ L2 Þ: minfr 1 ; r 2 g

4.3. Optimal bandwidth allocation under infinite-buffer case We can see from (19) clearly that the throughput under the NC scheme is highly dependent on the medium access priority (k) of the relay node. Therefore, it is important to know the optimal setting of k to achieve the maximum throughput for a given buffer size M. However, the formula (19) is too complex for us to derive a close-form expression for the optimal setting of k for a given buffer size.5 As illustrated in Fig. 5 that a larger buffer size will result in a lower probability of buffer overflow and also a higher throughput, thus the throughput for the case M ¼ 1 serves as an upper limit on system throughput. In this subsection, we will focus on the special case when M ¼ 1 and explore the corresponding optimal setting of k for the throughput maximization. Based on (19), we can easily see that when M ¼ 1, the corresponding throughput g1;k for a given k is given by 8 0 > > > k > > < qu þkqc

g1;k ¼

ifk ¼ 0; if0 < k < 1;

1

ifk ¼ 1;

> qu þqc > > > > : 4

2k4 þ5k3 3kþ2 ð2k þ5k3 3kþ2Þqu þð2k4 þk3 4k2 þ3k2Þqd þð4k3 þ4k2 6kþ4Þqc

ð20Þ

We then have the following theorem regarding the optimal setting of k when M ¼ 1.

ð19Þ Theorem 3. For case when M ¼ 1, if qd > qc maxfL1 ;L2 g minfr 1 ;r 2 g Þ,

where

ifk > 1:

 1

the maximum throughput g



i:e:; Lr11 þ Lr22 >

is achieved at k ¼ 1,

where 3Mþ4

K1 ¼ k

þ 2:5k 2Mþ3

 4:5k þ 5k

Mþ2

3Mþ4

K2 ¼ k

3Mþ3

 4k

2Mþ2

Mþ1

þ 2k

þ 2:5k 2Mþ2

 6:5k

 1:5k

3Mþ3

3Mþ1

þ 1:5k

þk

2Mþ1

3M

k

2Mþ4

2M

g1 ¼

Mþ3

k

þ 2k

 1 ;L2 g , the maximum throughput if qd ¼ qc i:e:; Lr11 þ Lr22 ¼ maxfL minfr 1 ;r 2 g g1 is achieved at any k 2 ½1; 1Þ, where

2

2M

þ 1:5k

3Mþ1

k

2M1

þk

3M

þ 3k

 3k

Mþ2

2Mþ3

þ 6k

Mþ1

k

 2; 3Mþ4

K3 ¼ k

3Mþ3

þ 0:5k 2Mþ3

 1:5k  2k K 4 ¼ 2k

Mþ1

3Mþ3

2Mþ2

3Mþ2

þ 1:5k

3Mþ1

2Mþ1

þk

þ 2k

3M

þ 0:5k

2M

3M

k

Mþ3

þk

k

g1 ¼

þk

;



 1 ;L2 g , the maximum throughput if qd < qc i:e:; Lr11 þ Lr22 < maxfL minfr 1 ;r 2 g g1 is achieved at k ¼ 1, where

2Mþ4 Mþ2

1

qu þ qc

g1 ¼

1

qu þ qd

:

; 3Mþ2

þ 2k

2Mþ1

þk

þk

 2k

;



 k  2k;  1:5k

1

qu þ qc

2M

 2k

 3k

þk

3Mþ1

Mþ3

Mþ2

þ 4k

 3k

þ 4k

2Mþ3

Mþ1

2Mþ2

 5k 2

 k  2k;

5 Although it is difficult to derive a close-form expression for the optimal setting of k, numerical method can be applied to obtain an approximation of such a setting for any given buffer size M.

110

K. Chi et al. / Computer Networks 60 (2014) 101–114

Proof. In (20), it is clear that

k

qu þkqc


1

u þqc

for any

0 < k < 1, i.e., the throughput achieved by setting k to 1 is higher than that achieved by setting k to any value less than one. Now we analyze whether gM¼1;k monotonically decreases (or increases) with increasing k in the period k P 1. It can be derived that, for k > 1, dgM¼1;k ¼h dk

2

3

2

4kðk þ 2Þ ð2k þ 4k  4k þ 1Þðqd  qc Þ 4

3

4

3

2

3

2

ð2k þ 5k  3k þ 2Þqu þ ð2k þ k  4k þ 3k  2Þqd þ ð4k þ 4k  6k þ 4Þqc

As 2

2

2k þ 4k  4k þ 1 ¼ 2kðk  1Þ þ ð1  2kÞ 2

< 2kðk  1Þ < 0; dgM¼1;k dk dgM¼1;k dk

case 1:

L1 r1

1 ;L2 g þ Lr22 > maxfL , minfr 1 ;r 2 g

case 2:

L1 r1

1 ;L2 g þ Lr22 ¼ maxfL , minfr 1 ;r 2 g

case 3:

L1 r1

1 ;L2 g þ Lr22 < maxfL . minfr 1 ;r 2 g

i2 :

ð21Þ

3

Non-NC scheme and the NC scheme. For the fixed setting of M ¼ 20, we considered three different network cases:

dg

< 0 when qd > qc ; M¼1;k ¼ 0 when qd ¼ qc , and dk > 0 when qd < qc . Then we easily get the conclusion of this theorem. h

For each network case, different settings of parameter k have been examined. The corresponding simulation results and theoretical results are summarized in Table 2. From this table, we can see that the analytical results nicely match the simulation results, so the proposed throughput analysis model can be used to efficiently investigate the throughput performance of the Non-NC scheme and the NC scheme. The results shown below are all obtained from the presented throughput analysis model. 5.2. Impact of buffer size and bandwidth allocation

Remark. Having this theorem and Corollary 1, we can know that in the case that qd > qc , by tuning the relay’s access priority to an appropriate value the NC scheme has a larger throughput than the Non-NC scheme; in the qd ¼ qc , the NC scheme achieves the same maximal throughput as the Non-NC scheme; in the case that qd < qc , the NC scheme with a finite access priority k achieves a lower throughput than the Non-NC scheme and the NC scheme with infinite access priority reduces to the Non-NC scheme. Now we draw the following coding condition to clarify the scenarios where network coding does improve the throughput. Corollary 2. In the two-hop wireless networks with an infinite buffer size, the coding condition is

L1 L2 maxfL1 ; L2 g þ P : minfr 1 ; r2 g r1 r2

ð22Þ

Although we just proved that this corollary holds for the infinite-buffer case, we will show in the next section that this coding condition actually also holds for the practical finite-buffer cases.

5. Numerical results and discussion In this section, we first verify the analytical results derived above, then explore the effect of buffer size and bandwidth allocation on throughput, and finally further highlight the coding condition. We implement a discrete-event simulator to evaluate the throughput performance of the Non-NC scheme and the NC scheme. For the Non-NC scheme, the relay node maintains a single FIFO queue bounded at M packets. For fairness of comparison, for the NC scheme, the relay node maintains two separated queues, each of which is bounded at M=2 packets.

Fig. 6 shows the throughput under different buffer sizes and different transmission priorities of relay node for three different cases introduced above. From this figure, we can get the following conclusions. First of all, for both the Non-NC scheme and NC scheme, it is straightforward that the larger the buffer size is, the better the throughput performance is. Also, the throughput greatly depends on the relay’s access priority. For the Non-NC scheme, in all three cases, one can clearly see that given the buffer size (M) the throughput increases as the transmission priority (k) of relay node increases. In each case, the same maximum throughput can be achieved for different buffer sizes (even for M ¼ 1) when k is large enough. This is consistent with the conclusion given in Corollary 1. However, to approximately achieve the maximum throughput, a smaller buffer size requires a larger transmission priority of relay node. For instance, we can observe in Fig. 6(a) that when M ¼ 16 the maximum throughput can be approximately achieved by setting k to 2.5 and when M ¼ 4 the same maximum throughput can also be approximately achieved by setting k to 5.5. The reason behind is that a smaller buffer size will lead to a higher buffer overflow probability and thus needs a larger transmission priority to drain the buffered packet faster. In addition, no matter how large the buffer size is, Table 2 Comparison between simulation and theoretical results for model validation, M ¼ 20; r 01 ¼ r 02 ¼ 1 Mbps;r 1 ¼ 1 Mbps;r 2 ¼ 2 Mbps, theoretical/ simulated. Throughput (Mbps) NC scheme

L1 ¼ L2

k ¼ 0:5 k ¼ 1:0 k ¼ 2:0

0.2105/0.2107 0.3636/0.3646 0.5556/0.5555

0.3998/0.3998 0.6167/0.6179 0.6236/0.6246

2L1 ¼ L2

k ¼ 0:5 k ¼ 1:0 k ¼ 2:0

0.2142/0.2140 0.3750/0.3746 0.5825/0.5823

0.3749/0.3746 0.5660/0.5655 0.5998/0.5999

5L1 ¼ L2

k ¼ 0:5 k ¼ 1:0 k ¼ 2:0

0.2181/0.2183 0.3871/0.3888 0.6123/0.6114

0.3528/0.3532 0.5234/0.5229 0.5778/0.5767

5.1. Analytical model validation Extensive simulation studies have been conducted to verify the correctness of throughput analyzes of both the

Non-NC scheme

111

K. Chi et al. / Computer Networks 60 (2014) 101–114

For the NC scheme, in case 1, for any specific buffer size (M), there exist an optimal value of k that maximizes the bandwidth efficiency. With a larger buffer size, the optimal value of k is smaller while the throughput is higher. The reason behind is that a larger buffer size leads to a smaller probability of buffer overflow. Table 3 shows that an adequate buffer size, say 24, is enough to approximately achieve the maximum throughput. Moreover, as buffer size M increases to infinity, the corresponding optimal value of k approaches asymptotically to one. It should be noted that, when the buffer size is adequately large (say 16), the optimal value of k is already approximately equal to one. Thus, for many practical cases with an adequate buffer size, this optimal value is approximately equal to one, that is to say, the ‘‘equal access’’ (i.e., k ¼ 1) is very close to the optimal. In case 2, for any buffer size the NC scheme can achieve the same maximum throughput as that of infinite-buffer case when setting k to be any value larger than a threshold. This threshold decreases to one as the buffer size increases (as shown in Theorem 3). When the buffer size is adequately large (say 32), the threshold is approximately equal to one. The Non-NC scheme also approximately achieves the same maximum throughput at the cost of a larger buffer size and k. In case 3, sending a coding packet will consume more time than sending the packets separately. In such case, as k increases, the throughput increases because the coding opportunities decreases. When k is infinity, all the coding opportunities are diminished and the NC scheme reduces to the Non-NC scheme. For any specific buffer size and relay node’s access priority, the NC scheme achieves lower throughput than the Non-NC scheme. Above all, we conclude that the conclusions on the optimal setting of k and the maximal throughput in the infinite-buffer case (described in Theorem 3) approximately holds in the cases that the buffer size is adequately large.

(a)

(b)

(c)

5.3. Discussion of coding condition

Fig. 6. Throughput under different bandwidth allocations in three different cases. (a) Case 1: r 01 ¼ r 02 ¼ r 1 ¼ 1 Mbps, r 2 ¼ 2 Mbps, L1 ¼ L2 . (b) Case 2: r01 ¼ r 02 ¼ r 1 ¼ 1 Mbps, r 2 ¼ 2 Mbps, 2L1 ¼ L2 . (c) Case 3: r01 ¼ r 02 ¼ r 1 ¼ 1 Mbps, r 2 ¼ 2 Mbps, 5L1 ¼ L2 .

to achieve the maximum throughput k is always larger than or equal to 2. When the buffer size is infinite, k ¼ 2 can achieve this maximum throughput.

Now, we discuss the coding condition for determining which scenarios network coding can really improve the throughput. Note that here the maximum throughput of Non-NC scheme is used as baseline to compare with. In Fig. 6, we have the following observations. In case 1, for any buffer size, the coding gain is positive when k is set to its optimal value. In case 2, the coding gain is zero when k is set to an adequately large value. Thus, in the networks where the relay node’s priority can be tuned to the optimal value, we cannot get any throughput gain from using network coding in case 2.

Table 3 The achievable maximal throughput under different buffer sizes for the NC scheme in case 1: r 01 ¼ r 02 ¼ r 1 ¼ 1 Mbps, r 2 ¼ 2 Mbps, L1 ¼ L2 . M gM ðMbpsÞ

4

8

12

16

20

24

28

32

1

0.585

0.611

0.625

0.633

0.638

0.642

0.645

0.647

0.667

112

K. Chi et al. / Computer Networks 60 (2014) 101–114

In case 3, whatever the buffer size is, network coding not only increases the operation complexity of relay node but also reduces throughput. Therefore, in this case, the traditional Non-NC scheme is preferable. In conclusion, although we obtained the coding condi1 ;L2 g tion Lr11 þ Lr22 P maxfL through the rigorous analysis just minfr 1 ;r 2 g for the infinite-buffer case, this coding condition still holds for practical finite-buffer cases. 5.4. Coding gain Here we investigate the network coding gain under different scenarios which satisfy the coding condition. Here, the buffer size of relay node is 32, a moderate value. The transmission rates of two uplinks are fixed to 1 Mbps. Let us first consider the ‘‘optimal access’’ networks (OANETs for short) where the relay node works with the optimal medium access priority. Table 4 lists the coding gain under different values of physical layer parameters. From this table, we can draw the following conclusions. First, in the cases that two flows have the same (or near) packet size, the coding gain is relatively large when the achievable transmission rates of two downlinks are near and the coding gain decreases as the gap between two transmission rates increases. The reason is as follows. The throughput of the Non-NC scheme depends on both two downlinks’ rates. As r 2 increases, the throughput also increases. For the NC scheme, however, its throughput significant depends on the smaller one of two downlinks’ rates as the transmission rate of one encoded packet is limited by the

intended receiver having the worst link quality. As r 2 increases, the throughput almost keeps unchanged. Second, in the cases that two downlinks’ rates are same (or near), the coding gain is relatively large when the packet sizes of two coding flows are near and the coding gain decreases as the gap between L1 and L2 increases. This is because encoding a small packet with a comparable large packet provides a small percentage of bandwidth saving. Third, from the last two lines it can be known that the coding gain is quite small in the cases that one flow’s packet size is greatly larger than the other one and this flow’s corresponding downlink rate is greatly larger than the other one. In the Non-NC scheme, this large packet is transmitted with the large rate, whereas in the NC scheme the coding packet having the same size as the large native packet is transmitted with the small rate. The coding gain will even be a negative value (i.e., the coding condition is not satisfied) if the gaps of packet sizes and the gap of transmission rates are too large. We further consider the ‘‘equal access’’ networks (EANETs for short) where the source nodes and relay node have the fixed and equal medium access priority (like the DCF mode of 802.11). Table 5 lists the coding gain under different values of physical layer parameters. We can observe that the first and second conclusions drawn in the OA-NETs also hold in the EA-NETs. However, the third conclusion drawn in the OA-NETs does not hold in the EANETs. In the EA-NETs, the coding gain is still large in the case that one flow’s packet size is larger than the other one and this flow’s corresponding downlink rate is larger

Table 4 Coding gain achieved in the ‘‘optimal access’’ networks. M ¼ 32; r 01 ¼ r 02 ¼ 1 Mbps. r 1 (Mbps)

1 1 1 1 1 1 1 1 1 1

r 2 (Mbps)

1 2 5.5 11 1 1 1 1 1.5 2

L1 (Bytes)

300 300 300 300 300 300 300 300 300 300

L2 (Bytes)

300 300 300 300 600 900 1200 1500 450 600

Throughput Non-NC scheme

NC scheme

Coding gain (%)

0.500 0.571 0.629 0.647 0.500 0.500 0.500 0.500 0.556 0.600

0.649 0.655 0.661 0.663 0.589 0.563 0.549 0.540 0.616 0.600

29.74 14.59 5.17 2.52 17.74 12.54 9.73 7.94 10.93 0.00

Table 5 Coding gain achieved in the ‘‘equal access’’ networks. M ¼ 32; r 01 ¼ r 02 ¼ 1 Mbps. r 1 (Mbps)

r 2 (Mbps)

L1 (Bytes)

L2 (Bytes)

1 1 1 1 1 1 1 1 1 1

1 2 5.5 11 1 1 1 1 1.5 2

300 300 300 300 300 300 300 300 300 300

300 300 300 300 600 900 1200 1500 450 600

Throughput

Coding gain (%)

Non-NC scheme

NC scheme

0.333 0.364 0.386 0.393 0.333 0.333 0.333 0.333 0.357 0.375

0.647 0.650 0.652 0.652 0.586 0.559 0.544 0.535 0.611 0.589

94.22 78.72 68.90 66.09 75.66 67.72 63.29 60.47 71.02 57.06

K. Chi et al. / Computer Networks 60 (2014) 101–114

than the other one (even when the coding condition is not satisfied). This can be explained by the concept of coding + MAC gain in [10]. In this case, although the time consumed for separately sending packets P 1 and P2 might be even smaller than the time consumed for sending the coding packet P1  P 2 , in the Non-NC scheme the packet arrival rate at the relay is twice of the packet drain rate and many packets are dropped due to buffer overflow, wasting bandwidth considerably. For the NC scheme, however, as the relay is able to deliver two packets in a single transmission, the packet drain rate is near to the packet arrival rate and only a small percentage of packets are dropped due to buffer overflow. The coding gain will be a negative value only if the gaps of packet sizes and the gap of transmission rates are extremely large. 6. Conclusion In this paper, for the essential and important two-hop wireless relay network, we developed a general theoretical framework with a cross-layer consideration of physical layer, MAC layer and coding sub-layer to obtain the close-form expressions of throughput under both the non-network-coding scheme and the network-coding scheme. Based on the analysis results, we clarified that the throughput greatly depends on the transmission priority of the relay node and further analyzed the optimal bandwidth allocation of relay node to maximize the throughput. Numerical results show that in the networks where the relay nodes can turn its medium access priority to the optimal value, using network coding can even be harmful in some scenarios. We provided the coding condition to clarify the scenarios where network coding does improve the throughput. In the scenarios which satisfy the coding condition, encoding the packets with close size and close transmission rate at the relay node help in improving the throughput gain. In the networks where all nodes have the fixed and equal medium access priority, however, network coding is able to improve the throughput in the majority of cases. These conclusions provide important hints for designing efficient coding schemes in multihop wireless networks. As the first step, in this work we investigated the throughput of network-coding-based wireless relay networks only with two source nodes. It is quite important to extend this work by investigating the throughput for the general case with more source nodes. For the general case with n source nodes, the n-dimensional Markov chain model obtained by directly extending the two-dimensional Markov chain model of this work is quite hard if not intractable to address. Therefore, some elaborately detailed techniques should be proposed to approximately analyze the throughput. This is left as future work. Acknowledgments This research was supported in part by the National Natural Science Foundation of China (Nos. 61001126, 61379124 and 61003264), Ph.D. Programs Foundation of

113

Ministry of Education of China (No. 20123317110002), the Natural Science Foundation of Zhejiang Province, China (Nos. LY13F020025 and LY13F020028), and the Projectsponsored by SRF for ROCS, SEM of China. References [1] I.F. Akyildiz, X. Wang, A survey on wireless mesh networks, IEEE Commun. Mag. 43 (9) (2005) S23–S30, 200. [2] P. Gupta, P.R. Kumar, The capacity of wireless networks, IEEE Trans. Inform. Theor. 46 (2) (2000) 388–404. [3] J. Jun, M.L. Sichitiu, The nominal capacity of wireless mesh networks, IEEE Wireless Commun. 10 (5) (2003) 8–14. [4] R. Ahlswede, N. Cai, S.-Y.R. Li, R.W. Yeung, Network information flow, IEEE Trans. Inform. Theor. 46 (4) (2000) 1204–1216. [5] C. Fragouli, J. Boudec, J. Widmer, Network coding: an instant primer, ACM SIGCOMM Comput. Commun. Rev. 36 (1) (2006) 63–68. [6] D.S. Lun, M. Médard, R. Koetter, Network coding for efficient wireless unicast, in: IZS 2006, ETH Zurich, Switzerland, 2006. [7] Y. Wu, P.A. Chou, S.-Y. Kung, Information exchange in wireless networks with network coding and physical-layer broadcast, in: CISS’05. [8] C. Fragouli, J. Widmer, J.-Y.L. Boudec, A network coding approach to energy efficient broadcasting, in: IEEE INFOCOM, 2006. [9] C. Gkantsidis, P. Rodriguez, Network coding for large scale content distribution, in: IEEE INFOCOM, 2005. [10] S. Katti, H. Rahul, W. Hu, D. Katabi, M. Médard, J. Crowcroft, XOR in the air: practical wireless network coding, in: ACM SIGCOMM, Pisa, 2006. [11] S. Chachulski, M. Jennings, S. Katti, D. Katabi, Trading structure for randomness in wireless opportunistic routing, in: ACM SIGCOMM, 2007. [12] S. Sengupta, S. Rayanchu, S. Banerjee, An analysis of wireless network coding for unicast sessions: the case for coding-aware routing, in: IEEE INFOCOM, 2007. [13] J. Le, J. Lui, D.M. Chiu, How many packets can we encode? – an analysis of practical wireless network coding, in: IEEE Infocom, 2008. [14] F. Zhao, M. Médard, On analyzing and improving COPE performance, in: ITA, 2010. [15] J. Liu, D. Goeckel, D. Towsley, Bounds on the gain of network coding and broadcasting in wireless networks, in: IEEE INFOCOM, 2007. [16] D. Umehara, T. Hirano, S. Denno, M. Morikura, Throughput analysis of wireless relay slotted ALOHA systems with network coding, in: IEEE GLOBECOM, 2008. [17] D. Umehara, S. Denno, M. Morikura, T. Sugiyama, Throughput analysis of two-hop wireless CSMA network coding, the 2010 IEEE International Conference on Communications (ICC’10), 2010. [18] D. Umehara, S. Denno, M. Morikura, T. Sugiyama, Performance analysis of slotted ALOHA and network coding for single-relay multi-user wireless networks, Ad Hoc Netw. 9 (2) (2011) 164–179. [19] D. Umehara, T. Hirano, S. Denno, M. Morikura, T. Sugiyama, Wireless network coding in slotted ALOHA with two-hop unbalanced traffic, IEEE J. Select. Areas Commun. 27 (5) (2009) 647–661. [20] T. Yazane, H. Masuyama, S. Kasahara, Y. Takahashi, End-to-end throughput analysis of multihop wireless networks with network coding, in: IEEE ICC’10, 2010. [21] D. Zeng, S. Guo, H. Jin, S. Yu, On the maximum throughput of twohop wireless network coding, in: IEEE WCNC, 2011. [22] Y. Wang, H. Lu, P. Hong, K. Xue, Practical wireless network coding with constrained decoding buffers, in: The 2010 IEEE International Symposium on Network Coding (NetCod), 2010. [23] J-M. Dricot, Ph. Doncker, E. Zimanyi, Fr. Grenez, Impact of the physical layer on the performance of indoor wireless networks, in: The International Conference on Software, Telecommunications and Computer Networks, 2003. [24] D. Bertsekas, R. Gallager, Data Networks, Second ed., Prentice Hall, 1992. [25] K. Chi, X. Jiang, S. Horiguchi, Joint design of network coding and transmission rate selection for multihop wireless networks, IEEE Trans. Veh. Technol. 59 (5) (2010) 2435–2444. [26] Y. Wu, K. Chi, Y. Zhu, Throughput analysis of two-hop wireless networks with network coding, J. Electron. (China) 30 (2) (2013) 166–174.

114

K. Chi et al. / Computer Networks 60 (2014) 101–114

Kaikai Chi received the B.S. and M.S. degrees from Xidian University, Xi’an, China, in 2002 and 2005, respectively, and the Ph.D. degree from Tohoku University, Sendai, Japan, in 2009. From April 2009 to March 2010, he was a Postdoctoral Fellow with the Graduate School of Information Sciences, Tohoku University. He is currently an associate professor in the School of Computer Science and Technology, Zhejiang University of Technology, Hangzhou, China. His current research focuses on wireless ad hoc network and wireless sensor network. He was the recipient of the Best Paper Award at the IEEE Wireless Communications and Networking Conference in 2008. He is a member of IEEE and has published more than 30 referred technical papers in proceedings and journals including IEEE Transactions on Parallel and Distributed Systems, IEEE Transactions on Vehicular Technology, etc.

Yi-hua Zhu is a professor with Zhejiang University of Technology, Hangzhou, Zhejiang, China. He received his B.S. degree in mathematics from Zhejiang Normal University, Zhejiang, China, in 1982; his M.S. degree in operation research and cybernetics from Shanghai University, Shanghai, China, in 1993; and his Ph.D. degree in computer science from Zhejiang University, Zhejiang, China, in 2003. His current research interests include algorithm and protocol of data dissemination, modeling and performance analysis for wireless networks, and network coding. He is a senior member of IEEE and has published more than 110 research papers in proceedings and journals including IEEE Transactions on Wireless Communications, IEEE Transactions on Vehicular Technology, and more.

Xiaohong Jiang received his B.S., M.S. and Ph.D. degrees in 1989, 1992, and 1999 respectively, all from Xidian University, Xi-an, China. He is currently a Professor in the School of Systems Information Science, Future University of Hakodate, Japan. He was an Associate Professor in Graduate School of Information Science, TOHOKU University, Japan. Before joining TOHOKU University, Dr. Jiang was an assistant professor in the Graduate School of Information Science, Japan Advanced Institute of Science and Technology (JAIST), from October 2001 to January 2005. Dr. Jiang was a JSPS (Japan Society for the Promotion of Science) postdoctoral research fellow at JAIST

from October 1999–October 2001. He was a research associate in the Department of Electronics and Electrical Engineering, the University of Edinburgh from March 1999–October 1999. Dr. Jiang’s research interests include optical switching networks, routers, network coding, WDM networks, VoIP, interconnection networks, IC yield modeling, timing analysis of digital circuits, clock distribution and fault-tolerant technologies for VLSI/WSI. He has published over 130 referred technical papers in these areas. He is a member of IEEE.

Xianzhong Tian is an associate professor with School of Computer Science and Technology, Zhejiang University of Technology, China. He received the B.S. degree in mathematics from Hangzhou Normal University, Zhejiang, China, in July 1991 and his M.S. degrees in computer application technology from Zhejiang University, Zhejiang, China, in 1999. Currently, he is a Ph.D. candidate. His current research focuses on network coding, mobile computing, and the optimization of protocol for wireless networks.