Keywords

1 Introduction

A Wireless Sensor Network (WSN) is an emerging distributed network which consists of a set of sensor nodes and one or more Sink nodes [1, 2]. In WSNs, sensor nodes are generally small size and low-cost device, due to this reason, they have limited energy resource. Generally, sensor nodes are operated using 2 AA batteries. This networks have become an emerging technology that play a very important role in realizing smart environment such as Smart Cities, Smart Grid, Smart Home, online monitoring and tracking system [2, 3]. Since sensor nodes are provided with limited energy and replacement of battery is almost impossible. Due to which energy conservation of sensor node is an important research issue that needs research effort for better solution in order to enhance the network lifetime.

For saving of the energy resource of the sensor node and enhancing the network lifetime, various methods are proposed; clustering is one of the well considered scheme which is employed in WSN for saving the energy of the network. In clustering process, nodes are organized into various groups known as clusters. Each cluster is provided with a Cluster Head (CH) whose main work is to receive the sensed data from its cluster members (CMs), aggregate it and then transport the aggregated data to the Sink node [3]. Sink is connected to internet for public notifications of the sensed data. In each cluster, CH removes redundant data by doing data aggregation. Thus, proper selection of CH and its spatial distribution are very important issues in the energy balanced clustering process.

In recent years, various metaheuristic optimization algorithm based clustering protocols are proposed for WSNs. However, these existing clustering protocols are suffering from unbalanced energy consumption problem. In this problem, cluster heads (CHs) are not uniformly distributed and overloaded CHs die out faster than under load CHs. In addition, spatial distribution of CHs is not uniform. This is due to fact that average distance between CH and Sink is used in the fitness function which causes selection of all CHs near to the Sink. In order to solve this problem, we have proposed an energy balanced clustering protocol using particle swarm optimization called EBC-PSO. The main aim of EBC-PSO is to select a set of CHs that distributed uniformly over sensing area such that load on each CH is balanced. Fitness function used in PSO for the selection of CHs considers is a multi objective function which includes three parameters such as intra-cluster distance, residual energy and average cluster size. Performance evaluation of the EBC-PSO is compared with three well known clustering protocols such as LEACH [3], PSO-ECHS [8], and E-OEERP [9] in terms of total energy consumption by varying number of nodes, CHs, and number of rounds.

Content of this paper is arranged as follows: a brief review of the related clustering schemes is summarized in Sect. 2. An overview of the PSO concept is described in Sect. 2. In Sect. 4, system model and terminologies are discussed. Section 5 describes proposed energy balanced clustering protocol. In Sect. 6, simulation and result analysis of the proposed protocol and its comparison with the existing protocols are given. In last, we conclude the paper in Sect. 7.

2 Related Work

In this section, we have presented a brief outline of the existing clustering protocols proposed for WSNs. Generally, existing clustering protocols are categorized into two groups: heuristic based clustering and nature inspired based clustering [8, 9].

Several heuristic protocols have been developed for increasing lifetime of sensor network. Among these LEACH [3] is one of the most famous clustering protocols. LEACH selects CH based on some probability. Due to this, role of CH is transferred to other node after every round. The main limitation of LEACH is that low energy sensor node can be selected as CH. This causes CHs to die quickly. To improve the performance of LEACH number of protocol have been developed among these PEGASIS [4] and HEED [5] are popular. PEGASIS uses greedy approach to arrange sensor nodes into an ordered list such that each node can communicate with its adjacent nodes in the list. In HEED [5], residual energy of node is the main constrained used in the selection of CH. This protocol mainly highlighting on the energy efficient CH selection and reduction of the communication overhead. This causes to maximize the network lifetime. Many variants of LEACH have been also proposed to increase network life time. TL-LEACH [6] organizes CH into two level- hierarchy, top level CH are called primary CH and second level CH are called secondary CH. Secondary CH instead of sending data to BS they forward data to primary

Different clustering algorithms were proposed based on nature inspired approaches. In LEACH-C (Centralized LEACH) [7] firstly sink node computes average node energy for each round and nodes having energy higher than average node energy is selected for becoming CHs. Cluster formation is done using simulated annealing. It performs better than LEACH as it selects CH based on energy, thus increases network lifetime. This protocol does not consider balancing size of cluster which leads to unbalance energy consumption problem. Latiff et al. [1] have discussed a clustering scheme, PSO-C. PSO-C derives a fitness function which contains two elements such as residual energy, CH-CMs distance. It does not consider cluster size which is important factor for reduction of energy consumption. In [8], a PSO based cluster head selection method, called PSO-ECHS, is proposed. The main limitation of PSO-ECHS is that it does not distribute CHs uniformly, thus unbalanced energy consumption was observed during its evaluation. Parvin et al. [9] have discussed a PSO based protocol for Clustered WSN, called E-OEERP. In E-OEERP, PSO based scheme was used for selection of CHs and focus on the problem of left out nodes during clustering process. This scheme is also suffered from unbalanced energy consumption problem.

3 Overview of Particle Swarm Optimization

Particle swarm optimization (PSO) is population based optimization technique which is inspired by social behavior of flock of birds [10]. In PSO, population or swarm both is synonym and representing the set of potential solutions. A particle in the population/swarm stands for a solution position in the solution search space. In PSO, a particle can move in the search space to discover a new position with the best solution value. Initially, each particle is provided with position and velocity in the search space. Fitness function is designed based on the requirements of the problem. The main process of the PSO is to search the new position of the particle that gives best result of fitness function. In each iteration, a particle calculates its personal best and also global best. Each particle tries to reach global best solution by updating position and velocity by the use of personal best and global best. Following steps are used in the particle swarm optimization process.

  • Initialize population with random position and initial velocity in problem space.

  • Calculate fitness value of each particle.

  • Compare current fitness value with particle’s Pbest. If current fitness value is better than Pbest than update particle position to current value location position and Pbest with current fitness value.

  • If current fitness value is better than Gbest than replace the value of Gbest with current fitness value and location.

  • Velocity and position of particle is changed by Eqs. (1) and (2).

    $$ \begin{aligned} V_{id} \left( t \right) & = w \times V_{id} \left( {t - 1} \right) + C_{1} \times N_{1} \times \left( {X_{{Pbest_{id} }} - X_{id} } \right) + C_{2} \times N_{2} \\ & \quad \times \left( {X_{{Gbest_{id} }} - X_{id} } \right) \\ \end{aligned} $$
    (1)
    $$ X_{id} \left( t \right) = X_{id} \left( {t - 1} \right) + V_{id} \left( t \right) $$
    (2)

    where w is known as inertia weight and its value is between 0 and 1. C 1 and C 2 are acceleration coefficient its value is between 0 and 2. N 1 and N 2 value range from 0 and 1. The value of Pbest and Gbest are updated by using Eqs. 3. and 4 as follows:

    $$ Pbest_{i} = \left\{ {\begin{array}{*{20}l} {P_{i} ,} \hfill & {if\left( {{\text{Fitness}}\left( {{\text{P}}_{\text{i}} } \right) < Fitness\left( {{\text{Pbest}}_{\text{i}} } \right)} \right)} \hfill \\ {Pbest_{i} ,} \hfill & {otherwise} \hfill \\ \end{array} } \right. $$
    (3)
    $$ Gbest_{i} = \left\{ {\begin{array}{*{20}l} {P_{i} ,} \hfill & {if\left( {{\text{Fitness}}\left( {{\text{P}}_{\text{i}} } \right) < Fitness\left( {{\text{Gbest}}_{\text{i}} } \right)} \right)} \hfill \\ {Gbest_{i} ,} \hfill & {otherwise} \hfill \\ \end{array} } \right. $$
    (4)

Particle P i has initial position and velocity as X i,d , V i,d . Particle changes its position based on its memory. Position and velocity keeps on changing with every iteration until global position X i,d (S) is reached.

4 System Model

This research work considers a WSN system model where sensor nodes are deployed uniformly random in a square sensing area. We assume that there are N sensor nodes, one sink node and k cluster heads in the network. It is also assumed that all nodes are static stationary and their location coordinates are known. In the clustering process, a sensor node can joins to only one cluster. A sensor node can perform as cluster head (CH) or as a normal sensor node. In each round of data collection at the sink, CM of each cluster sends its sensed data to its CH. CH aggregates the received sensor data and forwards the aggregated data to the Sink using multi-hop routing from CH to the Sink. In this work, we have used an energy consumption model as proposed in [3].

5 Energy Balanced Clustering Algorithm

This section discusses an Energy-Balanced Clustering algorithm using Particle Swarm Optimization (EBC-PSO). First, we describe the derivation of a novel multi-objective fitness function which is used for the evaluation of the particle. Next, working of the EBC-PSO protocol is discussed.

5.1 Derivation of Fitness Function

In the proposed EBC-PSO protocol, we have used a novel multi-objective fitness function which contains mainly three components such as average intra-cluster distance, residual energy and average cluster size. The main goal of this multi objective fitness function is to optimize the combined effect of its components. Formulation of the fitness function is represented by Eq. 5.

$$ fitness = a_{1} *x_{1} + a_{2} *x_{2} + a_{3} *x_{3} $$
(5)

Where x 1, x 2 and x 3 represents average intra-cluster distance, residual energy and average cluster size respectively. a 1, a 2 and a 3 are constant and its value is between 0 and 1. Descriptions of the parameters of the fitness function are described as follows:

  1. (a)

    Average intra-cluster distance: This is defined as the ratio of sum of distance of the entire sensor node that is in the transmission range of particular sensor node to the total node present in its transmission range. Our main aim is to minimize intra cluster distance by selecting CH which is closer to all sensor nodes.

    $$ x_{1} = \frac{{\mathop \sum \nolimits_{i = 1}^{m} dis\left( {CM_{i} ,CH} \right) }}{m} $$
    (6)

    Where m is number of node that is in communication range of particular particle (i.e. CH). dis(CM i , CH) is distance between cluster member CM i and CH (i.e. particle).

  2. (b)

    Residual Energy: This is defined as the ratio of residual energy of CH to the total energy of cluster member. This function helps to select node as CH which has more energy than other sensor nodes.

    $$ x_{2} = \frac{{E_{residual} }}{{E_{total} }} $$
    (7)

    Where E residual is the residual energy of CH. E total is the total energy of node that are in communication range of CH.

  3. (c)

    Average cluster size: It is ratio of number of cluster member present in particular cluster to the total number of nodes. This function help to minimize number of un-clustered nodes and it also help to check the load balancing problem.

    $$ x_{3} = \frac{{C_{n} }}{N} $$
    (8)

    Where C n is number of sensor nodes in a particular cluster. N is total number of nodes.

5.2 Energy-Balanced Cluster Formation Using PSO

The proposed energy balanced clustering scheme, EBC-PSO, is based on PSO metaheuristic optimization algorithm. In EBC-PSO, we assume that all nodes send their location coordinate and value of residual energy to the sink during network setup phase. After getting the energy and location information, Sink node applied proposed PSO based clustering algorithm for the selection of the optimal CHs. Following steps are follows for the implementation of the proposed clustering protocol (EBC-PSO).

  • Step 1. Initialization of parameters: In this step, initialize the value of different parameters used during PSO process such as size of particles, initial position of particles, initial value of inertia weight and initialization of some constant parameters.

  • Step 2. Evaluation of fitness value: Calculate fitness of each sensor nodes based on the Eq. 5. Sort the sensor nodes according to their fitness value and select m sensor nodes as CH candidates.

  • Step 3. Selection of Pbest and Gbest: Fitness value of these m CH candidates is their local best. It is called Pbaset.

  • Step 4. Selection of Gbest: Find out a particle (i.e. CH candidates) with maximum fitness value among the selected m CH candidates. This fitness value becomes global best (Gbest) for all particles.

  • Step 5. Updation of Velocity and Position of Particles: In this step, velocity and position of each CH is evaluated by using the Eqs. 1 and 2.

  • Step 6. Evaluation of fitness value for new position particles: In this step, fitness of new position particle is evaluated by using the Eq. 5.

  • Step 7. Selection of Pbest and Gbest: Using Eqs. 3 and 4 decides the value of Pbest and Gbest.

  • Step 8. Repeat: Go to the step 5 until the Maximum iteration criterion reached

After selection of optimal position CHs, process of cluster formation starts. In the cluster formation process, each non-cluster nodes joins the closest CH with the higher node energy. Table 1 shows a sample of the fitness value. In this example node 25 has highest fitness value so it is selected as CH. all the node that are in the communication range of node 25 joins cluster. Similarly next CH is node 89 which is selected as CH and nodes that are in communication ranges join it. Suppose next CH 76 is cluster member of previous CH 89 than node 76 does not become cluster head. In this way cluster is formed. If any CH dies then next node having fitness value higher next to CH is made CH. This help to increase network life time (Table 2).

Table 1. Sample fitness value
Table 2. Parameter list

6 Simulation Results and Discussion

This section present the simulation results of the proposed EBC-PSO protocol and performs comparative analysis with LEACH [3], PSO-ECHS [8], and E-OEERP [9] with respect to total energy consumption within the network. All simulations are performed using MATLAB R2014.

Figure 1 shows the performance of the EBC-PSO with LEACH [2], PSO-ECHS [8], and E-OEERP [9] with respect to consumption of node energy and by varying the number of rounds of data gathering from the deployed WSN. It is observed form the Fig. 1 that rate of energy consumption for the EBC-PSO is slower than other three. This is due to fact that EBC-PSO selects optimal position CHs that are uniformly distributed over sensing area and provide balanced energy consumption from the non-CH and CH nodes in the network.

Fig. 1.
figure 1

Energy vs. number of rounds

Figure 2 shows the performance analysis of the EBC-PSO with the existing protocols with respect to energy consumption by varying the number of nodes from 100 to 300. This experiment evaluates the scalability of the proposed protocol. It is observed from the Fig. 2 that total energy consumption for the EBC-PSO is significantly lower than PSO-ECHS. This is due to fact that ECB-PSO uses a novel fitness function for selecting the CH which causes uniform and balanced energy consumption for all CH as well as cluster members.

Fig. 2.
figure 2

Energy vs. number of nodes

Figure 3 demonstrates the performance comparison of the EBC-PSO with LEACH [2], PSO-ECHS [8], and E-OEERP [9] with respect to total energy consumption by varying the number of CHs. In this experiment, 100 nodes are deployed and number of CHs is varied from 5 to 25. This experiment observed the effect of varying the % of CHs in the performance of EBC-PSO. It can be viewed from the Fig. 3 that EBC-PSO outperforms the existing protocols and its rate of energy consumption is much lower than the other clustering protocols.

Fig. 3.
figure 3

Energy vs. number of CHs

Figure 4 demonstrates the performance comparison of the EBC-PSO with LEACH [2], PSO-ECHS [8], and E-OEERP [9] with respect to total energy consumption by changing the location of the sink node. In this experiment, 100 nodes are deployed over a 200 × 200 sensing area. Location of the Sink is varied such as (100, 100), (150, 50) and (200, 200). It can be viewed from the Fig. 4 that total energy consumption is lower when location of the sink is at the center of the sensing area. This is due to fact that distance between CHs and the sink is almost equal in this network scenario. However, total energy consumption for the network scenario where sink node at the corner of the network, is greater that the first network scenario.

Fig. 4.
figure 4

Energy vs. various sink position

7 Conclusion

In this paper, energy balanced clustering using PSO (EBC-PSO) has been presented which consider the un-balanced energy consumption problem in WSNs. A novel multi-objective function is devised as a fitness function for selecting and distributing the CHs uniformly so that communication load for then are balanced. The performance comparisons of EBC-PSO with the three well known clustering protocols are described. EBC-PSO outperforms than LEACH [3], PSO-ECHS [8], and E-OEERP [9] in terms of total energy consumption. In future, proposed approach can be extended for mobile wireless sensor network and can be studied the effects of mobility over the performance of the clustering process.