## 3 Enhanced Cluster-Head Selection in a WSN for IoT  
The integrity of the routing protocol has a direct impact on network longevity and efficiency, whereas a robust topology strategy depends on a comprehensive evaluation methodology [28; 29]. Depending upon the various characteristics, various indicators are required to compute the network lifetime and smart energy efficiency:  
* **Network Coverage:** Coverage is a metric for WSN service quality that focuses on the preliminary node deployments coverage rate and if these nodes can obtain signals from the ROI entirely and properly.
* **Network Connectivity:** Because sensor networks are typically big in scale, connection ensures that data collected by sensors can be transferred to sink nodes [24].  
* **Network Longevity:** The timeframe from the inception of the network to when the percentage of dead nodes reaches a certain threshold is referred to as the lifetime of the network. The Algorithm 2 for the selection of cluster heads is:  
```
Input: Collection of sensor nodes \(C=c_{1},c_{2},c_{3}\) Output: Choosing the best sensor node as CH
```
1:procedureBegin:
2:for\(i=1;i<=n;i++\)
3:while choosing the CH
4:For every sensor node \(c\_i\)
5: Compute proximity \(N_{prox}=\frac{1}{N}\sum_{i=1}^{1-N_{T}}d(n,i)\)
6:if (\(N_{prox}\) is maximized)
7: choose the sensor node \(c\_i\)
8:else
9: Reject the sensor node \(c\_i\) ```
```
``` **Algorithm 2**Algorithm for selection of cluster head  
The enhanced cluster-head selection procedure consists of the following specific steps:  
1. The network is being configured with a base station that can obtain the coordinates of all sensor nodes in the sensing area as well as their remaining energy.
2. The monitoring region is separated into several clusters using a Voronoi diagram, and a probabilistic model for perception is developed. The attenuation probabilistic algorithm is used to choose duplicate network nodes, and these nodes are considered the first type of hibernating cluster-head node [16].
3. When one of the cluster-head nodes dies, another duplicate node takes over as cluster head. If the death node is a current common node, another duplicate node awakens from sleep to become a normal node.
4. If the first type of cluster head nodes expired, the survival time evaluation method could be used to determine the remaining network aggregate energy [30]. Calculated by the ratio of the remaining energy to available energy of nodes in the network, we choose the next class of cluster-head nodes.  
The process of sending data from each cluster head to the base station has been consolidated [31]. The SFO is used to locate the best possible path for transferring data over the network. Initializing the route choosing method, transmitting data and modifying the route are the three main steps of the SFO-based routing procedure [32]. SFO is regarded as a population-based metaheuristic algorithm. The sailfish location is designated as a problem's variable in the solution space, and a candidate's solutions are regarded as sailfish. At the solution space, the population is created at random. Saiffish can explore in a hyper-three, two- or one-dimensional space depending on the location of the vectors.  
In the initializing phase, based on the coordinates of vectors, the SFO finds the solution in a hyper-dimension. By recognizing the best adjacent cluster head, the route is chosen based on its fitness value. Later, the recognized best adjacent cluster head is replaced with another cluster head and recognizes the best route [33]. The procedure for transmitting the data will be started once the best route is recognized amongst the numerous routes. The utilization of energy for data transmission of the packets is sent to the base station which may cause the death of the cluster head or minimization in its energy [34].  
The main advantage of the SFO algorithm is that it provides the customization of parameter configurations which enhances the performance compared to the default setting of the parameters.