Abstract
The clustering approach can improve wireless sensor network parameters such as lifetime enhancement, load balancing, reliable communication, and fault tolerance. The Cluster head in the cluster is responsible for reliable data transmission between node and sink or base station. Selecting suitable cluster heads and establishing an optimal path for data transmission is the main objective of this research work. Fuzzy-based clustering based on cluster head selection, optimized routing using particle swarm optimization (PSO), adaptive whale optimization algorithm (AWOA) are presented in this research work. Fuzzy logic considers the parameters like the distance between base station to node, node centrality, node degree, and residual energy for cluster head selection. The optimization model obtains an optimized node for routing from the selected cluster heads. In terms of network lifetime, delay, energy consumption, packet delivery ratio, and energy efficiency, simulation analysis of the proposed model is compared to conventional routing algorithms such as bacteria foraging optimization (BFO), Tree-based data gathering (TBDG) algorithm, Immune inspired routing (IIR), Low-Energy Adaptive Clustering Hierarchy (LEACH), and Hybrid Energy-Efficient Distributed (HEED) protocol. The results demonstrate that the proposed approach outperforms existing approaches in terms of network lifetime and energy efficiency.
Introduction
Wireless sensor networks (WSNs) are networks that contain a large number of small, low-energy nodes that encompass the target area. This sensor node consists of a unit for data aggregation, a component for communication, an energy unit, and a sensing unit. A Global Positioning System (GPS) progresses within a target region for each sensor node. WSNs are an extremely promising application in a variety of fields including safety, environmental monitoring, health care, disaster warning systems, defense reconnaissance, and intruder detection. Typically, sensor networks have been used for gathering data from an environment for building inferences with regard to the object monitored. Due to bandwidth and power constraints, such sensors are typically characterized by limited communication capabilities. As a result, minimizing energy conservation can be a difficult task for WSNs.
Several routing algorithms that are based on energy efficiency were examined [1]. These nodes have been grouped as clusters for cluster-based WSNs, and a cluster head will be chosen for each cluster. Cluster head (CH) can gather data from other neighboring nodes and process it before transmitting it to the base station through other cluster heads. The utilization of the cluster head is high when compared to other nodes in the network due to continuous data transmission and reception. Apart from managing their data, the cluster heads in a clustered WSN will need to do some additional tasks to collect data from the nodes in their corresponding cluster. The cluster heads will make use of data fusion for detecting the duplication of unwanted data sent by the sensor nodes to their cluster. The cluster heads or the gateways will be operated using battery power. Therefore, there is a need for developing the algorithm to increases the network lifetime and minimizes power consumption. These are typically operated with lower-powered batteries.
LEACH [2, 3] is another popular routing protocol due to its efficiency and simplicity. It divides the entire network within clusters with the system for execution time, which is divided into iterations. The member node may content the cluster head in each of these iterations by following certain specific criteria. The Hybrid Energy-Efficient Distributed (HEED) protocol is a familiar model in WSN routing that selects the cluster heads considering the residual energy and node density. With minimum energy dissipation, maximum packets can be delivered through HEED. However, it forces the node to act as a cluster head which affects the transmission if the particular node is not in the range of the next cluster head.
Various optimization models are introduced in the WSN routing process where particle swarm optimization is one of the familiar models [4]. This method employs a swarm to search the solution space, with each particle recording the fitness value. The particles were linked together based on their velocity. This is useful in assisting particles in moving to the right location by considering the costs of the optimized fitness function. Routing based on PSO, ant colony optimization [5–7], cuckoo search optimization [8], bee colony optimization models [9], and genetic algorithm [10] is introduced to obtain better performance in terms of network lifetime energy efficiency and computation time. However, the high convergence rate, local optima solution reduce the overall performance of the network. Moreover, the optimization models provide better performance for any one of the above-mentioned parameters and it is necessary to obtain an exclusive model that is best suitable in network lifetime enhancement, energy efficiency, and computation time. As a result, in this study, the selection of a suitable cluster head and routing is divided into two stages. In the first stage, fuzzy logic is used to perform clustering and cluster head selection. Fuzzy logical decision capabilities are used for decision-making in order to select suitable cluster heads for routing. In the second stage, adaptive whale optimization is introduced for optimal data transmission routing by selecting appropriate cluster heads. The contribution of this research is summarized as follows. An optimized routing model using particle swarm optimization and adaptive whale optimization algorithm were presented. A fuzzy logic-based cluster head selection for optimal routing in wireless sensor networks was explained. Simulation analysis of particle swarm optimization-based routing and adaptive whale optimization-based routing are provided.
The organization of the research work is arranged in the following manner. Section 1 describes the introduction to the research work. Section 2 depicts the various analyses of existing routing approaches. Section 3 describes the particle swarm optimization algorithm and section 4 provides the simulation results of particle swarm optimization based routing. The proposed cluster head selection and routing approach is presented in Section 5. The simulation analysis and observations are represented in Section 6. Finally, Section 7 deals with the conclusion of the research work.
Related works
A brief literature analysis is presented to observe the features of existing cluster head selection and routing approaches in WSN. Hierarchical clustering protocol reported in [11] improves the WSN node energy efficiency considering the nodes sleeping and waking mechanisms. The redundant data collected by sensor nodes are eliminated which improves the network lifetime when compared to other routing protocols of heterogeneous WSNs. The clustering architecture reported in [12] selects cluster heads in the uniform cluster using fixed clustering architecture. In terms of network stability, clustering architecture outperforms the harmonic search algorithm and the low energy adaptive clustering hierarchy.
The energy-efficient routing algorithm reported in [13] improves the network lifetime even if the network size increases. The hierarchical routing reduces the cluster head load and selects random cluster heads which makes the approach suitable for multi-hop transmission in wireless sensor networks. The energy-efficient cluster-aware routing approach reported in [14] considers the distance while selecting the cluster head. The route for data transmission is attained by requesting ad-hoc on-demand distance vector protocol which considers residual energy and network stability in the routing process. Improved network lifetime is the merit of the suggested model.
The routing process reported in [15] considers the sensor node capability in the cluster head selection process so that suitable nodes are selected for data transmission. Depending on the load condition, the node is selected for data aggregation and transmission which doesn’t force the node to act as cluster head. Proficient communication is attained by collecting the space and time correlation data from the clusters which reduces the computation complexity of the nodes in the network. The cluster tree-based routing approach reported in [16] performs routing, data aggregation, and reconstruction phases. A self-organizing entropy-based clustering identifies the suitable cluster heads for communication. Data aggregation is performed using compressive sensing and a routing path is established to transfer the data from cluster head to base station. Network stability and minimized error rate are the merits of the research model.
The clustering approach reported in [17] incorporated a fuzzy c means algorithm for the low energy consumption routing process in WSN. The clustering approach and fuzzy rules for routing networks increase the network lifetime and reduce energy consumption. Similarly, fuzzy logic-based selection of cluster head incorporates harmony search algorithm [18] which utilizes the maximum potential of fuzzy logic and identifies the cluster heads. The search efficiency of harmonic search optimization is applied to improve the network lifetime more than the traditional approaches. The harmony search algorithm is combined with artificial bee colony optimization in [19] to optimize the network parameters. Initially, the optimization process is carried out so that the clustering protocol can tune the network parameters based on network diversity. The optimization model exhibits the merits in terms of improved throughput and enhanced lifetime.
The cluster head selection in most of the network topology considers the residual energy [20]. In a few cases, the initial and residual energy is considered entirely in the selection process. The Chaotic firefly optimization algorithm for cluster head selection [21] identifies the temporary cluster heads by considering the residual and actual energy. The entropy function obtained in the temporary selection process is further utilized to identify actual cluster heads. Nodes with the highest energy are chosen for cluster heads in both stages, resulting in an increase in network lifetime in heterogeneous wireless sensor networks.
Routing can be a major challenge in the design of the WSN since gateways are generally constrained by memory, processing power, and energy. Furthermore, overloaded gateways may fail prematurely, causing changes in network topology. It may be necessary to protect the energy gateways in order to extend the life of the WSN. For addressing this problem, there was a PSO-based routing that novel fitness function designed by considering the actual number of relay nodes, the relay load factor, and the distance between the gateway and BS. The algorithm proposed has been validated in two scenarios. The experimental results have proved that the PSO-based routing algorithm proposed was able to increase the network lifetime on being when compared to the other approaches that were bio-inspired.
Maximizing the lifetime of the WSNs, measures to conserve energy to improve their performance are all analyzed. The enhanced PSO-Based Clustering Energy Optimization (EPSO-CEO) algorithm was used for the WSN wherein clustering and selection of CH were achieved through the PSO in connection with the power consumption for the WSN. All performance was evaluated, and the results were compared to the existing routing, which was found to be effective in reducing energy consumption.
Fuzzy logic is widely adopted in cluster head selection in WSNs [22]. The trusted energy-efficient fuzzy logic-based clustering approach reported in [23] initially identifies the node reliability for cluster head evaluation. Further, an inference system considers residual energy, density, and distance to determine the cluster heads. Minimum energy consumption and improved network stability are the merits of the research. The fuzzy logic-based clustering approach reported in [24] obtains threshold and average energy probability for the selection of cluster heads. Fuzzy descriptors are used to select the suitable cluster heads in the selection process which improves the network lifetime by immediately replacing the next nodes as cluster heads if the present cluster head energy is exhausted.
Recently various routing algorithms are evolved based on numerous optimization techniques. The routing and scheduling scheme reported in [35] presents a scheduling model to enhance the coverage rate using an improved particle swarm optimization algorithm and genetic algorithm. The hybrid model identifies the optimal resources and routes to enhance the overall performance in multipath communication. An adaptive elite ant colony optimization model presented in [36] reduces the energy consumption of high density wireless sensor networks using an adaptive and elite operator. The proposed model enhances the convergence speed and improves the performance compared to traditional optimization algorithms. The secure routing algorithm presented in [37] incorporates particle swarm optimization and water wave optimization algorithm altogether as a hybrid approach to enhanced network performance. The presented approach broadcasts the packets through cluster heads which are selected by particle swarm optimization fitness function. The route maintenance is managed using a water wave optimization algorithm which increases the node lifetime and reduces energy consumption.
An energy-efficient routing model presented in [38] includes a genetic algorithm and on-demand multipath distance vector routing protocol to improve the overall performance of wireless sensor networks. Depending on the node energy consumption, the fitness function is obtained before routing structure and the final route is established with minimum overhead. The optimization model for energy-efficient routing presented in [39] introduces a protruder based routing model which increases the network lifetime better than conventional models. The presented energy-aware routing model hybridizes the characteristics of wave propagator and weed characteristics in order to obtain global convergence in the routing process. Additionally, a fractional artificial bee colony optimization algorithm is incorporated to select the optimal cluster heads which minimize the energy consumption compared to conventional routing strategies.
For enhanced energy efficiency and coverage rate in wireless sensor networks, particle swarm optimization is incorporated in [40] partitions the entire network into multiple grids and calculates the coverage rate and energy consumption. The global solution provided by particle swarm optimization reduces energy consumption and enhances the coverage rate better than traditional statistical methods. The multipath scheme reported in [41] reduces the energy consumption in wireless sensor network communication. The presented approach incorporates an improved particle swarm optimization algorithm mutation operator to define the search positions and optimal coverage performances. The adopted genetic algorithm allows the trajectory for multiple sinks which improves the overall performance.
Similar particle swarm optimization with the cuckoo search model for cluster head selection in wireless sensor networks is reported in [42] as a multi-objective approach to reduce the transmission delay and enhance the network lifetime. The presented approach provides quick convergence and avoids local optima through balanced energy dissipation and minimum energy consumption. The fault-tolerant energy-aware clustering method reported in [43] incorporated social spider optimization and fuzzy logic to reduce the power consumption, delay, and network node failure. Based on the biological rules of spiders the nodes in the network communicate with each other and fuzzy logic is used to determine the fitness function for the optimization algorithm based on the distance to sink and battery level. The presented approach attains better performance than distributed clustering reliable routing protocol and novel distributed clustering.
From the literature analysis, it is observed that cluster heads selection considers residual energy in most of the research models. In a few approaches, network stability is attained by selecting suitable cluster heads for the routing process. Energy consumption is another factor that is considered in many research models. However, very limited models discussed the other network parameters in the routing process. Therefore, in this research work, along with residual energy and energy consumption, few other network parameters are considered in the cluster head selection process. Fuzzy logic-based cluster head selection and adaptive whale optimization for optimal routing are proposed in this research work to enhance energy efficiency and network lifetime.
Particle swarm optimization (PSO) based routing
PSO refers to a scheme of optimization that is modelled based on the behavior of a group of fish or a flock of birds [25]. In the PSO, the swarm will specify the actual number of possible solutions identified to a complex problem in which each probable solution is called a particle. The key objective of the PSO was to identify the location of the particle that has the outcome of the best assessment for a certain function. During the initialization phase, each particle will have a random set of parameters, which will be flown across the entire multidimensional search space. For each of these generations, every particle will employ information about the earlier individual and global best positions. This helps in increasing the chances of movement in the direction where fitness is improved to update the right candidate. Velocity vectors will manage how the particles tend to move across the entire search space. This is achieved using three different terms. Such as defining the inertia or the momentum can prevent the particle from changing its direction, identifying the cognitive factor that is responsible for the particles’ proclivity to return to their previous best positions. The last is called as the social factor that can identify the actual tendency of the particle to move to its best position based on global or partial PSO. Thus, the velocity for the ith particle has been defined in Equation (1):
In which, p i refers to the “personal best” (pbest) of a particle, the coordinates of the best solution that has been obtained until now for a particular individual, and g refers to “global best” (gbest), which is the total best solution that has been attained by the swarm. The c1 and c2 are acceleration constants known as the “cognitive coefficient” and the “social coefficient” that are real-valued ranging from 0≤c1, c2≤4. This modulates the scale of all steps taken by the particle in the same direction as its pbest and its gbest. At the same time, R1 and R2 refer to two diagonal matrices from random numbers that are created from its uniform distribution as in [0, 1]. Based on this, some semi-random trajectories are drawn by particles, as they will generate it from the systematic attraction to their pbest and gbest solutions, as well as the stochastic weighting of both terms of acceleration [26, 27]. The PSO flowchart is as shown in Fig. 1. The wireless sensor network’s performance was supported by existing different optimization approaches using different simulator network software [28–33].

Flowchart for Standard Particle Swarm Optimization (PSO) [34].
During the implementation of particle swarm optimization-based routing, the clustering and cluster head selection procedure is obtained from the existing research work [34]. The cluster head selection is based on BS or the sink as a centralized clustering. The process flow of generalized particle swarm optimization is presented in Fig. 1. Based on the conventional optimization procedure, the proposed routing model utilizes the optimal solution obtained by the PSO for optimal routing.
The clustering of the base station (the sink) will broadcast all information collection messages to the sensor nodes. On receiving these messages, the sensor node will begin sending information like the location (the actual distance from the BS X to position Y), energy loss, energy loss ratio (the velocity), current energy to be sent to the BS, and the node ID. The steps in clustering initiated by the base station are as below: Step 1. Encode the solutions, and randomly assign the position and velocity of the particle. The solutions are encoded using binary format in this work. If a node is selected as CH, it is assigned 1 else 0. Step 2. Estimating the fitness value by the utilization of the fitness function. Step 3. Generate new particles from an initial solution. Update velocity. Step 4. Computing the fitness value of new particles by using Step 2 with new velocity. Step 5. The fitness value for the old and new particles is compared, and the best one is chosen. In the case of the new fitness value > the old fitness value, choose a new particle. Step 6. In every iteration, select a single solution to be the local best. Step 7. All of the local best solutions from each iteration with the most solutions are chosen as the global best solution. All of the final ones are decoded as clusters.
Simulation results and discussion for PSO based routing
PSO is evaluated and compared with LEACH. The acceleration coefficients are varied (0.25, 0.5 and 0.75) in the experiments conducted. Table 1 shows the parameter of PSO. Tables 2 to 4 and Figs. 2 to 4 show the Average End-to-End Delay (sec), average Packet Delivery Ratio (PDR) and lifetime computation respectively for LEACH and PSO.
Parameters of PSO
Parameters of PSO
Average End to End Delay (sec) for PSO
Average Packet Delivery Ratio for PSO
Lifetime Computation for PSO

Average End to End Delay (sec) for PSO.

Average Packet Delivery Ratio for PSO.

Lifetime Computation for PSO.
From the Fig. 2, it can be seen that the PSO C1 = 0.25, C2 = 0.75 has lower average end to end delay by 16.62%, by 9.58% and by 17.2% for 200 nodes, by 17.8%, by 40.9% and by 23.6% for 400 nodes, by 18.73%, by 35.6% and by 22.84% for 600 nodes, by 18.1%, by 1.7% and by 13.7% 800 nodes, by 18.1%, by 3.9% and by 17.3% for 1000 nodes and by 17.5%, by 12.7% and by 23.9% for 1200 nodes when compared with LEACH, PSO C1 = C2 = 0.5 ad PSO C1 = 0.75, C2 = 0.25 respectively.
From the Fig. 3, it can be seen that the PSO C1 = 0.75, C2 = 0.25 has higher average packet delivery ratio by 26.2%, by 7.42% and by 21.24% for 200 nodes, by 25%, by 10.13% and by 18.65% for 400 nodes, by 27.9%, by 23.83% and by 21.9% for 600 nodes, by 30.1%, by 18.6% and by 25.13% 800 nodes, by 32.32%, by 12.73% and by 26.9% for 1000 nodes and by 31.6%, by 14.91% and by 25.86% for 1200 nodes when compared with LEACH, PSO C1 = C2 = 0.5 ad PSO C1 = 0.25, C2 = 0.75 respectively.
The number of active nodes in each round is depicted in Fig. 4. It can be seen that the PSO C1 = 0.25, C2 = 0.75 has a higher average packet delivery ratio by 9.84%, by 6.5%, and by 1.05% for 100 rounds, by 28.6%, by 25.77%, and by 3.31% for 200 rounds, by 37.14%, by 27.4% and by 6.21% for 300 rounds, by 143.6%, by 119% and by 60.2% for 400 rounds, by 180.5%, by 146.7%, and by 73.7%, for 500 rounds, when compared with LEACH, PSO C1 = C2 = 0.5, and PSO C1 = 0.75, C2 = 0.25 respectively.
The process of cluster head selection using fuzzy logic and optimized routing using adaptive whale optimization is presented in this section. A simple network model is considered for analysis where the energy consumption for transmission and reception of packets over a distance is presented as a mathematical expression as follows.
Fuzzy logic is used in the clustering and cluster hd selection processes. By equally distributing the cluster heads the balanced clusters are obtained. In the cluster head selection procedure, the distance between node and base station, neighbor dtance, node centrality, node degree and residual energy are considered. The novelt research wk is the parameter selection for fuzzy-based cluster head selection and optimal routing through an adaptive optimization model. Because existing approaches for cluster head selection consider only a few parameters, and in particular residual energy alone, the proposed approach is a breakthrough. Aside from common terms such as distance from a node to base station and residual energy, the proposed clustering approach takes into account distance between neighbours node, node centrality, and degree. Since the distance between nodes must introduce impact over energy efficiency of cluster head so that it is considered for analysis.
Ne degree describes the vicinity of the neighbor node and node centrality describes the locality of the node to other nodes. This higher node degree results in large neighbor nodes so that the intra-communication becomes high. Similarly, the higher node centrality gets a chance to select as cluster head. Considering all these parameters, the node with a higher probability will be considered for the cluster head while the remaining nodes need to join the cluster for further communication. Input variable fuzzification, membership function selection, defining the fuzzy rules, and defuzzification are all steps in the fuzzy logic-based cluster size and selection of suitable cluster heads. The inputs are mapped to appropriate linguistic variables during the fuzzification process, and a suitable membership function is chosen. The membership function will be generally triangular and trapezoidal. Based on the function, fuzzy rules are framed. IF-THEN rules are used to relate the input and output parameters and finally, defuzzification converts the output probabilities into numerical values. Table 5 depicts the input parameters and variables considered in the cluster size and cluster head selection process.
Input parameters and its respective linguistic variables
The membership function defines the boundary values. In this proposed work, trapezoidal and triangular functions are used to definehe boundary values and middle variables shown in Fig. 5 to 9. Mathematically the trapezoidal and triangular functions are expressed in Equations (5) and (6)

Membership function of residual energy (E res ).

Membership function of node centrality N c .

Membership function of distance to BS dn→BS.

Membership function of node degree N d .

Membership function of distance to neighbor nodes dn→nn.
In the cluster head and cluster size obtaining process using fuzzy logic, the IF-THEN rule is applied and it is given as
Once the cluster head probability is defined, then each node in the cluster sends information to neighbor nodes. The information includes the node identification number, probability chances for cluster head. Once the message is reived the neighbor node selects the highest probability as cluster head and its status is cnged acluster head to other neighbors. Similarly, the neighbor nodes select the nearest cster heads by sending a joining request. If the cluster is free and can accommodate the request then it is accepted otherwise the cluster head neglect or reject the joining request of the node. The rejected node searches for the next nearest cluster and repeats the same joining procedure and joints into that cluster. If none of the clusters accepts the request, then the individual ne will declare themselves as cluster heads. This process confirms that every node in the network will actively participate in the data transmission. This process helps to identify the optimal cluster heads for data transmission and improves energy efficiency by avoiding unsuitable nodes as cluster heads. The membership functions for residual energy, node centrality, distance to base station, node degree, and distance to neighbor nodes are depicted in Fig. 5–9 respectively. Table 6 depicts the fuzzy rule framed for the proposed fuzzy-based cluster size and cluster size determination process.
Fuzzy rules
In order to obtain optimal routing for data transmission, an adaptive whale optimization is presented in this research work. The optimization algorithm considers the QoS requirements and performs optimal routing in the communication of cluster head and base station. When compared to other optimization algorithms, the computational complexity is low in the whale optimization algorithm. The whale optimization algorithms global and local search processes can be used efficiently in the routing process. The stronger local search ability and heuristic characteristics are mainly adopted in this research work to obtain the optimal solution. However, modifications are made in the optimization algorithm to make the approach suitable for optimal path selection with better energy efficiency. The oimization algorithm includes different phases such as population initialization, fitness function evaluation and finding the leader, adaptive prey encircling, bubble-net attack, random search, and termination.
In the population initialization, the nodes in the wireless sensor network are related to whales. In order to obtain optimal routing and the data must be reached to the base station by selecting the necessary nodes. Binary encoding is introduced to define the passing status of the node. If the value is 1 then it denotes the data can pass through the node otherwise it couldn’t be passed through the node. The node selection is at random and the order is expressed as
In the fitness function evaluation and identifying the leader whale, wireless sensor nodes route energy consumption is related to the whale fitness function. In order to calculate the fitness function of each individual, energy consumption between nodes, delay, packet loss rate and its cost, network bandwidth, and bandwidth factor are considered. The fitness function is expressed as
The packet loss rate and cost for packet loss are represented as p lr and p lc respectively. The bandwidth factor is represented as k and the network bandwidth is represented as BW. The computation complexity of the algorithm is reduced due to the population encoding procedure in the proposed adaptive whale oimization algorithm. The minimum fitness function whale is selected as a leader and its position is informed to all whales.
In the adaptive prey encircling process, the behavior of whales is related to the routing process in wireless sensor networks. The individual whale initially identifies the prey position and surrounds them. Currently, the leading whale updates t position of the other whales, causing the other whales to move towards the leader in oer to attack the prey. The distance between the leader and other individuals are expressed as
The leader whale fitness function is given as f
max
.. V1 and V2 are the constant functions. The position of the leader whale which changes the position of other whales is expressed as
Teader whale fitness function is given as f
max
.. U1 and U2 are the constant functions. The above adaptive function allows the optimization model to adjust the network parameters based on the fitness function in the prey encircling process which improves the convergence rate of the routing process. In the bubble net attacking process, the behavior of whales is analyzed to find the final optimal solution. Two strategies are followed by whales to attack the prey such as shrinking encircling process and spiral updating position. In the shrinking encircling process, the position of whales is updated as per equation (14). The vector coefficient is modified based on the population fitness a its range is between [–1, 1]. The position can be present in between the range specified.n the spiral updating process, the whales swim to the top surface in a spiral manner and create bubbles for prey. The distance between the leader and other whales must be obtained in trocess and it is given as
The random search for the local optimal solution is avoided in the routing process. Since not all the time, the position of other whales cannot be updated by the leader whale, in this time, the neighbor or partner whale position is considered for the current position update. In this stage, it is essential to perform a random search for py and update the position. This process is performed using the coefficient vector U. If the value of |U| > 1. then the whales perform a random search by increasing the global searching ability. Finally, in the termination process, the optimization algorithm terminates its process if specified iterations are reached. Otherwise, the process repeats from evaluating fitness function and identification of leader whale.
The proposed fuzzy optimized wireless sensor network routing is analyzed through simulation and the simulation parameters are listed in Table 7. In terms of delay, packet delivery ratio, throughput, packet loss ratio network lifetime, and energy efficiency, the proposed approach outperforms conventional approaches such as LEACH, HEED, bacteria foraging optimization (BFO), Tree-based data gathering algorithm (TBDG), and Immune inspired routing (IIR).
Simulation parameters
Simulation parameters
Figure 10 depicts the throughput analysis of proposed fuzzy-adaptive whale optimization and conventional routing approaches. Initially, the throughput is maximum due to less number of nodes and it gradually reduces if nodes are increased.The increased node density introduced impact in the throughput though the proposed optimization approach attains maximum throughput than the other conventional approaches. When the maximum of 500 nodes are present the throughput is 0.8Mbps for the proposed approach whereas the least performance is attained by HEED, LEACH, and TBDG as 0.37Mbps, 0.42Mbps, and 0.47Mbps respectively due to clustering and cluster head selection process. Whereas the performance of BFO is 27% lesser than the proposed approach and IIR performance is 29% lesser than the proposed approach.

Analysis of Throughput.
The end-to-end delay observed for conventional approaches and the proposed approach is depicted in Fig. 11. The proposed approach achieves a minimum delay of 2msec for 100 nodes and a maximum delay of 5.2msec for 500 nodes. In comparison to the proposed approach, the delay observed in other models is quite high due to the longest path length in the routing process and improper cluster formation, cluster head selection.

Analysis of End-to-End delay.
The packet delivery ratio is depicted in Fig. 12 and the packet loss ratio is depicted in Fig. 13 for the proposed optimization approach and conventional approaches. The results demonstrate the maximum delivery ratio and minimum loss ratio obtained by the proposed approach. The optimal route establishment through adaptive whale optimization algorithm neglects the unnecessary cluster heads in the routing process and selects optimal cluster heads. As a result, the packet drop ratio is reduced, which increases the packet delivery ratio. The proposed approach maximum delivery ratio is 99.2% for 100 nodes and the minimum delivery ratio is 97.6 for 500 nodes whereas 95% is observed for IIR, 88% for TBDG, 94% for BFO, 86% for LEACH, and 84% for HEED is observed for 500 nodes. The results clearly depict the better performance of the proposed approach in both delivery and loss ratios.

Analysis of packet delivery ratio.

Analysis of packet loss ratio.
Figure 14 depicts the proposed approach and conventional approaches for energy consumption analysis. It is observed that minimum energy consumption is attained by the proposed approach compared to all other methods from 100 to 500th node. The fuzzy logic-based cluster head selection selects efficient cluster heads for communication and the optimal routing process identifies the shortest for data transmission which greatly reduces the overall energy consumption. Conventional approaches like HEED, LEACH and TBDG models energy consumption attains maximum whereas moderate performance is exhibited by BFO and IIR approaches. The proposed approach claims to be a minimum energy consumption model which increases the overall energy efficiency of the network.

Energy consumption analysis.
The proposed approach and conventional approaches performances in terms of network lifetime enhancement are depicted in Fig. 15. Initially, when the nodes are minimum, the number of rounds is maximum for all the approaches. But when the nodes are increased further the network lifetime is gradually reduced. When compared to the proposed approach, the performance of HEED, LEACH, and TBDG models are very less and it reaches 2900, 3000, 4100 rounds respectively for maximum nodes.

Network lifetime analysis.
The difference obtained for HEED, LEACH, and TBDG models is 43%, 41%, and 20% lesser than the proposed approach. Whereas the BFO and IIR models outperform these three models, they perform worse when compared to the proposed approach. The proposed approach attains the maximum number of rounds which indicates the network lifetime is increased efficiency due to its energy-efficient routing and cluster head selection.
Figure 16 depicts the energy efficiency analysis of proposed optimized routing and conventional approaches. Since the optimal cluster heads are selected for data transmission the energy consumption of overall network reduces. Only the essential and optimal cluster heads are selected and the other cluster which is in the path are neglected. This process improves the energy efficiency and enhances the overall performances. Figure 17 represents as convergence rate and speed of the proposed algorithm. Which shows the proposed algorithm fitness function of the cumulative distribution factor. The results depict that the proposed model energy efficiency is maximum from 100 to 500 nodes. There is a gradual decrease in the energy efficiency for increased node count which is due to increased energy consumption and data transmission by the cluster heads. Though the energy efficiency for the 500th node is 92%, the performance of other models is relatively lesser than the proposed approach. The overall performance of the proposed model reduces computation complexity and minimizes the overhead due to the use of fuzzy logic to select optimal cluster heads from the selected clusters. As a result of the findings, the proposed fuzzy-based cluster size and cluster head selection approach with optimized routing outperforms conventional approaches and improves network performance.

Energy efficiency analysis.

Proposed algorithm convergence rate.
This research work presents a fuzzy-adaptive whale optimization algorithm for wireless sensor network routing. In the presented approach, fuzzy rules are used to obtain cluster heads and cluster size. Further, an adaptive whale optimization is implemented to obtain the optimal route for data transmission. The parameters such as node to base station distance, neighbor node distance, node degree, node centrality and residual energy are considered for cluster head formation. The fitness function of whale optimization is used to adjust the network parameters to make the network adaptive in the optimal route identification process. The proposed model performance is verified through simulation and compared with conventional approaches like LEACH, HEED, bacteria foraging optimization (BFO), Tree-based data gathering algorithm (TBDG), Immune inspired routing (IIR). The proposed approach attains minimum energy consumption for optimal routing so that the network lifetime increased better than conventional approaches. In the future, this research work can be extended using a hybrid optimization approach to improve network performances.
Conflict of interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
Ethical approval
This article does not contain any studies with human participants or animals performed by any of the authors.
Funding
This research has not received any funding support.
