# Energy-Efficient Clustering Scheme for Flying Ad-Hoc Networks Using an Optimized LEACH Protocol
## 2 Background
### 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  
Figure 2: Basic FANET Structure. from 0 to 1. A node can become CH if the value of \(T(n)\) determined by Equation (1) is greater than the random number generated by a sensor node between 0 and 1. \[T(n)=\frac{p}{1-p(r)mod\left(\frac{1}{p}\right)}\quad n\in\mathds{G}0,\quad Otherwise \tag{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. 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. Figure 3: LEACH Clustering Structure. * 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.