1 Introduction

Wireless Sensor Network has attracted the attention of many researchers in recent years, and a lot of progress has been made in this field. The shear high number of researches carried out in the field points to its high scope and functionality in different areas, such as in medical health, military operations, agriculture, urban management, security, environment, constructions, strengthening large structures such as bridges and tunnels etc. [1,2,3,4]. Monitoring environmental and physical conditions, such as sound, temperature, humidity, motion etc., are all carried out by these networks. The advancements in cellular phone technology have caused smart phones and tablets grow in popularity. One reason for this popularity is the ability of these gadgets to run applications based wireless systems [5]. Additionally, in the field of mobile ad hoc (MANET), which include gadgets with self-organizing calculation mechanism, sending and receiving data are carried out based on wireless networks [6, 7]. We can refer to ‘road network’ as a famous sample constructed on the basis of MANETs. In this network, nodes are moving and its typology undergoes constant change. In this kind of network, nodes require wireless system to establish communication [8, 9]. What ought to be taken into consideration is that with advancements in mobile technology, its threats have increased too. Threats such as the theft of personal information. Attackers can easily find out about users’ physical location by analyzing their queries. Consequently, in recent years issues such as location privacy have turned into a subject that has occupied most researches [10, 11]. Various methods have been proposed to raise the security of road networks [12]. Wireless sensor network is an energy limited network which consists of some sensor nodes and a base station. Sensors are powered by small batteries which prove difficult to replace or recharge [13, 14]. Therefore, saving energy is of paramount importance. Data should be transmitted from nodes to the station using some intermediaries since direct transmission of data from each node results in dissipated energy [15, 16]. Selecting one or several nodes as intermediaries (cluster head), therefore, helps reduce energy dissipation. That is why clustering plays a key role in these networks [17, 18]. Clustering nodes in sensor networks has the following advantages: (1) Reduces intracluster communication. (2) Using cluster heads, load balancing could be implemented throughout the network. (3) Reduces updating while limiting many of these messages to intracluster communications. (4) And increases scalability [19, 20]. In recent years, numerous methods of clustering nodes in wireless sensor networks have been presented which, in almost all of them, the cluster head section algorithm is considered fixed and is repeated in each round. Performing selections in each round increases the number of sent and received messages, an issue which in networks with high number of nodes will cause certain problems, including energy reduction, increase in collision, and network traffic. By selecting and trusting the best nodes as cluster heads for at least some rounds, it is possible to reduce cluster-head selection stages and, as a result, save more energy. Since the majority of existing algorithms in wireless sensor networks benefit from repeating cluster-head selection procedures to cluster the nodes in each round, and since this clustering procedure in each round increased the number of messages, our main motivation to present a novel clustering method for wireless sensor networks is to reduce the number of transmitted messages between the nodes. This will minimize nodes’ energy consumption and prolong network lifetime. The present article puts forward a new clustering method based on fuzzy logic which uses three clustering algorithms. These algorithms are each separately tasked with selecting cluster heads in different rounds, and in some rounds, by trusting previous cluster heads, do not perform any selections to save more in energy in the entire network. This article presents a new method of clustering using fuzzy logic which utilizes three clustering algorithms. These three algorithms are separately tasked with selecting cluster heads in different rounds.

The rest of the article is organized as follows: in Sect. 2, related works done in the field are examined where, in addition to basic algorithms, fuzzy clustering is analyzed too. The system model is described in Sect. 3. In Sect. 4, the proposed MCFL algorithm is delineated in much detail. The evaluation of the proposed algorithm and comparing it with other approaches in several scenarios is presented in Sect. 5. And finally, Sect. 6 deals with results and the future work.

2 Related works

In this section, clustering algorithms in wireless sensor networks will be examined. Some of these algorithms are examined and analyzed on the basis of their importance and some of them are examined because they are new and fuzzy. In addition to sharing some common features, each of them is unique in such a way that, by improving them, they compensate for week points of previous methods. However, these algorithms suffer from some problems that will be dealt with in following sections. Each of the discussed algorithms belongs to one of random-based, density-based, and fuzzy-based groups. The description of each group is given in the following subheadings.

2.1 Random-based clustering

Methods that fall under this category will perform selections randomly. These methods are generally simple in deployment and perform clustering with an overhead close to ideal [14].

LEACH protocol [21] is a clustering method that utilizes random values to select cluster heads and to distribute energy among nodes. This algorithm consists of two phases. During the first phase, clusters are formed while during the second phase messages are transmitted to cluster heads and are transmitted to the base station after aggregation. In each round, sensor nodes calculate the threshold and then select a random number between 0 and 1. If for a node this random number is less than the calculated amount, that node introduces itself as the cluster head and broadcasts a message to all the other nodes. Based on the strength of the received signal from cluster head nodes, other nodes decide to join the cluster. The remaining energy in the node is not an important criterion in selecting cluster heads. In wireless sensor networks, where the most important issue is to save more energy, this could lead to premature death of the nodes.

The next algorithm [22] tries to improve LEACH performance by calculating the time spent in each round and optimizing this time. It will consider the time of each round as consisting of set-up phase and data transference. And by calculating the required time for clustering and optimizing the whole time, it will increase network lifetime and its operational capacities. As in the previous method, nodes are randomly selected. Therefore, the node’s residual energy is not a good reason for it to be selected as a cluster head, while this may cause the premature death of the nodes.

In [23] a clustering algorithm (CCN) is presented which includes four phases: calculating the number of neighbors, cluster-head selection, forming cluster head, and determining TDMA. To select the cluster head, the nodes which did not receive any messages from the neighboring nodes to become cluster heads will send a message to become one. In the next step, the nodes which received the message will introduce themselves as the member of that node. In this method, there is a reversed relationship between the size of the cluster and the number of nodes in one cluster. Clusters with a high number of nodes are smaller than clusters with low number of nodes. Cluster heads are randomly selected while it shares the defects of the previous two methods.

2.2 Density-based clustering

Some clustering algorithms use some criteria to choose cluster heads. Using criteria such as the residual energy, distance from the base station, and the number of neighbors will not only make the clustering procedure more logical, but will also affect the performance of the whole system. The basis of these methods is competition and the nodes which score the highest points will be selected as cluster heads [14].

The [24] method is a cluster-based routing algorithm in wireless sensor networks. To cluster the nodes, each node sends a message to its neighbors regarding its residual energy. The node that receives the message will compare its residual energy with that of the candidate. If it understands that its energy is higher, it will resend the message containing its own energy level. However, if it has lower energy than the candidate, it will send the message containing the candidate’s energy level. At the end of each round, the node with the highest level of energy will be introduced as the cluster head. The mentioned clustering has been able to make the cluster-head selection procedure more logical by using criteria such as energy. However, performing selections in each round has increased the number of messages, a fact that has resulted in higher energy dissipation.

The next algorithm [25] which has been put forward to propose travel recommendations to users and benefits from one clustering method. To achieve this objective, the images, together with some tags, are placed in independent clusters. Each time the user expresses his interest in travel destinations, tags will receive points. Ultimately, tags with highest points will be presented to the users as a new travel suggestion. The information concerning the tags and interests will be transmitted and received via a wireless connection. This clustering is density-based which can omit outliers, and is capable of presenting users with more suggestions by gathering the least amount of information. There are other methods in the field of image clustering that are left out due to their resemblances.

In [26] article, clustering is used to improve the performance of accumulated data is wireless sensor network. This algorithm benefits from spatial correlation between the sensed nodes to form clusters. To select the cluster head, the distance between the nodes is calculated and, accordingly, to each sensor node a certain weight is dedicated. At the end of each stage, the node with the highest weight will be selected as cluster head.

2.3 Fuzzy-based clustering

In recent years, researchers have benefited from fuzzy logic to select the best cluster heads in wireless sensor networks. Fuzzy logic is also used to model human beings experiences and behaviors. A fuzzy system is comprised of four parts: fuzzifire, defuzzifier, fuzzy rules, fuzzy inference engine [14]. The first step is to record the input real numbers to their corresponding set in the fuzzy logic. This is carried out by fuzzifire. At the end of this stage, for each criterion (such as energy, distance to the base station, and…) a membership function is formed which will determine each input real number’s degree of membership in the fuzzy logic. Then, by using fuzzy rules and deduction motor and membership functions, a real outgoing value from the fuzzy set is achieved which can be recorded as a corresponding real number using defuzzifier [27, 28].

CHEF protocol [29] benefits from a centralized mechanism to select cluster heads using fuzzy logic. Each node generates a random number between 0 and 1. If the number is smaller than the threshold, the node calculates the chance using a fuzzy inference system and then broadcasts a message to other nodes to become candidates. Then, a node receives this message coming from other nodes within the neighboring radius to become a candidate. A node with a better chance is selected as the cluster head. After selecting the cluster head, everything (advertising message, the message to join the cluster head, and the stable phase), will be according to LEACH protocol. Fuzzy inference system employs two inputs: remaining energy and the distance between nodes. What must be taken into consideration about this approach is that not all the nodes participate in cluster head selection in each round, and only those whose threshold is greater than the generated random number are permitted to participate. The reduction in the number of candidates leads to the reduction in the number of messages that ultimately saves more energy. But there is the chance that the selected random number is so great that one or several suitable nodes are not permitted to participate in the selection round.

In EAUCF method [30], the network is divided into unequal clusters. Clusters which are closer to base station are smaller in size relative to farther clusters. Selecting cluster heads is carried out according to fuzzy logic in such a way that all nodes send data such as remaining energy and distance to base station to fuzzy motor and after inference, it will compare the output, which is between 0 and 1, with a random number. If the output is greater, the node is selected as the cluster head. The reduction in the number of messages in the entire network and limiting them to intracluster messages only is one of the greatest advantages of this method. However, repeating the whole procedure of cluster head selection in each round results in energy dissipation, and as it was mentioned above about CHEF method, the comparison of fuzzy output with a random number prevents the suitable node from being selected.

The next method [31] is a fuzzy-based clustering algorithm too. In this method, as in LEACH, cluster heads are selected according to the value of the threshold. In the next step, using fuzzy parameters such as residual energy, movement of the base station, and cluster centrality, a cluster head is selected. Then, cluster heads receive data from other surrounding nodes, aggregate them, and transmit them to the cluster head. And finally the cluster head transmits the received data to base station. Results of simulation reveal that this protocol outperforms LEACH protocol in terms of energy consumption and network lifetime. This method uses a two-level clustering with a great impact on reducing energy consumption.

DUCF [32] is another method that clusters by means of fuzzy logic. Parameters such as energy, distance to base station, and node temperature are considered as fuzzy inputs, and selection in each round is done in the presence of all nodes. Although this method has been able to consider the best node as cluster head, selecting cluster heads in each round lessens energy consumption.

Another method to perform clustering in wireless sensor networks is MOFCA [33]. Here, cluster heads are determined based on distance to base station and residual energy. In addition to the chance, the radius of the cluster head is very decisive, meaning that if a cluster head is closer to base station and has more energy, it is able to collect and transmit more data. Consequently, the competitive radius of the cluster head is greater. Following CHEF, this method permits some of the nodes to take part in the selecting procedure by comparing the random number with the threshold. Thus, the drawback that inflicted CHEF method exists in this method too. Like other clustering methods, selecting algorithm is performed in each round and lessens energy consumption.

In [34], FEMCHARP fuzzy protocol is presented. Initially, this protocol organizes nodes in such way that all of them could be held within the cluster. By using fuzzy logic a cluster head is selected for each cluster based on highest residual energy and shortest distance to base station. Several cluster head leaders (CHL) are chosen by the base station using fuzzy logic based on highest residual energy and the shortest distance to base station, meaning that cluster head leaders are selecting from among cluster heads by means of fuzzy logic. Each cluster head leader can transmit data to the base station either directly or via other cluster head leaders. This method employs centralized clustering algorithm that leads to an increase in the number of received data packets. The existence of two elections and their repetition in each round increases opportunities for energy reduction pretty much like other methods.

3 System model

3.1 System goals

The purpose behind proposing a new clustering method in wireless sensor networks is to prolong network lifetime. The proposed method has been able to achieve this by reducing the number of sent messages between the nodes during selection period. By reducing the number of messages, the total number of sent packets in the network decreases too. Therefore, cutting down on the number of packets will reduce network traffic and collision. On the other hand, since nodes lose a certain amount of energy for each sent message, then, by reducing the number of messages, nodes will preserve more energy and prolong network lifetime.

3.2 System requirements

Before dealing with the details of the proposed method, examining the assumptions of system model is vital. These assumptions are as follows:

  • All nodes are homogeneous.

  • All nodes enjoy equal energy.

  • Nodes are randomly and evenly distributed.

  • After distribution all nodes and the base station remain motionless.

  • Election in each round is carried out completely distributed.

  • Nodes are aware of their own position and also of the position of other nodes and the base station.

  • Euclidean distance is used to determine all the distances.

  • Nodes that are positioned within the neighboring radius “R” are the neighbors of that cluster.

  • Data is transmitted from nodes to cluster heads and from cluster heads to the base station.

The energy consumed in order to send ‘L’ bits of data packet from sender to receiver at distance ‘d’ is calculated using the following relation:

$$ E_{{T_{x} }} \left( {l,d} \right) = \left\{ {\begin{array}{*{20}c} { l* E_{elec} + l* \varepsilon_{fs} * d^{2} \quad if\;\;d \le d_{0} } \\ {l* E_{elec} + l* \varepsilon_{mp} * d^{4} \quad if\;\;d > d_{0} } \\ \end{array} } \right. $$
(1)

in which d 0 is obtained from the following relation:

$$ d_{0} = \sqrt {\frac{{\varepsilon_{fs} }}{{\varepsilon_{mp} }}} $$
(2)

where \( E_{elec} \) is per bit energy dissipation of sender and receiver circuit, \( \varepsilon_{fs} \) is the energy of the free space, \( \varepsilon_{mp} \) is the energy consumed by multipath propagation, and \( E_{DA} \) is the energy of data aggregation. And \( E_{Rx} \) is the sufficient energy to receive the messages and is obtained from the following relation:

$$ E_{Rx} \left( l \right) = l* E_{elec} $$
(3)

4 The proposed algorithm

As mentioned earlier, one of the objectives of clustering in wireless sensor networks is to save more energy within the network. However, repeated sending of messages from one node to others or to base station reduces energy. A variety of methods have been proposed whose focus is on how to increase energy saving within the network. This article, which utilizes fuzzy logic to carry out node clustering processes in the network, presents a multiclustering algorithm (MCFL) which, by reducing the number of cluster head elections, reduces repeated sending of messages while guaranteeing increased capacities to save energy within the network. Network timeline is illustrated in Fig. 1, and the pseudo code of the proposed algorithm is presented after that.

Fig. 1
figure 1

Network lifetime in the proposed algorithm

figure c

As it can be observed, three different clustering algorithms are tasked with clustering nodes. In rounds 1, 4, 7,…, parameters such as residual energy and the number of neighbors of each node are considered as fuzzy inputs. Energy, as the most important parameter in wireless sensor networks, is the main criterion that must be subject of comparison in all clustering algorithms which are intended to minimize energy consumption. Together with energy, the number of neighbors, which is one of the most important factors in clustering, is used at this stage to carry out clustering procedures. The membership functions of these two parameters are presented in Figs. 2 and 3. Each node in each round will send its current energy and the number of its neighbors to the fuzzy system. After performing deductions by fuzzy rules, the fuzzy system will dedicate a number between 0 and 1 to each node. This is called node chance. After determining chance value, each node will send the obtained chance to its neighbors. Ultimately, the node with the highest chance will be selected as cluster head of that node. After selections, nodes will transmit their data to cluster heads, and they, after accumulating the data, will transmit them to the base station. Lines 7–13 in pseudo code of the algorithm corroborate this fact. The function of output membership is shown in Fig. 4, and inference rules are presented in Table 1.

Fig. 2
figure 2

Input membership function; remaining energy

Fig. 3
figure 3

Input membership function; number of neighbors

Fig. 4
figure 4

Output membership function; chance

Table 1 Fuzzy rules in MCFL algorithm (1st clustering)

At the end of this stage, the best nodes within the neighboring radius are selected as cluster head. Since the energy of nodes and the number of neighbors have not changed, it is highly likely that in the next round the same cluster heads are selected. Therefore, in rounds 2, 5, 8, etc. no selection takes place and the same cluster heads continue to perform their duty. There is the possibility that a cluster head dies at the start of these rounds, and if this is the case, the node with the highest fuzzy output from the previous round is selected as the new cluster head. Lines 14–22 show the pseudo code of this algorithm.

Since in two consecutive stages cluster heads have not changed, selecting cluster heads takes place in rounds 3, 6, 9, etc. This is because in the first algorithm the best nodes are selected as cluster heads. Therefore, the node that is selected as the next cluster head must outperform other nodes in terms of energy and shorter distance to cluster head. In these rounds, fuzzy outputs include remaining energy and distance to cluster of the previous stage. The membership functions of these two parameters are shown in Figs. 5 and 6. As in the first algorithm, in this stage nodes will send their input parameters, including energy level and distance from the cluster head of the previous stage, to the fuzzy deduction engine. Using the fuzzy rules, the deduction engine will determine each node’s chance, and each node will compare its chance to that of its neighbors. The node with the highest chance is selected as the cluster head. Lines 23–30 in pseudo code of the algorithm corroborate this fact. The output membership function and the fuzzy rules for this algorithm are shown in Fig. 7 and Table 2, respectively.

Fig. 5
figure 5

Input membership function; remaining energy

Fig. 6
figure 6

Input membership function; distance to cluster head

Fig. 7
figure 7

Output membership function; chance

Table 2 Fuzzy rules in MCFL algorithm (2nd clustering)

After carrying out the selections and at the beginning of the new round, first clustering is once again tasked with selecting and these three clustering algorithms perform their duties so long as the network remains alive.

One possible question is that why in the first and third rounds clustering is done, while in the second round it was not? The answer is that in the first algorithm the best nodes in each cluster are selected as cluster heads. By trusting them in the second algorithm, the same cluster heads are present and, therefore, no selection will be performed and we can minimize the number of messages obtained from selection processes. But since in two consecutive rounds cluster heads have not changed, they suffer from energy depletion, while it is possible that in each cluster there are some nodes that are in better conditions to be selected as cluster heads. Therefore, in the third algorithm selection is performed. It might raise the question why cluster head selection parameters are different in the first and the third algorithms? As it was explained before, energy, as the most important parameter in wireless sensor networks, is the main criterion that must be compared in all clustering algorithms that are carried out to minimize energy consumption. Thus this parameter is present in both clustering algorithms. Because the node which is suitable to become cluster head must carry a message containing a high number of nodes, the criterion of the number of neighbors, as one of the most important clustering factors, is considered in the first algorithm. The nodes that are selected as cluster heads are the best ones in each cluster. This means they enjoy a better condition than other nodes in the cluster in terms of energy and their location between other nodes. So if a node is supposed to replace the present cluster head, it must have a better condition than the previous cluster head in terms of energy and physical location in the cluster. As a result, node energy and distance from the cluster head of the former stage are the two parameters that are considered in the third clustering. After the third algorithm and the start of the new round, the first algorithm will resume its duty to once again perform selections to choose the best nodes and give the opportunity to other nodes to have the chance to be selected as cluster heads. These three algorithms will continue in this way as long as network lifetime still obtains.

It is evident that the reduction in the number of selection rounds results in the reduction of the number of transmitted messages, leading to better energy maintenance.

It is crucial to point out in this article, triangular and Trapezius fuzzification, Mamdani inference and center of area defuzzification are used.

5 Simulation

The proposed MCFL algorithm is compared with LEACH, CHEF, EAUCF, Fuzzy Logic [15], MOFCA, and DUCF. With the exception of LEACH, all these methods are fuzzy clustering algorithms.

The comparison is drawn in three scenarios and the simulating parameters are included in each of them. On the other hand, factors such as the total remaining energy of the network (TRE), the number first node dies in each round (FND), HND, and LND are compared in each scenario.

5.1 Scenario 1

In the first scenario different methods are evaluated according to simulating parameters presented in Table 3.

Table 3 Parameters for Scenario 1

Here BS is located at the center of ROI. This network space is shown in Fig. 8.

Fig. 8
figure 8

AOI in Scenario 1

The first factor that is examined in this scenario is the remaining energy of the network as presented in Fig. 9. Compared to other methods, the proposed algorithm (MCFL) enjoys higher overall energy. The reason is the reduction of sent and received messages and the subsequent reduction of energy of each node. The proposed algorithm was able to achieve this by reducing the number of selection rounds.

Fig. 9
figure 9

Total remaining energy of the methods in each round

The second analyzed parameter is the number of dead nodes in each round. Figure 10 shows the number of dead nodes in each method.

Fig. 10
figure 10

The number of dead nodes of each method in each round

Determining the number of dead nodes in each method in each round shows that the proposed method (MCFL) has fewer dead nodes than other methods. The most important reason is that the proposed method enjoys higher remaining energy compared to other methods.

The third analyzed parameter is the first node die (FND). Figure 11 illustrates the number of rounds in which different methods lost their first node.

Fig. 11
figure 11

The first node die in each round

In the proposed method it is possible that after selecting a node as the cluster head in the first round, the same nodes (if they are alive) are selected as cluster heads in the second round. It is even possible that because these nodes remain suitable, the same ones are selected as cluster heads in the third round, leading to the premature death of these nodes because the energy in these nodes lessens more than in the rest of network nodes. Of course, selecting other nodes as cluster heads in subsequent rounds lessens nodes’ energy depletion. That is why although the comparison of FND of the proposed method with other methods does not yield the ideal results, it is still in a better condition.

The nest parameters are HND and LND which are shown in Figs. 12 and 13, respectively.

Fig. 12
figure 12

Comparison of HND

Fig. 13
figure 13

Comparison of LND

As it was mentioned in the previous, the proposed method is focused on selecting the best cluster heads and reducing the energy consumed by the cluster heads. On the other hand, selecting other nodes as cluster head in next rounds prevents dramatic energy reduction, leading to increasing energy saving capacities in middle and final rounds. Comparing HND and LND parameters confirms these findings.

5.2 Scenario 2

In the second scenario comparisons are made based on parameters simulated in Table 4.

Table 4 Parameters for Scenario 2

In this scenario, BS is located over ROI, and the network space is shown in Fig. 14.

Fig. 14
figure 14

AOI in Scenario 2

As in the previous scenario the remaining energy is examined as the first factor. Figure 15 illustrates the diagram of energy reduction of each of the methods in this scenario. Here, too, the proposed algorithm (MCFL) enjoys higher total energy compared to other methods. Again the reason for this is that the reduction in the number of sent and received messages and the subsequent energy reduction in each node. Decreasing selection phases is the strong point of the proposed method.

Fig. 15
figure 15

Total remaining energy of the methods in each round

The second examined parameter is the number of dead nodes in each round. Figure 16 shows the number of dead nodes in each method.

Fig. 16
figure 16

Comparison of the number of dead nodes of each method in each round

Examining the number of dead nodes of each method in this scenario shows that, compared to other methods, the proposed method (MCFL) enjoys fewer dead nodes. The most important reason for this, pretty much like in the previous scenario, is that the proposed method enjoys higher levels of remaining energy than other methods.

The third examined parameter is FND as illustrated by Fig. 17.

Fig. 17
figure 17

The first node die in each method

As in the first scenario, FND does not fare better than other parameters. As it was mentioned earlier, since in the proposed scenario cluster heads perform their duty in two or three consecutive rounds, they waste more energy than other nodes which leads to producing the first node die. Although compared to other methods FND is in a better condition, it is not ideal.

The nest parameters are HND and LND which are presented in Figs. 18 and 19.

Fig. 18
figure 18

Comparison of HND

Fig. 19
figure 19

Comparison of LND

It is shown that by relying on the selection of the best nodes in each round, the proposed method has been able to improve HND and LND. Despite the fact that MCFL causes node energy reduction by selecting several nodes as cluster heads which last for at least two rounds, in the next rounds, by selecting other nodes as cluster heads, it causes considerable reduction of energy consumption by cluster heads and saves more energy in middle and final rounds This is verified by comparing HND and LND of the proposed method.

5.3 Scenario 3

In the third scenario, different methods are evaluated based on simulating parameters presented in Table 5.

Table 5 Parameters for Scenario 3

Here, BS is located at the corner of ROI, and this network space is presented in Fig. 20.

Fig. 20
figure 20

AOI in the third scenario

As in the two previous scenarios, the first examined factor is network total energy which is shown in Fig. 21. It is shown that the proposed algorithm (MCFL) in this scenario enjoys higher total energy than other methods. Once again, the main reason is the reduction of the number of selections and the consequent reduction of messages and saving more energy.

Fig. 21
figure 21

Total remaining energy of methods in each round

The second examined parameter is the number of dead nodes in each round. Figure 22 shows the number of dead nodes of each method.

Fig. 22
figure 22

Comparison of number of dead nodes of each method in each round

The comparison indicates that the proposed method (MCFL) has lesser number of dead nodes than other methods. Saving more intra-network energy is main reason behind this condition.

The third examined parameter is FND. Figure 23 refers to that stage in which the first node of each method exits the network.

Fig. 23
figure 23

The first dead node of each method

As it was said about previous scenarios, when compared to other methods, the MCFL algorithm does not have a promising start, something that leads to a reduction in the amount of FND. Contrary to two former scenarios, the FND does not enjoy a better condition relative to other methods. It could just be said that it is suitable.

Next parameters are HND and LND which are shown in Figs. 24 and 25, respectively.

Fig. 24
figure 24

Comparison of HND parameter

Fig. 25
figure 25

Comparison of LND parameter

By relying on selecting the best nodes as cluster heads and trusting them for several rounds, the proposed methods reduces the number of transmitted messages, accounting for higher energy maintenance especially during the middle and final stages. The comparison of parameters such as HND and LND of the proposed method verifies the same issue.

To analyze the proposed method three scenarios are presented. There are different functions available to wireless sensor networks. In one of these, the sink or the base station is located at the center of the area. In some other functions, the base station is located at the fringes or even outside AOI area. Since the number of neighboring nodes affects cluster head selection, therefore the number and distribution of sensor nodes, together with the position of the base station in AOI area, are taken into consideration. It is possible to analyze the algorithm performance in two parts. First, the time of the first node die, and second, the time of death of half of nodes. The function in which the nodes are closer to the base station and enjoy relatively good number of neighbors, the algorithm in both sections of the analysis manifested better performance relative to other scenarios (the first and the second scenarios). But as soon as the distance from the base station increases and the number of neighbors reaches its minimum, the algorithm does not perform well in the first part and the nodes far from the base station die soon. After the death of distant nodes, the nodes which are closer to the base station will remain. Therefore, the algorithm functions similar to the first and the second scenarios, and will compensate for the premature death of nodes by prolonging network lifetime. In functions where the base station is located far from the nodes and FND is the object of analysis, the proposed algorithm is not recommended. But for functions where the base station is near to nodes and either HNA or LND are the objects of analysis, the proposed algorithm is recommended for clustering.

6 Conclusion

This article presents a multiclustering algorithm based on fuzzy logic to lessen energy consumption in wireless sensor network nodes. The MCFL algorithm clusters sensor nodes in different rounds using different clustering algorithms, and without selecting any nodes as cluster heads in some rounds, it has been able to reduce the number of transmitted messages from each node to other nodes and to the base station, saving more energy in the network. This algorithm has been compared to some other algorithms in three scenarios. Simulation results show the reduction of energy consumption and saving more energy within the network. Since selecting cluster heads in MCFL algorithm is avoided in some specified stages, it is possible to increase the number of stages in which cluster head selection is avoided by considering a threshold, and to extend the second clustering algorithm to continue in more stages. The researches pay due attention to this issue and will benefit from it in future works.