Energy-Efﬁcient Clustering Scheme for Flying Ad-Hoc Networks Using an Optimized LEACH Protocol

: A Flying Ad-hoc network constitutes many sensor nodes with limited processing speed and storage capacity as they institute a minor battery-driven device with a limited quantity of energy. One of the primary roles of the sensor node is to store and transmit the collected information to the base station (BS). Thus, the life span of the network is the main criterion for the efﬁcient design of the FANETS Network, as sensor nodes always have limited resources. In this paper, we present a methodology of an energy-efﬁcient clustering algorithm for collecting and transmitting data based on the Optimized Low-Energy Adaptive Clustering Hierarchy (LEACH) protocol. The selection of CH is grounded on the new optimized threshold function. In contrast, LEACH is a hierarchical routing protocol that randomly selects cluster head nodes in a loop and results in an increased cluster headcount, but also causes more rapid power consumption. Thus, we have to circumvent these limitations by improving the LEACH Protocol. Our proposed algorithm diminishes the energy usage for data transmission in the routing protocol, and the network’s lifetime is enhanced as it also maximizes the residual energy of nodes. The experimental results performed on MATLAB yield better performance than the existing LEACH and Centralized Low-Energy Adaptive Clustering Hierarchy Protocol in terms of energy efﬁciency per unit node and the packet delivery ratio with less energy utilization. In addition, the First Node Death (FND) is also meliorated when compared to the LEACH and LEACH-C protocols.


Introduction
Due to the significant need and importance of Flying Ad-hoc networks in diverse fields, such as defence, political, and industrial applications, a trend towards Wireless Sensors Network (WSN) has been seen in the last decade. WSN consists of a randomly deployed micro-sensor node collection in a given region and a minimum of one sink or Base Station (BS). The FANET contain several sensor nodes:

1.
The best way to monitor regions, minimize cost, and maximize network efficiency.

2.
Cut down the adverse impacts of the high mobility of UAVs.

3.
Traditional routing protocols cannot efficiently manage flying networks due to high node mobility and topology changes.
The range and mobility of UAVs are considered the second concern after energy consumption, and these are also assumed as the primary influencers for UAV network topologies [4,5].
Therefore, it is essential that a new routing protocol be created, which takes these factors into account and handles all the topological changes in the network. Because of the many problems faced by FANETS and the air-network settings, such a paper provides a pact for routing the UAV communication mechanism known as UAV-to-UAV communication. Moreover, with the help of this framework based on the Flying Ad-hoc network protocol, it facilitates optimal contact between UAVs. LEACH [3] is one of the notable WSN clustering routing protocols. In this sensor, nodes are collected in groups called clusters, and each one chooses one cluster as the leading cluster, called the cluster head, and the remaining nodes in a cluster are called cluster members [4]. Nodes collect information from their surroundings and relay it to their CH. Data from cluster participants obtained by CH are grouped, compressed, and delivered to the sink once they have been aggregated. By decreasing the number of transmission packets through cluster construction, the LEACH protocol improves the lifespan of WSNs. However, it does not take the distance or current node energy into account while selecting the cluster head, which is considered one of the various downsides. The CH only uses a single hop when communicating with the sink, which is another downside that makes LEACH irrelevant for vast networks.
This paper proposes a protocol using LEACH, which collects inputs consisting of gathered information about UAVs. Based on such knowledge, the selection of CH and Energies 2021, 14, 6016 3 of 20 contact routes that stay active for a long time may be developed. The main aim is to find highly autonomous routes (longer operating life), residual energy, and a better probability of delivery success. The best path, best connections, and improved network capacity can be achieved from the proposed routing protocols. This paper is disseminated as follows: Section 2 presents the background of the flying Ad Hoc Network (FANET) and the LEACH Protocol. Section 3 consists of the related work. In Section 4, our newly proposed routing protocol and the specifics of the implementation system are outlined. Section 5 covers the performance evaluation of the suggested routing protocol. Section 6 presents the conclusion and the future work.

Flying Ad Hoc Networks (FANETS)
After the mobile ad hoc mobile (MANET), vehicular ad-hoc vehicle (VANET), and with the help of wireless sensor networks, we have been able to move and operate new devices in a self-reliant way to create more complicated structures. In FANET, devices are commonly called unmanned aerial vehicles (UAVs), and UAVs have introduced a new network paradigm by which we can innovatively perform various operations. WSN comprises an autonomous sensor nodes network for environmental detection and monitoring of the region. These sensor nodes link together to form a wireless network arbitrarily placed in the required geographical region. All sensor nodes capture data and send it to the BS through wireless communication via other SNs. Each WSN node contains the four significant elements indicated in Figure 1. The power unit (usually batteries) is the only energy source to provide all other units, as follows: (1) Wireless transmission unit, consisting of two modules of radio frequency for emission and reception that provide wireless connectivity for linking the node to the network. (2) Sensing unit, incorporating the data attained by one or more sensors, and an ADC (Analog to Digital Converter) for converting a sensor-produced analogue signal into a numerical signal. (3) Treatment unit, whereby the CPU, storage, and routing protocol are the main parts.
This unit performs the protocols of communication that enable communication between nodes.
Energies 2021, 13, x FOR PEER REVIEW 3 of 20 contact routes that stay active for a long time may be developed. The main aim is to find highly autonomous routes (longer operating life), residual energy, and a better probability of delivery success. The best path, best connections, and improved network capacity can be achieved from the proposed routing protocols. This paper is disseminated as follows: Section 2 presents the background of the flying Ad Hoc Network (FANET) and the LEACH Protocol. Section 3 consists of the related work. In Section 4, our newly proposed routing protocol and the specifics of the implementation system are outlined. Section 5 covers the performance evaluation of the suggested routing protocol. Section 6 presents the conclusion and the future work.

Flying Ad Hoc Networks (FANETS)
After the mobile ad hoc mobile (MANET), vehicular ad-hoc vehicle (VANET), and with the help of wireless sensor networks, we have been able to move and operate new devices in a self-reliant way to create more complicated structures. In FANET, devices are commonly called unmanned aerial vehicles (UAVs), and UAVs have introduced a new network paradigm by which we can innovatively perform various operations. WSN comprises an autonomous sensor nodes network for environmental detection and monitoring of the region. These sensor nodes link together to form a wireless network arbitrarily placed in the required geographical region. All sensor nodes capture data and send it to the BS through wireless communication via other SNs. Each WSN node contains the four significant elements indicated in Figure 1. The power unit (usually batteries) is the only energy source to provide all other units, as follows: (1) Wireless transmission unit, consisting of two modules of radio frequency for emission and reception that provide wireless connectivity for linking the node to the network. (2) Sensing unit, incorporating the data attained by one or more sensors, and an ADC (Analog to Digital Converter) for converting a sensor-produced analogue signal into a numerical signal. (3) Treatment unit, whereby the CPU, storage, and routing protocol are the main parts.
This unit performs the protocols of communication that enable communication between nodes. As FANETS results in high mobility, stronger connectivity and expansion in device zones are the essential elements that differ from its predecessor MANET. Moreover, FANETs can travel independently in a three-dimensional space. It generalizes topologies from 2D to 3D by a free movement scheme due to the ability of the drones to run in 3D, as shown in Figure 2. Such a new technique has appealed to researchers and industry because it can provide the power to drive real-life applications. FANETs are commonly used to make connections with hard-to-access sites in regions with natural hazards and As FANETS results in high mobility, stronger connectivity and expansion in device zones are the essential elements that differ from its predecessor MANET. Moreover, FANETs can travel independently in a three-dimensional space. It generalizes topologies from 2D to 3D by a free movement scheme due to the ability of the drones to run in 3D, as shown in Figure 2. Such a new technique has appealed to researchers and industry because it can provide the power to drive real-life applications. FANETs are commonly used to make connections with hard-to-access sites in regions with natural hazards and for military applications. The traditional networks can scan the damage with the help of FANETs and automatically shut down after a disastrous incident (such as a seism, cyclone, storm, flood disaster, and dam breakage). In addition, UAVs can be fitted to furnish a continuous the BS on the ground can at some point be impossible in broad coverage areas.
However, hop-to-hop communication can solve this problem, whereby a routing protocol identifies the best route/path from source to destination [5]. The highly mobile UAVs ensure that the topology of the network will change over time. Thus, it is one of the critical problems to identify and manage routes [6]. Due to the routing protocols, the discovery, establishment, and maintenance of routes between two nodes through communication are possible. These protocols can reduce overhead and bandwidth usage. A FANET routing protocol is considered more complicated than fixed network protocols because of features such as the dynamic topology algorithm, mutual intervention, limited battery capacity, and the UAV's limited resources. With the high mobility of UAVs in FANET, it is possible that a UAV may not be at a sufficient distance to communicate with one another. Hence, it is necessary to choose alternate routes by using routing information. This link can be established across intermediate nodes in several hops. In other words, communication cannot be contained on each device's range of action but the sum of the radius of action of each device. The mobility of a UAV is also very significant for deciding the contact pathways and their spatial structure. These routes are generally reorganized, and as a result, allow continuous movement and interconnection between the UAVs. Therefore, it is essential to dynamically carry out the routing process to make UAVs more autonomous and reduce the delay-time between the source node and a target node [7]. FANETs are widely used to track regions with images or videos by using various sensors. Therefore, it is incredibly critical for the QoE metrics to assure the consistency of the video streaming and also ensure adequate data transmission.

Low-Energy Adaptive Clustering Hierarchy (LEACH)
For WSN, the Low-Energy Adaptive Clustering Hierarchy (LEACH) is a pioneering protocol for routing in clusters. The primary purpose is to improve the efficiency of energy usage by using a random number for rotation-based CH selection. In LEACH, activities are performed in several rounds, each with two phases: The setup-phase and steady-state. During the setup-phase process of CH selection, the cluster set up and the Multiple Access Time Division (TDMA) schedule assignment for the member nodes is carried out. Each node in the selection process of the CH participates by creating a random priority value However, hop-to-hop communication can solve this problem, whereby a routing protocol identifies the best route/path from source to destination [5]. The highly mobile UAVs ensure that the topology of the network will change over time. Thus, it is one of the critical problems to identify and manage routes [6]. Due to the routing protocols, the discovery, establishment, and maintenance of routes between two nodes through communication are possible. These protocols can reduce overhead and bandwidth usage. A FANET routing protocol is considered more complicated than fixed network protocols because of features such as the dynamic topology algorithm, mutual intervention, limited battery capacity, and the UAV's limited resources. With the high mobility of UAVs in FANET, it is possible that a UAV may not be at a sufficient distance to communicate with one another.
Hence, it is necessary to choose alternate routes by using routing information. This link can be established across intermediate nodes in several hops. In other words, communication cannot be contained on each device's range of action but the sum of the radius of action of each device. The mobility of a UAV is also very significant for deciding the contact pathways and their spatial structure. These routes are generally reorganized, and as a result, allow continuous movement and interconnection between the UAVs. Therefore, it is essential to dynamically carry out the routing process to make UAVs more autonomous and reduce the delay-time between the source node and a target node [7]. FANETs are widely used to track regions with images or videos by using various sensors. Therefore, it is incredibly critical for the QoE metrics to assure the consistency of the video streaming and also ensure adequate data transmission.

Low-Energy Adaptive Clustering Hierarchy (LEACH)
For WSN, the Low-Energy Adaptive Clustering Hierarchy (LEACH) is a pioneering protocol for routing in clusters. The primary purpose is to improve the efficiency of energy usage by using a random number for rotation-based CH selection. In LEACH, activities are performed in several rounds, each with two phases: The setup-phase and steady-state. During the setup-phase process of CH selection, the cluster set up and the Multiple Access Time Division (TDMA) schedule assignment for the member nodes is carried out. Each node in the selection process of the CH participates by creating a random priority value  (1) is greater than the random number generated by a sensor node between 0 and 1.
Here, p refers to the proportion of sensor nodes required to become CHs among all sensor nodes. The current round is indicated by r, and G is the number of sensor nodes not participating in the previous 1/p rounds of the CH election. A node in round r that became the CH will not be involved in the future 1/p rounds. Such a process gives every node an equal opportunity to turn into CH and allows equal energy dissipation throughout the sensor nodes. When a node is chosen as the CH, it sends out an advertising message to all other nodes in the network, as in the basic structure of LEACH shown in Figure 3. Sensor nodes join the corresponding cluster based on the received signal strength of the advertising message and send a joint message to its CH. CHs rotate in each round by producing a new advertising message centered on Equation (1) to spread the energy load in the sensor nodes equally. Following the creation of the cluster, each CH generates a TDMA schedule and distributes it to the cluster's members.  (1) is greater than the random number generated by a sensor node between 0 and 1.
Here, p refers to the proportion of sensor nodes required to become CHs among all sensor nodes. The current round is indicated by r, and G is the number of sensor nodes not participating in the previous 1/P rounds of the CH election. A node in round r that became the CH will not be involved in the future 1/P rounds. Such a process gives every node an equal opportunity to turn into CH and allows equal energy dissipation throughout the sensor nodes. When a node is chosen as the CH, it sends out an advertising message to all other nodes in the network, as in the basic structure of LEACH shown in Figure  3. Sensor nodes join the corresponding cluster based on the received signal strength of the advertising message and send a joint message to its CH. CHs rotate in each round by producing a new advertising message centered on Equation (1) to spread the energy load in the sensor nodes equally. Following the creation of the cluster, each CH generates a TDMA schedule and distributes it to the cluster's members. The TDMA schedule prevents data collisions between member nodes and allows one to go into sleep mode. If every sensor node recognizes its TDMA schedule, the set-up process is considered complete. The steady-state phase follows the set-up process. The TDMA schedule transmits sensed data from member nodes to the CH and from the CH to the BS in the steady-state process. Throughout their allotted time slot, the member nodes submit data to the CH. When one cluster member node transmits data to the CH during its allotted period, another cluster member node goes to sleep. LEACH's property eliminates collisions between clusters and energy dissipation, extending the battery life of all participant nodes. In addition, CHs gather and transfer data to BS directly from their cluster's members. Data are also transmitted from the CH to the BS using the TDMA plan that has been assigned. For data transmission, the CH detects the channel's states and waits if the channel is busy (another CH is using it); otherwise, it uses the channel to send data to the BS. Generally, LEACH is a fully distributed routing protocol. As a result, the protocol demands no extra information. The following are the key advantages of LEACH: 1. The clustering in the LEACH protocol reduces the amount of energy used for communication between sensor nodes and the BS, extending the network's longevity. 2. Data aggregation used by CH saves a significant amount of energy by reducing the associated data locally. The TDMA schedule prevents data collisions between member nodes and allows one to go into sleep mode. If every sensor node recognizes its TDMA schedule, the set-up process is considered complete. The steady-state phase follows the set-up process. The TDMA schedule transmits sensed data from member nodes to the CH and from the CH to the BS in the steady-state process. Throughout their allotted time slot, the member nodes submit data to the CH. When one cluster member node transmits data to the CH during its allotted period, another cluster member node goes to sleep. LEACH's property eliminates collisions between clusters and energy dissipation, extending the battery life of all participant nodes. In addition, CHs gather and transfer data to BS directly from their cluster's members. Data are also transmitted from the CH to the BS using the TDMA plan that has been assigned. For data transmission, the CH detects the channel's states and waits if the channel is busy (another CH is using it); otherwise, it uses the channel to send data to the BS. Generally, LEACH is a fully distributed routing protocol. As a result, the protocol demands no extra information. The following are the key advantages of LEACH: 1.
The clustering in the LEACH protocol reduces the amount of energy used for communication between sensor nodes and the BS, extending the network's longevity.

2.
Data aggregation used by CH saves a significant amount of energy by reducing the associated data locally. 3.
Nodes in the network are placed into sleep mode, which does not get a TDMS slot as CH assigned TDMA schedules. Thus, collisions within the cluster are prevented, and the sensor node battery life is extended.

4.
Every sensor node in the LEACH protocol has an equal probability of becoming the CH at least once. This randomized rotation of the CH increases the network lifespan.
However, LEACH, on the other hand, has several drawbacks, which are as follows: 1.
At the end of each cycle, the CH is selected at random from all sensor nodes. There would be an equal chance for both high-energy sensor nodes and low-energy sensor nodes to attain the tag of CH. If the CH is picked as the sensor node with the least energy, it will expire fast, the network's resilience is harmed, and the network's lifespan is reduced.

2.
LEACH does not guarantee the position and quantity of CHs in each round. In a basic LEACH, cluster formation is random, resulting in an unbalanced distribution of clusters in the network. 3.
CH's position in some clusters may be in the center of the clusters, while in others, the CH's location may be towards the cluster's edges. As a result, intra-cluster communication in this circumstance consumes more energy and reduces the sensor network's overall performance.
CH and BS communicate via the LEACH protocol using Single-Hop communication, as remote CHs consume more energy than CHs close to the BS. Thus, energy is dissipated unevenly, reducing the sensor network's lifespan.

Related Work
The selection of the CH based on residual energy is crucial as it affects network performance and lifetime. The network life duration will be extended if the chosen CH is a sensor node with the highest energy leftover among all the cluster members. LEACH-B (LEACH-Balanced) [6,7] is proposed as an improved variant of LEACH, which keeps the number of CHs practically optimal [8]. LEACH-B is a decentralization technique for the development of clusters that improves the choice of the CHs process, based on the residual energy of the nodes. LEACH-B is initially the same as the LEACH methodology, but in the case of CH selection, it adds a second phase that takes into account the remaining energy and ensures that each round has an equal number of CH.
The improved LEACH (I-LEACH) is a clustering routing system [9] in which the selection of CHs is based on residual energy, node location, and neighbors' numbers. The CH selection in the original LEACH algorithm is solely based on the pre-set threshold function, with no consideration for other parameters that affect the network's life duration. The I-LEACH solution solves this problem by incorporating the residual energy, the count of neighbors' nodes, and the distance to the BS factors in the threshold function.
LEACH-C is a centralized LEACH clustering method [10] that picks CHs based on the remaining energy of nodes and thus builds clusters in the network. LEACH-C employs a centralized technique to select the most proficient CH from a pool of nominated CHs, thereby addressing the efficiency issue raised by the conventional LEACH protocol [11]. Sensor nodes send information to the sink about their remaining energy and position in the first phase. The sink computes the average energy of nodes grounded on these data and then determines which nodes will be CHs. As a result, in this round, nodes with more leftover energy than the average will be chosen as CHs. The rest become various regular sensor nodes, and the steady phase is the same as LEACH.
The mobility element in the standard LEACH algorithm is included in LEACH-M (Mobile LEACH) [12]. During the set-up and steady phases, this mobility affects both CHs and cluster member nodes, although the BS is assessed as stationary in the original LEACH. CHs are selected from the pool of nodes according to the least attenuation and are the nodes with minimum mobility among all nodes. The elected CHs then communicate their choice in the transmission frequency to all nodes. According to LEACH-M authors, all nodes are initially homogeneous, and GPS may be used to search for sensor nodes. LEACH-M elects CHs using the same threshold function as LEACH; however, unlike LEACH, LEACH-M considers node mobility during the data transmission step. In [13], the authors suggested VH-LEACH, an upgraded V-LEACH technique. The main goal of this protocol is to modify the way a CH is elected. The CH is chosen in the VH-LEACH algorithm based on the largest residual energy. First, clusters are formed, and then CHs are selected. Every CH collects information about the cluster members' remaining energy. Following that, the CH selects a VH (Vice Cluster-Head) with the max left-over energy within the cluster.
In [14], the authors presented LEACH-T, a unique LEACH-based clustering routing protocol that allows the number of time slots in TDMA of each CH to be fixed based on the count of cluster member nodes. LEACH-T takes into consideration the residual energy of nodes throughout the cluster formation phase, resulting in an optimum number of CHs. T-LEACH incorporates changeable time slots for different CHs in the steady phase. In the LEACH-T approach, a dynamic mechanism to assign time slots (TDMA) depending on the number of cluster members is used instead of on a certain fixed allocation of time slots to CH. This means that if the number of nodes inside the cluster is minimal, the CH should only be allocated a few time slots and major time slots should be allocated if the number of member nodes is enormous. As a result, it may either transfer data from CHs from a single hop or use multi-hop to the sink.
In [15], the authors proposed a Time-based Cluster-Head Selection Algorithm for LEACH (TB-LEACH), which alters the CH selection process to maximize the network's life cycle. Set-up and steady stages are the two primary phases of TB-LEACH. Instead of the random selection of CHs used in LEACH, the TB-LEACH algorithm picks CHs based on a random timer in the first phase. The number of CHs in each round is fixed, unlike LEACH, and is denoted by a counter. The TB-LEACH (Time-based LEACH) was introduced by [15] to modify the process of CH selection for enhancing a network's life cycle. The two main phases of TB-LEACH are establishment and steady steps. The TB-LEACH algorithm selects CH based on a random timer in the first phase instead of the random selection of CHs used in LEACH. As opposed to LEACH, in each round, the number of CHs is fixed and indicated by a counter. If the random duration expires and the counter fails to reach the required number of CHs, the node broadcasts a CH-ADV advertisement message to all nodes in the current round, announcing that it has become a CH via CSMA, even if the node is not a CH node (normal node). Following the determination of CHs, the remaining tasks are identical to the LEACH algorithm.
In [16][17][18][19], the authors the Energy-Aware Distance-based Cluster Head selection and Routing (EADCR) to extend the network lifespan of WSNs using the Fuzzy C-Means (FCM), residual energy of nodes, Euclidean distance from the BS, and cluster centroid. Clusters are formed in the EADCR by employing the FCM method at the BS. Then, using a fitness function, each cluster chooses its CH, and the initial energy and residual energy of all nodes influence the fitness function. Table 1 shows a comparison of LEACH descendants, Table 2 describes advantages and disadvantages, and in Table 3, a comparison is conducted on the basis of various parameters.  -Considers leftover energy after the initial turn -Improves the longevity of the network.
-Growth in overhead cost.

LEACH-C Centralized
-optimum no. of clusters.
-high no. of turns in a small network zone -The residual energy is the key for CH selection.
-The strategy of centralization provides better distribution of CHs. -CH combines received data to save costs of further data transfer, but nodes that receiving different data it is not practical.

LEACH-VH
Energy efficiency -CHs selection on the fundament of the leftover energy.
-Substitutes CH by VH node when the main CH attains a threshold.

Proposed Methodology
This paper suggests an energy consumption management methodology based on the LEACH protocol to solve the energy overloading issue. This protocol also functions with the concept of around. The period between attaining a new clustering and data collection was repeatedly carried out with this new clustering known as around. The suggested clustering protocol follows the same two phases as in the existing LEACH protocol. The first is the setup phase, in which the establishment process of clusters and the selection of CHs (cluster head) are exerted, and the steady-state phase deals with the data transmission but with specific enhancements. Each node determines whether to become a cluster head for the current round during the setup phase. If the number of cluster heads is decreased, then every cluster head would occupy a wider area, which will cause a problem as certain cluster members will be far from their cluster heads and use a lot more energy for communication [20]. The exceeding count of cluster heads will heighten the entire network's energy consumption and expurgate network life due to the connection among the CH. The BS requires much more power than ordinary procedures. The CH is chosen according to the threshold value with specific energy-dependent characteristics, but in the original LEACH protocol, the CH is selected randomly without energy usage. Therefore, to achieve minimal energy consumption, it is crucial to select the optimal cluster and cluster head [21].

Cluster Formulation and Cluster Head Selection
In our recommended protocol, all nodes are presumed as a separate cluster, and all nodes instituting a cluster are candidates for CH selection shown in Figure 4. In the process of selecting CH, all CH applicant nodes also require their current energy and residual energy information in addition to the existing LEACH protocol threshold T(n) [22]. This is done to reduce the chance of selecting a node with low energy and to match the network's overall energy load distribution. If a low energy node is selected as a CH, it might induce the imbalanced use of the overall energy of the network. By picking a random number between 0 and 1 for all regular nodes, if the selected number is less or equal to the T(n) value, which Equation (1) can obtain, then the node becomes a cluster head for the current round' otherwise, a node will remain as an ordinary node in a cluster.
In this equation, p refers to the proportion of sensor nodes required to become CHs among all sensor nodes, r is the current round, and G is the set of candidate nodes for the cluster head that has not been picked as a CH in the past 1/p rounds.
Re is the residual energy of the node in the network calculated by Equation (3), Dr is the drain rate of the node (the method to report the rate at which energy is degenerated at a specified node)m and ARe and ADr are the average residual energy and average drain rate.
The function to compute the residual energy of the nodes in the network is as follows: where INT i is the Initial energy of a node and CET i is the current energy.  The function to compute the residual energy of the nodes in the network is as follows: where INTi is the Initial energy of a node and CETi is the current energy. A node selects a CH nearest to it rather than choosing a CH that is closest to the base station. The distance between the node to every CH and further every CH to the Base station is calculated. To calculate the distance between each node and the CH, and the CH and the BS, we calculated the Euclidean distance.
The minimum distance formula between two locations in the xyz-space is stated as the square root of the sum of the squares of the differences between corresponding coordinates.
When a node has chosen a cluster head with a minimum distance, the cluster head receives a message stating that the distance is minimal and that it will be part of the cluster. This procedure is repeated for all of the nodes, or for the number of rounds necessary, before choosing the right cluster head for them as shown in below mentioned Algorithm 1.

Algorithm 1 for Setup phase:
Some Notations used in algorithm:  A node selects a CH nearest to it rather than choosing a CH that is closest to the base station. The distance between the node to every CH and further every CH to the Base station is calculated. To calculate the distance between each node and the CH, and the CH and the BS, we calculated the Euclidean distance.
The minimum distance formula between two locations in the xyz-space is stated as the square root of the sum of the squares of the differences between corresponding coordinates.
When a node has chosen a cluster head with a minimum distance, the cluster head receives a message stating that the distance is minimal and that it will be part of the cluster. This procedure is repeated for all of the nodes, or for the number of rounds necessary, before choosing the right cluster head for them as shown in below mentioned Algorithm 1.

Steady-State Phase
Following the sending of a petition message from ordinary nodes, the cluster heads execute the Time-division multi-access (TDMA) procedure for every node. The TDMA scheduling gives every member node a timescale and ensures that each node is permitted to send in its particular time frame only or is permitted to wait and go into sleep mode, by which the set-up phase is completed.
The steady-stage phase begins after the setup stage ends, identically as in the LEACH protocol. However, in our proposed protocol, we added a feature to prevent redundant data from being sent to the base station. As in this, common nodes collect data from the local surroundings. Each node then transmits the collected data to the CH, which was previously selected in the setup phase and is in its own allocated TDMA time slot. The steady-stage phase begins after the setup stage ends, identically as done in the LEACH protocol. However, in our proposed protocol, we had added a feature to preclude surplus data [23,24] from being sent to the base station. The CH combines collected data from its various parts, and a data compression algorithm is executed to commingle the data. Now, on the compressed data, an essential XOR operation is executed on the data sensed by the neighbor nodes to prevent the CH from sending duplicate data to the BS. In the XOR procedure, the scrambling of data in bits is done. In this, the data that produces the result as 'True' are considered duplicate, and the opposite with a 'False' outcome case. The duplicate collected data will not be sent if the data sent out are identical as compared bit by bit [23]. Thus, it avoids sending duplicate data again and also decreases the amount of data sent to BS. Hence, as a result, the entire network will use less energy. The energy consumed for data transmission is determined through the cluster head involvement and estimated by equation [24][25][26][27][28] below.
Total ER (Packet data , d) is the reduction of energy, which is carried out while sending packet data, Ec is the amount of energy reduced through the transmitter and receiver circuit, E fst is the amplifier parameter for transformation constituting the free-space technique, and d is the distance between the CH and the ordinary node (Euclidean distance).
The degree of reduction in energy is calculated by the equation mentioned below: Total ER (Packet data , d) = Ec * (Packet data ) + €mp (Packet data ) * d 2 (5) €mp is the amplifier parameter for transformation constituting the multi-path fading model.

Experimental Results, Analysis, and Discussion
This section of results and discussions presents the performance evaluation and comparison between our proposed LEACH-EE protocol with LEACH and LEACH-C protocols. We use some essential metrics for the evaluation process, such as the cluster headcount and the building time for a cluster, energy usage, network lifetime, and the probability of success. In this experimentation, we use MATLAB as a simulation environment. Table 4 shows other parameter settings for the simulation process. One hundred FANETS are set up arbitrarily in the area of 100 m × 100 m square meters. As depicted in Figure 5, the BS node is placed at position (50, 50).
Energies 2021, 13, x FOR PEER REVIEW 14 of 20 headcount and the building time for a cluster, energy usage, network lifetime, and the probability of success. In this experimentation, we use MATLAB as a simulation environment. Table 4 shows other parameter settings for the simulation process. One hundred FANETS are set up arbitrarily in the area of 100 m × 100 m square meters. As depicted in Figure 5, the BS node is placed at position (50, 50).

Number of Clusters
Optimizing the clustering number would result in more efficient energy usage as it will automatically minimize energy consumption. Moreover, if the number of clusters is below the optimum value, more nodes are further away from CHs, causing more rapid network energy consumption. If cluster numbers exceed the optimum number, this will result in a high number of CHs required to send data to the BS covering long distances. In Figure 6, all three protocols are compared, and the relationship between several cluster and node placements can also be seen in Figure 5. headcount and the building time for a cluster, energy usage, network lifetime, and the probability of success. In this experimentation, we use MATLAB as a simulation environment. Table 4 shows other parameter settings for the simulation process. One hundred FANETS are set up arbitrarily in the area of 100 m × 100 m square meters. As depicted in Figure 5, the BS node is placed at position (50, 50).

Number of Clusters
Optimizing the clustering number would result in more efficient energy usage as it will automatically minimize energy consumption. Moreover, if the number of clusters is below the optimum value, more nodes are further away from CHs, causing more rapid network energy consumption. If cluster numbers exceed the optimum number, this will result in a high number of CHs required to send data to the BS covering long distances. In Figure 6, all three protocols are compared, and the relationship between several cluster and node placements can also be seen in Figure 5.

Nodes Deployment Diagram
represents the BS and • is considered as ordinary sensor nodes.

Number of Clusters
Optimizing the clustering number would result in more efficient energy usage as it will automatically minimize energy consumption. Moreover, if the number of clusters is below the optimum value, more nodes are further away from CHs, causing more rapid network energy consumption. If cluster numbers exceed the optimum number, this will result in a high number of CHs required to send data to the BS covering long distances. In Figure 6, all three protocols are compared, and the relationship between several cluster and node placements can also be seen in Figure 5.

Consistency in Number of Cluster Head
The number of cluster heads highly impacts the energy efficiency of the protocol. If the count of cluster heads is small, the data transmission period of sensor nodes to CH would be too long, leading to additional energy consumption. Excess data transmission by the cluster will also lead to overconsumption of energy. The overall network load increased as the number of cluster heads grew. Even with this, the total energy consumption per round of networks had also been raised. It degrades the network fusion efficiency of data, and the life of the network shrinks. Figure 7 exhibits the details about the LEACH Protocol, the LEACH-C Protocol, and our proposed EE-LEACH protocol headcounts per round. The variation in the cluster head number can be seen in the figure below as the LEACH Protocol has high fluctuation in the cluster head number due to the cluster headcount being randomly dependent on the threshold function model, which has high randomness. From Figure 7, we can see that the cluster headcount fluctuates in the range of 4 ≤ k ≤ 16 in the LEACH protocol, 2 ≤ k ≤ 14 in LEACH-C, while in the proposed protocol it is 3 ≤ k ≤ 10, which is the most optimal. The proposed protocol calculates the optimal cluster headcount based on the threshold that includes some energy parameters, thereby helping in reducing the randomness of cluster headcounts.

Consistency in Number of Cluster Head
The number of cluster heads highly impacts the energy efficiency of the protocol. If the count of cluster heads is small, the data transmission period of sensor nodes to CH would be too long, leading to additional energy consumption. Excess data transmission by the cluster will also lead to overconsumption of energy. The overall network load increased as the number of cluster heads grew. Even with this, the total energy consumption per round of networks had also been raised. It degrades the network fusion efficiency of data, and the life of the network shrinks. Figure 7 exhibits the details about the LEACH Protocol, the LEACH-C Protocol, and our proposed EE-LEACH protocol headcounts per round. The variation in the cluster head number can be seen in the figure below as the LEACH Protocol has high fluctuation in the cluster head number due to the cluster headcount being randomly dependent on the threshold function model, which has high randomness. From Figure 7, we can see that the cluster headcount fluctuates in the range of 4 ≤ k ≤ 16 in the LEACH protocol, 2 ≤ k ≤ 14 in LEACH-C, while in the proposed protocol it is 3 ≤ k ≤ 10, which is the most optimal. The proposed protocol calculates the optimal cluster headcount based on the threshold that includes some energy parameters, thereby helping in reducing the randomness of cluster headcounts.

Consistency in Number of Cluster Head
The number of cluster heads highly impacts the energy efficiency of the protocol. If the count of cluster heads is small, the data transmission period of sensor nodes to CH would be too long, leading to additional energy consumption. Excess data transmission by the cluster will also lead to overconsumption of energy. The overall network load increased as the number of cluster heads grew. Even with this, the total energy consumption per round of networks had also been raised. It degrades the network fusion efficiency of data, and the life of the network shrinks. Figure 7 exhibits the details about the LEACH Protocol, the LEACH-C Protocol, and our proposed EE-LEACH protocol headcounts per round. The variation in the cluster head number can be seen in the figure below as the LEACH Protocol has high fluctuation in the cluster head number due to the cluster headcount being randomly dependent on the threshold function model, which has high randomness. From Figure 7, we can see that the cluster headcount fluctuates in the range of 4 ≤ k ≤ 16 in the LEACH protocol, 2 ≤ k ≤ 14 in LEACH-C, while in the proposed protocol it is 3 ≤ k ≤ 10, which is the most optimal. The proposed protocol calculates the optimal cluster headcount based on the threshold that includes some energy parameters, thereby helping in reducing the randomness of cluster headcounts.  If a significant number of dead nodes are present in the network, the overall capacity of the cluster will be decreased accordingly to balance the energy consumption of the network.

Cluster Lifetime
A life cycle for a cluster is the cumulative time from creation to disposition for the cluster. When the clustering algorithm is executed, the FANETS node with the most appropriate value is elected as CH and takes over the cluster's task. We can track the life cycle of the FANET's nodes with a measurement parameter with two parts, a stable period and an irregular period. However, in our case, we mainly use the time between the first node death and the last node death, which is known as the unstable period. FANETS are mainly used for environmental monitoring as a wide range of sensor nodes are deployed over a wide distribution of area. If a large number of nodes dies, the collected information would not be able to reach its destination. The time from the FND to the last death node (LND) indicates that the period is uncertain. These strategies can be employed in environmental surveillance and disaster management since a broad area is needed to place sensor nodes. The wide range means that specific data obtained cannot effectively evaluate the surrounding factors in the case of the death of many nodes.
This research also analyzes network life using FND and shows several clear advantages while evaluating our proposed methodology compared to the two protocols. As shown in Figure 8, the FND has 1710, 2022, and 2618 rounds and LND has 2343, 2786, and 3990 under three protocols. Compared with LEACH and LEACH-C, our proposed algorithm increased FND by 53% compared with LEACH and 30% compared to LEACH-C. If a significant number of dead nodes are present in the network, the overall capacity of the cluster will be decreased accordingly to balance the energy consumption of the network.

Cluster Lifetime
A life cycle for a cluster is the cumulative time from creation to disposition for the cluster. When the clustering algorithm is executed, the FANETS node with the most appropriate value is elected as CH and takes over the cluster's task. We can track the life cycle of the FANET's nodes with a measurement parameter with two parts, a stable period and an irregular period. However, in our case, we mainly use the time between the first node death and the last node death, which is known as the unstable period. FANETS are mainly used for environmental monitoring as a wide range of sensor nodes are deployed over a wide distribution of area. If a large number of nodes dies, the collected information would not be able to reach its destination. The time from the FND to the last death node (LND) indicates that the period is uncertain. These strategies can be employed in environmental surveillance and disaster management since a broad area is needed to place sensor nodes. The wide range means that specific data obtained cannot effectively evaluate the surrounding factors in the case of the death of many nodes.
This research also analyzes network life using FND and shows several clear advantages while evaluating our proposed methodology compared to the two protocols. As shown in Figure 8, the FND has 1710, 2022, and 2618 rounds and LND has 2343, 2786, and 3990 under three protocols. Compared with LEACH and LEACH-C, our proposed algorithm increased FND by 53% compared with LEACH and 30% compared to LEACH-C.

Residual Energy
The energy utilization of nodes is categorized primarily into three sections: Data transfer, data receipt, and cluster negotiation communication. The more extended nodes that are alive, the more uniform energy usage there will be. The result is that the energy usage by the proposed protocol is highly consistent compared to LEACH and LEACH-C, as shown in Figure 9. The approach suggested in the paper decreases energy consumption across the clusters and energy consumption within the cluster.

Residual Energy
The energy utilization of nodes is categorized primarily into three sections: Data transfer, data receipt, and cluster negotiation communication. The more extended nodes that are alive, the more uniform energy usage there will be. The result is that the energy usage by the proposed protocol is highly consistent compared to LEACH and LEACH-C, as shown in Figure 9. The approach suggested in the paper decreases energy consumption across the clusters and energy consumption within the cluster. Energies 2021, 13, x FOR PEER REVIEW 17 of 20

Probability of Delivery Success
Energy is one of the best and most efficient properties for FANETS nodes. FANETS usually have a small dry-cell battery and can operate for only a couple of minutes, about 30 to 50 min. The broad application of these FANETS is affected by this limited amount of energy. Optimizing energy in these nodes is hugely beneficial to improving the durability of FANETS.
The energy used by various sensors, the energy used for communication between FANETS, and the power used for motor control to carry UAVs into the air are the three mechanisms in the Flying Adhoc network that use the most energy. The most crucial factor for optimizing the energy in FANETS is the probability of success in delivering the packet to the Base station. This parameter indicates how successfully the packet is delivered to the intermediate nodes based on an average number of packets received by the BS. As shown in Figures 10 and 11, our proposed protocol can send up to 75% of packets to BS, the LEACH and LEACH-C success rates are 9% and 16%. In our proposed protocol, it can be seen that efficiently selecting CH increases the network density and increases the probability of success for delivering a packet to BS. This is because, with the optimal number of clusters and optimal CH selection in a network, the packet drops ratio decreases.

Probability of Delivery Success
Energy is one of the best and most efficient properties for FANETS nodes. FANETS usually have a small dry-cell battery and can operate for only a couple of minutes, about 30 to 50 min. The broad application of these FANETS is affected by this limited amount of energy. Optimizing energy in these nodes is hugely beneficial to improving the durability of FANETS.
The energy used by various sensors, the energy used for communication between FANETS, and the power used for motor control to carry UAVs into the air are the three mechanisms in the Flying Adhoc network that use the most energy. The most crucial factor for optimizing the energy in FANETS is the probability of success in delivering the packet to the Base station. This parameter indicates how successfully the packet is delivered to the intermediate nodes based on an average number of packets received by the BS. As shown in Figures 10 and 11, our proposed protocol can send up to 75% of packets to BS, the LEACH and LEACH-C success rates are 9% and 16%. In our proposed protocol, it can be seen that efficiently selecting CH increases the network density and increases the probability of success for delivering a packet to BS. This is because, with the optimal number of clusters and optimal CH selection in a network, the packet drops ratio decreases.

Conclusions
Today, wireless sensor networks are commonly employed in several sectors, and the research focus on wireless sensor networks was always directed towards the LEACH protocol. This paper presents a solution that employs an enhanced version of the LEACH protocol known as EE-LEACH in which the issues of the standard LEACH protocol are addressed and had tried to remove them efficiently. First, for the total energy usage each round, the appropriate number of cluster heads is estimated. This trial reveals that the methodology presented can regulate the headcount of clusters to vacillate between 3 ≤ k and ≤ 10. The EE-LEACH protocol successfully boosts FND to 1710 rounds and enhances its network life by 118 percent compared to the conventional LEACH and LEACH-C.
Moreover, it increases the proportionality of data packets received through BS. As nodes' energy consumption is considered more balanced, there are many death nodes, which will not affect the total power usage as only 2.00174 × 10 −4 J is consumed per node unit because there are no more than 10 clusters in total. This approach presents a novel CH selection and packet routing threshold function that includes the node's residual power. We have seen that, while comparing with other algorithms like LEACH and LEACH-C, EE-LEACH delivers better outcomes in terms of network life, residual energy, and reliability. Success Rate Figure 11. Packet success ratio.

Conclusions
Today, wireless sensor networks are commonly employed in several sectors, and the research focus on wireless sensor networks was always directed towards the LEACH protocol. This paper presents a solution that employs an enhanced version of the LEACH protocol known as EE-LEACH in which the issues of the standard LEACH protocol are addressed and had tried to remove them efficiently. First, for the total energy usage each round, the appropriate number of cluster heads is estimated. This trial reveals that the methodology presented can regulate the headcount of clusters to vacillate between 3 ≤ k and ≤ 10. The EE-LEACH protocol successfully boosts FND to 1710 rounds and enhances its network life by 118 percent compared to the conventional LEACH and LEACH-C.
Moreover, it increases the proportionality of data packets received through BS. As nodes' energy consumption is considered more balanced, there are many death nodes, which will not affect the total power usage as only 2.00174 × 10 −4 J is consumed per node unit because there are no more than 10 clusters in total. This approach presents a novel CH selection and packet routing threshold function that includes the node's residual power. We have seen that, while comparing with other algorithms like LEACH and LEACH-C, EE-LEACH delivers better outcomes in terms of network life, residual energy, and reliability.
In the future, it is worth studying the optimization of multiple paths as this work is only intended to improve the life cycle of WSNs and minimize data transmission energy usage. We had considered a flat environment, but we tried to implement this in a 3D and multidimensional environment in our plan. Thus, the LEACH protocol should also be enhanced in future research utilizing a combination of some intelligent algorithms of AI or machine learning algorithms. Furthermore, we will attempt to offer a clustered routing protocol that addresses as many challenges as possible, including QoS parameters, additional security, and tolerating faults, particularly in the situation of dead CH, with the least amount of complexity. Finally, we will also consider modulation and coding strategies in the future to make the network more efficient and more reliable. This study can also be extended to the evaluation and assessment of microfluidics, which further offers numerous benefits in various disciplines such as biology, chemistry, and medical diagnostics [29].
Institutional Review Board Statement: Not applicable.

Informed Consent Statement: Not applicable.
Data Availability Statement: The study did not report any data.