PERFORMANCE OF RPL PROTOCOL BASED ON NEW OBJECTIVE FUNCTION FOR IOT- WSN

The development of routing protocol to manage energy consumption of wireless sensor devices is one of the active research areas. The main challenge is the resource constraint (e. g. energy). In Internet of Things ( IoT) , the devices operate in the presence of these limitations. Thus, an energyefficient routing protocol is required. Routing Protocol for LowPower and Lossy Network (RPL) is already introduced to enable IoT over Wireless Sensor Network. In this paper, a modified routing protocol depending on the maximum number of parent objective function ( MNPOF) is proposed. MNPOF uses a new node metric called Neighboring-metric ( Nmetric). The proposed protocol is called MNP based on Remaining Energy ( MRE) that combines N-metric with the node remaining energy metric for all nodes to the root node to select the preferred path. The results showed that MRE achieved up to 94% energy saving compared to RPL protocol in medium and large scale networks, while a reduction of about 33% in average remaining energy in small scale network. MRE showed considerable reductions in the average delay and the number of dead nodes combined with improvements in throughput, number of control messages, and number of switching parents for large scale network. keywords: Routing protocols, WSN, IoT, RPL, Objective function.

and node Energy metric are used. The results showed that, based on the energy objective function, the power consumption is decreased by about 28% and the stability ( number of switching parents) is lower than that of ETX by about 1.3% [6] .
A new parent selection mechanism (uses ETX, expected transmission time ( ETT) , and the remaining energy ( RE) of the node) is suggested to balance the workload among parents and to improve the lifetime of all meters in the network. An improvement in the Packet Reception Ratio ( PRR) , the meters lifetime, and the parent workloads are achieved [7] . In Ref. [8] , the authors used new metric that combines the energy consumption of a node with ETX for all paths to the root. The results showed that the proposed scheme performed better than RPL in terms of energy consumption, delay, PRR, and the number of dead nodes. When the number of nodes is increased, the performance of RPL and that of previously introduced protocols are degraded. In the present work, MNP based Remaining Energy ( MRE) routing protocol is proposed that uses both the N-metric and the node remaining energy in the parent selection process to improve the performance when the number of nodes is increased. In the present work, MNP based Remaining Energy ( MRE) routing protocol, both the Nmetric and the node remaining energy are involved in the parent selection process. The study here uses a novel approach where the number of control messages and switching parents in the network, in addition to other performance measures, are considered in the MRE routing protocol. The remaining parts of the paper are organized as follows. Section II describes the routing protocol for Low Power and Lossy Network ( LLNs). In Section III, the proposed protocol is presented and the simulation tests results are shown in Section VI. Section V covers the main concluding remarks of the work.

II. ROUTING PROTOCOL FOR LOW POWER AND LOSSY NETWORK
The routing algorithms or protocols can be classified based on different parameters as shown in Fig. 1 [9] , [10] . The routing algorithms that depend on maintaining routing information ( routes establishment) can be classified into proactive, reactive, and hybrid routing protocols as shown in Fig. 1. The Proactive routing protocols always keep route information in the routing table at any time and used static network as the topology is fixed most of the time [9] . The standard RPL protocol is a proactive routing protocol used for LLNs application requirements. RPL constructs its Destination-Oriented Directed Acyclic Graphs ( DODAG) topology using an Objective Function ( OF) [3]. The objective function identifies the method used to construct one or more DODAG topology and how RPL nodes update routes and calculate ranks [11] . RPL OF identifies neighbors set, parents set, and preferred parents set nodes based on specified routing metrics and/ or constraints [11]. In RPL, the DODAG topology construction and maintenance are controlled by control messages ( ICMPv6 information messages) : DODAG Information Solicitation ( DIS) , DODAG Information Object ( DIO) , Destination Advertisement Object ( DAO) , and Destination Advertisement Object Acknowledgment ( DAO-ACK) as shown in Fig. 2 DIO message is multicasted periodically with information about the topology. Fig. 3 shows the DIO message format [11]. Each DODAG identify itself by DODAG ID which is an IPv6 address ( 128-bits) given to DODAG root. The identified set of DODAGs is called a RPL Instance. Each RPL instance identifies itself by RPLinstanceID. The details about DIO message format can be found in RFC6550 [11]. RPL supports constraint-based routing applied to both the nodes and the links. If a node or a link does not satisfy a required constraint, it is pruned from the candidate neighbors set leading to a constrained shortest path as defined in RFC 6550 [11]. The set of supported link/ node metrics and constraints are specified in RFC 6551 [12].  of Parents objective function. This objective function uses N-metric which is the node metric that allow RPL to find the best path from the nodes to the root based on N-metric. The N-metric represents the number of parents for each neighbor node. In N-metric, the preferred parent ( p-p) of a node is the neighbor node having maximum N-metric among available neighboring nodes. If there is no other neighbor node that has equal or more than the N-metric of p-p, the node will not switch its p-p until the p-p dies. MRE combined the N-metric with RE of each node called N-metric and RE metric ( NE) , where the node selects the path with maximum NE to be the preferred path to the root. Node-I will choose node-F as the preferred parent and the path I-F-C-A as the preferred path. If any node belonging to the preferred path consumes 1% of its energy, the NE value for this path will be changed and may become less than other paths. The node in this case needs to update the NE value for each path. This may result in changing the preferred path of the node.

A. Operation of MRE
MRE operates as in RPL, the root/ sink node multicasts DIO message to its neighboring nodes. DIO message contains the N-metric and RE of the node. The neighboring nodes are waiting for the DIO message to join the network. When a root neighboring node receives DIO message, it will directly select the root as a preferred parent ( p-p) by sending back a DAO message. Then, it multicasts DIO message to its neighbors, including N-metric, RE, and NE value ( i.e combined value of RE metric and N-metric). If the DIO message is first received by the receiving node, the receiving node will directly select the sender node as p-p. If the DIO message from a new neighbor is received, it checks the NE value in the DIO input message and then it selects a new p-p node among the available parent candidates with the maximum NE value. Each node has one or more neighbors. For each neighbor, the node calculates the path metric ( NE value) and multicasts the new value to its neighbors. If two paths have the same NE value, the node will select the first path and keep the second one as an alternative path. The flow chart of MRE operation is shown in Fig. 5. If the node does not receive the DIO message, it will multicast DIS message to its neighbors. This is also happening when a new node wants to join the network. The receiver of DIS message will reset the trickle timer based on trickle timer algorithm and then multicast DIO to the requested node. The trickle timer mechanism is used by MRE to detect and respond to network instability and inconsistency. The instability includes: rank change of a node, detection of routing loops, and first time the node joining a DODAG. This mechanism is used by RPL DIO message to determine the frequency of sending messages in the network [13].

B. Metric calculation
In the topology construction process of MRE, each node performs the following: 1) Determining the path metric for all neighbor nodes based on combined metric N E.
2) Frequently, updating the N -metric of each neighbor in every time the node received DIO message.
If the node sends a message for the first time, the N-metric is given by the number of parents of each node. The node then updates its N-metric and sends it accordingly. The N E value for each node is then calculated using the following equation: Each node updates its NE value (called N E new ) and sends it within DIO message in the form of accumulated N E value of the given path to the sender node as given by Eq. 2 whereN E path represents the accumulated value of N E through the given path, k is the number of nodes reside in this path, n is the order of the last node in the path.

IV. SIMULATION TESTS RESULTS
There are many real time operating systems exist to enable the implementation of IoT-WSN applications [14]- [17].
Contiki OS based on Cooja emulator is used in the work to implement and test the performance of the proposed protocol.
Contiki OS is widely used searchers to implement WSN scenarios that supporting IoT [14]. The emulation parameters are shown in Table I

A. The average remaining energy test
For the fixed number of nodes test using different areas of 100 × 100, 150 × 150, and 200 × 200m 2 , the results are shown in Fig. 6, Fig. 7, and Fig. 8, for 20, 40, and 80 nodes, respectively. These figures show that, for 20 nodes RPL is better than MRE in terms of consumed average energy (i. e. RPL reserved more remaining energy) for all areas tested. For 40 and 80 nodes ( Fig. 7 and Fig. 8, respectively), the average remaining energy of MRE is more than that of RPL. Such improvement is about 7% for medium area (150 × 150m 2 ) with 40 nodes. As mentioned previously, the main drawback of RPL is its degraded performance as the number of nodes is increased. For MRE, better performance is achieved due to the dependency on M-metric in the preferred parent selection. As the number of nodes increased, each node will have more than one neighboring nodes that are expected to be a preferred parent for such node. For the case of fixed area test, the results for 150m × 150m using different number of nodes are shown in Fig. 9. It can be seen that MRE is better than RPL for the cases of 40 and 80 nodes, with improvement of 6% and 29%, respectively, in the average remaining energy.
There is no improvement in the case of 20 nodes since in this case each node has small number of neighboring nodes to serve as parents.  Fig. 10, Fig. 11, and Fig. 12, for 20, 40, and 80 nodes, respectively. These figures show that, for 20 nodes, MRE doubles the number of dead nodes in all areas when compared to RPL. This is because each node has small number of candidate parent nodes and these parent nodes maybe used by other nodes in the network as p-p, thus consume energy faster and die early. For 40 and 80 nodes ( Fig. 11 and Fig. 12, respectively), the number of dead nodes decreased compared to RPL in all areas. Considering fixed area test, the results for 150m × 150m using different number of nodes are shown in Fig. 13. For 20 nodes, RPL has lower number of dead nodes compared to MRE. When the number of nodes increased, the number of dead nodes in MRE is reduced by about 6% and 11% compared to RPL for 40 and 80 nodes, respectively.

C. The average time delay results
The average time delay is the average time taken to send the packet from the source node to its destination for all nodes.
For the fixed number of nodes test using different areas of 100 × 100, 150 × 150, and 200 × 200m 2 , the results are shown in Fig. 14 for 40 nodes. In small area, it can be seen that the RPL showed higher average-time-delay compared to MRE.
In small area, MRE shows less average delay compared to RPL by about 20%, while the average delay is increased to about 22% in a medium area compared to RPL. RPL experienced higher delay compared to MRE by about 31% in a large area. Thus, MRE presented better average delay in large area. For the case of fixed area test, the results for 150mX150m using different number of nodes are shown in Fig. 15. When 20 nodes are used, MRE approximately showed the same delay as RPL. For 40 nodes, the average delay increased in MRE by about 22% compared to RPL. While for the case of 80 nodes, RPL has higher average time delay compared to MRE by about 59%. In RPL, the average time delay increased as the number of nodes is increased for fixed area.

D. Packet reception ratio results
PRR is tested using different number of nodes for fixed area of 150m × 150m. Increasing the number of nodes usually affected PRR of the given protocols. Fig. 16 shows the PRR for 150m × 150m area with different number of nodes ( 20, 40 and 80). MRE achived the same PRR as RPL in small and medium number of nodes. In large network, MRE showed better PRR than RPL by about 3%. If the child messages did not reach the root due to intermediate nodes died, the PRR will be reduced.

E. The throughput results
The throughput represents the number of successful reception of message packets per second received by the destination node. Fig. 17 shows the throughput for network area of 150m × 150m. For 20 nodes, MRE achived the same throughput as RPL. While for 40 nodes, the throughput is decreased in MRE by about 10% compared to RPL. When the number of nodes is increased to 80, MRE achieved more throughput than RPL by about 46%.

F. The number of control messages results
The number of control messages represents the number of ICMPv6 information messages that flow in the network during the test period. These messages are used to construct and maintain RPL DODAG topology. Also, the nodes exchange DIO and DAO messages in the parent selection and parent switching processes. Fig. 18 shows In general, the node switches its preferred parent to select the best energy-efficient or link quality parent to avoid the dead of parent node due to energy consumption or number of retransmissions when the link quality is bad. It is worth to mention that, the extra number of switching may increase the consumed energy, but this is relatively small compared to the consumed energy and so not covered by the present work.