1 Introduction

Wireless Sensor Networks consist of diminutive contemptible, decreased power of sensor nodes which are organized in observation neighborhood with extensive transmission range [1]. It consists of battery with restricted energy and not easy to exchange or recharge. Therefore, the main challenge of Wireless Sensor Network [2] is to create stability of the network load, to diminish entire energy consumption and to extend the lifetime of the network. The extended algorithm will improve the existence of Wireless Sensor Networks [3]. Cluster routing protocol is commonly used for improving network life time. The Cluster Head (CH) is randomly formed in LEACH [4]. Dominant Set Formation [5] is used to form the best Cluster Head using Tree Based Network Formation [6]. To get the solution with the problem of random formation, many researches focus on improvement in various kinds of algorithm for efficient distribution of the CHs, among network using Memory based Broadcast Model [7]. MR_LEACH [8] the extension of LEACH protocol proposed to improve the lifetime based on multi-hop communication for packet broadcasting to the sink. A Lot of algorithms are proposed for cluster formation such as Threshold Sensitive Energy Efficient Network (TEEN) [9], Energy-efficient Multi-sink Clustering Algorithm (EMCA) [10], Bandwidth and Delay Aware Routing [11], Fuzzy logic based energy efficient hierarchical clustering [12], Fuzzy logic [13], CHEF [14], SIPTAN [15], EEUC [16], EAUCF [17], IFUC [18] and EUDIS [19], PEGASIS [20], PEGASIS-ACO [21], type-1 fuzzy set [22], type-2 fuzzy set [23], HEED [24], A-SMART [25], TBOR [26], ECBK [27], SCSBE [28], EET2FL [29].

The fuzzy logic predicts the nodes, which is having high Trust Factor, energy and minimum distance to sink [30]. The predicted node select by cluster head to route the packets from cluster head to base using Type 1 fuzzy logic. It will lead to increase the life time of network and reduce the overhead of network [31]. Fuzzy logic systems (FLSs), [32, 33] and Type 2 Fuzzy logic systems [34, 35] can be used to create the best energy efficient routing model. Fuzzy based clustering routing protocol [36] is employed to discover the Cluster Heads and kernal optimization [37] is used for multihop routing. Moreover, two issues called residual energy [38] number of adjoining nodes are the contributions to compute the possibility [39]. The Fuzzy Logic based algorithm is used to generate a connection link to all the Cluster Heads [40]. The fuzzy set is differentiated with different membership functions [41].

2 Related works

In the current years numerous cluster based routing protocols are used in the WSN. In this LEACH is the first and fashionable protocol for increase the lifespan of the network it consist of two phases for all round. Every formation begins with a set-up phase wherein contain cluster head election and cluster formation take place [42].

$$ \boldsymbol{T}\left(\boldsymbol{n}\right)=\left\{\begin{array}{c}\hfill \frac{{\boldsymbol{P}}_{\boldsymbol{CH}}}{1-{\boldsymbol{P}}_{\boldsymbol{CH}}\times \left(\boldsymbol{r}\ \boldsymbol{\operatorname{mod}}\ \frac{1}{{\boldsymbol{P}}_{\boldsymbol{CH}}}\right)}\hfill \\ {}\hfill \kern7em \mathbf{0}\hfill \end{array}\right. $$
(1)

A node n finds the random values between 0 and 1 and calculate Threshold T(n), where, PCH is the Cluster Head probability, r is the number of the current head formation state from the set of sensor nodes. In this single –hop [43] communication is not suitable for large scale network. The algorithms proposed such as [44, 45], where Cluster Heads cooperated with the neighborhood for transmitting packets. EEUC [46] is formed from various parameters like energy distance, etc. In multi hop [47, 48] routing selection for best forwarded node is major issue for designing cluster protocol, in this chain topology architecture is another important protocol for elect best CH for transmitting the data in this each node transmit the data packet [49, 50].

3 EET2FL cluster routing protocol

In the initial state, all CHs are selected by the sink node in EET2FL clustering algorithm. In the literature, many of the cluster head formation are included on energy, range, distance, probability and some other factors. Beyond that, EET2FL clustering algorithm considers three factors such as energy, weight and the distance to the sink of every node for CH election.

The residual energy is calculated from the balance energy of a sensor node, and initially all the nodes are having the same energy and the node which is having highest energy will be selected as CHs. Second, the node weight is assigned based on thenumber of packets in the node with hop count of node from the sink. After the deployment, the sink node broadcast the message to all the nodes to identify the position, energy, distance. Due to this transmission of Message, the sink node losses some energy at the same time each sensor node losses some energy for receiving the data. This message broadcast is called as Path Discovery. After that, each sensor node’s energy will vary. That’s why based on the packet and hop count will assign the weight to all sensor nodes. Eventually, the nodes far left from the sink will need additional energy for data diffusion to the sink, and after that expires quickly. Taking into consideration the residual energy, weight and the space to the sink of each node for CHs selection, the sink broadcasts a control signal to all the sensor nodes. The sensor nodes start collecting the data from the environment, every sensor node sends the distance to the sink along with residual energy information to the sink based on the signal strength. In the same way, for each round, every node reports its residual energy to the sink. Fuzzy Logic System is described in Fig. 2.

Figure 1 describes the transition state for hidden and functional state model. The sensor generates the channel allocation using probabilistic approach.

Fig. 1
figure 1

Transition state for Hidden and Functional Model

$$ \mathrm{Hn}\ \left(\mathrm{t}\right)=\left\{{\mathrm{Hn}}_1\left(\mathrm{t}\right),{\mathrm{Hn}}_2\left(\mathrm{t}\right),{\mathrm{Hn}}_3\left(\mathrm{t}\right),\dots \dots \dots \dots .{\mathrm{Hn}}_{\mathrm{n}}\left(\mathrm{t}\right)\right\} $$
(2)

Hn denotes the Hidden state with available clusters with time period of t.

$$ \mathrm{Fn}\ \left(\mathrm{t}\right)=\left\{{\mathrm{Fn}}_1\left(\mathrm{t}\right),{\mathrm{Fn}}_2\left(\mathrm{t}\right),{\mathrm{Fn}}_3\left(\mathrm{t}\right),\dots \dots \dots \dots .{\mathrm{Fn}}_{\mathrm{n}}\left(\mathrm{t}\right)\right\} $$
(3)

Fn denotes the Functional state with available clusters with time period of t.

The Available Cluster (AC) is calculated using the parameters such as the total number of frame slots Sd , Total sub slots in frame St, Time duration Ft, number of broadcast slots ω.

Fig. 2
figure 2

Fuzzy Logic System

$$ AC=\frac{1-{S}_d}{S_t}\ \omega\ \frac{S_t}{F_t} $$
(4)

The fuzzy logic system has three input variables including the residual energy, weight and the distance to the sink of each node, and the two output variables are the probability chance of node becoming tentative CH and the competition radius of each candidate CH. The role of fuzzifier is mapping each crisp input value on to fuzzy set. The FIS used in this work is Mamdani fuzzy inference system.This model produces the output based on the input parameters used in the control system. The input linguist control rule is based on rules formed by an experienced operation.

Fuzzy type 2 Fuzzifier takes three types of input parameters for every sensor nodes as residual energy, weight and distance. The interference engine analyzes the input with fuzzy rules and membership functions using type 2.

The neighbor node, nearer to sink can be elected by the best forwarding node. The distance can be calculated by using the formula,

$$ Distance\ (k)=\frac{\left[\frac{1}{d\left(k, sink\right)}\right]}{\left[{\sum}_{j=0}^N Neighbur(i)\frac{1}{d\left(j, sink\right)}\right]} $$
(5)

Where (k, Sink) denotes the distance from node k to the sink and Neighbor (i) demonstrates the list of source node i.

On the assumption that node k is selected as the next hop and the data is transmitted to it, ETR is Energy used to broadcast data, d is the distance, the expected Residual Energy (RE) of sensor node i is

$$ {E}_{\mathrm{RE}}(i)=\kern0.5em E(i)-\kern0.5em {E}_{\mathrm{TR}}\kern0.5em \left(d\ \left(i,\kern0.5em k\right)\right) $$
(6)
$$ {E}_{\mathrm{RE}}(j)=\kern0.5em E(j) $$
(7)

Using the expected residual energy from (6) and (7), sensor i can calculate the expected RE for each decision k.

In order to reduce packet drop in sensor node, node weight is calculated based on the number of packets in the node with hop count of node from the sink.

The following equation is used to calculate the weight of each sensor node

$$ \mathrm{Wi}=\mathrm{NPN}\ \left(\mathrm{i}\right)\times \mathrm{H}\ \left(\mathrm{i},\mathrm{S}\right) $$
(8)

where.

Wi:

is the weight of node i,

NPN (i):

is the number of packets that the node i will forward

H (i, S):

is the hop distance of node i from the closest to the sink.

This fuzzy Inference system has 27 rules which are provided based on the three factors these three factors are used to select the Cluster Head. Fuzzy has three input and two output are provided, then the fuzzy rule gets three input and provide the two output they are probability and radius. Figures 3, 4 and 5 demonstrates the types of Membership functions.

Fig. 3
figure 3

T2,T1 Membership function input variable Distance a,T2MF b,T1MF

Fig. 4
figure 4

T2,T1 Membership function input variable Energy a,T2MF b,T1MF

Fig. 5
figure 5

T2,T1 Membership function input variable Weight a,T2MF b,T1MF. Sensor node Weight. Sensor node Weight

4 Cluster head selection

Cluster head selection process has been carried out in many rounds.

4.1 Algorithm for cluster head selection

First sink node broadcast the message.

Based on the flooding each node update their information into sink.

Check if sink node receives the nodes information then

Generate probability chance of tentative CH and competition radius using T2MFLS

figure d

Whenever all data has been successfully transmitted, the Cluster Head will perform success function by eliminating unused data and regenerate the data into main packet. This main packet data is transmitted to the sensor node base station with the use of multi-hop transmission. After a limited period, the next rounds start with the selection of new CH.

4.2 Multi-hop routing protocol

The major difference between the types of fuzzy function is membership function of input values. In type 1, fuzzy logic need not permit for any suspicions nodes about membership value. For multi-hop communication, this fuzzy type 1 is useful in terms of membership function to select the best forwarder node among many CHs.

Cluster head uses multi-hop transmission to accomplish the base station using fuzzy logic. Fuzzy logic takes 3 parameters (trust factor, Residual energy, and distance) to choose other finest cluster head as forwarder node to send the packet to the base station.

In Fig. 6 the fuzzifier takes three types of input parameters for every sensor node as energy, distance and trust factor. The interference engine analyzes the input with fuzzy rules and membership functions. Fuzzy rules provide the conditions to choose the probability sensor nodes that befall the most excellent cluster head that acts as intermediate node. Membership functions present the sets of each participation limitation as high, medium and low.

Fig. 6
figure 6

Fuzzy Logic Control System

4.2.1 Distance to sink

In order to save lots of energy in CH this is close to sink, should be elected as generating node. The definition of distance is

$$ Distance\ \left( CH, sink\right)=\frac{\left[\frac{1}{d\left( CH, sink\right)}\right]}{\left[{\sum}_{j=0}^{CH}{Neighbur}_{CH}(i)\frac{1}{d\left(j, sink\right)}\right]\kern0.5em } $$
(9)

Where (CH, Sink) demonstrates the fuzzy distance from Cluster Head to sink node, and NCH(i) demonstrates the list of neighbor nodes.

4.2.2 Trust factor (Tf)

Initially, trust factor is 100 for every CH node. A counter value is incremented for every packet drop in the CH node. Initially, the value for each CH node of the counter is 0 and is incremented by 1 with every successive packet dropped.

Trust factor is calculated based on the number of consecutive packet drops by the CH

$$ {T}_f=100\times {X}^N $$
(10)

where.

N:

Number of repeated packet drop by the CH

4.3 Algorithm for multi-hop routing

figure e

Figure 7 describes Cluster management using multi hop communication in Wireless Sensor Network. The Cluster management can be done by using the probability of the forwarding node through the neighbor node with the help of sink node. The Cluster head can send the data to the sink node directly if the probability value will reach the threshold value, which will be calculated by using the fuzzy inference rule.

Fig. 7
figure 7

Cluster management using multi hop communication

In the above algorithm, the current energy, trust factor and distance from base station are calculated to the selected cluster. If the cluster head has more number of cluster heads between sink and itself, it employs the fuzzy logic to choose the preferred cluster head to reach the data. Figures 8, 9 and 10 show the membership function of three parameters. The cluster head selects an additional cluster head to reach the base station with respect to the fuzzy logic results

Fig. 8
figure 8

Residual energy parameter membership function

Fig. 9
figure 9

Distance parameter membership function

Fig. 10
figure 10

Trust factor parameter membership function

.

Figures 8, 9 and 10 blue line represents the low range, green line represents the medium range and red line represents the high range membership functions of three parameters energy, trust factor and distance.

To create the cluster, we use the fuzzy logic control system (FLCS) is used. The FLS consists of three phases. First phase is fuzzifier, second phase is interference engine and the last phase is defuzzifier. Here, fuzzy logic control system is implemented to choose the probability candidates for best CH for forwarding the collected data. Fuzzy logic control system (FLCS) computes the probability using three input parameters as distance, energy and trust factor. The FLCS output contains a set of nodes which is having high probability of their three parameters.

4.4 Algorithm for cluster management

figure f

5 Result analysis

To improve the performance of the WSN, the data packets are sent from one cluster head to another cluster head, and finally the data packets are sent to the base station.

5.1 Cluster head selection

This method is used to the select the cluster head, among many sensor nodes available in the wireless sensor network. In this WSN, one cluster will select the CH and then each cluster will select the CH. Figure 11 demonstrates the cluster head selection

Fig. 11
figure 11

Cluster Head Selection

.

5.2 Multi hop broadcast

In multi-hop broadcast method, all the cluster heads are connected in a single link by using the fuzzy type 1 inference rule in a chain format. Data packet is sent from the base cluster head to an additional cluster head and then finally to the base station (Figure 12)

Fig. 12
figure 12

Multi-hop transmission

.

5.3 Identify the shortest path node

This method is used to discover the shortest path commencing CH to base station, using the shortest path with enough signal strength. After that, the data packet can be sent to the sink. Figure 13 demonstrates the shortest path finding process

Fig. 13
figure 13

Find the Shortest path node

.

5.4 Comparison graph for alive sensor nodes vs different rounds

Figure 14 shows the quantity of alive nodes subsequent to the simulation ends. The simulation ends after 200 s. The four protocols are compared. LEACH, EEUC, PEGASIS have fewer number of alive nodes owing to the elevated energy expenditure. But the proposed EET2FL protocol has high amount of alive nodes

Fig. 14
figure 14

Comparison graph for alive sensor nodes Vs Different rounds

.

5.5 Comparison graph for number of neighbours vs different rounds

Figure 15 demonstrates the comparison analysis for number of neighbours versus the different rounds in multi-hop broadcasting with respect to the energy. If the number of rounds has been increased automatically the energy consumed is also increased. The neighbour node can also transmit the data packet from the base station to the sink node by the way of energy consumption

Fig. 15
figure 15

Performance of Neighbour nodes in Energy

.

5.6 Comparison graph for energy consumption vs different rounds

Figures 16 and 17 shows the performance analysis of utilized energy by the four protocols. Energy utilization by EET2FL is minor compared to LEACH, PEGSIS and EEUC because it discovers cluster head based on fuzzy logic type 2 for uncertainties in the input value that leads to select best node as CH and it takes trust factor as input for selecting best intermediate CH and this leads to reduce packet drop that increases high data delivery. High residual energy CH will be linked to forward data to the sink that leads low energy consumption

Fig. 16
figure 16

Comparison graph for Energy consumption Vs Different rounds

Fig. 17
figure 17

Energy Consumption Vs Different rounds

.

5.7 Comparison chart for Energy and Rounds

Figure 18 shows the performance analysis for network lifetime by the four protocols. Network lifetime is measured based on the quantity of alive nodes in the network and first node death, half node death and last node death.Network lifetime is maximum for EET2FL which is less compared to LEACH, PEGSIS and EEUC. The node will die soon compared with EET2FL because it discovers cluster head based on fuzzy logic type 2 for uncertainties in the input value leads to select best node as CH and multi-hop communication based on fuzzy logic type 1 used to select best intermediate CH to reach sink.

Fig. 18
figure 18

Comparison chart for Energy and Rounds

6 Conclusion

The aim is to provide load balance to the network and prolong lifetime of the network. Each cluster selects the CH using the three factors such as energy, weight and distance to the base station. In this cluster, any node that can act as source and another node can act as destination. Then, from the source, data packets are sent to the base station by using the CH. Using fuzzy logic type 1 algorithm, all the nodes are connected to the chain format and then data packet can be sent to the sink. Thus, network lifetime is increased and energy is saved. However, the drawback of this approach is the rules in EET2FL are fixed and defined by experience. To solve this rule fixation problem for selecting cluster head, it is planned to use optimization algorithm to segregate the productions and parameters using neuro fuzzy for further improvement.