Maximization Lifetime in Wireless Sensor Network by Fuzzy Logic for Cluster Head Selection

: Lifetime enhancement has always been of crucial importance for energy constrained sensor network due to resource limitations of sensor nodes. The energy of sensor nodes is mostly utilized for data transmission to the base station. clustering which could increase the network life time indirectly; so, various algorithms have been proposed for clustering and cluster-head selection


Introduction
In recent years, with technology development, wireless Sensor Networks (WSNs) have been used in various applications. WSN consist of hundreds or thousands tiny sensor nodes Recent advancements in WSNs are predominantly motivated by developments in the micro electromechanical systems (MEMS) technology [1]. For example, the wireless sensor networks (WSNs) is a sort of collection that includes many wireless nodes containing one or more electromechanical sensors [2]. These nodes are inter-connected to perform special function or determined work. The aggregation of wireless sensors allows them to have corporation with the physical world and data collecting, using On-board sensors. Wireless sensor network can also be deployed into a forest for fire detection. Some researchers have suggested that wireless sensor network can also be used for earth quake monitoring, pollution control and flood detection. Wireless sensor network may be used for measurement of environment conditions like relative humidity, temperature etc. Wireless sensor network are useful in military applications. We can track any target using sensor network. Wireless sensor network is also used in healthcare applications. Another important application of wireless sensor network is for monitoring of nuclear power stations. The sensor nodes have limited energy resources which are sometimes non chargeable; therefore, in wireless sensors we should use the methods which could increase the energy consumption [3]. The data that is received by the nodes should be delivered to Base Station in order to get processed and also to make the proper decision. Clearly, much energy is needed for any node to deliver it's own data, directly, to the base station. Many studies and researches conducted in this field show that the clustering and cluster-head selection could have an effective role in controlled energy consumption in nodes and therefore to increase the network life time [4] [5] [6].
The network lifetime is considered as the number of cycles in which the first node energy loosing is occurred (the node would die) and we could increase the network lifetime implementing the fuzzy logic [7].
The clustering strategy allows us to be flexible in order to reach our goals, for instance in energy consumption economy, wireless sensor networks lifetime increase and nodes variation decrease to get connected to the base station. Each node, considering the cluster in which it exists, selects a path with the shortest distance to the cluster-head in order to transform the data to the cluster-head and as a result the message could be delivered to the cluster-head indirectly and with less energy consumption [8]. Furthermore, the distance between the cluster-head and the node is a factor which may be effective in energy consumption and network lifetime. In our presented method, several operative parameters are implemented to s elect the cluster and fuzzy logic. In order to select the cluster-head, we use the fuzzy logic because a fuzzy system works well toward the heterogeneous entrances (including: number of the neighbors, centrality, energy, number of the cycles in which the node is not cluster-head, the signal frequency received from the neighbors and …), and also a fuzzy system does not need to the computational complexity and therefore the fuzzy logic is very considerable for the wireless sensor networks. In following, we review the works performed and next we will investigate the fuzzy logic and finally we compare our presented method with LEACH.
The results of simulation show that our proposed method could be more effective than LEACH in increasing the network lifetime [9].

Pervious Works
A typical wireless sensor network architecture is shown in fig. 1. The nodes send data to the respective cluster-heads, which in turn compresses the aggregated data and transmits it to the base station. In recent years, various strategies have been presented for wireless sensor networks [10]. The basic clustering has been done using LEACH (Low Energy Adaptive Clustering Hierarchy), proposed in. which are made of two setup phase and steady state phase [11].

Set-Up Phase in LEACH
In LEACH, nodes take autonomous decisions to form clusters by using a distributed algorithm without any centralized control. Here no long-distance communication with the base station is required and distributed cluster formation can be done without knowing the exact location of any of the nodes in the network. In addition, no global communication is needed to set up the clusters. The cluster formation algorithm should be designed such that nodes are cluster-heads approximately the same number of time, assuming all the nodes start with the same amount of energy [8]. Finally, the cluster-head nodes should be spread throughout the network, as this will minimize the distance the non-cluster-head nodes need to send their data. A sensor node chooses a random number, r, between 0 and 1. Let a threshold value be T(n): * 0 (1) where, P is the cluster-head probability, r the number of the current round and G the set of nodes that have not been cluster-heads in the last 1/P rounds. If this random number is less than a threshold value, T(n), the node becomes a cluster-head for the current round. The threshold value is calculated based on the above given equation that incorporates the desired percentage to become a cluster-head, the current round, and the set of nodes that have not been selected as a cluster-head in the last (1/P) rounds, After the nodes have elected themselves to be cluster-heads, it broadcasts an advertisement message (ADV). This message is a small message containing the node's ID and a header that distinguishes this message as an announcement message. Each non-cluster-head node determines to which cluster it belongs by choosing the cluster-head that requires the minimum communication energy, based on the received signal strength of the advertisement from each cluster-head. After each node has decided to which cluster it belongs, it must inform the cluster-head node that it will be a member of the cluster. Each node transmits a join-request message (Join-REQ) back to the chosen cluster-head. The cluster-heads in LEACH act as local control centers to co-ordinate the data transmissions in their cluster [12]. The cluster-head node sets up a TDMA schedule and transmits this schedule to the nodes in the cluster. This ensures that there are no collisions among data messages and also allows the radio components of each non cluster-head node to be turned off at all times except during their transmit time, thus minimizing the energy dissipated by the individual [13].

Steady-State Phase
The steady-state operation is broken into frames where nodes send their data to the cluster-head at most once per frame during their allocated transmission slot. The set-up phase does not guarantee that nodes are evenly distributed among the cluster head nodes. Therefore, the number of nodes per cluster is highly variable in LEACH, and the amount of data each node can send to the cluster-head varies depending on the number of nodes in the cluster. To reduce energy dissipation, each non-cluster-head node uses power control to set the amount of transmits power based on the received strength of the cluster-head advertisement. The radio of each non-cluster-head node is turned off until its allocated transmission time. Since all the nodes have data to send to the cluster-head and the total bandwidth is fixed, using a TDMA schedule is efficient use of bandwidth and represents a low latency approach, in addition to being energy-efficient [14]. The cluster-head must keep its receiver on to receive all the data from the nodes in the cluster. Once the cluster-head receives all the data, it can operate on the data and then the resultant data are sent from the cluster-head to the base station.

Fuzzy Logic
Fuzzy logic (FL) is defined as the logic of human thought, which is much less rigid than the calculations computers generally perform. Fuzzy Logic offers several unique features that make it a particularly good alternative for many control problems. It is inherently robust since it does not require precise, noise-free inputs and can be programmed to fail safely [14]. The output control is a smooth control function despite a wide range of input variations. Since, the FL controller processes user defined rules governing the target control system, it can be modified and tweaked easily to improve or drastically alter system performance. Fuzzy Logic deals with the analysis of information by using fuzzy sets, each of which may represent a linguistic term like "Warm", "High", etc. Fuzzy sets are described by the range of real values over which the set is mapped, called domain, and the membership function. A membership function assigns a truth (crisp) value between 0 and 1 to each point in the fuzzy set's domain. Depending upon the shape of the membership function, various types of fuzzy sets can be used such as triangular, beta, PI, Gaussian, sigmoid, etc. We use triangular and Trapezoidal membership functions. The trapezoidal and triangular membership functions suitable for real-time operation because they don't complexity computations and also are have enough accuracy [15]. A Fuzzy system basically consists of three parts: fuzzification, inference engine, and defuzzification. The fuzzifier maps each crisp input value to the corresponding fuzzy sets and thus assigns it a truth value or degree of membership for each fuzzy set. The fuzzified values are processed by the inference engine, which consists of a rule base and various methods for inferring the rules. The rule base is simply a series of IF-THEN rules that relate the input fuzzy variables with the output fuzzy variables using linguistic variables, each of which is described by a fuzzy set, and fuzzy implication operators AND, OR, etc. The part of a fuzzy rule before THEN is called predicate or antecedent, while the part following THEN is referred to as consequent. The combined truth of the predicate is determined by implication rules such as MIN-MAX and bounded arithmetic sums. The fuzzy system used in the inference engine of the expert system is the Mamdani fuzzy system. The Mamdani fuzzy system is a simple rule-base method which does not require complicated calculations and which can employ the IF…THEN… rules to control systems. Mamdani was the person who used the fuzzy method for the first time to study the process of controlling steam machine. Since then, this method has been in use and has acquired a special status. All the rules in the rule-base are processed in a parallel manner by the fuzzy inference engine. Any rule that fires contributes to the final fuzzy solution space. The inference rules govern the manner in which the consequent fuzzy sets are copied to the final fuzzy solution space. Example, techniques are MIN-MAX and fuzzy adaptive method. the defuzzifier performs defuzzification on the fuzzy solution space. That is, it finds a single crisp output value from the solution fuzzy space. Some of common defuzzification techniques are: Center of Area (COA), Center Of Gravity (COG), Extended Center of Area (ECOA), Mean of Maxima (MeOM) and etc. In this paper we use COA method for defuzzification. [16].

Proposed Method
In fact, the principal difference of out method and the LEACH algorithm is in cluster forming step. In this method the un cluster-head nodes compute the amount of chance for each cluster-head node, using the fuzzy inference system. Our inference technique and fuzzy logic is based on figure 2. figure 2 show fuzzy system components in proposed method. In our proposed model we use the method used in [4] [5], and [6], called the Mamdani method in the MATLAB Fuzzy Logic toolbox. We implemented the following equations to calculate the energy, and using these equations we could calculate the energy consumption while sending and receiving data between the sender and receiver : E TX (l,d) = E elec × l + ε amp × l × E RX (l,d) = E elec × l Where λ is the path loss exponent, l is the messages size in bits, d is the distance between transmitter and receiver, ε amp is the energy constant for propagation, and E elec is the electronics energy. For transmissions to the CH, λ = 2 and ε amp =10 pJ/bit/m 4 . For transmissions to the BS λ = 4 and ε amp =0.0013 pJ/bit/m 4 .  We have four principal parameters, each with three levels. So, we have 64 (4*4*4) chance as a whole which are calculated using the fuzzy rule IF-THEN. If the energy is low and the number of the neighbors is high, and the distance to the base station is high and the rounds that not been cluster head is low, then the chance will be so weak. If the energy is high and the number of the neighbors is high and the distance to the base station is low and the distance between the nodes and the cluster is low, then the chance will be highly strong. ** If two cluster-head have equal chance, we select the one with less distance from base station.

Simulation and Evaluation
In this section, we evaluate the performance of our proposed algorithm in MATLAB. The configuration parameters used in our experiments are shown in Table 1 Figure 4 shows the difference in the amount of energy consumed in our Propose method and the LEACH method. Our proposed method has lower energy and this will lead to an increase in network lifetime. Figure 5 shows the number of alive nodes with respect to the operation of the network in rounds.

Conclusion
In this article, we have presented an optimum method to form the cluster-head in wireless sensor networks, in which the fuzzy logic is used due to increase the network lifetime. We simulated out proposed method and calculated this implementing LEACH method and observed that our proposed method leads to energy consumption decrease in the nodes and therefore it leads to increase in network lifetime and since we use 4 original parameters (energy of cluster head, distance to base station, rounds that not been cluster head, number of neighbors), while the LEACH method implements just one parameter to select the cluster-head.