Delay-based network coding packet selection

,


Introduction
Network coding, introduced by Ahlswede et al. (2000), is gaining popularity as a mechanism to increase the throughput of both wired and wireless networks.In the case of wireless networks, network coding is performed by considering the broadcast nature of wireless communication in order to increase the information content per transmission.Fig. 1 shows the impact of network coding on wireless networks.In this scenario, node A wants to send packet P1 to node B, and node B attempts to send packet P2 to node A. These two nodes communicate with each other through node C. By considering network coding, node C can mix packets P1 and P2 together and then send packet P1⊕P2 to nodes A and B by one transmission.Nodes A and B have packets P1 and P2, respectively.Therefore, they can decode their desired packets from P1⊕P2.In this scenario, we use three transmissions instead of four to deliver packets to their destinations.

P1 P2 P1 P2 P1 P2
Fig. 1.An example of network coding Katti et al. (2008) proposed a practical method of wireless network coding.Omiwade et al. (2008) tried to improve performance of COPE.The procedure of these studies for choosing packets for coding is as follows: each node puts packets of various flows in virtual queues based on their next hops.In coding process, each node applies round-robin or random to select queues and check its coding conditions with the packet that must be sent.Khreishah et al. (2012) and Wei et al. (2009) purposed coding aware routing protocols.These algorithms select a route during route selection to provide more coding opportunities.Methods developed by Ketty et al. (2006), Khreishah et al. (2012) and Wei et al. (2009) consider selecting the route opportunities of coding in order to omit boundaries.
In most of these studies network coding idea used to improve throughput of wireless networks (ketty et al., 2006).Nevertheless, some of studies impose artificial delay to packet, with the aim of increasing opportunities and throughput (Huang et al., 2006).However, this approach can not be applied for delay sensitive applications.To solve this problem, methods like Chen et al. ( 2012), Ao et al. (2012) and zhang and Qian (2011) provided a tradeoff between packets' delay and throughput rate.Dong et al. (2011) packets coding is based on packets priority to reduce the delay of coding.Yeow et al. (2009) focused on reducing the delay of broadcast traffics.Gangammanavar and Ozdaglar. (2010) and Pu et al. (2009) optimized coding methods to reduce the delay of delay limited traffics.To support the rapidly growing demand in multimedia traffic, wireless systems must meet the stringent quality of service (QoS) requirements, including the minimum bandwidth and maximum delay constraints.However, the time-varying nature of wireless channels and the hard delay constraints give rise to great challenges in scheduling traffic flows.
In this paper, we focus on the problem of finding a suitable packets coded with forward packet .Selection of these packets is based on accumulated delay experienced by packets.We use network coding to decrease end to end packet delay.Fig. 2, shows the effect of selecting packtes based on their delays.Since P3 has more delay, so R chooses pattern 2.
The rest of this paper is organized as follows.Section 2 briefly discusses related works in network coding and QoS aware network coding.We discuss the detail of the propsoed algorithm in section 3. Simulation results are provided in section 4 and finally we conclude our paper in section 5.

Related works
Tendency to wireless networks is quickly rising due to its easy implementation.Wireless networks are very noise affected and they are naturally casting, so scalability and throughput rate are their bottlenecks.Network coding was first proposed by Ahlswede et al. (2000) and it can increase the throughput rate and to be specific, in wireless networks.Katty et al. (2006) presented the first practical coding system for multi-hop wireless networks.COPE theory consists of three basic phases: Opportunistic listening, Opportunistic Coding and Learning neighbor's situations.This method uses 2hop structure for Encoding and Decoding in a way that decodes one hop beyond the encoding node of decoded packets.COPE method Encoding follows like presuming Encoder node codes N packets together.Let Pi: be the possibility that nodes in next hop, listen the packet i, as follows, If PD for all N next hop nodes be greater than 0.8, the required condition for Xor operation of n th packet is ready.Outstanding results of COPE, motivates many researchers for network coding and some researches tried to optimize COPE operation.Zhao and M´edard (2010) after choosing a virtual queue randomly, because the writers of this article believe that the opportunity of coding packets at the head of virtual queues will go away.Dong et al. (2007) receivers can temporary save coded packets until they find an opportunity to decode them in future.Zhao and Médard (2010) and Dong et al. (2011) used Coding process based on COPE in their algorithms.Their methods could optimize COPE operation, but they suffered an important problem.In fact, the increased throughput by these methods was affected by traffic pattern, load congestion and other protocols in transparent layer.In order to overcome the existing limitations in COPE based methods, Network Coding Aware Routing have been proposed.In routing algorithms aware of NC, intermediate nodes use discovery process AODV and in route selection process, optimized ECX, the best route based on the fewest number of transfers expected, are used.The main issue in "routing protocols aware of network coding" is the route selection with the most coding opportunities since it determines the exact coding capacity in each node.The purpose of finding these two terms is to reduce the number of necessary transmissions for delivering packets from different sources to desired destinations.Khreishah et al. (2012) used two-hop COPE structure for coding.The most important issues in NCAR is to prioritize coding opportunities, availability of coding opportunities in discovering route process and packet lost.Three main steps in NCAR algorithm are coding conditions, route discovery process and route selection process.Wei et al. (2009) proposed an algorithm that uses two-hop COPE structure, which has differences with COPE.For instance, multi-hop decodes a coded packet.Another different with COPE is decoding possible change and transferring coded packets.NCAR has the ability to find all possible paths from the source to the destination.Previous works have largely been focused on improving throughput (Katti et al., 2006).Among the existing methods, such as Huang et al. (2008) in order to create coding opportunities and to increase throughput, artificial delays are applied to packets.However, this method cannot be applied to many real-time applications since these applications require support for quality of service parameters such as delay.To solve this problem many studies make a compromise between throughput and packet delay (Chen et al., 2012;Ao et al., 2012;Zhang & Qian, 2011).Zhang and Qian (2011) increased the coding opportunities delay.PNCP model tries to control the delay added to packets.In this paper, two main problems of network coding are taken into account: 1-When coding is used.2-How to use the coding structure.
The authors of this paper believe, coding is not always the right solution.In this method, the first issue is associated with the status of queues and priority of transferring packets.We also use the COPE coding structure to solve the second problem.In this approach, the relay node decides based on a tradeoff between throughput and delay, depending on whether or not to apply delay to packet.In this paper, decision is based on buffer status and transferred packet class in coding.Dong et al. (2012) proposed a method to reduce delay named DNPDG.In this model, the total current delay applied to the transmission packet is used in coding process.In this model, the algorithm decides whether to create more coding opportunities, additional delay can be added to the packets or not.This helps to determine the amount of the expected delay for packets per flow and calculate the current delay of each packet by comparing these two items.Yeow et al. (2009) focused on minimizing delay for broadcast flows by using network coding.Eryilmaz et al. (2010) studied the gain in delay performance resulting from network coding.Ying et al. (2007) demonstrated that coding achieves the optimal delay-throughput tradeoff in mobile ad-hoc networks.These works only consider the performance of average delays and do not address strict per-packet delay bounds.In addition, available methods use network coding with the purpose of increasing throughput rate, and imposing an artificial delay to the packets in order to increase coding opportunities and higher throughput rate according to packets priority.

The proposed algorithm
In this section, we describe briefly the system.The delay calculation methods for each packet are examined and we propose our algorithm to find the suitable packets to code with forwarding packet.In contrast to existing methods, in this algorithm, network coding is used to reduce end-to-end delay.In fact, in this algorithm, coding pattern selection is based on delay parameter.In this method, twohop COPE structure is used for coding.

System Overview
We consider network coding over wireless mesh networks where intermediate nodes (wireless mesh routers) are able to forward packets to other intermediate nodes and clients.In this paper, we propose an algorithm used at the intermediate nodes to decrease end-to-end packet delay using network coding.Nodes can use two hop coding structure to check coding condition of each pair of flows.This idea has been recently applied in 802.11 based on multi-hop wireless networks while DSR is used as a routing protocol.

Packet delay calculation
To formally illustrate, how to calculate packet delay, we introduce the following notations. a: show a node  Pi: show packet ith that received. Ta(Pi): when the Pi was received based on local time of receiver node. Current_Time: current time at a node like a.  Db (Pi): current Queuing delay of Pi .
 Time_Stamp(Pi): accumulate delay of Pi Packet delay in each hop is calculated with the equation 5. (5)

Coding Pattern Selection
In this algorithm like COPE, coding nodes put packets belonging to each flow in virtual queues based on their next hop.With the arrival of new flow, coding node specifies to which virtual queue these packets should be placed.Then its coding condition with other flows will be placed in an array similar to CA array defined in proposed algorithm.The relay nodes do as follows for determining coding pattern during transmission packet: 1. Create a temporary array temp and fill it with a row in CA that belongs to flow of forwarding packet, 2. As regards to what flows are in temp array, the coding node searches for packets, which belongs to current flows in virtual queues.Each virtual queue is examined until the first packet that has a capability to be coded with the current packet will be determined, 3. Time_Stamp: Calculate the candidate packet, 4. Repeat steps 2 and 3 for queues, which flows in the temp array, 5. Select a packet that has the biggest Time_Stamp, 6. Update temp array through intersect between temp and a row of CA, which belongs to the selected packets, 7. Return to step 2 until there is not any packet in queue to be added to transmission set or there is no flow in temp array.

Simulation and Analysis
We simulated our algorithm in TOSSIM simulator to evaluate the performance of our algorithm and compared it with random selection pattern in COPE and Round robin mechanism in NCAR with an implementation of 802.11 as MAC layer.We have first used wheel topology, as shown in Fig. 3.
Here, a central node (0) is surrounded by fifteen nodes (1-15) that are distributed along the cycle.We randomly add twelve flows with the rate of 25 kbps in 180 seconds.We have only one flow in the start of simulation and one flow is added in every fifteen seconds.Sources and destinations of flows are placed in the circle's diameter and all flows are relayed by node (0).In the simulation, we evaluated the performance of both algorithms in terms of average network throughput and average end to end delay.

First scenario
In the first scenario, a random topology with 50 nodes is used.In this scenario, 12 flows with 20 kbps load are generated, randomly.At the beginning of the simulation, there is only one flow and every 15 seconds another random flow is added to the set.In this scenario, COPE based coding is used.The performance of the algorithms is evaluated based on parameters like throughput rate and the average of end-to-end delay.Fig. 4 shows the first scenario simulation results.

Second scenario
In this scenario, 100 nodes are randomly distributed in the environment and the rest of scenario 2 is similar to scenario 1.

Conclusion
Network coding has been proposed as a solution to improve the performance of wired networks.Many solutions have been proposed to improve the performance of network coding up to now.Previous works have largely been focused on improving the throughput rate.In this paper, unlike previous methods, network coding has been used to reduce the end-to-end packets delay.Simulation results show that the proposed method presents less end-to-end delay.

Fig. 2 .
Fig. 2. Packet selection for coding based on end to end delay Fig. 2 shows the influence of selecting coding pattern based on packets current delay.In Fig. 2, we suppose nodes A, B and C want to send packets P1, P2 and P3 to D through relay node R. R can code P1 with two patterns as follows, 1-P1⊕ P2 2-P1⊕ P3

Fig
Fig. 3. Wheel topology Fig. (5.b) shows the average of end-to-end delay in a random topology scenario with 100 nodes.As regards the proposed algorithm selects coding pattern based on packets delay, this method produces