+ All Categories
Home > Documents > Digital Network Coding Aided Two-Way Relaying: Energy Minimization and Queue Analysis

Digital Network Coding Aided Two-Way Relaying: Energy Minimization and Queue Analysis

Date post: 12-Dec-2016
Category:
Upload: mehul
View: 213 times
Download: 0 times
Share this document with a friend
11
IEEE TRANSACTIONS ON WIRELESS COMMUNICATIONS, VOL. 12, NO. 4, APRIL 2013 1947 Digital Network Coding Aided Two-Way Relaying: Energy Minimization and Queue Analysis Zhi Chen, Member, IEEE, Teng Joon Lim, Senior Member, IEEE, and Mehul Motani, Member, IEEE Abstract—In this paper, we consider a three-node, two-way relay system with digital network coding. The aim is to minimize total energy consumption while ensuring queue stability at all nodes, for a given pair of random packet arrival rates. Specifically, we allow for a set of transmission modes and solve for the optimal fraction of resources allocated to each mode. First, we formulate and solve the static-channel problem, where all link gains are constant over the duration of transmission. Then, we solve the fading-channel problem, where link gains are random. We call the latter the ergodic energy efficiency problem and show that its solution has a water-filling structure. Finally, we provide a detailed analysis of the queues at each node when a random scheduling method that closely approximates the theoretical design is used. Index Terms—Two-way relays, network coding, energy effi- ciency, queue stability. I. I NTRODUCTION N ETWORK coding [1] has emerged as a viable means to improve throughput in complex networks. Messages at the packet level are linearly combined at intermediate nodes and forwarded to multiple intended destinations. Using knowledge of the manner in which messages were combined, communicated through some additional overhead bits, as well as knowledge of the message it contributed, a destination can successfully reconstruct the message intended for it. In this way, network throughput is greatly improved. The two-way relay network [2] exemplifies the use of net- work coding in wireless communication. This simple network comprises two source nodes (S 1 and S 2 ) and one relay node (R), where S 1 and S 2 have information to exchange with each other. A direct link between S 1 and S 2 is unavailable. This model applies for instance to communication between a base station and a mobile user in cellular communications, in which the mobile user is in a location shadowed from the base station and coverage is provided in the area by means of a relay. Another typical application is that of satellite communication, where two ground stations have messages for each other and can only communicate through a satellite. With the aid of network coding, we can exchange two messages in two time slots with physical network coding Manuscript received August 22, 2012; revised December 11, 2012; accepted January 27, 2013. The associate editor coordinating the review of this paper and approving it for publication was W. Choi. This work was partially funded by grants R-263-000-649-133 and R- 263-000-579-112 from the Ministry of Education Academic Research Fund. Parts of this work were presented at IEEE ICCC (International Conf. on Communications in China) 2012, and IEEE ICCS (International Conf. on Communication Systems) 2012. The authors are with the Department of Electrical and Computer Engineer- ing, National University of Singapore, Singapore, 117583 (e-mail: {elecz, eletj, motani}@nus.edu.sg). Digital Object Identifier 10.1109/TWC.2013.022113.121263 (PNC) [3]–[5] or analog network coding (ANC) [6], and three time slots with digital network coding (DNC) [2], [7], compared with the four time slots needed with pure forwarding. With DNC, the relay receives messages from both source nodes, then combines these messages through a bit- wise XOR operation, and broadcasts the combined packet to S 1 and S 2 . As each source already knows the message transmitted by itself, it can subtract this message and then obtain the required message. The rate region for DNC-based two-way relay networks was first explored in [2] with var- ious transmission modes including one-way forwarding and network-coded broadcasting with optimal time division for each mode. Queue stability was also investigated in the case of random data arrivals at each source node. However, resource allocation in fading channels as well as queue length analysis were not discussed. The seminal work on PNC presented in [3] showed that two slots are sufficient for two packet transmissions provided that receiver-side SNR is sufficiently high and perfect synchronization could be achieved. In addition to throughput, resource allocation was inves- tigated in [6], [8], [12], [14], [15]. In [6], optimal resource allocation for an ANC-based system was considered for OFDM systems. In [8], optimal resource allocation with data fairness was discussed. In [12], resource allocation was investigated under the scenario of asymmetric multi-way relay communication over orthogonal channels. Resource allocation with stochastic arrivals were investigated in [14], [15], [16], [17]. In [14], optimal time division between the uplink and the downlink phases was investigated. In addition, a power allocation strategy in the downlink to optimize throughput with current queue length at each node taken into consideration is provided. This strategy requires that the central controller knows instantaneous channel state information of all links as well as current queue length information at all nodes, which would be difficult to realize in practice. In [15], time division between the uplink and the downlink phases was also considered and it was assumed that full channel state information (CSI) is available at the receivers. In [16], a diamond two-way relay model was investigated and only power allocation among different relays was discussed. In [17], only time resource allocation was considered for a two- way relaying network over static channels. Note that none of these articles explores queue length statistics at each node, which is a crucial system parameter for stochastic external packet arrivals. In addition, individual power constraints were assumed in all these works. In [9], the fading nature of a wireless channel was taken into consideration and the optimal position for the relay node was investigated. In [13], outage regions of DNC and ANC 1536-1276/13$31.00 c 2013 IEEE
Transcript

IEEE TRANSACTIONS ON WIRELESS COMMUNICATIONS, VOL. 12, NO. 4, APRIL 2013 1947

Digital Network Coding Aided Two-Way Relaying:Energy Minimization and Queue Analysis

Zhi Chen, Member, IEEE, Teng Joon Lim, Senior Member, IEEE, and Mehul Motani, Member, IEEE

Abstract—In this paper, we consider a three-node, two-wayrelay system with digital network coding. The aim is to minimizetotal energy consumption while ensuring queue stability atall nodes, for a given pair of random packet arrival rates.Specifically, we allow for a set of transmission modes and solvefor the optimal fraction of resources allocated to each mode.First, we formulate and solve the static-channel problem, whereall link gains are constant over the duration of transmission.Then, we solve the fading-channel problem, where link gainsare random. We call the latter the ergodic energy efficiencyproblem and show that its solution has a water-filling structure.Finally, we provide a detailed analysis of the queues at each nodewhen a random scheduling method that closely approximates thetheoretical design is used.

Index Terms—Two-way relays, network coding, energy effi-ciency, queue stability.

I. INTRODUCTION

NETWORK coding [1] has emerged as a viable meansto improve throughput in complex networks. Messages

at the packet level are linearly combined at intermediatenodes and forwarded to multiple intended destinations. Usingknowledge of the manner in which messages were combined,communicated through some additional overhead bits, as wellas knowledge of the message it contributed, a destination cansuccessfully reconstruct the message intended for it. In thisway, network throughput is greatly improved.

The two-way relay network [2] exemplifies the use of net-work coding in wireless communication. This simple networkcomprises two source nodes (S1 and S2) and one relay node(R), where S1 and S2 have information to exchange with eachother. A direct link between S1 and S2 is unavailable. Thismodel applies for instance to communication between a basestation and a mobile user in cellular communications, in whichthe mobile user is in a location shadowed from the base stationand coverage is provided in the area by means of a relay.Another typical application is that of satellite communication,where two ground stations have messages for each other andcan only communicate through a satellite.

With the aid of network coding, we can exchange twomessages in two time slots with physical network coding

Manuscript received August 22, 2012; revised December 11, 2012; acceptedJanuary 27, 2013. The associate editor coordinating the review of this paperand approving it for publication was W. Choi.

This work was partially funded by grants R-263-000-649-133 and R-263-000-579-112 from the Ministry of Education Academic Research Fund.Parts of this work were presented at IEEE ICCC (International Conf. onCommunications in China) 2012, and IEEE ICCS (International Conf. onCommunication Systems) 2012.

The authors are with the Department of Electrical and Computer Engineer-ing, National University of Singapore, Singapore, 117583 (e-mail: {elecz,eletj, motani}@nus.edu.sg).

Digital Object Identifier 10.1109/TWC.2013.022113.121263

(PNC) [3]–[5] or analog network coding (ANC) [6], andthree time slots with digital network coding (DNC) [2],[7], compared with the four time slots needed with pureforwarding. With DNC, the relay receives messages from bothsource nodes, then combines these messages through a bit-wise XOR operation, and broadcasts the combined packetto S1 and S2. As each source already knows the messagetransmitted by itself, it can subtract this message and thenobtain the required message. The rate region for DNC-basedtwo-way relay networks was first explored in [2] with var-ious transmission modes including one-way forwarding andnetwork-coded broadcasting with optimal time division foreach mode. Queue stability was also investigated in the case ofrandom data arrivals at each source node. However, resourceallocation in fading channels as well as queue length analysiswere not discussed. The seminal work on PNC presentedin [3] showed that two slots are sufficient for two packettransmissions provided that receiver-side SNR is sufficientlyhigh and perfect synchronization could be achieved.

In addition to throughput, resource allocation was inves-tigated in [6], [8], [12], [14], [15]. In [6], optimal resourceallocation for an ANC-based system was considered forOFDM systems. In [8], optimal resource allocation withdata fairness was discussed. In [12], resource allocation wasinvestigated under the scenario of asymmetric multi-way relaycommunication over orthogonal channels. Resource allocationwith stochastic arrivals were investigated in [14], [15], [16],[17]. In [14], optimal time division between the uplink andthe downlink phases was investigated. In addition, a powerallocation strategy in the downlink to optimize throughput withcurrent queue length at each node taken into considerationis provided. This strategy requires that the central controllerknows instantaneous channel state information of all linksas well as current queue length information at all nodes,which would be difficult to realize in practice. In [15], timedivision between the uplink and the downlink phases wasalso considered and it was assumed that full channel stateinformation (CSI) is available at the receivers. In [16], adiamond two-way relay model was investigated and onlypower allocation among different relays was discussed. In[17], only time resource allocation was considered for a two-way relaying network over static channels. Note that none ofthese articles explores queue length statistics at each node,which is a crucial system parameter for stochastic externalpacket arrivals. In addition, individual power constraints wereassumed in all these works.

In [9], the fading nature of a wireless channel was takeninto consideration and the optimal position for the relay nodewas investigated. In [13], outage regions of DNC and ANC

1536-1276/13$31.00 c© 2013 IEEE

1948 IEEE TRANSACTIONS ON WIRELESS COMMUNICATIONS, VOL. 12, NO. 4, APRIL 2013

strategies were derived. It was found that with the presenceof a direct link, DNC was more promising than ANC in mostcases in terms of outage performance.

In this paper, we formulate, simplify and solve the problemof allocation of channel resources to the various transmissionmodes in a DNC-based two-way relay network to minimizetotal energy usage in transmission. The constraint in theoptimization problem is that queue stability is maintained atall four queues in the network for a given pair of averagepacket arrival rates λ1 and λ2 at S1 and S2, respectively.The scheduler, e.g., the relay node, is assumed to have fullknowledge of the instantaneous channel coefficients in thefour flat-fading links. Queue length information is however notrequired by the scheduler. It should be noted that this workconsiders minimization of total energy usage among all nodes,rather than maximization of rates with power constraints.

There are two scenarios to consider in such an energyminimization problem: (i) static channels, which remain un-changed over the entire duration of the transmission; and (ii)fading channels, which change with time so that over theduration of the transmission, all channel states are visited. Forstatic channels, queue stability requires that throughput fromS1 (S2) is at least λ1 (λ2) for a given set of channel gains;for fading channels, queue stability is guaranteed as long asthroughput from S1 averaged over the fading distribution isat least λ1. In the fading case, the resulting optimizationproblem is solved by a water-filling procedure over the statespace of the fading gains. This is tied to the solution of thestatic channel problem, which is equivalent to a simple convexoptimization problem and hence is readily solved.

Assuming ergodicity in the channel processes, the fading-channel solution minimizes the long-term average energy usedto support the arrival data rate pair (λ1, λ2). The derivation ofthis result is a natural complement to the first static-channelenergy optimization problem.

Subsequently, we also design and simulate a randomscheduling protocol based on the two designed resource allo-cation policies. To maintain finite queue length at each node,we introduce a back-off parameter ε, so that the designedarrival rate is λi(1 + ε) (i = 1, 2) for an actual arrival rateof λi. This leads to the total energy usage being smallerthan the objective function used in our design optimization.We investigate the behavior of the queues at the sourcenodes and the relay, for the random scheduling algorithm.Finding the average delay and queue length at S1 and S2

is straightforward, however the analysis of the two queues atthe relay (for data from S1 and S2 respectively) requires theuse of a novel Markov chain. We present and verify throughsimulations this analysis in the second part of this paper.

The main contributions of this work are as follows.• We minimize the total energy needed to support a given

pair of stochastic arrival rates (λ1,λ2) in a two wayrelay network over the fraction of resources allocated tothe various allowed transmission modes. Both static andergodic solutions are provided;

• We design a random scheduling protocol, and deriveaverage queue length at all nodes as well as actual energyusage.

The rest of this paper is organized as follows. In Section

λ λ

Fig. 1. Illustration of a two-way relay network with random packet arrivals.

II, we introduce the energy usage optimization problem overstatic channels and provide the solution to this problem. InSection III, we introduce the ergodic energy usage optimiza-tion problem and present the associated solution with thewater-filling structure. In Section IV, we present an energyefficient random scheduling protocol and provide the queueinganalysis for this protocol. Simulation results are presented inSection V and Section VI concludes this work.

II. STATIC CHANNEL PROBLEM

In this section, we discuss the static channel problem, wherethe channel gains are deterministic. This models the non-fading channel and the block-fading channel over one fadingblock.

A. System Model and Problem Formulation

Figure 1 depicts the two-way relay network of interest.Assume that packets arrive at Si according to a Poissonprocess at an average arrival rate of λi, i ∈ {1, 2}. We seekto maximize the energy efficiency of this system for a givenaverage arrival rate pair (λ1, λ2) while maintaining queuestability, by adjusting the fraction of time allocated to eachof the following five transmission modes:

• Mode 1: S1 transmits to R at rate R1 (uplink phase 1).• Mode 2: S2 transmits to R at rate R2 (uplink phase 2).• Mode 3: R broadcasts to S1 and S2 at broadcast rate R3

(Network coding in downlink phase).• Mode 4: R transmits only to S1 at rate R4 (one-way

forwarding in downlink phase).• Mode 5: R transmits only to S2 at rate R5 (one-way

forwarding in downlink phase).

The four channel (power) gains g1r, g2r, gr1 and gr2, cor-respond to modes 1, 2, 4 and 5, respectively. For convenience,we define g1 = g1r, g2 = g2r, g3 = min(gr1, gr2), g4 = gr1and g5 = gr2 so that gi is the channel gain in Mode i. Notethat we do not assume channel symmetry between the uplinkand the corresponding downlink channels. Receiver noise foreach mode is modeled by i.i.d. Gaussian random variableswith zero mean and unit variance. The power transmitted inMode i is denoted as Pi. Thus the signal to noise ratio (SNR)at the receiver in Mode i is

SNRi = Pigi. (1)

Note that the capacity of a Gaussian channel with Gaussiandistributed channel input is given by C = log2(1 + SNR).Hence to achieve a rate of Ri in Mode i requires that Pi beexponentially related to Ri, via

Pi(Ri) =2Ri − 1

gi, i = 1, . . . , 5. (2)

It should be noted that in Mode 3, the rate of R3 is the ratetransmitted to each of S1 and S2, due to network coding.

CHEN et al.: DIGITAL NETWORK CODING AIDED TWO-WAY RELAYING: ENERGY MINIMIZATION AND QUEUE ANALYSIS 1949

Suppose that a fraction fi, i = 1, . . . , 5, of time resourceis allocated to Mode i. Therefore fiPi(Ri) is proportionalto the energy used for transmission in Mode i, if we disre-gard the possibility that queues may be empty. To minimizethe total energy consumption per time slot while satisfyingqueue stability constraints therefore requires the solution ofoptimization problem P1:

minfi,Ri

5∑i=1

fiPi(Ri) (3)

subject to the queue stability constraints

λ1 ≤ min(f1R1, f3R3 + f5R5) (4)

λ2 ≤ min(f2R2, f3R3 + f4R4) (5)

and the physical constraints∑5

i=1 fi ≤ 1 and fi ≥ 0. Notethat to guarantee stability, the service rate of each link shouldnot be less than the corresponding external arrival rate.

In the next section, we show that P1 can be transformedinto a simpler convex optimization problem with only fi asthe design parameters and hence can be solved easily.

Finally, the queue lengths (in terms of packets) at S1 andS2 at epoch t are denoted by Q1(t) and Q2(t). We also defineQr1(t) and Qr2(t) as the lengths of the two queues maintainedat the relay node for S1 and S2, respectively.

B. Problem Solution

The following lemmas simplify P1.Lemma 1: Under the optimal solution to P1, we have{

f4 = 0, if λ1 > λ2

f5 = 0, if λ1 < λ2(6)

and f4 = f5 = 0 if λ1 = λ2.Proof: Denote the optimal values of fi and Ri by f∗

i andR∗

i . Constraints (4) and (5) dictate that

f∗3R

∗3 + f∗

5R∗5 ≥ λ1 (7)

f∗3R

∗3 + f∗

4R∗4 ≥ λ2 (8)

Assume that f∗3R

∗3 + f∗

4R∗4 − λ2 = ε > 0. Then reducing f∗

4

by ε/R4 while keeping all other f∗i and all R∗

i fixed results inconstraint (5) still being satisfied, with a lower total energy.Therefore we can assume that f∗

3R∗3 + f∗

4R∗4 = λ2. Similarly,

f∗3R

∗3 + f∗

5R∗5 = λ1.

Suppose that f∗4 > 0. If we reduce f∗

4 by δ4, constraint (5)requires that f∗

3 be increased by δ4R∗4/R

∗3. This in turn means

that f∗5 can be reduced by δ4R

∗4/R

∗5. In other words, queue

stability is maintained under the following adjustment:

f∗4 → f∗

4 − δ4

f∗3 → f∗

3 + δ4R∗4/R

∗3

f∗5 → f∗

5 − δ4R∗4/R

∗5

The total energy used is now reduced by

ΔE = δ4

(R∗

4

R∗5

P ∗5 + P ∗

4 − R∗4

R∗3

P ∗3

)(9)

where P ∗i is shorthand for Pi(R

∗i ). Note that R∗

3, R∗4 and R∗

5

satisfy two equations equivalent to

f∗5R

∗5 − f∗

4R∗4 = λ1 − λ2 (10)

f∗3R

∗3 + f∗

5R∗5 = λ1.

We can thus always find a point in the solution space of (10)to make the term in brackets in (9) positive. So as long asδ4 > 0 does not lead to a violation of (10), we can reducetotal energy by ΔE > 0. If λ1 > λ2, this result and (10) showthat we should have f∗

4 = 0, and f∗5R

∗5 = λ1 − λ2.

Similarly, if λ1 < λ2, then f∗5 = 0 and f∗

4R∗4 = λ2 − λ1;

and if λ1 = λ2, then f∗4 = f∗

5 = 0.A corollary of Lemma 1 is that, since either one or both of

f∗4 and f∗

5 must be 0, f∗3 cannot be zero, i.e., the broadcast

phase (Mode 3) must be used. This is intuitive because onebit transmitted in Mode 3 is equivalent to two bits delivered,and hence we should devote as many resources as possible toMode 3. The following lemma links Ri to fi.

Lemma 2: The solution to P1 satisfies

R∗i =

λi

f∗i

, i = 1, 2 (11)

R∗3 =

min(λ1, λ2)

f∗3

(12)

R∗4 = max

(λ2 − λ1

f∗4

, 0

)(13)

R∗5 = max

(λ1 − λ2

f∗5

, 0

)(14)

Proof: By reducing f1 and/or R1, total energy is reduced,and so the energy-minimization problem must be solved whenf1R1 is at its smallest value, i.e., f∗

1R∗1 = λ1. Similarly,

f∗2R

∗2 = λ2.

Equations (13) and (14) arise directly from the proof ofLemma 1. Equation (12) comes from noting that if λ1 < λ2,Lemma 1 states that f∗

5 = 0 and hence f∗3R

∗3 = λ1 while if

λ1 > λ2, f∗3R

∗3 = λ2.

Lemma 2 implies that {Ri} can be removed as optimizationvariables, leaving only {fi} in an equivalent optimizationproblem. Lemma 1 (and also Lemma 2) implies that whenλ1 > λ2, Mode 4 is not necessary, and that when λ1 < λ2,Mode 5 is not necessary. Hence there is no loss of generalityin assuming that λ1 < λ2 from this point on, so that Mode5 is no longer discussed and the min and max functions neednot be invoked in Lemma 2. We now have

R∗3 =

λ1

f∗3

, R∗4 =

λ2 − λ1

f∗4

and R∗5 = 0. (15)

By substituting the new expressions for {Ri} into P1, weget the equivalent optimization problem P2:

minfi

f1P1

(λ1

f1

)+ f2P2

(λ2

f2

)+ f3P3

(λ1

f3

)

+f4P4

(λ2 − λ1

f4

)(16)

s.t. fi ≥ 0 (17)4∑

i=1

fi ≤ 1 (18)

where the power functions Pi(·) are given by (2).

1950 IEEE TRANSACTIONS ON WIRELESS COMMUNICATIONS, VOL. 12, NO. 4, APRIL 2013

It is not difficult to show that the cost function in P2 isconvex in {fi}, and clearly the constraint set is also convex.Therefore the original problem P1 has been turned into anequivalent convex optimization problem P2.

It should be noted too that the cost function in P2 ismonotonically decreasing in {fi} and hence its solution mustlie on the boundary of the constraint set. Since fi = 0 for alli is clearly not a viable solution, it must be that

∑i fi = 1

i.e., that all available time resources are fully utilized. Thisis easily understandable since increasing any fi leads to acorresponding reduction in the associated Ri, which means anexponential decrease in required power and hence we wouldwant fi to be as large as possible.

Since P2 is a constrained convex optimization problem, itssolution is found by solving the Karush-Kuhn-Tucker (KKT)equations, which are easily derived as

2λif∗i (1 − λi ln 2

f∗i

)

gi+ β∗ − 1

gi= 0, 1 ≤ i ≤ 4. (19)

4∑i=1

f∗i − 1 = 0 (20)

where β∗ is the Lagrange multiplier and the virtual arrivalrates for Mode 3 and Mode 4 are λ3 = λ1 and λ4 = λ2 − λ1

respectively. Since (19) is a transcendental equation, it isinfeasible to obtain explicit solutions in general and numer-ical methods are instead employed to obtain the solution toproblem P2.

C. Discussion and Insights

Firstly, we give a lemma that links each active mode (i.e.,those for which f∗

i > 0) to the optimal solution to P2.Lemma 3: Under the optimal solution to P2, we have for

each active mode that

2R∗i (1−R∗

i ln 2)

gi+ β∗ − 1

gi= 0. (21)

Note that this result immediately follows from (19) andtherefore the proof is omitted.

Based on Lemma 3, some observations can be made andare presented in the following proposition.

Proposition 1: The optimal transmit rates and optimaltransmit powers in respect of channel gains for active modes(i.e., f∗

i , f∗j > 0) are related as follows:

R∗i > R∗

j and P ∗i < P ∗

j ⇔ gi > gj (22)

R∗i = R∗

j and P ∗i = P ∗

j ⇔ gi = gj (23)

where i, j = 1, 2, 3, 4, 5. In other words, R∗i − R∗

j has thesame sign as gi − gj whereas P ∗

i −P ∗j has the opposite sign.

Proof: Let us multiply by gi in (21), we then have thefollowing equality for each active mode,

2R∗i (1−R∗

i ln 2) + β∗gi − 1 = 0. (24)

Note that R∗i is an implicit function of gi. Taking the

derivatives on both sides in (24) with respect to gi we obtain

−2R∗i (R∗

i ln 2)2 dR

∗i

dgi+ β∗ = 0, (25)

from which it follows thatdR∗

i

dgi=

β∗

2R∗i (R∗

i ln 2)2> 0. (26)

The inequality comes from the fact that R∗i for active modes

and β∗ are positive values. Hence Ri is a monotonicallyincreasing function of gi.

Recalling that R∗i = log2(1 + P ∗

i gi), (24) reduces to

(P ∗i gi + 1)(1− ln(1 + P ∗

i gi)) + β∗gi − 1 = 0. (27)

Taking derivatives with respect to gi we arrive at

− ln(1 + P ∗i gi)(P

∗i + gi

dP ∗i

dgi) + β∗ = 0. (28)

With some manipulations we can obtain

dP ∗i

dgi=

β∗ − P ∗i ln(1 + P ∗

i gi)

gi ln(1 + P ∗i gi)

(29)

=ln(1 + P ∗

i gi)− P ∗i gi

g2i ln(1 + P ∗i gi)

< 0 (30)

where (30) comes directly from (27) and that ln(1 + x) < xif x > 0. Hence P ∗

i is a strict decreasing function of gi.Proposition 1 implies that the relative values of R∗

i andP ∗i depend only on the relative values of the corresponding

channel gains, but not at all on the average arrival rates. Theoptimal time fraction for each mode, however, does relate tothe corresponding arrival rate in the form f∗

i = λi

R∗i

.Note also that Proposition 1, which relates the optimal

power, rate and link gain in each mode, is useful for initializingthe power and rate optimization routine so that the iterativeprocedure converges more quickly. For instance, if g1 > g2,we should initialize P2 to exceed P1, and R1 to exceed R2.

In addition, for the case that λ1 and λ2 are very small (λi �1), we can use a Taylor series to approximate the exponentialfunctions and obtain the closed form power allocation solutionfor each mode, with β obtained through a one-dimensionalbisection search:

f∗i = λi ln 2 (β

∗gi)− 1

2 , 1 ≤ i ≤ 4. (31)

f∗4 = 1− f∗

1 − f∗2 − f∗

3 (32)

We should also emphasize that when λ1 > λ2, the last twoterms in the cost function of P2 change to

f3P3

(λ2

f3

)+ f5P5

(λ1 − λ2

f5

)(33)

and the problem can be solved with the appropriate substitu-tions. Hence there is no loss in generality in the assumptionthat λ1 < λ2 that we used for the majority of this section.

III. MAXIMIZING ERGODIC ENERGY EFFICIENCY IN

FADING CHANNELS

Unlike in the previous section, assume now that gi, i =1, . . . , 5, are random variables with known density functionsp(gi). Assuming ergodicity in the random processes gi(t),where t represents time, minimization of average total transmitenergy in the long run is formulated as P3:

minfi,Ri(gi)

5∑i=1

fiPi (34)

CHEN et al.: DIGITAL NETWORK CODING AIDED TWO-WAY RELAYING: ENERGY MINIMIZATION AND QUEUE ANALYSIS 1951

subject to

λ1 ≤ min(f1R1, f3R3 + f5R5) (35)

λ2 ≤ min(f2R2, f3R3 + f4R4) (36)5∑

i=1

fi ≤ 1. (37)

In the above

Pi = E[Pi(Ri(gi))] =

∫ ∞

0

Pi(Ri(gi))p(gi)dgi,

and

Ri = E[Ri(gi)] =

∫ ∞

0

Ri(gi)p(gi)dgi,

where Pi and Ri are averaged over the channel gain distri-butions. We term problem P3 an ergodic energy efficiencymaximization problem. Note that the minimization is over(fi, Ri(gi)) once the functional form of Ri(gi) is found, weobtain Pi(Ri(gi)) from (2) and hence Pi, while Ri is obtainedthrough averaging Ri(gi) over gi.

In other words, solving problem P3 yields a set of timefractions {f∗

i } that minimizes an upper bound on the long-term average energy used, while guaranteeing long-term queuestability, assuming that the scheduler has knowledge of theinstantaneous channel gains gi, i = 1, . . . , 5, as well as thedistribution of gi. At the same time, we obtain a rate allocationR∗

i (gi) dependent on the instantaneous channel gains gi.It can be verified that Lemmas 1 and 2 still hold for

this optimization problem and hence it can be translated intoanother equivalent optimization problem.

Assuming without loss of generality that λ1 < λ2, P3reduces to P4:

minfi,Ri(gi)

4∑i=1

fiPi (38)

subject to

λ1 = f1R1 = f3R3 (39)

λ2 = f2R2 (40)

λ2 − λ1 = f4R4 (41)4∑

i=1

fi ≤ 1. (42)

The Lagrangian function corresponding to P4 is

F =

4∑i=1

fiPi −4∑

i=1

βi(fiRi − λi) + γ

(4∑

i=1

fi − 1

)(43)

where we used the notation λ3 = λ1 and λ4 = λ2 − λ1

to denote virtual arrival rates for Mode 3 and Mode 4respectively.

Since P4 is a convex optimization problem, its solution is

given by the KKT conditions:

P ∗i − β∗

i R∗i + γ∗ = 0, 1 ≤ i ≤ 4 (44)

f∗i R

∗i − λi = 0, 1 ≤ i ≤ 4 (45)

f∗i

2R∗i

giln 2− f∗

i β∗i = 0, 1 ≤ i ≤ 4 (46)

β∗i , γ

∗ ≥ 0, 1 ≤ i ≤ 4 (47)4∑

i=1

f∗i = 1 (48)

where the asterisks denote optimal values.It can be found from (46) that 2R

∗i

gi= β∗

i log2 e. Recallingthe power-rate equality in (2) we have

P ∗i (R

∗i (gi)) =

[β∗i log2 e−

1

gi

]+(49)

Then by definition,

R∗i =

∫ ∞

1β∗i

log2 e

log2(1 + P ∗i (R

∗i )gi)p(gi)dgi (50)

=

∫ ∞

1β∗i

log2 e

log2(β∗i gi log2 e )p(gi)dgi (51)

Therefore the optimal power allocation is found throughwater-filling.

Note that P ∗i can be found in terms of β∗

i and γ∗. Theoptimal f∗

i is given by (45). Finally, we obtain β∗i and γ∗

from (44) by performing a multidimensional bisection searchto make β∗

i Ri − Pi equal (to γ∗) and positive for all i.It is interesting to note that similar observations to Propo-

sition 1 can be made for the ergodic energy optimizationproblem for Rayleigh fading channels. They are given in thefollowing proposition, proven in the appendix.

Proposition 2: For ergodic energy consumption optimiza-tion with Rayleigh fading channels, the optimal transmit powerand rate of each mode are related with the associated averagelink gain by,

P ∗i < P ∗

j and R∗i > R∗

j ⇔ gi > gj (52)

P ∗i = P ∗

j and R∗i = R∗

j ⇔ gi = gj (53)

where i, j = 1, 2, 3, 4, 5 if f∗i , f

∗j > 0. In other words, P ∗

i is adecreasing function of gi whereas R∗

i is an increasing functionof gi in the ergodic case as well.

IV. SCHEDULING PROTOCOL: QUEUING AND ACTUAL

ENERGY EFFICIENCY

We now consider a scheduling strategy which makes use ofthe optimal time-sharing fractions {fi} (and hence constantrates {Ri} for P1 and varying rate for P3) for each transmis-sion mode. The proposed protocol is called the energy-efficientrandom scheduling protocol (EERSP):

1) At the start of a time slot of duration T , the relayrandomly chooses a transmission mode with probabilityP [Mode i] = fi.

2) If Mode 1 is selected, the relay will inform S1 totransmit. If Mode 2 is selected, the relay will informS2 to transmit. The selected source will transmit if itsdata buffer is non-empty during this slot.

1952 IEEE TRANSACTIONS ON WIRELESS COMMUNICATIONS, VOL. 12, NO. 4, APRIL 2013

3) If Mode 3 is selected, the relay will transmit. If bothqueues at R are non-empty (i.e., min(Qr1(·), Qr2(·)) >0), it will broadcast network coded packets to bothsources during this slot. If only Qr1(·) > 0 (or onlyQr2(·) > 0), the relay will forward data to S1 (or S2)during this slot. If both queues at R are empty, it willremain silent.

4) If Mode 4 is selected, the relay will forward packets toS1 if Qr1(·) > 0 during this slot. If Mode 5 is selected,the relay will forward packets to S2 if Qr2(·) > 0 duringthis slot.

Note that in EERSP, fi is the probability that one slot isallocated to Mode i and we assume that one slot can be usedfor one mode only.

A. Queue Analysis for P1

We now analyze the queuing performance of EERSP. Thedata arrival processes at both S1 and S2 are assumed to bePoisson. For brevity, we shall only focus on the queue lengthQ1(t) and Qr2(t). The analysis for Q2(t) and Qr1(t) is verysimilar to that for Q1(t) and Qr2(t) and is omitted for brevity.

Here we use a Markov chain to model the backlog statesof (Q1(t), Qr2(t)) and define q(m,k),(i,j) as the one-steptransition probability of the event that Qr2(t + 1) = j andQ1(t + 1) = i given that Qr2(t) = k and Q1(t) = m.There are four classes of queue transitions arising from thefive transmission modes:

Class I: S1 is selected for transmission in Mode 1;Class II: R is selected for transmission in Mode 3;Class III: Mode 2 or Mode 4 is selected;Class IV: R is selected for transmission in Mode 5.Without loss of generality, assume that one time slot of

duration T corresponds to one channel use, and that capacity ismeasured in units of packets. Hence, for Mode 1 transmission,where a rate R∗

1 is supported, we assume that a maximum ofR∗

1 packets can be transmitted from S1 to R. In general, inMode i, a maximum of R∗

i packets can be transmitted. Thequeue analysis below follows naturally from this view.

For Class I, Mode 1 is selected. In this case, up to R∗1

packets may be received reliably at R from S1 during thisslot, the conditional one-step transition probability is

qI(m,k),(i,j) =

⎧⎨⎩

ai, m = 0, j = kai, 0 < m < R∗

1, j = k +mai−m+R1 , m ≥ R∗

1, j = k +R∗1

(54)where

aj =(λ1T )

j

j!exp(−λ1T ) (55)

is the probability that j packets arrive at S1 within the currentslot. For the the case where Q1(t) = 0, no packets are queuedfor transmission by S1, therefore Qr2(t + 1) = Qr2(t). ForQ1(t+ 1) to be equal to i, there must have been i arrivals atS1 in the duration T of the (t+1)-st slot. It should also notethat the probability that Mode 1 is selected is f1.

For the case where 0 < Q1(t) < R∗1, all queued packets at

S1 will be transmitted during slot t+1 and hence Qr2(t+1) =Qr2(t) + Q1(t). Therefore, Q1(t + 1) is determined by thenumber of packets arrived during slot t+ 1.

For the case that Q1(t) > R∗1, we have Qr2(t + 1) =

Qr2(t)+R∗1 since S1 can transmit at most R∗

1 packets duringone slot. Q1(t+1) is thus determined both by the number ofresidual buffed packets Q1(t) − R∗

1 and the number of newpacket arrivals, i.e, Q1(t+1) = Q1(t)−R∗

1 + i provided thatthere are i arrivals during slot t + 1. It should be noted thatthere are no other possible transitions.

Under Class II (assuming that Mode 3 is selected), Rwill transmit network coded data to S2 in Mode 3 duringthis slot. In this scenario, queue length increment at S1 isdetermined by the number of arrived packets at S1 within thisslot. For queueing at R for S2, there will be two cases aftertransmission. If Qr2(t) is less than R∗

3, it will be emptied atslot t+ 1. Otherwise, there will be still Qr2(t)−R∗

3 packetsbuffered at R for S2. The conditional transition probabilitythus can be given as by

qII(m,k),(i,j) =

{ai−m, j = 0, k ≤ R∗

3

ai−m, j = k −R∗3, k > R∗

3(56)

Under Class III (assuming Mode 2 or Mode 4 is selected),Qr2 remains the same in the next slot. Only the external arrivalat S1 will change the state of Q1(t). The conditional transitionprobability thus is

qIII(m,k),(i,j) = ai−m, j = k (57)

The analysis for Class IV is similar to that for Class II andonly the conditional probability is given as follows.

qIV(m,k),(i,j) =

{ai−m, j = 0, k ≤ R∗

5

ai−m, j = k −R∗5, k > R∗

5(58)

Combining conditional probability of state transition for agiven mode and the probability of selecting a specific mode,the state space and corresponding transition probability forQ1(t) and Qr2(t) of EERSP is shown in Fig. 2. The one-steptransition probability is given as follows.

q(m,k),(i,j) =

⎧⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎨⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎩

ai, m = k = j = 0(1− f1)ai−m, m > 0, k = j = 0(f3 + f5)ai−m, j = 0, 0 < k ≤ R∗

m

f3ai−m, j = k −R∗3, k > R∗

3

f5ai−m, j = 0, R∗3 < k < R∗

5

f5ai−m, j = k −R5, k ≥ R∗5

(f2 + f4 + f1)ai, j = k > 0, m = 0(f2 + f4)ai−m, j = k > 0, m > 0f1ai, j = k +m, 0 < m < R∗

1

f1ai−m+R∗1, j = k +R∗

1,m ≥ R∗1

0, else(59)

where R∗m = min(R∗

3, R∗5) and we assume that R∗

3 < R∗5.

The one-step transition probability matrix of the Markovchain can be written as (P)mn+k,in+j = qmn+k,in+j , where(P)i,j is the (i, j)-th element of P and n is a large positivenumber representing buffer size of R for S2, i.e., q(m,k),(i,j) =qmn+k,in+j . As shown in [19, 15.107], the stationary-statedistribution of this Markov chain is

π = 1 · (I − P + Θ)−1 (60)

where we use Θ to denote all-unity matrix. 1 is the row vectorwith all elements equal to unity and the stationary distribution

CHEN et al.: DIGITAL NETWORK CODING AIDED TWO-WAY RELAYING: ENERGY MINIMIZATION AND QUEUE ANALYSIS 1953

+

+

+

−+

+

+

+

−−

−−

−+

+

+

+

−+

−+

+

Fig. 2. Illustration of state transition diagram for the Markov chaincorresponding to EERSP where we set R1 = 3, R3 = 3, f5 > 0 andR5 = 5. State (i,j) represents the state of Q1(t) = i and Qr2(t) = j. Forexample, the one-step transition probability from state (2,3) to state (3,0) isgiven by (f3+f5)a1 , where f3+f5 is the probability of the event that Mode3 or Mode 5 is selected in this slot and R transmits data in this slot sincemin(R3, R5) = 3. a1 is the probability that only one new packet arrivedduring this slot. Due to independence of packet arrival and mode selection,the one step probability is then the product of f3 + f5 and a1. Note that theone step transition probability from state (2,5) to state (2,0) is f5a0 as R canonly transmit 5 packets in one slot in Mode 5. If Mode 2 is selected, R cantransmit at most 3 packets in one slot.

π is also a row vector. The average queue length at S1 andthat at R for S2 then are

Q1 =∞∑i=0

n∑j=0

iπin+j (61)

Qr2 =

∞∑i=0

n∑j=0

jπin+j (62)

where πin+j is the stationary probability of Q1(t) = i andQr2(t) = j.

B. Queue and Delay Analysis for P3

The analysis of queueing for the fading channel problemis similar to the analysis of the static channel problem in theabove subsection. The four classes of state transitions stillapply, but the rates supported in each mode are no longerconstant. They are instead random variables due to (49), whichmakes R∗

i a function of gi, a random variable. Therefore, wedefine cn as the probability that S1 is only able to transmit npackets in one slot if it is selected for transmission, while rnand qn are the probability that R can transmit n packets inone slot if it is selected for transmission in Mode 3 and Mode5 respectively.

For Class I, packets may be received reliably at R from S1,the conditional one-step transition probability then is

qI(m,k),(i,j) =

⎧⎨⎩

ai, m = 0, j = kai ·

∑∞n=m cn, 0 < m, j = k +m

ai−m+ncn, 0 ≤ n < m, j = k + n(63)

Where ai is as defined in the previous subsection. The firstterm on the right hand side of (63) represents the case thatQ1(t) is zero. As no packets are queued at S1 for transmission,we have Qr2(t + 1) = Qr2(t) and Q1(t + 1) is determinedby the number of packets arrival in the duration T of thet + 1st slot. The second term accounts for the case that theinstantaneous transmit rate R∗

1(t) of S1 is higher than Q1(t)and hence Qr2(t+1) = Qr2(t) +Q1(t). The probability thatR∗

1(t) >= Q1(t) is given by∑∞

i=Q1(t)ci. In this case, Q1(t+

1) is also determined by the number of new arrivals during slott+1 since packets buffered previously are totally delivered toR. For the third term where R∗

1(t) < Q1(t), we have Q2(t+1) = Q2(t) +R∗

1(t) since only as most R∗1(t) packets can be

transmitted during one slot. Q1(t + 1) is hence given by thesum of the number of residual packets in the buffer and thenumber of new arrivals, i.e., Q1(t+ 1) = Q1(t) − R∗

1(t) + igiven there are i arrivals during slot t+ 1.

For Class II, R will transmit network coded data to S2 inMode 3. The conditional transition probability is given by.

qII(m,k),(i,j) =

{ai−m

∑∞n=k rk, j = 0

ai−mrn, j = k − n, 0 ≤ n < k(64)

where queue length increment at S1 is determined by thenumber of arrived packets at S1 within this slot. For queueingat R for S2, Qr2(t + 1) is determined by current bufferinglength Qr2(t) and the instantaneous broadcasting rate of R,i.e., R∗

3(t). If Qr2(t) < R∗3(t), it will be emptied at slot t+1.

Otherwise, there will be still Qr2(t)−R∗3(t) packets buffered

at R for S2.Similarly, we can get the one-step transition probability

for Class III and Class IV. Combining them together, theone-step transition probability of EERSP with ergodic energyoptimization is given in (65). In a similar manner, averagequeue length of S1 and that of R for S2 can be characterizedby using (60)-(62).

C. Practical Energy Consumption with Positive ε

To ensure reasonable running times and memory require-ments in simulation and in practice, we design for averagearrival rates that are slightly larger than the actual rates, i.e.,λi → (1+ε)λi (i = 1, 2), where ε is a small positive value. Inthis case it should be noted that the actual consumed energymight be lower than the designed energy consumption withpositive ε since there might be idle slots of each active modein implementation. Therefore, it is interesting to investigateactual energy consumption in the regime of positive ε andthis is what will be done in this section. Note that here weonly focus on the constant link gain scenario. The practicalenergy consumption under the scenario of fading channel canbe derived in a similar manner and is hence omitted.

Let f∗i be the optimal time fraction of each mode for virtual

arrival rate pair (λ1(1+ ε), λ2(1+ ε)). Let P ∗i be the optimal

power level and R∗i the optimal transmit rate of Mode i for

virtual arrival rate pair. Let π1ij be the stationary distribution

for queue pair (Q1(t), Qr2(t)) and π2ij be the stationary dis-

tribution of queue pair (Q2(t), Qr1(t)) respectively for actualarrival rate pair. Considering the two exclusive scenarios that

1954 IEEE TRANSACTIONS ON WIRELESS COMMUNICATIONS, VOL. 12, NO. 4, APRIL 2013

q(m,k),(i,j) =

⎧⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎨⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎩

ai, m = k = j = 0(1− f1 + f1c0)ai−m, m > 0, k = j = 0(f3rn + f5qn)ai−m, j = k − n, k > 0, 0 ≤ n < kai−m(f3

∑∞n=m rn + f5

∑∞n=m qn), j = 0, k > 0

(f2 + f4 + f1 + f3r0 + f5q0)ai, j = k > 0,m = 0(f2 + f4 + f1c0 + f3r0 + f5q0)ai−m, j = k > 0,m > 0f1ai−m+ncn, m > 0, j = k + n, 0 ≤ n ≤ m− 1f1ai ·∑∞

n=m cn, 0 < m, j = k +m0, else

(65)

Qi(t) < R∗i and that Qi(t) > R∗

i together, we can derive theactual energy consumption for each active mode respectively.

For Modes 1 and 2, the actual energy consumed can begiven by,

E′i =

∞∑k=R∗

i

∞∑j=0

πikjP

∗i +

R∗i −1∑k=0

∞∑j=0

(πikj ·

2k − 1

gi

)i = 1, 2

(66)where the first term accounts for the case that current queuelength is higher than transmit rate of this mode whereas thesecond term accounts for Qi(t) < R∗

i .Similarly, for Modes 4 or 5 whichever is active (f∗

i > 0),the actual energy consumed is given by,

E′i =

∞∑k=R∗

i

∞∑j=0

π6−ijk P ∗

i +

R∗i −1∑k=0

∞∑j=0

(π6−ijk · 2

k − 1

gi

)(67)

For Mode 3, the actual energy consumed is given by,

E3′ =

∑γ>R∗

3

π1mlπ

2kjP

∗3 +

∑γ<=R∗

3

π1mlπ

ikjΓ (68)

where γ = max(l, j) and Γ = 2max(l,j)−1g3

.Combining them together with optimal time fraction as-

signed for each mode, actual energy consumed per slot forthis entire network, Eact, is given by

Eact =

5∑i=1

f∗i E

′i . (69)

We shall compare this actual energy consumption with thesimulation result in the following section.

V. SIMULATION

We now present simulations to verify our findings andexplore tradeoffs. The unit of arrival rates is frames per slot.Noise at each node is assumed to be Gaussian with zero meanand unit variance and Rayleigh fading models are used foreach link.

In Fig. 3, the energy efficiency of digital network codingand the conventional scheme (without network coding) forstatic channels are compared for some specified channel real-izations. The energy required with conventional transmissionis obtained by solving the problem below.

minfi

(2∑

i=1

fiPi(λi

fi) + f4P4(

λ2

f4) + f5P5(

λ1

f5)

)(70)

s.t. fi ≥ 0 (71)5∑

i=1

fi = 1 (72)

f3 = 0 (73)

0.5 0.6 0.7 0.8 0.9 1 1.1 1.2 1.3 1.4 1.50

5

10

15

20

25

30

35

40

λ1(λ

2=1 frame/slot)

Opt

imal

Ene

rgy

Con

sum

ptio

n

Conventional:g1r

=gr1

=g2r

=gr2

=1

DNC:g1r

=gr1

=g2r

=gr2

=1

Conventional: g1r

=gr1

=1, g2r

=gr2

=2

DNC: g1r

=gr1

=1, g2r

=gr2

=2

Fig. 3. Optimal total energy consumption comparison of conventional schemeand digital network coding scheme for constant channel gains. λ2 = 1frame/slot.

0.5 0.6 0.7 0.8 0.9 1 1.1 1.2 1.3 1.4 1.50

10

20

30

40

50

60

70

80

90

λ1(λ

2=1 frame/slot)

Ene

rgy

Con

sum

ptio

n C

ompa

rison

Averaged static channel DNC: Case IErgodic DNC: Case I Ergodic conventional: Case I Averaged static channel DNC:Case IIErgodic DNC: Case IIErgodic conventional:Case II

Fig. 4. Optimal total energy consumption comparison for different schemes.We set λ2 = 1 frame/slot. Case I denotes the case that g1r = g2r = gr1 =gr2 = 1. Case II denotes the case that g1r = gr2 = 1 and g2r = gr1 = 2.

It can be observed that energy efficiency is greatly improvedby employing network coding. For instance, in the case of unitchannel gains, energy is reduced from 31 units to 15 units, atλ1 = 1.5 frames/slot.

In Fig. 4, the energy consumption of the ergodic digital net-work coding solution P3, static-channel digital network codingsolution P1 and the ergodic conventional non-NC solution arecompared, where the conventional non-NC solution is obtainedby solving P3 with f3 = 0. The energy consumption of the

CHEN et al.: DIGITAL NETWORK CODING AIDED TWO-WAY RELAYING: ENERGY MINIMIZATION AND QUEUE ANALYSIS 1955

0.5 1 1.5 2 2.50

100

200

300

400

500

600

700

λ1(λ

2=1 frame/slot, ε=0.5)

Tot

al E

nerg

y C

onsu

mpt

ion

DNC: SimulationDNC: Analytical Result: Eqn. (69) DNC: Upper bound: P1

Fig. 5. Actual total energy consumption comparison of EERSP with positiveε for static channels. We set λ2 = 1 frame/slot and the scenario of g1r =gr1 = 1,g2r = gr2 = 2 and ε = 0.5 is investigated.

static-channel DNC solution was obtained by averaging over200 channel realizations.

It can be observed that energy efficiency is greatly improvedby employing network coding. For instance, in the case ofunit average channel gain, energy usage is reduced from over50 units to less than 30 units, at λ1 = 1.5 frame/slot. It isalso observed that with network coding, optimizing over longterm varying link gain can save even more energy, since itmitigates the adverse effect of deep fading scenario comparedwith static-channel DNC solution. Under the scenario of unitaverage channel gains, total energy consumed is reduced fromover 70 units to less than 30 units, at λ1 = 1.5 frames/slot.

We study the actual energy consumption by implementingEERSP for the static-channel DNC in Fig. 5. In simulation,we ran 106 slots and channels of each link are kept staticthroughout the simulation. It can be seen that the analyticalresult of actual energy usage matches well with the simulationresult. As expected, the actual energy usage is less than theupper bound determined by the optimal energy minimizationsolution because the back-off parameter ε was non-zero.

In the following, we show the tradeoff between energyefficiency and queue length. The data arrival process at eachsource node is assumed to be Poisson. We also set λ1 = 0.5frame/slot and λ2 = 1 frame/slot and each slot spans 1ms.The bandwidth is set to be 1kHz. All link gains are assumedto be unity and Gaussian noise at each node is assumed tohave zero mean and unit variance.

Fig. 6 and Fig. 7 show the average queue length of EERSPfor P1 and P3, respectively. It can be seen that the analyticaland simulation results for queue length at both S1 and at Rfor S2 match with each other perfectly. It is also observed thatwith increasing ε, the queue length at S1 decreases quickly dueto higher transmission rate for each mode. However, increasingε results in an increased probability of idle slots as we areover-provisioning the system, and therefore lower bandwidthefficiency. The factor ε thus controls the trade-off betweenbandwidth efficiency and buffering delay.

Finally, we simulate the total energy usage in Fig. 8 withspecified f1, where the curves for ε = 0 are obtained by

0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 22.5

3

3.5

4

4.5

5

5.5

ε(λ1=0.5 frame/slot, λ

2 = 1 frame/slot)

Ave

rage

Que

ue L

engt

h (f

ram

es)

Static Channel Analytical:Qr2

Static Channel Simulation:Qr2

Static Channel Analytical:Q1

Static Channel Simulation: Q1

Fig. 6. Average Queue Length at S1 and R for S2 versus varying ε for P0.All link gains are assumed t o be unity. We also set λ1 = 0.5 frames/slotand λ2 = 1 frame/slot.

0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 22.5

3

3.5

4

4.5

5

5.5

6

ε(λ1=0.5 frame/slot, λ

2=1 frame/slot)

Ave

rage

Que

ue L

engt

h (f

ram

es)

Ergodic Simulation: Q1

Ergodic simulation: Qr2

Ergodic Analytical Result: Q1

Ergodic Analytical Result: Qr2

Fig. 7. Average Queue Length at S1 and R for S2 versus varying ε forP1. All link gains are assumed to be unity on average. We also set λ1 = 0.5frames/slot and λ2 = 1 frame/slot.

computing (3) and (34) for P1 and P3 respectively and thecurves for ε = 0.1 are obtained by simulation of EERSP.Note that f∗

1 for the curves with ε = 0.1 is obtained bysolving P1 and P3. In simulation, we assume the case thatλ1 = λ2 = 1 frame/slot and we set f2 = f1, f3 = 1− f1− f2and f4 = f5 = 0. We assume unit channel gain for eachlink for P1 and average unit gain for each link for P3. Notealso that with equal arrival rate at each source and identicalchannel gains for the S-R links, we have f∗

4 = f∗5 = 0 for

optimization due to Lemma 1 and f∗1 = f2∗ from Lemmas 1

and 2. It is observed that, for both P1 and P3, the minimumenergy usage is achieved when the assigned f1 approximatesthe corresponding optimal f∗

1 with the designed ε. The validityof adopting the optimal rate and fraction (by solving P1 andP3) in EERSP is thus verified.

VI. CONCLUSION

In this work, the minimal-energy allocation of resourcesto the five transmission modes in a two-way relay network

1956 IEEE TRANSACTIONS ON WIRELESS COMMUNICATIONS, VOL. 12, NO. 4, APRIL 2013

dP ∗i

dgi=

dc∗idgi

P ∗i

c∗i+

d(gic∗i )

dgi·∫∞1

1gi

exp(− gic∗i gi

)dgi

(c∗i gi)2(74)

=dc∗idgi

(∫∞1

1g2i

exp(− gic∗igi)dgi

∫∞1

(1− 1gi) exp(− gi

c∗igi)dgi∫∞

1(1− 1

gi) exp(− gi

c∗igi)dgi

−∫∞1

1gi

exp(− gic∗igi)dgi

∫∞1

( 1gi

− 1g2i) exp(− gi

c∗igi)dgi∫∞

1(1− 1

gi) exp(− gi

c∗igi)dgi

)(75)

=dc∗idgi

∫∞1

1g2i

exp(− gic∗i gi

)dgi∫∞1

exp(− gic∗i gi

)dgi − (∫∞1

1gi

exp(− gic∗i gi

)dgi)2∫∞

1(1− 1

gi) exp(− gi

c∗i gi)dgi

(76)

< 0 (77)

0.2 0.25 0.3 0.35 0.45

10

15

20

25

30

35

40

f1(λ

1=1 frame/slot,λ

2=1 frame/slot)

Tot

al E

nerg

y U

sage

EERSP for P1: ε=0.1, f1* =1/3

P1: ε=0,f1* =1/3 (Eqn. (3))

P3: ε=0,f1* =0.3107 (Eqn. (34))

EERSP for P3: ε=0.1, f1* =0.3119

Fig. 8. Total Energy Usage Comparison with varying f1 for P1. We setλ1 = 0.5 frames/slot and λ2 = 1 frame/slot and assume unit channel gainfor all links for P1 and average unit gain for all links for P3. We also setf2 = f1, f3 = 1− f1 − f2 and f4 = f5 = 0.

with digital network coding at the relay and stochastic packetarrivals at the two source nodes was obtained. Both staticand fading channels were accounted for in the static-channeland ergodic energy minimization problems respectively. Theproposed solutions ensure stability of all four queues in thenetwork for arbitrary average packet arrival rates. The ergodicenergy minimization solution has a water-filling structure andlower energy usage compared to re-designing the systemto match the instantaneous channel gains using the static-channel energy minimization solution in a fading channel. Inaddition, a practical scheduling protocol was introduced toimplement the proposed resource allocation solutions, and anexact queuing analysis of the protocol was obtained. As two-way relay networks appear in many applications includingcellular networks and satellite systems, the work presentedhere is an important step towards the realization of a practicaland useful communication network setup.

APPENDIX APROOF FOR PROPOSITION 2

In this appendix, we give the proof for Proposition 2. Firstly,let us recall that the probability density function (pdf) of linkgain over a Rayleigh fading channel is given by

p(gi) =1

giexp(−gi

gi). (78)

Hence, substituting (78) into (51), we obtain

R∗i =

∫ ∞

1β∗i

log2 e

log2(β∗i gi log2 e )

1

giexp(−gi

gi)dgi (79)

=

∫ ∞

1

1

gi ln 2exp(− gi

c∗i gi)dgi (80)

where c∗i = β∗i log2 e for short. Similaryly, P ∗

i is given by,

P ∗i =

∫ ∞

1

c∗ig2i

exp(− gic∗i gi

)dgi. (81)

Substituting (80) and (81) into (44), we obtain the followinglemma.

Lemma 4: Under the optimal energy solution P4 overRayleigh fading channels, optimal power level and optimalrate of each active mode can be linked by∫ ∞

1

(c∗ig2i

− c∗igi) exp(− gi

c∗i gi)dgi + γ∗ = 0. (82)

Note that c∗i is an implicit function of gi. Take derivativeswith respect to gi on both sides of (82), we arrive at

dc∗idgi

∫∞1

( 1g2i− 1

gi) exp(− gi

c∗i gi)dgi

c∗i+

d(gic∗i )

dgi

∫∞1

( 1gi

− 1) exp(− gic∗i gi

)dgi

c∗i g2i

= 0. (83)

Since 1g2i− 1

gi< 0 and 1

gi− 1 < 0 hold if gi > 1, it can

be deduced that dc∗idgi

and d(gic∗i )

dgiare with different signs, i.e.,

dc∗idgi

d(gic∗i )

dgi< 0.

Hence there are only two feasible scenarios: 1) dc∗idgi

> 0 andd(gic

∗i )

dgi< 0; 2) dc∗i

dgi< 0 and d(gic

∗i )

dgi> 0. However, it can be

immediately deduced that, if dc∗idgi

> 0, d(gic∗i )

dgi= c∗i + gi

dc∗idgi

>0 given c∗i , gi > 0. A contradiction occurs for scenario 1) andit cannot be feasible. Therefore the latter scenario is uniquelyfeasible, i.e., dc∗i

dgi< 0 and d(gic

∗i )

dgi> 0.

Based on the above analysis, we seek to find the relationof P ∗

i and R∗i with gi by deriving the first-order derivative of

P ∗i and R∗

i with respect to gi for each active mode.From (80), the derivative of R∗

i with respect to gi can begiven by,

dR∗i

dgi=

d(gic∗i )

dgi·∫∞1

1ln 2 exp(− gi

c∗i gi)dgi

(c∗i gi)2> 0 (84)

where (84) comes from the conclusion that d(gic∗i )

dgi> 0.

Therefore, R∗i is an increasing function of gi for each active

mode in the ergodic case as well.

CHEN et al.: DIGITAL NETWORK CODING AIDED TWO-WAY RELAYING: ENERGY MINIMIZATION AND QUEUE ANALYSIS 1957

In a similar way, the derivative of P ∗i in (81) with respect

to gi is derived as follows.Note that (75) can be obtained by substituting the equality

of (83) into (74) and (77) comes from Cauchy–Schwarzinequality and the fact that dc∗i

dgi< 0.

Hence P ∗i is an increasing function of gi for each active

mode in the ergodic case as well. Proposition 2 then is proved.

REFERENCES

[1] R. Ahlswede, N. Cai, R. Li, and R. W. Yeung, “Netwoking informationflow,” IEEE Trans. Inf. Theory, vol. 46, pp. 1204–1216, July 2000.

[2] C. H. Liu and F. Xue, “Network coding for two-way relaying: rate region,sum rate and opportunistic scheduling,” in Proc. 2008 IEEE InternationalConference on Communication, pp. 1044–1049.

[3] S. Zhang, S. Liew, and P. Lam, “Physical layer network coding,” inProc. 2006 ACM International Conference on Mobile Computing andNetworking, vol. 6, pp. 358–365.

[4] P. Popovski and H. Yomo, “Physical network coding in two-way wire-less relay channels,” in Proc. 2007 IEEE International Conference onCommunication, pp. 707–712.

[5] F. Rossetto and M. Zorzi, “On the design of practical asynchronousphysical layer network coding,” in Proc. 2009 IEEE Workshop in SignalProcessing Advances in Wireless Communications, pp. 469–473.

[6] K. Jitvanichphaibool, R. Zhang, and Y. C. Liang, “Optimal resource allo-cation for two-way relay-assisted OFDMA,” IEEE Trans. Veh. Technol.,vol. 58, pp. 3311–3321, July 2009.

[7] S. L. Fong, M. Fan, and R. W. Yeung, “Practical network coding on three-node point-to-point relay networks,” in Proc. 2011 IEEE InternationalSymposium on Information Theory, pp. 1–5.

[8] M. Pischella and D. Le Ruyet, “Optimal power allocation for the two-way relay channel with data rate fairness,” IEEE Commun. Lett., no. 99,pp. 1–3, 2011.

[9] W. Li, J. Li, and P. Fan, “Network coding for two-way relaying networksover rayleigh fading channels,” IEEE Trans. Veh. Technol., vol. 59, pp.4476–4488, Oct. 2010.

[10] Z. Chen, T. J. Lim, and M. Motani, “Energy minimization in two-wayrelay networks with digital network coding,” in Proc. 2012 IEEE Int’lConf. Comms. in China.

[11] Z. Chen, T. J. Lim, and M. Motani, “Energy efficiency and queuestability in a two-way relay network,” Proc. 2012 IEEE Int’l Conf.Comms. Systems.

[12] C. Hausl, O. Iscan, and F. Rossetto, “Resource allocation for asymmetricmulti-way relay com-munication over orthogonal channels,” EURASIP J.Wireless Commun. and Networking, 2012.

[13] E. S. Lo and K. B. Letaief, “Network coding versus superpositioncoding for two-way wireless communication,” Proc. 2009 IEEE WirelessCommunications and Networking Conference, 2009.

[14] T. Oechtering and H. Boche, “Stability region of an optimized bidirec-tional regenerative half-duplex relaying protocol,” IEEE Trans. Commun.,vol. 56, no. 9, pp. 1519–1529, 2008.

[15] I. Krikidis, “Stability analysis for bidirectional MABC-DF relay net-works with bursty traffic,” IEEE Trans. Veh. Technol., vol. 60, no. 6, pp.2844–2849, 2011.

[16] E. N. Ciftcioglu, A. Yener, and R. Berry, “Stability of bi-directionalcooperative relay networks,” in Proc. 2008 IEEE Information TheoryWorkshop, pp. 144–148.

[17] E. N. Ciftcioglu, A. Yener, and R. Berry, “Stability regions of two-wayrelaying with network coding,” Proc. 2008 International Conference onWireless Internet.

[18] S. P. Boyd and L. Vandenberghe, Convex Optimization. CambridgeUniversity Press, 2004.

[19] H. Kobayashi, B. L. Mark, and W. Turin, Probability, Random Pro-cesses, and Statistical Analysis. Cambridge University Press, 2012.

Zhi Chen received his B.S. degree from Universityof Electronic Science and Technology of China in2006, and the Ph.D. degree from Tsinghua Uni-versity in 2011, all in Electrical and ComputerEngineering. Since January, 2012, He has worked asa postdoctoral research fellow with National Univer-sity of Singapore’s ECE Department. His researchinterests include two-way relaying, cognitive radio,energy harvesting, green communication and othertopics of wireless communication.

Teng Joon Lim (S’92-M’95-SM’02) grew up inSingapore, obtained the B.Eng. degree in Electri-cal Engineering with first-class honours from theNational University of Singapore in 1992, and thePh.D. degree from the University of Cambridge in1996. From September 1995 to November 2000, hewas a researcher at the Centre for Wireless Com-munications in Singapore, one of the predecessorsof the Institute for Infocomm Research (I2R). FromDecember 2000 to May 2011, he was AssistantProfessor, Associate Professor, then Professor at the

University of Toronto’s Edward S. Rogers Sr. Department of Electrical andComputer Engineering. Since June 2011, he has been a Professor at theNational University of Singapore’s ECE Department, and currently serves asthe director of the Communications and Networks area. His research interestsspan many topics within wireless communications, including multi-carriermodulation, MIMO, cooperative diversity, energy-efficient communications,cognitive radio, and random networks, and he has published widely in these ar-eas. He has served/is serving on the editorial boards of IEEE TRANSACTIONS

ON WIRELESS COMMUNICATIONS, IEEE WIRELESS COMMUNICATIONS

LETTERS, Wiley Transactions on Emerging Telecommunications Technologies(ETT), IEEE TRANSACTIONS ON VEHICULAR TECHNOLOGY, and IEEESIGNAL PROCESSING LETTERS. He serves regularly on the technical programcommittees of major international conferences such as ICC and Globecom,and is the founding chair of the Special Interest Group on Green CellularNetworks within IEEE Comsoc’s Technical Sub-Committee on Green Com-munications and Computing (TSCGCC).

Mehul Motani received the B.S. degree fromCooper Union, New York, NY, the M.S. degree fromSyracuse University, Syracuse, NY, and the Ph.D.degree from Cornell University, Ithaca, NY, all inElectrical and Computer Engineering.

Dr. Motani is currently an Associate Professorin the Electrical and Computer Engineering De-partment at the National University of Singapore(NUS). He has held a Visiting Fellow appointmentat Princeton University, Princeton, NJ. Previously,he was a Research Scientist at the Institute for

Infocomm Research in Singapore for three years and a Systems Engineerat Lockheed Martin in Syracuse, NY for over four years. His researchinterests are in the area of wireless networks. Recently he has been workingon research problems which sit at the boundary of information theory,networking, and communications, with applications to mobile computing,underwater communications, sustainable development and societal networks.

Dr. Motani has received the Intel Foundation Fellowship for his Ph.D.research, the NUS Faculty of Engineering Innovative Teaching Award, andplacement on the NUS Faculty of Engineering Teaching Honours List. Hehas served on the organizing committees of ISIT, WiNC and ICCS, and thetechnical program committees of MobiCom, Infocom, ICNP, SECON, andseveral other conferences. He participates actively in IEEE and ACM andhas served as the secretary of the IEEE Information Theory Society Board ofGovernors. He is currently an Associate Editor for the IEEE TRANSACTIONS

ON INFORMATION THEORY and an Editor for the IEEE TRANSACTIONS ONCOMMUNICATIONS.


Recommended