You are on page 1of 7




Fuzzy-Logic-Based Clustering Approach for Wireless Sensor Networks Using Energy Predication
Jin-Shyan Lee, Senior Member, IEEE, and Wei-Liang Cheng

Abstract In order to collect information more efciently, wireless sensor networks (WSNs) are partitioned into clusters. Clustering provides an effective way to prolong the lifetime of WSNs. Current clustering approaches often use two methods: selecting cluster heads with more residual energy, and rotating cluster heads periodically, to distribute the energy consumption among nodes in each cluster and extend the network lifetime. However, most of the previous algorithms have not considered the expected residual energy, which is the predicated remaining energy for being selected as a cluster head and running a round. In this paper, a fuzzy-logic-based clustering approach with an extension to the energy predication has been proposed to prolong the lifetime of WSNs by evenly distributing the workload. The simulation results show that the proposed approach is more efcient than other distributed algorithms. It is believed that the technique presented in this paper could be further applied to large-scale wireless sensor networks. Index Terms Cluster head selection, energy predication, fuzzy reasoning, wireless sensor networks.

I. I NTRODUCTION N THE past years, there have been increasing advances in digital electronics, semiconductor manufacturing technology, and wireless communications leading to the development of low-power, low-cost, and small-size devices with embedded sensing, computing, and communication capabilities. A wireless sensor network (WSN) is composed of hundreds or even thousands of such sensor devices which use radio frequencies to perform distributed sensing tasks [1][6]. In general, since these sensor devices are equipped with non-rechargeable batteries, energy efciency is a major design issue in order to increase the life-time of sensor networks. Cluster-based design is one of the approaches to conserve the energy of the sensor devices since only some nodes, called cluster heads (CHs), are allowed to communicate with the base station. The CHs collect the data sent by each node in that cluster, compress it, and then transmit the aggregated
Manuscript received January 17, 2012; revised April 19, 2012; accepted May 31, 2012. Date of publication June 13, 2012; date of current version August 1, 2012. This work was supported by the National Science Council (NSC), Taiwan, under Grant NSC 100-2221-E-027-010 and Grant NSC 992221-E-027-102. The associate editor coordinating the review of this paper and approving it for publication was Prof. Ralph Etienne-Cummings. The authors are with the Department of Electrical Engineering, National Taipei University of Technology, Taipei 10608, Taiwan (e-mail:; Color versions of one or more of the gures in this paper are available online at Digital Object Identier 10.1109/JSEN.2012.2204737

data to the base station. The representative design is low-energy adaptive clustering hierarchy (LEACH) protocol [7], [8], which uses a pure probabilistic model to select CHs and rotates the CHs periodically in order to balance energy consumption. However, in some cases, inefcient CHs can be selected. Because LEACH depends on only a probabilistic model, some cluster heads may be very close each other and can be located in the edge of WSNs. These inefcient cluster heads could not maximize the energy efciency. Appropriate cluster-head selection can signicantly reduce energy consumption and prolong the lifetime of WSNs. Some of the clustering algorithms employ fuzzy logic to handle uncertainties in WSNs. Generally, fuzzy clustering algorithms use fuzzy logic for blending different clustering parameters to select cluster heads. To overcome the defects of LEACH, Gupta et al. [9] proposed to use three fuzzy descriptors (residual energy, concentration, and centrality) during the cluster-head selection. The concentration means the number of nodes present in the vicinity, while the centrality indicates a value which classies the nodes based on how central the node is to the cluster. In every round, each sensor node forwards its clustering information to the base station at which the CHs are centrally selected. However, this mechanism is a centralized approach. Kim et al. [10] proposed a similar approach (namely CHEF: Cluster Head Election mechanism using Fuzzy logic), but in a distributed manner by using two fuzzy descriptors (residual energy and local distance). The local distance is the total distance between the tentative CH and the nodes within predened constant competition radius. Hence, the base station does not need to collect clustering information from all sensor nodes. Moreover, since selecting the cluster head is not easy in different environments which may have different characteristics, Anno et al. [11] employed different fuzzy descriptors, including the remaining battery power, number of neighbor nodes, distance from cluster centroid, and network trafcs, and evaluated their performance. The sensor nodes closer to the base station consume much more energy due to the increased network trafc near the base station. Hence, the sensor nodes closer to the base station quickly run out of battery. Besides the residual energy, Bagci et al. [12] further considered a fuzzy descriptor, distance to the base station, during the cluster head selection. This unequal clustering approach is based on the idea of decreasing the cluster sizes when getting close to the base station.

1530437X/$31.00 2012 IEEE



Based on LEACH, most existing fuzzy clustering approaches [9][15] considered the residual energy of sensor nodes during the CH selection. However, the remaining energy after being selected as a CH and running a round has never been discussed. A round refers to the interval between two consecutive cluster formation processes. In this paper, a fuzzylogic-based clustering approach with an extension to the energy predication has been proposed to prolong the lifetime of WSNs by evenly distributing the workload. In addition to the residual energy, the expected residual energy (ERE) has been introduced to act as a fuzzy descriptor during the on-line CH selection process. In order to estimate the ERE, the expected energy consumption (EEC) is required. In our work, the EEC would be quickly calculated via an off-line trained neural network model. The proposed approach adopts the LEACH architecture with an extension to the energy predication based on the ERE, and thus the approach is named LEACH-ERE. To the best of our knowledge, it is the rst time that expected/estimated remaining energy is used in clusterhead selection for wireless sensor networks. The rest of this paper is organized as follows. Section II briey introduces the predication of the energy consumption scheme. Next, a fuzzy-logic-based clustering approach is proposed in Section III. Then, in Section IV, an example of a 100-node wireless sensor network is provided to evaluate the proposed approach. Finally, Section V concludes this paper. II. P REDICATION OF THE E NERGY C ONSUMPTION A. LEACH Clustering Algorithm LEACH [7], [8] is one of the clustering mechanisms to achieve the energy efciency in the communication between sensor nodes. The operation of LEACH is divided into rounds. Each round begins with a set-up phase when the clusters are organized, followed by a steady-state phase when data are transferred from the nodes to the CH and on to the base station. LEACH forms clusters by using a distributed algorithm, where nodes make autonomous decisions without any centralized control. Each node i elects itself to be a CH at the beginning of round r + 1 (which starts at time t) with probability Pi (t). Pi (t) is chosen such that the expected number of CHs for this round is k. If there are N nodes in the network, each node would choose to become a CH at round r with the probability as (1). k : Ci (t) = 1 N Pi (t) = NK r mod K (1) 0 : Ci (t) = 0 where Ci (t) is the indicator function determining whether or not node i has been a CH within the most recent (r mod N/K ) rounds (Ci (t) = 0 means node i has been a CH). Thus, only nodes that have not already been CHs recently (i.e. Ci (t) = 1) may become CHs at round r + 1. B. Radio Energy Dissipation Model Currently, there is a great deal of research in the area of lowenergy radios. In this paper, the rst-order radio model shown in [16] has been adopted to model the energy dissipation.

Set-up Phase Clusters formed

Steady-state Phase

Slot for node i Frame

Fig. 1.

Cluster formation and operation.

As the distance between the transmitter and receiver is less than a threshold value d0 , the free space model (d 2 power loss) is employed. Otherwise the multipath fading channel model (d 4 power loss) is used. Equation (2) shows the amount of energy consumed for transmitting l bits of data to d distance, while (3) represents the amount of energy consumed for receiving l bits of data. E Tx (l, d) =
Tx l E elec + l fs d 2 , d < d0 Tx l E elec + l mp d 4 , d d0

(2) (3)

Rx E Rx (l) = l E elec

Tx Rx E elec and E elec are the energy consumption per bit in the transmitter and receiver circuits. Also, fs and mp are the energy consumption factor of amplication for the free space and multipath radio models, respectively. The threshold value d0 could be obtained via (4).

d0 = C. Expected Residual Energy

fs . mp


Before the cluster formation, the number of cluster members is unknown. However, since it is proportional to the number of neighbors near a potential CH (in a specic transmission range), the number of neighbors (dened as value n) could be used to obtain the expected energy consumption during the CH selection. As shown in Fig. 1, after the cluster formation, the steady-state operation is broken into frames, where nodes send their data to the CH at most once per frame during their allocated transmission slot. In a frame, suppose a CH has n cluster members, it would receive n messages from all the members and then transmit one combined message to the base station with a distance dtoBS . The number of frames could be obtained by (5). tssPhase (5) Nframe = n t slot + tCHtoBS where tssPhase is the operation time of the steady-state phase (i.e. the time of a node to be a CH), tslot is the slotted time required for the transmission from members to the CH, and tCHtoBS is the time required for the transmission from CH to the base station. The expected consumed energy of a node to be a CH after a steady-state phase could be represented as (6). E expConsumed(l, dtoBS , n) = Nframe E Tx (l, dtoBS ) +n E Rx (l) . (6) All the sensor nodes are assumed to transmit and receive the same size of messages, i.e. l bits of data. The distance to the



Data size (l) Distance ( Neighbors (n) )

Radio Energy Dissipation Model


Fuzzy Inference System

Residual Energy ( )


Inference Engine


Fuzzy Rule Base

Fig. 2.

Proposed scheme of the probability reasoning during cluster head selection.

Fig. 3.

Fuzzy set for input variable. (a) Residual energy. (b) Expected residual energy.

base station, dtoBS , could be computed based on the received signal strength. Then, the expected residual energy of a node to be a CH after a steady-state phase could be obtained via (7). E expResidual(l, dtoBS , n) = E residual E expConsumed (7)

5) The radio link is symmetric such that energy consumption of data transmission from node A to node B is the same as that of transmission from node B to node A. B. Handing Uncertainties Using Fuzzy Inference Systems To handle uncertainties, this paper has used fuzzy inference systems (FIS) for the chance computation of each node. As show in Fig. 2, two input variables for the FIS are the residual energy E residual and the expected residual energy E expResidual, and one output parameter is the probability of a node to be selected as a CH, named chance. The bigger chance means that the node has more chance to be a CH. The fuzzy set that describes the residual energy input variable is depicted in Fig. 3(a). The linguistic variables for this fuzzy set are high, rather high, medium, rather low, low, and very low. A trapezoidal membership function is used for high and very low, while a triangular membership function is used for the rest linguistic variables. The other fuzzy input variable is the expected residual energy of the CH candidate. The fuzzy set that describes expected residual energy input variable is illustrated in Fig. 3(b). The linguistic variables of this fuzzy set are high, medium and low. A trapezoidal membership function is used for high and low, while a triangular membership function is used for medium. The only fuzzy output variable is the chance of a CH candidate. The fuzzy set for the chance output variable is demonstrated in Fig. 4. Seven linguistic variables are very high, high, rather high, medium, rather low, low, and very low. The very high and very low have a

where the E residual is the residual energy of a sensor node before the cluster head selection. III. P ROPOSED C LUSTERING A PPROACH A. System Assumptions This paper considers network applications in which sensor nodes are deployed randomly in order to continuously monitor the environment. The information collected by sensor nodes is sent to a base station located outside of the deployment eld. Each sensor nodes can operate either in sensing mode to monitor the environment parameters and transmit it to the associated CH or in CH mode to gather data, compress it and forward to the base station. In addition, some assumptions are made as follows: 1) All sensor nodes and the base station are stationary after deployment. 2) The network is considered homogeneous and all sensor nodes have the same initial energy. 3) Nodes have the capability of controlling the transmission power according to the distance of receiving nodes. 4) The distance between nodes can be computed based on the received signal strength.



Algorithm 1 Proposed Clustering Algorithm

Input: N: a network a : a node of N V: {v | v is as vicinity node which is a CH candidate} T: a threshold value to become a CH candidate chance(a): a suitability value of the node a to be a CH k: the number of clusters r: the number of times to be a CH Output: CH(a): the cluster head of the node a isClusterHead(a): true if CH(a)=a Function: broadcast(data, distance); send(data, destination); fuzzylogic( , Initialization: 1. chance(a) fuzzylogic( 2. isClusterHead(a) = false; 3. r Main: 4. /* for every clustering round */ ) 5. if (r == 6. isClusterHead(a) false; 7. T 1; 8. else T ; 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. end if if (rand(0,1) > T ) CH(a) a ; chance(a) fuzzylogic( , ); broadcast(chance(a), V); //Candidate-Message On receiving Candidate-Messages from CH candidates; for each v V if (chance(a) < chance(v) ) CH(a) v ; isClusterHead(a) false; broadcast(Quit-Election-Message, V) else isClusterHead(a) true; ; end if end if if (isClusterHead(a) == true) broadcast(CH-Message, V) On receiving JOIN-REQ messages; else On receiving CH-Message; Send JOIN-REQ messages to the closest CH; end if

Fig. 4.

Fuzzy set for output variable chance. TABLE I F UZZY M APPING RULES

); , );

trapezoidal membership function, and the remaining linguistic variables are represented by using triangular membership functions. In this work, for simplicity and reducing the cost of computation, the triangular membership functions are mostly chosen here. The chance calculation is accomplished by using predened fuzzy if-then mapping rules to handle the uncertainty. Based on the two fuzzy input variables, 18 fuzzy mapping rules are dened in Table I. From the fuzzy rules, we can get the fuzzy variable chance. This fuzzy variable has to be transformed to a single crisp number that is a form we can use in practice. In our approach, the center of area (COA) method is used for defuzzication of the chance. Generally, fuzzy rules can be generated either from heuristics or from experimental data. In this paper, the heuristic fuzzy rule generation method is used with the principle: A node which holds more residual energy and more ERE has a higher probability to become a CH. C. Proposed LEACH-ERE Clustering Algorithm Similar to the LEACH, our proposed clustering method congures clusters in every round. The pseudo code of the clustering method is described as Algorithm 1. In every

clustering round (lines 4-30), each sensor node generates a random number between 0 and 1. If the random number for a particular node is bigger than a predened threshold T , which is the percentage of the desired tentative CHs, the node becomes a CH candidate. Then, the node calculates the chance using the fuzzy inference system which is mentioned above and broadcasts a Candidate-Message with the chance. This message means that the sensor node is a candidate for CH with the value of chance. Once a node advertises a Candidate-Message, the node waits Candidate-Messages from other nodes. If the chance of itself is bigger than every chance values from other nodes, the sensor node broadcasts a CH-Message which means that the sensor node itself is



Number of Alive Nodes

TABLE II C ONFIGURATION PARAMETERS Type Parameter Number of nodes Expected number of clusters Network coverage Base station location Startup energy Tx Rx E elec /E elec fs mp Simulation times Packet header size Broadcast packet size Data packet size Competition radius Bandwidth Value 100 5 (0, 0) (100, 100) m at (50, 175) m 2J 50 nJ/bit 10 pJ/bit/m2 0.0013 pJ/bit/m4 15 25 bytes 16 bytes 500 bytes 25 m 1 Mb/s

100 90 80 70 60 50 40 30 20 10 0 0 100 0 200 300 400 500 600




Network topology


Radio model

Num mber of Rounds

Fig. 6. Distribution of alive sensor nodes according to the number of rounds.


The Round at which Half of the Nodes Alive (HNA) 600 500 400 300 200 100 0 LEACH LEACH-C CHEF LEACH-ERE

Fig. 5. Round at which half of the nodes alive for each clustering approaches. Fig. 7. Distribution of the number of clusters according to the number of rounds. TABLE III AVERAGE AND S TANDARD D EVIATION OF THE N UMBER

elected as the CH. If a node which is not a CH receives the CH-Message, the node selects the closest cluster head as its CH and sends a JOIN-REQ request to the head. IV. P ERFORMANCE E VALUATION In this section, we present the results of experimental simulations to evaluate our proposed approach. Moreover, we compare our proposed clustering algorithm LEACH-ERE with three different algorithms, namely LEACH [8], LEACHCentralized [8], and CHEF [10]. Simulation results have shown that our approach reveals better performances compared with others. A. Simulation Environments The simulation was implemented based on the network simulator, NS-2 [17]. The 100 number of nodes are randomly distributed in a 100 100 area. The base station located at a point (50, 175). The values used in the rst order radio model are described in Table II. B. Simulation Results Handy et al. [18] proposed the metric Half of the Nodes Alive (HNA) which denotes an estimated value for the round in which half of the senor nodes die. This metric is useful in densely deployed sensor networks. As shown in Fig. 5, our proposed LEACH-ERE approach outperforms LEACH and CHEF. LEACH-ERE is more efcient than LEACH about 42.61% and CHEF about 2.87%. LEACH performance is the

C LUSTERS U P TO ROUND 600 LEACH-C 4.7 1.03 CHEF 4.7 1.6 LEACH-ERE 4.7 1.58

LEACH Ave. Std. Dev. 4.2 2.11

poorest one, since it does not consider the residual energy level of sensor nodes during clustering. Moreover, the distributed LEACH-ERE has the similar performance as compared with the centralized LEACH-C. Fig. 6 illustrates the distribution of the alive sensor nodes with respect to the number of rounds for each algorithm. This gure clearly shows that our proposed approach is more stable than the other distributed clustering algorithms (LEACH and CHEF), because sensor node deaths begin later in LEACH-ERE and continue linearly until all sensor nodes die. As compared with the centralized clustering approach LEACH-C, the proposed approach has an approximated result without requiring global network knowledge. Fig. 7 shows the distribution of the number of clusters with respect to the number of rounds for each algorithm. LEACHC generates a constant number of clusters until around the round 560 while the numbers of clusters in LEACH, CHEF, and LEACH-ERE are varied. Table III shows the average and standard deviation of the number of clusters up to round 600. It is apparent that the number of clusters in LEACH-ERE is



Aver rage of Receive Packets per Second ed 140 0 120 0 100 0 80 0 60 0 40 0 20 0 0 LEACH LEACH-C C CHEF LEACH-ER RE

Fig. 8.

Average number of received packets per second at the base station.

steadier than that in other distributed clustering algorithms (LEACH and CHEF). LEACH uses a fully random approach to produce cluster heads, thus it results in a fairly variable number of clusters, although the expected number of cluster heads per round is deterministic. Fig. 8 shows the average number of received packets per second at the base station. Obviously, the centralized LEACH-C has the best performance since the base station receives the most information from the sensor nodes during the network lifetime. On the other hand, the proposed distributed LEACH-ERE has the better result as compared with the LEACH and CHEF. V. C ONCLUSION Energy is a major factor in designing WSNs. To achieve the energy efciency, many clustering algorithms are proposed and LEACH is the representative one. LEACH uses the probability model to distribute the concentrated energy consumption of the CHs. However, it depends on only a probability model and the energy efciency is not maximized. In this paper, a fuzzylogic-based clustering approach based on LEACH architecture with an extension to the energy predication has been proposed for WSNs, namely LEACH-ERE. The main objective of our algorithm is to prolong the lifetime of the WSN by evenly distributing the workload. To achieve this goal, we have mostly focused on selecting proper CHs from existent sensor nodes. LEACH-ERE selects the CHs considering expected residual energy of the sensor nodes. The simulation results show that the proposed LEACH-ERE is more efcient than other distributed algorithms, such as LEACH and CHEF. In this paper, the proposed LEACH-ERE algorithm is designed for the WSNs that have stationary sensor nodes. As a future work, it can be extended for handling mobile sensor nodes. Also, a further direction of this work will be to nd the optimal fuzzy set and to compare the enhanced approach with other clustering algorithms. ACKNOWLEDGMENT The authors would like to thank the editor and anonymous referees for their valuable comments to improve the quality of this paper. R EFERENCES
[1] J. Yick, B. Mukherjee, and D. Ghosal, Wireless sensor network survey, Comput. Netw., vol. 52, no. 12, pp. 22922330, Aug. 2008. [2] G. Anastasi, M. Conti, M. D. Francesco, and A. Passarella, Energy conservation in wireless sensor networks: A survey, Ad Hoc Netw., vol. 7, no. 3, pp. 537568, May 2009.

[3] L. Atzori, A. Ierab, and G. Morabito, The internet of things: A survey, Comput. Netw., vol. 54, no. 15, pp. 27872805, Aug. 2010. [4] J. S. Lee, A Petri net design of command lters for semi-autonomous mobile sensor networks, IEEE Trans. Ind. Electron., vol. 55, no. 4, pp. 18351841, Apr. 2008. [5] Z. Guo, M. C. Zhou, and L. Zakrevski, Optimal tracking interval for predictive tracking in wireless sensor network, IEEE Commun. Lett., vol. 9, no. 9, pp. 805807, Sep. 2005. [6] Z. Wang, L. Liu, M. C. Zhou, and N. Ansari, A position-based clustering technique for ad hoc intervehicle communication, IEEE Trans. Syst. Man Cybern. C Appl. Rev., vol. 38, no. 2, pp. 201208, Mar. 2008. [7] W. R. Heinzelman, A. Chandrakasan, and H. Balakrishnan, Energyefcient communication protocol for wireless microsensor networks, in Proc. IEEE Annu. Hawaii Int. Conf. Syst. Sci., Jan. 2000, pp. 3005 3014. [8] W. B. Heinzelman, A. P. Chandrakasan, and H. Balakrishnan, An application-specic protocol architecture for wireless microsensor networks, IEEE Trans. Wireless Commun., vol. 1, no. 4, pp. 660670, Oct. 2002. [9] I. Gupta, D. Riordan, and S. Sampalli, Cluster-head election using fuzzy logic for wireless sensor networks, in Proc. Annu. Conf. Commun. Netw. Services Res., 2005, pp. 255260. [10] J. Kim, S. Park, Y. Han, and T. Chung, CHEF: Cluster head election mechanism using fuzzy logic in wireless sensor networks, in Proc. Int. Conf. Adv. Commun. Technol., Feb. 2008, pp. 654659. [11] J. Anno, L. Barolli, A. Durresi, F. Xhafa, and A. Koyama, Performance evaluation of two fuzzy-based cluster head selection systems for wireless sensor networks, Mobile Inform. Syst., vol. 4, no. 4, pp. 297312, 2008. [12] H. Bagci and A. Yazici, An energy aware fuzzy unequal clustering algorithm for wireless sensor networks, in Proc. IEEE Int. Conf. Fuzzy Syst., Jul. 2010, pp. 18. [13] H. Ando, L. Barolli, A. Durresi, F. Xhafa, and A. Koyama, An intelligent fuzzy-based cluster head selection system for wireless sensor networks and its performance evaluation, in Proc. Int. Conf. Netw.Based Inform. Syst., Sep. 2010, pp. 5561. [14] G. Ran, H. Zhang, and S. Gong, Improving on LEACH protocol of wireless sensor networks using fuzzy logic, J. Inf. Comput. Sci., vol. 7, no. 3, pp. 767775, 2010. [15] J. Rathi and G. Rajendran, An enhanced LEACH protocol using fuzzy logic for wireless sensor networks, Int. J. Comput. Sci. Inf. Security, vol. 8, no. 7, pp. 189194, Oct. 2010. [16] T. Rappaport, Wireless Communications: Principles Practice. Englewood Cliffs, NJ: Prentice-Hall, 1996. [17] UCB/LBNL/VINT Network Simulator:NS-2. (2000) [Online]. Available: [18] M. J. Handy, M. Haase, and D. Timmermann, Low energy adaptive clustering hierarchy with deterministic cluster-head selection, in Proc. Int. Workshop Mobile Wireless Commun. Netw., 2002, pp. 368372.

Jin-Shyan Lee (M10SM11) received the B.S. degree in mechanical engineering from the National Taiwan University of Science and Technology, Taipei, Taiwan, in 1997, and the M.S. and Ph.D. degrees in electrical and control engineering from National Chiao Tung University, Hsinchu, Taiwan, in 1999 and 2004, respectively. He was a Visiting Researcher with the Department of Electrical and Computer Engineering, the New Jersey Institute of Technology, Newark, from 2003 to 2004. He was a Researcher with the Information and Communications Research Laboratory, Industrial Technology Research Institute from 2005 to 2009. Since August 2009, he has been an Assistant Professor with the Department of Electrical Engineering, the National Taipei University of Technology, Taipei, Taiwan. His current research interests include Petri nets, wireless sensor networks, remote monitoring and control, supervisory control, and hybrid systems. Dr. Lee was a recipient of the Early Career Award from the IEEE Industrial Electronics Society in 2010, the Youth Automatic Control Engineering Award from the Chinese Automatic Control Society in 2008, and the International Scholarship from the Society of Instrument and Control Engineers in 2004. He has served on various IEEE conferences as a technical program committee member and for several journals as an active reviewer.



Wei-Liang Cheng received the B.S. degree in electrical engineering from National Ilan University, Ilan, Taiwan, in 2009, and the M.S. degree in electrical engineering from the National Taipei University of Technology, Taipei, Taiwan, in 2011. His current research interests include hierarchy routing and clustering in wireless sensor networks.