Efficient Network Coding with Interference-Awareness and Neighbor States Updating in Wireless Networks

Network coding is emerging as a promising technique that can provide significant improvements in the throughput of Internet of Things (IoT). Previous network coding schemes focus on several nodes, regardless of the topology and communication range in the whole network. Consequently, these schemes are greedy. Namely, all opportunities of combinations of packets in these nodes are exploited. We demonstrate that there is still room for whole network throughput improvement for these greedy design principles. Thus, in this paper, we propose a novel network coding scheme, ECS (Efficient Coding Scheme), which is designed to achieve a higher throughput improvement with lower computational complexity and buffer occupancy compared to current greedy schemes for wireless mesh networks. ECS utilizes the knowledge of the topologies to minimize interference and obtain more throughput. We also prove that the widely used expected transmission count metric (ETX) in opportunistic listening has an inherent error ratio that would lead to decoding failure. ECS therefore exploits amore reliable broadcast protocol to decrease the impact of this inherent error ratio in ETX. Simulation results show that ECS can greatly improve the performance of network coding and decrease buffer occupancy.


Introduction
Have you ever felt exhausted for the bad network while you were just immersed in your computer games like LoL? Throughput improvement in wireless mesh networks is also a major problem for social networking and e-commerce platforms, where servers suffer dramatically heavy traffic and users are dying for fast and reliable network services.Many industries are looking to address this problem and improve throughput.Applications that involve high throughput, such as Ix [1] and Prophecy [2], provide high throughput performance with proxied or operating systems.These systems, however, call for hardware or system update and may be very costly.Moreover, it is unpractical for users to update system or hardware continuously.Network coding that emerged as a promising technique that can provide significant improvements with low cost, on the other hand, has attracted much interest.The notion of network coding allows relay nodes to not only forward but also process (i.e., XOR) the incoming packets.Despite all the scenarios mentioned before, network coding is also a great opportunity for IoT as many sensors can transmit information at the same time.But there is a main question one may ask: how many packets should be encoded (XOR) to get better improvements?Most current schemes, however, encode as many packets as possible to get maximized throughput at relays, which does not fully exploit network utility and throughput in the whole network.The whole network, however, would benefit from this bandwidthefficient technique, with the same bandwidth but much higher throughput gains.
The foreground of potential throughput gain has received much attention since it was first proposed in [3].It is subsequently found to be particularly suitable for wireless networks, since the broadcast nature allows the transmitting packets to be overheard by all its neighbors.Prior work focuses on addressing two problems: (i) throughput gain bounds with various scheduling schemes and theoretical analysis on encoding part [4][5][6] and (ii) transport protocols on decoding 2 Wireless Communications and Mobile Computing part [7][8][9].However, most of the network coding schemes like [10,11], are under the assumption that the buffer and computing resource are sufficient, which is unlikely in most wireless mesh networks.Consequently, these schemes are greedy, exploiting all opportunities of broadcasting combinations of packets in a single transmission.However, with the fading and interference in wireless networks, the results of these greedy schemes are not always satisfying, which sometimes even shows a decrease of throughput [6].Moreover, while there is much literature on the throughput improvement and bounds [4][5][6], it is still unclear for every relay to obtain better performance with proper encoding threshold when topology changes in the network.Here, we use encoding threshold to refer to the maximum number of native packets that can be encoded at a relay.This unclearness, however, is exacerbated in wireless mesh networks, where interference is more severe.That would leave the better throughput inaccessible.
This paper introduces ECS, an interference-aware network coding scheme in a robust manner which works in wireless mesh networks.In line with common practice in network coding schemes, ECS transfers encoded packets and overhears neighbors' packets for decoding.The challenge, however, is to make decisions about the encoding threshold of packets to encode once for every relay node (i.e., encoding number) to get more throughput gains with less interference and make full use of nodes in the whole network.
Unlike existing approaches, which consider buffer and computing resource as arbitrarily large, ECS exploits an interference-awareness model for relays in wireless networks, which maximizes network utility and throughput gains by reducing interference.Particularly, encoding too many packets at one node is unpractical with its limited resources (both buffer and computation).Moreover, due to the large number of combinations of native packets, relays have to forward the encoded packet to a large swath of receivers, whose neighbors have to keep in NAV timer to avoid collision with congestion control.Such nodes that keep in NAV timer, however, are a waste of resource, since even though they are not in the communication range of senders, they still cannot transmit any data for a certain period of time.Therefore, throughput can be improved if one can deal with the low utilization of nodes in NAV timer.That is to say, if we can make good use of nodes in the network, we can better meet the demand for throughput increment in wireless mesh networks.
To illustrate ECS's approach, Figure 1(a) shows a toy example with 11 nodes leveraging greedy network coding scheme, where the center node broadcasts an encoded packet of four native packets to the other four receiving nodes, which improves the throughput with less transmissions.It is also noticeable that all the silent nodes have to keep silent to avoid wireless interference, namely, waiting for the end of the transmission because of the occupancy of the wireless medium, even though they are not within communication range of the sending nodes.The large swaths of silent nodes are a waste of network resource; therefore throughput can be improved by "awaking" them.So can we "awake" maximum number of silent nodes to get more throughput gains?Can we get more throughput gains?The answer is yes.To do this, we transform these silent nodes to senders or receivers, while the sending coverage remains in a high ratio.Here, sending coverage refers to the ratio of sending nodes to all nodes in the whole network.Consider the scenario in Figure 1(b), where transmitters turn to be 3 and silent nodes in contrast turn to be 2, decreasing by 66.7%.The current throughput is 6, 1.25 times of that in Figure 1(a).Note that the sending coverage in Figure 1(a) is 9.09%, while the sending coverage in optimized solution shown in Figure 1(b) rises to 27.3%.In this way, we maximize the network capacity with minimum number of nodes in NAV timer, that is, minimum interference.In addition, receivers in the encoding scheme shown in Figure 1(b) store fewer packets in their buffer, reducing 2/4 = 50%.With less buffer occupancy than in Figure 1(a), the scheme in Figure 1(b) yields better results.That is to say, the seemingly best solution to improve throughput in Figure 1(a) indeed sacrifices the potential throughput for a maximum number of encoded packets delivered in a single transmission.Hence, the performance of greedy schemes alone, like the transmissions from Figure 1(a), can be improved by enlarging the sending coverage and decreasing the number of idle nodes.And that is why it can decrease possible interference while transmitting.An efficient networking coding scheme therefore needs to consider a main question: how to enlarge the sending coverage and decrease the number of idle nodes at the same time?
To do so, we divide nodes into three colors according to the three statuses: sending, receiving, and silent.By doing so, we simplify the problem into a graph coloring problem, a classical algorithm that deals with assignment.In contrast to the illustrative example in Figure 1(a), however, the evaluation of throughput in real-world wireless mesh networks, instead of a single transmission, is the total throughput in the whole network.Current schemes, however, are the theoretical bounds or are adaptive for certain given topologies, which are unlikely in wireless mesh networks.In fact, the changes of topologies are inevitable.In designing a scheme that can enlarge sending coverage as well as considering the changes of topology, we modify the objective function to minimize nodes in NAV timer and keep sending nodes in a high ratio, differentiating from the classical graph coloring.For every relay node, it "colors" nodes into as many senders as possible with certain limits to avoid collision and with the same strategy "colors" the neighbors of these senders to receivers.However, this is time-consuming and too complicated as the network scales up.Thus, to jump out of the local optimum, we combine the classical graph coloring algorithm with simulated annealing (SA) to "cool" the results.For every result in coloring, we iterate and discard the former result if the current result has better performance; otherwise, we keep it in a random rate.The end of iteration mainly depends on the initial temperature  and current temperature   , which are discussed in Section 5.4.After these procedures mentioned above, relays know the upper bound of encoding numbers, that is, refer to the number of their surrounding senders.Here, we call this upper bound of encoding numbers as encoding number threshold.Given these certain encoding number thresholds for every relay, the network encodes proper number of packets, which efficiently decrease interference and make good use of nodes.Therefore, the Senders whole network can obtain more throughput gains.We present the design in Section 5 and demonstrate in Section 5.3 the time complexity of the two.
Finally, while one could overhear packets and guess whether a neighbor has a particular packet leveraging opportunistic listening, network coding scheme today would require periodically computing ETX metric [12], which may make incorrect decisions in practice.Moreover, this is exacerbated when the network is of poor link quality.To solve this problem, relays can send request to get the information about what their neighbors store in the buffer.However, it is too costly to occupy the medium to exchange buffer information for each single transmission and therefore may reduce throughput.Hence, if we can find a low-cost approach to learn neighbor states and decrease the inherent error rate in ETX, the decoding procedure can be ensured.ECS carries decoding and encoding information while reserving the channel, namely, carries the total packets number encoded or buffered in RTS and CTS, which is in low cost and efficiently reduces the decoding failure.
Our simulations lead to the following findings: (i) Receiving  = [10,300] packets per second, the throughput of ECS is 7 to 40 times higher than that of 802.11a/b/g and 3 times higher than that of greedy schemes, such as COPE scheme.(ii) With same throughput gains, ECS stores fewer packets in the buffer than COPE, indicating that ECS has better efficiency and is of low cost.

Our contribution of this paper includes the following:
(i) This work presents a novel efficient scheme that scales whole network throughput by decreasing interference from overwhelmed encoding packets.To achieve this, we dynamically calculate an encoding number threshold for every relay node, according to communication range from topology.Finally, we show that our scheme can deliver throughput gains in mesh networks and any other networks that suffer great traffic.(ii) We present a neighborhood listening state protocol, which reduces the unavoidable incorrectness when leveraging ETX by carrying coding information in RTS/CTS.Therefore, it decreases retransmissions and decoding failures in a low-cost approach.

Background
The attractiveness of network coding is marrying XOR and sending packets.Thus, it is a prerequisite for receivers to possess the ability of decoding the XOR-ed packets.To do so, receivers buffer packets that can be used to decode XORed packets, which we call decoding resource.Differentiating the decoding resource, the network coding is classified into two categories.The first type of decoding resource only stores packets that have been sent by nodes, while the decoding resource of the second type includes the packets by opportunistic listening in addition.
The first category of network coding is demonstrated in Figure 2(a).In conventional cases, when Alice and Bob want to swap a pair of packets with the help of a router, the router has to forward the packets from two senders separately.Therefore, the number of transmissions needed is 4.After leveraging network coding, the router just needs to XOR the packets sent by Alice and Bob and broadcasts the XOR-ed packet.Alice and Bob can both hear the XOR-ed version and use their decoding resource to decode the XOR-ed packets.For example, Alice XORs the XOR-ed packet with her original sending packet; then she can get the message Bob wants to send to her.Consequently, the number of transmissions falls to 3.
The second category of network coding works in a more sophisticated network scenario.Take Figure 2(b) as an example.When these four persons want to exchange packets with network coding in a wheel topology, the senders not only send but also opportunistically listen to others.For example, let us assume that Alice can only have packet  1 in its decoding resource in the first category, but it can also buffer packet  4 and packet  2 via overhearing to Sally and John.The relay then broadcasts packet  ( =  1 ⊕  2 ⊕  3 ⊕  4 ) after the receivers (but also the senders in this scenario) have enough decoding resource, and the receivers can decode the packet. (3) (3) (4) Decoding resource p1 XOR p2 XOR p3 XOR p4

ECS Overview
ECS is an interference-aware scheme that can provide lower buffer occupancy and yield a higher throughput performance, much adaptive than most of the greedy network coding schemes including COPE [10].To better improve the network throughout, ECS goes through the following steps: (i) Depending on whether there are many encoding opportunities in the network, ECS first decides the start time of the network coding, using the technique in Section 4.
(ii) By modeling and giving solutions to the interferenceaware model as described in Section 5, ECS calculates the maximum number of packets that a relay node can encode with the knowledge of topology.
(iii) Section 6 presents a neighbor status updating protocol.ECS enhances the accuracy on neighbor learning scheme by adding encoding and decoding information in RTS and CTS while reserving the channel.
The next few sections elaborate on the above things, providing the technical details.

Encoding Time Decision
In order to deal with latency when there are few opportunities of encoding that can be exploited, we introduce encoding time decision, which turns on network coding at relays only when there are more encoding opportunities around them.Note that a key feature which arises in network coding is that when relays want to encode several packets in the transmission, they wait a period of time  for the arrival of packets to encode, that is, encoding opportunities.In addition, all the receivers also have to wait for this encoding process and spend time decoding.In conclusion, the use of network coding increases latency in the network.This latency is inevitable in practice and is exacerbated in the cases where less opportunities of broadcasting combinations of packets can be exploited.The lack of opportunities leads to longer delays and provides fewer throughput gains.Hence, we need to find a tradeoff between latency and encoding opportunities and start to use network coding when the encoding opportunities exceed a certain threshold.Current schemes, however, leverage network coding all the time for throughput gains, which brings unwelcome latency especially when the throughput improvement is not tremendous.Our schemes, therefore, can efficiently reduce latency.
In order to decide the scenarios to start network coding, we first introduce two parameters that needs to be considered and then give some reasonable values after our simulations.

Definition
Inverse Packets.Let  1 and  2 be the packets relay  receives sequently.  and   denote the previous hop and next hop of   , respectively.  is the time when packet   has been received by the relay .The neighbors set of  is denoted as ().If  1 ,  2 are a pair of inverse packets of the relay , then  1 ∈ ( 2 ),  1 ∉ ( 1 ),  2 ∈ ( 1 ),  2 ∉ ( 2 ), and | 1 −  2 | < . denotes the time period waiting for the arrival of inverse packets.
Take Figure 2(b) as an example.Let us assume that John wants to send the packet  1 to Sally, while Sally also sends a packet  2 to John.When both  1 and  2 arrive at the relay, the next hop of  1 turns to Sally and the next hop for  2 is John.Therefore,  1 = ,  1 = ℎ,  2 = ℎ,  2 = .The neighbors set of John ( 1 ) = {, }, and Sally has the same neighbors' set as John.Therefore,  2 and  1 satisfy the requirements:  1 ∈ ( 2 ),  1 ∉ ( 1 ),  2 ∈ ( 1 ), and  2 ∉ ( 2 ). 1 and  2 denote the times when packets  1 and  2 have been received by the relay , respectively.If  1 and  2 satisfy | 1 −  2 | < , then  1 and  2 are inverse packets.

Data Flow Complexity (DFC).
If a relay receives  native packets that contain  pairs of inverse packets in a unit of time, then DFC = 2/.In summary, inverse packets are a pair of packets which can be encoded at a relay and decoded at receivers.The ratio of inverse packets to native packets, DFC, can therefore denote the encoding opportunities regardless of load.As shown in the definition, the calculation of DFC does not rely on topology or other network status; rather, it can be applied in any networks separately.The nodes would not start using network coding unless DFC exceeds a certain threshold .Starting time decision is just like a sensor in voice-activated light in hall, which only turns on when it is noisy in the hall.As opposed to listening to the noise around, however, ECS exploits the DFC to identify the data complexity and the right time to use network coding.

Calibrating Parameters.
In this part, we calibrate parameters  and  through numerous simulations.It should be noted that the related parameters can be modified with various users' need.One important setting of our simulation is that we select sender and receiver randomly, and nodes are randomly distributed.Thus, we set up an ad hoc network with randomly distributed nodes.

Open Time Threshold 𝜁.
With the same setup detailed in Section 7, we turn off network coding in the simulation and let the nodes send packets according to the set of  (the amount of sending packets per second) and count the values of DFC according to  with the 802.11protocol.In the simulation  = [10, 20, 30, 40, 50, . . ., 300], there are 30 kinds of values in total, and in  = [0.25,0.5, 0.75, 1.00], there are 4 kinds of values in total.Therefore, every group of simulations (120 groups in all) repeats 1000 times.The results of simulation are shown in Figure 3.
Among the factors that can affect the DFC,  in inverse packets definition and parameter  are the most critical parameters, due to controlling network load.The impact of network traffic load () on data flow complexity (DFC) is depicted in Figure 3(a).For small load, nodes are more likely to forward packets in the forwarding queue to the next hop.However, as few packets are stored in the forward queues, new arrival packets are hard to be matched into inverse packets, and that is why DFC equals 0.07 when  = 10.As the load increases ( < 30), the number of packets in forwarding queues increases, leading to a higher DFC rate and a larger amount of inverse packets.When the number of packets in forwarding queues exceeds a certain threshold, DFC levels off, reflecting the fact that inverse packets have reached their capacity and cannot combine additional inverse packets.Additionally, with the variation of , DFC shows only slight difference as load () goes up, which reveals that  has a greater impact on DFC than .
Figure 3(b) plots the amount of inverse packets with a group of  when  goes up.When  is low, the change of the number of inverse packets is very slight.Hence, the impact of  on inverse packets is correspondingly modest.As  increases, forwarding queues have more packets due to the high load; thus the amount of inverse packets goes up.Surprisingly, these curves are very close, reflecting the fact that network has reached its capacity and cannot sustain additional load.The above simulation results reveal that when  > 10 (unit: packets per second), DFC is always beyond 0.07.From Figure 3(b), when  = 10, the amount of inverse packets is scarce, fewer than 1000 per minute.In these scenarios, packets can easily access the medium to transfer data due to the low load.The coding opportunities are also scarce due to the sparse packets in the forwarding queue.Thus, we suppose that very few throughput gains can be obtained with ECS in these scenarios.In summary, we take  = 0.07.That is to say, if and only if  > 0.07, the coding procedure will be started.

Waiting Period 𝜃.
In this part, we discuss , the waiting period for the arrival of inverse packets.Recall from inverse packets' definition that  is the time waiting for inverse packets.We also set  as the initial value for timer to overhear packets.In a same network scenario, the more time node waits for the inverse packets, the more packets it overhears and stores in its buffer.Thus we need to consider the buffer occupancy of nodes in the whole network, that is, how many packets nodes have overheard.
We start our flows again according to a Poisson process with ECS, that is, pick sender and receiver randomly and allocate certain memory (1 MB) for every node to store decoding resource.There are extra 10 MB for spare memory.That is to say, nodes will store decoding resource in spare memory after consuming 1 MB.The resource will be discarded if both memories run out.We classify nodes into three categories according to the usage of memory: overloaded nodes for those that use more than 1 MB memory; low-use nodes referring to those nodes whose memory usage is less than 0.25 MB; and the overhead of healthy nodes which is between 0.25 MB and 1 MB.
We repeat the simulation in varying load  with ECS enabled.Figure 4 plots the distribution of the ratio of these three kinds of nodes.Figure 4(a) shows that the majority of nodes are unable to utilize the memory efficiently when the load is low, and the ratio remains flat with increasing .This illuminates weak correlation between  and memory usage.Note that only those on the network trunk intersection fully utilize the memory.As the load increases, some low-use nodes turn into healthy nodes, while the memory usage of some healthy nodes ramps up into overloaded nodes.These transactions are also related to the location of nodes.For those healthy nodes in the trunk, they turn to overloaded nodes and then the low-use nodes in subtrunk become healthy nodes.The low-use nodes in the margin, however, are still in low use due to the lack of flow.As a result, nodes in low use decrease gradually, while overloaded nodes leap.But it should be emphasized that this does not mean that waiting period is related to the topology because the topology does not decide how many packets nodes send.As load surges even higher, nodes in low use decrease, almost equal to the amount of healthy nodes.Surprisingly, overloaded nodes decrease, reflecting that low-use nodes in relative margin networks turn into healthy nodes as load in subtrunk network goes up.
The reason that we make decisions on  is to increase the ratio of healthy nodes and decrease the overloaded nodes, most obviously shown in Figure 4.As a result, we set  = 0.3 in our later simulation.Note that load also affects the number of these three categories nodes, which, however, is unpractical to control with the setting.Thus we use  to control the ratio of these three kinds of nodes.According to this observation, the ratio of overloaded nodes is below 5%, while the number of healthy nodes is increasing when  = 0.3.Thus  is set to be 0.3.

Encoding Number Threshold Model
After acquiring the start point of coding scheme, ECS figures out the number of packets needed to be coded together in a single transmission to get more throughput gains.Many greedy schemes including COPE do not constrain this number, pursuing maximum throughput in a single transmission, which would encounter encoding and decoding failure and, most importantly, may reduce throughput when applied in the whole network.Exploiting not enough combinations of packets to broadcast, on the contrary, leaves much space for throughput gains due to the potential opportunities.ECS therefore needs to find a tradeoff between throughput gains and encoding numbers.Current schemes, however, are adaptive only for several general and unchanging topologies, which is unlikely in wireless mesh networks.In fact, the change of topology is inevitable.By maximizing utilization ratio every time when the topology changes to obtain throughput gains in the whole network, ECS makes use of topology and communication range, which yields a better result.
In order to get the encoding number threshold of packets, we divide nodes into three colors according to the three statuses: sending, receiving, and silent.By doing so, we simplify the problem into graph coloring, a classical algorithm to deal with assignment.Rather than coloring neighbor nodes with different colors to get a minimum number of colors in traditional coloring problem, we modify the objective function to maximize the difference between the ratio of total transmitters and the ratio of silent nodes to get optimal throughput gains in wireless mesh networks.Then we leverage SA to "cool" the results.In designing a scheme to jump out the local optimal results, we combine the classical graph coloring algorithm with simulated annealing (SA).

Formulation.
As mentioned before, ECS aims at high usage rate and sending coverage.Therefore, the scheme is simplified into a kind of problem of minimizing nodes in NAV timer (silent nodes) while keeping sending nodes in a fairly high rate, which belongs to a particular channel assignment.
Coloring algorithm in connected graphs and conflict graphs works well for such channel assignment problems.Instead of coloring neighbors with a minimum number of different colors, the evaluation functions in ECS are depicted as follows.Let an undirected graph  = (, ) represent a wireless mesh network: || =  and || = .Node V  is the node in the network, while   is the single-frequency link.The optional status for each node is in  = {1, 2, 3} where 1 is for sending, 2 is for receiving, and 3 is for silent.Let   = 1 be true to color node  with color  and 0 for not coloring with color .And the model is shown as follows: (1)

Design Specification.
In finding solution to this problem, we are inspired by simulated annealing algorithm.Simulated annealing algorithm is a combination of random algorithm and greedy algorithm.Greedy algorithm can get a swift solution but may easily be stuck in local optimum.Simulated annealing algorithm, on the contrary, can approach global optimal solution by discarding local optimal solutions with a certain probability.
Let  (sufficiently large) be the original temperature of annealing algorithm.The end of temperature of annealing algorithm is   (  > 0) and annealing rate is  (0 <  < 1).The evaluation function of annealing algorithm is the objective function in Section 5.1, whose answer is given by initial packet coding algorithm.Let   be the current local optimum of simulated annealing algorithm and let  −1 be the previous one.The temperature increment is Δ =  −1 () −   ().If Δ ≤ 0, accept   as the final result; otherwise, calculate  = exp(−Δ/) and accept the result with the probability of .If  ≤   , finish the algorithm while cooling the result with  =  for next round of iteration.The whole procedure that simulated annealing algorithm takes is illustrated in Algorithm 1.
The challenge in this procedure is determining the values of ,   , and , which control the speed of this algorithm.The result we get at last will be far away from the optimal solution if the speed is too fast and will be a waste of resource on the contrary.Generally speaking, it is certain for  (e.g., 0.95) and alternative for  and   which are discussed in detail in Section 5. 4.
But what is the answer to ()?With the absence of (), it is impossible to get the optimal solution.As mentioned before, we use coloring algorithm to design this greedy strategy.Typically, we choose the degree of vertexes considering the special features of network coding.
Step 1 (paint all the nodes into silent and put all of them in a temporary set ). Color the current node (the running node, i.e., this in Algorithm 2) and search for two nonadjacent neighbors of ℎ and color them into receiving status.If these two neighbors do not exist, color the node that owns largest    among neighbors of this into receiving status.
Step 2 (find sending nodes as many as possible).The node V  cannot be painted to sending unless all the neighbors of V  are silent.After that, find the node V  with largest    , and color V  to receiving status.Then exclude the nodes that can only unicast with V  .Find neighbors V  of V  which meet the following requirements: (a) V  is in silent, (b) V  is not adjacent to V  , and (c) V  has only one sending node V  in its neighbor set.Receiving node V  has the largest    .If V  does not exist, V  and V  can only unicast.
Step 3 (increase the broadcast amount of sending nodes).Clean temporary  and put all the sending nodes in it.Scan all the nodes in ; if the neighbor of node V  has only one receiving node or the silent nodes are not more than 2, remove V  from ; otherwise, find two neighbors V  and V  of V  which meet the following requirements: (a) they are not adjacent to each other and (b) they both have and only have one sending node (i.e., V  ).If V  and V  do not exist, remove V  ; otherwise, color both nodes (V  and V  ) into receiving status.End Step 3 until the set  is empty.

Computational Complexity Analysis.
The key to network coding is the scheme for different purposes.However, some schemes are very sophisticated, as [13][14][15][16] are NP-complete.COPE has a much lower complexity, that is, ( 2 ).The end if (17) end if (18) end while (19) Algorithm 2: Initial packet coding coloring.complexity of our scheme, on the contrary, is much lower with (2), which is more practical.

5.4.
and   .We repeat the large scale simulation with different coloring decision, that is, unicast coloring, coloring with COPE, and coloring with ECS.All of the coloring decisions follow the same algorithm framework, and it is the solution to () that varies.Note that each node can only communicate with at most one neighbor once in unicast coloring and it can multicast to as many as reachable neighbors with greedy algorithm in COPE.In ECS, nodes make color decisions with the algorithm proposed in Section 5.The flows again arrive according to a Poisson process and pick sender and receiver randomly with a radio range of 175 m and the density of 1/194 m 2 .
The number of nodes involved in communication shown in Figure 5 is much larger than unicast, revealing the advantages of network coding.However, the sending coverage of unicast is wider than COPE due to the MAC protocol based on CSMA/CA.ECS holds a more wider coverage than COPE and a slightly smaller number of communication nodes than COPE, which is obviously bigger than unicast.
Figure 5 plots the summary results in a bar graph.The sending ratio (the number of sending nodes/number of nodes) of unicast is beyond 13%.However, the utilization ratio ((sending nodes + receiving nodes)/nodes) is low, around 26%. COPE provides 50% improvements in utilization ratio.However, the sending ratio is lower than 9%.ECS holds approximate sending ratio with COPE, while maintaining a high sending coverage ratio.From the perspective of this, COPE constrains the encoding number: it broadcasts an encoding packet of four.ECS lowers this number to 2, avoiding affecting other nodes.
The next question is to determine  and   .From the definition of the model, we can draw a hidden condition: Receiving nodes as the target nodes of communication apparently has a correlation with sending nodes in number.Temporarily let where  is the constant coefficient affected by the density of deployment and  > 1, so (3) can be transformed into () and () are in the same order of magnitude, and both of them are influenced by  and   .We simplify the objective function in this way.We take  ∈ [0.0.1, 1] of jump 0.01,   ∈ [0.0001, 0.01] of jump 0.0001, and 10000 groups of coloring simulations in total.For each  and   , we make color decisions for 100 times repeatedly and take the mean of coloring results () as a final result of this group simulation.Meanwhile, we count the time (unit: ms) of coloring 100 times as the total running time for this group simulation.Figure 6 plots simulation results.The effects of equivalent conditions () for  and   are depicted in Figure 6(a), and the effect of  and   impact on coloring duration is illuminated in Figure 6 From Figures 6(c) and 6(d),  = 1 is a big enough value related to (), and   has greater impact on ().When   < 0.001, () is nearly close to the minimum.In addition, the common feature of the running time influenced by   and   is apparent.Taking () and the running time into consideration, we finally take  = 0.05 and   = 0.002 as the cooling speed.

Broadcast and Retransmissions
After making decisions about the encoding threshold, we need to reduce retransmissions due to the decoding failure.
In this section, we describe how ECS learns neighbor state by altering the broadcast protocol.
Decoding failure is more likely to happen when the relay nodes make wrong guesses with opportunistic listening.In particular, we demonstrate in Appendix that there remains an inherent error ratio when leveraging ETX in opportunistic listening.Consequently, relay nodes have to reencode packets or send the packets one by one, which surely reduce the throughput.Transmitting control information alone is simple and reliable; however, it is too costly.Thus, it is crucial to find an approach to learn neighbors' states in a more reliable and low-cost way.
Our solution is to alter the broadcast protocol, which piggybacks on 802.11 broadcast and benefits from its control frame.Figure 7 shows the format of these three control frames in ECS.To build a neighbor state update protocol, we need to make a few designs.On the sending side, whenever the sender gets an opportunity to send, it adds packet information to the RTS frame.After receiving the RTS frame, the receiver checks the packet information in the received RTS frame and sends the CTS frame which adds its capability of decoding to the sender.When the CTS frame arrives at the sender, the node extracts the decoding capability in the CTS frame.Further procedure depends on whether the receiver can decode the encoded packet.If the receiver cannot decode the packet, senders need to reencode with appropriate packets; that is, the secondary encoding packet is the subset of the first packet.Then, the sender sends the RTS frame to the receiver and transmits the data frame.After successfully decoding the data with the reencoded packet, the receiver acks and ends this handshake.We add the times of handshake in CSMA/CA protocol.Therefore we can discard the nodes that cannot decode at receiver through the handshaking phase to decrease decoding failure.

Updating Neighbor State.
Learning neighbor state is a major issue for network coding, which can be intelligently guessed by ETX metric.However, we prove in Appendix that this guess has inherent error rate.If the guess fails, the coded packet forwarded by transmit node would be undecodable by some next hop.Therefore, the transmit node needs to check the neighbors' ack and retransmit the undecodable packets.Such an approach works; however, it may decrease throughput in the whole network.To visually understand the problem, let us consider a simple communication shown in Figure 9.For example, sender wants to communicate a packet to Receiver 1 and Receiver 2. And all their neighbors should stay in NAV state to avoid interference.If Receiver 2 cannot decode the packet, its neighbors (except the senders) may waste a single NAV cycle.We therefore design a protocol that alters the control frame in broadcast protocol to avoid such waste.

Control Frame Detail.
In this section, we will introduce how ECS extends the control frame in CSMA/CA protocol to minimize the cost in transmitting data.
The first problem is to uniquely identify a packet in the whole network.Inspired by Message Digest Algorithm (MD5), we use the digest (16 B) of each data frame to be its ID number, which keeps the same data frame format in CSMA/CA protocol.Thus, our system could be compatible with the protocols in other layers.However, to reduce the query delay, nodes need to save the computed ID number of the packets when they are putting this packet into buffer.
As each packet can be identified in the whole network, the next to consider is how we use the packets' ID to update the neighbor state.The set of receivers and the encoded information are demonstrated in the first RTS frame sent by senders; that is, the RTS frame contains field RA and data frame ID.We define this control frame as RTSEP (Request to Send Encoding Packet). Figure 7 shows the RTSEP frame format of broadcasting four encoded packets.The receiver can compute the encoded packets number according to the Type and Subtype fields in the RTSEP frame.We enrich the Type and Subtype fields based on 802.11 protocol, described in Table 1.After the receiver obtains the RTSEP frame, it queries the index of itself in the receiver collection.According to the index, it can ensure the slot of sending CTS frame.The receiver should check the packets in its buffer based on the IDs in the RTSEP frame.If only one packet could not be found, that is to say, the presending packets can be decoded, then the receiver sends the CTS frame to the sender, which includes the index of those unfounded packets.We call this CTS frame CTSEP (Clear to Send Encoding Package).The format of CTSEP frame is illustrated in Figure 7.The Miss field is 1 byte in length destined for the result of querying ID number.Moreover, when neighbors of the receiver obtain the CTSEP frame, they check the Miss field in the control frame.If the Miss field has more than one bit which are set to value 1 in data type, the neighbor nodes regress from NAV state.
After the sender receives all the CTSEP frame, it reencodes the packets with the knowledge of CTSEP frame and removes the nodes that cannot decode the encoded packet.For example, Receiver 1 and Receiver 2 can encode the packet, while Receiver 3 and Receiver 4 cannot; that is, Receiver 3 and Receiver 4 are removed from the set of receivers.The sender then resends the RTSEP frame that updates the encoding packets information and reports the change of receiver collection to its neighbor nodes.After waiting for a SIFS slot, the sender sends the encoding data frame.Figure 8 visually shows the above process, and Receiver 3 and Receiver 4 are removed in the second handshake.

Control Frame Cost
Analysis.Now we formally define a control frame cost as , which is the total length of control frame in one communication.Let   be the cost of control frame through transmission by  set of packets:  = 1, . . ., .In particular,  1 is the control frame cost of unicast.Then the control frame cost benefit is computed as The duration of unicast is equal to one RTS frame (20 B per frame) plus one CTS frame ( NAV (CTS) frame (14 B per frame) intervals.Thus, the control frame cost of unicast  1 = 48.When the set of packets is 2, the communication needs two RTSEP frames (58 B per frame), two CTSEP frames (15 B per frame), and two ACK frames (14 B per frame).So its control frame cost  2 = 174, and its control frame cost benefit  2 = −0.81.Next we consider the set of 4.
The communication demands two RTSEP frames (102 B per frame), two CTSEP frames (15 B per frame), and two ACK frames (14 B per frame).In this case, the control frame cost  4 = 320, and its control frame cost benefit is  4 = −0.67.As we can see, the control frame cost benefit is negative in our Medium Access Control Protocol.This result means that we cost more communication resource in control frame.However, in the above simple example, we only consider the control frame cost and ignore the total length of data frame.Note that the unicast and broadcast flows are totally different.Unicast flows cannot be encoded together with any other flow.Then, let  be the demand of the flows length and let   be the cost of the set of packets.And we have Similarly, let   be the cost benefit of the set of packets, and we have Take  = 4 as an example; (10) turns to : When  > 43, the cost of the amount of information is positive in a coding scheme, approximating 0.75 finally.

Simulation and Result Analysis
Our simulation goes as follows.Flow packets are supposed to arrive according to a Poisson process. = 100 (unit: packets/per second).Senders and receivers are selected randomly using the uniform distribution law.We randomly distribute 86 nodes in a 1400 m × 600 m space, and the communication radius of nodes is 175 m.CSMA/CA protocol is used in MAC layer and minimum-hop routing protocol is used in network layer.The channel capacity is 54 Mbps.And the topology is set up randomly.The expectations of packet length are set to 1000 B, and each node generates  packets every second.We control network load through .That is to say, the rate is fixed to rate = 86/8 bps.We repeat every group of simulation for 1000 times, lasting for 2 hours, and we use the expectations as the final results.We compare our scheme, ECS, with widely used 802.11a/b/g(i.e., no network coding) and scheme like COPE with greedy algorithm in throughput augment and buffer occupancy.
Note that all the throughput mentioned in this paper is information throughput, a brand new metric to measure the transmission capability of networks.Usually, we employ network throughput to do the job, which is defined as the amount of packets that the total nodes received correctly in a particular period of time.But this classical metric fails to reflect the advantages of network coding schemes (especially COPE).One of the reasons is that nodes regard the packets that cannot be decoded as incorrect packets, but most of these packets have to be delivered correctly.Our metric, information throughput, is defined as the amount of information content that the total nodes sent in a particular period of time.It is apparent that the two metrics are exactly the Wireless Communications and Mobile Computing  same when nodes communicate with each other only by unicast, regardless of delivery probability.Furthermore, the new metric can represent the tradeoff between bandwidth and delivery probability.10 shows the throughput gains between ECS and COPE.Both ECS and COPE do have a suitable load to get maximum throughput gains.However, we try to design a scheme with correspondingly stable throughput gains.The above results reveal that ECS provides more than 7% improvements to 802.11a/b/g, the peak of which is 40%.
7.2.Link Quality.We repeat the simulation with link quality from 1 to 0.8 with the Gaussian distribution and  = 100, 300 (unit: packets per second).The flows again arrive according to a Poisson process under the assumption that network load has a slight impact on link quality.
Figure 11(a) shows that both ECS and COPE greatly improve information throughput with low load.Interestingly, with expected delivery probability decreasing, the information throughput decreases, varying from ECS and 802.11a/b/g.Note that the incorrect guess increases as expected delivery probability goes down.Receivers send request for retransmission as they cannot decode.Receivers, however, back off because they may regard this request as an unexpected interference.
Figure 11(b) plots the information throughput in high load, which is greatly shifted.ECS offers a greater improvement than COPE and 802.11a/b/g.Surprisingly, COPE has few improvements as it is close to 802.11a/b/g.Recall from Section 7.1 that the information throughput of COPE becomes flat due to the incorrect neighbor state guesses and encoding number.As link quality improves, the information throughput decreases, showing that the network has achieved its maximum capacity.
The above results reveal that COPE could not bring whole network information throughput in heavy load.It is because COPE substantially increases the utilization of nodes but decreases the sending coverage at the same time.ECS, on the contrary, makes a tradeoff between sending coverage and the utilization of nodes, which therefore yields higher throughput.Meanwhile, the model of learning neighbor state in ECS avoids incorrect decisions; thus retransmissions and longterm backoff greatly decrease.It should be noted that throughput in ECS also has a slight decrease as interference is sure to rise when multicasting encoding packets.

Buffer Occupancy.
Many previous coding schemes assume that nodes' buffer is infinite; that is to say, infinite packets can be buffered.In practice, however, it is vital to  consider that buffer occupancy is limited.Compared with 802.11a/b/g, nodes maintain not only a forwarding queue but also a decoding resource queue.Data packets in the decoding resource queue may be used in decoding; otherwise, they would be discarded.As mentioned earlier in Section 2, there are two kinds of decoding resources: one is the data packets sent by nodes themselves and another one is the data packets overheard by opportunistic listening.The proportion of these two kinds of data packets is associated with node deployment location and topology.That is to say, for the nodes close to the edge of network, the queue of overhearing packets is small, and for the nodes on the trunk road of network, the vast majority of decoding resources are overheard packets.Figure 12 describes the buffer utilization of all nodes in COPE in the simulation, the horizontal axis is the node numbers, and the vertical axis is the number of data packets buffered by node when network is stable; broken line represents the number of data packets in the forwarding queue and the column represents the total amount of packets in the buffer.It can be seen from the figure that there is big difference between nodes; part of the nodes almost have no buffer decoding resources, and part of the nodes have more than 90% of the buffer to store decoding resources.

Buffer Occupancy and Jitter.
We repeat the simulation with the load of 100 and 300, respectively, to summarize some feature values of buffer occupancy, including start values, end values, maximum values, and minimum values, as well as average values.We randomly pick 12 nodes and draw the K chart as shown in Figure 13.Buffer occupancy on ECS is much lower than COPE, since ECS releases invalid decoding resource.For higher load, the buffer occupancy of COPE doubles and even triples compared with medium load.Comparatively, ECS does not require much extra buffer.Also, the curve of ECS is much smoother than COPE, reflecting that ECS only jitters slightly and therefore is more stable and robust.

Cost of Throughput Gains.
We repeat the simulation with load in low, medium, and heavy weight ( ∈ {60, 100, 200, 300}).The relationship between buffer occupancy and throughput gains is presented in Figure 14.Network throughput can be improved by wider frequency band with MIMO, frequency gains with advanced hardware, or our solution, network coding, which all increase cost.Distinguished from other approaches, network coding needs more computational time and storage.As we have shown in Section 5.3, ECS yields much lower computational complexity than COPE and separates the algorithm into two parts, resulting in running apart in spare time of nodes.
Almost every node exploiting ECS in Figure 14 lies in the left side, mirroring that with same throughput gains; ECS occupies fewer buffers.In addition, nodes of ECS gather together with rare variations, while nodes of COPE are more separated, indicating that ECS is more adaptive and robust.Surprisingly, some nodes (both in ECS and COPE) are distributed below zero.That is to say, not all the nodes can obtain throughput gains.

Deployment Density.
It is significantly important to consider deployment density in wireless mesh network.For example, with intensive deployment, network is robust, but it also brings high redundancy and interference.Deploying loosely, network is in poor robustness, while the utilization of nodes is high.Thus, we evaluate the effect of deployment density on network coding scheme.
We evenly deploy  nodes in every  area of one node randomly; therefore network coverage area is √ ⋅ √.We Wireless Communications and Mobile Computing  control deployment density by adjusting the parameter .In order to ensure that the network is a connected graph,  should be less than √ 2/2 ( is node communication radius).Meanwhile, in order to ensure that the network is totally disconnected graph,  should be greater than √2//2.In the simulation, we set  = 400,  = 175, and  ∈ [50, 125].Figures 15(a)-15(c), respectively, show the network topology when the particle size is 50, 90, and 120.
Under 16 kinds of deployment density, we use coloring algorithm mentioned in Section 5, respectively, on 802.11a/ b/g, COPE, and ECS.Figures 16(a)-16(i) are the results of coloring simulation.
As we can see from Figure 16, no matter whether the deployment density is intensive or not, sending coverage rate of both ECS and 802.11a/b/g is very high, while COPE is relatively low.Leveraging network coding can bring high ratio of utilization of nodes, which is mainly because every sending node conducts multicast communication with many neighbors, just as shown in Figure 16(d).
Overall, the main approach in COPE for throughput increment is to improve node utilization, which, however, consumes too much sending coverage rate.The sending coverage ratio dries up when nodes are deployed intensively in COPE.ECS, by contrast, still keeps high sending coverage  No matter what deployment density is, it is apparent that ECS has similar sending coverage to 802.11a/b/g in Figures 17(a) and 17(b).At the same time, the node utilization in ECS is close to COPE.Although COPE has higher node utilization, the sending coverage ratio is much lower than ECS.Above all, there are more opportunities for network coding when the deployment is intensive; however, the interference can be very severe.But the advantage of network coding can barely take effect if the deployment is too scarce.Thus, it would be of great value in future study to find a tradeoff of encoding opportunities and deployment density.

Related Work
Due to the potential throughput benefit of network coding, it arose much attention when it was first proposed in [3].Practical network coding schemes are aiming to increase throughput; what is vital is to design encoding algorithms and make decisions.For COPE [10], the first paper that puts  network coding into practice has received much attention.Many follow-up researches [4,6,11,[17][18][19] are therefore addressing novel schemes to improve performance of COPE; some examples include the robust coding technique that covers the cases where COPE is oblivious of [19] and the novel scheme that allows relays forward coded packets [11].However, the majority of them use greedy algorithm, which only focuses on the maximum packets in an encoding procedure.
In fact, exploiting all opportunities of broadcasting encoded packets with greedy algorithm in a single transmission may reduce network throughput [6].Encoding number [4] and optimality scheduling [6] aim to solve these problems, which are also the most closely related schemes to ours.However, these schemes apply for only given topologies, which is unlikely to happen in practice.In fact, it is noticeable that topologies change in wireless mesh networks is usual.Our scheme, calculating the maximum encoding number with the knowledge of topology and enlarging the sending coverage, is therefore more adaptive in mesh networks with large swaths of nodes.In particular, although [4] is also related to the upper bound of network coding, it only gives upper bound of COPE in some given topologies instead of coming up with a new approach to overcome the drawbacks of COPE.
In [6], the schedule would be quite complicated when the network scales up.Every node in XOR-Sym allocates every session with a unique queue to store packets needed to be transmitted, which is very costly to maintain.Although it can achieve optimal results, it is quite complicated for scheduling algorithm to decide which sessions are allowed to transmit at a certain time.This would be aggravated when more nodes join the network.Moreover, topologies are more likely to be dynamic and arbitrary in wireless network.Therefore, fixed routing (the assumption of XOR-Sym) may not be guaranteed.Another body of work has been looking for the improvements of network coding and decoding part based on protocols [8,20,21], all of which leverage opportunistic listening.Among these approaches, there are two main approaches to obtain decoding resource knowledge, namely, what native packets the neighbors should buffer to decode encoding packets: (i) transmit control information alone and (ii) via opportunistic listening.The first approach is simple and reliable.However, sacrificing throughput to transmit control information is costly, since network coding aims to augment throughput.Thus, many researches resort to the second approach, namely, exploiting ETX metric [12], to learn neighbor state, which is corrected by ROC check [22].Typically, [18] works in lossy wireless networks with error-correcting capabilities.However, we prove in Appendix that it remains an inherent error rate, which leads to an incorrect guess and retransmission, therefore reducing throughput increment.Therefore, we elaborate on our approach, carrying coding/decoding information in RTS and CTS, which reduces communication cost, increases reliability, and consequently ensures the throughput gains.

Discussion
In this section, we focus on designing an efficient and simple buffer management scheme, so that the similar throughput can be obtained with less buffer occupancy.
In COPE, opportunistically listened packets are stored in the buffer for a fixed time  (default 0.5 s).After a timeout, the packet would be removed.However, such a design is not applicable, since the buffer occupancy is affected by both network load and deployment topologies.The heavier load is, the more packets of neighbors can be opportunistically listened to.Therefore, if the scheme lacks buffer monitoring, the buffer in nodes may surge, which results in no space for forwarding packets.This will be a huge disaster for the network.
The buffer occupancy in summary can be divided into two categories just as we have mentioned in Section 2. We mainly aim to manage the overheard buffer, which is in large amounts in wireless mesh networks.
Our solution, simply speaking, is to efficiently manage decoding resource by releasing the invalid buffer as soon as possible.To better illuminate our idea, let us recall the figure in Figure 2; Alice sends packet  1 to relay successfully and then moves packet  1 from forwarding queue to decoding resources queue.At the same time, John and Sally both   If all of them receive or overhear the ACKEP frame sent by relay, they know that packet  1 has been coded and needs to be preserved.In this situation, packet  1 is removed only in the following conditions: (i) node decodes successfully using packet  1 and (ii) receiver gets data packet in ID2 field of ACKEP frame.What if packet  1 cannot be encoded?For example, one of them announces to relay that he/she has no chance to overhear packet  1 ; therefore relay can only unicast packet  1 and inverse packet of packet  1 .
If Alice, Sally, and John monitor that relay has sent an unmodified ACK frame, they would be sure that packet  1 is not encoded.In this case, they keep packet  1 in a  period

Figure 1 :
Figure 1: Intuition underlying ECS's use of interference-aware model in coding packets.(a) uses COPE as four packets encoded at the relay (black node), while (b) demonstrates our approach: two packets are, respectively, encoded at three relays, providing more throughput improvement.

Figure 2 :
Figure 2: A brief illustration of network coding.

Figure 3 :
Figure 3: The number of sending packets  and waiting time slot  versus DFC.

Figure 4 :
Figure 4: The proportion of all states (healthy, low-use, and overloaded) of nodes in various time periods .

Figure 5 :
Figure 5: The result of coloring.Sending nodes are depicted in black, and receiving nodes are in light gray.White nodes are for nodes in NAV timer and the sending coverage is in light gray regions.The bigger black node is the algorithm execution node this.
(b).Figures6(c) and 6(d) plot the equivalent distribution figure of the two effects.

Figure 6 :
Figure 6: The distribution in various  and   .(a) demonstrates how  and   influence ().(b) shows the relationship between these two parameters and the cost of the whole coloring algorithm.

13 NAV
14 B per frame) and one ACK Wireless Communications and Mobile Computing

Figure 10 :
Figure 10: Throughput and its improvement comparison with different network loads.

Figure 11 :
Figure 11: Throughput comparison with different link quality.

Figure 14 :
Figure 14: The overhead of throughput improvement.

Figure 16 :
Figure 16: The result of deployment density coloring.

receive packet 𝑝 1
by overhearing the transmission and store it in the respective decoding resources queue.In COPE, all of three persons remove packet  1 from the resource queue in 0.5 seconds.In this paper, relay searches for packet  1 's inverse packet in forwarding queue immediately after receiving packet  1 .If it is found, relay encodes packet  1 firstly.Whether or not packet  1 is encoded, relay will send ACK frame to Alice.If packet  1 is encoded, relay sends ACKEP control frame; otherwise, it sends original ACK frame.Just as Section 6 demonstrates, ID1 stores packet  1 's identification and ID2 stores identification of packet  1 's inverse packet.
(  ) be the degree of vertex  in the undirected graph .The set of neighborhood of  is   ; that is,   = {V  |   ∈ }.  represents the set of neighbor of  that is colored in color ; that is, Let

Table 1 :
The format of control frame.The figure shows the format of control frame in 802.11 protocol and ECS.The field with white background color is what 802.11 protocol has presented.The highlighted fields are the added parts in ECS (e.g., as four encoded packets).Valid type and subtype combinations.