INTERNATIONAL JOURNAL OF COMPUTERS COMMUNICATIONS & CONTROL ISSN 1841-9836, 9(4):419-429, August, 2014. Determining the State of the Sensor Nodes Based on Fuzzy Theory in WSNs M.S. Gharajeh Mohammad Samadi Gharajeh Department of Computer Engineering Tabriz Branch, Islamic Azad University Tabriz, Iran mhm.samadi@gmail.com Abstract: The low-cost, limited-energy, and large-scale sensor nodes organize wire- less sensor networks (WSNs). Sleep scheduling algorithms are introduced in these networks to reduce the energy consumption of the nodes in order to enhance the net- work lifetime. In this paper, a novel fuzzy method called Fuzzy Active Sleep (FAS) is proposed to activate the appropriate nodes of WSNs. It uses the selection probability of nodes based on their remaining energy and number of previous active state. The proposed method focuses on a balanced sleep scheduling in order to belong the net- work lifetime. Simulation results show that the proposed method is more efficient and effective than the compared methods in terms of average network remaining energy, number of nodes still alive, number of active state, and network lifetime. Keywords: wireless sensor networks (WSNs), fuzzy theory, sleep scheduling, energy consumption, network lifetime. 1 Introduction Wireless Sensor Networks (WSNs) organize a wireless network, where the sensors called nodes have basically some features such as low cost, limited energy, and large scalability [1]. A very large number of nodes are deployed in the network to sense and to transmit the environmental conditions or occurrence of the physical events. They are used in some applications such as traffic management, close-circuit camera in retail, seismic monitoring, and military usage. Organization of the nodes in a hierarchical topology, short length messages, short range of message transfer, and sleep scheduling of the nodes are some of the essential mechanisms to reduce the energy consumption of nodes in order to enhance the network lifetime [2]. The sleep scheduling categorizes the nodes into active or sleep states. A proper sleep schedul- ing method performs the scheduling operation in a way that maintains the connectivity among nodes and coverage of whole network. A sensor network is connected when each active node can transmit its data via one or multiple hops toward a specified center. Meanwhile, the coverage is specified as an area that can be accessed by active nodes. Both of the connectivity and coverage are the essential factors to monitor a given area that should be considered by the presented sleep scheduling methods. Fuzzy logic is utilized to develop some models such as physical tools, uncertain and complex systems, and non-linear processes. The fuzzy models can be easily understood, and have less external complexity with more useful features [3]. Furthermore, fuzzy controllers can take an appropriate decision even by imprecise and incomplete information. The linguistic terms and inexact data can be manipulated as a useful tool to design the uncertain systems. Therefore, the sleep scheduling can be designed and implemented by fuzzy decision making to give most advantageous in terms of connectivity, coverage, and network lifetime. The rest of this paper is organized as follows. The related works presented in section 2 discuss about some of the prior sleep scheduling methods. Section 3 describes the proposed fuzzy method by addressing the designated fuzzy system. Performance evaluation of the simulated methods is explained in section 4. Finally, the paper is concluded in section 5. Copyright © 2006-2014 by CCC Publications 420 M.S. Gharajeh 2 Related Works A sleep scheduling method for stationary nodes of WSNs is developed in [4] that utilize a discrete-time Markov chain (DTMC) model. It applies an analytical method using slotting the time according to the data unit transmission time in order to discover the trade-offs existing between energy conserving and system throughout metrics including network capacity, energy consumption, and data delivery ratio. Besides, the sensor nodes are considered as three opera- tional modes as transmit, receive, and idle to simply adapt them with various traffic conditions. An analytical method for the random scheduling algorithms is provided in [5] to derive the detection probability and detection delay. The simulation results are carried out with discrete event simulation to investigate the impact of number of subsets and number of sensor nodes on coverage intensity, detection probability, and detection delay. A random scheme for WSNs is also proposed in [6] that develop an analytical schema to investigate the relation between randomized sleep state and network throughout. A queue model for nodes and an efficiency framework for whole the network are included in the presented framework to derive the throughout, energy consumption, and delay time. Another randomized scheduling method is studied in [7] via analysis and simulations in aspects of detection probability, detection delay, and network coverage intensity. Furthermore, a problem of prolonging the network lifetime under Quality of Service (QoS) limitation such as bounded detection probability, detection delay, and network coverage intensity is analyzed by authors. An optimal sleep control mechanism is proposed in [8] to prolong the network lifetime with reducing the energy consumption of the nodes. It utilizes the proposed procedure by distance between the sensor nodes and the sink. Furthermore, energy of whole the network is balanced through reducing the number of transmissions related to the sensor nodes which are placed more close to the sink. In the method presented in [9], several characteristics of active/sleep model in WSNs are investigated. The main mechanism of this method to manage the nodes in an ON or OFF period is that the steady-state probability distribution of number of packets is derived in the reference node. Another method is presented in [10] that determine the active and sleep modes of the nodes as randomly or alternatively manner in a stochastic model of WSNs. The active mode is categorized as two phases as full active phase and semi-active phase to better manage the energy consumption of the nodes. This method evaluates the energy consumption of the network by developing the important analytical formulae. 3 The Proposed Method The main objective of the proposed method is to balance the energy consumption of the nodes in order to enhance the network lifetime. They are possible by activating and sleeping the appropriate nodes for a period time based on fuzzy decision making. If the nodes are activated based on a structural scheduling method, their energy are consumed in an equivalent flow so that the energy balance of the network will be considerably enhanced. If various types of the sensors such as temperature, smoke, and light intensity are used in the network, the proposed method will be applied within each category independently. The proposed fuzzy method called Fuzzy Active Sleep (FAS) operates based on fuzzy decision making. The whole network is divided to different areas so that only one node is activated in each area for a period time. It is worth noting that the number of divided areas is determined based on network size and number of nodes. A single sink is assumed in the centre point of network that determines the active nodes of the areas. Furthermore, it receives the environmental data from nodes, and forwards them to the base station. The reason is that all the nodes cannot directly transmit their data to the base station. An overview of the assumed network is shown in Figure 1, so that it is composed Determining the State of the Sensor Nodes Based on Fuzzy Theory in WSNs 421 of four areas included by three types of sensors as temperature, smoke, and light intensity. Figure 1: An overview of the assumed network There are some input and output variables in the fuzzy systems to make the fuzzy rules. The fuzzy rules are used in a fuzzy system to decide an appropriate action in the uncertain conditions. The input variables of the proposed fuzzy system are determined as follow; the first one is remaining energy of nodes (denoted by REi); the second one is the number of previous active state (denoted by ASi); here, ”i” refers to the number of existing nodes in the related area. The output variable is selection priority of the nodes (specified by SPi). Suppose for this work, REi and SPi take on following linguistic values: VL (very low), L (low), M (medium), H (high), VH (very high); and ASi take on the following linguistic values: FE (feeble), FW (few), ME (medium), MA (many), L (lots). Membership graph for the inputs and the output variables are depicted in Figure 2. Note that the membership functions of ASi are defined by Triangular [11] method, and membership functions of REi and SPi are determined by Bell-shaped [11] method. While there are two input variables as each one can accept five linguistic terms, total number of the fuzzy rules is 52 = 25. Some of the fuzzy rules used in the proposed fuzzy system are represented in Table 1. Note that the fuzzy rules are constructed by Mamdani-type fuzzy rule- based systems [12]. Meanwhile, all the fuzzy rules are aggregated together by OR operator to produce the total fuzzy rule. A Schematic of the fuzzy rules used in the proposed fuzzy system is shown in Figure 3 based on input and output variables. The appropriate node from among the nodes’ groups within each area is selected by sink 422 M.S. Gharajeh Figure 2: Membership graph for the inputs (remaining energy and number of active state) and the output (selection priority) Table 1: Some of the fuzzy rules used in the proposed fuzzy system Input variables Output variable Rule No. REi ASi SPi 1 VH FE VH 2 H FW H 3 M ME M 4 VH L L 5 H MA L 6 L L L 7 VL FW H 8 L FE H 9 M MA L 10 VH ME VL Figure 3: A schematic of the fuzzy rules used in the proposed fuzzy system Determining the State of the Sensor Nodes Based on Fuzzy Theory in WSNs 423 using the proposed method for a period time as described following. First, remaining energy of the nodes is converted to a fuzzy value by Bell-shaped membership function, and the number of active state at nodes is converted by Triangular membership function. Then, the fuzzy value of each node’s selection priority is determined by the approximate reasoning, total fuzzy rule, and the inputs’ fuzzy values. Finally, the output fuzzy value is converted to a crisp value by center-of-gravity [13] which is a defuzzification method as follows SPi = n∑ i=1 µsp(xi).xi n∑ i=1 µsp(xi) (1) Where n indicates the number of elements in the universe set of selection priority, xi represents each elements of the universe set, and µsp(xi) describes the membership degree of xi in the universe set. The node with highest crisp value is selected as active node, and other nodes are selected as sleep nodes. 4 Performance Evaluation The simulation processes are carried out in MATLAB. 40 sensor nodes are randomly deployed in a topographical area of dimension 200 m × 200 m. All nodes have the same initial energy 2J. The proposed method is compared to All Active method and Random Active Sleep method called "RAS" to evaluate them in terms of average network remaining energy, number of nodes still alive, and number of active state. Furthermore, impacts of the different experimental parameters such as interval time between data sense, interval time between sending data, and initial energy of nodes on the network lifetime are evaluated carefully. Note that all the nodes are always activated in the All Active method, and the active node is selected by a random procedure in the RAS. The active nodes transmit their environmental data to the sink in a specific interval time. Afterwards, the sink also transmits the aggregated data to the base station in a determined interval time. Note that the gathered data are aggregated by the sink as follows dAgg = n∑ i=1 di n (2) Where n indicates the number of data presented in the sink’s buffer and di refers to each data of the buffer. The simulation will be terminated when the remaining energy of all the nodes is under threshold energy. Note that the discrete simulation results are the average value of the results which are independently simulated for 10 times. The transmission and receiving energies are calculated based on the model expressed in [14]. According to this mode, for transmitting an l-bit data packet a long a distance d, the radio spends ETx(l, d) = { lEelec + lϵfsd 2 , d < d0 lEelec + lϵmpd 4, d ≥ d0 (3) Where d0 indicates a threshold distance, ϵfsd2 uses the free space (fs) model to calculate the amplifier energy, and ϵmpd4 utilizes the multipath (mp) model to estimate the amplifier energy. Meanwhile, the spending radio to receive this data packet is calculates as ERx(l) = lEelec (4) Note that the threshold energy to sense or to receive an l -bit data packet is calculated like ERx(l). The simulation parameters and their default values are represented in Table 2. 424 M.S. Gharajeh Table 2: Simulation parameters Parameter Value Topographical area (meters) 200 × 200 Sink location (meters) (100, 100) Location of base station (meters) (500, 500) Buffer size of the sink (Packet) 10,000 Buffer size of the base station (Packet) 10,000 Number of nodes 40 Initial energy of node 2 J Interval time between data sense (Round) 10 Interval time between sending data (Round) 5 Interval time between active sleep changes (Round) 25 Interval time between data transmission through the sink (Round) 20 Eelec 50 nJ/bit ϵfs 10 pJ/bit/m2̂ ϵmp 0.0013 pJ/bit/m4̂ 4.1 An Instance of Selecting the Active Node by the Proposed Fuzzy System As previously described, the active node is independently selected within each area. Selection priority is calculated for all the nodes presented in the areas; then, the node with the highest priority is activated for a period time. As represented in Table 3, if there are five nodes in a special area, selection priority is calculated based on their remaining energy and number of previous active state. Therefore, the node N4 which has the highest priority is selected as the active node for a period time. Table 3: An example of determining the selection priority for each node Input variables Output variable Node REi ASi SPi N1 2 11 44.913 N2 1.2 15 42.027 N3 0.3 5 50.843 N4 0.8 2 54.757 N5 1.6 8 48.058 4.2 Simulation Results Some of the continuous simulation results of the evaluated methods are shown in Figure 4 in terms of average network remaining energy and number of nodes still alive. These parameters illustrate the lifetime status of network under the situations represented in Table 3. As shown in the results, the network lifetime obtained by the All Active method is 2,560 Round, by the RAS method is 9,125, and by the proposed method is 9,440. As it has been expected, the lifetime in the All Active is very low; but it is near to each other in the RAS and FAS methods. However, the average network energy and number of live nodes in the proposed method is higher than that of RAS due to balance the active state of the nodes. Average network remaining energy are Determining the State of the Sensor Nodes Based on Fuzzy Theory in WSNs 425 calculated in each round as follows RemAvg = n∑ i=1 Reme(i) n (5) Where n indicates the number of nodes and Reme(i) represents the remaining energy at each node "i". Simulation results demonstrate that the average network remaining energy and the number of nodes still alive achieved by the proposed method could be increased by about 700% more than that obtained by the All Active method and by about 10% more than that obtained by the RAS method. Figure 4: Lifetime status of the network in a simulation execution based on various methods The number of dead nodes is calculated according to Algorithm 1 in each round. If it equals to the number of nodes, the simulation process will be terminated. Note that the number of last round is known as network lifetime. Number of active state at nodes is one of the most important factors in the sleep scheduling methods. A good method tries to balance this factor in order to enhance the network lifetime. As shown in Figure 5, the number of active state in the All Active method has a stationary 426 M.S. Gharajeh high value due to activate all the nodes in all the active/sleep selection rounds. Moreover, this value in the proposed method is more balance than that of the RAS method. The reason is that selecting the active and sleep nodes is determined based on remaining energy of nodes and number of previous active state that leads to balance the final number of active state. Note that the number of active state at each node increases when it is selected as the active node for a period time. Figure 5: Number of active state at nodes under various methods The statistical results of the active state at nodes are represented in Table 4. The four famous statistical functions including Minimum, Maximum, Mode, and Standard Deviation are used to determine the detailed information. The Minimum and Maximum functions specify the range of all the numbers sets. The Mode function represents the most frequently occurring, or repetitive, number of active state at all the numbers sets. Meanwhile, the Standard Deviation function specifies a measure of how widely numbers are dispersed from the average number so that it can be calculated as follows Stddev = √√√√√ n∑i=1 (xi − x̄)2 n − 1 (6) Where n indicates the number of nodes, xi represents the number of active state at node "i", and x̄ specifies the average value of all the numbers. The values calculated by various statistical functions represents that the proposed method is more efficient and balance than both of the other methods. Table 4: The statistical values of the active state at nodes under various methods Method Statistical function All Active RAS FAS Minimum 120 26 36 Maximum 120 47 45 Mode 120 31 37 Standard Deviation 0 5.44 2.48 Determining the State of the Sensor Nodes Based on Fuzzy Theory in WSNs 427 (a) Interval time between data sense (b) Interval time between sending data (c) Initial energy Figure 6: Network lifetime achieved by different methods under various parameters 428 M.S. Gharajeh Some parameters such as interval time between data sense, interval time between sending data, and initial energy influences strongly on the network lifetime. When each of these param- eters increases, the network lifetime will be considerably enhanced. The interval time between data sense determines a period time to sense the environmental conditions by nodes. Meanwhile, the interval time between sending data specifies a period time to transmit the sensed data to the sink. Affection of them on the various methods is illustrated in Figure 6. As shown in the results, the All Active method has the network lifetime very lower than others. Besides, the proposed method surpasses the RAS method under various parameters changes. The reason is that some of the nodes are activated more than other nodes in the RAS method so that the energy consumption of the nodes is unbalanced. The unbalanced energy consumption of nodes causes the network lifetime to be lower than the proposed method. In addition, the energy efficiency of the network can be specified based on total energy consumption of the nodes which is calculated as follows Te = n∑ i=1 Conse(i) (7) Where n indicates the number of nodes and Conse(i) represents the energy consumption of each node "i". Note that the above formulae can be used to determine the energy consumption of the nodes both in each round and whole the network. 5 Conclusions Wireless Sensor Networks (WSNs) are composed of some large-scale, low-cost, and limited- energy sensor nodes. The sleep scheduling methods presented in the WSNs cause the network lifetime to be considerably enhanced. In this paper, a novel fuzzy method called Fuzzy Active Sleep (FAS) proposed to select the appropriate node in each desired area to be activated for a period time. It selects the active node from among the related nodes based on their remaining energy and number of previous active state. Selection procedure of the active nodes is balanced by the proposed method that leads the network lifetime to be enhanced. Simulation results represent that the proposed method surpasses the other compared methods in aspects of aver- age network remaining energy, number of nodes still alive, number of active state, and network lifetime. Bibliography [1] Stankovic, J.A. (2008); Wireless sensor networks, Computer, ISSN 0018-9162, 41(10): 92-95. [2] Zhang, P. et al (2013); Clustering algorithms for maximizing the lifetime of wireless sensor networks with energy-harvesting sensors, Comput Netw, ISSN 1389-1286, 57(14): 2689-2704. [3] Cerami, M.; Straccia, U. (2013); On the (un)decidability of fuzzy description logics under Lukasiewicz t-norm, Inform Sciences, ISSN 0020-0255, 227: 1-21. [4] Chiasserini, C.F.; Garetto, M. (2004); Modeling the performance of wireless sensor networks, Proc. IEEE Infocom ser, ISSN 0743-166X, 220-231. [5] Xiao, Y. et al (2007); Modeling detection metrics in randomized scheduling algorithm in wireless sensor networks, Proc. IEEE WCNC, ISSN 1525-3511, 3741-3745. Determining the State of the Sensor Nodes Based on Fuzzy Theory in WSNs 429 [6] Liu, J. et al (2010); Analysis of random sleep scheme for wireless sensor networks, Interna- tional Journal of Sensor Networks, ISSN 1748-1279, 7(1): 71-84. [7] Xiao, Y. et al (2010); Coverage and detection of a randomized scheduling algorithm in wireless sensor networks, IEEE T Comput, ISSN 0018-9340, 59(4): 507-521. [8] Keh, H.C. et al (2011); Power saving mechanism with optimal sleep control in wireless sensor networks, Tamkang J. Sci. Eng, ISSN 1560-6686, 14(3): 235-243. [9] Li, W.W. (2011); Several characteristics of active/sleep model in wireless sensor networks, Proc. IEEE NTMS’4, ISSN 2157-4952, 1-5. [10] Zhang, Y.; Li, W. (2012); Modeling and energy consumption evaluation of a stochastic wireless sensor network, Eurasip J Wirel Comm, ISSN 1687-1499, 2012(1): 1-11. [11] Zhao, J.; Bose, B.K. (2002); Evaluation of membership functions for fuzzy logic controlled induction motor drive, Proc. IEEE IECON’2, 1: 229-234. [12] Alcalá, R. et al (1999); Approximate Mamdani-type Fuzzy Rule-Based Systems: Features and Taxonomy of Learning Methods, Citeseer, Technical Report DECSAI-990117, pp.1-23. [13] Runkler, T.A. (1997); Selection of appropriate defuzzification methods using application specific properties, IEEE T Fuzzy Syst, ISSN 1063-6706, 5(1): 72-79. [14] Heinzelman, W.B. et al (2002); An application-specific protocol architecture for wireless microsensor networks, IEEE T Wirel Commun, ISSN 1536-1276, 1(4): 660-670.