Ad Hoc Networks xxx (2014) xxx–xxx
Contents lists available at ScienceDirect
Ad Hoc Networks journal homepage: www.elsevier.com/locate/adhoc
On bridging theory and practice of inter-session network coding for CSMA/CA based wireless multi-hop networks Achuthan Paramanathan ⇑, Simon Thorsteinsson, Daniel E. Lucani, Frank H.P. Fitzek Department of Electronic Systems, Aalborg University, Denmark
a r t i c l e
i n f o
Article history: Received 4 March 2014 Received in revised form 7 July 2014 Accepted 29 July 2014 Available online xxxx Keywords: Network coding Medium access control Modeling Testbed Real-life measurements
a b s t r a c t Inter-session network coding is well known for its ability to spectral efficiency and endto-end throughput in wireless multi-hop networks by up to four fold on some scenarios compared to standard routing. However, a variety of inter-session network coding implementations have consistently shown a decrease in throughput when operating at high traffic loads and significantly below the values expected theoretically. While still being superior to forwarding, this discrepancy between past analytical studies and real measurement results requires further understanding to realize inter-session network coding’s full potential in practice. This paper presents mathematical analysis for two of the key sources for this discrepancy, namely, long- and short-term channel asymmetries. We use this knowledge to develop, yet effective algorithm to cope with these asymmetries and bolster network coding’s performance in real systems. Our algorithm and other alternative algorithms have been implemented in a hardware platform that uses a CSMA/CA based medium access control (MAC) protocol. Performance evaluation is carried out via an extensive measurement campaign with node deployments in different testing environments, channel conditions, and active devices in the network with the equivalent to more than a month of continuous testing. Based on the measurement results, we demonstrate that our algorithm is capable of closing the gap to theoretically expected results despite being influenced by real world channel conditions while maintaining fairness to other network devices at the MAC level. Ó 2014 Elsevier B.V. All rights reserved.
1. Introduction Devices with wireless communication capabilities are able to form large and complex wireless multi-hop, mesh networks. The key feature of these networks lies in the fact that nodes aid each other in passing data packets from the source to its intended destinations. This contrasts with infrastructure-based networks, where each node is directly connected to the infrastructure via a single wireless hop. ⇑ Corresponding author. Tel.: +45 9940 8733. E-mail addresses:
[email protected] (A. Paramanathan), sthors10@student. aau.dk (S. Thorsteinsson),
[email protected] (D.E. Lucani),
[email protected] (F.H.P. Fitzek).
Although mesh networks have been studied for several decades, the inherent throughput limitations and scalability issues [1–4] of it call for solutions that can increase the spectral efficiency and end-to-end throughput. In recent years, network coding (NC) has been shown to be a key enabler to deliver higher throughput and reliability to mesh networks. Although it cannot directly improve the scalability issues, it has been shown to increase throughput by several fold [5]. NC was first introduced by [6] as a way to achieve multicast capacity in wireline networks. The fundamental idea behind NC lies in the mixing (coding) of data packets belonging to either the same flow (intra-session), or different flows, (inter-session) in the network, i.e., the coding is not limited to end devices. Coding at intermediate
http://dx.doi.org/10.1016/j.adhoc.2014.07.018 1570-8705/Ó 2014 Elsevier B.V. All rights reserved.
Please cite this article in press as: A. Paramanathan et al., On bridging theory and practice of inter-session network coding for CSMA/CA based wireless multi-hop networks, Ad Hoc Netw. (2014), http://dx.doi.org/10.1016/j.adhoc.2014.07.018
2
A. Paramanathan et al. / Ad Hoc Networks xxx (2014) xxx–xxx
nodes (recoding) is carried out using algebraic operations on a given finite field. In the case of intra-session NC, the destinations focus on gathering enough coded packets to decode the original data. For inter-session NC, the general problem of multiple unicast/multicast sessions is more complex. In fact [7] showed that linear operations are insufficient to solve the general problem. For this reason, inter-session NC is typically realized using simpler approaches based on local optimizations. Current approaches follow a similar strategy. First, determine simple topologies within the network that can provide coding opportunities. Second, identify coding regions, where paths of two transmission sessions overlap in the mesh network. Third, combine (code) packets of the flows intersecting at a relay in the region and broadcast the combined (coded) packet to the nodes in the coding region. Thus, a single transmission will allow more than one node in the coding region to gain a useful packet after decoding locally. Finally, the outgoing flows from the region do not contain combinations of flows, i.e., each outgoing packet is a packet from its original flow. Exploiting this idea [5] introduced a simple IEEE 802.11-based protocol, named COPE, that uses inter-session NC. Using real-life implementation and measurements. COPE demonstrated that a 3x to 4x gain in the throughput of UDP data flows over traditional routing is possible. More recently, CATWOMAN [8] was proposed as an alternative to COPE in order to run on commercial devices and exploiting an existing mesh network protocol, i.e., BATMAN. As of today, CATWOMAN is available in the Linux Kernel [9]. Although the problem has been studied using simulations and real-life implementation on different systems based on CSMA/CA, e.g., [8,10–13], there is a common trend in all these results. Namely, the system throughput decreases in high load scenarios, i.e., when network operates in channel congestion for the two-way relay topology, as shown in Fig. 1, and more marked for other scenarios, e.g., cross topology. The degradation for the two-way relay channel as well as the magnitude of the degradation for
Practical wo.NC Practical NC
3500
Analytical wo.NC
Region for improvement
3000
Throughput [kbps]
Analytical NC
2500
other topologies at high load was not predicted by the analysis of Zhao and Medard [14] and effectively reduces the impact of inter-session NC. As showed in our preliminary work in [11], part of the issue is that asymmetries in channel conditions can have an impact in the fairness of CSMA/CA. This can directly influence the gain from coding in the system. Our goal is then to characterize these issues and provide simple, implementable solutions for improving the gains in real systems. In this paper, we propose new analytical and implementation strategies that are capable of providing a stable channel throughput for high load scenarios by controlling the channel access priority of the nodes within a coding region. Our aim is to increase the coding opportunities in the system with simple, efficient mechanisms as well as to increase and stabilize the throughput in high-load scenarios while maintaining a fair allocation to other sessions in the network. Our contributions are as follows. 1. Mathematical analysis: To characterize the effect of asymmetric channel conditions on a CSMA/CA based MAC protocol and its consequences in coding gain and system throughput for inter-session NC. We also show that the reduction in coding gain is influenced by short-term and long-term effects. 2. Design of simple, effective algorithms: Inspired by the mathematical analysis. These algorithms provide a stable throughput performance for high load scenarios under asymmetric channel conditions for CSMA/CA. The proposed solution combines buffer management, to cope with short-term asymmetries, and priority adaptation in the MAC, to cope with long-term asymmetries. Comparison algorithms are also proposed to understand where and how much gain is possible from pure buffer management and pure priority adaptation. 3. Implementation and validation via extensive measurement campaigns: The proposed solutions are implemented in a hardware platform. Our measurement campaign includes deployments in different channel conditions due to node placements and different testing environments as well as considering the effect of other active devices in the network. The latter allow us to show that the proposed solution can provide increased throughput without unfairly reducing performance of other active devices in the network. Our results contain data information equivalent to more than a month of continuous measurement.
State-of-the-art
2000
2. System model
1500
Our system analysis and designs focus on mesh networks that look for occurrences of the two-way relaying topology to define coding regions. The two-way relay topology considers three nodes A; B, and a relay node (R) (Fig. 2), which are part of the path of two unicast sessions but in opposite directions. Thus, A and B intend to exchange data packets with the help of R. Unless stated otherwise, we consider that both A and B are inducing/injecting symmetric data packets into the network. Node R does not generate data packets and is only responsible for relaying packets belonging to A and B. This relaying process can be done
1000 500 0
0
1000
2000
3000
4000
5000
Offered Load [kbps] Fig. 1. Discrepancy between analytical results, based on [8], and practical results from [14]. Here, we clearly see the difference when using intersession NC while there is a perfect match for the pure forwarding.
Please cite this article in press as: A. Paramanathan et al., On bridging theory and practice of inter-session network coding for CSMA/CA based wireless multi-hop networks, Ad Hoc Netw. (2014), http://dx.doi.org/10.1016/j.adhoc.2014.07.018
A. Paramanathan et al. / Ad Hoc Networks xxx (2014) xxx–xxx
3
Coding regions Y
A R B X
Fig. 2. Wireless mesh networks showing the occurrences of the two-way relaying topology and the coding regions.
using (i) inter-session NC, i.e., by XORing two packets from different flows, or using (ii) standard forwarding. Thus, a coding region can be defined as the region in a mesh network that enables the combining of two packets belonging to two different flows as shown in Fig. 2. We assume that each node in the network implements a basic CSMA/CA medium access control (MAC) mechanism, similar to that defined in IEEE 802.11 DCF standard and without RTS/CTS [15]. More specifically, we assume the following model for the system implementing an inter-session NC solution. When R receives a packet from node A (B) to be sent to node B (A), it first checks if it has a packet from the other flow in its buffer. If no packet from B is found that can be coded with the incoming packet from A; R keeps the packet at a buffer, denoted as Keep Buffer (KB), for a given holding time (HT). If later on, R receives a packet from B and the Time-in-Buffer (TiB) of the packet from A is less than HT then R is said to have a coding opportunity. Thus, these two packets are combined by performing bit-by-bit XOR operation. This combined packet is then broadcasted to both A and B. A and B are assumed to keep previously sent data packets stored so that they can revert the coding process by XORing the incoming packet with the corresponding packet stored by them. We say that an instantaneous coding gain of 2 is achieved when R is able to combine two packets from the two different flows, using a similar definition to Lemma IV.2 in [5]. On the other hand, if R does not receive any codeable packets and the TiB of the packet from A is greater than HT then this packet will simply be forwarded and the instantaneous coding gain will be 1. Finally, we define the coding gain as the timeaverage of the instantaneous coding gains. Although we focus on the two-way relaying topology, this topology provides the necessary basis for understanding more complex topologies, e.g., Chain, X, Cross, and wheel, as considered in [5,14,8,13]. Both the analysis and the mechanisms can be extended seamlessly to characterize these cases. Studying the two-way relay topology is not only key to gain fundamental understanding of current limitations of inter-session NC, but it also constitutes a useful topology in deployments for wireless multi-hop networks [8]. 3. Issues and challenges The key to attain the full potential of inter-session NC in the two-way relay topology is to maximize the average coding gain. For the case of symmetric traffic from A and B, this translates in achieving an average coding gain as
close to 2 as possible. For this to happen, R needs to receive successfully an equal amount of packets from both A and B. This is possible if A an B have channels with the same characteristics and statistics, e.g., the probability of packet loss due to collision, fading, shadowing, is the same for the link between A and R as well as the link between B and R. However, nodes that operate in real world conditions have asymmetric channel fading, shadowing, and noise. These channel asymmetries translate both long-term and shortterm effects. Long-term effects of these asymmetries lie in a systematic reduction of the average coding gain due to the fact that the incoming rates to R are asymmetric. Short-term effects include bursts of data packets for a single sender to arrive at R, e.g., in a short period R could have received packets only belonging to one of the sender as pointed out in [11]. The latter can be solved in part by increasing the size of the KB and the period of HT. However, increasing the KB or HT are not desirable as increasing the size of a buffer may result in Bufferbloat [16], and increasing the HT will introduce end-to-end delay [17]. For resource constrained hardware, this constitutes an additional challenge. The long-term effects require a more fundamental change in the system, e.g., altering the priorities for transmission of the different devices. We shall now describe in more details these issues. 3.1. Long-term asymmetry To illustrate this issue, consider our system model with the two-way relay topology operating in high data load scenario. Without loss of generality, we assume that node A has better channel conditions towards R than node B. Furthermore, consider that both A and B have data packets to send. Before any transmission, both nodes need to follow the rules defined in a typical CSMA/CA protocol, as in Fig. 3. Fig. 3, shows the sequence of events of our example transmission process from A and B to R under asymmetric channel loss conditions. For simplicity, we leave out the inter-frame times and ACK transmissions defined in CSMA/CA and assume that the nodes are able to sense each other e.g., either by using RTS/CTS or carrier detect (CD). Here, we are especially interested in two key elements, namely, the transmission and the corresponding backoff period. Initially, node B gets channel access and successfully transmits its packet. After the transmission, B draws a new backoff value uniformly at random from the contention window range, i.e., a value in ½0; bðmÞ 1 and bðmÞ ¼ 2m xinit , where m is the backoff stage and xinit denotes the minimum contention window size. Let us assume that the value drawn
Please cite this article in press as: A. Paramanathan et al., On bridging theory and practice of inter-session network coding for CSMA/CA based wireless multi-hop networks, Ad Hoc Netw. (2014), http://dx.doi.org/10.1016/j.adhoc.2014.07.018
4
A. Paramanathan et al. / Ad Hoc Networks xxx (2014) xxx–xxx
Fig. 3. Effect of channel losses on CSMA/CA protocol with two nodes in a wireless environment. In this case, Node B is considered to have a worse channel compared to node A.
is 4.1 While node B counts down from 4, node A senses the channel to be idle and transmits its packet, then draws a new backoff value e.g., 4. Node B ends its count and transmits its packet, we suppose that the packet from B gets lost due to channel losses, i.e., no collision. As of it, node B increases the window size to bð1Þ ¼ 16. From this larger range, B randomly draws a new backoff value of 8 and starts the count down. While B is in backoff, A manages to transmit two packets while B does the countdown of slots before transmitting. Once again, B is unsuccessful in transmitting a packet. As the result, B increases its window size from bð1Þ ¼ 16 to bð2Þ ¼ 32 and draws 16 as the backoff value. During this long countdown node A will get several transmission attempts before B is done counting. This example illustrates the worst-case scenario when considering asymmetric channel conditions. It illustrates that having asymmetric channel conditions can lead to an inefficient coding gain. A way to cope with these channel asymmetries is to grant the node with the worst channel, with a higher channel access priority than the others, as we originally suggested in [11]. However, granting a higher channel access priority for only one-node turns out to be insufficient, hence an improvement is needed. We shall now analyze the effect of controlling channel access priority on a coding region, naturally extending our work in [11]. For this purpose, we shall first extend the Bianchi model [18] for incorporating channel loss asymmetries. 0 Let the transmission probability si for the i -th node as
si ¼
2 m
iÞ Þ 1 þ xinit þ qi xinit ð1ð2q 12q
;
ð1Þ
i
where the numbers represented by i corresponds to the nodes represented in a two-way relay topology, e.g., 1 for A, 2 for B and 3 for R. The variable xinit is the minimum contention window, m the backoff stage and qi the probability of an unsuccessful transmission as an effect of a lossy channel:
qi ¼ 1 ð1 pi;e Þð1 pi Þ;
ð2Þ
where pi;e is the probability of not receiving a packet or receiving a packet with errors, e.g., due to fading, noise, and pi is the collision probability given that the i-th node is attempting to transmit a packet: 1
In this example, we suppose that the drawn backoff value to always be the mean value of bðmÞ for simplicity.
!
3 Y
pi ¼ 1
ð1 sj Þ ;
8i 2 f1; 2; 3g:
ð3Þ
j:j–i;j2f1;2;3g
Now we define the probability of that there is at least one transmission occurring among the nodes during a slot as: !
Ptr ¼ 1
3 Y ð1 si Þ :
ð4Þ
i¼1
Finally, the probability that the signal has been successfully transmitted given that there is one transmission is:
Pi;s ¼
si ð1 pi;e Þ Ptr
3 Y
! ð1 sj Þ ;
8i 2 f1; 2; 3g: ð5Þ
j:j–i;j2f1;2;3g
Using a similar rationale as in [18], we define the saturation throughput Si of a node i as:
Si ¼
Pi;s Pi;tr E½P ; ð1 Pi;tr Þr þ Pi;tr Pi;s T s þ Pi;tr ð1 P i;s ÞT c
ð6Þ
where E½P is the average packet size, and r the slot time duration, T s the average time the channel is sensed busy during a successful transmission, and finally T c is the average time the channel is sensed busy during a collision. We now apply this model on a two-way relay topology to estimate the end-to-end throughput. Here, both A and B are considered to operate in a lossy channel environment, in compare to [11] where it was only one of the nodes that is assumed to operate in a lossy channel environment. For simplicity, node R is considered to unicast the coded packet to the node with the bestchannel. The analysis can be easily adapted to the case of transmissions to the worst-channel or other combinations. Let SA be the received packets at R sent by A and SB sent by B with a channel loss probability pA;e and pB;e for node A and B respectively. The received packets are coded at R and transmitted as coded unicast packets, denoted as (UC pkt ) to the node that has the best channel. The node with the best channel can be found by minðpA;e ; pB;e Þ and the node with the worst channel is supposed to overhear the sent coded packet, denoted as (OHpkt ). The un-coded packets are transmitted as unicast to the intended destination, denoted as (UC pkt ). 3.1.1. Best channel unicast The total number of transmitted packets from R can be expressed as a sum of UC pkt and UC pkt . The total number
Please cite this article in press as: A. Paramanathan et al., On bridging theory and practice of inter-session network coding for CSMA/CA based wireless multi-hop networks, Ad Hoc Netw. (2014), http://dx.doi.org/10.1016/j.adhoc.2014.07.018
A. Paramanathan et al. / Ad Hoc Networks xxx (2014) xxx–xxx
of coded packets in UC pkt are bounded by the flow with the lowest rate e.g., minðSA ; SB Þ and the total number of uncoded packet is bounded by maxðSA ; SB Þ minðSA ; SB Þ. By rewriting these expressions we get: minðSA ; SB Þ þ ½max ðSA ; SB Þ minðSA ; SB Þ ¼ maxðSA ; SB Þ. Let SR be the maximum number of transmission of packets allowed by the MAC for R. The total number of packets that are transmitted to any node, given R receives some packets from both A and B, be bounded by SR!total ¼ minðSR ; maxðSA ; SB ÞÞ. 3.1.2. Probability of overhearing coded packets The probability of a successful overhearing of a coded packet depends on the number of retransmission of UC pkt sent by R. To this, it is assumed that R has an infinite number of retransmission and each retransmission is considered as an independent event. Similar to the expression defined in [19] as Lemma I, let PðN ¼ nÞ be the probability of the coded packet (UC pkt ) is received on the n-th transmission targeted to the best link node:
PðN ¼ nÞ ¼ minðpA;e ; pB;e Þn1 ð1 minðpA;e ; pB;e ÞÞ;
ð7Þ
for n ¼ 1; 2; 3; . . . ; 1. The probability of the node with the worst channel overhearing a packet given n transmissions can be expressed as
PðOHpkt jnÞ ¼ 1 maxðpA;e ; pB;e Þn :
ð8Þ
The conditional probability of that the overhearing node looses a packet is then
Pl ¼
1 X PðOHpkt jnÞ PðN ¼ nÞ:
ð9Þ
n¼1
Using the fact that PðN ¼ nÞ is characterized by a Geometric series, then Pl can be expressed as
Pl ¼
! ð1 minðpA;e ; pB;e Þ maxðpA;e ; pB;e ÞÞ : 1 1 ðpA;e pB;e Þ
ð10Þ
The total number of packets that are transmitted from R and expected to be overheard is expressed as
SR!OH
pkt
¼ minðSR ; minðSA ; SB ÞÞ Pl :
ð11Þ
3.1.3. Saturation throughput We can now calculate the saturation throughput by using the expression (11) and (6). The calculations are carried out with the purpose of achieving the maximum throughput for a network that operates on top of a lossy channel. For the calculation, we use the following network parameters: Channel Bit Rate = 50 kbps, MAC Header = 4 bytes, Payload = 28 bytes, Slot time ¼ 800 lS; SIFS ¼ 800 lS; DIFS = 2400 lS, T s ¼ 11:3 mS; T c ¼ 8:7 mS. These parameters are based on our CSMA/CA MAC protocol [12]. The implemented CSMA/CA protocol is custom made to fit to our low rate platform, the OpenSensor v4.0, meaning that the timings of DIFS, SIFS, back-off is recalculated to fit our specific constraints. However, it provides the functionalities of the basic DCF channel access procedure defined in IEEE’s 802.11 without RTS/CTS exchange.
5
The saturation throughput is presented in Fig. 4. Here, the results are presented with different channel loss probability for both node A and B. When the channel loss for both nodes are 0 as shown in Fig. 4a then both an optimal coding + MAC gain and a system throughput are achieved. We show that both nodes have the same minimum contention window size. As shown in the remaining sub-figures, the optimal system throughput is achievable if the minimum contention window is regulated individually for both nodes for the case of asymmetric channel losses. 3.2. Short-term asymmetry The short-term asymmetry is caused by the inherent randomness of the channel conditions and of the MAC protocol. As an example, suppose that one of the nodes draws a large backoff period, where the other node draws a small backoff period. This results in node R receiving a burst of packets belonging to only one of the nodes. To illustrate this shortterm asymmetry on a traditional inter-session NC setup, consider the example of Fig. 5. Here, a symmetric scenario is depicted in Fig. 5a and a bursty scenario in Fig. 5b. For simplicity, we assume that the size of the buffer for this example is 2, meaning that R can only store two packets at any given time. In Fig. 5a, we see a wireless scenario with symmetric packet arrival rate. Here, node R receives one packet from A and a packet from B. As of this, node R is able to combine and broadcast the coded packet, achieving a coding + MAC gain of two. Now, consider a scenario where one of the nodes, (node B), draws a large backoff window or has a worse link toward R in comparison to A as shown in Fig. 5b. Due to this, R may receive a sequence of packets only belonging to A, e.g., R receives packet 1 from A and stores it in the KB until TiB 6 HT, while the packet from B is either not transmitted due to a large countdown or lost due to channel condition. Meanwhile R receives packet 2 from A and finds no codable packet in KB. Packet 2 from A is stored in KB, and KB is now full. Suppose now that R receives a packet from B, unfortunately this packet with coding potential will be dropped. Those packets in KB will be kept until TiB 6 HT and as of this the buffer remains full. When TiB exceeds HT, packet 1 and 2 from A will be forwarded. There are some issues pointed out in the above explained example considering a traditional inter-session NC setup. The first issue is that a packet from B that might have been used for coding could be dropped due to lack of buffer management. Such packets could grant additional coding potential and free more buffer space if kept enough time. Second, those packets that are kept in KB will be kept until HT is reached, assuming a full buffer, then those new incoming packets with coding potential will be dropped. The consequence of this is, that those packets in the KB will be kept for a longer time resulting in an increased end-to-end delay. 4. Proposed strategies In this section, we are proposing different strategies to solve those issues pointed out in the previous section as the long and the short-term issues.
Please cite this article in press as: A. Paramanathan et al., On bridging theory and practice of inter-session network coding for CSMA/CA based wireless multi-hop networks, Ad Hoc Netw. (2014), http://dx.doi.org/10.1016/j.adhoc.2014.07.018
6
A. Paramanathan et al. / Ad Hoc Networks xxx (2014) xxx–xxx
Fig. 4. This figure shows the system throughput for different channel loss probabilities. The throughput is plotted as a function of minimum contention window size (xinit ) of node A and B. The optimal system throughput is marked by the vertical arrow.
Fig. 5. These figures shows the packet arrival and departure sequence at the relay for a symmetric and a bursty packet arrival scenario. The square, marked with a circle and a cross, represents a coded packet where the plain color represent no coding. The different squares represent packet sent by the respective node and received by the relay R. (For interpretation of the references to color in this figure legend, the reader is referred to the web version of this article.)
4.1. Channel priority (CP) This strategy, is proposed based on the analysis presented in Section 3.1. The goal for this strategy is to cope with channel asymmetry, and to solve the issue raised by the long term-asymmetry. The key point here, is that the coding node (R) has the capability of controlling the contention window size by changing the size of xinit of the nodes in the coding region. The steps for this strategy, are as follows: first node R counts and logs the received packets from A and B separately each second. In addition R also counts the number of outgoing packets, e.g., number of coded and non-coded packets. Then, R updates xinit for both A and B according to Algorithm 1. Here, the algorithm
is called every 1 s. where ai and bi is the received packet count during this time. In addition, each time R sends a coded packet then the variable ro is counted twice as each coded packet includes two received packets and similarly ro is counted only once when forwarding. These newly estimated xinit is then added in the header of the next outgoing packet and at the end of the procedure the variables ai; bi and ro are all set to 0. Applying this strategy to the example of Fig. 3 then node R will request node B to decrease the minimum contention window size by 1, this means that B now draws a backoff value from a reduced window size. By reducing the window size of node B, R will increase the chances of receiving more packets from this node.
Please cite this article in press as: A. Paramanathan et al., On bridging theory and practice of inter-session network coding for CSMA/CA based wireless multi-hop networks, Ad Hoc Netw. (2014), http://dx.doi.org/10.1016/j.adhoc.2014.07.018
A. Paramanathan et al. / Ad Hoc Networks xxx (2014) xxx–xxx
Algorithm 1. Estimation of xinit 1: Axinit = 8 . set xinit of A to default 2: Bxinit = 8 . set xinit of B to default 3: xmin = 4 4: xmax = 24 5: procedure cpðai; bi; roÞ . function called every sec. 6: if ai < bi then . If number of pkts. from A is less than B 7: if Bxinit < xmax then 8: Bxinit ¼ Bxinit þ 1 9: end if 10: if Axinit > xmin then 11: Axinit ¼ Axinit 1 12: end if 13: end if 14: if bi < ai then . If number of pkt. from B is less than A 15: if Axinit < xmax then 16: Axinit ¼ Axinit þ 1 17: end if 18: if Bxinit > xmin then 19: Bxinit ¼ Bxinit 1 20: end if 21: end if 22: if ro < ðai þ biÞ then . out going number of pkt. less than incoming 23: if Axinit &Bxinit < xmax then 24: Axinit ¼ Axinit þ 1 25: Bxinit ¼ Bxinit þ 1 26: end if 27: end if 28: end procedure
4.2. Two buffer design (2-Buf.) The two buffer strategy aims as addressing the shortterm asymmetry issues. For this strategy, the coding node R creates a number of KBs corresponding to the nodes inside the coding region. For the two-way relay topology then R would have two separate KBs, each holding packets belonging to either A or B. However, this strategy may in real world scenario may not be realistic due to its lack of scalability.
7
available for storing new packets. Continuing with the example from Fig. 5b, then if the third packet was not from B but instead was from A (packet 3) in this case our management will replace the oldest packet that is packet 1 with packet 3. In addition to our three proposed strategies (2-Buf, KBOP and CP), we have chosen to combine some of these strategies for the purpose of comparison. To that purpose, we introduce the strategy the Plain-FIFO-KB with no management similar to the-state-of-the-art named NoOP and our channel priority algorithm with buffer management named CP-KBOP. 5. Implementation details The proposed strategies are implemented on our inhouse developed test-platform the OpenSensor [12]. The hardware and software used to implement our strategies are detailed in the following. 5.1. Hardware The OpenSensor v4. is built around a 16 bit microprocessor of type PIC24FJ64GB002and uses the nRF905 transceiver module for wireless communication. The nRF905 module provides functionality that corresponds to the physical layer of the OSI model. The above layer, e.g., MAC and the link layers needs to be implemented manually. This particular requirement provides the necessary understanding and overview to implement, test and to study our proposed strategies. 5.2. Software The OpenSensor nodes are installed with an in-house developed CSMA/CA based MAC protocol [12]. The implemented CSMA/CA protocol is custom made to fit into our low rate platform, the OpenSensor v4.0. For all our implemented strategies, the minimum window size has been set to the default value of xinit ¼ 8. For the strategy KB-CP, the coding node R estimates a new xinit size based on the incoming and outgoing traffic statistic. This estimation is done every one sec. The estimated xinit is then added to the header of the next immediate packet with destination A or B. Upon a reception of a packet, weather it is A or B, then it will extract the information from the header and immediately updates its contention window size.
4.3. Keep Buffer Optimization (KBOP) 6. Measurement setup and procedure The KBOP strategy relies on a single FIFO buffer in contrast to that of the 2-Buf. strategy. The strategy for KBOP relies on a single FIFO buffer which is designed to maintain packet equilibrium at R. Here, R dynamically allocates its buffer to each node with in its coding region. Applying this idea to our example depicted in Fig. 5b, then our management system would choose to replace packet 1 from A with the newly arrived packet from B allowing for a prompt transmission of a coded packet, i.e., packet 2 from A + packet 1 from B. Doing so, the buffer will no longer be locked for a large period of time and buffer space will be
A series of intensive measurements have been carried out to characterize the performance of our proposed strategies. This section describes the used procedure and setup. To evaluate our proposed strategies, we need an environment that provides different levels of asymmetric traffic entering the relay. To achieve this asymmetry, we have chosen to conduct our measurements in different indoor environments with a different variation of obstacles. As of this, we have constructed four sets of identical testbeds, each placed in these four different indoor environments:
Please cite this article in press as: A. Paramanathan et al., On bridging theory and practice of inter-session network coding for CSMA/CA based wireless multi-hop networks, Ad Hoc Netw. (2014), http://dx.doi.org/10.1016/j.adhoc.2014.07.018
8
A. Paramanathan et al. / Ad Hoc Networks xxx (2014) xxx–xxx
University office, two different university laboratories, living apartment. 6.1. Testbed The testbed from each above mentioned environments, consist of three OpenSensor v4 platform unless stated otherwise. These three platforms represents each a role from the two-way relaying topology, similar to the setup presented in system model in Section 2. In addition, each testbed also includes a PC (Test-server) for the purpose of managing and controlling the nodes. 6.2. Topology Our performance evaluations are mainly based on the two-way relaying topology. According to this topology, then node A and B cannot reach each other directly and therefore need the help of R. To replicate this, we configured both node A and B such that they filter out the packets sent by either of them directly, as standard system would do. This filtering is done at the physical layer. To create channel asymmetry a node denoted as the worst-link node have been placed with a randomly chosen distance to R. For consistency, node B has been chosen as the worst-link node throughout this measurement campaign. 6.3. Test-server The nodes are all connected via a USB cable to a common PC (test-server). The test-server informs the nodes about the current test scenario and test configuration, detailed in the following section. Beside this, the test-server also logs the relevant data from the nodes A; B and R. This data is sent from the nodes every second over the USB connection to the test-server. 6.4. Measurement iterations and configurations The performance of each strategy has been measured in all test environments defined as a Test Run (TR). Each TR includes 5 tests, and before each Test the worst-link node is randomly moved around the Relay. A test includes ten runs, for each such run the nodes A and B are configured to transmit symmetric data traffic to the relay. We define the range in which the transmission rates are in as a low load scenario (before channel congestion) and high load scenario (channel is congested). The maximum data rate (DR) using our hardware platform has been measured to be around 15.5 kbps. This means that, for our two-way relaying setup the MAC will ensure, ideally, an equal share to all three nodes that is 1=3 of 15.5 kbps i.e., 5.16 kbps. This is then used to define the DR limit for the low load scenario, which is defined to be when the data rate is below 4 kbps and the high load scenario the limit is when the data rate is above 7 kbps. Each TR includes a DR sweep starting from 4 kbps to 7 kbps with a step of 0.75 kbps. Each DR step is sampled for 330 s where the first 30 s of Sampling Time (ST) are discarded to remove any initial measurement errors and to let the MAC dynamics to reach steady state. During this period, a packet is created at the
application layer and pushed down to the lower layer every predefined time interval. This time interval is defined by the data rate and is kept constant for the entire duration of the defined data rate. For one TR a single data rate step is sampled for a total 50 min. this means that each data rate is represented in total with sampling equivalent to almost 17 h of data.
7. Measurement results In this section, we present and evaluate the measurement results from our proposed strategies, which are all obtained while using the setup and procedure described in the previous section. 7.1. Statistics at the relay Fig. 6 shows the factorized throughput ratio as a function of the probability of an unsuccessful transmission (qi ) of the worst-link node. The solid line indicates the theoretical model, where the dots represents the measurement results. For illustrative purposes, the results are minðSA ;SB Þ plotted as maxðS , which we call the normalized throughput A ;SB Þ ratio. The measurements follow a similar trend as the theoretical model, albeit with a slightly lower data rate. This additional reduction can be explained by other factors, e.g., capture effect, but already allows us to validate the model presented in Section 3.1. Fig. 7a and b shows the incoming DR from A, and B respectively. Here, for the low load scenario R receives packets from both A and B corresponding to their individual offered load of 4, and 4.75 kbps. The reason for this is that the channel has enough resources to allow for more retransmissions from B without compromising the performance of other nodes. For high load scenarios considering the strategies NoOP, 2-Buf, and KBOP, then the effect of channel asymmetry between A, and B is more significant in compared to the low load scenario. For high load, R
Fig. 6. Normalized throughput ratio as function of an unsuccessful transmission of the worst-link node under saturation.
Please cite this article in press as: A. Paramanathan et al., On bridging theory and practice of inter-session network coding for CSMA/CA based wireless multi-hop networks, Ad Hoc Netw. (2014), http://dx.doi.org/10.1016/j.adhoc.2014.07.018
A. Paramanathan et al. / Ad Hoc Networks xxx (2014) xxx–xxx
9
Fig. 7. Statistics of the incoming data traffic at the relay.
Fig. 8. Keep-buffer packet drop statistics at the relay.
have received more packets from A in compare to B. The reason for this can be addressed to the issue pointed out earlier as the long-term asymmetry, as node A is placed closer to R than node B resulting in A having a better channel toward R than B. However, for those strategies with channel priority (CP, CP-KBOP), we see a steady flow from both A, and B for an increasing offered load. This is however expected as we now control the dynamics of the MAC with respect to a symmetrical inflow of data packet at R. Fig. 8a and b shows the packet drop rate in KB at R. For the low load scenario then, we see almost no packet drops at the KB as the channel resources are not fully utilized. However, for high load scenario, the channel starts to operate in congestion and therefore more packets will be dropped. For those strategies that does not include channel prioritization, i.e., for strategies NoOP, 2-Buf., and KBOP, then the packet drop rate is higher for node A, but this is expected as R receives more packets from A than B. However, the short-term asymmetry can clearly be seen when considering NoOP which has a trend to drop more packets which are from B that otherwise could have been used for coding. This will naturally cause an increase the overall forwarding, which is confirmed in Fig. 9a and b.
7.2. System throughput Figs. 10 and 11, show the system throughput as function of the total offered load2 for our proposed strategies. In order to give an optimal statistical overview of the performance, we present the figures as box-plots for each strategy. Fig. 10a, shows the system throughput for the strategy 2Buf. For the low load scenarios, e.g., when the total offered load is 8 and 9.5 kbps, we see a system throughput around the expected value. For high load scenarios, when the total offered load is 11, 12.5 and 14 kbps for the strategies, 2Buf., KBOP, NoOP, we see a decreasing tendency of the system throughput. As explained earlier, the reason for this can be addressed to channel asymmetry. In Fig. 10b, the FIFO-buffer with optimization strategy is shown (KBOP). In this Figure, we see a similar system throughput trend as the 2-Buf strategy. The different however is that now we have less far-outliers. The explanation for this is that we now utilize the buffer ideally, and the decreasing tendency for high load scenario is still seen, due to channel asymmetry. In Fig. 11a results from NoOP is shown. For 2 Total offered load is the combined induced load of A and B into the network.
Please cite this article in press as: A. Paramanathan et al., On bridging theory and practice of inter-session network coding for CSMA/CA based wireless multi-hop networks, Ad Hoc Netw. (2014), http://dx.doi.org/10.1016/j.adhoc.2014.07.018
10
A. Paramanathan et al. / Ad Hoc Networks xxx (2014) xxx–xxx
Fig. 9. Packet that are being forwarded from the relay.
Fig. 10. System throughput as function of the total offered load.
low load scenarios, the system throughput is almost identical to the other strategies, for high load scenarios we see that the system throughput reaches 7.5 kbps, and there are some outliers even further down. Finally, in Fig. 11c and b we have the system throughput for the strategies CP and CP-KBOP, here we see a stable performance in terms of system throughput around 9.45 kbps for high load scenarios, where CP having a slightly higher outliers. In Fig. 12, the system throughput performance when considering NoOP and CP-KBOP are presented and compared with the analytical results. For better comparison, we have extended the range of the induced data load from 1 to 14 kbps for analytical results only, however, the measurement results are still from the range 8 to 14 kbps. In this figure, we see that NoOP has the same decreasing tendency similar to the one seen from the state-of-the-art results as pointed out in Fig. 1. The strategy, CP-KBOP on the other hand, has a higher throughput, and at the same time, maintains a stable performance for higher load scenarios. However, we still see a marginal gap between CPKBOP and the analytical results. One of the reasons for this is related to the cost of adjusting the channel priority of the nodes. Furthermore, there is throughput reduction due to
packet losses that is not accounted in the theoretical plot, which can explain the gap.
7.3. Multi-node scenario and fairness to other flows In this section, we extend our two-way relaying setup with two additional nodes, C and D. These two nodes, are configured with the default MAC, and are placed near node R and A. Node C and D only use NoOP to compete with those nodes from the two-way relaying topology. However, C and D only communicate with each other sending as much data as they can, which correspond to an induced data rate of around 12.5 kbps at each node. The nodes in the two-way relaying setup follows the same procedure as explained in Section 6 with the exception of that now we perform a DR sweep from 0.5 kbps to 7 kbps with a step of 0.5 kbps. In addition, we only perform measurements while using the strategies NoOP and CP-KBOP. For comparison and experiment purpose we define two different limits for xinit : CP-KBOPI with xmin ¼ 4 and xmax ¼ 20 and CP-KBOPII with xmin ¼ 4 and xmax ¼ 12, where the limit is xmin ¼ 4 and xmax ¼ 24 for CP-KBOP.
Please cite this article in press as: A. Paramanathan et al., On bridging theory and practice of inter-session network coding for CSMA/CA based wireless multi-hop networks, Ad Hoc Netw. (2014), http://dx.doi.org/10.1016/j.adhoc.2014.07.018
A. Paramanathan et al. / Ad Hoc Networks xxx (2014) xxx–xxx
11
Fig. 11. System throughput as function of the total offered load. For the case with CP and CP-KBOP we see the expected stable throughput performance after channel congestion in compare to the case NoOP.
12
Practical wo. NC Analytical wo. NC
Analytical NC NoOP
CP-KBOP
System throughput [kbps]
10
CP-KBOP 8
State-of-the-art (NoOP) 6
4
2
0
0
2
4
6
8
10
12
14
Total offered load [kbps] Fig. 12. Throughput performance of different strategies vs. the analytical results.
Fig. 13. Combined throughput of A and B in five-node scenario as function of the combined offered load of A and B.
Fig. 13 shows the system throughput as function of the offered load. Here, we see that the throughput increases linearly to the offered load until the point when the channel gets congested. After channel congestion, we see that
our strategy CP-KBOP with the default limits of xmin ¼ 4 and xmax ¼ 24, barely reaches 3 kbps. The trend seen in Fig. 13 is however expected, as according to Algorithm 1 then R will increase the size of the minimum contention
Please cite this article in press as: A. Paramanathan et al., On bridging theory and practice of inter-session network coding for CSMA/CA based wireless multi-hop networks, Ad Hoc Netw. (2014), http://dx.doi.org/10.1016/j.adhoc.2014.07.018
12
A. Paramanathan et al. / Ad Hoc Networks xxx (2014) xxx–xxx
Fig. 14. These figures shows the successful transmissions using the strategies NoOP and CP-KBOP.
Fig. 15. These figures shows the successful transmissions using the tuned strategies.
window of both A and B when the outgoing packet rate is lower than the incoming rate. In high load scenarios, this may occur more frequently than in the low load scenarios. Thus, the minimum contention window size of both A and B will be larger than node C and D. This means that node C and D will now have more transmission attempts while node A and B are doing their backoff window countdown. When using the strategy CP-KBOPI and CP-KBOPII, we see an increase in the system throughput where CP-KBOPII being the one with the highest performance in terms of system throughput. It is clear that by reducing the range of the minimum contention window size, R will grant a higher channel access to A and B and thus a higher system throughput. Figs. 14 and 15, show the successful transmission rate all the nodes as a function of the offered load of A and B. In Fig. 14a, we see the results while using NoOP strategy. Here, it can be seen that, as the offered load of both A and B increase, the rate in which C and D has a successful transmission decreases as expected. When the offered load is around 3.1 kbps, we see that the successful transmission for all nodes are settled around 3 kbps as due to the fairness of the MAC with C and D having a slightly higher
transmission than A; B and R. The reason for this is that we have some packet drop at R when using the NoOP strategy as pointed out earlier. Fig. 14b, shows the results when using the default CP-KBOP. It can be seen that having a large range of the possible minimum contention window size, seems to be unfair for nodes A; B and R, which in only gets a small fraction of the channel in compare to C and D. Fine tuning the range of the minimum contention window size as we did with the strategies CP-KBOPI and CP-KBOPII seems to payoff in terms of both fairness and throughput. In addition, it can be seen from Fig. 15b that the strategy CP-KBOPII even proves to be as fair as the default MAC itself. 8. Conclusion In this paper, we showed that the impact of long-term and short-term channel asymmetries is at the core of the gap seen between state-of-the-art inter-session NC implementations and the theoretical optimum. Both effects influence negatively on the coding efficiency at the relay of a coding region in a wireless mesh network relying on a CSMA/CA MAC mechanism.
Please cite this article in press as: A. Paramanathan et al., On bridging theory and practice of inter-session network coding for CSMA/CA based wireless multi-hop networks, Ad Hoc Netw. (2014), http://dx.doi.org/10.1016/j.adhoc.2014.07.018
A. Paramanathan et al. / Ad Hoc Networks xxx (2014) xxx–xxx
Then, we proposed a series of simple, yet effective strategies to close the gap in practice and implementable at layer-2 of the OSI model. The best solution combines a judicious coding-aware buffer management with a clever channel priority adjustment policy to increase the coding opportunities and exploit them at the relay of a coding region. We validated these mechanisms with extensive measurements for a two-way relay topology on a variety of node deployments and environments showing that gap to the theoretically optimal is essentially closed with our solutions. Furthermore, we tested the MAC fairness of our strategies when considering a larger setup with more nodes proving that our MAC priority mechanisms is not influencing negatively the priority of other devices outside the coding region. Acknowledgment This work was partially financed by the Green Mobile Cloud project granted by the Danish Council for Independent Research (Grant No. DFF - 0602-01372B). References [1] J. Jun, M. Sichitiu, The nominal capacity of wireless mesh networks, IEEE Wirel. Commun. 10 (5) (2003) 8–14. [2] I. Akyildiz, X. Wang, A survey on wireless mesh networks, IEEE Commun. Mag. 43 (9) (2005) S23–S30. [3] E. Miorando, F. Granelli, On connectivity and capacity of wireless mesh networks, in: IEEE International Conference on Communications, 2007, ICC ’07, 2007, pp. 91–95. [4] D. Aguayo, J. Bicket, S. Biswas, G. Judd, R. Morris, Link-level measurements from an 802.11b mesh network, in: SIGCOMM, ACM, 2004. [5] S. Katti, H. Rahul, W. Hu, D. Katabi, M. Medard, J. Crowcroft, XORs in the air: practical wireless network coding, IEEE/ACM Trans Netw. 16 (3) (2008) 497–510. [6] R. Ahlswede, N. Cai, S.-Y. Li, R. Yeung, Network information flow, IEEE Trans. Inform. Theory 46 (4) (2000) 1204–1216. [7] R. Dougherty, C. Freiling, K. Zeger, Insufficiency of linear coding in network information flow, IEEE Trans. Inform. Theory 51 (8) (2005) 2745–2759, http://dx.doi.org/10.1109/TIT.2005.851744. [8] M. Hundebll, J. Ledet-Pedersen, J. Heide, M. Pedersen, S. Rein, F.H.P. Fitzek, CATWOMAN: implementation and performance evaluation of IEEE 802.11 based multi-hop networks using network coding, in: VTC Fall, 2012 IEEE, 2012, pp. 1–5. [9] LWN.net, What’s Coming in 3.10, Part 2.
. [10] 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. [11] A. Paramanathan, D.E. Lucani, F.H. Fitzek, Coping with asymmetric losses in CSMA/CA: inter-session network coding performance evaluation and adaptive protocol design, in: IEEE Int. Workshop (GLOBCOM), 2013. [12] A. Paramanathan, P. Pahlevani, D. Lucani, F. Fitzek, On the need of novel medium access control schemes for network coding enabled wireless mesh networks, in: IEEE International Conference on Communications Workshops (ICC), 2013, pp. 306–311. [13] A. Paramanathan, J. Heide, P. Pahlavani, M. Hundeboll, S. Rein, F.H.P. Fitzek, G. Ertli, Energy and data throughput for asymmetric intersession network coding, in: IEEE Int. Workshop on Comp. Aided Model. Ana. and IEEE 17th International Workshop on Des. of Comm. Links and Net. (CAMAD), 2012, pp. 358–363. [14] F. Zhao, M. Medard, On analyzing and improving cope performance, in: Info. Theory and App. Workshop (ITA), 2010, pp. 1–6. [15] Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) Specifications, IEEE Standard 802.11, June 1999. [16] Bufferbloat.
.
13
[17] M. Hundebll, F. Fitzek, S.A. Rein, Impact of network coding on delay and throughput in practical wireless chain topologies, in: IEEE CCNC, 2013. [18] G. Bianchi, Performance analysis of the IEEE 802.11 distributed coordination function, IEEE J. Sel. Areas Commun. 18 (3) (2000) 535– 547. [19] J. Krigslund, J. Hansen, M. Hundeboll, D. Lucani, F. Fitzek, Core: cope with more in wireless meshed networks, in: IEEE 77th Vehicular Technology Conference (VTC Spring), 2013, pp. 1–6.
Achuthan Paramanathan received his B.Sc. in Computer Engineering and his M.Sc. in Network Communication and Distributed Systems from Aalborg University, Denmark in 2006 and 2009, respectively. His education has mainly been focusing on applying solutions to distributed systems and network communications. From 2010 to 2011, he worked as an industrial embedded software developer in cutting edge smart phones. In 2011 he joined the Mobile Devices Group at Aalborg University as a Ph.D. student focusing on applied network coding on wireless networks.
Simon Thorsteinsson is a M.Sc. student in the Department of Electronic systems, Aalborg University. He finished his B.Sc. degree in Electronics and IT at Aalborg University in 2013. He currently works at Mobile Devices Group, Aalborg University, mainly building test-automation for wireless communication protocols.
Daniel E. Lucani is an Associate Professor in the Department of Electronic Systems, Aalborg University (AAU), Denmark. He was an Assistant Professor at the University of Porto from 2010 to 2012 before joining AAU. He received his B.S. and M.S. degrees in Electronics Engineering from Universidad Simón Bolívar, Venezuela in 2005 and 2006, respectively, and the Ph.D. degree in Electrical Engineering from the Massachusetts Institute of Technology in 2010. His research focuses on communications, network theory, and network coding theory and applications.
Frank H.P. Fitzek is a Professor in the Department of Electronic Systems, University of Aalborg, Denmark. He was awarded the NOKIA Champion Award seven times, the NOKIA Achievement Award (2008), the Danish SAPERE AUDE research grant (2010), and the Vodafone Innovation price (2012). His research focuses on wireless and mobile networks, mobile phone programming, network coding, cross layer and energy efficient protocol design, and cooperative networking.
Please cite this article in press as: A. Paramanathan et al., On bridging theory and practice of inter-session network coding for CSMA/CA based wireless multi-hop networks, Ad Hoc Netw. (2014), http://dx.doi.org/10.1016/j.adhoc.2014.07.018