LOA-RPL: Novel Energy-Efficient Routing Protocol for the Internet of Things Using Lion Optimization Algorithm to Maximize Network Lifetime

Energy conservation is a significant task in the Internet of Things (IoT) because IoT involves highly resource-constrained devices. Clustering is an effective technique for saving energy by reducing duplicate data. In a clustering protocol, the selection of a cluster head (CH)plays a key role in prolonging the lifetimeof a network.However,most cluster-based protocols, including routing protocols for low-power and lossy networks (RPLs), have used fuzzy logic and probabilistic approaches to select the CH node. Consequently, early battery depletion is produced near the sink. To overcome this issue, a lion optimization algorithm (LOA) for selecting CH in RPL is proposed in this study. LOA-RPL comprises three processes: cluster formation, CH selection, and route establishment. A cluster is formed using the Euclidean distance. CH selection is performed using LOA. Route establishment is implemented using residual energy information.An extensive simulation is conducted in the network simulator ns-3 on various parameters, such as network lifetime, power consumption, packet delivery ratio (PDR), and throughput. The performance of LOA-RPL is also compared with those of RPL, fuzzy rule-based energyefficient clustering and immune-inspired routing (FEEC-IIR), and the routing scheme for IoT that uses shuffled frog-leaping optimization algorithm (RISARPL). The performance evaluation metrics used in this study are network lifetime, power consumption, PDR, and throughput. The proposed LOARPL increases network lifetime by 20% and PDR by 5%–10% compared with RPL, FEEC-IIR, and RISA-RPL. LOA-RPL is also highly energy-efficient compared with other similar routing protocols.


Introduction
The Internet of Things (IoT) is an emerging field of research that integrates physical objects and the Internet [1][2][3][4][5][6][7]. IoT aims to establish communication between objects without human involvement. In accordance with Gartner's report, 31 billion IoT devices were connected to the Internet in 2020. Moreover, nearly 75 billion devices are estimated to be connected to the Internet by 2025 [8]. IoT applications include healthcare, target tracking, smart cities, home security, smart farming, home intrusion detection, elderly monitoring, driverless connected cars, remote patient monitoring, vaccine cold chain monitoring, contact tracing systems for infectious diseases, and smart parking systems [9][10][11][12][13]. IoT devices are involved in our daily life to help human society. However, IoT faces many challenges because IoT devices exhibit low power, small memory, and low processing capability [14][15][16][17].
A low-power and lossy network (LLN) is an IoT network that contains thousands of Internetconnected devices. It is used in various applications, such as smart metering, building automation, and smart grids. To fulfill the requirements of LLN, a novel communication method for transferring data from one place to another must be developed [17][18][19][20]. Routing plays a significant role in forwarding data. To overcome this limitation, the Internet Engineering Task Force (IETF) has standardized the routing protocol for LLNs (RPL).
RPL is specially designed for resource-constrained devices to support various LLN applications. It constructs a destination-oriented directed acyclic graph (DODAG) based on node and link information in the network. DODAG consists of a low-power border router (LBR) and low-power end devices (LEDs). LBR and LEDs support bidirectional communication. Route establishment in RPL is realized on the basis of messages, namely, DODAG advertisement object (DAO), DAO-acknowledgment, and DODAG information object (DIO). The objective function (OF) is a necessary function used in DODAG to select the optimal parent node from the list of parents [21][22][23].
In general, RPL adopts different parent selection criteria, namely, single, composite, and fuzzy logic-based routing metrics. RPL based on single routing metrics [24,25], including expected transmission count (ETX), hop count, remaining energy, and node degree, is unable to fulfill the requirements of the entire network. To overcome this limitation, composite routing metric-based RPL was introduced to fulfill network requirements in [26][27][28][29]. RPL supports minimization, e.g., load and ETX, or maximization, e.g., residual energy (RER) and number of neighbors, properties during parent selection. It also partially fulfills the requirement of a network. Accordingly, recent studies have focused on fuzzy logic-based route selection in LLNs [30,31].
In some IoT applications, nodes are positioned randomly in the network. RPL routers produce replicated data and forward them to the root of DODAG, draining the energy close to the DODAG's root. A clustering technique is proposed to minimize the duplicate transmission of data across a network to avoid this problem. A clustering protocol consists of the creation of a virtual cluster, the selection of a cluster head (CH), and the establishment of a route in LLN. Thus, the life span of a network can be prolonged [32][33][34][35]. However, the traditional CH selection method is unsuitable for RPL. Accordingly, the current study focuses on an optimization algorithm that can select the best CH node in a cluster.
The optimization algorithm is a sequence of procedures for obtaining the optimum solution until iterative execution is carried out [36][37][38][39]. Optimization algorithms are extremely common in engineering fields because they are simple to understand, design, and implement. In network domains, optimization algorithms are mostly used for CH selection and node localization. Thus, we can prolong network lifetime in IoT.
The primary objective of this study is to propose a lion optimization algorithm (LOA) for CH selection in RPL. LOA-RPL consists of cluster formation, CH selection, and route establishment. A cluster is created using the Euclidean distance. CH selection is performed using LOA. Lastly, RER is used to establish a route. Thus, LOA-RPL prolongs the life span of a network.
The key contributions of this study are as follows.
• An in-depth analysis of the literature on various energy-aware RPLs and CH selection methods that use an optimization algorithm proposed by various researchers to improve the performance of an IoT network in terms of power consumption, network lifetime, packet delivery ratio (PDR), and throughput. • An analysis of various optimization algorithms for selecting CH nodes to enhance network performance. • The design and development of a novel energy-efficient routing protocol for IoT by using LOA to increase network lifetime, PDR, and throughput. • The simulation results of LOA-RPL are compared and validated with those of recently developed and similar popular routing protocols, namely, RPL, fuzzy rule-based energyefficient clustering and immune-inspired routing (FEEC-IIR), and the routing scheme for IoT that uses shuffled frog-leaping optimization algorithm (RISA-RPL), by using the Cooja simulator.
The remainder of this paper is organized as follows. Section 2 discusses the recent literature on energy-aware RPL and various optimization algorithms for selecting CH nodes. Section 3 describes the details of the network and energy models in LOA-RPL. Section 4 presents the proposed LOA-RPL. Section 5 provides the results and findings. Section 6 concludes this study and sets out the future scope of LOA-RPL.

Related Work
This section discusses recent studies on energy-aware RPL and CH selection methods that use optimization algorithms.

Energy-Aware RPL
Fatemeh et al. [40] proposed priority-based energy-aware RPL (PriNergy-RPL) for IoT to extend the life span of a network. PriNergy-RPL adopts a priority scheduling and energyefficient technique to minimize the utilization of energy in LLNs. The routing protocol uses different timing slots to send data (audio, video, and images) to the root of DODAG. In this manner, PriNergy-RPL provides robustness between participant and destination nodes. PriNergy-RPL reduces energy consumption by 10%. It also decreases latency and energy utilization more than quality-of-service RPL. However, the congestion rate is increased with respect to network nodes.
Conti et al. [41] proposed a new Objective Function (OF) for efficient routing (OF-ER) in RPL (ER-RPL). This protocol introduces a routing metric, namely, efficient composite routing, which explores link quality, queue size, network lifetime, and number of depleted nodes near parent selection participants. The efficiency of ER-RPL was compared with that of the default RPL. ER-RPL exhibits efficacy by utilizing the life span, reliability, and stability of a network. However, it increases communication overhead in some cases.
Maha et al. [42] suggested an Energy-efficient and Mobility-Aware RPL (EMA-RPL) for IoT. In general, RPL is designed only for static LLNs. In recent years, the needs of people have changed and included the mobility scenario. In such scenario, prolonging the life span of a network is a significant task in IoT. EMA-RPL incorporates enhanced mobility detection into the default RPL. It solves the handoff issue and exhibits more efficient performance than the default RPL. PDR is increased by 15% and 27% in EMA-RPL compared with those in RPL and mobility-compliant RPL, respectively. Moreover, EMA-RPL extends the life span of the network. However, handover delay is not considered during route establishment.
Bouzebiba et al. [43] proposed free bandwidth (FreeBW)-RPL, which is an enhanced version of the default RPL that is suitable for multimedia IoT. FreeBW-RPL presents a new OF (i.e., OF-FreeBW) that considers bandwidth in the network layer, and thus, this protocol provides quality of service. A simulation was conducted, and the efficacy of FreeBW-RPL was compared with that of the default RPL. FreeBW-RPL exhibited superior performance in terms of latency and power consumption. In addition, PDR in FreeBW-RPL was increased by 10%-15% compared with those in ETX-RPL and E-RPL. However, this protocol only considers bandwidth during route establishment.
Sebastian et al. [44] proposed the load-balancing routing protocol (lb-RPL). The default RPL supports fast network setup and scalability. However, it suffers from the load imbalance problem, generating data traffic during data transmission. To address these limitations, a load balancing routing metric has been proposed. Besides, lb-RPL is considered the metrics, including ETX and RER in RPL, to select the best parent to forward the data. Traffic overhead in lb-RPL was decreased by 8% compared to similar routing protocols in ETX-RPL and RPL. However, the control message overhead problem could not be resolved by lb-RPL.
Zhao et al. [45] proposed a hybrid energy-efficient cluster routing (HEC-RPL) for LLNs. HEC-RPL consists of five processes for extending the lifetime of a network. First, the cluster parent set (CPS) method is selected to establish the route in the network. Second, an overhearing mechanism is adopted to establish coordination among nodes in a network. Third, RER is used for CPS selection. Fourth, a loss recovery scheme is adopted to avoid data loss during data transmission. Fifth, the transmission energy is fine-tuned to prolong the remaining energy in the network nodes. The performance of HEC-RPL was compared with that of the default RPL. HEC-RPL outperformed RPL in terms of network life span and delay. In addition, HEC-RPL increased PDR by 35% compared with that in RPL. However, the nodes depleted the energy early in some cases.

CH Selection by Using Optimization Algorithms
Vijayalakshmi et al. [46] proposed the tabu particle swarm optimization (tabu PSO) algorithm for selecting CH nodes to increase network life span. CH selection plays a crucial role in a clustering protocol to prolong life span. A hybrid algorithm, namely, tabu PSO, was proposed for effectively choosing CH nodes. The proposed algorithm outperformed existing routing protocols, namely, the low-energy adaptive clustering hierarchy (LEACH) and particle swarm optimization (PSO) algorithms. Tabu PSO optimizes the number of clusters created, prolonging the life span of a network. In addition, the PDR in tabu PSO was increased by 5%-10% compared with those in PSO and multihop PSO. However, tabu PSO takes a longer time to converge particles, and finding the optimal solution is challenging.
Rambabu et al. [47] proposed a hybrid artificial bee colony (HABC)-migrating birds optimization MBO algorithm for selecting the optimal CH node in wireless sensor networks (WSNs). HABC-MBO was incorporated with a mutated butterfly operation at the bee stage of artificial bee colony (ABC) algorithm. The problems of local search, global search, and convergence value of each bee within the network were reduced. HABC-MBO eliminated the overhead of the CH node during data transmission. The number of alive nodes was higher in HABC-MBO than in existing algorithms, such as Harmony Search Algorithm (HSA)-PSO-CH selection scheme (CHSS), firefly optimization cyclic redundancy (FFOCR)-CHSS, and firefly cyclic gray wolf optimization (FFCGWO)-CHSS. In addition, life span in HABC-MBO increased by 5%-8% compared with those in HSA-PSO-CHSS, FFOCR-CHSS, and FFCGWO-CHSS. However, convergence is delayed, and finding the optimal local solution in the network is difficult.
Kulkarni et al. [48] proposed penguin fuzzy-based ant colony optimization (PFACO) algorithm for CH selection in WSNs. PFACO adopts the OF that uses metrics delay, traffic, energy, lifetime, and distance. This algorithm was implemented via simulation and evaluated on MAT-LAB. Its efficiency was compared with those of fuzzy ant colony optimization (ACO), ACO, LEACH, and fuzzy ABC (FABC). PFACO exhibited superior performance in terms of network throughput, delay, and lifetime. Life span in PFACO was increased by 10% compared with those of fuzzy ACO, ACO, LEACH, and FABC.
John et al. [49] proposed metaheuristic optimization technique (MOT)-cuckoo optimization algorithm (COA) algorithm for CH selection in WSNs. MOT-COA uses an OF that explores network metrics, distance, remaining energy, traffic density, and delay. Simulation was performed several times, and the weight values of the OF were fine-tuned to achieve an optimum value in CH selection. Simulation was conducted in two cases. The first case included 50 nodes, and the second case included 100 nodes. The performance of MOT-COA was compared with those of PSO, LEACH, ABC, and FABC. MOT-COA demonstrated superior performance in terms of network life span and latency. In addition, MOT-COA increased network life span and throughput by 10% and 65%, respectively.
Pitchaimanickam et al. [50] proposed a hybrid fuzzy adoptive PSO (HFAPSO) algorithm for CH selection in WSNs. Clustering is an efficient technique for energy conservation. HFAPSO was used to determine the global search behavior of fireflies in network nodes. The efficiency of HFAPSO was compared with those of LEACH-centralized (LEACH-C) and firefly algorithm (FA). HFAPSO presented notable accomplishments in utilizing the remaining energy in network nodes and in the throughput and number of alive nodes. In addition, life span in HFAPSO was increased by 20%-35% compared with those in LEACH-C and FA.
Various energy-aware RPLs and CH selection methods that use optimization algorithms are discussed in the related literature. The limitations of energy-aware RPLs are network traffic and communication overhead. Network traffic occurs in many protocols, while increasing network size and node size. Communication overhead also occurs as the number of network rounds increases. To address these issues, many researchers have proposed CH selection algorithms that use optimization. The limitation of many CH selection algorithms is that they take a long time to converge and identify the best CH in the cluster. In addition, finding the optimal CH for data exchange in a cluster is difficult in some algorithms. Thus, network nodes have a short life span in IoT applications. Accordingly, the current study proposes LOA for selecting CH in RPL to solve the aforementioned problems.

System Model
In LOA-RPL, nodes are deployed randomly across the network area. The network comprises 1 DODAG root and 200 DODAG nodes. Each node represents a lion, i.e., Lions = (L1, L2, . . ..,  Ln). A cluster is initially created via the Euclidean distance. Then, LOA is used to select the CH node. The route is eventually established by considering the RER metric. The network model of LOA-RPL is shown in Fig. 1. In addition, the following reasonable assumptions are considered in LOA-RPL: • Each node acquires a unique ID after deployment.
• All nodes are energy-constrained.
• DODAG nodes exhibit equal capabilities, and all are homogenous.
• The nodes in a network are randomly distributed.
• All nodes are deployed statically and will not support mobility.
• The sink collects data from the CH, and the CH gathers data from the cluster members (CMs). • All nodes can send data to the CH, and the CH transfers the data to the sink or the DODAG root. We also use a simplified channel model, which is either free space b 2 power loss or multipath fading b 4 power loss, depending on the distance between the transmitter and receiver units [51][52][53]. The energy consumption of node "g" transmits "r" bits of data to node "h" with respect to distance b(g,h). The calculation is given in Eq. (1). The threshold value B0 is calculated using Eq. (2).
The amount of energy required for receiving r bits of data from a participant node and its calculation is given in Eq. (3).

Proposed LOA-RPL
This study proposes LOA-RPL to maximize network lifetime in IoT. LOA-RPL has three steps: virtual cluster formation, CH selection, and route establishment. The Euclidean distance is applied to form clusters in the network. LOA is adopted to select the CH node in the cluster. Route establishment is performed using RER. A participant will forward network data to the root node in DODAG.

Cluster Formation
Nodes are distributed randomly in the network, and each node has its own coordinates (X i , Y i ). The distance "b" between two nodes (X 1 , Y 1 ) and (X 2 , Y 2 ) is calculated using the Euclidean distance, as given in Eq. (4).
The distance "b" between one node and all the other nodes is calculated using the Euclidean distance, and its calculation is given in Eq. (5).
In calculating the cluster center, the distance b i,j between the cluster center and a node's coordinates is less than or equal to the distance plus or minus the previous iteration's distance b i,j ± b i−1,j−1 . The calculation of the cluster center's point between two nodes is given in Eq. (6). We apply the same approach to all the nodes.
The cluster formation process in LOA-RPL is provided in Algorithm 1.

Algorithm 1: Cluster Formation
Input: N number of nodes Output: Number of clusters 1: Deploy "N" number of nodes 2: Compute the distance between two nodes b = (X 1 − X 2 ) 2 + (Y 1 − Y 2 ) 2 3: Compute the distance between one node and all the other nodes return number of clusters

CH Selection by Using LOA
LOA-RPL uses LOA to select the optimal CH node in the cluster. This algorithm consists of two phases: initialization and hunting [54].

Initialization Phase
LOA is a metaheuristic algorithm. Each node in the network is called a lion, and it can be represented as Lion = [L 1 , L 2 , . . . , L n ]. The fitness function measures the cost of each lion. The fitness function is similar to OF. Every node exhibits certain properties as input, and the output is found in the search space to obtain the solution. The fitness function in LOA considers the metrics, RER, and node degree to select the best node as the CH in each cluster.
RER: RER shows the residual energy in a network's RPL nodes [55]. Its calculation is given in Eq. (7).
Node Degree: The ratio in a particular node L i between the number of neighbors and the total number of nodes s in each cluster. The calculation of node degree L i is given in Eq. (8).
Degree(Node(L i )) = Number of neighbors (Li) Total number of nodes in each cluster (8) Fitness Function: The fitness function of each node L i is calculated from the routing metrics, RER, and node degree; and it is presented in Eq. (9). The weight values w 1 and w 2 vary from 0 to 1. The best fitness value of node L i is computed, where the values of w 1 and w 2 are 0.5 and 0.5, respectively.

Hunting Phase
The lions form a group called pride, and each pride contains a set of female, male, and cubs. Female lions from every pride hunt prey to provide food for their pride. In general, lions follow a hunting policy. A hunting policy consists of different groups: the left, right, and center wings.  In a hunting group, the group with the highest cumulative fitness value acts as the center wing and the remaining groups act as the left and right wings. Assume that the prey is considered the center of a hunting group. The prey calculation process is given in Eq. (10).
Number of hunters in each cluster (10) During the hunting process, hunters are chosen randomly from the cluster and the selected hunters attack the prey. Simultaneously, the prey tries to move to another location to escape the hunters. It obtains a new position, and the calculation is given in Eq. (11).
Prey newpos = prey oldpos + rand(0, 1) × PI fitness of hunter × (prey oldpos − hunter), (11) where prey oldpos indicates the current position of the prey, Prey newpos indicates the next position in the hunting process, and PI fitness of hunter indicates the percentage of improvement in the hunter's fitness value.
During the hunting process, the prey is encircled by the left and ring wings. The calculation is given in Eq. (12).

Figure 4: Encircling the center and wing lions
All the hunters try to attack the prey. If the hunter reaches the prey's position, the prey node acts as the CH node for a particular round. Otherwise, the prey will escape from the hunter. Similarly, the CH node is selected on a rotational basis until node energy expires in the network. The process of selecting the CH is described in Algorithm 2. Number of hunters in each cluster 5: If hunter and prey are in the same location, then 6: the prey node acts as the CH node 7: else 8: Update the positions of the hunter and prey 9: end 10: If the cumulative fitness value is the maximum in the round, then 11: the same node acts as the CH node 12: else 13: Proceed to the next round 14: end 15: If the node has RER, then 16: calculate the fitness value for selecting the CH node 17: else 18: Stop the round 19: end 20: return best CH node

Route Establishment
The routing process in LOA-RPL is established based on IETF's clustering RPL document [56]. The DODAG root initiates the sending of DODAG information object for cluster (DIOC) control messages to its CH node. The parent information is obtained by the participant CH node via the DIOC message. An OF is also used to select the most suitable parent node. Thereafter, the participant node sends the DODAG advertisement object for cluster (DAOC) control messages to the respective parent node. Finally, the DODAG root or parent CH node sends DAOC-acknowledgement messages to individual child nodes in DODAG. The route establishment process of LOA-RPL is illustrated in Fig. 5.

OF
The OF (RER) helps find the optimal parent node in DODAG during data transmission. LOA-RPL explores the routing metric RER to select the best CH parent node in the hierarchical clustering tree. RER displays the amount of energy that is currently available in the parent CH node. The calculation of RER is given in Eq. (14).

Cluster Rank Calculation
Cluster rank calculation is a process that shows the distance between the root of DODAG and the parent CH node. The cluster rank of node "x" is computed from the parent node (clusterRank(x)), and its rank increases. The increase in rank is determined from the step and the minimum hop rank increase value. The step is computed from the OF (RER). Moreover, the increase in value of LOA-RPL's minimum hop rank is 256 [57]. The cluster rank process is given in Eqs. (15) and (16).
Rank_increase = step + Min_hop_rank_increase (16) Figure 5: Route establishment process of LOA-RPL The route establishment process is described in Algorithm 3.

Algorithm 3: Route Establishment
Input: Parent CH node list Output: Optimal parent CH node 1: Participant CH parent node receives DIOC_RER 2: Calculate the cluster rank clusterRank(x) = Parent node(clusterRank(x)) + Rank_increase Rank_increase = step_value + Min hop rank increase 3: return optimal parent CH node The work flow of LOA-RPL is illustrated in Fig. 6.

Result and Discussions
The performance of the proposed LOA-RPL is evaluated on the network simulator ns-3 and then compared with those of RPL, FEEC-IIL, and RISA-RPL. In our simulation, we set 200 network nodes across a network area of 200 m × 200 m. Each node has an initial energy of 4 J. The data transmission rate is one packet per second. The sink is located at the top of the network area. In addition, traffic type is the constant bit rate (CBR), and the transmission range is 80 m. The base routing protocol is standard RPL. The increase in minimum hop rank is 256. The energy consumption amounts of E elec , E receive , E aggregate , E amp , and E transmit are 50 nj/bit, 0.055 μj/bit, 0.00012 μj/bit, 10 pj/bit/m 2 , and 0.039 μj/bit, respectively.

Average Power Consumption
Average power consumption indicates the amount of energy required by all the network nodes to perform various operations, such as transmit, receive, and aggregate operations from one node to another. Tab. 3 provides the average power consumption for the number of rounds. As the average power consumption increases, the number of round also increases.

PDR
PDR indicates the ratio between the number of data packet successfully sent by the participant and the number of data packets collected by the DODAG root. Fig. 9 depicts PDR by adjusting network size. The PDRs in RPL, FEEC-IIR, RISA-RPL, and LOA-RPL are 78, 96, 97, and 98, respectively, for a network size of 100. PDR increases by varying network nodes. Simultaneously, the default RPL decreases PDR as network size increases. The reason for this finding is as follows: FEEC-IIR, RISA-RPL, and LOA-RPL are clustering protocols, but RPL follows the multihop data transmission mechanism. In clustering, the data of several nodes are aggregated and forwarded to the DODAG root. Thus, packet losses are diminished during data transmission.

Throughput
Throughput denotes the number of data packets being transmitted over a specified time. Fig. 10 depicts throughput with respect to simulation rounds. The throughput in RPL, FEEC-RPL, RISA-RPL, and LOA-RPL is 2.2, 2.5, 2.8, and 3 Mbps, respectively, for a simulation round of 2000The throughput values increase as the simulation round increases. This achievement is attributed to the avoidance of packet losses during data transmission. Throughput is clearly high in the clustering protocol compared with that in the multihop data transmission protocol. In particular, LOA-RPL adopts the LOA algorithm to select the optimal node at the right time to act as the CH node, which collects data from CMs. Thus, LOA-RPL increases throughput and overall network performance.

Conclusions and Future Work
Energy conservation is a major challenge in IoT because IoT consists of highly resourceintensive nodes. Thus, the current study proposes LOA for selecting CH in RPL. LOA-RPL is implemented on cluster formation, CH selection, and route establishment operations. A cluster is formed using the Euclidean distance. CH selection is performed using LOA. Thus, this algorithm selects the optimal CH, rotates the nodes uniformly, and gradually depletes energy in the cluster nodes. Route establishment is performed using RER. Simulation is conducted on ns-3. The ultimate objective of LOA-RPL is to find the optimal CH in a cluster. The simulation result confirms that LOA-RPL outperforms RPL and RISA-RPL. LOA-RPL increases network lifetime and PDR by 10% and 5%-10% compared with RPL and FEEC-IIR, respectively. Furthermore, LOA-RPL reduces power consumption by 5%-10%.
We plan to extend our work in the future by considering a security aspect that defends against all types of attacks, such as wormhole, denial-of-service, and black hole attacks, to protect unauthorized access from the outside world. Furthermore, we intend to deploy nodes randomly in a network and analyze the performance of LOA-RPL in a real-time test bed implementation.

Conflicts of Interest:
The authors declare that they have no conflicts of interest to report regarding the present study.