1 Introduction

A sensor network is a group of sensor nodes which have communication and sensing capabilities. The sensors function together as a cooperative network for the purpose of monitoring the environment. Practically, sensor nodes are often formed in different modalities, such as radar, acoustic and thermal, based on specific sensing applications (Pandey and Nath 2015; Pandey et al. 1970). Common features for these sensors include low-power, memory-constrained and communications (Prasad and Nath 2018; Chakraborty 2015). The development of WSNs was driven by the battlefield applications such as area monitoring and military reconnaissance. WSNs appears to be developed into a powerful tool to observe and understand the regional phenomena. The sensors in a typical WSN share local observations via wireless links, and cooperatively pass the data to a main site to analyze and understand the state of the environment. The sensing systems are often integrated with signal processing techniques, such as the environmental parameter estimation and target classification, to extract the high-level information for further applications. In particular, the estimation of environmental parameters offers us further insight into describing the environment, and the classification of moving targets is necessary for general battlefield monitoring. State-of-the-art WSN have been widely used in a variety of fields, e.g. battlefield surveillance, environmental monitoring, healthcare. The followings are the main characteristics of WSNs:

Low expenditure Numerous sensor nodes are distributed in the environment to set up the WSN. The cost of sensors has to be low to support such a large network.

Energy consumption The computation, communication and storage are the main sources of consuming the energy. Since in general there is not route to charge the sensors, we should take account of the energy consumption factors in the algorithms.

Computational load All the sensor nodes are constrained by their computational power and energy need to be considered.

Communication abilities The wireless communications in WSNs are usually limited by the short range and narrow bandwidth. Also, it is hard for the WSNs to work properly with in unattended areas. The reliability, security and resiliency need to be considered in design.

Security and privacy In a number of scenarios, the sensors are required to be able to prevent from unauthorized access and intentional attacks. Privacy policies also need to be considered.

Distributed sampling and processing WSNs often consist of thousands of deployed sensors and each of them is designed to observe, communicate and process information. Such a system can benefit from the distributed processing.

Dynamic topology Typical WSNs are not static. Sensors can be eliminated and added which result in the changes on the topology. Consider this context, the nodes should be equipped with the reconfiguration, self-adjustment capabilities.

Self-organization Especially in hostile environments, the sensors are required to organize themselves to set up the network. They should be able to cooperatively adjust themselves and work automatically.

Robustness Since the sensors should be able to work in tough environments, they need to be error tolerant. Ideal nodes should be equipped with the self-calibrate ability.

Tiny outlook Most sensor nodes are required to be small in the physical sizes. Also, the energy consumption and communication power will be limited due to the small sizes.

The foremost aim of all the approaches used in the area of WSN is to maximize the lifespan of the network. For improving the lifespan various approaches has been proposed (Priyadarshi and Bhardwaj 2017). Clustering in WSN is one of the efficient techniques used to enhance the network performance. In clustering the network division is performed into several assemblages known as clusters (Singh and Sharma 2015). For each cluster a CH is elected which does the task of collection of data and aggregation of data for the other member nodes of cluster. Figure 1 displays the process of clustering in WSN (Pradhan and Sharma 2016).

Fig. 1
figure 1

Process of WSN Clustering

The process of clustering is basically alienated into two steps. In the first stage the network is divided into various groups known as clusters, this phase is setup stage (Mazumdar and Om 2017; Xu et al. 2012). In this stage the CH is elected amongst the nodes in the system. After the selection of the CH the nodes handover their data to the CH for the further processing. This comes under the steady phase. After getting the information from several nodes of cluster CH performs the aggregation of data (Madheswaran and Shanmugasundaram 2013). After that the aggregated is handover to the BS. This process is continued by each cluster in various rounds (Priyadarshi et al. 2018). To avoid the collision of data among the several nodes the data is transmitted as per the TDMA (Time Division Multiple Access) techniques. This approach of TDMA is followed by every cluster for the collision free transmission. Figure 2 shows the stages of the clustering used in the network.

Fig. 2
figure 2

TDMA schedule for clustering operation

The CH helps in reducing the redundant data by performing the aggregation which results in the lesser transmission of packets which helps in minimizing the usage of energy in the network (Sun et al. 2008).

2 Related work

LEACH is a cluster-based protocol which presents a randomize method to select CH that does benefit of the node’s power levels. Authors in Ali et al. (2008) presented a new protocol termed ALEACH with a new CH selection technique. Regardless of the algorithm accomplishes sense of balance energy circulation between all sensor nodes (Priyadarshi et al. 2017). Main problem with this technique is not assuming the position factor of nodes those effects on selecting appropriate CH node.

In Junping et al. (2008) authors implemented an algorithm which was grounded on the arbitrary timer to create the cluster lacking the necessity of any kind of universal data. But main problem with this algorithm is huge energy consumption gap which occur between cluster head and their sensor node. Several scholars are presented the residual energy node issues and number of cluster heads.

In Mu and Tang (2010) authors suggested a new kind of protocol namely LEACH-B. First CH election is totally on the basis of existing LEACH protocol. But, during the succeeding selection they change total quantity of CHs which is totally based on remaining energy of node. Simulation result shows that network lifetime has been enhanced likened to existing LEACH protocol with stability of network energy ingestion.

Authors in Peng and Li (2010) diminished total energy consumption and extends network lifetime via proposing a new routing protocol called as VRLEACH. Though, this algorithm is influenced by residual energy but responsible for data collision in the network. As a result, we propose a unique method to improve energy usage and prolong network lifespan by supplementing energy balance in cluster amongst all the sensor nodes. The recommended methodology is totally on the basis of augmentation tactics. CH selection technique is revised to guarantee a steady generation of CH between all the sensor nodes in WSN.

In Hong et al. (2009) authors presented an assistant cluster head method. This algorithm can dynamically decide whether to create assistant cluster head and select suitable nodes in it based on the cluster head node’s geographical location, quantity of nodes within the cluster and remaining energy of the cluster members. This method prolongs the lifetime of WSN by reducing the usage of energy by nodes in the cluster. But, this proposed method needs difficult processes that cause additional delays. Authors in Jain et al. (2014) presented a scheme for reducing energy consumption by picking a node to turn out to be a CH on the basis of maximum residual energy as well as total neighbors which is close to the sink.

In Arumugam and Ponnuchamy (2015) authors implemented an energy efficient routing protocol which hinge on the optimum cluster head selection and actual collaborative data. This protocol extends the lifespan of network. But, it undergoes the delay triggered by complicated processes. It always picks the sensor node with highest enduring energy without considering any other parameter like sensor node location which might be positioned at very long distance from BS.

In Batra and Kant (2016) authors upgraded timing of first node and last node death compared to LEACH protocol by introducing LEACH–MAC algorithm. In Murali and Gupta (2016) authors projected a supportive communication process which indicates that aggregate energy spent by network is diminished when collaboration occur compared to when collaboration does not exist. But major disadvantage of this method is increase in traffic overhead at the start of every single round if total quantities of nodes in the cluster zones are comparatively high.

In Smaragdakis et al. (2004) the author proposed a heterogeneous clustering protocol namely SEP. In this technique the nodes are separated into two groupings normal and advance. The nodes which are advance are provided with extra energy. In Aderohunmu and Deng (2009), Islam et al. (2012) the enhanced version of the SEP was proposed called E-SEP. In this the level of heterogeneity is extended to three level.

In Qing et al. (2006) a heterogeneous routing protocol was proposed which uses the average and remaining energy of the nodes in probability fir the election of CH.

In Priyadarshi et al. (2018) author proposed a scheme which uses the two stages for the selection of CH. In first stage the CH selection is performed using the professed probability and in next stage time approximation endurance is employed in the technique.

3 Creation of clusters

The nodes in the WSN are deployed randomly in the region. The nodes select the cluster head among themselves which does the task of collection of data, aggregation of data and transferring the final information to the BS (Hong et al. 2009). Firstly, the process of CH election is performed by the nodes, after the selection of the CH the CH sends an advertisement message to every node in its range and nodes joins the cluster as per the strength of the signal. After the Cluster formation the member nodes transfer their data to the CH and CH after collection of information performs the data aggregation and then convey that data to the BS. Each node in the cluster can become CH based on some criteria. If node participating in the CH election procedure satisfies the election criteria then that nodes can act as the CH and can perform all the functionalities of the CH (Priyadarshi et al. 2019). The energy consumption of the CH is more than the other nodes within the cluster as the CH have to perform various kinds of activities. So, the role of CH must be rotated amongst all the modes to balance the energy usage in the system. The selection procedure of the CH within the system can help in maximizing the network’s performance as the CH is responsible for the various energy consuming tasks (Xu and Gao 2011). The nodes get the chance of acting as CH with the probability p. The nodes become CH in every 1/p round. Figure 3 shows the deployment of nodes in the 100 × 100 region. The nodes are placed randomly and after deployment the CH election policy is applied on the network.

Fig. 3
figure 3

Deployment of Nodes

Figure 4 demonstrates the formation of clusters and their CH in the network. The BS is positioned in the middle of the network region.

Fig. 4
figure 4

Cluster formation in proposed protocol

4 Energy model in WSN

The usage of energy in WSN decided the lifetime of the network. The usage of energy should be minimized in an efficient way to enhance the system’s performance (Hani and Ijjeh 2013). The energy model in WSN which is shown in Fig. 5 is divided into two stages one is for receiving purpose and another one is for sending purpose. The two sections of the energy model are separated by d distance.

Fig. 5
figure 5

WSNs Model of energy

The receive and transmission of the energy is represented by the formulas given as in Eqs. (1) and (2).

$$E_{\text{trans}} \left( {k,d} \right) = \left\{ {\begin{array}{*{20}c} {kE_{\text{elec}} + k\varepsilon_{\text{efs}} d^{2} , d < d_{o} } \\ {kE_{\text{elec}} + k\varepsilon_{\text{amp}} d^{4} , d \ge d_{o} } \\ \end{array} } \right.$$
(1)
$$E_{\text{receive}} \left( k \right) = kE_{\text{elec}}$$
(2)

where,

  • d denotes the separation amongst transmitter and receiver, k symbolizes the total data bits

  • \(\varepsilon_{\text{amp}}\) and \(\varepsilon_{\text{efs}}\) symbolizes the amplification coefficient

  • \(E_{\text{trans}}\) and \(E_{\text{receive}}\) is the energy spend in transmission and receiving of data

  • \(E_{\text{elec}}\) symbolizes the energy requisite for guiding a data bit.

5 Proposed scheme

The lifetime of the network is dependent on the usage of energy in the system. The clustering process is employed in the WSN to minimalize the energy usage and to enhance the system performance. The network in case of WSN can be taken into two categories namely homogeneous and heterogeneous categories. The approach used in this paper considers the heterogeneous variety of the network. In this variety the nodes in the network have the different level of energy as per their type. In this paper the nodes are categorized as normal and advance.

The proposed scheme always aims to consume the system’s energy in a well-organized way to enhance the lifespan of the system so that network can work without any lifespan issues for a long time. The selection process of CH in the network can affect the network’s life span to a great extent. Various schemes have been proposed earlier for the CH selection. The CH selection procedure used in the proposed scheme takes the benefit of the node’s energy in a proficient way to enhance the working of the network. The procedure of CH election begins with the generation of random number which lies amongst zero and one. Every node that wants to become CH generate that number, then that random value is matched with the threshold function. If the node generated random value is lesser than threshold, the node can act as CH for that round. If not, the same process is repeated by the next node to become CH. The threshold function used for the CH selection is symbolized as in Eq. (3).

$${\rm T}(n)=\left\{\begin{array}{ll} {\frac{{P_{{{\text{optimal}}}} }}{{1 - P_{{{\text{optimal}}}} \left[ {\left( {r\, {\text{mod }}\frac{1}{{P_{{{\text{optimal}}}} }}} \right)} \right]}},} & {{\text{if}}\, n \in G} \\ {0,} & {{\text{otherwise}}}\end{array}\right.$$
(3)

where

  • G symbolizes the nodes which are not selected as CH

  • P symbolizes the CH picking probability

  • r symbolizes the present round.

We are assuming that the normal nodes initial energy is denoted as \(E_{\text{normal}}\) and the advance nodes energy is represented as \(E_{\text{advance}}\).which are given in Eqs. (4) and (5).

$${\text{Normal nodes energy}}\,E_{\text{normal}} = E_{o}$$
(4)
$${\text{Advance nodes energy}}\,E_{\text{advance}} = E_{o} (1 + a)$$
(5)

where, a is the extra energy provided to advance nodes for enhancing the lifespan of system and \(E_{o}\) denotes the preliminary energy of nodes.

With the introduction of the advance nodes the over-all energy of the system also gets improved which help in maximizing the lifespan of the network. The proposed scheme provides a CH selection policy which utilizes the system’s energy in a proficient way to select the CH uniformly amongst the nodes by considering their levels of energies to improve the performance of the network. The proposed technique modifies the threshold function by making it dependent on the energies of the nodes to make the systematic use of energy in the system to reduce the consumption of energy and to make system work for extended epoch of time. The aggregate energy of the network is given as in Eq. (6).

$$n \cdot E{\text{o}}\left( {1 - w} \right) + n \cdot w \cdot E{\text{o}}\left( {1 + a} \right) = n \cdot E{\text{o}}(1 + w \cdot a)$$
(6)

w is the number of nodes which are advance and a is their extra energy factor. So, the aggregate system energy is enlarged by a factor \((1 + w \cdot a)\). The energy level of the advance nodes is always greater than the normal nodes which is specified in Eq. (7).

$$E_{\text{advance}} > E_{\text{normal}}$$
(7)

with the change in the energies of the nodes the CH election probability also gets changed for the nodes which are normal and advance which are given in Eqs. (8) and (9).

$$P_{\text{normal}} = \frac{{P_{\text{optimal}} }}{(1 + a \times w)}$$
(8)
$$P_{\text{advance}} = \frac{{P_{\text{optimal}} }}{(1 + a \times w)} \times (1 + a)$$
(9)

For the selection of the CH the node generated random value is compared with the threshold. The random value generated by the nodes is symbolized as \({\text{rand}}\left( n \right)\) specified in Eq. (10).

$${\text{rand}}\left( n \right) \le T(n)$$
(10)

The proposed technique modifies this procedure by making it dependent on the energy of the nodes. By using the energy pf, the nodes during the CH election process the CH selection become fair and uniform based on the energies of the nodes.The modified threshold function is represented as in Eq. (11)

$$T(n) = T\left( n \right)*\left( {1 - E_{\text{remaining}} } \right)^{ - 1} *\frac{{E_{\text{Total}} }}{{E_{\text{remianing}} }}$$
(11)

\(E_{\text{Total}}\) represents the total energy of the network which is assigned in the beginning and \(E_{\text{remianing}}\) represents the node’s residual energy level during that round.

So, the new threshold function for the normal node is given as in Eq. (12)

$${\text{T}}\left( {\text{normal}} \right) = \left\{ {\begin{array}{*{20}c} {\frac{{P_{\text{optimal}} }}{{1 - P_{\text{optimal}} \left[ {\left( {r\,{\text{mod }}\frac{1}{{P_{\text{optimal}} }}} \right)} \right]}}*\left( {1 - E_{\text{remaining}} } \right)^{ - 1} *\frac{{E_{\text{Total}} }}{{E_{\text{remianing}} }}, {\text{if}}\, n \in G} \\ {0, {\text{otherwise}}} \\ \end{array} } \right.$$
(12)

The aggregate number of normal nodes in the network are n × (1 − w) and G’ symbolizes the non-CH normal nodes.

The new threshold function for the advance nodes is given as in Eq. (13)

$${\text{T}}\left( {\text{advnace}} \right) = \left\{ {\begin{array}{*{20}c} {\frac{{P_{\text{optimal}} }}{{1 - P_{\text{optimal}} \left[ {\left( {r\,{\text{mod }}\frac{1}{{P_{\text{optimal}} }}} \right)} \right]}}*\left( {1 - E_{\text{remaining}} } \right)^{ - 1} *\frac{{E_{\text{Total}} }}{{E_{\text{remianing}} }}, {\text{if}}\,\,n \in G} \\ {0, {\text{otherwise}}} \\ \end{array} } \right.$$
(13)

The aggregate number of advance nodes in the network are n × w and G’ symbolizes the non-CH advance nodes.

For the nodes to become CH they have to satisfy the criteria of the threshold function. If they satisfy the node threshold criteria then the node can act as CH for that round otherwise the next node gets the chance of becoming CH.

6 Simulation and results

For measuring the performance of the proposed technique, the comparison is performed with various existing protocols grounded on several factors such as throughput, network lifetime and usage of energy in the system. The simulation of the proposed technique is done using MATLAB simulators and various parameters and factors are taken into consideration while performing the simulation to enhance the network performance.

  1. 1.

    Parameters of performance

  2. (a)

    Network Lifetime

It is the time during which the network can perform its activities or continue its workings or the time till the nodes in the network are alive. The approaches uesd in the WSN always aims to enhance the lifetime of the network.

  1. (b)

    Throughput

It is represented as the aggregate amount of packet transfer to the BS. In general, it the handing of data in a particular time period.

  1. (c)

    Consumption of Energy

It representa the total energy spent by the network during the varous activities. The main focus of the proposed technique is to minimize the usage of the energy and ultilize it in a efficinet way.

Table 1 shows the parameters used while performing the simulation of the proposed technique.

Table 1 Simulation parameters
  1. 2.

    Case 1: w = 0.2, a = 1

In this case we are taking the value of w = 0.2 which illustrates that the 20% of total nodes within the system are advance and they have extra power levels. The value of a is taken as a = 2 which illustrates the extra power factor of advance nodes. The performance of the proposed EDCF is measured using the several performance parameters for calculating its effectiveness.

Figure 6 is a representation of the life span of the network. It is showing the graph between the nodes which are alive along with the round number. From the graph we can easily depict that the life span of the system is enhanced by using the proposed scheme as compared to the prevailing approaches such as DEEC, SEP and LEACH. The proposed technique has enhanced the lifespan of the system by almost double than the previous approaches. So, we can say that the proposed method is a good agreement as a clustering protocol for electing CH.

Fig. 6
figure 6

Network lifespan

Figure 7 is representing the system’s throughput. The graph is showing the packets transferred to BS along with the rounds. The throughput in case of proposed protocol is higher than the existing approaches.

Fig. 7
figure 7

Network’s throughput

Figure 8 is representing the dead nodes in the network. The graph is drawn among the nodes which are dead along with the rounds. The first node dead in case of proposed protocols is at around 2770 rounds and in case of DEEC at 1350 rounds, SEP at 1245 rounds, in LEACH at 1156 rounds. Figure clearly illustrates that the system performance is proposed scheme is much better than the existing approaches and proposed methodology is better than previous approaches for CH selection.

Fig. 8
figure 8

Dead nodes

Figure 9 is a representation of the CH count within the network during the process of clustering. The graph is expressing the plot among the CH count along with the rounds. The CH count in proposed technique is more uniform as compared to the other previous approaches.

Fig. 9
figure 9

CH Count in network

  1. 3.

    Case 2: w = 0.1, a = 2

In this case, w is taken as 0.1 which illustrates that the count of advance nodes is 10% of the entire nodes. The extra power factor a is taken as a = 1 which means double energy than normal nodes. The comparison of proposed technique is again performed with prevailing protocol to measure the efficacy of the proposed protocol.

Figure 10 is the representation of the nodes which are alive along with the rounds in the network. The lifespan of the system has been enhanced in this case also by the proposed protocol. The proposed technique has shown the performance increase in terms of lifespan as contrasted to the previous approaches such as DEEC, LEACH and SEP.

Fig. 10
figure 10

Network lifespan

Figure 11 is representing the system’s throughput in case of a = 2. The graph shows the increase in the packets transfer in proposed technique than the existing approaches.

Fig. 11
figure 11

Network lifespan

Figure 12 is the representation of the dead nodes in the network. The first node dead in case of proposed protocol is around 2655 rounds which is far better than the previous approaches. The proposed protocol has proved its effectiveness in this case also as contrasted to the existing techniques.

Fig. 12
figure 12

Dead nodes

Figure 13 is showing the count of CH along with the rounds. The CH count in proposed protocol is much higher than the previous approaches which illustrates that the CH selection is more uniform in case of proposed approach.

Fig. 13
figure 13

Count of CH

7 Conclusion

In this paper an energy dependent approach for CH selection is proposed. The proposed EDCF protocol has enhanced the life span of the system in terms of several factors of performance such as throughput, energy ingestion and lifespan if system. The proposed EDCF approach is compared with the several existing techniques such as DEEC, LEACH and SEP to calculate its efficacy. The proposed EDCF technique has utilized the node’s energy in proficient way to select the CH and to maximize the lifespan of the system. The proposed technique can be further enhanced by considering the various other factors of performance and by comparing it with other previous approaches.