# A Novel RPL Algorithm Based on Chaotic Genetic Algorithm

^{*}

## Abstract

**:**

## 1. Introduction

- (1)
- A composition metric is proposed, which simultaneously considers packet queue length in the buffer, end-to-end delay, residual energy ratio of nodes, number of hops, and expected transmission count (ETX) when selecting preferred parents (the next hop). These five routing metrics have a significant effect on routing decisions. Hence, to choose the best paths, all of the routing metrics mentioned above should be evaluated comprehensively.
- (2)
- The routing algebra theoretical framework which ensures consistency, optimality, and no-loop for the newly-proposed routing metrics is analyzed.
- (3)
- RPL-CGA uses a chaotic genetic algorithm to determine weighting factors of routing metrics in composition metrics to comprehensively evaluate candidate parents (neighbors) when selecting preferred parents. In this way, the best weighting factors allocation scheme can be obtained. Then, among many candidate parents (neighbors), the optimal preferred parent (the next hop) can be selected.
- (4)
- A new holistic objective function is proposed. This objective function can provide a better description of the optimal routes to destination nodes, and can also provide a more comprehensive evaluation of candidate parents when selecting preferred parents.
- (5)
- A new method for calculating the rank values of nodes is proposed. Here, rank values are used to construct the network topologies and select the preferred parent (the next hop).
- (6)
- Simulation studies of RPL-CGA and several typical existing relevant routing algorithms are carried out in this paper. Simulation results demonstrate that RPL-CGA is superior to these typical existing relevant routing algorithms, and can obtain considerable enhancement on network performance of LLNs in the aspects of average end-to-end delay, average success rate, etc.

## 2. Overview and Problems of RPL

#### 2.1. Introduction of RPL

- (1)
- How to get and update routing metrics information;
- (2)
- How to calculate the rank of node (the individual position of the node relative to root in DODAG);
- (3)
- How to choose the node’s preferred parent (the next hop node).

#### 2.2. Problems

- (1)
- Node chooses the candidate parent with smallest path cost as preferred parent;
- (2)
- If one node already selected a preferred parent but there is another candidate parent with the minimum path costing less than the selected preferred parent, then before changing its preferred parent, the node shall first compare the difference value of path cost between the minimum path cost candidate parent and the selected preferred parent. Then, if the difference value is greater than the pre-set threshold, the node chooses this minimum path cost candidate parent as its new preferred parent. Otherwise, the node still uses its current preferred parent.

- (1)
- Packet queue length in buffer, end-to-end delay, residual energy ratio of nodes, number of hops, and expected transmission count (ETX) all have an important influence on routing selection. However, the recent improvements of RPL only consider two or three routing metrics. So, the optimal routes are hard to select, and the network performance is affected to some extent.
- (2)
- It is too subjective that the weighting factor of each routing metric is decided by the personal experiences of experts. There is no definite analysis and basis about weighting factors distribution theory of each routing metric used in composition metric.
- (3)
- The weighting factors of routing metrics cannot be dynamically adjusted according to network changes. Therefore, the network performances are affected to a certain extent.

## 3. RPL-CGA

#### 3.1. Outlines of RPL-CGA

- (1)
- Analyzing CGA.
- (2)
- Analyzing the requirements that RPL routing metrics should meet.
- (3)
- Proposing which routing metrics should be considered in RPL-CGA.
- (4)
- Proposing novel composition metric and objective function.
- (5)
- Using the chaotic genetic algorithm to optimize the weighting factor of each routing metric in the composition metric.
- (6)
- Calculating rank values of nodes according to the newly-proposed objective function.
- (7)
- Choosing the preferred parents based on rank values of nodes.

#### 3.2. CGA

**Definition**

**1.**

- (1)
- The period of the periodic point of f has no upper bound.
- (2)
- Existing uncountable subset $S\subset [a,b]$, there is no periodic point in S, and the following conditions are met:
- ①
- $\forall x,y\in S$, $\underset{n\to \infty}{\mathrm{lim}}\mathrm{inf}\left|{f}^{n}(x)-{f}^{n}(y)\right|=0$;
- ②
- $\forall x,y\in S$, $x\ne y$, $\underset{n\to \infty}{\mathrm{lim}}\mathrm{sup}\left|{f}^{n}(x)-{f}^{n}(y)\right|>0$;
- ③
- $\forall x\in S$, y is any periodic point of f, $\underset{n\to \infty}{\mathrm{lim}}\mathrm{sup}\left|{f}^{n}(x)-{f}^{n}(y)\right|>0$.

#### 3.3. Requirements for RPL-CGA Routing Metrics

_{1}to v

_{n}are delivered through the path P(v

_{1}, v

_{n}) = (v

_{1}, v

_{2}$,\cdots ,$ v

_{n}), then other nodes on path

**P**must take the same decisions. For example, packets form v

_{2}to v

_{n}should select path P(v

_{2}, v

_{n}) = (v

_{2}, v

_{3}$,\cdots ,$ v

_{n}), and the same for v

_{3}, v

_{4}$,\cdots ,$ v

_{n}

_{−1}. Optimality means that the routing protocol should transmit packets through the lightest path (minimal overhead, delay, or other metrics) or optimal routes among nodes. No-loop means that for every path from source to destination, any two nodes on the path are different.

_{s}, v

_{d}) = (v

_{s}, v

_{s+}

_{1}, v

_{s+}

_{2}$,\cdots ,$ v

_{d}), where $P({v}_{s},{v}_{d})\in \Omega $ (the finite set of all the paths). Then, suppose that $F(P({v}_{s},{v}_{d})\in \Omega )$ is the mapping function which is used to calculate the metric value (e.g., hop count, ETX, residual energy, end-to-end delay, and packet queue length in buffer) of the path between nodes s and d. Each path between source and destination has a value that can be ordered to select the best path. The isotonicity and monotonicity of the routing metrics are explained as follows.

#### 3.4. Routing Metrics Considered in RPL-CGA

_{max}represents the maximum queue length of all candidate parents. QL(i) ($i=1,2,\cdots ,n$) is the packet queue length in the buffer of candidate parent i. It is more inclined to choose the candidate parent (neighbor) with the lowest packet queue length as the preferred parent. Therefore, QL can be used to balance the network load and select the optimum preferred parent (the next hop).

_{max}represents the maximum EED of the path from this node via a candidate parent to root. Let EED(i) ($i=1,2,\cdots ,n$) indicates the end-to-end delay of one route from a node via its candidate parent i to root. Here, EED(i) includes the following two sections: (a) the end-to-end delay of the link between node and its candidate parent i; (b) the end-to-end delay in DIO broadcast by candidate parent i. In addition, if node via candidate parent e has the minimum EED(e) among all candidate parents, then e will be chosen as the preferred parent.

_{3}(i) ($i=1,2,\cdots ,n$) represents the residual energy ratio of a candidate parent i. E

_{initial}(i) and E

_{current}(i) represent the maximum initial energy and the current energy of candidate parent i respectively. Therefore, it is more inclined to choose the candidate parent (neighbor) with the maximum residual energy as the preferred parent to prolong the network lifetime. Although the remaining energy is a concave metric, some transformations of remaining energy are done to make the derived metric (g

_{3}(i) ($i=1,2,\cdots ,n$)) coincide with other metrics in metric range, operator, order relation, isotonicity, monotonicity etc.

_{max}represents the maximum hop count between a candidate parents and root. HC(i) (i = 1, 2, …, n) represents the number of hops between candidate parent i and root. In addition, if the candidate parent f has the minimum HC(f) among all candidate parents, then f will be chosen as the preferred parent.

_{max}represents the maximum ETX of the path from this node through a candidate parent to root. ETX(i) ($i=1,2,\cdots ,n$) indicates the ETX from one node via candidate parent i to root. Here, ETX(i) includes the following two sections: (a) the ETX of the link between node and its candidate parent i; (b) the ETX in DIO (the DIO message is broadcast by candidate parent i). In addition, if node via candidate parent l to root has the smallest ETX(l) among all candidate parents, then l will be chosen as the preferred parent.

#### 3.5. Proposing Composition Metric and Objective Function

_{1}, a

_{2}, a

_{3}, a

_{4}, a

_{5}are weighting factors to adjust the impact of each routing metric. n indicates the number of candidate parents.

_{1}= P(v

_{s}, v

_{d})=(v

_{s}, v

_{s+}

_{1}, v

_{s+}

_{2}$,\cdots ,$ v

_{d}), P

_{2}= P(v′

_{s}, v′

_{d})=(v′

_{s}, v′

_{s+}

_{1}, v′

_{s+}

_{2}$,\cdots ,$ v′

_{d}), P

_{3}=P(v″

_{s}, v″

_{d})=(v″

_{s}, v″

_{s+}

_{1}, v″

_{s+}

_{2}$,\cdots ,$ v″

_{d}). Then, the composition metric values of these three paths are as follows:

_{3}, $F({P}_{1}){}_{CM}\le F({P}_{1}){}_{CM}+F({P}_{3}){}_{CM}$ can easily be proven, so the newly-proposed composition metric meets monotonicity.

_{3}, $F({P}_{1}){}_{CM}+F({P}_{3}){}_{CM}\le F({P}_{2}){}_{CM}+F({P}_{3}){}_{CM}$ can easily be proven, so the newly-proposed composition metric meets isotonicity.

#### 3.6. Optimizing Weighting Factors of Routing Metrics

_{ij}($i=1,2,\cdots ,n;j=1,2,\cdots ,m$). Then, the sample set of each metric value at each candidate parent is $\left\{{x}_{ij}|i=1,2,\cdots ,n;j=1,2,\cdots ,m\right\}$. It can be written as a matrix named as initial judgment matrix

**X**.

_{j}($j=1,2,\cdots ,m$), and F(i) ($i=1,2,\cdots ,n$), and the comprehensive evaluate function of candidate parents can be obtained by weighted summation of metric weighting factors and metric values x

_{ij}, as shown in Equation (9).

_{j}) of every routing metric can be obtained through a multi-attribute optimization algorithm. In this way the comprehensive evaluating function F(i) of every candidate parent is obtained. Finally, the candidate parent with the lowest F(i) can be chosen as the preferred parent. For this purpose, this paper proposes the use of a chaotic genetic algorithm (RPL-CGA) to determine the weighting factor of each metric in the composition metric. Then, the preferred parents can be selected through comprehensively evaluating nodes in candidate parent set.

_{c}, mutation probability P

_{m}, the maximum number of iteration k, etc.

_{i}is a probable weighting factors distribution method of metrics ($a=({a}_{1},{a}_{2},\cdot \cdot \cdot ,{a}_{m})$).

**h**(population individual) based on Equation (11). Then, the larger the value of Fitness(h

_{i}_{i}), the closer

**h**is to the optimal solution, and also, the better to select ${h}_{i}=({h}_{i1},{h}_{i2},\cdot \cdot \cdot ,{h}_{im})$ as weighting factors allocation scheme. That is, RPL-CGA calculates the fitness function value Fitness(h

_{i}_{i}) of each population individual, arranges

**h**in descending order based on the fitness function values, selects the first 15% of them as superior individuals, and brings these superior individuals to the next generation population directly (no crossover, mutation, and other operations).

_{i}**a**into Equation (11), and gets the fitness function values of each candidate parent. Then, the candidate parent with the maximum fitness function values will be chosen as the preferred parent, i.e., it brings

**a**into Equation (9) and gets the comprehensive evaluation function values F(i) ($i=1,2,\cdots ,n$) of each candidate parent. Then, the node with the minimum comprehensive evaluation function value among all the candidate parents will be chosen as the preferred parent.

#### 3.7. Calculating Rank of Nodes

_{old}indicates the former value, and ETX(c)

_{new}is computed through $ETX=1/{D}_{f}*{D}_{r}$. Here, D

_{f}is the probability that a packet received by neighbor. D

_{r}is the probability that an acknowledgment packet is successfully received.

#### 3.8. Selecting Preferred Parents

- (1)
- According to Equation (19), if the value of current preferred parent is greater than the value of one candidate parent, but the difference between them is less than the preferred parent change threshold, then the current preferred parent will not be changed.
- (2)
- If the calculated value of Equation (19) is greater than 100 or less than 1, then the corresponding candidate parent must be removed from the candidate parent set.
- (3)
- If several candidate parents have the same minimum calculated values of Equation (19), then an additional metric named as NSA (Node State Attribute, NSA) will be considered to choose the next hop among these several candidate parents.
- (4)
- According to Equation (19), if the value of the current preferred parent is equal to the minimum value, and there are several candidate parents also with the minimum value, then the node still uses its current preferred parent.
- (5)
- If node c only has one candidate parent, then c should wait for some time to receive DIO messages broadcast by other nodes to determine whether there are other nodes that will become its candidate parents. After that, if c has two or more candidate parents, c selects a preferred parent through RPL-CGA algorithm. Otherwise, if c still has one candidate parent, it directly selects only one candidate parent as its preferred parent without executing the RPL-CGA algorithm.

## 4. Performance Evaluation

#### 4.1. Statistical Experimetal Indicators

_{1}, a

_{2}, a

_{3}, a

_{4}, a

_{5})

_{1}, a

_{2}, a

_{3}, a

_{4}, a

_{5}) and simulation time illustrates the changes of weighting factors of these five routing metrics with the simulation running. That is, RPL-CGA can dynamically adjust the values of a

_{1}, a

_{2}, a

_{3}, a

_{4}, and a

_{5}according to network changes, choose the optimum parents as preferred parents, and improve network performance effectively.

#### 4.2. Statistical Experimetal Indicators

_{elec}represents the energy loss for relaying unit bit message. ε

_{amp}and ε

_{fs}are the energy needed for each unit bit message sent by the amplifier in these two circumstances, respectively. Table 3 shows the values of these parameters.

#### 4.3. Results and Discuss

_{1}, a

_{2}, a

_{3}, a

_{4}, a

_{5})

_{1}, a

_{2}, a

_{3}, a

_{4}, and a

_{5}) and simulation time respectively. We randomly selected nodes 2 (corresponding to Figure 9), 38 (corresponding to Figure 10), 100 (corresponding to Figure 11), and 319 (corresponding to Figure 12) to show the relationship between weighting factors and simulation time. It’s obvious that RPL-CGA can dynamically adjust the values of a

_{1}, a

_{2}, a

_{3}, a

_{4}, and a

_{5}according to network changes, choose the optimum parents as preferred parents, and improve network performance effectively.

## 5. Discussion

_{c}, and mutation probability P

_{m}, are still not determined objectively. The reasonable parameter ranges and values used in CGA can only be determined by multiple experimental calculations, since currently, there is no theoretical basis. In this paper, the values of several parameters used in CGA are comprehensively determined by research literature and experimental calculations. Therefore, the subjective determination of these parameters has no significant influence on the network performance; instead, the network performance can be significantly improved, and is superior to the existing relevant algorithm.

## 6. Conclusions

## Author Contributions

## Funding

## Acknowledgments

## Conflicts of Interest

## References

- Khan, M.M.; Lodhi, M.A.; Rehman, A.; Khan, A.; Hussain, F.B. Sink-to-sink coordination framework using RPL: Routing protocol for low power and lossy networks. J. Sens.
**2016**, 2016, 2635429. [Google Scholar] [CrossRef] - Lorente, G.G.; Lemmens, B.; Carlier, M.; Braeken, A.; Steenhaut, K. BMRF: Bidirectional Multicast RPL Forwarding. Ad Hoc Netw.
**2017**, 54, 69–84. [Google Scholar] [CrossRef] - Winter, T.; Thubert, P.; Brandt, A.; Hui, J.; Kelsey, R.; Levis, P.; Pister, K.; Struik, R.; Vasseur, J.P.; Alexander, R. RPL: IPv6 Routing Protocol for Low-Power and Lossy Networks. Internet Eng. Task Force (IETF)
**2012**. [Google Scholar] [CrossRef] - Zhao, M.; Kumar, A.; Chong, P.H.; Lu, R. A comprehensive study of RPL and P2P-RPL routing protocols: Implementation, challenges and opportunities. Peer-to-Peer Netw. Appl.
**2017**, 10, 1232–1256. [Google Scholar] [CrossRef] - Nassar, J.; Berthomé, M.; Dubrulle, J.; Gouvy, N.; Mitton, N.; Quoitin, B. Multiple Instances QoS Routing in RPL: Application to Smart Grids. Sensors
**2018**, 18, 2472. [Google Scholar] [CrossRef] [PubMed] - Cao, Y.; Wu, M. An Improved Algorithm of RPL Based on Triangle Module Operator for AMI Networks. IEICE Trans. Commun.
**2018**, 101, 1602–1611. [Google Scholar] [CrossRef] - Zhao, M.; Chong, P.H.J.; Chan, H.C.B. An energy-efficient and cluster-parent based RPL with power-level refinement for low-power and lossy networks. Comput. Commun.
**2017**, 104, 17–33. [Google Scholar] [CrossRef] - Nejad, H.M.; Movahhedinia, N.; Khayyambashi, M.R. Improving the reliability of wireless data communication in Smart Grid NAN. Peer-to-Peer Netw. Appl.
**2017**, 10, 1021–1033. [Google Scholar] [CrossRef] - Miguel, M.L.; Jamhour, E.; Pellenz, M.E.; Penna, M.C. A Power Planning Algorithm Based on RPL for AMI Wireless Sensor Networks. Sensors
**2017**, 17, 679. [Google Scholar] [CrossRef] [PubMed] - Farooq, M.O.; Sreenan, C.J.; Brown, K.N.; Kunz, T. Design and analysis of RPL objective functions for multi-gateway ad-hoc low-power and lossy networks. Ad Hoc Netw.
**2017**, 65, 78–90. [Google Scholar] [CrossRef] - Gaddour, O.; Koubâa, A.; Abid, M. Quality-of-service aware routing for static and mobile ipv6-based low-power and lossy sensor networks using RPL. Ad Hoc Netw.
**2015**, 33, 233–256. [Google Scholar] [CrossRef] - Ghaleb, B.; Al-Dubai, A.; Romdhani, I.; Ghaleb, B. Load Balancing Objective Function in RPL. Available online: https://f.glgoo.top/scholar?hl=zh-CN&as_sdt=0,5&cluster=13682875726362249787 (accessed on 27 October 2018).
- Thubert, P. Objective function zero for the routing protocol for low-power and lossy networks (RPL). Internet Eng. Task Force (IETF) RFC6552.
**2012**. [Google Scholar] [CrossRef] - Gnawali, O.; Levis, P. The ETX Objective Function for RPL. Available online: https://f.glgoo.top/scholar?hl=zh-CN&as_sdt=0%2C5&q=The+ETX+objective+function+for+RPL&btnG= (accessed on 27 October 2018).
- Gnawali, O.; Levis, P. The minimum rank with hysteresis objective function. Internet Eng. Task Force (IETF) RFC 6719.
**2012**. [Google Scholar] [CrossRef] - Vasseur, J.P.; Kim, M.; Pister, K.; Dejean, N.; Barthel, D. Routing Metrics Used for Path Calculation in Low-Power and Lossy Networks. Internet Eng. Task Force (IETF) RFC 6551.
**2012**. [Google Scholar] [CrossRef][Green Version] - Trakadas, P.; Zahariadis, T. Design Guidelines for Routing Metrics Composition in LLN. Available online: https://tools.ietf.org/html/draft-zahariadis-roll-metrics-composition-04 (accessed on 27 October 2018).
- Hassan, A.; Alshomrani, S.; Altalhi, A.; Ahsan, S. Improved routing metrics for energy constrained interconnected devices in low-power and lossy networks. J. Commun. Netw.
**2016**, 18, 327–332. [Google Scholar] - Velivasaki, T.H.; Karkazis, P.; Zahariadis, T.V.; Trakadas, P.T.; Capsalis, C.N. Trust-aware and link-reliable routing metric composition for wireless sensor networks. Trans. Emerg. Telecommun. Technol.
**2014**, 25, 539–554. [Google Scholar] [CrossRef] - Karkazis, P.; Trakadas, P.; Leligou, H.C.; Sarakis, L.; Papaefstathiou, I.; Zahariadis, T. Evaluating routing metric composition approaches for QoS differentiation in low power and lossy networks. Wirel. Netw.
**2013**, 19, 1269–1284. [Google Scholar] [CrossRef] - Karkazis, P.; Leligou, H.C.; Sarakis, L.; Zahariadis, T.; Trakadas, P.; Velivassaki, T.H.; Capsalis, C. Design of primary and composite routing metrics for rpl-compliant wireless sensor networks. In Proceedings of the Telecommunications and Multimedia (TEMU), Chania, Greece, 30 July–1 August 2012; pp. 13–18. [Google Scholar]
- Gouda, M.G.; Schneider, M. Maximizable routing metrics. IEEE/ACM Trans. Netw. (TON)
**2003**, 11, 663–675. [Google Scholar] [CrossRef][Green Version] - Zeng, T.; Chang, S.; Fan, H.; Liu, Q. Design and Processing of a Novel Chaos-Based Stepped Frequency Synthesized Wideband Radar Signal. Sensors
**2018**, 18, 985. [Google Scholar] [CrossRef] [PubMed] - Sun, S.; Kim, K.Y.; Shin, O.S.; Shin, Y. Device-to-device resource allocation in LTE-advanced networks by hybrid particle swarm optimization and genetic algorithm. Peer-to-Peer Netw. Appl.
**2016**, 9, 945–954. [Google Scholar] [CrossRef] - Gao, L.; Zhou, Z.F.; Huang, Q.A. A Generalized Polynomial Chaos-Based Approach to Analyze the Impacts of Process Deviations on MEMS Beams. Sensors
**2017**, 17, 2561. [Google Scholar][Green Version] - Tang, L.; Feng, S.; Hao, J.; Zhao, X. Energy-efficient routing algorithm based on multiple criteria decision making for wireless sensor networks. Wirel. Pers. Commun.
**2015**, 80, 97–115. [Google Scholar] [CrossRef] - Hou, J.; Jadhav, R.; Luo, Z. Optimization of Parent-node Selection in RPL-based Networks. Available online: https://f.glgoo.top/scholar?hl=zh-CN&as_sdt=0%2C5&q=Optimization+of+Parent-node+Selection+in+RPL-based+Networks&btnG= (accessed on 27 October 2018).
- Nayak, P.; Devulapalli, A. A fuzzy logic-based clustering algorithm for WSN to extend the network lifetime. IEEE Sens. J.
**2016**, 16, 137–144. [Google Scholar] [CrossRef]

ICMPV6 Control Messages | Functions |
---|---|

DAO (Destination Advertisement Object) | Transmitting destination address information and constructing upward routes |

DIO (DODAG Information Object) | Containing some information that used to detect RPL Instance, obtain relevant configuration parameters, select candidate parent set, maintaining DODAG, etc. |

DIS (DODAG Information Solicitation) | soliciting DIOs from neighbors in LLNs |

DAO-ACK (Destination Advertisement Object Acknowledgement) | Informing DAO sender that DAO has been received |

Parameter | Value |
---|---|

Network scenario (m^{2}) | 500 × 500 |

Dead node | Residual energy less than 5% of its initial energy |

Maximum number of iteration k | 100 |

Cross probability P_{c} | 0.75 |

Mutation probability P_{m} | 0.001 |

Population size w | 100 |

Simulation time (s) | 3000 |

Maximum queue length (packet number) | 16 |

Minimum queue length (packet number) | 0 |

Communication radius (m) | 150 |

Node number | 50, 100, 150, 200, 250, 300, 350, 400 |

Packet size (kbits) | 0.1 |

Energy loss for relaying y bit message | E(y,d) |

Parameter | Value |
---|---|

E_{elec} | 50 nJ/bit |

ε_{amp} | 10 pJ/bit/m^{2} |

ε_{fs} | 0.0013 pJ/bit/m^{4} |

d_{0} | 87 m |

d | communication distance |

© 2018 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Cao, Y.; Wu, M. A Novel RPL Algorithm Based on Chaotic Genetic Algorithm. *Sensors* **2018**, *18*, 3647.
https://doi.org/10.3390/s18113647

**AMA Style**

Cao Y, Wu M. A Novel RPL Algorithm Based on Chaotic Genetic Algorithm. *Sensors*. 2018; 18(11):3647.
https://doi.org/10.3390/s18113647

**Chicago/Turabian Style**

Cao, Yanan, and Muqing Wu. 2018. "A Novel RPL Algorithm Based on Chaotic Genetic Algorithm" *Sensors* 18, no. 11: 3647.
https://doi.org/10.3390/s18113647