## 4 Proposed Algorithm
### Cluster Head Selection
Now, using Equation (3), we obtain

\[k*E_{elec}+k*\varepsilon_{mp}*d_{2}^{4}>k*E_{elec}+k*\varepsilon_{mp}*d_{1}^{4} \tag{4}\]

Reversing the inequality in Equation (4) produces

\[\frac{1}{k*E_{elec}+k*\varepsilon_{mp}*d_{2}^{4}}<\frac{1}{k*E_{ elec}+k*\varepsilon_{mp}*d_{1}^{4}} \tag{5}\]

Further, multiplying \(\theta\) in (5), we obtain

\[\frac{\theta}{k*E_{elec}+k*\varepsilon_{mp}*d_{2}^{4}}<\frac{ \theta}{k*E_{elec}+k*\varepsilon_{mp}*d_{1}^{4}} \tag{6}\]

Then, equating Equation (6), we obtain

\[\frac{\theta+\Delta}{k*E_{elec}+k*\varepsilon_{mp}*d_{2}^{4}}= \frac{\theta}{k*E_{elec}+k*\varepsilon_{mp}*d_{1}^{4}} \tag{7}\]Finally,

\[\Delta=\frac{\theta\ast\varepsilon_{mp}\left(d_{2}^{4}-d_{1}^{4}\right)}{k\ast E_{ elec}+k\ast\varepsilon_{mp}\ast d_{1}^{4}}.\]

\(\square\)

## 5 Results Analysis

In this section of the paper, a simulation setup along with two scenarios is considered. The setup was prepared for the purpose of evaluation of the proposed algorithm (FEHCA). The LEACH and the proposed algorithm were simulated in Python on an Intel Core i5-9300 H CPU @ 2.40 GHz and 8 GB RAM running on Windows 10. The sensors were randomly deployed in a 100 m \(\times\) 100 m area; the initial energy of the sensor was assumed to be 0.5 J. The CH probability was not fixed in advance as in LEACH and was computed at run time, as depicted in Figure 5. FEHCA's effectiveness was assessed on the same basic parameters as in [37], and the results are shown in Table 1. We tested our proposed algorithm extensively for the following two scenarios and compared the results with the existing LEACH protocol and ESO-LEACH [36]. **Scenario 1. **_A wireless sensor network (WSN\({}_{1}\)) is deployed and BS is placed at the middle position (50, 50) in the deployment area (\(x,y\))._

**Scenario 2. **_A wireless sensor network (WSN\({}_{2}\)) is deployed and BS is placed at position (50, 200), which is far away from the deployment area (\(x,y\))._

### Experimental Evaluation for Scenario 1

In Scenario 1, the deployment area (x, y) is 100 m \(\times\) 100 m, and 100 nodes are deployed at random, with the base station at the centre (50, 50), as shown in Figure 6. Using k-means clustering, the randomly deployed nodes are grouped into an optimal number of clusters, and the centroid of each cluster (marked as 'x') is chosen, as shown in Figures 7 and 8. The results were collected by keeping the base station at position (50, 50) in a \(100\text{ m}\times 100\text{ m}\) area, which was monitored. We first simulated the LEACH algorithm and then the proposed FEHCA with the same simulation parameters and found the proposed algorithm to last, on average, 70 percent longer than the LEACH algorithm, as shown in Figure 9 and Table 2a. \begin{table}
\begin{tabular}{c c} \hline \hline
**Parameters** & **Values** \\ \hline Area & 100 m \(\times\) 100 m \\ Number of nodes & 100 \\ Sink location & centre and 50,200 \\ Optimal cluster ratio (\(\zeta_{\text{C}}\)) & 07 \\ Initial energy of node, \(\text{E}_{\text{i}}\) & 0.5 J \\ Data packet size & 4000 bits \\ Energy consumption: power amplifier, \(\epsilon_{bs}\) & \(10\times 10^{-12}\text{ J/bit/m}^{2}\) \\ Energy consumption: power amplifier, \(\varepsilon_{mp}\) & \(0.0013\times 10^{-12}\text{ J/bit/m}^{4}\) \\ Energy dissipated to run the transmitter or receiver circuitry, \(\text{E}_{\text{elec}}\) & \(50\times 10^{-9}\text{J/bit}\) \\ Energy consumption: aggregation (EDA) & \(5\times 10^{-9}\text{J/bit/signal}\) \\ Threshold distance, \(\text{d}_{0}\) & 87.7 m \\ Initial energy of high energy node & 1 J \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Simulation parameters for FEHCA. Figure 8: Depiction of network clusters with centroids. Figure 6: Random deployment of 100 sensor nodes in an area of 100 m \(\times\) 100 m with BS positioned inside the deployment area. Figure 7: Network clustering using k-means algorithm.