1 Introduction

1.1 Background

The Wireless Sensor Network (WSN) remains a well-known wireless technology since it has multi-disciplinary applications. It comprises of Base Station (BS) and a high quantity of spatially dispersed sensor nodes. The distribution of sensor nodes can be either static or dynamic [1]. These sensor nodes have the capability of monitoring the physical attributes such as moisture level in the air, temperature, noise, pressure, vibrations, etc.[2, 3]. WSN can be incorporated in various circumstances to monitor, collect and transmit the physical and environmental occurrences. But there are significant constraints that the deployed sensor nodes are restricted by energy, computational capability, bandwidth and memory [4, 5]. Among them, the energy constraint of the sensor nodes personifies a significant part in affecting the lifespan of the network. Further, the transmission cost of the network overtakes the sensing and computation cost [6]. Hence, the energy of the nodes which is available for access should be utilized efficiently to augment the network lifetime and to lessen the communication cost [7].

The clustering technique is the essential approach in handling the energy constraints of the sensor nodes [8]. This technique segregates the entire network into certain groups called clusters. All clusters have an individual leader called Cluster Head (CH), and the rest of the nodes in the cluster are said to be its members [9, 10]. The elected CH is susceptible for gathering and transferring the data collected by the cluster members. The received data are transmitted to the BS via single-hop (direct) or multi-hop transmission [11]. Generally, clustering is done in two ways, one is equal clustering, and another one is unequal clustering [12, 13]. In equal clustering, the clusters are made up of the same quantities of sensor nodes, whereas, in unequal clustering, the clusters are made by various quantities of sensor nodes. Figure 1 shows the architecture of the unequal clustering scheme.

In equal clustering, the dissemination of nodes in the network directly affects its performance, and it can perform well only when the nodes are uniformly disseminated [14]. Consequently, it does not work favorably in most of the scenarios, as the nodes are randomly deployed. Besides, there will be more differences in the energy depletion (i.e., unequal energy consumption) of CHs [15]. In general, a node in each cluster that possesses higher residual energy will be chosen as a CH [16]. After some period, the energy level of the selected CH will be reduced due to communication overhead. So, for the subsequent round, another node having higher residual energy among the remaining nodes will be selected as the next CH. Further, the CHs of longer distance spend more energy on transmission than the other CHs. This leads to a frequent change of CH which successively reduces the network lifetime, as the frequent selection of CHs increases the transmission of control packets.

In typical unequal clustering, the clusters are formed with various dimensions depending on the distance [17]. The clusters which are located closer to the BS will be smaller, and its CHs are picked as forwarders, and the clusters which are located far away from the BS will be larger. The chosen forwarders are liable for accumulating and disseminating the data collected by the remaining CHs in the network [18]. Though unequal clustering forms balanced clusters, the energy distribution will not be uniform, as the density of the clusters may vary. When density is considered, there is a probability that even the smaller clusters can have more cluster members, which in turn collecting data from more cluster members will consume more energy in the CH. This leads the closely located CH to change frequently which in turn lessens the network lifetime.

WSN is used in various terrains such as forest fire detection, animal tracking, security and surveillance, military applications, environmental monitoring and so on. Most of the WSN applications are usually deployed in a remote area and inaccessible after deployment. Energy is one of the primary concerns in WSN application, since the sensor nodes are equipped with limited battery power. The utilization of energy of the sensor nodes has a greater influence in the network lifetime. Various researchers have tried to minimize the energy consumption of sensor nodes via various approaches [9, 19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52]. Clustering approach is one of the best ways to minimize the energy consumption of a sensor network in an optimized manner. Though there are various clustering protocols, the critical problems like energy optimization and load balancing among the sensor nodes of a network demand additional examination. To address these problems mentioned above and to augment the lifetime of WSN, we propose energy efficient lifetime maximization (EELTM) approach, which forms energy-balanced unequal clusters.

Fig. 1
figure 1

Architecture of unequal clustering in WSN

1.2 Authors’ Contributions

The main objective of this paper is clustering in WSN in an energy-efficient manner. Our EELTM apples the multi-objective fitness function of the Particle Swarm Optimization (PSO) algorithm for picking the CHs and the Cluster Routers (CRs) for each cluster. The selected CHs by the EELTM approach are liable only for accumulating the data from cluster members, and the CRs are responsible for transmitting the CH’s aggregated data. We further incorporate the Fuzzy Inference System (FIS) to determine the Cluster Head Radius (CH\(_\mathrm{R}\)) of each cluster. The CH\(_\mathrm{R}\) decides the size of each cluster to form energy-balanced unequal clusters which in turn minimizes the unequal energy consumption problem. Besides, an energy threshold (\(E_\mathrm{TH}\)) is defined to balance the energy distribution of nodes and to prevent the earlier death of CHs. A new CH will be selected only when the energy level of a CH is lesser than the \(E_\mathrm{TH}\). By the \(E_\mathrm{TH}\), the frequent modifications in clusters are reduced, and the energy is disseminated over the network, which successively extent the lifetime of WSNs. The results of our approach are estimated against the existing clustering techniques such as Low Energy Adaptive Clustering Hierarchy (LEACH) [9], Energy Aware Unequal Clustering with Fuzzy (EAUCF) [42] and Energy Efficient Unequal Clustering (EEUC) [43].

Our significant contributions in this paper are listed below:

  • We proposed the EELTM approach, which forms energy-balanced optimal clusters for maximizing the lifetime of the WSN network.

  • In EELTM, we employed PSO-based multi-objective fitness function to find the fitness value of each sensor node, based on the important factors energy, density and distance.

  • Further, we incorporated the Fuzzy-based Optimal CH–CR selection algorithm to select CHs and CH\(_\mathrm{R}\)s.

  • We introduced a CR node for each cluster to reduce the overhead of CH and lessen the frequent change of CH using energy threshold.

  • The chosen CHs and CRs are responsible to do specific tasks like collecting data from the sensor nodes and transmitting the data to the BS, respectively.

1.3 Organization of the Paper

The structure of this paper is given as follows. The analysis of previous works on various clustering mechanism is interpreted in Sect. 2. The in-depth description of the traditional PSO algorithm is given in Sect. 3. Section 4 contributes a deep knowledge of the proposed EELTM approach. Sections 5 and 6 deliver the results and the conclusion of our research work.

2 Related Works

The clustering mechanism holds the most significant and optimized solution in WSN. Initially, several clustering algorithms have been designed. Later, smart procedures such as evolutionary algorithms, neural networks, intelligent swarm techniques and reinforcement learning are applied for fixing numerous design concerns in WSN. The design concerns include data aggregation, CH collection, synchronization, routing and security. Since the nodes in the network rely on each other with relevant metrics, configuring the structure of the cluster by employing predefined rules is not profoundly appropriate. For this reason, a smart technique is needed. In addition to this smart technique, Fuzzy logic is required for providing a remarkable solution for the problems with high uncertainty [43]. Therefore, in this section, several strategies like traditional strategy, swarm intelligence techniques and fuzzy cum procedures for clustering are reviewed elaborately.

2.1 Traditional Strategies

Low-Energy Adaptive Clustering Hierarchy Protocol (LEACH) [9] is one of the prominent clustering approaches in WSN. It follows an iterative process in which it decides the CHs in a random manner. As it accompanies a random selection process, there are possibilities for selecting a node holding very low residual energy as CH, which in turn causes earlier death of CHs. Further, it follows single-hop transmission which does not fit for large-scale WSNs.

A responsive methodology called Hybrid Energy Efficient Reactive [19] broadcasts the data based on the threshold rates. Initially, the CH will broadcast a couple of threshold limits. The nodes in the network are permitted to broadcast only after checking the inequality between the sensed data and the threshold limit. This protocol may diminish energy utilization and improves the durability session and network lifetime, but realistically it cannot be practiced in all circumstances. Because if a node does not hit the threshold limit, the data will not be broadcasted and there will be a loss in perceiving the sensing domain.

EEDC [20] is a clustering technique based on the distance, which analyzes the availability of adequate space between the chosen CHs to validate the uniform distribution of CHs. If a CH holds the same or higher distance when compared with the threshold distance, it is elected as a CH. Though this technique is energy-efficient, it does not adhere to other WSN specifications, like monitoring the entire coverage zone.

An efficient data aggregation algorithm for WSN through combined Power Efficient Gathering in Sensor Information Systems (PEGASIS) algorithm and the Hamilton loop algorithm is presented [21]. The whole sensing area is divided non-uniformly to archive non-uniform clustering using a threshold. Both single-hop and multi-hop transmission mechanisms used in this work by combining PEGASIS algorithm and Hamilton loop algorithm. Further, using Hamilton optimal moving path mobile agents collect the data from CH to achieve equal energy consumption and prolong the network lifetime.

A Enhanced Power Efficient Gathering in Sensor Information Systems (EPEGASIS) algorithm [22] is proposed to solve hotspot problem with mobile sink to extend the lifetime of the WSNs. In EPEGASIS, optimal communication distance is used to choose a relay node for data transmission. Nodes whose remaining energy is less than the threshold value will not act as a relay node to avoid early nodes dying. Communication distance of the nodes is adjusted based on the distance to the mobile sink to reduce the energy consumption which prolongs the networks lifetime

2.2 Swarm Intelligence Techniques

In [23], proposed Intelligent Data Gathering Schema with Data Fusion(IDGS-DF). IDGS-DF scheme partition the whole sensing region into several sub-partitions by virtual grids. The cluster head is selected for each virtual grids based on residual energy ratio and total neighbor distance. After cluster head is selected, a pre-trained neural network algorithm is used for data fusion in CH. Finally, the mobile agent is gathered data from CH using the predefined path. Each CH transfers the data to its neighbor CH which is closer to the mobile agent.

A novel cluster head selection based on k-means and binary PSO called KBPSO is proposed in [24]. Initially, sensor nodes are divided as several fuzzy initial subsets using fuzzy clustering based on geographical location. The improved particle swarm optimization algorithm is used to find the fitness values of each node by considering energy consumption and distance factors.

An approach presented in [25] for mobile sensing by drones in WSN. Data collection is done by autonomous drones where Bacterial Foraging Optimization Algorithm is used to allow drones to move in a specific organized way. Significant advantages of this scheme are drones acting as mobile sink and collect data from static sensors to improvise the network coverage and network is improved.

The ABC algorithm commands the BS for enforcing the clustering and routing activities [26]. A centralized clustering algorithm incorporates PSO, and an effective particle encoding scheme determines fitness function for yielding stable clusters in the network. PSO-C is a converged scheme in which a function is deployed for diminishing the distance between the clusters. It optimizes energy utilization, but it is not suitable for random deployment as it is aware of its location.

Bee-Sensor-C [27] is a superior interpretation of Bee-C technique which is proposed for event-driven WSNs. Here, the clusters are formed among the closer sensor nodes and routing occurs correspondingly. Thus, it performs unstable clustering along with routing based on its demands. However, it leads to an increasing burden for the massive deployment of WSN. In ERP protocol [53], a unique fitness count is estimated by coherence and departure errors. Though it augments the life of the network, its stability is automatically lessened. Further, it is not recommended for feedback-based WSN as the feedbacks are incredibly conscientious.

A PSO-based scheme is proposed in [28] for solving hotspot problems caused by multi-hop communication, which includes both clustering and routing algorithms. The traffic load over cluster head (CH) is distributed evenly in the routing phase. In contrast, the energy of CHs is reduced fast in the clustering phase by considering the precise number of sensor nodes. For avoiding the mortality rate of CHs, they developed a distributed scheme, which then completely resulted from energy depletion. For clustering and routing algorithm problems, they use LP formulations. The simulation of the proposed algorithm is to demonstrate its strength over other existing algorithms.

In [29], a routing scheme is proposed to balance the overall energy of the sensor network using energy center-based clustering. PSO is used to remove the energy hole and helped in searching energy centers for CHs selection. CHs were selected by considering the location of the node using geometric partitioning. Besides, a safeguard mechanism helped in preventing energy nodes. The EC-PSO performs similarly in network lifetime improvement and energy utilization ratio.

A modified version of the PSO algorithm called clustering-based fuzzy particle swarm optimization (CFPSO) is proposed in [30] aimed to incorporate weak ties between clusters, and degree of influence in affection. Since the PSO algorithm holds the information about the neighborhood nodes, the degree of the neighborhood for each particle is determined. More particles from more clusters are allowed to affect their degrees. Thus, based on the degrees of the neighborhood the clusters are formed.

An energy-efficient coverage control algorithm [31] is presented to solve the coverage hole problem in randomly deployed sensor nodes of static WSN using PSO algorithm. In this method, the whole sensing region is partitioned into virtual grids and each virtual grids sensing radius is adjusted based on each grid’s coverage rate. PSO algorithm is used to change the sensing radius based on energy consumption, with this balanced coverage rate and energy efficiency obtained.

A two-tier protocol is proposed in [32] to overcome the use of infinite transmission range and location awareness. The two algorithms were proposed to solve both clustering and routing problems. The first one finds the optimal cluster heads and their associative clusters with energy efficiency, network coverage and cluster quality. The latter one is used to find the optimal routing tree for inter-cluster communication using a novel particle encoding scheme. This work is simulated with no assumptions were made about the locations of the node.

Based on the improved PSO algorithm, a new technique is introduced in [33] to extend the network lifetime in WSN. The CH is selected based on the two major parameters, namely residual energy and locations. For each cluster head, the relay node is being selected based on the distance between BSs and their corresponding cluster node. The relay node is used to minimize the energy consumption of CHs, for choosing the next-hop node and channel contention.

In [34], a trajectory scheduling for multiple mobile sinks based on coverage rate is described. This work mainly focuses on two works which is park position selection and finding an optimal path for multiple mobile sinks. First one uses improved PSO algorithm to select a park position for data collection from other sensor nodes based on coverage and overlapped coverage rate of sensors. Second, Genetic Algorithm(GE) is used for finding the mobile sink’s optimal moving path.

Genetic Algorithm [35]-based energy-efficient protocol works in two states to boost up the durability of WSN. The two stages include the initialization state and the fixed state. In the initialization state, the genetic algorithm is responsible for constructing the clusters. In the next state, the TDMA scheduler is responsible for transmitting the data in between the clusters. LEACH-LPR [36] acts as a dynamically dispersed clustering technique that relies on LEACH protocol. It chooses the CHs by dealing with the parameters like distance among the BSs, the residual energy and the region frequency. By incorporating a genetic algorithm, it overcomes the computational overhead in WSN.

In [37], presented a clustering and routing mechanism using Binary Particle Swarm Optimization (BPSO). A new 2d particle representation is used for clustering and routing process rather than uni-dimensional representation. A novel stochastic particle position update strategy is introduced to update the 2d particle representation. A simple novel efficient transfer function is used for continuous to discrete mapping.

An improved self-adaptive PSO is utilized along with Fuzzy C-Means (FCM-IDPSO) [38] for effective clustering. The system tried to avoid premature convergence and lead toward global optimum by dynamically adjusting the parameters. Unlike the traditional PSO, the FCM-IDPSO utilizes adaptive weights attained during training processes.

In [39], proposed a clustering algorithm considering the new characteristic, i.e., buffer size of the sensor node. Two clustering method is presented using two different swarm intelligence algorithm called Grey Wolf Optimizer (GWO) and Whale Optimization Algorithm (WOA). This clustering method is mainly focused on heterogeneous Wireless Sensor Network with considering the buffer overflow problem.

In [40], presented a power-efficient clustering-based routing named as ABC-SD. In this method, the artificial bee colony (ABC) meta-heuristic algorithm’s search features are used to create power-efficient clusters. Clustering is done based on sensor energy and neighborhood information sensors. The cluster head is chosen using a multi-objective fitness function. The entire clustering process is accomplished at the base station using a centralized algorithm. An optimum routing path is selected by cost-based function which deals energy and number of hops. This technique performance is measured in terms of packet delivery ratio, network coverage and lifetime.

Table 1 Related definitions

2.3 Fuzzy-Based Techniques

An extended version of LEACH is proposed in [41] which selects a single CH among the CHs as a super-cluster head to transfer the information to the mobile BS by using fuzzy logic. The input fuzzy descriptors are battery power, mobility of BS and centrality of clusters. The output fuzzy descriptor is the probability of each CH to act as a super-cluster head.

EAUCF [42] forms unequal clusters with the aim of enhancing the lifespan of WSNs. The radius of each cluster depends on its remaining energy as well as on its distance to the BS, and it is determined by the fuzzy-based distributed mechanism.

EEUC [43] is a competitive approach in which each cluster is assigned with an initial radius, and it selects the CHs of each unequal cluster by conducting a local competition. In this approach, nodes can probabilistically decide its participation in the local CH competition based on the time interval between two successive cluster formation processes.

A fuzzy-based clustering method [44] accompanies inputs like centrality, power degree and frequency for the CH election. The proximal distance from the center of the cluster is represented as centrality, and the closeness of nodes in the network is represented as frequency. This system estimates the Mamdani Fuzzy Inference System (M-FIS).

For the selection of CHs using fuzzy approach, a new algorithm called DUCF is used in [45]. For balancing the energy consumption among CHs, DUCF forms unequal clusters. The DUCF uses three parameters such as residual energy, node degree and distance to BS as input variables for CHs selection. The output of fuzzy parameters is the probability and size of the cluster. The cluster size of CHs is being depicted based on the farther and nearer distance from the base stations. It is indicated that the result of DUCF forms unequal balancing, which ensures load balancing among CHs.

The (MOFCA) Multi-Objective Fuzzy Clustering Algorithm [46] aimed to conquer the hotspot issues in WSN. It does not require centralized control of BS for electing the CH. Thus, it reduces the complexity of the sink node and increases its energy efficiency. Fuzzy-Logic-based Energy Optimized Routing (FLEOR) [47] algorithm selects the CH by utilizing the criteria such as the shortest path between nodes, the proximal range among the node and sink node, and the power density. The Fuzzy logic algorithm performs multi-hop broadcasting for electing the optimal CH. However, this algorithm does not perform well when the nodes are in a mobility state.

A non-centralized fuzzy-based clustering protocol is CHEF [48] which uses the network’s local information for electing the Local-CH. It fuses residual energy and proximity as input parameters for electing the CH. However, it acts similarly to LEACH. Similar to CHEF, FBUC [49] is also to a non-centralized fuzzy seeded clustering protocol, and it is an upgraded transcription of EAUCF technique. It employs probability evaluation for electing the Tentative-CHs (T-CHs) and fuzzy logic for the evaluation of competitive radius among T-CHs. The optimal CHs are chosen from T-CHs by estimating the enduring energy and the density of the T-CHs.

The Improved Fuzzy Unequal Clustering (IFUC) mechanism [50] utilizes the residual energy, proximal distance between BSs and the frequency of a node for estimating the feasibility of a node to evolve as a CH and for evaluating the radius of each cluster. Here, the data are broadcasted from CHs to BSs by employing ACO algorithm. The relay node is elected by examining the cost of communication, and the total energy spent. Though it enhances the lifetime of the network, it fails to analyze the hotspot issue.

Fuzzy and Ant Colony Optimization-Based Combined MAC, Routing and Unequal Clustering Cross-Layer Protocol for WSN (FAMACROW) is a hybrid and cross-level stratified technique which employs fuzzy and ACO mechanism [51]. It chooses the CHs by concerning the energy of residual nodes, the density of the nodes and the nature of the connection established. Here the relay node is selected with the aid of ACO, which examines the length of the queue, and it delivers likelihood.

Another hybrid method of PSO with Fuzzy is proposed in [52] to deal with the energy consumption limitation in sensor nodes. An improved FCM algorithm is used to create clusters, which includes energy as a parameter in the objective function. Another objective function is developed in PSO, for calculating the non-connected sensor nodes in each cluster. Additionally, PSO is used for selecting the optimal CHs.

3 Traditional Particle Swarm Optimization Algorithm

PSO demonstrates a computational approach to figure out the issues within complex nonlinear optimization tasks [54,55,56] which imitates and stimulates the behavior of bird flocks. It is an optimization mechanism which utilizes a sequence of recurrent statements. By optimizing the issues, it yields an enhanced version of resolution for any complex problem. PSO considers a bunch of particles as the significant component and these particles are abstracted as the population in the area of exploration range. In a given exploration range, each particle occupies a specific position and has the ability to move around which is termed as the velocity of the particle. The position and velocity of each particle support in deciding its exploration direction and distance. It also has its peculiar fitness function to amplify its characteristics. The symbols used in PSO and EELTM are illustrated in Table 1.

In PSO [57, 58], the updated velocity \((pv_{x+1})\) and position \((pp_{x+1})\) of individual particle is rejuvenated in each iterative statement by exploiting the particle’s current velocity \((pv_{x})\), current position \((pp_{x})\), local_best \((pLB_{x})\) and global_best \((pGB_{x})\). The next_velocity in addition to the next_location of each particle is predictable by the previously predicted velocity of each particle. In each iterative statement, the velocity of the particle will be modernized by the predicted higher value from the previous iterative statement. The initial maximum value obtained is referred to as the present fitness value, and it is represented as particle best (pB). In its recent repetitive statement, if any obtained value is higher than of its neighbors, then it is referred to as the particle local best (pLB). In the upcoming stages, if any obtained value is higher than that of all its previous values, then it is referred to as the particle global best (pGB). In our EELTM approach, the nodes in the network are depicted as particles. Figure 2 expresses the workflow diagram of the PSO algorithm.

By considering the procedure of PSO, our EELTM approach assumes that it contains n particles. The velocity and position of \((x+1)\)th particle in the search space are defined in Eqs. 1 and 2.

Fig. 2
figure 2

Workflow diagram of PSO algorithm

$$\begin{aligned} pv_{x+1}= & {} \tau pv_{x}+(\text {const}_{1}*rnd_{1})(pLB_{x}-pp_{x})\nonumber \\&+(\text {const}_{2}*rnd_{2})(pGB_{x}-pp_{x}) \end{aligned}$$
(1)
$$\begin{aligned} {pp}_{x+1}= & {} {pp}_{x\ }+\ {PV}_{x+1} \end{aligned}$$
(2)

4 Energy-Efficient Lifetime Maximization (EELTM) Approach

4.1 Overview

Our EELTM approach intends to maximize the lifespan of the sensor network through the formation of energy-balanced unequal clusters. EELTM performs in two stages, one is PSO-based optimum node selection phase, and another one is Fuzzy-Based Energy-Balanced Unequal Cluster Formation. In the optimum node selection phase, the BS manipulates the PSO to find which node is an optimum node to act as a CH. The PSO algorithm uses the density, the distance and the energy of an individual sensor node to evaluate the fitness value of each node. A node that possesses the highest fitness value is adopted as a CH. Further, a node which is in the region of any CH possesses next higher fitness value is selected as a CR. The optimal CH–CR selection algorithm selects the CHs and CRs. After a CH is selected, EELTM uses fuzzy rules to estimate the radius of each CH. The FIS exploits the density, the distance and the residual energy of sensor nodes as input variables and the CHR of each CH as the output variable. Figure 3 shows the difference between traditional and our proposed framework of unequal clustering in WSN.

Fig. 3
figure 3

Traditional framework versus proposed framework of energy-balanced unequal clustering in WSN

The BS directly involves the procedure of optimum node selection phase and in the cluster formation phase. This couple of actions is looped in every cluster formation stage which causes excessive energy consumption in sensor nodes for the transmission of control packets. For evading this issue, the EELTM approach forms new clusters only when the energy-threshold \((E_\mathrm{TH})\) is higher than the residual energy of existing CH. The value of \(E_\mathrm{TH}\) is the difference between the average energy \((E_\mathrm{AVG})\) and the standard deviation of remaining energy \((E_\mathrm{SD})\) of the entire alive nodes in the network (i.e., \(E_\mathrm{TH}= E_\mathrm{AVG}-E_\mathrm{SD})\). Thus, the EELTM approach minimizes the energy consumption, and thereby it maximizes the network lifetime.

4.2 PSO-Based Optimum Node Selection

Since the sensor nodes are randomly positioned in the specific sensing domain, the BS requires knowing their contexts. It transmits a request message \(info\_request\) to all the nodes. On receiving this request, each sensor node formulates a reply message \(info\_reply\) which encloses the information like position, distance to the BS and its residual energy. By using this information, the BS applies the PSO algorithm to find the fitness value of the node to determine the CHs. The following are the crucial factors that are used to estimate the fitness value of each node.

(1) Density

The density of the sensing region can be elucidated as the proportion of the quantity of awakened nodes available in the particular sensing range to the sum of the quantity of awakened nodes. Equation 3 represents the mathematical illustration of density.

$$\begin{aligned} \text {Density}, d = \frac{C_{n}}{T_{n}} \end{aligned}$$
(3)

(2) Distance

The distance can be elucidated as the product of particle’s density and the average distance, whereas the average distance is the ratio of average distance among individual sensor node in the cluster and the BS to the distance bounded by the particle and the BS. Equation 4 represents the mathematical illustration of distance.

$$\begin{aligned} \text {Distance}, D = d * \frac{\sum \frac{d_{i}}{C_{n}}}{d_{p}} \end{aligned}$$
(4)

(3) Energy

The energy (e) of each node can be derived by the dissimilarity among the energy expenditure of the CH and the ratio of average energy. Where average energy is the proportion of a particle’s energy to the mean energy of remaining nodes in the cluster. The energy utilization of the CH is elucidated as the product of distance and the sum of the amount of energy spent on broadcasting n bits (n). Equation 5 represents the mathematical illustration of energy.

$$\begin{aligned} \text {Energy}, e = \frac{E(p)}{\sum \frac{E(p_{i})}{C_{n}}} - (D*n) \end{aligned}$$
(5)

The fitness function (f) of the PSO algorithm is contrariwise proportionate to the density of each particle in the transmission range. Equation 6 represents the mathematical illustration of density.

$$\begin{aligned} \text {Fitness}, f \propto \frac{1}{d} \end{aligned}$$
(6)

We aim to maximize the fitness value, which is to choose an optimal node that possesses high energy, lower distance and less density. Weight Sum Approach (WSA) [59] is used for the development of fitness function with multiple objectives. WSA selects multiple weight values \(\alpha _{i}\) based on the priority of each objective and multiplies them with the corresponding objective. Following the same mechanism, we multiply the weight values \(\alpha _{1}, \alpha _{2},\) and \(\alpha _{3}\) with the objectives energy, distance and density. Considering these objectives, energy has the highest priority, and density has high priority than distance, and thus the weight values were \(\alpha _{1}>\alpha _{3}>\alpha _{2}\). Thus, a proposed fitness function is constructed by incorporating \(\alpha _{1}, \alpha _{2},\) and \(\alpha _{3}\), which is as follows,

$$\begin{aligned} f = (\alpha _{1} * e )+ (\alpha _{2} *D )+ \frac{\alpha _{3}}{d} \end{aligned}$$
(7)

where \(\alpha _{1}, \alpha _{2}\) and \(\alpha _{3}\) hold a non-negative value between 0 and 1, such that \(\alpha _{1}+\alpha _{2}+\alpha _{3} = 1\).

The above fitness value is estimated in an iterative way and by which it yields PLB and PGB. The iteration at which the particle global best is obtained will be involved in the selection of CH. After obtaining the fitness value of individual nodes, it is sorted in descending order. The sample of sorted fitness values of randomly selected nodes is illustrated in Table 2.

Table 2 Sorted fitness values of selected sensor nodes

The radius of the CH will be determined by utilizing the FIS. Thus, the EELTM approach forms energy-balanced unequal clustering in the network.

4.3 Fuzzy-Based Energy-Balanced Unequal Cluster Formation

The following are the significant phases which are entangled in the fuzzy logic system [60,61,62]:

  • Elucidation of linguistic input variables This stage is also known as the initialization phase. In this initialization phase, the universe of input variables is grouped into certain digits of fuzzy subcategories.

  • Fuzzification In fuzzification, each subcategory contains crisp and linguistic input variables is assigned with a linguistic tag, respectively. This phase is also known as configuring the subcategories of fuzzy.

  • Formulation of membership function It is a simplified form of the indicator function for the corresponding fuzzy subcategories which directly indicates the depth of truth.

  • Construction of expertise base It contains an expertise base, which holds a bunch of rules in the form of IF-THEN-ELSE structures

  • Evaluation of expertise rules Predefined fuzzy operations are utilized to evaluate the expertise rules. The predefined fuzzy operations were MAX and MIN which represents OR and AND, respectively. This is also known as designating the interconnection among fuzzy contribution and its yield.

  • De-Fuzzification it converts the obtained fuzzy output into a crisp value by incorporating the membership function.

figure a

Our EELTM approach incorporates FIS to discover the CH\(_\mathrm{R}\) of each CH in the network. Each CH has a unique CH\(_\mathrm{R}\) depending on the density, the distance to BS and its residual energy. As equally distributed CHs produce more balanced clusters over the network, we paid more distinctive attention for choosing a node as CH. To attain this, one CH should not be positioned within the radius of other CHs. So, a node possessing higher fitness value will be chosen as CHs, with a criterion that it is not positioned within another CH\(_\mathrm{R}\). Besides, if a node located within another CH\(_\mathrm{R}\) possesses the next higher fitness value when compared with the fitness value of its CH, then it is chosen as the CR. Therefore, in each CH\(_\mathrm{R}\), there will be a CH and a CR. The remaining nodes which are in the range of the CH\(_\mathrm{R}\) will be the members of that particular cluster. Thus, the redundancy of CHs is evaded, and no two CHs will be proximally closer to each other. By this, EELTM produces energy-balanced distributed clusters throughout the AOI. The process of CH and CR selection is scripted in Algorithm 1, and its execution procedure is illustrated in Fig. 4.

Generally, more energy will be dissipated for transmission than sensing. So, if the CH involves both in aggregation and transmission of data, its energy will be reduced in a faster manner which leads to the change of CH. To avoid this issue, the CH is responsible only for gathering the data from its cluster members, and the chosen CR transmits the gathered data to the BS. Thus, the CR reduces the overload of CH and the frequent changes of CHs.

Table 3 Fuzzy Expertise Rules for CH\(_\mathrm{R}\) Selection

The FIS takes the density of node (d), the distance bounded by the node and the BS (\(d_{p}\)) and residual energy of each sensor nodes (\(E({\text {SN}}_{i})\))) as inputs and yields CH\(_\mathrm{R}\) of each CH as output. Figure 4 shows the execution procedure of the optimal CH–CR selection algorithm.

Fig. 4
figure 4

Execution procedure of optimal CH–CR selection algorithm

To find the CH\(_\mathrm{R}\) of each CH, fuzzy expertise rules are applied to all CHs. Our EELTM approach uses 18 rules and is comprised in Table 3. These rules are assessed by M-FIS approach, and defuzzification is done by [63] Centroid of Area (COA) approach. The mathematical illustration of COA is displayed in Eq. 8.

$$\begin{aligned} \text {COA} = \frac{\int \Delta _{p}(x) \cdot x\text {d}x}{\int \Delta _{p}(x) \cdot \text {d}x} \end{aligned}$$
(8)
Fig. 5
figure 5

Membership function for density of node

There are three linguistic variables for the input d, and they are lower, average and higher. The overall range of d fluctuates between 0 and 1. Likewise, the linguistic variables also have their corresponding ranges. The linguistic variable lower fluctuates in the range between 0 and 0.5, i.e., \(\{ {\text {lower}} | 0 \le {\text {lower}} \le 0.5 \}\), average fluctuates in the range between 0 and 1, i.e., \( \{ {\text {average}} | 0 \le {\text {average}} \le 1 \}\), and higher fluctuates in the range between 0.5 and 1, i.e., \( \{ {\text {higher}} | 0.5 \le {\text {higher}} \le 1 \}\). The membership function of d is illustrated in Fig. 5.

The linguistic variables for the input \(d_{p}\) are nearby, moderate and faraway. The overall range of \(d_{p}\) fluctuates between 0 and 100. The linguistic variable nearby fluctuates in the range between 0 and 50, i.e., \(\{ {\text {nearby}} | 0 \le {\text {nearby}} \le 50 \}\), moderate fluctuates in the range between 0 and 100, i.e., \(\{ {\text {moderate}} | 0 \le {\text {moderate}} \le 100 \}\), and faraway fluctuates in the range between 50 and 100, i.e., \( \{ {\text {faraway}} | 50 \le {\text {faraway}} \le 100 \}\). The membership function of \(d_{p}\) is illustrated in Fig. 6.

Fig. 6
figure 6

Membership function for distance to the BS

The linguistic variables for the input \(E({\text {SN}}_{i})\) are deficient and tremendous. The overall range of \(E({\text {SN}}_{i})\) fluctuates between 0 and 1. The linguistic variable deficient fluctuates in the range between 0 and 0.6, i.e., \(\{ deficient | 0 \le deficient \le 0.6 \}\), tremendous fluctuates in the range between 0.4 and 1, i.e., \( \{ {\text {tremendous}} | 0.4 \le {\text {tremendous}} \le 1 \}\). The membership function of \(E({\text {SN}}_{i})\) is illustrated in Fig. 7.

Fig. 7
figure 7

Membership function for residual energy of node

Fig. 8
figure 8

Membership function for cluster radius (CH\(_\mathrm{R}\)) of node

The overall range of CH\(_\mathrm{R}\) is considered to be the average size of AOI, i.e., \(\{ {\text {CH}}_R | 0 \le {\text {CH}}_R \le 50 \}\). The output yields the member functions Tiny, Short, Average, Big and Massive. The member function tiny represents the smallest CH\(_\mathrm{R}\), and massive represents largest CH\(_\mathrm{R}\). The membership functions and its corresponding CH\(_\mathrm{R}\) are illustrated in Fig. 8.

5 Experimental Results

5.1 EELTM System Model

The proposed WSN model has some assumptions as given below

  • The sensor nodes are positioned randomly.

  • The nodes have similar characteristics and posses unique ID

  • The locality of BS is familiar to all the sensor nodes.

  • Receive signal intensity indicator is adapted to find the distance among nodes.

  • Each node has an equal amount of initial energy.

Our energy paradigm uses an abstract one-order radio paradigm. The radio spends \(E_\mathrm{elec} = 50\) nj/bit toward operating the transmitter or receiver integrated circuit and \(E_\mathrm{amp} = 100\) pj/bit/m\(^{2}\) is the energy dissipated in the transmit amplifier. Thus, the energy needed to broadcast a n bit data about a d distance is given in Eq. 9.

$$\begin{aligned} ET_{x}(n,d) = n\times E_\mathrm{elec} + n\times E_\mathrm{amp}\times d^{2} \end{aligned}$$
(9)

In the receiver, the energy required to accept n bit data is represented in Eq. 10.

$$\begin{aligned} ER_{x}(n) = n \times E_\mathrm{elec} \end{aligned}$$
(10)
Table 4 Parameters for simulation

5.2 Evaluation Parameters

Typically, the efficiency parameters like First Node Expires (FNE), Fifty Percent Expires (FPE) and Total Remaining Energy (TRE) are exploited to assess the proficiency of an algorithm and for evaluating the endurance of the WSN network [64,65,66]. The parameter FNE estimates the state at which the first node among all nodes expires. FPE determines the round at which fifty percent of the nodes die, and it is necessary for the prospect of coverage area in AOI. Among these parameters, the FNE is considered in the sparsely distributed network in which the expiration of a single node is excessively pivotal. For other divergences, FNE is not remarkably substantial as the sensor network can perform its prescribed task even though the first node is not alive. Therefore, to validate the EELTM approach and for estimating the endurance of the WSN, we exploit the parameters FNE, TRE and FPE.

The most popular simulation tool MATLAB(R2017a) [67] is used to run our proposed work. For the simulation, around 200 wireless sensor nodes are scattered randomly over the sensing zone (AOI) of dimension 200 m length and 200 m breadth. Through the first-order energy model, the energy consumed for communication is calculated in which the initial energy is 1 J. The parameters used for the computation are represented in Table 4.

Numerous simulation experimentation under several phases were done to assess our EELTM approach. In order to make our simulation closer with the real-world WSN, we incorporate two significant phases based on the position of the BS. In the first phase, the BS is positioned at the midpoint of the sensing region and in the next phase, the BS is positioned distant from the sensing region, i.e., the distance between the BS and sensing field is a little high. The simulation of each phase continues until all the node expires in the network and the acquired outcomes are exposed in this section.

5.3 Phase-1: The BS is Positioned at the Midpoint of the Sensing Region

The location of the BS is positioned in the midpoint of AOI for this phase. This circumstance is chosen for deriving the complete effects based on the position of the BS. Here, the measurement of TRE is done approximately in the 500th round. An illustration of phase-1 is represented in Fig. 9.

Fig. 9
figure 9

Representation of phase 1: the BS is positioned at the midpoint of the sensing region

Table 5 represents the simulation results of this phase. Based on the results, it is apparent that the outcome of the EELTM approach is higher than the remaining existing algorithms while considering all efficiency parameters. However, by considering the decreasing quantity of alive sensor nodes, it is apparent that all existing mechanisms excluding LEACH engage with approximately homogeneous executions. Here, the LEACH mechanism has deprived performance, as it only exploits the probabilistic method and it does not consider the parameter TRE while choosing final CHs.

Table 5 Result for phase-1 for FNE, FPE and TRE
Fig. 10
figure 10

Number of iterations versus % of alive nodes for phase-1

Fig. 11
figure 11

Number of iterations versus % of TRE for phase-1

Our main focus is the energy efficiency of the sensor node. That is defined by using TRE metric. In this phase, 500th round is considered as the measurement point. Performance of EAUCF is slightly closer to our proposed; however, it performs much better than LEACH and EEUC if we consider the TRE metric. FNE and FPE metric is used to measure the performance of load balancing in WSN. FNE is much better than other compared algorithms since network load is distributed across the network. Similarly, FPE is also better than LEACH, EEUC and EAUCF. Figure 10 illustrates the dissemination of alive nodes for the count of iterations of phase-1. Further, Fig. 11 interprets the sum of lessened residual energy for the number of iterations of phase-1.

From Fig. 10, it is recognizable that the LEACH algorithm performs poorly than all other algorithms. The EAUCF and the EEUC approach have more or less similar results, but in the end, EAUCF approach has more number of iterations than EEUC. Our proposed method performs well in the initial stage; however it is slightly closer at the end stage. Distributions of the total remaining energy with respect to the number of iterations are depicted in Fig. 11. By seeing at number of iteration, LEACH is lesser than all others and EAUCF is closer with EELTM in terms of the number of iterations. In this phase, when compared to the existing algorithms LEACH, EAUCF, and EEUC and by considering the FNE parameter, the performance of EELTM exceeds by 43%, 22%, and 29% respectively. Similarly, EELTM exceeds the above-mentioned existing algorithms by 8%, 9%, and 15% when considering the FPE parameter and it is very closer to EAUCF for the TRE parameter with 4% differences.

Fig. 12
figure 12

Representation of phase 2: the BS is positioned faraway from the sensing region

5.4 Phase-2: The BS is Positioned Distant from the Sensing Region

In this phase, the nodes are arbitrarily distributed, and the BS is positioned far away from the region of AOI. The fundamental concept behind choosing this phase is to find the outcome of the location of the BS. An illustration of this phase is represented in Fig. 12.

Table 6 Result for phase-2 for FNE, FPE and TRE
Fig. 13
figure 13

Number of iterations versus % of alive nodes for phase-2

Fig. 14
figure 14

Number of iterations versus % of TRE for phase-2

Table 6 represents the simulation results of this phase. From the results, it is apparent that the outcome of EELTM is higher than the remaining existing algorithms in consideration of all efficiency parameters. Here, the measurement of TRE is done approximately at 200th rounds. Further, by considering the FNE parameter, all the compared mechanisms have similar performances; however, when dealing with the FPE metric, EEUC achieves much better than LEACH and EAUCF. The performance of EELTM is higher than all the compared mechanisms in terms of FPE metric. Considering TRE metric, EAUCF and EEUC mechanisms have similar performance and better than LEACH. EELTM performs slightly higher than all the compared mechanisms when considering TRE metric.

The EAUCF mechanism performed 4% better than LEACH mechanism. EEUC performs 9% better than EAUCF and EELTM performs 30% better than other algorithms for FNE and 18% better than for FPE parameter. From Fig. 13, in the beginning, the mechanisms EEUC and EAUCF have similar performances, but when the FPE parameter is considered the performance of EEUC has been enhanced when compared to EAUCF. From Fig. 14, the EEUC, the EAUCF and the EELTM have similar performance and similar energy utilization. Though, after FPE is reached, the TRE of EAUCF, and EEUC algorithms lessen rapidly than EELTM until the last node dies. In this phase, when compared to the existing algorithms LEACH, EAUCF and EEUC, the performance of EELTM exceeds by 45%, 18%, and 23% respectively, when considering the FNE parameter.

6 Conclusion

In this paper, we proposed a novel EELTM approach to figure out the frequent CH change issue and to augment the lifetime of WSN. Our proposed EELTM approach utilizes an iterative computational technique called PSO for evaluating the fitness value of each node. Based on the obtained fitness values, the best CHs and CRs are selected through the optimal CH–CR selection algorithm. We also incorporate the FIS technique to determine the CH\(_\mathrm{R}\) of each cluster and to handle the uncertainties of data. Additionally, an \(E_\mathrm{TH}\) value is defined to avoid frequent changes in CHs. When compared with the existing techniques, the extensive experiments justify that our proposed EELTM approach performs well and it lessens the energy utilization of the network. Thus, the EELTM approach amplifies the lifetime of the network. In future, the FIS can be formulated with additional parameters like quality of the connection established and its other associated parameters.