Design of an Efficient RPL Objective Function for Internet of Things Applications

Over the decade, a rapid growth in use of smart devices connected and communicating over the Internet is seen in various domains. The IPv6 Routing protocol for Low power and Lossy Networks (RPL) is the routing backbone of such IOT networks. RPL is a proactive, distance vector protocol which constructs the routes based on an Objective Function. The performance of RPL protocol largely depends on the design of Objective Function. Depending on application requirements, the RPL standard offers flexibility in design of the objective function and scope for improving the routing process. In this paper, an efficient Objective Function, RPL-FZ, is proposed. Speedy communication across nodes, low energy consumption and reliable data delivery is key to achieve quality of Service. Considering this, RPL-FZ uses relevant metrics like Residual Energy of Node, Delay and ETX (Expected Transmission count) to make the routing decisions. The metrics are combined using fuzzy logic technique to obtain a single metric Quality for each neighbor node. The neighbor with highest value of Quality is chosen as best parent to forward sensed data toward the collection unit. The proposed objective function RPL-FZ is integrated in the Contiki OS and network simulations are performed using the COOJA simulator. The performance evaluation reveals that RPL-FZ achieves 7% higher Packet Delivery rate, 8% lower energy consumption and 8% lesser latency as compared to single metric based standard objective functions OF0 and MRHOF. Keywords—Internet of things; low power Lossy Networks; IPv6 routing protocol for LLN; objective function; fuzzy logic


I. INTRODUCTION
The Internet of Things finds application in Automatic Meter Reading, Industrial Monitoring, Healthcare, Home automation, Surveillance and Weather monitoring. The sensor nodes employed in these networks have limited processing capability, constrained memory and are battery powered [1]. The links which connect the nodes support low data rates and have comparatively lower packet delivery ratios. These networks support multipoint-to-point, point-to-multipoint and point-to-point data traffic. When deployed in practical application field, these networks can scale to density of over thousand nodes. Such unique requirements classify an IOT network as a Low power and Lossy Network. The design of Routing protocol for these networks is a challenging task. The conventional routing protocols designed for Wireless Sensor Networks, ADHOC networks and MANETs are not suitable to adapt to the lossy and dynamic nature of these networks. To cater to the specific requirements of these networks, the IPv6-Routing Protocol for Low power and Lossy Network (RPL) [2] were proposed by the IETF ROLL working group.
RPL is a distance vector routing protocol which creates Destination Oriented Directed Acyclic graphs (DODAG) identical to tree topology. These DAGs have a Root node, which is generally the border router or gateway, and all other nodes in the network direct their data towards the root node. The Root node initiates the DODAG construction by broadcasting a DODAG Information Object (DIO) message to all neighboring nodes. The DIO message holds network sensitive information like DODAG ID, RPL Instance ID, Objective Function, metrics, constraints and Rank. When a particular node receives a DIO message from a neighbor, it adds the sender nodes routing related info to its parents list as a candidate parent node (CPN). A best parent will be chosen from the candidate parents list to forward the data to the DODAG root. The selection of preferred parent node is governed by the metric specified in Objective function. RPL standard lists two objective functions, OF0 [3] and MRHOF [4]. The objective function MRHOF (Minimum Rank with Hysteresis Objective Function) utilizes the link quality metric-ETX (Expected transmission count) to decide the preferred parent and best path to root. Whereas, OF0 (Objective Function Zero) uses hop count as a decision criterion. Both the Objective Functions (OF) rely on a single metric to make the best parent choice. Once the best parent is selected, the node will compute its own Rank with respect to its parent Rank. The DODAG root has the lowest Rank and every other node computes a rank which increases proportionately with its distance from the root node. Every node transmits the updated DIO message to its neighboring nodes. A Destination Advertisement Object (DAO) message is sent by nodes, except the root, to advertise their addresses and prefixes to their parents and to populate the routing tables with prefixes of their children. A node which has newly joined the network can solicit a DIO message form its neighbour using a DODAG Information Solicitation (DIS) message. The DIO message transmission is triggered by the expiration of a Trickle Timer. To reduce the control overhead the trickle timer interval is doubled after a DIO is transmitted. Fig. 1 shows a DODAG and the routing messages in the network.
The routing mechanism and data forwarding techniques in RPL is simple and flexible to suit various applications. RPL utilizes minimum memory for routing table information and minimizes routing signalling. It is included in powerline communications like G3-PLC and in Zigbee IP specifications [8].
228 | P a g e www.ijacsa.thesai.org To improve the performance of a RPL based network, the following contributions are presented in this paper: 1) An efficient Objective Function RPL-FZ, which makes routing decisions and best parent selection based on three metrics namely Residual Energy (RE), Delay and ETX (Expected Transmission Count) is proposed. Fuzzy logic is a very popular technique for Multi criteria decision making. These three metrics are combined using Fuzzy logic process to compute a single metric Quality. A node will compute the Quality values of every neighbor depending on Residual Energy, Delay and ETX values. The neighbor with maximum Quality is chosen as the preferred parent node for forwarding data to the root. The fuzzy Inference system is triggered at every node upon receiving a DIO message.
2) The designed Objective function RPL-FZ is extensively tested in COOJA simulator of Contiki OS by varying network density from 70 nodes to 100 nodes and increasing the data transmission rate from 2 packets/min to 10 packets/min. Improvement in Power consumption, Latency and Packet Delivery Ratio is observed in comparison to the RPL standard Objective Functions OF0 and MRHOF.
The paper is organized as follows: In section II, similar work done by other researchers is reviewed. In section III, detailed design of the proposed Objective function RPL-FZ using the fuzzy logic process is presented. In section IV, the effectiveness of the Objective function RPL-FZ is assessed through simulations. In section V, the conclusions and future work are presented.
II. RELATED WORK RPL being the standard protocol for routing in Low power Lossy Networks, has attracted attention of researchers across the world. In this section, previous work related to optimization of RPL protocol is discussed. Some researchers have evaluated the performance of the protocol under different network conditions [5][6] and shown practical implementation [7]. Some have proposed novel methods of link estimation, neighbor table management [8], interference reduction and load balancing [9]. Similar to our study, techniques to optimize the objective function using fuzzy logic are presented [10] - [13].
Abuein et al [5] in their study have evaluated the performance of OF0 and MRHOF objective functions of RPL under the random and grid topologies. The network density is medium and varies from 50 to 85 nodes. They concluded that the network performs best when the density is between 50-65 motes and the RX is 60%. In an earlier study [6] the authors have analyzed the performance of OF0 and MRHOF in two network scenarios. In scenario 1, simulations were carried out by varying network densities from 30 to 70 in area of 300x 300 m 2 and using a single sink node. In scenario 2, node density was varied from 70 to 110. Power consumption, Packet Deliver Ratios and Network convergence time was computed. It was observed that MRHOF had advantage over OF0 when node density was low, but when the network density increased beyond 90, OF0 performed better than MRHOF.
Kitagawa et al [7] have illustrated the practical implementation of the RPL protocol. Pulse sensors send the patients pulse data continuously using Zigbee technology to a remote Raspberry Pi based internet gateway. The sensors route the data using the RPL protocol. Received signal strength, Path loss and Average power consumption are plotted. It is noted that position of sensors affects the power consumption.
Ancillotti et al [8] have addressed the issue of passive link monitoring in RPL. A unique cross layer design for link estimation and novel technique for effective neighbor table management is suggested. A hybrid link estimation approach is used which improves the packet delivery ratios. S Kharche et al [9] have proposed a routing algorithm DN-RPL based on deep neural network. This algorithm attempts to resolve the issue of interference in 6LoWPANs. The deepnets based routing DN-RPL is compared with machine learning based RPL (ML-RPL).
Adeeb Saaidah et al in their work [10] have suggested an improved Objective function OFRRT-FUZZY for RPL. It combines three metrics Received Signal Strength Indicator, Throughput (TH) and Remaining Energy (RE). They have used the popular fuzzy logic process to merge these metrics and make routing decision. Simulations performed using COOJA simulator show that OFRRT-FUZZY performs better than OF0 and MRHOF. Mah Zaib Jamil et al [11] have proposed an Objective function based on a new metric ELT (Expected Lifetime metric) of node. ELT is computed by measuring ratio of residual energy to energy used. Comparison analysis of RPL implementation with ELT, HOP and ETX metrics is done. Hanane et al [12] have made an attempt to improve RPL by designing an objective function OF-EC for RPL which depends on three metrics namely ETX, hop count and Energy Consumption. They have used the Fuzzy Logic process to design this Objective Function.
In [13] the authors have proposed a cross layer Objective function ELITE. A metric SPR is proposed and used for route formation. SPR (Strobe per Packet Ratio) measures the required strobes per packet at the MAC layer. ELITE was 229 | P a g e www.ijacsa.thesai.org successful in reducing the average number of strobes needed per packet and average amount of energy consumed by sensor node.

III. DESIGN OF RPL-FZ USING FUZZY LOGIC
In this section, detailed design of proposed Objective Function RPL-FZ is explained. The RPL standard allows the designer flexibility in choice of metrics for Objective Function design [14]. In our work we have chosen three metrics namely, Residual Energy, Delay and Expected transmission count in the Objective function design. The three metrics are chosen considering the real time, reliability and low power consumption requirements of Quality of service. These three metrics have to be combined to obtain a single decision metric for routing. There are several multi criteria decision making techniques which can be used. However, the sensor nodes have limited processing and memory capability. Considering this Fuzzy logic is the ideal option [15]. Fuzzy logic is an accurate method widely used to combine several values to obtain a single precise output [16]. It is ideal in LLN as the implementation is supported by the sensor devices and can enhance network performance. In this work, the Mamdani Fuzzy Inference model [17] is used to obtain accurate output.
The selection of the best parent by a node depends on the routing metric contained in the Objective Function. Hence the routing metric plays an important role in enhancing the overall Network performance. The standard RPL utilizes either Link Quality or Hop count as the routing metric. This may lead to a node with less residual energy being continuously chosen as the Parent node, thus further draining its energy and eventually affecting the Network lifetime [18]. Hence it is necessary to consider the Node Residual Energy as well as Latency in routing process. The metrics considered in this work are as follows: ETX (Expected transmission count): It represents the number of times transmission is required to successfully deliver a packet to its destination. A good link should be able to deliver the packet in first attempt. Ideally, a low ETX value signifies a good and reliable link.
Delay: It is the time taken for a packet to reach its destination. For real time application delay should be minimum.
Residual Energy: When a node is deployed in the network it has a level of Energy Eo. Its energy reduces during its network operations. The difference between initial energy Eo and energy consumed is called the Residual Energy. The intent here is to avoid selecting a node which is running low on energy as the best parent. This eventually helps in prolonging the network lifetime.

A. Combining Routing Metrics using Fuzzy Inference System
The Fuzzy Inference System is shown in Fig. 2. It contains a Fuzzifier unit, Fuzzy inference engine with the Rule base and the Defuzzifier unit.
The fuzzification process consists of following steps: Fuzzification: In this step, the crisp inputs are specified in terms of linguistic variables. The membership functions for the linguistic variables are defined. In our work the crisp input variables are ETX, Delay and Residual Energy.
Fuzzy inference System: The FIS combines fuzzified inputs based on set of AND-OR rules and calculates the output.
Aggregation: If the output depends on more than one rule than it is unified using aggregation method.
Defuzzification: This is process of converting the fuzzified output into a crisp value. In our work this is the metric Quality.
The first step is to specify the linguistic variables for ETX, RE and Delay. The linguistic variables for the ETX input variable are short, average and long. A link with less than 3 signifies as good link and more than 12 is considered undesirable. The Delay term is represented with linguistic variables small, average and high. A value of 3000 units signifies high delay for packet delivery. The Residual Energy is denoted using terms low, average and full. At start of deployment the nodes have full energy of value 255. The membership functions for RE, ETX and Delay are shown in Fig. 3. Rectilinear (Triangular or trapezoidal) membership functions can be chosen to quantify the linguistic variables. In this work, the fuzzy sets are specified using Trapezoidal membership functions to achieve better results. The formula defining the membership in the short fuzzy set of ETX is given by The formula for membership in the Average fuzzy set of ETX is given by The formula defining the membership in long fuzzy set of ETX is given by Similarly, the membership levels can be defined for the fuzzy sets of Residual Energy and delay inputs.
A set of IF-THEN fuzzy rules are stored in the database. These are applied to the fuzzy inputs in the fuzzy inference engine. Different fuzzy inputs are connected by AND, OR and NOT fuzzy operators. The three inputs ETX, RE and Delay have associated with them three fuzzy sets each. The rule base will therefore consist of 3 3 = 27 rules. The Quality output has associated with it seven fuzzy sets, namely very_bad, bad, degraded, average, satisfactory, good and excellent. The membership function of Quality is shown in Fig. 4. Some of the rules used to compute Quality are shown in Table I. The rules are stored in database as follows:

1) If ETX is short and Delay is small and RE is full then Quality is excellent.
2) (If ETX is short and Delay is small and RE is medium then Quality is good) OR (If ETX is average and DELAY is small and RE is full then Quality is good).

5) (If ETX is short and DELAY is average and RE is low then Quality is degraded) OR (If ETX is average and DELAY is small and RE is low then Quality is degraded). 6) (If ETX is long and DELAY is average and RE is medium then Quality is bad) OR (If DELAY is high and ETX is long and RE is medium then Quality is bad).
7) If ETX is long and DELAY is high and RE is low then Quality is very_bad.  The Quality value varies from 0 to 100. A Quality score is assigned to each candidate parent node. For a particular candidate node when the combination of metrics yields a good Quality score it can be selected as preferred parent.
During defuzzification, the value of Quality is computed using the center of gravity (COG) defuzzification method: where M represents the defuzzified value, N corresponds to number of activated rules, V i is the domain value of triggered rule i, and μA is the membership value.

B. Procedure of Parent Selection using RPL-FZ
In RPL the DIO messages are sent after regular intervals determined by the trickle timer. If a node does not receive a DIO, then it will transmit a DIS to solicit a DIO from a neighbor. When a node receives the first DIO message it will add the sender node as a candidate parent node (CPN) in its routing table. The metrics ETX, Delay and Residual Energy for the neighbor are obtained. If no other candidate parent node is present in the list, then this node itself is chosen as Preferred Parent. If more than one candidate is there in list then the Fuzzy Inference System is triggered and routing metrics-ETX, RE and Delay are sent as input. After defuzzification, the Quality scores of the candidate parents are compared with the Quality score of existing preferred parent node (PPN). A Candidate node which has the maximum Quality value is chosen as the new Preferred Parent Node. The rank is calculated and DAO message is sent to the newly selected best parent node. The old PPN is removed and the new updated DIO message is multicast to neighboring nodes. This process is indicated in flowchart of Fig. 5.

IV. RESULTS AND DISCUSSION
The designed Objective function RPL-FZ is incorporated into the Contiki OS [19]. Simulations are performed using the COOJA network simulator available in Contiki OS [20]. It is a widely used open-source tool. The simulations are performed for evaluating the objective function under varying network density and varying data transmission rates.
The simulation parameters are shown below in Table II. A performance comparison is made between the standard RPL Objective Functions OF0, MRHOF and the Fuzzy based RPL-FZ by varying the density of nodes from 70 to 100, and increasing data transmission rates from 2 p/min to 10 p/min. A single sink was used to collect the data form the devices.
The following performance parameters are computed from the simulation test logs using Perl scripts.
A. Simulation Results 1) Average power consumption: It is seen that RPL with MRHOF consumes highest power. This is because MRHOF considers only the transmission count in routing decision and does not consider energy of node. An RPL implementation with the MRHOF objective function can select paths with unreliable links since the link estimation is done by μIPv6 using passive link monitoring techniques and RPL has no control over it [21]. Thus, it is likely that the routing decisions with MRHOF may be based on outdated link statistics. It is seen form the experiments that MRHOF performs badly as the network density and data rate increases.
At 70 nodes and data rate of 2 p/min, the power consumption with MRHOF is 5% higher than with RPL-FZ. As the node density increases, more traffic in the network causes the power consumption to rise. The sensors have to route more packets, causing them to be in ON mode for longer time duration. At 100 nodes, RPL-FZ consumption is 6% lower than OF0 and 9% lower compared to MRHOF. As the packet rate increases to 10 p/min, power consumption increases further. Higher traffic leads to congestion, collisions and packet loss due to packets being dropped. This causes retransmission of packets. Under these strained conditions of high density and high data rate, RPL-FZ consumes 8% lower power than MRHOF. Although the sensor nodes require extra computational power for the fuzzy process and calculation of rank based on the Quality score, the final power consumption of the Network with RPL-FZ is much lesser as compared to OF0 and MRHOF. RPL-FZ considers the remaining energy of a node during parent selection, thus ensuring that a node low on energy does not end up repeatedly being selected as parent and depleting its energy further. This shows that a network with RPL-FZ will have better lifetime as compared to OF0 or MRHOF. Fig. 6 shows the comparative power consumption of RPL-FZ, MRHOF and OF0.
2) Packet delivery ratio: The sensor nodes continuously transmit data to the Root node. Most of the packets are successfully received, but some are lost due to collisions and congestion. The ratio of total packets successfully received at the Sink to the total packets transmitted in the network is termed as Packet Delivery Ratio [22]. Fig. 7 shows the graphs of Packet Delivery Ratios for OF0, RPL-FZ and MRHOF for node density varying from 70 to 100 and packet rates from 2p/min to 10p/min. It can be seen from the graphs that PDR is better at lower packet rates and low node density. At low packet rate 100% packet delivery is obtained with RPL-FZ. RPL with OF0 does not consider the link quality, and when selecting a parent with minimum rank it may actually end up 232 | P a g e www.ijacsa.thesai.org selecting a congested parent and thus end up dropping packets. RPL-FZ considers ETX as a decision metric and thus ensures better packet delivery. As the sensor data transmission rate increases from 2 ppm to 10 ppm and node density from 70 to 100 it is seen that more packets are lost. This happens due to packet collisions and congestion in the network when packet rate increases. RPL is generally suitable for networks with low data rates. The PDR is also depended on the topology of the network. Our study shows that RPL-FZ gives 7 % better PDR as compared to OF0 and MRHOF when network has 100 nodes and at high packet rate of 10p/min.

3) Latency:
The average time taken for a packet to travel from source and reach the destination is termed as latency or end-to-end Delay [23]. Fig. 8 shows the graphs of latency or end to end delay for RPL-FZ, OF0 and MRHOF for varying node densities and packet rates form 2p/min to 10p/min. The three RPL implementations keep the average delay below 2s. MRHOF has highest delay compared to other two. It is seen that the delay increases with increase in node density and packet rates. This is expected since large number of sensors transmitting packets at higher rates will cause more collisions

RPL-FZ MRHOF OF0
233 | P a g e www.ijacsa.thesai.org and packet buffering will increase the delay. RPL-FZ has a delay of 1.8 s, at data rate of 10p/min with 100 nodes, as compared to 2 s for MRHOF and OF0. RPL-FZ uses ETX, residual energy and end to end delay as decision metric for parent selection thus leading to better routing path selection than OF0 and MRHOF. RPL-FZ gives around 8% lower delay than MRHOF and OF0.

V. CONCLUSION AND FUTURE SCOPE
In this paper, RPL-FZ, an efficient objective function for RPL-based Low power Lossy Networks is proposed. The existing objective functions defined in RPL standard depend only on a single metric to make the routing decisions and are not suited to meet the quality-of-service requirement of all applications. RPL-FZ combines three metrics (ETX, Delay and Residual Energy) by using the Fuzzy Logic process. The three metrics are combined using fuzzy inference system to evaluate the Quality of each neighbor node. The neighbor with highest Quality value will be selected as preferred parent node to route the data towards Root node. Thus, the sensed data will be efficiently delivered to the collection unit. RPL-FZ has been analyzed and its performance is compared with the objective functions MRHOF and OF0 specified in RPL standard. Simulations have been performed under varying network density and varying data transmission rates. The optimized objective Function RPL-FZ has 8% lower power consumption compared to MRHOF and OF0. Under strained conditions, at data rates of 10p/min, 100 nodes density and single sink node, RPL-FZ gives 7% higher PDR than MRHOF and OF0. RPL-FZ results in 8% lower Latency as compared to OF0 and MRHOF.  234 | P a g e www.ijacsa.thesai.org