# Energy Efficient Routing Protocol in Novel Schemes for Performance Evaluation
## 4 Delay (D(n))
### Derivation of a Cluster Head Selection Fitness Function  
1. Energy: All part hubs impart information to important CH. Bunch head consolidates the approaching information and converts it into a solitary transmission parcel. Later, the bundles are directed to the BS. Therefore, CH utilizes more energy than other sensor hubs. Thus, a sensor hub with most elevated leftover energy should be picked as CH, proposing that energy utilization is lower for low-energy hubs, rather than higher for high-energy hubs. In this way, our underlying object is to limit F1, as we go with the following Equation (8) \[\text{F1}=\sum_{i=1}^{m}\frac{1}{E_{CHi}}\] (8) where Residual Energy = \(E_{CHi}\) = \(E_{\text{inital}}\) - \(E_{\text{consumed}}\), \(E_{\text{inital}}\) \(\rightarrow\) energy of sensor nodes \(E_{\text{consumed}}\) \(\rightarrow\) consumed energy of sensor nodes 2. Distance: utilized to decide the typical distance between the BS and sensor hub. It will be brought down when the energy utilization of the CH hubs is at its most minimal. Thus, CH has a more drawn-out life expectancy. The second parameter, F2, can be diminished to Equation (9). \[\text{F}_{2}=\sum_{i=1}^{m}(\sum_{i=1}^{i}\text{dis}\left(\text{Si},\text{ BS}\right))\] (9) where: \[\text{dis}(\text{S}_{i}\text{, }\text{B}_{\text{s}})=\text{ \text{Sink Distance}=\sqrt[i]{(\text{xpos}_{\text{sink}}-\text{xpos}_{ \text{node}})^{2}+(\text{ypos}_{\text{sink}}-\text{ypos}_{\text{node}})^{2}}\] where: \[\text{xpos}_{\text{sink}}\text{ and xpos}_{\text{node}}\text{--here, the sink and node are denoted;}\] \[\text{ypos}_{\text{sink}}\text{ and ypos}_{\text{node}}\text{ tells y position of sink and node.}\] 3. Probability Value: during CH determination, the sensor hubs make an irregular number. In a few strange occasions, the 'F1' and 'F2' upsides of at least two sensor hubs might be indistinguishable. In those conditions, the CH's not set in stone by the likelihood esteem. As an outcome, the third boundary, 'F3', can be limited utilizing Equation (10). \[\text{F}_{3}=\sum_{i=1}^{m}\text{Pr}(S_{i})\] (10)By utilizing numerous boundaries, the weighted aggregate strategy is applied to the single measurement inclined by Equation (11). Here \(\beta_{1}\), \(\beta_{2}\), and \(\beta_{3}\) are weighted numbers apportioned to each boundary.  
\[\text{Fitness}=\ \beta_{1}*f_{1}+\ \beta_{2}*f_{2}+\beta_{3}*f_{3} \tag{11}\]  
Here  
\[\sum_{i=1}^{3}\beta_{i}=1\ \ and\ \ \beta\ \in\ (0,1).\]  
As the Below Algorithm 3 which states about Gravitational search algorithm for selection of cluster head with no of sensor nodes and max/min fitness of applied excitation with worst/best solution.  
```
Applied excitation: Total sensor nodes set S = (\(s_{1}\), \(s_{2}\), \(s_{3}\),..., \(s_{n}\)) Number of agents: \(N_{p}\); dimension K; Response: CHs set Set up the agents \(A_{i}\), where \(1\leq j\leq N_{p}\) While (\(i=N_{p}\)) do Determine fitness (\(A_{j}\)) End While (\(i=N_{p}\)) do best = max of (fitness(\(A_{j}\))) worst = min of (fitness(\(A_{j}\))) End While (\(i=N_{p}\)) do Evaluate mass(\(A_{j}\)) End While (\(i=N_{p}\)) do Find force (\(A_{j}\)), with the help of Equation (3) Evaluate acceleration (\(A_{i}\)), with the help of Equation (4) Updating coordinates \(CH_{j}\) with the help of Equations (5) and (6) End Assign sensor to CHs End
```  
**Algorithm 3**Selection of Cluster head