# Manta Ray Foraging Optimization (MRFO)-Based Energy-Efficient Cluster Head Selection Algorithm for Wireless Sensor Networks

Authors: Mahmoud A. Khodeir; Jehad I. Ababneh; Bara’ah S. Alamoush
Journal: Journal of Electrical and Computer Engineering
 (2022)

---

## Abstract

Wireless sensor network (WSN) has become a very popular technology with a wide range of applications. It consists of several spatially distributed sensors that work collaboratively to monitor a given region of interest (ROI). The limited energy available for each sensor node is a crucial restriction that affects the overall performance of the network. Therefore, energy efficiency is a major concern in WSNs. Over the years, many techniques have been developed and used to reduce energy consumption in WSNs. Clustering is one of the most effective energy-saving techniques that significantly can improve the efficiency of WSNs in terms of the network lifetime, energy consumption, and the number of received packets. In this paper, an energy-efficient algorithm for cluster head (CH) selection based on a newly formulated fitness function and using the manta ray foraging optimization (MRFO) is proposed. The objective function for the proposed formulation takes into account different network parameters such as the average distance between the CH and the sensors in its cluster, the distance between CHs and the base station (BS), residual energy, and CH balancing. The proposed algorithm is tested by running many simulations under a variety of conditions. The simulation results showed that the proposed algorithm has a better performance than that of some other algorithms reported in the literature in terms of energy consumption, networks lifetime, and the number of received packets.


---

## Body

## 1. Introduction

WSN consists of a group of sensors that are distributed to monitor a physical environment in order to collect data and send it to a nearby central base station (BS) [1]. The sensor nodes, BS, and the end-users are the three elements that define the WSN structure [2].Sensor nodes are electronic devices that include a processor, storage, a transceiver module, single or multiple sensors, an analog-to-digital converter (ADC), and a power source (typically a battery) [2]. These nodes are small and cost-effective. Nowadays, WSNs are in charge of collecting and sending information from their surroundings [3]. As a result, their performance is significantly affected by their limited capabilities (typically reduced memory, limited battery, and processing capabilities). Moreover, wireless sensor nodes can communicate only in a local form with limited bundle of local neighbors due to the limited transmission power [4].As a result of their versatility in problem solving across many application domains, WSNs have become more popular, and they have the potential to change our lives in a variety of ways. Due to the rapid growth of sensor technology, very small and intelligent sensors have been developed, allowing WSNs to be used in a variety of applications such as military applications [5], area monitoring [6], transportation [6], medical/health applications [7], environmental applications [8], and many others. In general, the data collected by each sensor is sent to a BS (i.e., sink) to be analyzed [9]. This BS acts as an interface between users and WSN.Clustering methods are utilized for simple node management, improving scalability, reducing energy consumption, data aggregation, robustness, and load-balancing [10]. Clustering divides sensor nodes into virtual groups called clusters, where each group performs different roles. Clustering is characterized as the process of grouping nodes into clusters depending on predefined criteria and selects the most efficient node from each cluster to work as a CH [11]. The data from all sensor nodes is collected by the CH, aggregated, and then directly forwarded to the BS or through an intermediate CH. Instead of sending data from all sensor nodes in a cluster, the CH transmits the aggregated data in order to decrease the transmitted packets over the network and hence reduce the energy consumption. The data acquired from the CH node is further processed at the BS before it is made available to the end-users [10]. As a result, when choosing a sensor to serve as a CH, proper considerations should be given to the problem of sensor overload [12,13]. In addition, in the process of selecting a sensor to be a CH, important factors such as the distance between the CH and the sensors in its cluster (intracluster distance), the distance between CH and the BS (sink distance), and the residual energy of the sensor should be carefully considered [12].In this work, a novel clustering algorithm based on the manta ray foraging optimization (MRFO) is proposed to improve the performance of WSN. The proposed algorithm MRFO-C is used to solve the CHs selection problem formulated as an optimization problem using a new fitness function that takes into account intracluster distance, sink distance, CH balancing, and residual energy. Extensive simulations and tests of the proposed algorithm to design WSN are carried out under various conditions. The performance of the proposed algorithm is assessed and compared with that of some clustering algorithms reported in literature. The proposed algorithm outperformed some of the well-known reported algorithms in terms of the energy consumption, the network lifetime, and the number of received packets. The main contributions of this paper are as follows:(1)
The CHs selection problem is formulated as an optimization problem using a new fitness function based on many network parameters that considerably affect the network performance.(2)
Introducing the MRFO algorithm as a stable and efficient optimization algorithm to the WSN community.(3)
Reporting the use of the MRFO algorithm to solve CHs selection optimization problem and achieving optimal WSN performance in terms of the energy consumption, the network lifetime, and the number of received packets.(4)
Extensive simulations and assessments of the proposed algorithm to design WSN under various conditions are reported.The rest of this paper is organized as follows: Section2 discusses the related literature. The details of MRFO are given in Section 3. The assumptions and system model are given in Section 4. Details of the proposed algorithm are presented in Section 5. Section 6 has the results of this work. Finally, the conclusion of the paper is given in Section 7.


## 2. Related Work

In this section, related clustering algorithms are reviewed for both heuristic and nature-inspired based clustering approaches. Many clustering algorithms were developed depending on heuristic methods. For example, the low-energy adaptive clustering hierarchy (LEACH) is a very common algorithm for clustering depending on heuristic methods [14]. It is a protocol that organizes itself, adapts clusters, and introduces the concept of rounds. LEACH assumes that all sensor nodes are homogenous and have limited energy sources and that the BS is fixed and remote from the sensors. Sensors can constantly monitor the environment, communicate between them, and send data to the BS. The idea of LEACH is to select CHs based on predetermined probability. The disadvantage of LEACH is that it allows choosing a low-energy CH, which reduces the network's lifetime and hence decreases the network performance. As a result, various modifications to the LEACH algorithm have been proposed to improve its performance.The authors in [15] introduced LEACH-B (balanced) that proposes an upgraded version of LEACH by establishing the quasi-optimal number of CHs. In LEACH-B, a second phase of CH selection considers the residual power of the candidate node and adjusts the number of CHs based on this factor. LEACH-B is similar to LEACH in its selection of a random number, and in the way the threshold value is calculated. However, the LEACH-B added a new selection stage. In particular, all the selected candidates can be sorted in the order of residual power and only (n × p) of the candidates are chosen (where n is the total number of sensor nodes and p corresponds to the percentage of CHs). LEACH-B ensures the optimal number of CHs. However, it has the disadvantage of taking more time to select CHs.The energy-LEACH (E-LEACH) protocol was introduced by the authors in [16] to improve the CH selection procedure. It uses the node's residual energy as the primary metric to determine the possibility of turning a certain node into a CH. The E-LEACH protocol is divided into rounds in a way similar to that of LEACH protocol. Every node has the same chance of becoming a CH in the first round, implying that CHs are chosen randomly. After one round of communication, each node’s residual energy is different in the subsequent rounds, and this is taken into account when choosing the CHs. As a result, nodes with higher residual energies are more likely to become CHs than nodes with lower residual energies. The disadvantage is that the CHs must keep their receivers turned on at all times to receive data.M-LEACH is a similar algorithm to LEACH [17], with the exception that, rather than sending data to the BS directly, it forwards data to the next-hop CH node. However, it does not have cluster formation phase. Furthermore, it ignores important metrics such as energy and node degree in multihop data transfer between CHs.The PEGASIS algorithm [18] is one of the heuristic approaches that has been introduced to improve LEACH. In this algorithm, sensors are arranged in a chain and one of them is randomly chosen as the leader of the chain. In each round, the chosen leader collects data, fuses it, and sends it to the BS. Hence, the distance between the BS and the CH is not taken into account by this algorithm which is its main flaw. Another disadvantage is that the residual energy of a node is not taken into account during the CH selection process. The least distance clustering (LDC) has been proposed to improve the lifetime of WSNs [19]. Here, the non-CH nodes are assigned to the closest CH, which speeds up the cluster formation phase. The biggest downside of the LDC is that clusters might be formed in a wrong way.The EPEGASIS algorithm [20] is proposed to address the problem of hot spots in four ways. In order to proceed, the best communication distance must be determined in order to reduce transmission energy consumption. To protect dying nodes, a ten-threshold value is set, and mobile sink technology is used to balance node energy consumption. Then, depending on its distance from the sink node, the node can adjust its communication range.Many other clustering algorithms have been developed which are based on the application of natural methods. The author in [21] introduced LEACH-C. It should be mentioned here that, in LEACH, all nodes can choose CHs on their own, resulting in a large number of CHs. The LEACH protocol is improved in LEACH-C by allowing the BS to have information about the nodes such as the remaining energy and the location during the CH selection stage. Therefore, the BS selects the most appropriate nodes for CHs and the remaining nodes are used to form clusters. Extra overhead on the BS is a disadvantage of LEACH-C, which makes it incompatible with large-area networks. In [22], the authors proposed an extended LEACH protocol (FL-LEACH) that uses fuzzy logic to determine the number of CHs that should be selected in WSN. The complexity and accuracy of the fuzzification and defuzzification processes are the disadvantages of FL-LEACH.Due to their simple implementation, high quality solutions, quick convergence, and ability to escape from local optima [13], evolutionary techniques are preferred for solving optimization problems in a large search space [23]. Particle swarm optimization (PSO) [23], grey wolf optimization (GWO) [24], butterfly optimization (BOA) [25], genetic algorithm (GA) [26], and differential evolution (DE) [27] have all been used to solve the CH selection problem.PSO clustering (PSO-C) is an algorithm based on evolutionary approaches for clustering [23]. The CHs in PSO-C is chosen based on inter-cluster distances and the ratio of all nodes' initial energy to their current residual energy. On the other hand, the distance between the CH and the BS is an important factor that can have a significant impact on the network's energy consumption.A novel coverage control algorithm based on PSO is proposed in [28]. The sensor nodes are first deployed at random in a target area and remain stationary. The entire network is then divided into grids, with each grid’s coverage rate and energy consumption are calculated separately. Finally, the sensing radius of each sensor node is adjusted based on the grid’s coverage rate and energy consumption.Another popular clustering algorithm employing advanced techniques is the PSO-ECHS [13]. This algorithm chooses a CH based on the intracluster distance, the sink distance, and the sensor's residual energy. A fitness function is formulated using a linear combination of these parameters. However, when selecting CH, this algorithm ignores load-balancing. As a result, some big clusters and some small clusters could be formed resulting in relatively high energy consumption.The Global Levy Flight of Cuckoo Search with PSO is proposed to improve network performance by implementing balanced energy dissipation in [29].One more clustering algorithm that incorporates evolutionary processes is the enhanced energy-saving CH selection algorithm, which is based on the Whale Optimization Algorithm (WOA-C) [30]. The WOA-C algorithm supports the selection and use of a fitness function for energy-aware CHs selection. It takes the residual energy of the node and the total energy of nearby node into consideration. However, this approach disregards load balance, intracluster distance, and sink distance when selecting a CH.The energy-efficient cluster head selection algorithm uses a hybrid of HSA and PSO algorithms. This algorithm selects the head of clusters by calculating the target function value based on the maximum Euclidean distance of all nodes from their CHS, as well as the ratio of total energy of the network to the total energy of the CHs [31].TTDFP (Two-Tier Distributed Fuzzy Logic Based Protocol) is proposed to extend the lifetime of multihop WSNs by combining the efficiency of clustering and routing phases. TTDFP is a distribution adaptive protocol for sensor network applications. In this protocol, an optimization framework is used in combination with the two-tier fuzzy logic-based protocol to tune the parameters used in the fuzzy clustering tier in order to optimize the performance of a given WSN [32].In [33], a novel social spider optimization (SSO) algorithm for sensor networks clustering is proposed based on a simulation of spiders' social cooperative behavior. Nodes in the proposed algorithm resemble a swarm of spiders that interact with one another according to colony-specific biological rules. The fitness of nodes is also determined using fuzzy logic based on the two criteria of battery level and distance to sink.To improve the energy efficiency of rule-based fuzzy clustering algorithms, a modified clonal selection algorithm (CLONALG-M) is proposed. To elucidate the basic principles of an adaptive immune system, the CLONALG-M algorithm is used, which is based on the clonal selection principle. This principle is used to determine the approximate deployment of output-based membership functions that improve the performance of rule-based fuzzy clustering algorithms with previously known rule base and membership function shape [34].The modified clonal selection algorithm (CLONALG-M) is used to improve the performance of rule-based fuzzy routing algorithms. CLONALG-M is used to determine the approximate form of output membership functions, which improves the overall performance of fuzzy routing algorithms with known rule bases and membership function shapes [35].Another clustering algorithm that uses nature-inspired methodology is the LEACH-GA [36]. The algorithm has set-up and stationary stages and an additional preparation phase before the first cycle commences. All nodes select the head of the clusters during the preparation phase and send messages to the BS with candidate head, node IDs, and geographical positions. As the BS receives messages from all nodes, it employs a genetic algorithm to find the best CHs that reduce the total energy needed. During the next set-up phase, all nodes with optimal probability values broadcast advertisement messages to form clusters. Before the first-round set-up phase, the preparation stage is only performed once. The complexity of this algorithm and the additional overhead on the BS for calculating the percentage of CHs are its drawbacks. In [37], the firefly algorithm (FA) and hesitant fuzzy were proposed to implement a new CH selection protocol. This protocol calculates the score of each sensor node using three parameters to determine the best CHs. Three scenarios are simulated and evaluated to describe the performance of the proposed protocol.A novel trajectory scheduling method based on coverage rate for multiple mobile sinks (TSCR-M) is presented in [38]. This method is proven to be useful for large-scale WSNs. Finally, the authors in [39] proposed a method to handle high-order, high-dimension, and sparse sensor (HOHDST) network.


## 3. Manta Ray Foraging Optimization (MRFO)

### 3.1. Chain Foraging

Manta rays can detect planktons and swim toward them. The better the location is, the higher the concentration of planktons. Manta rays form a chain of fodder head to tail. With the exception of the first individual, all individuals should move not only towards the food but also towards each other. This means that in each iteration the best solution is achieved and the solution on the front of each individual is modified. The chain foraging mathematical model is given as in [40],(1)xidt+1xidt+r.xbestdt−xidt+αxbestdt−xidt,i=1,xidt+r.xi=1dt−xidt+αxbestdt−xidt,i=2,…,N,α=2.r.logr.Here, xidt is the position of ith individual in the dth dimension at time t, α is a weight coefficient, and r is a random vector in 0,1. xbestdt is the position of high-concentration planktons. The position of the ith individual is updated by the position xi−1t of the current i−1th individual and the position xbestt of the food.


### 3.2. Cyclone Foraging

Whenever planktons are viewed in deep water by manta rays community, they create a long drilling chain and swim in a spiral motion towards food. Each manta ray swims towards the one in front of it while spiraling towards the food. In 2D2−Dspace, an individual not only moves in a spiral path towards the food but also follows the one in front of it. The mathematical equation that can be used to model the spiral-shaped movement of manta rays in 2D space is given as follows [40]:(2)Xit+1Xbest+r.Xi−1t−Xit+ebwcos2πw.Xbest−Xit,Yit+1=Ybest+r.Yi−1t−Yit+ebwsin2πw.Ybest−Yit,where w is a number between 0 and 1 that is randomly chosen. This motion can be modified to model n−D space as follows [40]:(3)xidt+1=xbestdt+r.xbestdt−xidt+β.xbestdt−xidt,i=1,xbestdtr.xi−1dt−xidt+β.xbestdt−xidt,i=2,…,N,β=2er1T−t+1/T.sin2πr1,where β is the weighting coefficient, T is the largest number of iterations that can be executed, and r1 is a rand number in 0,1. The best approach found so far is cyclone foraging, which has a good exploitation of the area of interest. This behavior is also employed in order to enhance the exploration procedure. By assigning a new random location in the search space, individuals are forced to look for a new position far away from the best current one. This mechanism is primarily for exploration and it allows the MRFO to conduct a thorough search. The mathematical equation for this mechanism is as follows [40]:(4)xrandd=Lbd=r.UBd−LBDxranddt+r.xranddt−xid+β.xranddtxidti=1,xranddt+r.xi−1dt−xid+β.xranddtxidti=2,…,N,where LBd and UBd are the upper and lower limits of the d−th dimension, respectively, and xrantd is a randomly generated position throughout the search space.


### 3.3. Somersault Foraging

This behavior is thought to be centered on the position of the food. Each individual is swimming around the pivot and hanging in a new position. Thus, they always update their positions on the basis of the best position they have discovered so far. The following is the mathematical model of this strategy [34].(5)xidt+1=xid+S.r2.xbestd−r3.xidi=1,…,N.The somersault factor is denoted byS=2 which determines the manta rays range for the somersault while r2 and r3 are two random numbers in 0,1. By determining the somersault range, each individual can move to any position in a new search domain. Then, they are placed in the best position to be found between their current position and their symmetrical position as given in equation (5). The disturbance of the current position diminishes with the deterioration of the distance from the best position to the position of each individual. All individuals gradually come towards the best solution in the search space. As a result, the variety of hollow foraging decreases accordingly as the number of iterations increases. The dense areas around xbestd can be very useful, while the scarce ones can much help with exploration.MRFO begins with the creation of a random population in the problems field in a similar manner to other metaheuristic optimizers. Each individual updates its position with respect to the leading individual and the reference position at the end of each iteration. Thet/D value is reduced from 1/T to 1, in order to make an exploratory and exploitative search.


## 3.1. Chain Foraging

Manta rays can detect planktons and swim toward them. The better the location is, the higher the concentration of planktons. Manta rays form a chain of fodder head to tail. With the exception of the first individual, all individuals should move not only towards the food but also towards each other. This means that in each iteration the best solution is achieved and the solution on the front of each individual is modified. The chain foraging mathematical model is given as in [40],(1)xidt+1xidt+r.xbestdt−xidt+αxbestdt−xidt,i=1,xidt+r.xi=1dt−xidt+αxbestdt−xidt,i=2,…,N,α=2.r.logr.Here, xidt is the position of ith individual in the dth dimension at time t, α is a weight coefficient, and r is a random vector in 0,1. xbestdt is the position of high-concentration planktons. The position of the ith individual is updated by the position xi−1t of the current i−1th individual and the position xbestt of the food.


## 3.2. Cyclone Foraging

Whenever planktons are viewed in deep water by manta rays community, they create a long drilling chain and swim in a spiral motion towards food. Each manta ray swims towards the one in front of it while spiraling towards the food. In 2D2−Dspace, an individual not only moves in a spiral path towards the food but also follows the one in front of it. The mathematical equation that can be used to model the spiral-shaped movement of manta rays in 2D space is given as follows [40]:(2)Xit+1Xbest+r.Xi−1t−Xit+ebwcos2πw.Xbest−Xit,Yit+1=Ybest+r.Yi−1t−Yit+ebwsin2πw.Ybest−Yit,where w is a number between 0 and 1 that is randomly chosen. This motion can be modified to model n−D space as follows [40]:(3)xidt+1=xbestdt+r.xbestdt−xidt+β.xbestdt−xidt,i=1,xbestdtr.xi−1dt−xidt+β.xbestdt−xidt,i=2,…,N,β=2er1T−t+1/T.sin2πr1,where β is the weighting coefficient, T is the largest number of iterations that can be executed, and r1 is a rand number in 0,1. The best approach found so far is cyclone foraging, which has a good exploitation of the area of interest. This behavior is also employed in order to enhance the exploration procedure. By assigning a new random location in the search space, individuals are forced to look for a new position far away from the best current one. This mechanism is primarily for exploration and it allows the MRFO to conduct a thorough search. The mathematical equation for this mechanism is as follows [40]:(4)xrandd=Lbd=r.UBd−LBDxranddt+r.xranddt−xid+β.xranddtxidti=1,xranddt+r.xi−1dt−xid+β.xranddtxidti=2,…,N,where LBd and UBd are the upper and lower limits of the d−th dimension, respectively, and xrantd is a randomly generated position throughout the search space.


## 3.3. Somersault Foraging

This behavior is thought to be centered on the position of the food. Each individual is swimming around the pivot and hanging in a new position. Thus, they always update their positions on the basis of the best position they have discovered so far. The following is the mathematical model of this strategy [34].(5)xidt+1=xid+S.r2.xbestd−r3.xidi=1,…,N.The somersault factor is denoted byS=2 which determines the manta rays range for the somersault while r2 and r3 are two random numbers in 0,1. By determining the somersault range, each individual can move to any position in a new search domain. Then, they are placed in the best position to be found between their current position and their symmetrical position as given in equation (5). The disturbance of the current position diminishes with the deterioration of the distance from the best position to the position of each individual. All individuals gradually come towards the best solution in the search space. As a result, the variety of hollow foraging decreases accordingly as the number of iterations increases. The dense areas around xbestd can be very useful, while the scarce ones can much help with exploration.MRFO begins with the creation of a random population in the problems field in a similar manner to other metaheuristic optimizers. Each individual updates its position with respect to the leading individual and the reference position at the end of each iteration. Thet/D value is reduced from 1/T to 1, in order to make an exploratory and exploitative search.


## 4. WSN Models and Proposed Algorithm

### 4.1. Energy Model

In this paper, the adopted energy model is a first-order radio model [23]. In this model, the radio electronics and the power amplifier consume energy while transmitting data. However, only radio electronics consume energy while receiving data. The amount of energy consumed by the sensor node during transmission depends on the size of the data and the propagation distance d. Furthermore, the energy consumption of the sensor node increases if the propagation distance exceeds a certain threshold value as given in (6). In this model, the total energy consumed by each sensor node for transmitting l bits is calculated according to(6)ETXl,d=l∗Eelec+l∗Efs∗d2,ifd<d0,l∗Eelec+l∗Emp∗d4,ifd≥d0,where Eeleo denotes the amount of energy consumed per bit by the transmitter and receiver, Efs represents the energy consumed by the amplifier for free-space loss, Emp is the amplification energy, and d0 represents the threshold transmission distance.In the same way, the energy consumed while receivingl bits of data is calculated using(7)ERXl=l∗Eeleo.


### 4.2. Network Model

The following is a list of the network assumptions that are made:(1)
All sensors are assumed to be randomly positioned and to remain stationary once deployed over the sensing field(2)
In the sensing field, each sensor node is eligible to be selected as a CH or as a regular sensor node(3)
All sensor nodes are homogenous (i.e., they have equal and limited energy, in addition to having similar communication and processing capabilities)(4)
Every sensor node regularly sends data to its CH or BS(5)
The total number of sensor nodes exceeds the total number of CHs(6)
Based on the distance of transmission, the sensor nodes use different levels of transmission power(7)
When the nodes are within feasible communication range, wireless and symmetrical communication links are established(8)
The BS is stationary and can be placed within the sensing region or outside it


### 4.3. Problem Formulation and the Proposed Algorithm

First, the problem of CH selection is modeled as a constrained optimization problem. Then, the MRFO is implemented to solve the optiNjmization problem by finding the minimum value of the fitness function. This means that the CHs selection problem is formulated as a minimization problem [23]. In the proposed formulation, the CH algorithm depends on some parameters i.e., the distance between the sensor node and the CH, the distance from the BS to the CH, balance factor, and the residual energy. During CH selection, the position and residual energy of each sensor node will be sent to the BS to see if they meet the energy threshold (i.e., the mean energy of the sensor nodes). The formation of clusters is the next phase. The non-CH sensor nodes will join the nearest CH for cluster formation. To simplify the description of the formulation of the fitness function, the following terminologies are used:N: total number of live nodesM: total number of CHsS: all set of nodes in the WSN S=S1,S2,…,SNSCHS: the collection of CHs, SCHs=CH1,CH2,…,CHMNj: the number of nodes in cluster jdmax: the maximum range of communication of a sensor nodeRmax: the maximum range of communication of a CHTh: the threshold energy to become a CHdo: the threshold distanceEsi: the initial energy for a nodeECHj: the energy of the0020 jthCHCHj,1≤j≤MEavg: the average energy of all active nodesdissi,sj: the distance between the nodes Si and SjThe main goal of the proposed algorithm is to choose CHs from normal sensor nodes based on energy efficiency in order to extend the lifetime of the relevant network. For efficient CH selection with energy efficiency, we considered the residual energy of the sensor nodes, the average intracluster distance between the sensor nodes, the distance from CH to the BS, and cluster balancing.Now, letf1 be a function of the mean total distance between each sensor and its respective CH intracluster, and f2 is a function of the distance between the BS and the CH. For optimal CH selection, we must reduce f1 and f2. Moreover, let f3 be a function that is the reciprocal of all the CHs' total current energy. It is worth noting that this reciprocal, f3, should be minimized. Finally, f4 is the cluster balancing factor which must be reduced to balance the number of sensors in the cluster. As shown later, in order to obtain an energy-efficient algorithm for cluster head (CH) selection, the fitness function will be calculated using functions f1, f2, f3, and f4. The parameters responsible for the derivation of a newly formulated fitness function are as follows.The average intracluster distancef1 is calculated as the mean total distance between each sensor and its respective CH intracluster. During intracluster communication, all sensor nodes use some energy to send data to their CH. Therefore, the intracluster distance must be minimized in order to save energy and sensors closer to many other sensors are selected as CHs. The function f1 is given as follows [13]:(8)f1=∑j=1M1Nj∑i=1NjdissiCHj.The average sink distancef4 is calculated by dividing the distance between the BS and the CH by the total number of sensor nodes in a given cluster. All CHs must route their aggregated data to the BS, so the distance between the CH and the BS is important in terms of energy consumption. As a result, the distance between all CHs and the BS must be minimized to reduce energy consumption. f2 is given as follows [13]:(9)f2=∑j=1M1NjdisCHj,BS.The residual energyf3 is the sum of the current energy of the selected CHs. Since the total energy must be maximized, the reciprocal is taken into consideration when balancing each objective function. Because the lifetime of the network is determined by the amount of energy used, the reduction in energy consumption is critical. The function f3 is given as follows [13]:(10)f3=1∑j=1MECHj.The clusters balancingf3: the balancing factor is defined as the average number of nodes in a particular cluster to the total number of nodes. Because sensor nodes are randomly organized, some large and small clusters may be formed, so the cluster size must be balanced. The function f4 is given as in [41](11)f4=NjNℤ.The aforementioned parameters are used in the formulation of the fitness function collectively and significantly affect the energy consumed in the WSN.Rather than minimizing each fitness function individually, it is preferable to focus on the above fitness combination. As a result, the current fitness function is a linear combination of functions that depends on these parameters to reduce energy consumption. The proposed fitness function is given as(12)fmain=αf1+βf2+γf3+εf4.The intracluster distance, the sink distance, the residual energy, and the cluster balancing, respectively, are used to formulate the functionsf1, f2, f3, and f4. The weights α, β, γ, and γ are used to control the contribution of the different functions f1, f2, f3, and f4. These weights are used to satisfy α+β+γ+ε=1. To efficiently reduce energy consumption in a WSN, a trial-and-error procedure is used to determine the values of these variables.It is worth noting that there are alternative analytical and evolutionary optimization methods that can be used to solve multifunction optimization problems. However, we used a simple but effective model to handle the cluster head multifunction optimization problem. The problem is formulated as single objective function that represents a weighted some of all the functions to be optimized. The weights are used to emphasize the importance of some functions in reducing energy consumption. On the other hand, analytical model usually requires gradient information which can be easily avoided using evolutionary algorithm. Furthermore, the use of multiobjective optimization algorithm is computationally very expensive to solve the problem at hand.The MRFO algorithm is used to solve the optimization problem by determining the best set of CHs to minimize the fitness function in (12). The best set of CHs reduces the overall energy consumption and increases the networks lifetime. Table 1 shows the nomenclature used in the proposed algorithm.Table 1
Nomenclature.
SymbolDefinitionWSNWireless sensor networkMRFOManta-ray foraging optimizationCHCluster headBSBase stationMATLABMatrix laboratorySAThe set of active sensor nodesAThe number of active sensor nodesNTotal number of live nodes.PiIndividualNpPredefined search agent sizexbestThe best individual positionxitTheith individual’s position at time txi−1tThei−1t individual’s position at time txrandThe randomly generated position throughout the search space.In the implementation of the MRFO algorithm, individuals represent a set of CHs in the MRFO algorithm and the size of each set of CHs is set to 10% of the sensor nodes. The MRFO algorithm takes a set of active sensorsSA=s1,s2,s3,……,sA,A≤N, as inputs and the optimal set of CHs as outputs. The following steps summarize the MRFO algorithm’s implementation to solve the CHs selection problem:Algorithm 1: Algorithm for CHs selection.
(a)
Step 1: Initialize individualPj.(b)
Step 2: fori=1 to Np do(1)
Calculate fitness of each individualPj using equation (12).(2)
The best individualxbestEnd for(c)
Step 3: FORt = 0 to TR/∗TR  = Maximum number of iterations ∗/(i
) Fori=1: TO Np THEN(1)
Ifrand≤0.5 THEN \\ Cyclone foraging(2)
Ift/Tmax<rand THEN \\xrand=x1+rand.xu−x1,Xit+1=Xrand+r.Xrand−Xit+βXrand−Xiti=1,Xrand+r.Xi−1t−Xit+βXrand−Xiti=2,…,N.ElseXit+1=Xbest+r.Xbest−Xit+βXbest−Xiti=1,Xbest+r.Xi−1t−Xit+βXbest−Xiti=2,…,N.END ifELSE\\ Chain foragingXit+1=Xbest+r.Xbest−Xit+αXbest−Xiti=1,Xbest+r.Xi−1t−Xit+αXbest−Xiti=2,…,N.END IF(3)
Compute the fitness of each individualfxit+1, if fxit+1<fxbest(4)
THENxbest=xit+1(5)
\\Somersault foraging.xit+1=xit+S.r2.xbest−r3.xit.(6)
Compute the fitness of each individual.fxit+1 if fxit+1<fxbest(7)
THENxbest=xit+1END FOR(d)
Step 4: END FOR(e)
Step 5: Return the best solution found so far.xbest(f)
Step 6: The nearest sensor nodes toxbest are the selected CHs.(g)
Step 7: StopRegarding cluster formation, after the CHs have been chosen, non-CH nodes send request messages to the CH to join the cluster. The non-CH nodes are then permitted to join a cluster with the closest CH based on the shortest distance (Euclidean distance).Initialization and iterations make the most difference in calculating the computational complexity of MRFO-C. Initialization is performed in Step 1 of the algorithm. The complexity of iteration isONP. In the worst-case scenario, one for loop is started at Step 2 and executed individually up to the number of individuals. As a result, the degree of difficulty is ONP. In Step 3, the outer for loop is executed until the maximum number of iterations is reached. First, the for loop begins at line number Ci and continues until the number of individuals reaches NP, and the size of the individual reaches m. As a result, the complexity of Step 3 is OTrNpm. As a result, the proposed algorithm's overall complexity is ONP+ONPOTrNpm.The pseudocode of the proposed CH selection algorithm is shown in Figure1 while Figure 2 depicts the flowchart of the MRFO-based clustering algorithm.Figure 1
Pseudocode of the proposed MRFO-based CH selection algorithm.Figure 2
Flowchart of the MRFO-based clustering algorithm.


## 4.1. Energy Model

In this paper, the adopted energy model is a first-order radio model [23]. In this model, the radio electronics and the power amplifier consume energy while transmitting data. However, only radio electronics consume energy while receiving data. The amount of energy consumed by the sensor node during transmission depends on the size of the data and the propagation distance d. Furthermore, the energy consumption of the sensor node increases if the propagation distance exceeds a certain threshold value as given in (6). In this model, the total energy consumed by each sensor node for transmitting l bits is calculated according to(6)ETXl,d=l∗Eelec+l∗Efs∗d2,ifd<d0,l∗Eelec+l∗Emp∗d4,ifd≥d0,where Eeleo denotes the amount of energy consumed per bit by the transmitter and receiver, Efs represents the energy consumed by the amplifier for free-space loss, Emp is the amplification energy, and d0 represents the threshold transmission distance.In the same way, the energy consumed while receivingl bits of data is calculated using(7)ERXl=l∗Eeleo.


## 4.2. Network Model

The following is a list of the network assumptions that are made:(1)
All sensors are assumed to be randomly positioned and to remain stationary once deployed over the sensing field(2)
In the sensing field, each sensor node is eligible to be selected as a CH or as a regular sensor node(3)
All sensor nodes are homogenous (i.e., they have equal and limited energy, in addition to having similar communication and processing capabilities)(4)
Every sensor node regularly sends data to its CH or BS(5)
The total number of sensor nodes exceeds the total number of CHs(6)
Based on the distance of transmission, the sensor nodes use different levels of transmission power(7)
When the nodes are within feasible communication range, wireless and symmetrical communication links are established(8)
The BS is stationary and can be placed within the sensing region or outside it


## 4.3. Problem Formulation and the Proposed Algorithm

First, the problem of CH selection is modeled as a constrained optimization problem. Then, the MRFO is implemented to solve the optiNjmization problem by finding the minimum value of the fitness function. This means that the CHs selection problem is formulated as a minimization problem [23]. In the proposed formulation, the CH algorithm depends on some parameters i.e., the distance between the sensor node and the CH, the distance from the BS to the CH, balance factor, and the residual energy. During CH selection, the position and residual energy of each sensor node will be sent to the BS to see if they meet the energy threshold (i.e., the mean energy of the sensor nodes). The formation of clusters is the next phase. The non-CH sensor nodes will join the nearest CH for cluster formation. To simplify the description of the formulation of the fitness function, the following terminologies are used:N: total number of live nodesM: total number of CHsS: all set of nodes in the WSN S=S1,S2,…,SNSCHS: the collection of CHs, SCHs=CH1,CH2,…,CHMNj: the number of nodes in cluster jdmax: the maximum range of communication of a sensor nodeRmax: the maximum range of communication of a CHTh: the threshold energy to become a CHdo: the threshold distanceEsi: the initial energy for a nodeECHj: the energy of the0020 jthCHCHj,1≤j≤MEavg: the average energy of all active nodesdissi,sj: the distance between the nodes Si and SjThe main goal of the proposed algorithm is to choose CHs from normal sensor nodes based on energy efficiency in order to extend the lifetime of the relevant network. For efficient CH selection with energy efficiency, we considered the residual energy of the sensor nodes, the average intracluster distance between the sensor nodes, the distance from CH to the BS, and cluster balancing.Now, letf1 be a function of the mean total distance between each sensor and its respective CH intracluster, and f2 is a function of the distance between the BS and the CH. For optimal CH selection, we must reduce f1 and f2. Moreover, let f3 be a function that is the reciprocal of all the CHs' total current energy. It is worth noting that this reciprocal, f3, should be minimized. Finally, f4 is the cluster balancing factor which must be reduced to balance the number of sensors in the cluster. As shown later, in order to obtain an energy-efficient algorithm for cluster head (CH) selection, the fitness function will be calculated using functions f1, f2, f3, and f4. The parameters responsible for the derivation of a newly formulated fitness function are as follows.The average intracluster distancef1 is calculated as the mean total distance between each sensor and its respective CH intracluster. During intracluster communication, all sensor nodes use some energy to send data to their CH. Therefore, the intracluster distance must be minimized in order to save energy and sensors closer to many other sensors are selected as CHs. The function f1 is given as follows [13]:(8)f1=∑j=1M1Nj∑i=1NjdissiCHj.The average sink distancef4 is calculated by dividing the distance between the BS and the CH by the total number of sensor nodes in a given cluster. All CHs must route their aggregated data to the BS, so the distance between the CH and the BS is important in terms of energy consumption. As a result, the distance between all CHs and the BS must be minimized to reduce energy consumption. f2 is given as follows [13]:(9)f2=∑j=1M1NjdisCHj,BS.The residual energyf3 is the sum of the current energy of the selected CHs. Since the total energy must be maximized, the reciprocal is taken into consideration when balancing each objective function. Because the lifetime of the network is determined by the amount of energy used, the reduction in energy consumption is critical. The function f3 is given as follows [13]:(10)f3=1∑j=1MECHj.The clusters balancingf3: the balancing factor is defined as the average number of nodes in a particular cluster to the total number of nodes. Because sensor nodes are randomly organized, some large and small clusters may be formed, so the cluster size must be balanced. The function f4 is given as in [41](11)f4=NjNℤ.The aforementioned parameters are used in the formulation of the fitness function collectively and significantly affect the energy consumed in the WSN.Rather than minimizing each fitness function individually, it is preferable to focus on the above fitness combination. As a result, the current fitness function is a linear combination of functions that depends on these parameters to reduce energy consumption. The proposed fitness function is given as(12)fmain=αf1+βf2+γf3+εf4.The intracluster distance, the sink distance, the residual energy, and the cluster balancing, respectively, are used to formulate the functionsf1, f2, f3, and f4. The weights α, β, γ, and γ are used to control the contribution of the different functions f1, f2, f3, and f4. These weights are used to satisfy α+β+γ+ε=1. To efficiently reduce energy consumption in a WSN, a trial-and-error procedure is used to determine the values of these variables.It is worth noting that there are alternative analytical and evolutionary optimization methods that can be used to solve multifunction optimization problems. However, we used a simple but effective model to handle the cluster head multifunction optimization problem. The problem is formulated as single objective function that represents a weighted some of all the functions to be optimized. The weights are used to emphasize the importance of some functions in reducing energy consumption. On the other hand, analytical model usually requires gradient information which can be easily avoided using evolutionary algorithm. Furthermore, the use of multiobjective optimization algorithm is computationally very expensive to solve the problem at hand.The MRFO algorithm is used to solve the optimization problem by determining the best set of CHs to minimize the fitness function in (12). The best set of CHs reduces the overall energy consumption and increases the networks lifetime. Table 1 shows the nomenclature used in the proposed algorithm.Table 1
Nomenclature.
SymbolDefinitionWSNWireless sensor networkMRFOManta-ray foraging optimizationCHCluster headBSBase stationMATLABMatrix laboratorySAThe set of active sensor nodesAThe number of active sensor nodesNTotal number of live nodes.PiIndividualNpPredefined search agent sizexbestThe best individual positionxitTheith individual’s position at time txi−1tThei−1t individual’s position at time txrandThe randomly generated position throughout the search space.In the implementation of the MRFO algorithm, individuals represent a set of CHs in the MRFO algorithm and the size of each set of CHs is set to 10% of the sensor nodes. The MRFO algorithm takes a set of active sensorsSA=s1,s2,s3,……,sA,A≤N, as inputs and the optimal set of CHs as outputs. The following steps summarize the MRFO algorithm’s implementation to solve the CHs selection problem:Algorithm 1: Algorithm for CHs selection.
(a)
Step 1: Initialize individualPj.(b)
Step 2: fori=1 to Np do(1)
Calculate fitness of each individualPj using equation (12).(2)
The best individualxbestEnd for(c)
Step 3: FORt = 0 to TR/∗TR  = Maximum number of iterations ∗/(i
) Fori=1: TO Np THEN(1)
Ifrand≤0.5 THEN \\ Cyclone foraging(2)
Ift/Tmax<rand THEN \\xrand=x1+rand.xu−x1,Xit+1=Xrand+r.Xrand−Xit+βXrand−Xiti=1,Xrand+r.Xi−1t−Xit+βXrand−Xiti=2,…,N.ElseXit+1=Xbest+r.Xbest−Xit+βXbest−Xiti=1,Xbest+r.Xi−1t−Xit+βXbest−Xiti=2,…,N.END ifELSE\\ Chain foragingXit+1=Xbest+r.Xbest−Xit+αXbest−Xiti=1,Xbest+r.Xi−1t−Xit+αXbest−Xiti=2,…,N.END IF(3)
Compute the fitness of each individualfxit+1, if fxit+1<fxbest(4)
THENxbest=xit+1(5)
\\Somersault foraging.xit+1=xit+S.r2.xbest−r3.xit.(6)
Compute the fitness of each individual.fxit+1 if fxit+1<fxbest(7)
THENxbest=xit+1END FOR(d)
Step 4: END FOR(e)
Step 5: Return the best solution found so far.xbest(f)
Step 6: The nearest sensor nodes toxbest are the selected CHs.(g)
Step 7: StopRegarding cluster formation, after the CHs have been chosen, non-CH nodes send request messages to the CH to join the cluster. The non-CH nodes are then permitted to join a cluster with the closest CH based on the shortest distance (Euclidean distance).Initialization and iterations make the most difference in calculating the computational complexity of MRFO-C. Initialization is performed in Step 1 of the algorithm. The complexity of iteration isONP. In the worst-case scenario, one for loop is started at Step 2 and executed individually up to the number of individuals. As a result, the degree of difficulty is ONP. In Step 3, the outer for loop is executed until the maximum number of iterations is reached. First, the for loop begins at line number Ci and continues until the number of individuals reaches NP, and the size of the individual reaches m. As a result, the complexity of Step 3 is OTrNpm. As a result, the proposed algorithm's overall complexity is ONP+ONPOTrNpm.The pseudocode of the proposed CH selection algorithm is shown in Figure1 while Figure 2 depicts the flowchart of the MRFO-based clustering algorithm.Figure 1
Pseudocode of the proposed MRFO-based CH selection algorithm.Figure 2
Flowchart of the MRFO-based clustering algorithm.


## 5. Simulation Results and Comparison

MATLAB is used to implement the MRFO-C. Three different scenarios are used to test the protocol. To investigate the effect of the BS position, three different scenarios are created, in which we change the position of the BS. These three different scenarios for the position of the BS are considered in the current simulation findings. In scenario 1, the BS is placed at the center of the region of interest (ROI), and the BS is located in the corner of the ROI in scenario 2, while in scenario 3, the BS is placed outside the ROI. In the simulation, 10% of the total number of the nodes in a WSN is chosen as CHs. The performance of the proposed algorithm to design WSN is compared with that of some well-known clustering algorithms such as the PSO-ECHS algorithm in [13] and the LEACH algorithm in [14]. The simulation parameters for the proposed protocol are listed in Table 2.Table 2
Simulation parameter.
ParameterValueSize of monitoring area200 × 200 m2Base station location(100–300, 100–300)Number of sensor nodes300, 400, 500Energy of sensor node2 JPercentage of CHs10Eelec50 nJ/bitεfs10 pJ/bit/m2εmp0.0013 pJ/bit/m2dmax100 mdo30Packet length4000 bitsMessage size500 bitsNumber of search agents30Maximum number of iterations100The following metrics are used to evaluate the performance of the proposed algorithm:(1)
The total energy consumed in a number of rounds, during which the CHs collect, aggregate, and route data to the BS(2)
The networks lifetime is measured as the number of rounds until the last node death (LND)(3)
The total data packets received by the BS over the entire lifetime of the networkIt is worth noting that the MRFO-C algorithm may cause a search agent to have a new position outside the specific monitoring area (i.e.,200X200m2. As a result, the search agent’s updated position should be generated in such a way that it remains within the range of this monitoring area. In this case, we used the absorption rule for the boundary state. In particular, if the updated position is outside the monitoring area, then the new position will be changed to be at the edge of the monitoring areas; e.g., if the calculated updated position is −5.2,9.3, it will be changed to 0,9.3 The proposed algorithm is first used to find the best set of CHs for three different networks with 300, 400, and 500 sensor nodes and 30, 40, and 50 CHs, respectively. At the end of round 5000, the total energy consumption is calculated. First of all, Figure 3 shows a randomly deployed wireless sensor network with 300 sensor nodes in a monitoring area of 200×200m2.Figure 3
Random deployment of a wireless sensor network with 300 nodes.Figure4 shows the 30 CHs that are selected using the MRFO algorithm from the set of 300 sensor nodes in a monitoring area 200×200m2.Figure 4
Random deployment of a wireless sensor network with 300 nodes and 30 CHS selected by MRFO algorithm.Figure5 shows a randomly deployed wireless sensor network with 400 sensor nodes in a monitoring area of 200×200m2.Figure 5
Random deployment of a wireless sensor network with 400 nodes.Next, Figure6 shows the 40 CHs that are selected using the MRFO algorithm from the set of 400 sensor nodes in a monitoring area of 200×200m2.Figure 6
Random deployment of a wireless sensor network with 400-nodes and 40 CHS selected by MRFO algorithm.Another randomly deployed wireless sensor network but with 500 sensor nodes in a monitoring area of200×200m2 is shown in Figure 7.Figure 7
Random deployment of a wireless sensor network with 500 nodes.The 50 CHs selected using the MRFO algorithm from the set of 500 sensor nodes in a monitoring area of200×200m2 are shown in Figure 8.Figure 8
Random deployment of a wireless sensor network with 500 nodes and 50 CHS selected by MRFO algorithm.Figures9–11 show comparisons of the total energy consumptions for the 300-node network at three different positions for the BS. Hence, for the three positions of the BS, the total energy consumptions achieved by the proposed algorithm are lower than those for the PSO-ECHS and the LEACH algorithms. Namely, when comparing the MRFO to the PSO-ECHS, the overall energy consumption of the MRFO is reduced by 4.5% on average. Figures 12–17 show comparisons of the total energy consumption for the 400-node and 500-node networks for three different positions of the BS. In terms of the achieved total energy consumption, the proposed algorithm outperformed the PSO-ECHS and LEACH algorithms for the two networks and for all positions of the BS.Figure 9
Total energy consumption for 300-node network, 30 CHs when the BS is at the center of ROI.Figure 10
Total energy consumption for 300-node network, 30 CHs when the BS is at the corner of ROI.Figure 11
Total energy consumption for 300-node network, 30 CHs when the BS is at the outside the ROI.Figure 12
Total energy consumption for 400-node network, 40 CHs when the BS is at the center of ROI.Figure 13
Total energy consumption for 400-node network, 40 CHs when the BS is at the corner of ROI.Figure 14
Total energy consumption for 400-node network, 40 CHs when the BS is at the outside the ROI.Figure 15
Total energy consumption or 500-node network, 50 CHs when the BS is at the center of ROI.Figure 16
Total energy consumption for 500-node network, 50 CHs when the BS is at the corner of ROI.Figure 17
Total energy consumption for 500-node network, 50 CHs when the BS is at the outside the ROI.Tables3-5 show the total energy consumption achieved by the three algorithms (i.e., LEACH, PSO-ECHS, MRFO-C) at the end of round 5000 for various numbers of CHs. In terms of the total energy consumption, the proposed algorithm outperformed the other two algorithms.Table 3
Total energy consumption (in Joules) at round 5000 for 300-node network and 30 CHs.
AlgorithmBS centerBS cornerBS out fieldLEACH600600600PSO-ECHS423486523MRFO-C393465495Table 4
Total energy consumption (in Joules) at round 5000 for 400-node network and 40 CHs.
AlgorithmBS centerBS cornerBS out fieldLEACH800800800PSO-ECHS619658708MRFO-C592629681Table 5
Total energy consumption (in Joules) at round 5000 for 500-node network and 50 CHs.
AlgorithmBS centerBS cornerBS out fieldLEACH100010001000PSO-ECHS813843871MRFO-C782819839The different algorithms are then used to compare the lifetime of the network in terms of number of rounds for three different networks with sensor nodes of 300, 400, and 500 and CHs of 30, 40, and 50, and for different positions of the BS. Figures18-20 show the comparisons of the networks lifetimes for the three networks. It is demonstrated that the proposed algorithm outperformed the PSO-ECHS and the LEACH algorithms in terms of networks lifetime. Under various conditions, the proposed algorithm extended the lifetimes of the WSN. These findings support the importance and necessity of considering the sensor nodes’ residual energy during the CHs selection process in this proposed algorithm. A CH, in fact, uses more energy than regular sensor nodes. Therefore, the energy of a CH decreases faster than the energy of ordinary nodes. When a low-energy sensor node is selected, it can die quickly, disturbing the life of the network.Figure 18
Number of rounds (lifetime) for 300-node network with 30 CHs.Figure 19
Number of rounds (lifetime) for 400-node network with 40 CHs.Figure 20
Number of rounds (lifetime) for 500-node network with 50 CHs.To extend the network's life, CHs are chosen in the proposed method only from active sensor nodes with residual energies higher than the average residual energy. It can also be seen in Figure18-20 that the proposed algorithm has a longer network's lifetime when the BS is at the center of the monitoring area. As the BS moves from the center to the corner or outfield of the target area, the networks lifetime decreases [13].Finally, Figures21-23 show comparisons of the number of data packets received by the BS for the three different networks with sensor nodes of 300, 400, and 500, and CHs of 30, 40, and 50, and for different positions of the BS. It can be seen that the BS receives the most data packets during the lifetime of the network when the proposed algorithm was used. This is because both the energy consumption and the lifetime of the network directly affect the number of packets received at the BS. The number of the received packets is greater because the proposed algorithm consumes less energy and has a longer lifetime as compared with other algorithms. Moreover, if the BS is at the center of the ROI, the number of packets received shall be higher. When the BS is moved from the center to the corner or outside the ROI, the number of packets received decreases.Figure 21
Number of packets received for 300-node network with 30 CHs.Figure 22
Number of packets received for 400-node network with 40 CHs.Figure 23
Number of packets received for 500-node network with 50 CHs.Simulation in a large environment with a network size of 1000∗1000 with 1000 nodes is conducted to prove that the proposed protocol is scalable. Table 6 shows that the proposed protocol outperforms the PSO-ECHS algorithm in terms of networks lifetime.Table 6
Last node death round for 1000-by-1000 area and 1000 nodes.
AlgorithmLast node death roundPSO-ECHS1730MRFO-C1899


## 6. Conclusion

Manta ray foraging optimization (MRFO) is used to select cluster heads (CHs) in wireless sensor networks (WSNs) architecture. The CH selection problem in a WSN is formulated as an optimization problem using a new fitness function that takes into account various network parameters such as the average distance between the CH and the sensors in its cluster, the distance between CHS and the BS, residual energy, and CH balancing. The performance of the proposed clustering algorithm (MRFO-C) is evaluated and compared to that of the energy-efficient cluster head selections (PSO-ECHS) and the energy-efficient low-energy adaptive clustering hierarchy (LEACH) using extensive simulation results. The achieved results showed that the proposed algorithm outperformed the PSO-ECHS and LEACH algorithms in terms of energy consumption, networks lifetime, and the number of packets received. In particular, on average, the overall energy consumption achieved by MRFO-C is less than that achieved by the PSO-ECHS algorithm by 4.5%. In addition, the networks lifetime and the number of received packets achieved by MRFO-C are enhanced by 10% and 7%, respectively, compared to those achieved by the PSO-ECHS algorithm.



---

*Source: 5461443-2022-06-26.xml*