# Energy and Distance Based Multi-Objective Red Fox Optimization Algorithm in Wireless Sensor Network
## 5 Proposed Method
### ED-MORFO-Based CH Selection  
In this research, an efficient technique called ED-MORFO was developed, for the clustering and routing process. In the cluster and routing procedure, non-CH nodes join a CH, using fitness function parameters. In a conventional process, non-CH nodes simply attach to the CH by deliberating distance factor, which could produce an imbalanced load of the CHs, and lead to higher energy consumption of the network. Here, the proposed ED-MORFO is employed for the clustering and routing process with various fitness function parameters to produce a lower computational complexity, high stability, speed of optimization, and low time complexity. The fundamental purpose of an ED-MORFO-based clustering procedure is to select the best number of nodes in the neighborhood, such as CHs. The goal is to achieve proper fitness by calculating residual energy, distance, network coverage, and node degree. Fitness Function Derivation  
* Residual energy (\(RE\))
* \(RE\)[31] is characterized in Equation (13): \[RE=\sum_{i=1}^{m}\frac{1}{E_{\text{CH}i}}\] (13)
* Inter and intra cluster distance (\(D\))  
This section explains the distance between each CH and BS. As previously stated, while considering energy usage, the sensor node is fully controlled by the transmission distance. When the base station is further away from the mobile node, it requires more energy to complete the procedure [31]. As a result, in the network, the cluster head with the shortest Euclidean distance starting from the BS is most favored. So, the inter cluster  
Figure 2: Flowchart of clustering and routing using ED-MORFO. and intra cluster objectives are mentioned as \(D1\) and \(D2\), which can be minimized and expressed in Equations (14) and (15). \[D1=\sum_{i=1}^{m}\left(dis1\left(\text{CH}_{j},\text{ BS}\right)\right) \tag{14}\]  
\[D2=\sum_{j=1}^{q}\left(\sum_{i=1}^{cm_{j}}dis2\left(s_{i},\text{CH}_{j}\right)/ cm_{j}\right) \tag{15}\]  
where the \(cm_{j}\) represents the amount of nodes present in the cluster and \(dis2\left(s_{i},\text{CH}_{j}\right)\) represents the distance between the sensor \(i\) and \(j\)th CH. 1. Network coverage The network coverage [31] is defined by this Equation (16): \[N_{cov}=r(N_{i})\] (16) where \(r(N_{i})\) represents the radius covered by node. The objective is represented as \[N_{cov}=\frac{1}{N_{T}}\sum_{i=1}^{N}N_{cov}(N_{i})\] b. Degree of nodes It is demarcated as the amount of non-CH applicants [31] who go to the specific portable node. \(D_{N}\) is expressed in Equation (17). \[D_{N}=\sum_{i=1}^{m}I_{i} \tag{17}\]  
Accordingly, the normalization process (\(F(x)\)) is exploited to every objective \(\alpha_{1},\alpha_{2},\alpha_{3}\), \(\alpha_{4},\alpha_{5}\), which is shown in Equation (18). \[F(x)=\frac{f_{i}-f_{min}}{f_{max}-f_{min}} \tag{18}\]  
where function value is signified as \(f_{i}\), and \(f_{i}\) and \(f_{max}\) are specified as the minimum and maximum fitness values, respectively. Fitness function is established in a way that means a trade-off is maintained inside the specified objectives. Finally, the distinct objectives are converted as a single objective function through the addition of multiplied values. A multi-objective fitness function is now established by means of ED-MORFO, which is given in Equations (19) and (20). \[fitness=\alpha_{1}RE+\alpha_{2}D1+\alpha_{3}D2+\alpha_{4}N_{cov}+\alpha_{5}D_ {N} \tag{19}\]  
\[\text{where }\sum_{i=1}^{5}\alpha_{i}=1;\text{and }\alpha_{i}\in(0,1) \tag{20}\]  
\(\alpha_{i}\) is stated as weighted parameter, and each dimension of a weighted parameter is initialized through a random number amongst 0 and 1, which is assigned to each fitness function [31] as (\(\alpha_{1}=0.4,\ \alpha_{2}=0.3,\ \alpha_{3}=0.2,\ \alpha_{4}=0.05,\alpha_{5}=0.05\)). The transmission distance across the WSN is minimized by taking into account both the distance and the residual energy when choosing the node with the highest remaining energy. As a result, these fitness functions are used to determine the best data transmission route.