A Multicast Algorithm for Wireless Sensor Networks Based on Network Coding

We propose a set of distributed algorithms for improving the multicast throughput in wireless sensor networks. To this end, network coding is applied when exploiting path diversity with two disjoint paths to each multicast group receiver. We depart from the traditional wisdom that the multicast topology from source to receivers needs to be a tree and propose a novel and distributed algorithm to construct a 2-redundant multicast graph (a directed acyclic graph) as the multicast topology, on which network coding is applied. We conduct both analytical and simulation-based studies to evaluate the effectiveness and performance of our algorithm.


Introduction
Multicast mechanism is mainly used in sink nodes to send control messages to the sensor nodes in wireless sensor networks (WSNs), or in a sensor node to send data to multiple sink nodes.Multicast routing algorithm plays a vital role in WSN regarding the survival time and transmission efficiency of the WSNs.
Ahlswede et al. proposed network coding [1][2][3] in 2000.This method is useful for greatly improving the network throughput and reliability.Literatures [4,5] have proved that in each multicast diagram, corresponding linear coding can be found to achieve minimum cut-maximum flow.Zhu et al. [6] found that the network coding has good performance and advantage in multicast network, but the network topology has different effect on the throughput and bandwidth of multicast; redundant multicast figure presented better efficiency and performance than the traditional multicast tree.
Jiang et al. [7] proposed a multicast tree algorithm through network coding, determined the relationship between cluster heads, and analyzed the algorithm performance using network calculus.Yuan et al. [8] analyzed the performance of network coding by the stochastic process.Li et al. [9] analyzed the end-to-end route delay performance based on the network coding using network calculus.
According to the WSN characteristic, considering the geographic and energy-aware routing (GEAR) [10], we constructed k-redundant multicast graph in the form of overlay network in this paper using the multicast algorithm based on network coding (MABNC).We improved the multicast performance by reducing the energy consumption.

Algorithm Description
The proposed algorithm is for sensor networks.Based on the geographic routing algorithms, k-redundant multicast graph was constructed.The network throughput and bandwidth utilization were improved, the effect of minimum cut to maximum flow was determined, and the network multicast routing performance was enhanced by utilizing the network coding mechanism.Definition 1. Redundancy multicast figure: redundancy multicast figure is a directed acyclic graph with a single multicast source node and has the following two properties.
(2) Each side has a unit Bandwidth;  in-degree for the receiving node   , whose independently maximum flow is .The independent maximum flow refers to the maximum flow through the source node  to the receiving node   .
Figure 1 shows that among the WSN nodes, the gathering and sensor nodes formed wireless sensor multiple hops selforganizing network through hierarchical forwarding and were connected; the first layer comprises the gathering node, the second layer comprises the cluster head node, and the third and fourth layers comprise the common sensor nodes.Figure 1 can be further decomposed into k-redundant multicast figure.Figure 2 shows that the gathering node can be the multicast source node , the second and third layer nodes can be the multicast transit nodes, and the ordinary sensor nodes can be the receiving nodes.In this paper,  = 2.For the 2-redundant multicast figure, the key is how to build k-redundant multicast figure and how network coding can be reasonable.

Building and Maintaining k-Redundant Multicast Figure.
Building k-redundant multicast figure needs to satisfy the following conditions to ensure the performance of multicast routing: (1) ensure minimum energy consumption; (2) build k-redundant multicast path from the source node  to the receiving node ; (3) guarantee the minimum amount of transit nodes built from the source node to all of the receiving nodes; (4) maintain the least link load stressed to ensure the minimum times being forwarded on the same physical link of the same packet.
The whole process can be divided into three steps as follows: (1) build a preliminary figure that can contain all nodes; (2) simplify the preliminary figure to k-redundant multicast figure ; (3) combine the receiving node .

Building Preliminary Figure.
In building a preliminary figure, when a new node joins a preliminary diagram, GEAR mechanism is used.The nearest preliminary node will be chosen to lead the joining of preliminary to be transshipment node and form the preliminary figure of each node, as shown in Figure 3(a).

Building k-Redundant Multicast
where , , and  are the normalized parameters,   is the distance between two nodes, Bandwidth is the direct bandwidth of the two nodes, and Latency refers to the time delay between the two nodes.The quality assessment of the entire link is In Formula (2), the minimum Bandwidth side should be the evaluation value when evaluating the path Bandwidth because in the path, only the flow of the minimum Bandwidth edge can be the maximum flow of the entire path.
In WSNs, as the sensor nodes join or quit dynamically, the network topology changes.The preliminary figure also changes.The path quality evaluation and calibration can be performed periodically.When a better path occurs, the existing path must be replaced with the better path to guarantee at least two or more unmutual crossed best route paths from the receiving node  to the source node .
To transform the distributed graph into 2-redundant multicast figure, according to the definition requirements of 2-redundant multicast figure, the following requirements must be satisfied.
(1) In multicast figure, the degrees (i.e., the sum of indegree and outdegree) of all nodes, including the source node , the transmitted node , and the receiving node , should not be greater than Δ, where Δ is the number of the multicast figure layer and is the height of the tree.As shown in Figure 3 (3) degree() ≤ Δ, and 1 ≤ indegree() ≤ .
(4) If the child node of the transfer  is the receiving node , then the transfer  child node's number is not greater than Δ − 1 − indegree().
The fourth rule is used to ensure that at least one outdegree's value of the transit nodes is vacant for adding new

Receiving Node to Join.
Given the low energy of node and the complex network environment of WSNs, the node failure or sleep scheduling causes rapid changes in the network topology.Therefore, the flexible mechanism of the receiving node is needed to join.The node that can receive the joining node is defined as the transiting node of leave.Definition 3. The transiting node of leave denotes that its child nodes are not the leave nodes in the multicast figure.As shown in Figure 4, U3, U4, U5, and U6 are all the transiting nodes of leave.Definition 4. Saturated node: in the transiting node of leave, if the degree is degree() = Δ − 1, then the node is a saturated node, such as U4 and U5 nodes in Figure 3. Otherwise, it is an unsaturated node, such as U3 and U6 nodes.
The receiving node  to join the process of multicast is also added to the tree that consists of the transfer nodes in Figure 4.The process can be divided into two steps as follows: (1) finding the proper unsaturated node to join in the tree; (2) finding  that does not cross paths connected to the source node .Two mutually cross paths (Pf and Ps) must be built when the node  connects to the multicast diagram.Let uf be the father node of  in the path of Pf. Specific algorithms are presented in Algorithm 1.
Pf is the path of the receiving node to the source node.The following setup of another path Ps with Pf is not the path of the cross, as shown in Algorithm 2.

k-Redundant MABNC.
We established  redundant multicast diagram with a special topology based on the above work.The basic characteristic is that every receiving node has  paths.According to this characteristic, we designed a distributed networking coding mechanism to optimize the performance of the wireless sensor multicast.The maximum multicast traffic can be obtained under the same conditions.
In network coding, each transiting node assigns the appropriate coding vector according to certain rules to encode the forwarding data.The receiving node decodes the original data when it collects enough data and coding vector.Data are then received.The core key of this process is to distribute suitable coding vectors to each relay node.
In the tree of k-redundant multicast diagram, for example, 2-redundant multicast, each receiving node has two mutually crossed paths to the source node .The source node  sends the data  and  in parallel at the same time.
The encoding is mainly conducted on the relay node   , and the receiving node  can receive the coding vector and coding data at the same time.The source node  generates and distributes each relay node with the suitable coding vector.The generated function of coding vector is expressed as ().The coefficient generation is elucidated in [4].The encoding vectors are assumed as follows: , ( 2 ,  2 )  , . . ., (  ,   )  } .
The core problem in the whole process is that how to make the relay node assigns the appropriate coding vector.The relay node is divided into the following two classes for processing: (i) the relay nodes of indegree 1: as codes are not needed currently, the code vectors must be assigned; (ii) the relay nodes of indegree 2: the encoding vector is .Thus, for data  and  that passed through , the code is (, ) is then sent to the outside of the path.
The distribution of transiting node coding vector is divided into two stages, namely, the distribution and diffusion phases.Generated by the source node , the corresponding distribution vector is assigned to each relay node.According to Algorithm 3, the source node  distributes the network coding vector to each node in the multicast diagram.The relay node has two indegrees that respond to the request and only one indegree that does not respond to the request.Assuming that a node responds to the request, the node  generates  +  coding vectors, where  coefficient vectors are sent to  requesting nodes and  is the source node   number of child nodes.As shown in Algorithm 4 at the diffusion stage, the source node  first distributes  coding vectors generated at the distribution stage to   nodes of child.The child nodes will further distribute the coding vectors to its downstream nodes to diffuse.In the process, the following two types of nodes are needed to handle: (i) node  of indegree 1: when receiving the coding vector (  ,   )  from its parent node, the encoding vectors ():  =   ,   =   are set; (ii) node  of indegree 2: the node  is already at the distribution stage ():  =   ,   =   .From two Proof.Two mutually disjoint paths  and  exist according to the construction of 2-redundant multicast tree after the source  multicast forwarded the date (, ).Given that the source node  is linearly independent, ( 1 ,  1 )  , ( 2 ,  2 )  , . . ., (  ,   )  is generated when coding vector.The assumption that the node  from two paths of encoded data is linearly independent can be proved if the two paths of the transit node coding vectors are proved to be linearly independent.

k-Redundant Multicast Algorithm Complexity Analysis.
The entire network node number is assumed as  from the preliminary figure to construct multicast tree.The main work is to build a tree diagram, of which the whole process is similar to the Bellman-Ford algorithm.The complexity is expressed as (), where  is for the entire figure on the number of nodes , and  is used to determine the number of edges.The overall complexity of the algorithm is ( ∧ 2).
The main task of the receiving node joining is to find neighbor nodes.The number of control message is about ( ∧ 2).The receiving node in 2-redundant multicast figure finds suitable unsaturated node.The search process is aimed to find tree.The worst case is (log ).

Network Coding Complexity Analysis
. By distributing phase in the entire coding vector, the initialization of message transmission is the broadcasting of multicast tree.The number of packets is ().A total of  messages are in response.The message number is ().The diffusing phase of coding vector is to spread from each relay node to the child nodes.The number of packets is 2, so that the overall number of message is ().
In the aspect of time delay, the maximum delay from the source node  to the receiving node is .The source node  in the coding vector distribution stages sets the timing to 2 and initializes the broadcast message for ; thus, the overall worst case is 3.During the diffusion stage,  is assumed as any two nodes' maximum delay in the multicast figure.As the distributed algorithm is used, the extension of coding vector is generally not greater than .Accordingly, the overall coding time delay is ().the experiment are shown in Table 1.The topology of the network simulation is shown in Figure 6.

Simulation Analysis.
The comparative analyses of several aspects, such as the average energy consumption of nodes, end-to-end delay, and packet loss rate, with the traditional multicast mechanism based on tree and the tree multicast mechanism based on network coding are conducted.
(1) Average Energy Consumption of Nodes.The node energy consumption is that in WSNs, the average energy consumption in the node running is computed as follows: average where  is the number of sensor nodes.As shown in Figure 7, the whole simulation ran for 256 s.The first 120 s is for the building of multicast topology.At this time, the energy consumption is more in the three algorithms.The following 136 s is for the data's multicast process.Based on the simulation curve, the computational cost of the MABNC algorithm of multicast figure based on network coding increased compared with the traditional multicast mechanism based on tree and tree multicast routing algorithms.However, the data retransmission times are effectively reduced and smaller energy consumption is yielded by using the network coding mechanism.Literature [11] indicates that in the sensor network, the bit data of energy consumption that the node sent is equivalent to 1000 times computing.Using the network coding can reduce the number of nodes sending data effectively.Compared with the tree routing mechanism based on network coding, the building and multicasting are more concise by using k-redundant multicast figure and can achieve the maximum theoretical flow of multicast routing.
(2) End-to-End Delay.Overall, the simulation running time is 1000 s.The first 120 s is for building a multicast topology, and the remaining time is for multicasting.As shown in the simulation Figure 8, the tree-based multicast routing mechanism of time delay is the largest.The second is the multicast mechanism by using the mechanism of network coding.As the sensor network nodes change dynamically, the topology is not stable.The tree-based multicasting mechanism needs to maintain and adjust tree and influences the performance of multicast.In the multicasting mechanism of k-redundant based on network coding, the time delay centered in three kinds of algorithm of end-to-end delay.The tree multicasting routing based on network coding has the best performance.After using  redundant, as a result of overlay routing, a bottom support of GEAR is needed and sometime delay is spent.
(3) Rate of Packet Loss.The rate of packet loss is the index of robustness to reflect the multicast routing algorithm.As shown in Figure 9, in the three kinds of multicast routing mechanism, the packet loss rate is higher because the sensor network environment is complicated and rapid changes exist in the network topology.The algorithm of k-redundant multicast routing has the least rate of packet loss.As k-redundant algorithm uses the idea of multipath, the network robustness is slightly better than the other two kinds of routing.

Summary
This paper aims to design the requirements of multicast routing protocol based on WSN as follows: energy efficiency, expandability, robustness, and fast convergence.Based on network coding, k-redundant multicast protocol is proposed and its working process is described.The routing protocol  is simulated at the platform of NS2.31.The simulation result indicates that the protocol routing has lower rate of packet loss, small delay, and relatively low cost of the entire network nodes.

2
International Journal of Distributed Sensor Networks