HIWAEO: Hybrid Improved Whale Artificial Ecosystem Optimization Algorithm based Energy-Efficient Routing Protocol for Wireless Sensor Network

Wireless Sensor Network (WSN) is a resource constraint network that utilizes more energy for transmitting and receiving the data. Hence energy efficiency is the vital issue faced by the WSN. Besides the packet routing process consumes more energy than the other processes. Moreover, the working of WSN is based on the battery life span of sensor nodes. Thus the constrained energy source affects the life span of the network battery. To tackle this issue, we proposed a novel method known as the Hybrid Improved Whale optimization-based Artificial Ecosystem optimization method (HIWAEO). This enhances the energy efficiency of the WSN and thereby improves the routing of the network. The energy-efficient WSN can be obtained by selecting optimal cluster head (CH) and forward nodes. To select the optimal CH the proposed method estimates the fitness function which includes node degree, space between the sensor nodes and space between the CH and base station (BS), residual energy, and node centrality. This estimated fitness function arranges the sensor nodes based on their increased energy and distance from the BS and the best node is chosen as the CH. Henceforth to obtain the routing efficiency the forward nodes are selected based on their residual energy and distance. The performance of the proposed method is analyzed with the other existing approaches for three conditions of BS alignment and concluded that our proposed method outperforms all the other approaches.


Formulation of Hybrid Improved Whale Artificial Ecosystem Optimization Algorithm
In this section, we first initialize both the improved Whale Optimization Algorithm and improved Artificial Ecosystem Optimization algorithm and henceforth combined both the algorithm to enhance the optimized energy-efficient cluster head selection and routing protocol.

Artificial Ecosystem Optimization (AEO)
AEO [13] is a modern metaheuristic algorithm focused on the flow of energy in the earth's ecosystem. An ecosystem is a group of living organisms that live and interact with each other on Earth. This algorithm considers three stages of living beings like creation, consumption, and decomposition that are the three unique characteristics of living organisms. Green plants are used in the first stage of creation; the second stage involves animals used by producers to acquire energy, and the third stage is the decomposer used by both creators and consumers to feed them. Exploiting this behavior the first stage of the AEO algorithm is used to sustain the balance between the exploitation and exploration and the second stage enhances the exploration and the third stage is used to improvise the exploitation of the AEO algorithm. This algorithm considers only one creator and decomposer and all other individuals are taken as consumers.

Creator
The creator of this stage is arbitrarily chosen among the individual who initiates the search (Iarb) space and the individual who is best among all (Ib). The creator used to update the decomposer and also the upper and lower constraints of search space. However, it also guides the other individuals to search for their locations. Thus it helps to sustain the balance between the explorative and exploitative search. Numerically this stage can be expressed as, The number of initial population is denoted as m, Iter Max.
is used to denote the maximum number of iterations. 'a1' is used to indicate the arbitrary number between [0, 1], a is the vector representation of a1 and hence lies between 0 and 1.  represents the coefficient of linear weighting and the upper and lower constraints are denoted as UP and LW correspondingly.

Consumption
This stage is exploited to improvise the exploration of the algorithm [13]. Moreover, it updates the individual solution by analyzing the energy levels. The searching method and the exploration stages are honed by exploiting the concept of Levy flight. The Levy flight is a random walk that can be used to search for food. Sometimes the length of the steps is increased to enhance the optimization of search to attain the global optimum. Hence it can be expressed as, Here, N(0,1) is the normal distribution with zero mean and unit standard deviation. Thus by exploiting various hunting behaviors the consumer can hunt food with the help of the consumption factor. Generally, the consumers are of three kinds: herbivores, carnivores, and omnivores [14]. The consumers are classified as any one of the above kind arbitrarily. The selected herbivores can be expressed numerically as, The numerical expression for the selected carnivores is given as, However, the selected omnivores can be expressed as,

Decomposition
To enhance the exploitation of AEO this decomposition stage is been deployed. This stage involves three coefficients such as D, e, and w to update the individual solutions and thereby select the best solutions from entire solutions. Where D is a factor and e and w are the two variables used to represent the weights. Moreover, the position of each individual is upgraded to the newest position by utilizing the decomposer variable Inand the decomposer factor D along with the two-weighted variables e and w. Hence it can be expressed as,

IAEO
The AEO needs enhancement in the consumption stage since the classification of animals into herbivores, carnivores, and omnivores is an arduous process [15]. Therefore to hone the performance of AEO we exploited the sine-cosine algorithm [24] which can be used to generate the best possible solution by moving forwards and backward. Hence the improved version of the AEO algorithm can be written as, The current iteration can be denoted as Xt , and the maximum number of iterations can be indicated as Xt max . The r1 and r2denote the arbitrarily selected numbers lie between 0 and 1.

Improved Whale Optimization algorithm (IWOA):
This section explains the Improved Whale Optimization Algorithm (IWOA) procedures.

Whale Optimization Algorithm (WOA):
The social behavior of humpback whales is characterized using a whale optimization algorithm (WOA) [16]. The WOA utilizes a ransom candidate solution set in which it enhances the candidate solution position and three rules are used to update the positions.

(i) Prey Encircling:
Equation (17) update the candidate solution position Therefore, the best candidate solution in the current generation is * Z . Equation (19) and Hence, the vector a randomly tends to the interval [0, 1] and it linearly decreased from 2 to 0 respectively.

(ii) Prey searching:
The prey encircling and prey searching has similar procedures but  Z is used for prey searching. Equations (21) and (22) select the random candidate solution During the exploration stage, the searching for prey is used and the global search is performed using WOA.

(iii) Spiral updating position:
During the exploitation stage of WOA, the spiral updating position and prey encircling are utilized. Equation (23) updates the individual position updating.
The distance among distance best solution and k th candidate solution is

Improved Whale Optimization Algorithm (IWOA):
The above section describes the steps involved in WOA. Nevertheless, the premature convergence and exploration ability of WOA is improved using the Differential Evaluation algorithm (DE). Author [17] presented easy use of a population-based algorithm called Differential Evolution (DE). The crossover and mutation operators performed to generate new individuals. If it is fitter than the corresponding agent then the parent is replaced by its offspring. In this work, the mutation of DE integrates the whale optimization algorithm is called Improved Whale Optimization Algorithm (IWOA) [18]. The exploration and exploitation stages of IWOA are changed using a new parameter as search mode. Equation Here, the maximum number of generations is max t and the current generation is t . Where  is minimized over time from 1 to 0. While doing exploration as time increases, the initial generation is explored by allowing the individuals.
According to the j th dimensions, the upper and lower bounds are

Hybrid IWAEOA
In order to increase the convergence speed and exploration capacity to select the optimum cluster head, to minimize the energy consumption and routing distance, we are hybridizing both IWOA and IAEO for our proposed work. The proposed hybrid IWAEOA helps to acquire the energy-efficient routing protocol for the wireless sensor network. Figure 1 shows the schematic diagram of our proposed HIWAEOA approach.

System Model
This section elucidates the network energy model and its settings of our proposed WSN model.

Network Model
The network model [19] of this proposed method is employed in a 150×150 square meter area. This includes two kinds of sensor nodes: advance nodes and normal nodes. The battery efficiency of advanced nodes is better than the normal nodes. Each node possesses a unique network ID and the base station is positioned at the center of the employed area. However, the initial energy, processing, and communication ability of all sensor nodes are similar and thus show the homogeneity feature of sensor nodes. Subsequently, with the aid of received signal strength, the node itself estimates the distance between the destination and its own. Also detects its own residual energy. Besides, the nodes directly link the base station for forwarding the data as well as to receive the transmission power according to the estimated distance. Further, the base station supplies unlimited power and energy to the sensor nodes.

Energy consumption model
Our proposed method utilizes the first-order energy model [7] which is illustrated in fig 3. The consumption of energy is high in wireless sensor networks since there are several energy degrading systems in them. The energy consumption of the transmitter and receiver can be mathematically expressed as shown below, Consumption of energy at the transmitter side of the sensor nodes, Consumption of energy at the receiver side can be expressed as,  The coefficients of free space and multipath of the taken amplifiers are correspondingly denoted as, fs  and amp  . Besides, these coefficients are completely based on the amplifier used on the transmitter side [23].

Fig 3: Energy consumption model of WSN
Consider that the distance between the sensor node and its respective CH (h) is less than the threshold distance h0, then the free space energy model is exploited and if it is greater than the h0, the multi-path energy model is exploited. Further, our model exploits the infinite compressibility method to compress the accumulated data in CH from its sensor nodes to a single packet of fixed length.

Proposed methodology
This selection elucidates the proposed methodology to select the optimal energy-efficient routing protocol for the wireless sensor network. To acquire the energy-efficient routing protocol, the estimation of the fitness function is necessary. Hence we estimate the fitness function utilizing the proposed Hybrid IWAEO algorithm.

Ranking Phase of Proposed HIWAEO Algorithm
The ranking phase of our proposed method can be performed by evaluating the fitness function. The fitness function of the proposed method is to estimate the optimal CHs among all the sensor nodes. This can be obtained by evaluating node degree, node centrality, and space between the neighbors, space between the base station and sensor nodes, and residual energy. Here, the node degree is defined to choose the CH with the least number of normal nodes in order to sustain the nodes for the upcoming iterations. Besides, the energy consumption of the nodes can be reduced by choosing the best optimal CH [28]. This can be acquired by minimizing the space between the neighboring nodes and the space between the nodes and the BS. Meanwhile, the inclusion of dead nodes or broken or useless nodes can be circumvented by estimating the residual energy. These fitness functions are defined in the following section.

 Node Degree
The ranking phase is the important stage to arrange the CH based on the increasing sensor nodes to attain the energy-efficient routing protocol. To arrange the CH it is necessary to evaluate the node degree for each CH. The best optimal CH can be selected based on the CH that holds the least number of sensor nodes since CH with the least number of sensor nodes sustain more energy than the CH with more and hence it can be used for future performance. Therefore, the node degree [20] can be defined as the number of nodes that the respective CH holds and can be expressed as, Where is l SN the number of sensor nodes held by CHl.

 Space between the sensor nodes
The energy consumption of nodes increased with the transmission space between the nodes. Hence the optimal CH selection can be obtained by evaluating the space among the nodes and thereby minimizes the consumption of energy [21]. Thus the space between the sensor nodes along with the respective CH can be determined as, Here, ) ( , c l CH SN dis is used to determinethe space between the sensor l and CHc,and sensor nodes that are under the CHcare indicated as Lc.

 Space between CH and BS
If the selected optimal CH is located far away from the BS, then it consumes more energy, hence is arduous to obtain the energy efficiency [21]. Therefore, it is a must to choose the CH which is positioned nearer to the BS to minimize energy usage. The distance between the CH and BS can be determined as, Here, the term ) , ( BS CH dis b is used to determine the distance between the Cluster head CHc and BS.

 Node Centrality
The node centrality can be defined as how the optimal CH is placed centrally from the adjacent nodes and can be determined as, The neighboring nodes of the selected optimal CHl can be denoted as n (l). This can be used to minimize the space between the CH and the other sensor nodes.

 Residual energy
The elimination of dead or unused or broken nodes is predominantly important for the optimal CH selection. Hence we estimate the residual energy. Residual energy [4] is defined as the energy possessed by the nodes after receiving or transmitting the data while performing the transmission process. It can be expressed as, The above equation l CH RE denotes the residual energy of the l th cluster head. Thus the best CH can be selected by exploiting the above-mentioned fitness function. Some of the advantages of selecting the optimal CH are, (i) increases the network life span, (ii) lowering the energy consumption while transmitting the information from sensor nodes to the respective BS, (iii) enhances the reliability, and (iv) minimization of latency. Following the selection of optimal CH, it is necessary to assign sensor nodes for the selected CH. Our proposed HIWAEO algorithm-based method can be used to allocate the sensor nodes to the respective CH by utilizing the potential function that is expressed below. . Meanwhile, the assignment of sensor nodes to the cluster can be performed based on the distance and also with the maximum potential. Suppose, if two or more CH exhibits the same distance, then the sensor node with higher energy can be assigned to the corresponding CH.

Proposed HIWAEO Algorithm based Energy efficient routing protocol
The energy consumption model illustrated in the system model section indicates that the energy consumption of the sensor nodes is exponentially increased with the increases in transmission distance [22]. Consequently, if the selected optimal CH transmits directly data to the BS then the process will consume more energy. Due to this reason, the CH which is located far away from the base station will discard its transmission due to its large consumption of energy [22]. Hence it is necessary to reduce the energy consumption of CH and maintain the load balance between the CH and clusters in order to attain the energyefficient WSN. Therefore our proposed HIWAEO algorithm carefully selects the forwarding nodes to reduce energy consumption [26]. The selected forwarding nodes possess higher residual energy than the other sensor nodes to enhance the packet delivery ratio and minimize the packet loss percentage. This can be achieved by choosing nodes with higher waiting time and can be expressed as, The residual energy of an energized sensor node can be represented as L E . S denotes the total sum of cluster heads. However, the initial energy of the CHlof cluster c can be denoted as ) ( denotes the residual energy of the particular cluster head.

Simulation setup:
The network lifetime is affected via three main parameters such as network size, base station location, and the number of nodes. We set various scenarios of different sizes considering these factors, which are described in Table 1. The simulation parameters used in this works are delineated in Table 2.

Evaluation metrics:
The simulation analysis is performed using the aspects of network throughput, network stability period, and network total residual energy and network lifetime [25,27], which are compared using the proposed HIWAEO algorithm with existing methods such as DEER [7], OCER [8], IEE-LEACH [9] and CBE2R [10] respectively.

State-of-art results:
Fig 4 shows the performance of network lifetime with respect to situation 1. The proposed protocol outperforms better outputs than other methods in terms of network lifetime. The proposed protocol contains a higher lifetime in situation 1 with 150, 250, and 350 sensors. The BS is located in the center area in which the scale of situation 1 is small. The clustering effect is a major factor affecting the protocol performance. The optimized clustering and cluster heads are selected with a better network lifetime. The performance of stabilization time with respect to situation 1 is delineated in Fig 5. When compared to other methods, the proposed protocol outperforms better network stability performance in situation 1 with various node densities as shown in Fig 5. The proposed protocol will balance the network energy consumption, hence, the network stability of the proposed model is optimal than the other five methods. Based on situation 1, the proposed protocol demonstrates better reliability requirements.
The throughput performance with respect to situation 1 is delineated in Fig 6. During the working time of the network, the throughput performance with respect to situation 1 is seen from Fig 6 and more data packets are received from the base station. The intra-cluster communication stage introduces a pooling control mechanism according to the idle/busy nodes. The network throughput is increased in order to create the best use of the time slot.