1 Introduction

Wireless Sensor Networks (WSNs) have been broadly considered as a one of the most significant advancements for the twenty - first century [18, 20]. Empowered by recent advances in wireless communication technologies, tiny, cheap, and smart sensors conveyed in a physical area and networked through remote connections and the Internet give uncommon chances to an assortment of regular citizen and military applications, for instance, battle field surveillance, environmental monitoring, and industry process control [11, 14]. Recognized from conventional wireless communication networks, for instance, cell frameworks and mobile ad hoc networks(MANET), WSNs have one of a kind qualities, for instance, denser level of node arrangement, higher unreliability of sensor nodes, and serious energy calculation, and storage requirements [4, 17], which present numerous new challenges in the improvement and use of WSNs. In the previous decade, WSNs have gotten huge consideration from both academia and industry everywhere throughout the world. A lot of research activities have been completed to investigate and solve different design and application issues, and huge advances have been made in the development and deployment of WSNs. It is imagined that in the future WSNs will be broadly utilized in different regular citizen and military fields, and upset the manner in which we live, work, and interact with the physical world [6].

A WSN commonly comprises of a substantial number of low - cost, low - control, and multifunctional sensor nodes that are conveyed in a region of interest. These sensor nodes are little in size, but are equipped with sensors, radio transceivers, and embedded microprocessors, and thusly have sensing capacity, yet additionally data processing and communicating abilities. They communicate over a short distance through a remote medium and work together to achieve a typical task, for instance, industrial process control, battlefield surveillance, and environment monitoring. Remote sensors have huge points of interest over regular wired sensors [2, 22, 23]. They cannot just lessen the cost and delay in organization, yet in addition be connected to any environment, particularly those in which traditional wired sensor systems are difficult to be deployed, for instance, battle-fields, inhospitable terrains,, outer space, or deep oceans. WSNs were initially inspired by military applications, which range from large - scale acoustic surveillance systems for ocean surveillance to small networks of unattended ground sensors for ground target detection [5, 24]. Be that as it may, the accessibility of low - cost sensors and wireless communication has guaranteed the improvement of a wide range of applications in both regular citizen and military fields.

One of the essential techniques for delaying the system lifetime in WSNs is clustering. It includes gathering of sensor nodes into groups and choosing cluster heads (CHs) for every one of the groups [1, 9]. Wireless sensor networks partitions group each having a facilitator (cluster head) in charge of gathering the data from the nodes and sending it to the sink (base station) [8]. Sensors are frequently sent thickly to fulfill the scope prerequisite, which empowers certain nodes to enter the rest mode in this manner permitting critical energy conservations. The cluster heads are chosen haphazardly or in view of at least one criterion.

1.1 Problem definition and contribution

Cluster head selection used to increase the lifetime of the network. The perfect cluster head is the one which has the maximum residual energy, the greatest number of neighbor nodes and the minimum distance from the base station. Be that as it may, the chosen cluster head may drain its energy after a number of transmissions. To overcome this issue, we present the Energy efficient Gravitational search algorithm (GSA) and Fuzzy based clustering with Hop count based routing for WSN. The contribution of this work is described as follows.

  • Cluster formation and cluster head selection are done using the Gravitational search algorithm (GSA).

  • Based on the fuzzy inference system, Supercluster head (SCH) is selected among the CHs in the network.

  • After the cluster formation, the efficient route is established depending on the hop count of the sensor nodes.

  • In the network simulator NS2, the presented approach of ours is simulated.

  • Experiments results show that the performance of our proposed approach superior to that of existing work in terms of delivery ratio and energy efficiency.

Rest of this paper is organized as follows. Section 2 reviews some previous literature that focused on the research of clustering and routing in WSN. Our proposed Energy efficient Gravitational search algorithm (GSA) and Fuzzy based clustering with Hop count based routing for WSN are presented in section 3. Section 4 discusses the experiment results of our proposed approach. This paper is concluded in section 5.

2 Literature review

We present recent routing and clustering protocols for WSNs in this segment. In a cluster based network, cluster head close to the base station loss its energy all of a sudden bringing about the issues of problem area. To conquer this issue, R. Logambigai and A. Kannan [13] have presented dissimilar clustering based on Fuzzy for WSN. This proposed algorithm decreased the overburden for the cluster head when the nodes which tie with the specific cluster head. Their proposed methodology improved the lifetime of the network and energy efficiency of the network.

WSNs have a gigantic amount of sensor nodes which collect data from the client and transmit the collected data to the base station or end client. One of the significant issues to the WSN is energy consumption of the sensor node. Number of methods has been presented to decrease this issue. Among the methods clustering based algorithm has been chosen broadly. LEACH (Low energy adaptive clustering hierarchy) is a significant algorithm for clustering. In this algorithm, cluster head of a cluster gets data from the other sensor nodes of a similar cluster. Saeid Mottaghi and Mohammad Reza Zahabi [16] have proposed an algorithm that incorporates the use of the LEACH, mobile sink and rendezvous points (RP). These proposed mobile sink improved the energy efficiency of the system and RP has been utilized as a cache point for the mobile sink.

Suneet K. Gupta and Prasanta K. Jana [7] have proposed genetic algorithm based methodologies for routing and clustering in WSNs. Clustering has been done in their methodology dependent on residual energy of the gateways and distance from sensor nodes to their comparing cluster head. Additionally routing has been done in their methodology dependent on the residual energy of the gateways alongside a tradeoff between transmission distance and number of transmissions. This proposed algorithm has diminished the energy consumption of the network.

Energy balancing is similarly significant to drag out the network lifetime of WSN. Md Azharuddin and Prasanta K. Jana [3] have proposed particle swarm optimization-based routing and clustering algorithms. The routing algorithm has been developed an tradeoff off between energy balancing and energy efficiency, while the clustering algorithm deals with the energy consumption of gateways just as sensor nodes. They have presented a proficient particle-encoding method and have inferred a multi-objective fitness function for each of the proposed clustering and routing algorithms. Their proposed algorithm additionally endured the failure of cluster heads.

The effectiveness of WSNs is profoundly based on routing protocols directly influencing the network life-time. Clustering is a standout amongst the most famous methods favored in routing operations. Dervis Karaboga et al. [10] have proposed artificial bee colony algorithm based energy efficient clustering scheme. Artificial bee colony algorithm, reenacted the clever searching conduct of honey bee swarms, has been effectively utilized in clustering schemes. This proposed algorithm has been improved the lifetime of the network drag out. Their proposed algorithm outflanks the existing algorithms particle swarm optimization and LEACH.

Harmony search algorithm (HSA) is one of the meta-heuristics, used to settle a wide scope of NP-Hard issues. Praveen Lalwani et al. [12] have proposed Harmony search algorithm (HSA) for cluster head selection. The cluster head and routing have been done dependent on the parameters node degree, distance and energy in their proposed methodology. They likewise have inferred a potential capacity for the task of non-CH nodes to the CHs. At long last, they have proposed a routing algorithm dependent on HAS utilizing similar parameters, i.e., node degree, distance and energy in the derivation of the fitness function.

Rashmi Ranjan Sahoo et al. [19] have presented light weight dynamic TRUST model alongside honey bee mating algorithm for clustering. This proposed methodology forestalled malicious node to be a cluster head. The decision of light weight TRUST model made their clustering scheme progressively secure and energy efficient, which were most vital issues for resource obliged sensor network. They have likewise presented a priority scheme among the trust metrics which was progressively reasonable. Besides, the utilization of honey bee mating algorithm found most suitable node as cluster head.

Clustering a network with appropriate load balancing is a NP-difficult issue. To take care of such issues having tremendous hunt zone, optimization algorithm is the transcendent conceivable arrangement. Nitin Mittal et al. [15] have proposed differential development based clustering algorithm for WSNs named threshold-sensitive energy-efficient delay aware routing protocol (TEDRP). e. Dual-hop communication among CHs and BS has been used to accomplish load balancing of far off CHs and energy minimization. They likewise considered stability aware model of TEDRP named stable TEDRP (STEDRP) with plan to broaden the stability time of the network.

3 Gravitational Search Algorithm and Fuzzy based clustering with Hop count based routing

3.1 Overview

To increase the energy efficiency of the WSN, cluster based routing is presented in this paper. In this work, the cluster head (CH) is selected using Gravitational Search Algorithm. In this algorithm, the objective function is formulated depend on average intra-cluster and base station distance and energy parameter to select the optimal cluster heads. Then each sensor node selects its CH which is closest to its coverage or communication range so that cluster is formed successfully. The selected cluster heads receive data packets from the corresponding non-CH members. To attain lower latency and less energy consumption, supercluster head (SCH) is selected from the selected cluster heads using Fuzzy Inference System. The CH forwards the collected data packet to the selected SCH by selecting the CHs with minimum hop-count. Then the SCH forwards the collected data packet from the CHs to the BS (Base station). Figure 1 depicts the block diagram of our proposed approach.

Fig. 1
figure 1

Block diagram of our proposed approach

3.2 Network model

Figure 2 shows the network model or structure of our proposed approach. In WSN, sensor nodes are widely located in the sensing area. Each node can estimate the distance to the neighbor nodes using the received signal strength. So the sensor node doesn’t need any location finding system. From the figure, the base station in the sensing area applies Gravitational Search Algorithm to select the number of cluster heads. A number of five cluster heads (CH1, CH2, CH3, CH4& CH5) forms five clusters (C1, C2, C3, C4 & C5) in the area as shown in the figure. These CHs are selected using Gravitational Search Algorithm. Among the selected cluster heads, one supercluster head is selected by applying the Fuzzy Inference System on the CHs. The CH2 is selected as SCH as shown in the fig. CH forwards the collected data packet from the non-CH member to the SCH by selecting the neighbor CHs with the minimum hop-count. Then the SCH forwards the gathered data packet to the base station (BS). For example, as shown in the figure, the sensor nodes in the cluster (C4) forwards the sensed data to the CH4 which forwards the received data to the SCH which is in C2 by selecting the neighbor CH2. After receiving the sensed data, the SCH forwards it to the BS.

Fig. 2
figure 2

Network model

Based on the following parameters fitness function is calculated to select the cluster heads in the sensing area. These parameters are also used for supercluster head selection.

3.2.1 Average distance

To increase the energy efficiency of the nodes, the average distance of each intra-cluster node and base station from the CH is should be minimized. So, minimizing average intra-cluster node and base station distance of all the CHs, is the major objectives for efficient cluster head selection.

$$ \min\;\left({o}_1\right)=\sum \limits_{i=1}^n\frac{1}{m}\left(\sum \limits_{j=1}^md\left({SN}_j,{CH}_i\right)+d\left({CH}_i, BS\right)\right) $$
(1)

Where, m –denotes the number of sensor nodes in the sensing area.

n – denotes the number of cluster heads to be selected.

\( \frac{1}{m}\sum \limits_{j=1}^md\left({SN}_j,{CH}_i\right) \)- defines the average distance between CH and the rest of the sensor nodes in the intra-cluster.

\( \frac{1}{m}d\left({CH}_i, BS\right) \)- defines the average distance between a base station and CHi.

3.2.2 Residual Energy (RE)

To select the optimal cluster head, the total residual energy of all CHs should be maximized. So the rest of the two objective functions is to reduce the reciprocal of the total residual energy of all CHs which are to be selected.

$$ \min\;\left({o}_2\right)=\frac{1}{\sum \limits_{i=1}^n{Energy}_{CH_i}} $$
(2)

Where,\( \sum \limits_{i=1}^n{Energy}_{CH_i} \)- defines the total residual energy of all cluster heads (CHi).

3.3 Cluster head selection using Gravitational Search Algorithm

Gravitational Search Algorithm performs depend on the gravity law. In GSA, objects (candidate solutions) are considered as agents (masses). Due to the force of gravity, the agents in the region attract each other. So the agents with heavier masses attract the agent with less mass. Thus, masses assist with the support of a straight form of communication via gravitational force. An agent with the heavy masses (that related to optimal solutions) starts to move more slowly than lighter ones. A solution to the problems describes the position of the agent or mass. Inertial and gravitational masses are determined with the support of a fitness function. The solution with heavy mass is considered as an optimal solution in the search arena.

A solution to this algorithm is the position of the CHs which are to be selected. Now, let us assume a scheme with ith agents (masses) i.e.,

$$ {A}_i=\left[{X}_{i,1}(t),{X}_{i,2}(t),.......,{X}_{i,D}(t)\right] $$
(3)

Where Xi, d(t) denotes the position of the i th agent or CHs in the d th dimension. This is also represented as,

$$ {X}_{i,d}(t)=\left({x}_{i,d}(t),{y}_{d,i}(t)\right),1\le i\le {N}_P,1\le d\le D $$
(4)

In this work, the fitness value is calculated using the parameters of average distance and residual energy. Using eqs. (1) and (2), the fitness value is derived as,

$$ {Fit}_i(t)={o}_1\times \beta +{o}_2\times \left(1-\beta \right),\kern1.56em 0<\beta <1 $$
(5)

An agent with minimum fitness value has heavier mass and has a better position, i.e., the better is the cluster head selection.

The values best (t) and worst (t) are well-defined as.

$$ best(t)=\underset{j\in \left\{1,....N\right\}}{\min }{Fit}_j(t) $$
(6)
$$ worst(t)=\underset{j\in \left\{1,....N\right\}}{\max }{Fit}_j(t) $$
(7)

The force on the i th mass from the j th mass at a time t is well-defined.

$$ {F}_{ij}^d(t)=G(t)\times \frac{Mass_{PG_i}(t)\times {Mass}_{AG_j}(t)}{R_{ij}(t)+\varepsilon}\times \left({x}_i^d(t)-{x}_j^d(t)\right) $$
(8)

Where \( {Mass}_{AG_j}(t) \) represents the active gravitational mass associated with the j th agent at time t. \( {Mass}_{PG_i}(t) \) denotes the passive gravitational mass associated with i th agent at time t.ε and  G(t) represent a small constant and gravitational constant correspondingly. Rij(t) denotes the Euclidian distance between the agents i and j. G(t) is well-defined as follows.

$$ G(t)={G}_0\times \exp\;\left(-\gamma \times iter/\max iter\right) $$
(9)

Where, γand G0represent descending coefficient and initial value respectively. The current iteration is represented as iterand a maximum number of iteration is represented asmax iter. For each iteration, the total force on the agent i is calculated using the below equation.

$$ {F}_i^d=\sum \limits_{j\in Kbest,j\ne i}{\mathit{\operatorname{ran}}}_j{F}_{ij}^d(t) $$
(10)

Where, Kbest represents the set of K agents which having the biggest masses with best fitness values. Ranj represents a random number within the interval [0, 1]. By mapping the fitness, the inertial mass of each agent is designed as follows.

$$ {mass}_i(t)=\frac{Fit_i(t)- worst(t)}{best(t)- worst(t)} $$
(11)
$$ {Mass}_{in_i}(t)=\frac{mass_i(t)}{\sum \limits_{j=1}^N{m}_j(t)} $$
(12)

Where, Fiti(t) signifies the fitness value of the ith agent at time t.

Thus, the acceleration of the ith agent at time t is calculated using eqs. (8) and (11).\( {a}_i^d(t) \)calculated as.

$$ {a}_i^d(t)=\frac{F_i^d(t)}{Mass_i(t)} $$
(13)

Velocity and position of an agent are calculated using below eqs. (14) and (15) respectively.

$$ {V}_i^d\left(t+1\right)={\mathit{\operatorname{ran}}}_i\times {V}_i^d(t)+{a}_i^d(t) $$
(14)
$$ {X}_i^d\left(t+1\right)={X}_i^d(t)+{V}_i^d\left(t+1\right) $$
(15)

Where, ranm denotes a uniform random variable in the interval [0, 1]. This random number offers randomized attribute to the search. The iteration counter is repeated until we obtain the optimal solution.

Algorithm 1: Cluster Head selection using GSA

figure c

3.3.1 Cluster formation

Based on the weight of the cluster head, each sensor node in the sensing area joins to corresponding CH, thus the cluster is structured. The weight of the cluster head is calculated based on the following equation.

$$ W\left({SN}_j,{CH}_i\right)=\alpha \frac{E_{res}\left({CH}_i\right)}{d\left({SN}_j,{CH}_i\right)\times d\left({CH}_i, BS\right)} $$
(16)

Where, Eres(CHi)denotes the residual energy of CH. Sensor nodes join to the CH with.

higher residual energy.\( \frac{1}{d\left({SN}_j,{CH}_i\right)} \)- defines reciprocal of the distance between the sensor node SNjand cluster headCHi. The sensor node SNj joins to the nearest CHi in communication range. \( \frac{1}{d\left({CH}_i, BS\right)} \)- defines the reciprocal of the distance between cluster head CHi and base Station BS. The sensor node SNj joins to the CHiwhich is closes the base station BS. α represents a constant value.

During this cluster formation, each sensor node calculates this weight value using the above eq. (16). Then the sensor node joins to the cluster head CH with the highest weight value.

3.4 Supercluster head selection using Fuzzy Inference System

After the cluster heads selection, one supercluster head (SCH) is selected from the selected CHs. This SCH receives the forwarded data packet from all CHs and forwards to the base station. By selecting this SCH, network lifetime and energy efficiency of the network will be improved. For SCH selection, Fuzzy Inference System is presented. Mamdani model is used for developing a fuzzy inference system to select the SCH. Fuzzy Inference System has the following four steps.

Fuzzy variables

Input crisp value to the FIS is converted as fuzzy variables such as Low, Medium, and High for the fuzzy parameter of residual energy of CH and also Close, Medium, Far for distance to BS. A membership function is determined for each fuzzy variable. One output parameter of this system is the chance or probability to select the SCH. The chance with higher value has the more possibility to be selected as SCH. Variables used for output parameter are Extremely Large (EL), Large (L), Slightly Large (SL), Medium-Large (ML), Medium (M), Medium Small (MS), Slightly Small (SS), Small (S) and Extremely Small (ES) as shown in Table 1. In our approach, we apply the trapezoidal and triangular membership function that affords good results. For boundary variables trapezoidal function is used and also triangular function is used for intermediate variables. Fig. 3 and 4 show the membership function of fuzzy variables for the parameters residual energy of CH and distance to BS respectively. Figure 5 shows the fuzzy set for the fuzzy output variable to select SCH. Trapezoidal membership function and triangular membership function for the input value ‘y’ is defined as following eqs. (17) and (18) respectively. Figure 6 and 7 show the basic structure of trapezoidal function and triangular function.

$$ {\mu}_A(y)=\Big\{{\displaystyle \begin{array}{l}0,\kern3.599998em y\le {a}_1\\ {}\frac{y-{a}_1}{b_1-{a}_1},\kern1.68em {a}_1\le y\le {b}_1\\ {}1,\kern3.479999em {b}_1\le y\le {c}_1\\ {}\frac{d_1-y}{d_1-{c}_1},\kern1.56em {c}_1\le y\le {d}_1\\ {}0,\kern3.479999em {d}_1\le y\end{array}} $$
(17)
$$ {\mu}_A(y)=\Big\{{\displaystyle \begin{array}{l}0,\kern3.599998em y\le {a}_2\\ {}\frac{y-{a}_2}{b_2-{a}_2},\kern1.68em {a}_2\le y\le {b}_2\\ {}\frac{c_2-y}{c_2-{b}_2},\kern1.68em {b}_2\le y\le {c}_2\\ {}0,\kern3.479999em {c}_2\le y\end{array}} $$
(18)
Table 1 Fuzzy rules for SCH_Choice
Fig. 3
figure 3

Fuzzy set for input variable residual energy

Fig. 4
figure 4

Fuzzy set for input variable Distance to BS

Fig. 5
figure 5

Fuzzy set for output variable SCH_Choice

Fig. 6
figure 6

The basic structure of Trapezoidal function

Fig. 7
figure 7

The basic structure of the Triangular function

Then these trapezoidal membership function and triangular membership function are applied to each linguistic value or fuzzy variable of a rule using the functions (19) and (20) respectively.

$$ f\left(y;{a}_1,{b}_1,{c}_1,{d}_1\right)=\max \left(\min \left(\frac{y-{a}_1}{b_1-{a}_1},1,\frac{d_1-y}{d_1-{c}_1}\right),0\right) $$
(19)
$$ f\left(y;{a}_2,{b}_2,{c}_2\right)=\max \left(\min \left(\frac{y-{a}_2}{b_2-{a}_2},\frac{c_2-y}{c_2-{b}_1}\right),0\right) $$
(20)

If – then rules

If-then rule is applied to the fuzzy variables to attain the fuzzy set out. These rules have multiple inputs and the fuzzy operator (AND). Using this operator, minimal of three membership values is selected for each rule. For an example, If-then rule is taken from the table and described as.

If residual energy of CH is High AND distance to BS is Close Then output SCH_choice is Extremely Large.

Aggregation

This is a union of all the outputs attained from all If-then rules. A new aggregate fuzzy set is generated by choosing the maximal rule estimation values using the Fuzzy logic operator (OR). This maximum fuzzy output is given as input COG for defuzzification.

Defuzzification

Aggregated fuzzy output set is given as input to the process of defuzzification to find the chance of SCH selection. For defuzzification, Centre of Gravity method (COG)is used. Using this method, we get the single crisp value as output from the input of fuzzy sets.

$$ COG=\frac{\sum {\mu}_A(y)\ast y}{\sum {\mu}_A(y)} $$
(21)

Where, μA(y) represents the membership function of set A.

Algorithm 2: Super Cluster Head selection using Fuzzy Inference System.

figure d

3.5 Routing based on Hop-Count

After the successful selection of CHs and SCH, an efficient routing path will be established between the source nodes to the base station. Hop-count based routing algorithm is presented in this section to select the optimal path. In this approach, each CH sends a HELLO message to its neighboring CHs and updates its neighbor table with the information of other CHs. This HELLO message contains the information of hop-count to the SCH. The CH with minimum hop-count value is selected as the next hop node or CH. A minimum number of hops to the destination node is intended with the help of eq. (22).

$$ {HOP}_{minimum,i}=\left\{\min \left({HOP}_j\right)|j\in {N}_i\right\}+1 $$
(22)

Where,min(HOPj)signifies minimum hop count of the neighbor CHsj to the destination node. The hop count of CHi to its neighbor CH is 1 so that one is added to the minimum hop count of neighbor CHs in eq. (22). New entries will be further to the Neighbor Table (NT) of CHi are sorted in ascending order after the reception of HELLO packet in a node. Table 2 shows the neighbor table of source CH1. Then the CH with minimum hop-count is selected as a next CH. For an example, the CH1 sends the collected data packet to the SCH by selecting the minimum hop-count CHs such as CH4, CH6 and CH13 and CH16 as shown in fig. 8.

Table 2 Neighbor table of CH1
Fig. 8
figure 8

Efficient routing based on hop-count

4 Results and Discussions

Our proposed approach GSA-FCR (Gravitational Search Algorithm and Fuzzy based Clustering and Routing) is implemented in network simulator NS2. In this simulator, 500 sensor nodes are performed in the region 1000 m × 1000 m. Each sensor node in the region is executed with the transmission power of 0.66 W and also the receiving power of 0.395 W. Transmission range of each sensor node is 250 m. AODV routing protocol is used in this work. Each sensor node is included with omnidirectional antenna radiates radio wave power uniformly in all directions. Also, Two ray ground radio propagation model is considered, which used to predict the received signal power of each packet. Table 3 shows the simulation parameter and the value of our proposed approach. Sensor nodes in the region are grouped as a several clusters. For cluster formation, a cluster head is selected initially. CH is selected using our proposed Gravitational Search Algorithm and sensor nodes in the communication range of CHs are joined to the corresponding CH as shown in fig. 9. In this figure, CH nodes are indicated as a thick purple colored node. Among the selected CHs, SCHs are selected using our proposed Fuzzy Inference System. Figure 10 shows the selection of SCHs and these nodes are indicated in thin purple color. Then a CH in a cluster collects data from the source node. As shown in fig. 11, the source node (205) forwards data to its corresponding CH (204). The collected data in the CH are forwarded to the selected SCH by selecting the efficient route based on hop-count. As shown in fig. 12, the CH (277) forwards the collected data to the SCH (298). Then the SCH forwards the collected data to the base station. The whole work process is simulated within 100 s.

Table 3 Simulation parameters and its values
Fig. 9
figure 9

Cluster head (CH) selection

Fig. 10
figure 10

Supercluster head (SCH) selection

Fig. 11
figure 11

Data packet forwards from a source node (205) forwards data to its corresponding CH (204)

Fig. 12
figure 12

Data packet forwards from the CH (277) the SCH (298)

4.1 Performance metrics

Performance of our proposed approach is evaluated using the following metrics. Performance metrics of our proposed approach GSA-FCR are compared with that of PSOCR [3] and GECR [21].

Delivery ratio

It is the ratio of the number of packets received successfully and the total amount of packets transmitted.

$$ Delivery\kern0.34em ratio=\frac{Amount\kern0.17em of\kern0.17em packets\kern0.34em received}{Amount\kern0.17em of\kern0.17em packets\kern0.34em transmitted} $$
(23)

Packet drop

It is the number of packets dropped during the data transmission.

Packet delay

The delay of the network describes how long the network takes to transmit a bit to the destination. Unit of this parameter is seconds (s).

Throughput

It is the number of data that can be sent from the sources to the destination per second. Unit of this parameter is Mbps.

$$ Throughput=\frac{Amount\kern0.17em of\kern0.17em transmitted\kern0.17em data\;(Mb)}{Transmitted\kern0.17em time\;(s)\;} $$
(24)

Overhead

Number of extra bytes added to the data packet to transmit the data.

Energy consumption

Amount of energy consumed by each node during the transmission. Also, it is defined as the difference between the current energy and initial energy of a node. Unit of this parameter is Joule (J).

$$ Energy\kern0.34em consumption= Initial\kern0.17em energy- current\kern0.17em energy $$
(25)

4.2 Performance-based on nodes

Performance metrics of our proposed approach GSA-FCR are evaluated for varying nodes 100, 200, 300, 400 and 500 nodes. Figures 13-18 show the comparison of the performance metrics of GSA-FCR with the previous work PSOCR and GECR. Figure 13 depicts the comparison of the delivery ratio of GSA-FCR with PSOCR and GECR for varying nodes. By presenting efficient cluster head selection using GSA algorithm, each member in a cluster is restricted from transmitting data to the destination independently. So that delivery ratio of GSA-FCR is increased to 67% and 94% than that of existing PSOCR and GECR respectively.

Fig. 13
figure 13

Number of Nodes Vs Delivery ratio

Fig. 14
figure 14

Number of Nodes Vs Drop

Fig. 15
figure 15

Number of Nodes Vs Delay

Fig. 16
figure 16

Number of Nodes Vs Throughput

Fig. 17
figure 17

Number of Nodes Vs Overhead

Fig. 18
figure 18

Number of Nodes Vs Energy consumption

Figure 14 depicts the comparison of the packet drop of GSA-FCR with PSOCR and GECR for varying nodes. Due to the selection of efficient route based on minimum hop-count of each node, the number of the received packet is increased at receiver i.e., loss of packets is reduced. So, compared with PSOCR and GECR, packet drop of GSA-FCR is reduced to 16% and 34% respectively. Comparison of end-to-end delay of GSA-FCR with PSOCR and GECR for varying nodes is shown in fig. 15. Because of the selection of efficient cluster head and supercluster head in GSA-FCR, the transmitted data packet from the source is reached the destination within the time period. So, the packet delay of GSA-FCR is reduced to 21% and 35% than that of existing PSOCR and GECR respectively.

Figure 16 shows the comparison of throughput of GSA-FCR with PSOCR and GECR for varying nodes. By selecting the supercluster heads among the cluster heads using fuzzy inference system, the amount of data which is to be transmitted from source to destination per second is increased i.e., the throughput of the network is increased. So compared with the existing PSOCR and GECR, the throughput of GSA-FCR is increased to 20% and 45% respectively. Comparison of the overhead of GSA-FCR with PSOCR and GECR for varying nodes is shown in fig. 17. Overhead of GSA-FCR is reduced to 17% and 32% than that of PSOCR and GECR. By the selection of CHs, SCHs and efficient route using our proposed GSA-FCR, energy consumption of the network is reduced i.e., the energy efficiency of the network is improved. So compared to the existing PSOCR and GECR, energy consumption of GSA-FCR is reduced to 93% and 95% respectively as shown in fig. 18.

5 Conclusion

In this paper, Energy efficient Gravitational search algorithm (GSA) and Fuzzy based clustering with Hop count based routing (GSA-FCR) have been presented for WSN. Also, our proposed approach is implemented in NS2. Using GSA algorithm, CHs are selected from the available sensor nodes in the network. Then these selected each CH formed a cluster by joining other sensor nodes in its communication range. Among the selected CHs, supercluster head has been selected using Fuzzy Inference System. Then the collected data from the non-CH member have been forwarded to the selected SCH by the CH through the efficient route. This efficient route has been established based on the hop-count of the CHs. The performance of this proposed GSA-FCR has been evaluated in terms of energy efficiency, delivery ratio, delay, drop and throughput and has been compared with that of existing schemes such as GECR and PSOCR. Simulation results showed that energy efficiency and the delivery ratio of our proposed approach were superior to that of the existing work. However, during data transmission, the security of the data is further to be monitored.