1 Introduction

Wireless sensor networks (WSN) are collections of sensor nodes and they are very popular in environmental monitoring [1]. Sensor nodes can sense, collect, and transfer data from different environment locations for multiple uses [2]. These networks are very popular in the field of weather forecasting, medical fields, military monitoring, underwater monitoring, agriculture monitoring and many more useful and crucial day to day application areas [3, 4]. The overall performance of this network depends on many factors where routing is one of the predominant factors [5]. For addressing this issue clustering is one of the best solutions in which the whole network divides into small groups and each group has one cluster head (CH) node, which is responsible for overall communication [6, 7].

WSN has productive investment coverage as it is flexible in solving the challenges faced in diverse fields and it has the ability to vary lives in diverse ways [8]. However, the node present in WSN does not have any rechargeable battery or storage devices, so supporting the network with power utilization is very critical [9] (Fig. 1).

Fig. 1
figure 1

Structure of wired and wireless networks

Clustering is an important technique for extending the lifespan of WSNs, in which the data transmission becomes more efficient. Each cluster contains a few nodes known as a sensor node (SN) and cluster head (CH). CH has a lot of responsibilities like sensing the data, receiving the data from SN, and transmitting it to the BS [10]. In Fig. 2 the process of clustering is discussed as well as Fig. 1 shows the structure of traditional wired networks and wireless networks. The optimal selection of CH is very important for improving the performance of routing [11]. The performance of CH and route stability depends upon different constraints such as delay, low energy consumption, residual energy, packet delivery, etc. [12].

Fig. 2
figure 2

Structure of cluster-based network

Cluster-based routing is one of the main key factors for the performance of WSNs. There are many protocols like hierarchical routing, location-based routing protocols, homogeneous routing, and heterogeneous routings [13]. The major classical routing protocols are Low Energy Adaptive Cluster Hierarchical (LEACH) [14], Hybrid Energy Efficient Distributed (HEED) [15], Stable Election Protocol (SEP) [16], etc. There is much research done which proves that Meta heuristic algorithm performs better as compared to the classical models [17]. To solve the problems faced by the clustering strategy (particularly, the optimal CH selection and route selection), several optimization algorithms like HSO, PSO, etc., were implemented in many of the literature [18]. With the help of meta-heuristic algorithms, more effective cluster-based algorithms are generated which improve the performance of WSN in different environmental monitoring applications [19]. In this work feature of whale optimization hybridizes with lion optimization which performs better in routing.

The major contribution of this proposal is to design a new hybrid algorithm to find the Optimal CH and optimal route selection in WSN. In this proposed work whale optimization algorithm is merged with the features of lion optimization, in which the fitness is calculated with the multi-objective function which considers many factors like distance, energy, throughput, delay, Traffic rate, Cluster density, and QoS. This hybrid approach increases the lifetime of routes, which increases the lifetime of the network and improves the overall performance of the network.

The paper is arranged as: Section II literature review of recent related research for optimal CHS and routing, this section is divided into two parts first is the analysis and the second is a review of the literature. Section III discusses the issues found in the existing research and the proposed CHS model in WSN. Section IV describes the objective and its description. WL-optimization for optimal selection of CHs in WSN is portrayed in section V. Optimal routing via WL-optimization is described in section VI. Sections VII and VIII explain the results and conclusion.

2 Literature review

2.1 Literature analysis

There have been many types of research proposed for the optimization of CH selection and routing to improve the performance of the network’s energy, stability of routes, network lifetime, cost, QoS, and many more [20]. There are many algorithms that have already proven that clustering is one of the most suitable solutions for improving network performance [21]. There are many approaches like classical clustering and swarm-based clustering which are discussed in this section in detail [22].

In 2000, Heintzelman et al. [23] introduced the LEACH protocol for the very first time, in this communication between SN and BS is reduced and scheduled by TDMA scheduling. In this protocol when sensor nodes have no data to transfer, they can go into sleep mode. In this approach, every node has the same priority for selecting as a CH. It is designed for single-hop communication so in long-distance transmission sometimes CHs die early and create uneven network structure. Hot spot issues, uneven energy distribution, and high energy consumption of CH are the main issues of the original LEACH.

In 2008, Lei, Y. Shang, et al. [24] proposed a multi-hop LEACH. This is more efficient as compared to the original LEACH. This multi-hop energy-efficient LEACH is much more efficient than the large-scope networks. This approach reduced the early CH death, delay, transmission time, and packet delivery ratio. However multi-hop communication increases the network overhead.

In 2014, S. Kumar et al. [25] proposed the distance and energy-aware LEACH (DE-LEACH) protocol, which uses the threshold value for choosing the best CH and the average distance from the BS. These are the base conditions for choosing the CH. This DE-LEACH approach divides the network into two regions. The selection of CH depends upon the remoteness between BS and CH, and CH and SNs, and the second factor is the residual energy of nodes.

In 2020, Abdulrahman et al. [26] presented a modified E-LEACH routing protocol for improving the network lifetime. It is a hierarchical routing protocol for solving energy issues. In this approach, data is directly sent by CH to BS. Direct transmission consumes more energy so here fuzzy approaches are used and identify the most powerful nodes as a CH for data transmission.

In 2020, Noureddine Moussa et al. [27] presented an energy-aware cluster-based routing. In this paper rotation of CH is focused and avoids the frequent re-clustering. It used Multihop routing for reduced energy consumption. As well, a fault-tolerant mechanism is proposed to cope with the failure of CHs and relay nodes.

In 2018, Tianshu et al. [28] introduced a routing model known as GECR. They employed Genetic Algorithms (GA) to enhance the network's lifespan and improve energy efficiency (EE). Furthermore, they designed a fitness function that considered load balancing factors to distribute energy usage evenly among nodes. Ultimately, the experimental results demonstrated that this modified approach outperformed previous methods, exhibiting improved energy efficiency and reduced variance in load balancing.

In 2019, Bandi et al. [29] introduced a novel strategy named HABC-MBOA for the optimal Cluster Head (CH) selection in Wireless Sensor Networks (WSN). This adapted approach aimed to address the limitations of the ABC algorithm in global searching and mitigate the risk of CH overloading when dealing with a maximum count of sensor nodes. Their method also asserted a reduction in premature CH failure and network loops. Experimental results demonstrated that this approach significantly improved the performance in terms of the number of operational nodes.

In 2019, Dinesh and Reeta [30] presented a fitness function for Cluster Heads (CHs) was formulated, and routing in this model was based on the Multi-Objective Fruit Fly Optimization (MOFPL). Within this model, the MOFPL successfully identified the best CH among multiple CH nodes, enabling the establishment of an optimized routing path determined by the chosen function. The experimental outcomes affirm that this approach ensured efficient Cluster Head Selection (CHS) with a significant energy preservation factor.

In 2020, Ananth and Augustine [31] proposed a refined Cluster Head Selection (CHS) model that was crafted based on the Taylor KFCM (Kernel Fuzzy C-Means) approach, tailored within the Taylor series framework from KFCM. This method employed "acceptability factors" derived from energy, distance, and trust assessments to designate the optimal CH. The effectiveness of this customized approach was substantiated by its ability to maximize energy retention and foster greater trust among nodes.

In 2023, Zeng et al. [32] treated the energy efficiency of WSNs as a nondeterministic polynomial optimization problem. In this work, a hybrid metaheuristic cluster-based routing is proposed. Here a brainstorm optimization is hybrid with levy distribution. Research shows that hybrid approaches perform better as compared with an original approach.

In 2022, Rakesh et al. [33] proposed a hybrid metaheuristic algorithm for optimal cluster head selection for optimal routing in WSN. A particle distance algorithm is updated with the help of a sea lion optimization algorithm known as the PDU-SLnO algorithm.

2.2 Problem statement and review

The classical clustering strategies failed to determine the optimum solution to the NP-hard problem. Moreover, the solutions often get trapped to the local minima as these methods were highly sensitive to the starting points and therefore, often suffer from local convergence or diverge altogether. The main limitations of the existing algorithms are:

To maintain the trade-off between exploration and exploitation during hybridizing the potential solution is not maximized. The energy balancing is still not sufficient for enhancing the network lifetime.

In the proposed work these issues are considered and the proposed model handles the local optima and trade-off between exploration and exploitation with the hybridization of whale optimization algorithm with lion muted function. This hybrid model is best suited for selecting the optimal CH and optimal route for increasing the QoS of the network.

Table 1 reviews the traditional CHS and metaheuristics of CHS in WSN. It shows the features and challenges of the current approaches. A few limitations of the literature are also discussed in this table. According to this review, there are still many scopes for enlightening the performance of the network. Figure 3 presents the different types of routing protocols in WSN.

Table 1 Review of classical and metaheuristic approaches: features and challenges
Fig. 3
figure 3

Types of routing protocols in WSN

3 Proposed energy-efficient clustered routing model

The proposed model encompasses a two-step performance enhancement process: (i) The selection of the optimal Cluster Head (CH) and (ii) The identification of the best route for data transmission, or in other words, the optimal routing strategy.

To choose the CH, a hybrid approach combines the principles of whale optimization with the lion optimization function. In this approach, the limitations of whale optimization are mitigated by incorporating the multi-objective fitness function of the lion optimization algorithm.

In the second phase, which pertains to optimal routing, the same hybrid approach is applied to determine the most efficient route, building upon the CH selected in the first phase.

3.1 Network model for the proposed approach

The network model is established based on the following considerations:

  1. i.

    All sensor nodes within the Wireless Sensor Network (WSN) are identical concerning processing time and initial energy levels.

  2. ii.

    The network comprises Base Stations (BS), Cluster Heads (CH), and sensor nodes.

  3. iii.

    Euclidean distances are calculated between the sensor nodes.

  4. iv.

    Sensor nodes are randomly distributed across the sensing area, and their positions remain fixed.

  5. v.

    Additionally, the Base Station (BS) acquires information about the distances and residual energy of sensor nodes.

  6. vi.

    Subsequently, Cluster Heads (CHs) are selected based on this information using a CH selection algorithm.

  7. vii.

    The routing process is then utilized to establish the path from the CHs to the BS.

3.2 Multi-objective functional model

3.2.1 Distance

Data is transmitted to each node serving as a Cluster Head (CH). In the context of WSN, data transmission is a critical decision-making factor. If the distance between Sensor Nodes (SNs) and the CH is greater than the distance between SNs and the Base Station (BS), SNs can directly route data to the BS, consuming less energy. However, in the clustering approach, direct data transmission from SNs to the BS is prohibited. Instead, SNs relay data to the CH, which, in turn, forwards it to the BS.

To calculate the distance, Eq. (1) is utilized, representing the Euclidean distance between the position of a typical node and SNs. Let's assume there are two SNs, denoted as "A" and "B," with positions represented as "A" and "B." Eq. (1) computes the Euclidean distance between these two SNs.

$$Dis(g*w)=\left[\begin{array}{c}{e}_{{M}_{CH1},{z}_{1}}{e}_{{M}_{CH1},{z}_{2}}.........{e}_{{M}_{CH1},{z}_{m}}\\ {e}_{{M}_{CH2},{z}_{1}}{e}_{{M}_{CH2},{z}_{2}}.........{e}_{{M}_{CH2},{z}_{m}}\\ :\\ :\\ {e}_{{M}_{CHm},{z}_{1}}{e}_{{M}_{CHm},{z}_{2}}..........{e}_{{M}_{CHm},{z}_{m}}\end{array}\right]$$
(1)
$$e_{q,d} = \sqrt {(q_{x} - d_{x} )^{2} + (q_{y} - d_{y} )^{2} }$$
(2)

Additionally, CH assigns time slots to each node during data broadcasting, with a primary role of collecting data from other Sensor Nodes (SNs) within the cluster. Once data aggregation is completed, it proceeds to transmit the specific data to the Base Station (BS). When CH is in an active mode, the SNs switch to a low-power, "sleepy" mode.

3.2.2 Energy

Energy consumption holds paramount importance in WSN. The energy model for transmitting complete data is presented in Eq. (3), where 'Eete' represents electronic energy, and 'Etx' signifies the energy required to transmit a byte of data over a specific distance, \(E_{pr}\) implies power amplifier energy and \(E_{fr}\) implies energy requisite for deploying free space method. Equation (4) delves into energy consumption during data aggregation, and the overall energy required for a byte of data at various distances is depicted in Eq. (5). In Eq. (6), 'Eag' denotes amplification energy, 'e0' represents energy augmentation, and it denotes the energy needed for deployment in Eq. (7).

$${E}_{TX}(P:e)=\left\{\begin{array}{c}{E}_{ete}*P+{E}_{fr}*P*{e}^{2}, \quad if \quad e < {e}_{0}\\ {E}_{ete}*P+{E}_{pr}*P*{e}^{2}, \quad if \quad e > {e}_{0}\end{array}\right.$$
(3)
$$E_{ele} = E_{TE} + E_{ag}$$
(4)
$$E_{RE} (P:e) = E_{ete} P$$
(5)
$$E_{ag} = E_{fr} e^{2}$$
(6)
$$e_{0} = \sqrt {\frac{{E_{fr} }}{{E_{pr} }}}$$
(7)

In general, the overall energy of the entire network is described as shown in Eq. (8), where 'E1' represents the energy during the idle state, and 'EST' denotes the energy cost during sensing time.

$$E_{total} = E_{TE} + E_{RE} + E_{1} + E_{ST}$$
(8)

3.2.3 Throughput

Throughput in WSN refers to the rate at which data is successfully transmitted from sensor nodes to the base station. It quantifies the network's data delivery efficiency and performance metric, it indicates how much data the network can handle effectively over a given time period. Maximizing throughput is essential to ensure efficient data collection and timely communication in WSN applications.

Equation (9) presents the throughput model, with 'PR' denoting the packets received at each node and 'CHm' representing the Cluster Head count. As indicated in Eq. (10), it is imperative for the CH count to be high to optimize the network's performance.

$$Th^{*} = \frac{{Sum\left( {P^{R} } \right)}}{{2 \times P\left( {CH_{m} } \right)}}$$
(9)
$$Th = \frac{1}{{sum\left( {Th^{ * } } \right)}}$$
(10)

3.2.4 Delay

In WSN, delay pertains to the time it takes for data to be transmitted from sensor nodes to the base station. This delay is a critical metric as it affects the timeliness of data collection and communication in applications like environmental monitoring and surveillance. Minimizing delay is crucial for ensuring real-time and efficient information retrieval in WSNs.

Delay is computed by subtracting the desired time from the actual time, representing the variance between the actual and expected time of occurrence. In Eq. (11), 'CHm' denotes the number of Cluster Head in a WSN, and ‘Tn represents total node count signifies the overall number of nodes within the network.

$$De = \frac{{\mathop {Max\left( {CH_{m} } \right)}\limits_{m = 1}^{L} }}{Tn}$$
(11)

3.2.5 Traffic rate

Traffic rate in WSN refers to the volume of data generated and transmitted by sensor nodes within the network over a specific time period. It is a key performance metric, and variations in traffic rate can impact network congestion, energy consumption, and data delivery efficiency. Proper management of traffic rate is essential to maintain the network's reliability and optimize resource utilization in various WSN applications.

The final requisite for calculating fitness is the traffic rate within the cluster.

This traffic rate represents the minimal value required for an enhanced communication process and is formulated as shown in Eq. (12), where ‘Li(t)’ denotes the flowrate of traffic for a specific node.

$$TR\left( t \right) = \sum\limits_{i = 1}^{N} {\frac{{L_{i} \left( t \right)}}{{\max L_{i} \left( t \right)}}}$$
(12)

3.2.6 Cluster density

Cluster density in WSN quantifies the concentration of sensor nodes within a particular cluster concerning the overall number of nodes in the network. It's a crucial metric for optimizing data aggregation and communication efficiency in clustered WSNs, as higher cluster density can lead to more efficient data routing and reduced energy consumption.

Node density illustrates the ratio of the number of nodes within a cluster to the total number of nodes in the WSN. Equation (13) defines the cluster density in WSN, with 'Tn' representing a node within a specific cluster.

$$CD = \frac{1}{N}\sum\limits_{j = 1}^{X} {\left| {Tn_{j} } \right|}$$
(13)

3.2.7 QoS

QoS in WSN refers to the network's ability to meet specific performance requirements and ensure reliable data delivery. QoS parameters in WSN include factors like latency, reliability, throughput, and energy efficiency, which are crucial for applications such as environmental monitoring and healthcare. Ensuring high QoS is essential to guarantee that the network delivers data with the desired level of performance and reliability.

QoS serves as the metric for evaluating the quality parameters discussed in the preceding section. To achieve an elevated QoS, all these parameters must meet specific criteria.

The multi objective function of this study is defined in Eq. (14), while the constraints, delineated in Eqs. 1 through 13 in the previous section, encapsulate the QoS-related requirements.

$$Obj = Min\left[ {\left( {w_{1} *\frac{{De}}{{De_{{Nor}} }}} \right) + \left( {w_{2} *\frac{{Dis}}{{Z*B*N}}} \right) + w_{3} *\left( {1 - E} \right) + {\text{ }}w_{4} *\left( {CD} \right) + w_{5} *\left( {1 - TR} \right) + w_{6} *\left( {1 - Th} \right) + w_{7} *\left( {1 - QoS} \right)} \right]$$
(14)

4 Hybrid whale and lion optimization (WL algorithm)

While the traditional WOA [38] has seen several enhancements, it still faces challenges such as early convergence and local optima. To mitigate these issues, the principles of LA [39] are integrated with the standard WOA, resulting in the creation of WL-Optimization, a novel approach that overcomes the limitations of the original WOA. Hybrid optimization models are particularly well-suited for addressing specific search-related challenges [40,41,42,43,44,45]. The steps for developing WL optimization algorithm are as follows.

The astounding hunting strategy of humpback whales is what makes them stand out. They could locate the prey and surround them. The other search agent makes an effort to update their location toward optimal agents for better searches after the attainment of optimal searching agents. Equations (15) and (16) highlight this activity. In Eq. (15), denotes the current iteration, represents the position vectors of the needed solution, denotes the distance between the whale and its prey, denotes the absolute value, denotes the location vector, and " denotes "element-by-element multiplication."

$$\vec{P} = \left| {\vec{E}.\vec{S}^{ * } \left( {it} \right) - \vec{S}\left( {it} \right)} \right|$$
(15)
$$\vec{S}\left( {it + 1} \right) = \vec{S}^{ * } \left( {it} \right) - \vec{J}.\vec{P}$$
(16)

It's crucial to emphasize that each iteration should yield an enhanced solution. Equations (17) and (20) detail the computation of coefficient vectors, where 'x' represents any arbitrary vector. Traditionally, 'y' linearly decreases from 2 to 0, as calculated in Eq. (18). However, in accordance with the WL optimization model, 'C' is computed following Eq. (19). Moreover, this work incorporates LA-based mutation, effectively preventing the entrapment into local optima.

$$\vec{J} = 2y.{\kern 1pt} \,\vec{r} - \vec{y}$$
(17)
$$\vec{y} = 2\left( {1 - \frac{it}{{it_{\max } }}} \right)$$
(18)
$$\vec{y} = 1 + 0.5 * \cos \left( {\pi * \frac{it}{{it_{\max } }}} \right)$$
(19)
$$\vec{A} = 2.\vec{r}$$
(20)

Exploitation phase: This is accomplished by diminishing the significance of 'y' in Eq. (16). It's vital to note that the disparity between 'j' and 'y' is diminished by 'y' where 'y' represents a random number selected from the range [-1, 1], and 'j' gradually decreases from 2 to 0 in subsequent iterations. A spiral pattern is established between the positions of the whale and its prey, as depicted in Eq. (20), where 'b' signifies a constant and 'l' represents any integer within the range of -1 to 1.

$$\vec{S}\left( {it + 1} \right) = \vec{P}^{\prime}S.e^{bl} .\cos \left( {2\pi l} \right) + S^{ * } \left( {it} \right)$$
(21)

Exploration phase: During this phase, an alternate exploration agent is introduced, enabling an extensive search using the WL model while emphasizing specific search aspects. This is represented in Eqs. (21) and (22). Typically, updates are distance-based, but the WL model introduced updates based on the LA principles, as demonstrated in Eq. (22). Here, 'k' represents a variable within the range of [1, Len], where Len corresponds to the lion's length. Additionally, 'i' denotes the process of updating females, and 'j' is a randomly selected whale from the current population. Algorithm 1 outlines the pseudocode for the WL model (Fig. 4).

$$\vec{P} = \left| {\vec{A}.\vec{S}_{{_{rand} }} - \vec{S}} \right|$$
(22)
$$\begin{gathered} \vec{S}\left( {it + 1} \right) = \min \left[ {S_{d}^{\max } ,\max (S_{d}^{\min } ,\nabla_{d} )} \right] \hfill \\ \hfill \\ \end{gathered}$$
(23)
Fig. 4
figure 4

Solution Encoding

4.1 WL-based optimization for optimal selection of cluster heads in WSN

For selecting optimal CH, this research deploys the LM-WOA model. The input provided to proposed model is revealed in Fig. 5, wherein, \(CHn\) signifies the total CH count. Every cluster has a CH that is selected by the proposed lion-muted whale optimization algorithm.

Fig. 5
figure 5

Flowchart of optimal CHS

The whale optimization algorithm is one of the best global searching algorithms developed by mirjalili in the year of 2016. In this, the social behavior of hump whales is discussed. The prey selection of humpback whales is very unique which is the main motivation of selecting this algorithm for efficient CH selection. On the other hand, the social behavior of the Lion has its own conditions every time for king selection the current king should pass on the fitness parameters to show its capabilities. Sometimes whale optimization faces local optima which can easily be handled by a lion optimization algorithm.

In the proposed model CH selection uses the same concept every time every node has to prove its fitness factor. If the fitness factor satisfies the minimum requirements for CH, then only it can be selected as CH. With this approach, CH death, early death of CH, and hotspot issues are also reduced. Figure 5 shows the flowchart for optimal CH selection.

Algorithm 1
figure d

Cluster Head selection using WL-Optimization approach

4.2 Optimal data transmission (routing) via WL algorithm

The optimal routing algorithm is a key component of data transmission in various networks and communication systems. It plays a crucial role in determining the most efficient path for data to travel from a source to a destination. The primary goal of an optimal routing algorithm is to minimize factors such as latency, congestion, packet loss, and resource utilization while ensuring that data reaches its intended destination in a timely and reliable manner.

Numerous routing algorithms exist, each designed for specific network types and applications. The choice of the optimal routing algorithm depends on the network's characteristics and the specific requirements of the data transmission task. The ideal routing algorithm balances factors like path length, available bandwidth, network topology, and QoS (Quality of Service) constraints.

After the selection of optimal CHs, they transmit the gathered data to the BS via the optimal path determined by means of the WL-Optimization model. This work concerns the distance between CHs and the distance between BS to CH as the objectives for selecting the optimal path. Figure 6 shows the working of the best route selection in the available routes with the help of optimal CHs. It includes the steps of route selection. It depends upon two factors (i) the distance between CH to BS and (ii) the distance between CH to CH. In these factors if the CH to BS distance is minimum data can be travelled directly otherwise data travel through CH to another CH. In this approach initially optimal CH is selected then CH to CH and CH to BS route creation happens and data travelled successfully.

Fig. 6
figure 6

Flowchart for optimal routing

Algorithm 2
figure e

Route selection using WL-Optimization approach

5 Results and discussions

5.1 Simulation procedure

The proposed WL-Optimization model was executed using MATLAB. In this network configuration, the node count ranges from 100 to 200, with an initial energy level of 0.5 J. Both receiving and transmission power were set at 50e-9 J, and the iteration rounds are (0,500,1000,1500 and a maximum of 2000).

A comprehensive performance assessment of the WL-optimization model, comparing it with several other models, including FF [46], MBO [47], FGF [48], GWO [49], PRO [50], SSA [51], LA [39], and WOA [38]. These comparisons were conducted across various matrices in different scenarios such as energy consumption, focusing on alive nodes, packet delivery ratio (PDR), network lifetime, and throughput.

Figures 7, 8, 9, 10, 11, and 12 represent the simulation of the proposed model with other models with different parameters. Tables 2 and 3 present the parameter study of different approaches with different scenarios.

Fig. 7
figure 7

Representation of a 100 nodes and b 200 nodes

Fig. 8
figure 8

Remaining Energy analysis using the WL-Optimization model over traditional models for a 100 nodes and b 200 nodes

Fig. 9
figure 9

Analysis of alive nodes using the WL-Optimization model over traditional models in 9 a, b, c, and d

Fig. 10
figure 10

Analysis of a Network Lifetime b Throughput c Packet Delivery Ratio (PDR) and d Packet Transmitted ratio (PTR) using the WL-Optimization model over traditional models

Fig. 11
figure 11

Convergence Analysis of developed approach over compared approaches for a 100 nodes b 200 nodes

Fig. 12
figure 12

Analysis on delay using developed approach over compared approaches for a 100 nodes b 200 nodes

Table 2 Statistical Analysis on alive nodes: Adopted and existing models
Table 3 Statistical Analysis on residual energy: Adopted and existing models

5.2 Analysis of remaining-energy

The figure illustrates the analysis of residual energy for our proposed WL-Optimization model compared to standard models in two distinct scenarios. In the graph, it is evident that the residual energy of our proposed WL-Optimization model decreases as the number of rounds increases. However, it stands out by having a notably higher remaining energy in the final round.

Specifically, when we consider scenario 1 with 100 nodes, at 1000 rounds, the residual energy of our proposed approach reaches its maximum value as compared to the classic models like FF, MBO, FGF, GWO, PRO, SSA, LA, and WOA. Similarly, in scenario 2 with 200 nodes, the proposed model exhibits superior residual energy compared to other existing models.

Furthermore, at 2000 rounds, the proposed method maintains a higher residual energy. In contrast, traditional models like WOA, LA, FGF, GWO, PRO, SSA, MBO, and FA experience a decline in network lifetime, with minimum values of approximately 0.02, 0.04, 0.01, and 0.03, respectively for scenario 1 with 100 nodes (as seen in Fig. 8b).

To put this into perspective, at round 2000, the adopted WL-optimization performs more efficiently than the existing schemes, namely WOA, LA, GWO, FGF, PRO, and SSA models, respectively, in scenario 2 with 200 nodes (as depicted in Fig. 8a).

5.3 Analysis of alive nodes

The assessment of the number of live nodes using the WL-optimization model is compared with several traditional models including WOA, LA, FGF, PRO, SSA, FF, and GWO methods. The evaluation process of alive nodes spans various iterations, specifically at 0, 500, 1000, 1500, and 2000 rounds. Additionally, the evaluation of live nodes is conducted for two different node counts, involving 100 and 200 nodes.

In this scenario, there are two analysis which is discussed in Fig. 9. Figure 9(a) describes alive nodes after 1000 rounds with 100 nodes and Fig. 9(b) describes alive nodes after 1000 rounds with 200 nodes, Fig. 9(c) describes a7live nodes after 2000 rounds 7with 100 nodes and Fig. 9(d) describes alive nodes after 2000 rounds with 200 nodes.

Upon examining the graph, it becomes apparent that the count of live nodes decreases as the number of rounds increases. Nevertheless, the WL-optimization model, when compared to traditional methods, maintains a higher number of live nodes, even during the final rounds of evaluation.

The proposed model achieves a remarkable 1200-fold increase in live nodes compared to traditional schemes such as WOA, LA, FF, FGF, GWO, PRO, SSA, and MBO. In the outcome graphs, the analysis reveals that the number of live nodes increases for both proposed and traditional models up to a certain number of rounds and then gradually decreases.

5.4 Analysis on network lifetime, throughput, PDR and packets transmitted ratio

Figure 10 presents a comprehensive analysis encompassing network lifetime, throughput, Packet Delivery Ratio (PDR), and Packet transmitted packets (PTR), with the W-Optimization model over traditional models. In this evaluation, all performance metrics—network lifetime, throughput, PDR, and PTR. The proposed model shows the exhibit of higher values to signify improved data transmission. The analysis encompasses scenarios involving 100 nodes and 200 nodes.

Upon reviewing the graphical outputs, it is evident that the network lifetime exceeds that of the compared approaches, including WOA, LA, FGF, GWO, PRO, SSA, FF, and MBO. When examining the network lifetime for 100 nodes, the WL-Optimization model achieves a notably higher network lifetime value of 3200 compared to other traditional models. In Fig. 10(a), for 200 nodes, the network lifetime reaches its peak at approximately 3700, underscoring the substantial improvement offered by the proposed model over conventional models.

The analysis of throughput, carried out by the WL-Optimization model, compared to conventional methods including WOA, LA, FGF, GWO, PRO, SSA, FF, and MBO is depicted in Fig. 10(b) for both 100 nodes and 200 nodes. The throughput, a crucial indicator for enhanced data transmission, is evaluated based on the routing process. In Fig. 10(b), the proposed approach attains a high value of 3.7 for 100 nodes, while it reaches a value of 2.5 for 200 nodes. Consequently, the proposed approach demonstrates superior performance when dealing with 200 nodes in comparison to the other schemes.

Figure 10(c) delves into the evaluation of the Packet Delivery Ratio (PDR) by the proposed technique against other established schemes including WOA, LA, FGF, GWO, PRO, SSA, FF, and MBO. In this context, a lower PDR is indicative of enhanced system performance. Notably, the proposed technique achieves lower PDR values than other compared schemes for both 100 nodes and 200 nodes. For instance, the PDR of the proposed model is minimal (~ 7) for 100 nodes, while traditional models like FGF and WOA exhibit higher PDR values (~ 45) and (~ 38), respectively. This analysis underscores that efficient data delivery contributes to the improved performance of the adapted approach.

The examination of the total data transmission to the Base Station (BS) using the WL-Optimization technique, compared to conventional models for both 100 nodes and 200 nodes, is illustrated in Fig. 10(d). In this analysis, a higher count of packets transmitted to the BS indicates the effectiveness of the proposed work. Remarkably, the proposed model achieves exceptional results at 100 nodes, surpassing other conventional schemes such as including WOA, LA, FGF, GWO, PRO, SSA, FF, and MBO models. Similarly, with 200 nodes, the proposed method demonstrates a substantial increase in the total packets transmitted to the BS, reaching approximately 10 in Fig. 11d, outperforming other traditional schemes including WOA, LA, FGF, GWO, PRO, SSA, FF, and MBO models.

5.5 Statistical analysis

The proposed approach is subjected to a comparative analysis against existing schemes, namely WOA, LA, FGF, GWO, PRO, SSA, FF, and MBO, in a structured sequence. This analysis focuses on assessing the statistics related to the number of live nodes and the utilization of residual energy. The summarized outcomes are presented in Tables 2 and 3.

This comprehensive analysis covers scenarios involving both 100 and 200 nodes, with each scheme executed ten times to ensure robust statistical evaluation. In Table 1, under mean-case scenarios, it becomes evident that the newly proposed LM-WOA model consistently achieves a higher number of live nodes for both 100 and 200 nodes when compared to the traditional models, including WOA, LA, FGF, GWO, PRO, SSA, FF, and MBO.

Furthermore, Table 1 provides statistical insights into the live node count of the newly introduced LM-WOA model, indicating the highest mean values (181.01) for node 200 when contrasted with the existing models, such as WOA, LA, FGF, GWO, PRO, SSA, FF, and MBO.

In a similar vein, the statistical analysis presented in Table 2 reveals that the WL-Optimization model excels in terms of residual energy utilization, yielding the highest mean values (0.29136) for node 200 when compared to other existing models like WOA, LA, FGF, GWO, PRO, SSA, FF, and MBO respectively.

Conclusively, as depicted in Table 2, the introduced LM-Optimization technique consistently outperforms conventional models, including WOA, LA, FGF, GWO, PRO, SSA, FF, and MBO, particularly in terms of residual energy utilization in the median-case scenario. Overall, the comprehensive statistical analysis strongly supports the adoption of the WL-Optimization system for selecting the most efficient routing paths in a cluster-oriented WSN.

5.6 Convergence analysis

Figure 11 illustrates the cost analysis of the adopted WL-Optimization scheme in comparison to a range of conventional schemes, including existing WOA, LA, FGF, GWO, PRO, SSA, FF, and MBO, across varying iterations. The analysis involves iterations from 0 to 10.

Upon closer examination of the results, it becomes evident that the proposed model consistently achieves the lowest cost values across all iterations when compared to the distinguished schemes, such as WOA, LA, FGF, GWO, PRO, SSA, FF, and MBO. Initially, from iteration 0 to iteration 6, the cost values are somewhat higher for both the adopted and compared models. Notably, existing LA and PRO exhibit the poorest performance during the initial iterations (0—6).

However, from iteration 0 to 6, the cost values progressively decrease for both the compared and proposed models. Importantly, the proposed model consistently demonstrates lower cost values than the existing ones. Notably, the proposed approach attains the minimum cost value, approximately 116.5, through the application of the introduced optimization theory. This outcome serves as a confirmation of the growth and enhancement of the presented model.

In summary, the cost analysis presented in Fig. 11 underscores the superior performance of the proposed WL-Optimization scheme, as it consistently outperforms existing schemes in terms of cost efficiency, validating the advancements made in this model.

5.7 Delay analysis

Figure 12 presents an analysis of delays achieved by the WL-Optimization model in comparison to a set of conventional models, specifically WOA, LA, FGF, GWO, PRO, SSA, FF, and MBO, across various rounds. The examination covers rounds ranging from 0 to 2000.

Upon reviewing the results, it becomes evident that the recommended WL-Optimization model consistently yields lower delay values across all rounds when compared to the distinguished schemes, including WOA, LA, FGF, GWO, PRO, SSA, FF, and MBO. Notably, at the 1500th round, the delay values achieved by the proposed model for 100 nodes are notably lower than those achieved by the compared models.

During this assessment, it's worth highlighting that existing PRO exhibits its weakest performance at the 400th round for 100 nodes. Furthermore, the proposed approach achieves a minimal delay value, approximately 1250, at the 200th round when the node count is 200.

In conclusion, the overall assessment affirms the significant improvements and enhancements offered by the presented model, particularly in terms of reducing delays when compared to conventional schemes.

6 Conclusion

This study presents an innovative cluster-oriented routing model focused on the selection of the optimal Cluster Head (CH). To identify the optimal CHs, WL-Optimization is proposed, which amalgamates principles from LA and WOA theories. In this context, a multi-objective function was formulated, taking into account various constraints such as distance, delay, energy, cluster density, traffic rate, throughput, and Quality of Service (QoS).

Once the optimal CHs were determined, data transmission occurred along the selected optimal paths identified through the WL-Optimization model. This research is poised to enhance the performance of diverse environmental monitoring applications in WSN. In the realm of data sensing, one of the most crucial aspects is the efficient transfer of data along the most suitable routes to enhance network performance. This study concentrates on the selection of the best CHs and optimal routing strategies.

The analysis encompassed scenarios involving both 100 and 200 nodes. Notably, the graphical outputs demonstrated that the network lifetime exceeded that of compared approaches such as WL-Optimization, WOA, LA, FGF, GWO, PRO, SSA, FF, and MBO. Specifically, when examining the network lifetime for 100 nodes, the developed WL-Optimization method achieved a higher network lifetime value of 3200 compared to other traditional models. This network lifetime increased to its peak, approximately (~ 3700), for 200 nodes, highlighting the advancements brought about by the WL-Optimization technique over other conventional models.

Furthermore, the statistical analysis of remaining energy utilization for the introduced WL model revealed the highest mean values (0.29136) for node 200 in comparison to other existing models, including WOA, LA, FGF, GWO, PRO, SSA, FF, and MBO.

Looking ahead, our future plans include conducting an analysis focused on energy stabilization, further enhancing the robustness of the research.