An Efficient Multi Parent Hierarchical Routing Protocol for WSN’s

Wireless sensor networks (WSNs) nodes are commonly designed to work with limited resources of memory, energy and processing. The routing protocol is one of the key components of WSNs and its features impact network performance significantly. We present an efficient Multi-Parent Hierarchical (MPH) routing protocol for wireless sensor networks; its main goal is to achieve reliable delivery of data in a single sink scenario while keeping low overhead, reduced latency and low energy consumption. The main features of MPH are self-configuration, hierarchical topology, persistence according to link quality, and source routing from sink to nodes. Network performance simulations of the MPH routing protocol are carried out and compared with popular protocol, AODV. Results show that for the single sink scenario, the MPH protocol has an energy saving of 35% against AODV. MPH has 27% less overhead compared with AODV. And MPH presents a 10% increase in packet delivery compared with AODV. Finally, we present a real WSN built based on the MPH protocol, which works satisfactorily, providing an experimental demonstration of the capabilities of the protocol.


INTRODUCTION
Wireless sensor network (WSN) refers to a group of spatially dispersed and dedicated sensors for monitoring and recording the physical conditions of the environment and organizing the collected data at a central location. WSNs measure environmental conditions like temperature, sound, pollution levels, humidity, wind speed and direction, pressure, etc.Wireless Sensor Networks (WSNs) are based on low-cost devices. WSNs may not rely on a predetermined structure and require the capacity of self-organization in order to deal with communications impairments, mobility and node failures. One of the most efficient topologies in information delivery is the hierarchical topology. The hierarchy levels allow packet forwarding with the least number of hops, which causes fewer errors in delivery and lower delays in the transmission of a packet from source to destination. Hierarchical protocols have scalability and robustness characteristics, providing energy savings in the network and distributing energy costs among network sensors.
The advantage of such protocols is that they carry information generally to one node, thus the communication with the coordinator or root node is simpler and more efficient. Tree Routing is a classic form of routing that is restricted to parentchild links. This scheme eliminates the need for searching and updating 1paths and the overhead associated to the establishment of those paths. However, when the networks are large and the nodes can connect and disconnect from the network due to link changing conditions, it is helpful thatthe Tree Routing scheme slightly change, offering more flexibility in assigning IP addresses to the network in order to become self-organized.
The sensing capabilities of sensor nodes may vary because, a simple sensor can perform a single simple task whereas complex sensor network may perform number of tasks. Sensor nodes can be deployed either randomly or structurally. In structured deployment sensor nodes are deployed in prioritized manner at a location of operational area where sensor measurements are needed whereas in random deployment there are no rules for placing the nodes.
An Efficient Multi-Parent Hierarchical (MPH) Routing Protocol based on link-hierarchy relationships (parents and children); it establishes operational techniques aimed at energy saving and reliable delivery of information. In the scenario of interest, all data are gathered by a powerful coordinator node that can process more information, perform more complex tasks and manage routing tables that reflect the entire network topology.
Wireless Sensor Networks (WSNs) are based on low-cost devices (nodes) that are able to get information from their environment, process it locally, and communicate via wireless links to a central coordinator node. Besides, the coordinator node might also send control commands to the nodes [1]. WSNs may not rely on a predetermined structure and require the capacity of self-organization in order to deal with communications impairments, mobility and node failures.
One of the most efficient topologies in information delivery is the hierarchical topology. The hierarchy levels allow packet forwarding with the least number of hops, which causes fewer errors in delivery and lower delays in the transmission of a packet from source to destination [6]. Hierarchical protocols have scalability and robustness characteristics, providing energy savings in the network and distributing energy costs among network sensors [9]. A great advantage of such protocols is that they carry information generally to one node, thus the communication with the coordinator or root node is simpler and more efficient [14]. Tree Routing is a classic form of routing that is restricted to parent-child links. This scheme eliminates the need for searching and updating paths and the overhead associated to the establishment of those paths [2]. ZigBee manages a Tree Routing scheme with preconfigured global IP addressing: node addresses never change [17]. However, when the networks are large and the nodes can connect and disconnect from the network due to link changing conditions, it is helpful that the Tree Routing scheme slightly change, offering more flexibility in assigning IP addresses to the network in order to become self-organized.
In this paper we propose an efficient Multi-Parent Hierarchical (MPH) Routing Protocol based on link-hierarchy relationships (parents and children); it establishes operational techniques aimed at energy saving and reliable delivery of information. In the scenario of interest, all data are gathered by a powerful coordinator node that can process more information, perform more complex tasks and manage routing tables that reflect the entire network topology. Based on the proposed MPH protocol, a network acquires a hierarchical topology since it represents an efficient way to route the information. Two highly studied and widely used protocols for WSNs are AODV (Ad hoc On-demand Distance Vector) [15] and DSR (Dynamic Source Routing) [16]. They are reactive protocols that establish routes on demand, at a given time, send information to the destination by the route with the least number of hops according to the node routing table. These protocols use two procedures to find and transport traffic packets: route discovery and route maintenance [12]. In this paper we compare AODV with our proposed protocol in base to several efficiency metrics. The rest of this article is organized as follow: in Section II, we describe related work. Section III proposes an efficient Multi-Parent Hierarchical (MPH) Routing Protocol.

RELATED WORK
Wireless sensor networks (WSNs) nodes are commonly designed to work with limited resources of memory, energy and processing. These sensor nodes are deployed over the certain geographic area to sense and gather the information collected. The wireless sensor network was developed for the application like military application, chemical pluming, Habitat monitoring, remote monitoring, etc.
Wireless Sensor Networks are based on low-cost devices (nodes) that are able to get information from their environment, process it locally, and communicate via wireless links to a central coordinator node. Besides, the coordinator node might also send control commands to the nodes. WSNs may not rely on a predetermined structure and require the capacity of self-organization in order to deal with communications impairments, mobility and node failures.
One of the most efficient topologies in information delivery is the hierarchical topology. The hierarchy levels allow packet forwarding with the least number of hops, which causes fewer errors in delivery and lower delays in the transmission of a packet from source to destination [10]. Tree Routing is a classic form of routing that is restricted to parent-child links.
A wireless sensor network is a network composed of many sensor nodes capable of sensing a phenomenon, transforming the analog data to digital and transmitting them to destination nodes (usually called sinks). Due to severe power constraints their computation capability, as well as their transmission range, are limited. Thus, for the transmission of data from a source (the node that sensed the phenomenon) to a sink (the end-node that receives the data).The wireless sensor nodes thatlie over between them, form a "path" and data are transmitted through them in a hop-by-hop manner.
Multiple routes can communicate a node and the sink [7]. The aim of energy aware algorithms is to select those routes that are expected to maximize the network lifetime. To doso, the routes composed of nodes with higher energy resources are preferred. The network lifetime maximization is another crucial objective for the wireless sensor networks. A good communication protocol needs to minimize the energy consumed for which corresponds to the total energy consumed by all nodes till each contending node has access to the medium. In other words, for WSN applications in which the transmission of all data is essential.
Here all sensor nodes participate with the same role in the routing procedures. On the other hand, the hierarchical routing protocols classify sensor nodes according to theirfunctionalities. The network is then divided into groups or clusters [2]. A leader or a cluster head is selected in the group to coordinate the activities within the cluster and to communicate with nodes outside the own cluster. The differentiation of nodes can be static or dynamic. Hierarchical tree creation algorithm runs over the topology control algorithm and only at after a node becomes a source. This algorithm consists of two main steps  Path Creation: In this step a hierarchical tree is created beginning at the source node. After the end of the topology control phase each node is able to be connected to at most six nodes which are only one hop away from itself. During this phase each node that is becoming a source node is self-assigned as level 0 and sends a level discovery message to the six neighbors selected during topology control phase. Nodes that receive this packet are considered as children to the source node and are set as level 1. Each of these nodes broadcast again the level discovery packet, and the pattern continues with the level 2 nodes etc.This procedure iterates until all nodes are assigned a level and stops when the level discovery packets reach the sink.
 Flow Establishment: A connection is established between each transmitter and receiver pair using a two-way handshake. Through this packet exchange, the congestion state of each receiver is communicated to the transmitter.
This algorithm runs when congestion is possible to occur at a specific node in the network. Since the employed topology control algorithm is able to counteract collisions in the medium by choosing the smallest transmission power (one hop nodes), congestion is still possible to happen when a node receives packets with a higher rate than it can transmit. In a wireless sensor network where all nodes, except the sink, are exactly the same, this can happen if a node is receiving packets from at least two flows, or if the nodes to which it has to transmit packets to, cannot accept any more packets.
Depending on the application, data gathering and interaction in wireless sensor networks could be accomplished on several ways. The data delivery model indicates the flow of information between the sensor nodes and the sink. The data delivery models are divided into the following classes: continuous, event-driven, query-driven or hybrid. In the continuous model, the nodes periodically transmit the information that their sensors are detecting at a pre-specified rate. In contrast, the query-driven approaches force nodes to wait to be demanded in order to inform about their sensed data. In the eventdriven model, sensors emit their collected data when an event of interests occurs. Finally, the hybrid schemes combine the previous strategies so sensors periodically inform about the collected data but also response to queries. Additionally, they are also programmed to inform about events of interest. Wireless sensor network where all nodes, except the sink, are exactly the same, this can happen if a node is receiving packets from at least two flows, or if the nodes to which it has to transmit packets to, cannot accept any more packets.A balance between performance gain in data delivery and performance degradation in applications where message ferrying is useful, delivery rate is an important metric.
An ad-hoc network is the cooperative engagement of a collection of mobile nodes without the required intervention of any centralized access point or existing infrastructure [4]. AODV supports both unicast and multicast.In AODV, the network is silent until a connection is needed. At that point the network node that needs a connection broadcasts a request for connection. Other AODV nodes forward this message, and record the node that they heard it from, creating an explosion of temporary routes back to the needy node. When a node receives such a message and already has a route to the desired node, it sends a message backwards through a temporary route to the requesting node.
The needy node then begins using the route that has the least number of hops through other nodes. Unused entries in the routing tables are recycled after a time.When a link fails, a routing error is passed back to a transmitting node, and the process repeats.Much of the complexity of the protocol is to lower the number of messages to conserve the capacity of the network. For each request for a route has a sequence number. Nodes use this sequence number so that they do not repeat route requests that they have already passed on.
Another such feature is that the route requests have a "time to live" number that limits how many times they can be retransmitted [16]. Another such feature is that if a route request fails, another route request may not be sent until twice as much time has passed as the timeout of the previous route request.AODV uses symmetric links between neighboringnodes. It does not attempt to follow paths betweennodes when one of the nodes cannot hear the other one.
The advantage of AODV is that it creates no extra traffic for communication along existing links. Also, distance vector routing is simple, and doesn't require much memory or calculation. However AODV requires more time to establish a connection, and the initial communication to establish a route is heavier than some other approaches.
The AODV Routing Protocol uses an on-demand approach for finding routes, that is, a route is established only when it is required by a source node for transmitting data packets. It employs destination sequence numbers to identify the most recent path. The majordifference between AODV and Dynamic Source Routing (DSR) stems out from the fact that DSR uses source routing in which a data packet carries the complete path to be traversed. However, in AODV, the source node and the intermediate nodes store the next-hop information corresponding to each flow for data packet transmission.
In an on-demand routing protocol, the source node floods the RouteRequest packet in the network when a route is not available for the desired destination. It may obtain multiple routes to different destinations from a single RouteRequest. The major difference between AODV and other on-demand routing protocols is that it uses a destination sequence number (DestSeqNum) to determine an up-to-date path to the destination. A node updates its path information only if the DestSeqNum of the current packet received is greater or equal than the last DestSeqNum stored at the node with smaller hop count.
A RouteRequest carries the source identifier (SrcID), the destination identifier (DestID), the source sequence number (SrcSeqNum), the destination sequence number(DestSeqNum), the broadcast identifier (BcastID), and the time to live (TTL) field. DestSeqNum indicates the freshness of the route that is accepted by the source. When an intermediate node receives a RouteRequest, it either forwards it or prepares a RouteReply if it has a valid route to the destination.
The validity of a route at the intermediate node is determined by comparing the sequence number at the intermediate node with the destination sequence number in the RouteRequest packet. If a RouteRequest is received multiple times, which is indicated by the BcastID-SrcID pair, the duplicate copies are discarded. All intermediate nodes having valid routes to the destination, or the destination node itself, are allowed to send RouteReply packets to the source. Every intermediate node, while forwarding a RouteRequest, enters the previous node address and itsBcastID. A timer is used to delete this entry in case a RouteReply is not received before the timer expires. This helps in storing an active path at the intermediate node as AODV does not employ source routing of data packets. When a node receives a RouteReply packet, information about the previous node from which the packet was received is also stored in order to forward the data packet to this next node as the next hop toward the destination.
Routing protocols use various schemes to find the best routes in the shortest time possible. Two commonly studied performance parameters in WSNs are energy consumption and delay [7]. The end-to-end delay depends on media access techniques, collisions and retransmissions. The focus of the work cited in [11] is to describe schemes of data fusion or aggregation which represent balancing and energy consumption reduction strategies. Cuomo et al. [8] analyze the network formation process and the topology with a focus on energy consumption. They vary some factors such as the number of sink nodes and their distribution along the network. They establish relationships between the number of sink nodes and the energy consumption and study static and mobile scenarios. The technique cited in [3] analyzes metrics such as packet loss, delay and energy as a measure of the quality of service in order to improve overall performance in the network. A traffic control scheme that provides a proper topology management is also explained. Regarding the study of static scenarios with connecting and disconnecting nodes, Mavromoustakis et al.,in [4], describe a scheme that balances the neighboring information network while adapting to new conditions.
The problem of unbalance links is treated in tree topology protocols that aim to minimize the packet delay and ensure the least number of hops to the root node. Load unbalance in the links which is reflected as an unbalanced energy depletion over the nodes. Reference [14] shows a method to balance network traffic and to ensure a uniform use of the routes to the destination node. Nezhad et al. [10] propose a protocol where the collector node has a global view of the network topology. In order to maximize the network lifetime, they use a load balancing algorithm to choose the best routes. In [5] a multipath routing which uses a QoS technique on ad-hoc systems is proposed in order to provide load balancing, fault tolerance, and better performance of the network for protocols such as AODV.

AN EFFICIENT MULTI-PARENT HIERARCHICAL (MPH) ROUTING PROTOCOL
The scenario to be considered here is a single sink scenario. It consists of static nodes that can send and receive information to and from the coordinator node as shown in figure 1 . The coordinator node collects all information for the nodes. All nodes except the coordinator have limited resources; i.e. energy, memory, processing. A hierarchical logic topology fits well in this scenario with the coordinator holding the highest hierarchy; routing packets from nodes to coordinator can be done easily by establishing routes where each next-hop belongs to an immediate upper level in the topology until the coordinator is reached. The nodes have neighbor tables that avoid high processing costs, and routes that can be achieved with these tables ensure the least hop number to the coordinator.

Figure 1. Neighbor discovery and routing.
We propose the MPH routing protocol that creates a logical hierarchical network topology where the hierarchy of each node is given by its location level, the lower the level the lower the hierarchy held; thus, the root (coordinator node) will have the highest hierarchy. The topology is formed with routes that minimize the number of hops from a node to the coordinator; this restriction will reduce overall energy consumption and decrease delay. MPH allows a child node to have one or more parents at the next higher level. As a result, a node can share both children and parents with another node belonging to the same hierarchical level or generation.

MPH Mechanisms
The purpose of MPH mechanism is to represent an efficient solution to the requirements such as self-configuration, rapid information delivery and low overhead and small energy consumption. Hierarchical logic construction is performed by routing protocol rules that are local to each node.So the network is configured depending on the connectivity of nodes in a certain time. In the proposed MPH protocol, we adopt a source-routing approach for traffic to be sent from the coordinator to a node because the coordinator node has more resources than the rest of the nodes.Although the nodes are fixed, connectivity presents dynamic features due to changing conditions of the radio channel, interference or physical damage of nodes.The auto-configuration capability will allow the network to recover from the aforementioned events, offering a robust and uninterrupted service and maintains the neighbor tables updated.

Neighbor discovery mechanism:
The neighbor table maintaining process is originated by a ND (Neighbor Discovery) packet transmission. The sending and receiving nodes can update their neighbor tables with the respective addresses once each node receives the corresponding acknowledgment. ND packets are delivered at regular specified intervals, so that nodes rediscover their neighbors at this interval. The response to a ND packet is called NDR (Neighbor DiscoveryResponse) and the response to a NDR packet is another packet called NDRACK. Both, the NDR and NDRACK packets contain node hierarchy information.

Node hierarchy update mechanism:
Each time a node is involved in a neighbor table maintenance process, it should be checked if it maintains its hierarchy or if it is going to change it. The rule is that the node should have a hierarchy one unitlower than his parent node(s), therefore, the node will select as a parent a neighbor node having the highest hierarchy among the registered nodes in the neighbor table. It can choose more than one parent if several neighbor nodes satisfy this condition. Moreover, if a node has no neighbors or all neighbors havezero hierarchy it will have zero hierarchy too. This situation can occur in the network initialization transitional stage when there are nodes that still have zero hierarchy.

Reactivity ND packet mechanism:
This mechanism is valuable in dynamic networks, where this dynamism generates topology changes. A node changes its hierarchy as a result of updating its neighbors, before a period (regular specified interval) is completed. Then, the process to discover neighbors, sending a ND packet, is done when the topology changes. The purpose of this mechanism is to reduce the time in which nodes update their hierarchies, especially when extreme conditions occur due to loss of critical links in the logical topology. This will diminish auto-configuration network delays and reducethe packet loss problem by disconnecting links.

Persistent nodes mechanism:
Some nodes do not respond to every ND packet. This can be due to packet collisions or low quality links, among other causes. To prevent unreliable changes, caused by node faults, in the neighbor tables we use a scheme that employs a slow erasure of a neighbor node and uses variable called neighbor persistence. Prior to the transmission of a ND packet, persistence is reduced by 1 for every registered node in the neighbor table. If a NDR packet is received from a neighbor, persistence takes a maximum value p. Therefore, if after successive ND packet emissions the origin node did not receive any NDR packets from the node that initially had persistence p, then the route to this node is erased from the table. This mechanism solves the problem of inconstant changes in the neighbor tables. This problem can be caused by the momentary disconnection of the nodes.

Source routing mechanism:
This mechanism is used to route packets from the coordinator node to any node in the network. The coordinator node builds the whole topology of the network after it gathers the neighbor tables from the nodes. Then, the coordinator node is able to specify the complete path to be followed by the packet to reach its destination.These are the mechanisms of MPH Protocol, after discovering neighbor nodes for each node, we transferring the data packets from source to destination by using their neighbor nodes.

Figure 2. Flowchart of MPH protocol
We consider the following five important metrics that are indicative of network performance: delay, energy consumption, delivered packets, overhead and availability of routes.

1) Delay:
The time a packet takes to reach its destination is variable due to several factors, for instance: the transmission speed, the packet size and the delay of the packet in each hop in the route. Collisions and packet retransmissions also increase the end-to-end delay. The delay is related to the network complexity. The MPH protocol, through the election of a hierarchical topology, produces a reduction of the delays in the information delivery process. It is important to consider the delay involved in reorganizing the network due to changes in connectivity, for example due to new nodes or nodes that switch off or are faulty.

2) Energy consumption:
When MPH is used, nodes store neighbor tables, and routing is done via the optimal route. Therefore, this protocol provides large energy savings thanks to multi-parent routes. As shown in Figure 3, where we observe that AODV use more total energy than MPH because they require more routing overhead, which causes more collisions and retransmissions. ZTR does not carry out a discovery mechanism but it has less available links and does not guaranteed that those are the shortest routes, so, sometimes it needs more hops. A u g u s t 0 1 , 2 0 1 5 3) Overhead: Reactive protocols such as AODV have low overhead because routes are discovered only when they are needed. However, MPH use fewer control packets, thus nodes have low processing and simple management of neighbor tables. Therefore, MPH maintains neighbor tables with less control packets.

4) Packet delivery ratio:
We took a radius of 10 m and analyzed the percentage of delivered packets for AODV and MPH. The value that this metric takes is a consequence of the ability of a routing protocol to reorganize the network. Besides, if the number of hops the packets pass through is smaller, there will be fewer errors in the information delivery.

5) Availability of routes:
Reliable or valid routes are the routes that are active and can be used by nodes to send packets. These routes may expire (according to the routing protocol) or may disappear from the tables due to disconnections of neighbor nodes. The most reliable routes will ensure more reliable delivery of information.

Screenshot 1. Random deployment of sensor nodes
The screenshot.2 shows how the sensor nodes are deployed randomlyby using randomize() function and those nodes have their own properties like id, size, location and color. To generate sensor nodes we have given some range for location and it will generate nodes within that given range only. After that we choose the coordinator node, then finds its neighbor nodes to transmit packets from source to destination.

Screenshot 5. Graph for number of nodes v/s time taken (with damage node)
In screenshot.5 we are plotting graph for number of nodes v/s time taken for without making damage node. It displays time taken to reach from its source to destination for given number of nodes.

Screenshot 6. Graph for number of nodes v/s time taken (without damage node)
In screenshot.6 we plotted graph for numberof nodes v/s time taken with making damage node. It displays number of nodes in x-axis and y-axis as time taken. The value that metric takes is a consequence of the ability of a routing protocol to reorganize the network. Besides, if the number of hops the packets pass through is smaller, there will be fewer errors in the information delivery. When MPH is used, nodes store neighbor tables, and routing is done via the optimal route. We observe that AODV uses more total energy than MPH because it require more routing overhead, which causes more collisions and retransmissions.

CONCLUSION
In MPH, the coordinator node can be aware of approximately the whole topology due to the source routing mechanism.So MPH has the facility that the coordinator node can accessany node to send information, statistics or measurementsrequests. While in AODV the coordinator has todiscover the route to a specific node if it does not have it.MPH protocol has less control packets, therefore less overhead,resulting in fewer collisions, so there will be less packetretransmissions compared with AODV. Moreover,this is reflected in the energy saving metric from MAC layer.The multi-parent concept avoids thisproblem without generating a very high overhead.
Results for MPH protocols are encouraging because thisprotocol has good performance in terms of processing, fastand efficient information delivery and energy conservation. Protocol such as AODV is very efficient in termso backup routes and connectivity from any node to any nodein the network.The combination of a hierarchicaltopology with selfconfiguration and maintenance mechanismsof the MPH protocol makes the nodes optimize networkprocesses, reduce delays, take short routes to the destinationand decrease network overhead. All this is reflected in thesuccessful delivery of information.