Abstract
Network coding–based routing has been widely considered as a promising technology to improve the network throughput of wireless multihop network. However, existing network coding aware routings have the problem of failure decoding and usually neglect the transmission scheduling, which degrades the gain of network coding. In this article, a common network coding condition and traffic matching supported network coding aware routing is proposed for wireless multihop network. In this, common network coding condition is proposed to avoid the problem of failed decoding. In addition, traffic matching mechanism is presented to promote the occurrence of network coding. Besides, a coding and load aware routing metric, which jointly considers the network coding opportunity and node load, is designed to evaluate the discovered paths. Extensive simulations on NS2 demonstrate that CTNR increases the number of coding opportunities and network coding occurrence, and improves network throughput.
Keywords
Introduction
Wireless multihop network 1 consists of nodes with wireless communication capability. Each node in wireless multihop network acts as both end device and router. The typical wireless multihop networks include wireless mesh networks (WMNs), 2 wireless sensor networks (WSNs), 3 mobile ad hoc networks (MANETs), 4 and vehicular ad hoc networks (VANETs). 5 Compared with other wireless communication systems, for example, cellular network, the wireless multihop network can be easily deployed at low cost without fixed infrastructure and can be applied in many fields, such as emergency communication, environmental monitoring, and so on.
The transmission in a wireless multihop network from source to destination, which is out of the transmission range of the source, needs the relaying of intermediated nodes. Therefore, routing which determines the path of the transmission is critical to the performance of wireless multihop network.6–8 However, due to the open nature of wireless channel, the transmission in wireless multihop network is easily influenced by wireless interference, which leads to low network throughput and makes routing in wireless multihop network a great challenge.
From the perspective of traditional information theory, any operation to the received packets at intermediate node brings no gain and store-forward manner has been widely recognized as the main working manner for network. In 2000, network coding was first proposed by Ahlswede et al., 9 which illustrated that network coding at intermediate node can increase the multicast transmission rate. Li et al. 10 further gave the proof that the transmission rate of multicast using network coding can achieve the theoretical upper bound of multicast rate determined by the max-flow min-cut theory. In particular, the network coding in wireless network can reduce the number of transmissions, improve network throughput, and alleviate wireless interference. 11 Therefore, network coding is especially suitable for wireless multihop network. 12
To demonstrate the advantages of network coding in wireless environment, take the scenario in Figure 1 as an example. In Figure 1, there are two flows:

Comparison of store-forward manner and network coding in multihop network. (a) Store-forward manner. (b) Network coding manner.
Due to the potentials of network coding in improving the performance of wireless multihop network, some network coding–based routings13–15 have been proposed. The network coding applied in routings is network layer network coding, instead of physical layer network coding. 16 The physical layer network coding can also improve the network throughput. However, each packet involving physical layer network coding needs to be synchronized strictly, which is difficult to be realized in the distributed wireless multihop network. Therefore, the network layer network coding is usually exploited in the routings for wireless multihop network. Actually, the network coding applied in routings can be divided into intraflow network coding and interflow network coding, according to the packets involving network coding belong to the same flow or different flows. The intraflow network coding–based routings usually use random linear network coding and combine with opportunistic routing to improve the reliability of transmission, 15 whereas interflow network coding–based routings usually exploit XOR operation to reduce the number of transmissions and improve network throughput. The interflow network coding–based routing, which is also known as network coding aware routing or coding aware routing, is the focus of this article.
The coding opportunity architecture (COPE) 17 for wireless multihop network and classical coding topologies were proposed. But the network coding opportunities discovery in COPE is independent of routing discovery, and the classical coding topologies are limited within one hop range of coding node, which both neglect potential coding opportunities. The routing with opportunistically coded exchanges (ROCX) and the concept of network coding aware 18 were proposed, which combine network coding opportunities discovery with routing discovery to increase coding opportunities among routes. But ROCX detects coding opportunities based on the classical coding topologies.
The distributed coding aware routing (DCAR) 19 was proposed. In DCAR, the multihop network coding condition (MNCC) was proposed, which extends the range of classical coding topologies in COPE. However, the false coding effect may exist in some scenarios using MNCC, 20 and generalized coding condition (GNCC) and free-ride-oriented routing (FORM) 20 were proposed. Network coding and interference are jointly investigated by Peng et al. 21 and Hou et al. 22 But Peng et al. 21 exploits the classical coding topologies as ROCX to detect coding opportunities, and the network coding condition is not considered by Peng et al. 21 The improved generalized coding condition (IGCC) was proposed. 23 But the overheard packets in IGCC must be native packets. And IGCC includes five rules and is hard to be realized. The distributed greedy coding aware deterministic routing (DGCDR) was proposed. 24 Nevertheless, the coding condition in DGCDR is only necessary, not sufficient.
The classic network coding routings put emphasis on the increasing of coding opportunities through improving the network coding conditions.13–15 However, existing network coding conditions are only valid under certain conditions and may lead to failure decoding problem in certain scenarios. On the other hand, network coding opportunity at one node only means that network coding potentially take place at the node, but existing coding aware routings exploit opportunistic network coding scheduling (ONCS) for packets transmission scheduling, which cannot guarantee the occurrence of network coding. Take the scenario in Figure 1(b) as an example. The network coding needs packets from different flows. But due to the wireless channel contention, the wireless node cannot receive packets from different flows at the same time, for example, node 2 can only receive
Currently, some network coding–oriented scheduling algorithms have been proposed.25–31 The flow-based scheduling algorithm was proposed 25 to improve the throughput of COPE. Markov model–based scheduling algorithms were presented.26–31 But the references26–29 only considered the simple chain topology and infinite length queue, which are not real in wireless multihop network. Shao et al. 30 proposed traffic shaping–based transmission scheduling. Lu and Wan 31 presented the low-jitter wireless transmission algorithm based on buffer management (BLJCR). However, references25,29,30 do not consider the improvement of network coding condition.
To solve the problems of network coding condition and transmission scheduling in existing network coding aware routings, this article proposes common network coding condition and traffic matching supported network coding aware routing (CTNR) for wireless multihop network. In CTNR, the common network coding condition (CNCC) is proposed. CNCC can be applied to determine the network coding opportunity of general scenarios, for example, multiple flows with multiple coding nodes. In addition, the traffic matching mechanism (TMM) is presented to match the packets from different flows existing network coding opportunity, which increases the number of actual network coding occurrence. Extensive simulations on NS2 demonstrate that CTNR increases the number of coding opportunities, the percent of coding packets and improve the network throughput.
The contributions of this article are as follows:
The CNCC is proposed to detect network coding opportunities. The proof of sufficiency and necessity of CNCC is presented. The CNCC can be applied in the scenarios of multiple flows with multiple coding nodes. Based on CNCC, more coding opportunities can be discovered and the undecodable problem of previous network coding condition can be avoided.
The TMM is proposed to solve the scheduling problem of wireless network coding. Through traffic matching, the packets from different flows at the node existing coding opportunity can be matched to promote the occurrence of network coding.
A CLRM is presented, which jointly considers the node load and coding opportunity. CLRM can balance the network load and postpone network congestion.
This article is organized as follows: The related works and motivations are presented in “Related works and motivations” section. “Design of CTNR” section gives the detailed design of CTNR routing algorithm. Simulation details and performance analysis are presented in “Simulations and performance analysis” section. “Conclusion” section concludes this article.
Related works and motivations
Before delving into the related works of network coding aware routings, related terms in network coding aware routings are given first. If one node
COPE 17 is proposed by Katti et al. to address the unicast routing through exploiting network coding in wireless multihop network. And five classical coding topologies (Chain topology, “X” topology, Cross topology, and Wheel topology) existing coding opportunities are given in COPE as shown in Figure 2.

Classical coding topologies in COPE. (a) Chain topology. (b) “X” topology. (c) Cross topology. (d) Wheel topology.
However, it is obvious from Figure 2 that the coding topologies in COPE require that decoding must take place at the next hop of the coding node, which limits the range of coding topologies. On the other hand, the network coding function in COPE is placed between the network layer and MAC layer, which means that network coding in COPE is independent of the routing discovery. Actually, the coding opportunities in COPE are discovered based on five classical coding topologies in the discovered routes, which may miss the routes with more coding opportunities.
For the separation of network coding and routing in COPE, the network coding aware concept was proposed by Ni et al.
18
in ROCX. ROCX combines network coding function with the routing function, which can proactively detect coding opportunities in routing discovery phase. Compared with COPE, ROCX can find the routes with more coding opportunities. Take the scenario in Figure 3 as an example. In Figure 3, there are eight nodes and two flows,

Comparison example of COPE and ROCX in route selection.
In DCAR, 19 the MNCC of two flows at the intersecting node is given. Figure 4 illustrates an example of the multihop coding topology. In Figure 4, the node 4 overhear packet from node 7, which are both two hops away from the coding node, node 2. It is clear from Figure 4 that the overhearing and decoding can be multihop away from the coding node, which extends the range of coding topology and increases the number of network coding opportunities.

Example of multihop coding topology in COPE.
Actually, the MNCC is valid only when the two intersecting flows are both native flows. However, when one of the intersecting flows is coded flow, the MNCC may be not valid anymore in a certain scenario. Guo et al. 20 found the invalid problem of MNCC in a certain scenario and presented some improved strategies as shown in Figure 5.

Example of undecodable problem of multihop network coding condition in DCAR and improvement strategies. (a) Undecodable problem example of MNCC in DCAR. (b) Insert node A before node 6. (c) Insert node B after node 9. (d) Establish the wireless link between node 2 and node 9.
In Figure 5(a), there are three flows,
Based on the improving strategies of MNCC, the general network coding condition (GNCC) 20 was proposed. However, one item of the GNCC requires that the packet that participates in network coding should be native packet, which is too strict. On the other hand, GNCC considers the scenarios of two native flows or one coded flow with one native flow. 21 In an actual network, the scenario of two code flows may also appear. In addition, the GNCC only presented general guiding method, instead of formal and specific rules to detect coding opportunity as MNCC.
The interference and network coding are also jointly considered.21,22 However, in the research of Peng et al. 21 the network coding opportunity is detected based on the classical coding topologies as COPE, whereas the network coding condition is even not investigated by Hou et al. 22 The improved general network coding condition (IGNCC) and the drawbacks of GNCC were proposed. 23 However, the IGNCC requires the overhead packets must be native packets, which is a great limitation to overhearing. In addition, IGNCC includes up to five rules to identify the network coding opportunity, which is complicated to realize in a real network. The necessary, but not sufficient network coding condition is presented. 24 Although the coding condition is simple and easy to realize, 24 the not sufficient network coding condition may also result in the failure decoding problem, which degrades the gain of network coding.
The increasing of network coding opportunities is an important goal of existing network coding aware routings. However, network coding opportunity only means that network coding may happen, but cannot guarantee the inevitable occurrence of each network coding. Actually, the traffic transmission scheduling directly influences the actual occurrence of network coding. Take the scenario in Figure 1(b) as an example. If the packets of
Figure 1(b) demonstrates the extreme situation where node 2 cannot queue received packets. In fact, even in the situation that the packets can be queued, the occurrence of network coding is still influenced by the transmission scheduling and arrival order of packets. Some researchers had realized the importance of packets transmission scheduling to the network coding aware routings. Zhao and Medard 25 analyzed queue changing and packets transmission of the cross-coding topology in COPE. The virtual queue for each flow is designed at coding node to improve the performance of COPE. However, the packets transmission scheduling 25 is round-robin manner, which neglects the different arrival time of packets that can be coded together. The Markov model and optimized algorithms are exploited to analyze and optimize the network coding scheduling.26–29 However, these four references26–29 only investigate the scheduling in classical coding topologies (e.g. chain topology or cross topology) with infinite length queue at each node, which is too ideal to exist in a real wireless multihop network. In addition, the computing cost of the optimized algorithms26–29 used may greatly increase in wireless multihop network.
Shao et al. 30 proposed the traffic shaping based–transmission scheduling mechanism to increase the number of occurrence of network coding in WSN. But the network coding condition is not considered. The queue length–based transmission scheduling mechanism is presented for the network coding aware routing. 31 Before the packets transmission, the network jitter training phase is run first to search the optimal threshold of queue length control policy. However, the network is dynamic, which lead to the fluctuation of the optimal threshold. And the threshold 31 is fixed.
Design of CTNR
CNCC
In network coding aware routings, network coding condition defines the method to detect network coding opportunities. Therefore, network coding condition determines the capability of network coding aware routing to exploit network coding, which is crucial to network coding aware routings.
Actually, the network coding condition should meet the following requirements: (1) The destination of each flow that involves network coding can get the intended native packet. (2) The method defined by network coding condition should be operable and include specific calculation. In this section, the existing network coding conditions are analyzed first, then the CNCC is presented and proved.
Before delving into the analysis of existing network coding conditions, the notations of related terms are defined first. For a node
Lemma 1
One hop network coding condition (ONCC)
The sufficient and necessary network coding condition is that, each next hop of the coded packets can decode the encoded packet and obtain the intended native packet.
The Lemma 1 is proposed in COPE. 17 It is obvious from Lemma 1 that the next hop of the coding node is just the decoding node, which limits the coding topologies within one hop of the coding node as shown in Figure 2. Besides, the ONCC puts emphasis on the decodable of the coded packets at the next hop of coding node and does not give the detailed computing method to detect coding opportunities. In fact, in COPE, the network coding opportunities are detected through comparing the flows topology with the classical coding topologies.
Lemma 2
MNCC
Assume two flows,
The Lemma 2 is presented in DCAR.
18
As illustrated in Figure 5, MNCC holds when both
Lemma 3
GNCC
For a potential coding node, the GNCC is that
There exist upstream decode-capable nodes, that can extract the intended native packet for the node on the considered flow.
There exist downstream acquisition nodes, which can overhear enough packets (either native or encoded) to decode, on other flows associated with the encoding function at this node.
The Lemma 3 is presented 20 based on the analysis of Figure 5. However, the item (1) of the GNCC is not essential. The analysis in Figure 5 considers one native flow and one coded flow, but the scenario with two coded flows are not investigated. In addition, Lemma 3 presents the principles of network coding condition instead of specific calculating method with operability.
To address the problems of existing network coding conditions, the CNCC is presented in this article. Before giving the definition of CNCC, the scenario with two coded flows is analyzed first. Figure 6 demonstrates the different result of example scenario with two coded flows. In Figure 6, there are four flows and 22 nodes.

Examples of two intersecting coded flows. (a) Unsuccessful decoding. (b) Correct decoding through overhearing coded packers. (c) Correct decoding through multiple overhearing and decoding. (d) Correct decoding with decoding to get native packets for the next encoding.
As shown in Figure 6(a), it appears that
In Figure 6(b),
In Figure 6(c), the destinations of the four flows can obtain native packets, respectively. It is interesting to observe that
In Figure 6(d),
Based on the above analysis of the example scenario in Figure 6, the design of CNCC should consider the following aspects:
The overhearing node is just the decoding node. As depicted in Figure 6, each overhearing node decoded the coded packets using the overheard packet.
The overhearing through wireless channel should be beneficial to decoding, no matter whether the overheard packet is native packet or coded packet. Take the scenario in Figure 6(b), for example, the node 9 overhears the coded packet
Since CNCC considers the coding problem of coded flows, the decoding needs multiple decoding and multiple overhearing. As shown in Figure 6(c), the
Although decoding takes places at overhearing node, the decoding after coding can make the subsequent coding clearer and easier to decoding, when there are multiple decoding options. As illustrated in Figure 6(d), if
Before delving into the definition of CNCC, related terms are presented first. Assume one node
Theorem 1
CNCC for 2 flows (CNCC-2)
Assume two flows,
1.
2.
Proof
The sufficiency proof of CNCC-2 and the necessity proof of CNCC-2 are investigated, respectively.
Proof of sufficiency
Assume the item (1) and (2) of CNCC are satisfied. Besides, the coding result of
At node
The operations at
Finally, at the node
Replace the
According to the item (1) of CNCC, there is
Proof of necessity
Assume
Based on the proof of sufficiency and necessity, the Theorem 1 is proved. The scenarios in Figure 6 are used to show the application of CNCC-2. In Figure 6(b),
In Figure 6(b),
Theorem 2
CNCC for multiple flows (CNCC-M)
Assume
Proof
The sufficiency proof and the necessity proof of CNCC-M are investigated, respectively.
Proof of sufficiency
Assume any two flows of the
When
Similarly, for
And for
Perform XOR operation on the left and right sides of the equations (6), (9), and (10), then there is
Perform XOR operation on the left and right sides of the equations (6) and (7), then there is
Perform XOR operation on the left and right sides of the equations (12) and (13), then there is
Similarly, there are
Based on the result of equations (14)–(16), the three flows can get the intended native packets through decoding.
When
According to equation (6) and
According to equation (8), the equation (19) can be expressed as
According to equation (17), the equation (20) can be expressed as
Therefore, there are
Similarly, when
Similarly, when
Based on the above rules, when
Based on the above analysis, when any two flows of the
Proof of necessity
Assume the
Although the
where
Assume
Similarly, assume
Consider the
Similarly,
Consider the equation (27), since the aim of
where
Similarly,
According to equations (29) and (30),
Based on the sufficiency and necessity proof of CNCC-M, the CNCC-M is proved.
Theorem 3
Assume
Proof
If the
Assume
Load balancing and coding aware routing metric
In network coding aware routings, routing metric is used to evaluate the discovered paths. Therefore, routing metric is a critical aspect of network coding aware routings. The routing metric of CTNR should consider the following aspects:
Network coding benefit. Network coding reduces the number of transmissions, consumes less network resource, and improves network throughput. In addition, higher coding degree also brings better benefit. Therefore, the number of coding opportunities on paths and the coding degree at each coding nodes should be reflected in the design of the routing metric.
Network load. It is interesting from the analysis in “CNCC” section that network coding usually takes place at intersecting nodes. For new arriving flow, it needs to intersect with existing flows to create more coding opportunities, which may result in network congestion on the other hand. So, there should be a trade-off between load balancing and coding opportunities increasing.
Path quality. The discovered path consists of multiple wireless links. So, the path should avoid the wireless link with poor link quality, which easily results in packets lost and retransmission.
Considering the above factors, the coding and load aware routing metric (CLRM) is designed in this article.
Consider the wireless link
where
Consider the definition of
To increase network coding opportunities, the new arriving flows in network coding aware routings tends to intersect with existing flows, which easily results in the traffic concentrating in part of the network and network congestion. Therefore, the node with heavy load should also be avoided in CLRM. To balance the network load, the load degree (LD) is designed to reflect the LD of the node. For link
where
Then, the CLRM value of link
And for the discovered path
It is clear from the equations (33) and (34) that the higher coding degree and the lower ETX and LD values mean the lower CLRM value of
TMM
The coding opportunity discovered according to CNCC means the potential network coding at one node, which cannot guarantee the occurrence of network coding due to the different arrival time of flows as discussed in “Related works and motivations” section. To improve the occurrence of network coding, the TMM is proposed.
In existing network coding aware routings, the packet is queued and sent out as first-in-first-out (FIFO) manner. However, the multiple packets from multiple flows in the queue may be coded into one coded packet. The transmission scheduling should be coding set oriented instead of packet oriented. The coding set is the result of coding opportunity discovery procedure, which indicates the set of flows that can be coded together. On the other hand, the FIFO queue cannot clearly demonstrate the arrival of packets of different flows. In CTNR, at intermediate node
In TMM, the arrived packets are mapped to the virtual queues of the corresponding flows. The coding set–oriented flows grouping algorithm (CFGA) is used to group the flows at node

Coding set–oriented flows grouping algorithm.
Since the coding packets of coding sets are objects of transmission scheduling, each coding set is assigned the scheduling priority using the maximum virtual queue occupation ratio of the flow in one coding set. The details of the virtual queue occupation ratio based priority computation algorithm (VRPA) is given in Figure 8.

Virtual queue occupation ratio based priority computation algorithm.
Besides, the coding set–oriented transmission scheduling algorithm (CTSA) determines the transmitting order of the packets from the coding gates based on VRPA and generates the gate control list to control the open/close of the coding gates. Assume the virtual queue head packets set of each coding set are

Coding set–oriented transmission scheduling algorithm.
Detailed routing discovery procedure of CTNR
When there is a data transmission task from source node
1. Route request
The node
2. Route reply
When the destination receives RREQ message, it generates the corresponding Route REPly (RREP) message according to the information collected by RREQ. The RREQ will be transmitted to node
3. Coding opportunity discovery
When the node
4. Route confirm
When the node

Coding opportunity discovery algorithm.
Simulations and performance analysis
Simulation parameters
To evaluate the performance of the proposed CTNR, extensive simulations are conducted using the NS-2 platform. The aims of the simulations are as follows: (1) verifying the correctness of the CNCC compared with existing network coding conditions, (2) evaluating the effectiveness of the TMM in increasing the occurrence of network coding, (3) quantifying the benefit of the CLRM under CNCC and TMM.
In the simulations, two scenarios are considered: (1) grid network with
Simulation parameters.
Performance analysis
Grid network
Figure 11 depicts the network throughput under different number of flows in the grid network. It is obvious from Figure 11 that the six routings are close and increase gradually when the number of flows is below 20. When the number of flows grows, CTNR has a gradually increasing superiority over other routings. The gaps among the six routings become larger when the number of flows is over 20. One interesting point is that when the number of flows is over 34, the throughput of COPE, DCAR, FORM, and BLJCR begins to decrease gradually, whereas CTNR and CTNR-TMM can still increase slowly.

Network throughput under different number of flows in the grid network.
The reason is that COPE and BLJCR passively detect coding opportunities in discovered routings and exploit less network coding compared with other routings, which results in earlier network congestion and decreasing of throughput. Although DCAR and FORM improve the network coding condition, the decodable of coding packets cannot be guaranteed. Especially, the MNCC in DCAR is no longer valid for two coded flows, which results in packets retransmission and degrade of network throughput, even lower than BLJCR.
For CTNR, it exploits most network coding through CNCC and TMM. More network coding means more resource saving and network can accommodate more traffic, which postpone network congestion. On the other hand, the CLRM let the routings avoid the nodes with heavy load and balance network traffic. Therefore, CTNR outperforms other routings in network throughput. Since CTNR-no TMM cannot use TMM to create more network coding, the network throughput of CTNR-no TMM is lower than that of CTNR.
The average end-to-end delay under different number of flows in grid network is plotted in Figure 12. It can be seen from Figure 12 that the average end-to-end delay of the six routings rises gradually when the number of the flows is ascending. When the number of flows is below 12, CTNR has the largest delay and COPE has the least delay. When the number of flows is over 24, COPE has the largest delay and CTNR has the lowest delay.

Average end-to-end delay under different number of flows in the grid network.
The reason for the phenomenon is that when the number of flows below 12, CTNR improves the occurrence through TMM, which delays potential packets for coding and results in the highest average end-to-end delay of CTNR compared with other routings. And CTNR-no TMM is lower than that of CTNR when the number of flows is below 12, since there is no TMM and packets delay for coding. Because COPE does not consider the coding opportunity in routing selection, the average end-to-end delay of COPE is smallest when the number of flows is small.
With the growth of the number of flows, the network tends to be congested, COPE, BLJCR, DCAR, and FORM increases rapidly and COPE becomes the largest one with the number of flows over 20. Compare with other routings, the CTNR can increase network coding through CNCC and TMM. In addition, nodes’ load is considered in CLRM, which can balance the network traffic and postpone the network congestion. Without TSN, the CTNR-no TSN can exploit less network coding and lead to slightly higher end-to-end delay when the number of flows is over 24.
The coded packets ratio is computed as the number of coded packets divided by the number of total packets. And the coded packets ratio reflects the ability of routings to exploit network coding. Figure 13 illustrates the coded packets ratio under different number of flows in the grid network. It is clear from Figure 13 that the coded packets ratio of the six routings increases with the growth of the number of flows. And the advantage of CTNR becomes obvious with the increasing of the number of flows. The coded packets ratio of CTNR is 5.1% larger than that of CTNR-TMM and 7.7% larger than that of FORM when there are 20 flows. When the number of flows increases to 40, the gaps in the coded packets ratio become 11.7% and 20.6%, respectively.

Coded packets ratio under different number of flows in the grid network.
The reason is that more flows intersect each other and more coding opportunities will be discovered when the number of flows increases. Since BLJCR passively detects coding opportunities in discovered routings as COPE, the coded packet ratio of COPE and BLJCR are significantly lower than other routings. The MNCC in DCAR is only valid for two intersecting native flows, while FORM did not consider the coded opportunities of two coded flows. So DCAR and FORM are both lower than CTNR-no TMM and CTNR. Although CTNR-no TMM and CTNR both detect coding opportunities based on CNCC, the TMM in CTNR improves the occurrence of network coding. Therefore, the CTNR-no TMM is lower than CTNR especially with a higher number of flows.
However, not all coded packets can be decoded successfully due to the wireless loss or drawback of coding condition. The decoded packets ratio under different number of flows in the grid network is presented in Figure 14. The decoded packets ratio is computed as the number of decoded packets divided by the number of coded packets. It is interesting from Figure 14 that the decoded packets ratio of COPE, BLJCR, CTNR-no TMM, and CTNR is close and decreases slowly with the growth of the number of flows, whereas that of DCAR and FORM decreases rapidly with the growth of the number of flows.

Decoded packets ratio under different number of flows in the grid network.
The reason behind the phenomenon is that the drawback of MNCC in DCAR and GNCC in FORM results in the fake coding opportunities, which lead to the packets undecodable problem of the coded packets. For COPE and BLJCR, although coded packets ratios are lower than other routings, the decoded packets ratio of COPE and BLJCR is close and larger than that of DCAR and FORM, because the coding opportunities in COPE and BLJCR can guarantee the successful decoding at the next hop of the coding node, according to the ONCC. Despite no TMM in CTNR-no TMM, both CTNR-no TMM and CTNR detect coding opportunities according to CNCC, which solves the fake coding opportunity problem and can guarantee the correctness of coding opportunity. However, the decoded packets ratio of COPE, BLJCR, CTNR-no TMM, and CTNR decrease slowly due to the wireless loss with the increase of the number of flows.
In the simulation of CTNR, the network coding opportunities at each node are determined according to CNCC. It is important and interesting to further distinguish which coding opportunity is based on CNCC-2, which coding opportunity is based on CNCC-M, and even which coding opportunity can be determined based on MNCC without CNCC. To investigate the contribution of the different coding condition in discovering coding opportunities of CTNR, the coding condition ratio is shown in Figure 15.

Coding condition ratio of CTNR under different number of flows in the grid network.
It is obvious from Figure 15 that MNCC is larger than CNCC-2 and CNCC-M when the number of flows is small. However, MNCC decreases sharply with the growth of the number of flows. Contrary to MNCC, CNCC-2 grows rapidly with the number of flows between 6 and 22, and when the number of flows is over 22 the growth of CNCC is slow. Despite CNCC-M grows when the number of flows is over 8, the CNCC-M is always below 15. The phenomenon in Figure 15 indicates that when the number of flows is small, MNCC makes the largest contribution to the coding opportunity. When the number of flows is large, the majority coding opportunities are discovered based on CNCC-2. The reason is that when the number of flows is small, the majority of the flows are native flows at intersecting node and coding opportunities can be determined using MNCC. However, upon increasing the number of flows, many flows may intersect with other flows at multiple intermediate nodes. Then the flows may become coded flows at intermediate node, and only CNCC can be used to determine coding opportunities. However, compared with CNCC-2, CNCC-M involves more flows and need more strict requirements, which makes the coding opportunities based on CNCC-M is much smaller than that based on CNCC-2.
Random network
Figure 16 illustrates the network throughput under different number of flows in the random network. It is clear from Figure 16 that the gaps between CTNR and other routings become larger when the number of flows is over 24. The network throughput of COPE, DCAR, FORM, and BLJCR begin to decrease, whereas CTNR-no TMM and CTNR continue to increase slowly, when the number of flows is over 32. The reason is that CTNR detects coding opportunities using CNCC, which avoid the fake coding opportunities. In addition, the TMM increases the occurrence of network coding. Therefore, CTNR exploits more network coding and outperforms the other routings especially with higher number of flows, which is also the case in Figure 11.

Network throughput under different number of flows in the random network.
Compared with Figure 11, it can be found from Figure 16 that the changing trend of the six routings is similar to that in Figure 11, but lower than that in Figure 11. The reason is that the nodes in the grid network are distributed evenly, whereas the nodes in the random network are placed randomly, which leads to higher node density. Since the node density is higher in random network, the wireless channel contention is more intense, which degrades the network throughput.
Figure 17 shows the average end-to-end delay under different number of flows in the random network. It can be found from Figure 17 that CTNR has a higher start point compared with other routings. Then the average end-to-end delay of CTNR rises gradually when the number of flows ascends. Then CTNR is lower than other routings when the number of flows is greater than 20. The reason behind the phenomenon is that the TMM of CTNR requires the early arrival packets to wait for the later packets to increase the occurrence of network coding, which increases the delay of packets, when the number of flows is low. However, network congestion occurs with the growth of number of flows, which leads to the sharp increase of average end-to-end delay in COPE, DCAR, FORM, and BLJCR. Since CTNR exploits more network coding, the congestion in the network using CTNR is postponed and the increase of average end-to-end delay of CTNR-no TMM and CTNR is slower than other routings.

Average end-to-end delay under different number of flows in the random network.
Compared with Figure 12, it is obvious from Figure 17 that the two scenarios are close when the number of flows is low. However, the average end-to-end delay of the six routings in random network is higher than that in Figure 12. This because that the higher node density in random network leads to harder wireless medium occupation and prolongs the delay of the packets.
Figure 18 depicts the coded packets ratio under different number of flows in the random network. It is evident from Figure 18 that the coded packets ratio of the six routings ascends with the growth of the number of flows. And the gaps among the six routings become larger when the number of flows is over 16. Besides, CTNR-no TMM and CTNR outperform other routings and CTNR is larger than CTNR-no TMM especially with larger number of flows. This because that CTNR-no TMM and CTNR detect coding opportunities based on CNCC, which avoids fake coding opportunity and increases the number of coding. In addition, CTNR increases the occurrence of network coding through TMM, which further rise the coded packet ratio compared with CTNR-no TMM.

Coded packets ratio under different number of flows in the random network.
Compared with Figure 13, the changing trend of the six routings is similar to that in Figure 13, and coding packets ratio of the six routings is slightly higher than that in Figure 13. The reason is that the higher node density in random network realizes more neighborhood relationship than that in grid network, which actually generates more coding opportunities in random network. The coded packets ratio reflects the number of coding opportunities in the network to some extent.
Figure 19 graphs the decoded packets ratio under different number of flows in the random network. It is clear from Figure 19 that the decoded packets ratio of COPE, BLJCR, CTNR-no TMM, and CTNR is stable and decreases slowly with the increase of the number of flows, whereas DCAR and FORM descend faster with the growth of the number of flows. The reason is that COPE and BLJCR require the decoding at the next hop of the coding node. CTNR-no TMM and CTNR discover coding opportunities based on CNCC, which has been proven to be necessary and sufficient. The slight descent of COPE, BLJCR, CTNR-no TMM, and CTNR is due to the wireless loss and network congestion when the network load is heavy. The MNCC of DCAR and GNCC of FORM cannot guarantee the correctness under the circumstance with two or more coded flows. Therefore, DCAR and FORM descend greatly with the growth of the number of flows. Compared with Figure 14, it is clear that the changing trend and the values in Figure 19 is close to that in Figure 14. The results in Figures 14 and 19 confirm that CTNR can improve the decoding of coded packets in both grid and random networks.

Decoded packets ratio under different number of flows in the random network.
Figure 20 illustrates the coding condition ratio of CTNR under different number of flows in the random network. It is clear from Figure 20 that the MNCC is higher than CNCC-2 and CNCC-M, when the number of flows is below 14. However, MNCC decreases sharply, CNCC-2 grows fast and CNCC-M increases slowly, with the growth of the number of flows. And CNCC-2 is higher than MNCC and CNCC-M. The reason is that when the number of flows is below 14, the majority flows are native flows and coding opportunity can be judged using MNCC. The number of native flows decreases and the number of coded flows ascends as the number of flows rises. Then the coding opportunities must be detected based on CNCC and CNCC-2 outperforms CNCC-M and MNCC. Because the requirements of CNCC-2 is less than that of CNCC-M, the coding opportunities based on CNCC-2 is far larger than that of CNCC-M.

Coding condition ratio of CTNR under different number of flows in the random network.
Compared with Figure 15, the trend of MNCC, CNCC-2, and CNCC-M in Figure 20 is the same as that in Figure 15. However, MNCC in Figure 20 begins to decrease when the number of flows is 4. In addition, CNCC-2 in Figure 20 starts to rise when the number of flows is 4. In Figure 15, the MNCC is 100%, whereas CNCC-2 and CNCC-M are both 0 when the number of flows is 4. The reason is that in the random network with higher node density, the flows more likely intersect with each other and more likely become coded flows with the growth of number of flows. Therefore, CNCC-2 in Figure 20 has an earlier increase compared with that in Figure 15.
Conclusion
The network coding conditions of existing network coding aware routings may lead to the undecodable problem of coded packets. In addition, the packets transmission scheduling is not considered in existing network coding aware routings which results in the loss of network coding occurrence. In this article, the CTNR is presented for wireless multihop network. The CNCC is given for detecting coding opportunities to avoid failed decoding problem, whereas the TMM is proposed to increase the occurrence of actual network coding. In addition, the CLRM is designed which jointly considers the network coding gain and node load. Comprehensive simulations on NS2 confirm that CTNR increases the network coding opportunities, rises the network coding occurrence, and improve the network throughput. The future work includes the implementation of CTNR on real wireless multihop network.
Footnotes
Acknowledgements
The authors wish to thank anonymous reviewers for their valuable comments and suggestions for the improvement of this article.
Handling Editor: Jinsong Wu
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This research was funded by National Natural Science Foundation of China, grant number 61502411 and 61871412, Natural Science Foundation of Jiangsu Province, grant number BK20150432 and BK20151299, Natural Science Research Project for Universities of Jiangsu Province, grant number 15KJB520034, China Postdoctoral Science Foundation, grant number 2015M581843, Jiangsu Provincial Qinglan Project, Jiangsu Provincial Government Scholarship for Overseas Studies, Teacher Overseas Training Program of Yancheng Institute of Technology, “2311” Talent Project of Yancheng Institute of Technology, Talents Project of Yancheng Institute of Technology, grant number KJC2014038, Project of Jiangsu Provincial Collaborative Innovation Center of Ecological Building Materials and Environmental Protection Equipment, grant number GX2015206.
