97 CHAPTER 5 ENERGY MANAGEMENT USING FUZZY GENETIC APPROACH IN WSN 5.1 INTRODUCTION Fuzzy systems have been applied to the area of routing in ad hoc networks, aiming to obtain more adaptive and flexible models over existing models. While the main objective in the design of fuzzy rule-based systems has been the performance maximization, their comprehensibility has also been taken into. The comprehensibility of fuzzy rule-based systems is related to various factors (Ishibuchi & Yamamoto 2004): (i) Comprehensibility of fuzzy partitions (e.g., linguistic interpretability of each fuzzy set, separation of neighboring fuzzy sets, the number of fuzzy sets for each variable). (ii) Simplicity of fuzzy rule-based systems (e.g., the number of input variables, the number of fuzzy if-then rules). (iii) Simplicity of fuzzy if-then rules (e.g., type of fuzzy if-then rules, the number of antecedent conditions in each fuzzy if-then rule). (iv) Simplicity of fuzzy reasoning (e.g., selection of a single winner rule, voting by multiple rules). Rule selection is a direct approach to the design of fuzzy rule-based systems. As seen in the last chapter, the number of the fuzzy rules got is high. In the proposed approach, Genetic Algorithm (GA) is utilized to choose a
98 small number of significant fuzzy rules and removal of unnecessary fuzzy rules. Though not specifically designed for learning, but rather GAs were used as global search algorithms, they offer advantages for machine learning. Methodologies for machine learning search for a good model in the space of all possible models. In this sense, their flexibility can be used with different representations. Different levels of complexity are covered in genetic learning processes according to the structural changes formed by the algorithm, the simple case being parameter optimization to the complex case being to learn rule set of a rule-based system, through the coding approach and the competition or cooperation between chromosomes. When focusing on learning rules and considering a rule based system, the different genetic learning methods follow two methods in order to encode rules in a population of individuals (Herrera 2008): The Chromosome = Set of rules (the Pittsburgh approach) - here each individual represents a rule set (Smith 1980). A chromosome evolves a complete Rule Base (RB) competing among them along the evolutionary process. Proposals that follow this approach are GASSITS and GABIL (Bacardit et al 2003; Bacardit et al 2007). The Chromosome = Rule approach -here each individual codifies a single rule, and combining several individuals in a population the whole rule set is provided (rule cooperation) or through different evolutionary runs (rule competition). In the Chromosome = Rule approach, the generic proposals are: Michigan approach -here each individual codifies an association rule. They are called learning classifier systems
99 (Holland 1978). In a given environment, they are rule-based, message passing systems that use reinforcement learning and GA to learn rules that helps their performance. GA is used for detecting new rules and replacing the bad ones via the competition between the chromosomes in the evolutionary process. A study on the topic can be found in Kovacs (2004). The IRL (Iterative Rule Learning) approach -here each chromosome represents a rule. The chromosomes compete in each GA run, choosing best rule per run. Global solution is designed by the best rules got when the algorithm is run multiple times. SIA (Venturini 1993) is a scheme that follows this approach. 5.2 METHODOLOGY Fuzzy rule-based systems have been successfully applied in the previous chapter and shown to improve the performance of existing routing protocols. The comprehensibility off fuzzy rule-based systems is related to various factors: (i) Comprehensibility of fuzzy partitions (e.g., linguistic interpretability of each fuzzy set, separation of neighboring fuzzy sets, the number of fuzzy sets for each variable). (ii) Simplicity off fuzzy rule-based systems (e.g., the number of input variables, the number off fuzzy if-then rules). (iii) Simplicity of fuzzy if-then rules (e.g., type of fuzzy if-then rules, the number of antecedent conditions in each fuzzy if-then rule).
100 (iv) Simplicity off fuzzy reasoning (e.g., selection of a single winner rule, voting by multiple rules). In this work a small number of simple fuzzy if-then rules is selected using Genetic Algorithm for designing a comprehensible fuzzy rule-based system for routing problem with many continuous attributes. Among the above four issues, the second and third ones are mainly discussed in this work. The proposed methodologies are explained in detail in the following sections. The flowchart in figure 5.1 explains the methodologies.
101 Figure 5.1 Flowchart for proposed methodology 5.2.1 Genetic Algorithm Genetic Algorithms (GA) are evolution inspired computational models which encode a potential solution for a specific problem on chromosome-like data structure applying recombination operators to structures
102 to preserve critical information. GA is viewed as function optimizers, though they can be applied to a wide problem range (Mathew 1996). 1. Initialization : The initial candidate solutions population is randomly generated across search space. But domain-specific knowledge/other information are easily incorporated. 2. Evaluations : Once population is initialized or offspring population created, candidate solutions fitness values are evaluated. 3. Selection : Selection allocates copies of solutions with higher fitness values imposing survival-of-the-fittest mechanism on candidate solutions. 4. Recombination : Recombination integrates parts of two or more parental solutions for the creation of new and possibly improved solutions (offspring). There are many ways to accomplish this (discussed in next section), with competent performance depending on correctly designed recombination mechanism. 5. Mutation : While recombination operates on two or more parental chromosomes, mutation modifies a solution locally and randomly. There are many mutation variations usually involving one or more changes to an individual s trait/traits. Mutation performs a random walk near a candidate solution. 6. Replacement : Offspring created by selection, recombination, and mutation substitute original parental population. 7. Repeat steps : 2 6 till a terminating condition is met (Sastry et al 2005).
103 GA Operators : The simplest form of genetic algorithm involves three types of operators: selection, crossover (single point) and mutation. Selection : This operator selects chromosomes in the population for reproduction. The fitter the chromosome, the more times it is likely to be selected to reproduce. (5.1) Where (i) and f (i) are the probability of selection and fitness value for the ith chromosome respectively (Melanie 1999). Crossover : This operator chooses a locus randomly exchanging subsequences before and after locus between two chromosomes to create two offspring. A crossover probability is predetermined before algorithm starts, governing whether a parent pair is crossed-over or reproduced. Reproduction results in offspring being exactly equal to parent pair. Crossover converts parent pair to binary notation swapping bits after random selected crossover point to form offspring pair. Mutation : Mutations are global searches. A mutation probability is predetermined prior to the algorithm starting, being applied to offspring chromosome s individual bit to determine whether it is to be inverted (Mishra & Patnaik 2009). The following Figure5.2 shows the Flowchart for genetic algorithm.
104 Figure 5.2 Flowchart of genetic algorithm A genetic algorithm-based approach is proposed for selecting a small number of fuzzy if-then rules from a large number of candidate rules. A table as a genotype with alleles that are fuzzy set indicators over the output domain is considered. The phenotype is produced by the behavior produced by the fuzzi erations. 5.2.2 Hybrid fuzzy-ga based approach The steps of the hybrid fuzzy-ga algorithm are: 1. Read the input as the metric values 2. Find the nearest match with Example data
105 3. Calculate the Output of the fuzzy Inference System corresponding to the Input set 4. Treat FIS value and the Nearest Match Value as Chromosome and convert the values into Binary after multiplying the values with 100 5. Perform the crossover of the Values at a Particular Point 6. Compare the results 5.3 EXPERIMENTAL SETUP Simulations are conducted by using varying number of sensor nodes deployed in 4 square km, with a maximum of 5 hops from the sink node. The number of nodes was varied 50 to 300. The transmission power of a node is taken as 0.005w and 11 Mbps is taken as maximum bandwidth. Number of packets to be transferred, residual energy and number of hops to the sink node are taken as input variables and energy can be sent has taken as an output variable. 5.4 RESULTS AND DISCUSSION Figure 5.3 to 5.8 shows the comparison of performance of M- algorithm, Fuzzy based routing and proposed fuzzy genetic algorithm. Table 5.1 Average Packet Delivery Ratio Number of nodes Fuzzy M Fuzzy GA M Fuzzy Fuzzy GA 50 0.9643 0.9758 0.9833 0.9841 100 0.9174 0.9379 0.9441 0.954 150 0.9007 0.9218 0.9328 0.9434 200 0.8606 0.8798 0.8787 0.8892 250 0.7951 0.8028 0.8126 0.8247 300 0.7522 0.769 0.7701 0.7849
106 Average Packet Delivery Ratio 1.2 1 0.8 0.6 0.4 0.2 0 50 100 150 200 250 300 Number of Nodes Fuzzy M Fuzzy GA M Fuzzy Fuzzy GA Figure 5.3 Average Packet Delivery Ratio Experimental results conducted for Energy Management using Fuzzy Genetic Approach in WSN showed in Table 5.1 and Figure 5.3 enlighten that the Packet Delivery Ratio increases when compared to M- and Fuzzy. When number of nodes is 50 PDR increases by 1.17% for Fuzzy GA when compared to Fuzzy and by 3.93% for M-, when number of nodes is 100 by 2.18% for Fuzzy and by 5.19% for M-, when number of nodes is 150 by 2.28% for Fuzzy and by 5.97% for M-, when number of nodes is 200 by 2.18% for Fuzzy and by 5.87% for M-, when number of nodes is 250 by 0.95% for Fuzzy and by 3.43% for M-, and when number of nodes is 300 by 2.18% Fuzzy and by 13.47% for M-.
107 Table 5.2 Average End To End Delay in second Number of nodes Fuzzy M Fuzzy GA M Fuzzy Fuzzy GA 50 0.000674 0.0006 0.000698 0.000667 100 0.000794 0.0007 0.000873 0.000786 150 0.000928 0.0009 0.001886 0.000918 200 0.000981 0.0009 0.002793 0.000971 250 0.005776 0.0054 0.008655 0.005715 300 0.009478 0.0089 0.059779 0.009377 Average End To End Delay (sec) 5 4.5 4 3.5 3 2.5 2 1.5 1 0.5 0 50 100 150 200 250 300 Number of Nodes Fuzzy M Fuzzy GA M Fuzzy Fuzzy GA Figure 5.4 Average End-To-End Delay Experimental results conducted for Energy Management using Fuzzy Genetic Approach in WSN showed in Table 5.2 and Figure 5.4 enlighten that the End to End Delay decreases when compared to M- and Fuzzy. When number of nodes is 50 End to End Delay decreases by 10.97% for Fuzzy GA when compared to Fuzzy and by 14.89% for M-
108, when number of nodes is 100 by 11.83% for Fuzzy and by 20.63% for M-, when number of nodes is 150 by 3.01% for Fuzzy and by 52.78% for M-, when number of nodes is 200 by 8.25% for Fuzzy and by 68.11% for M-, when number of nodes is 250 by 6.5% for Fuzzy and by 38.27% for M-, and when number of nodes is 300 by 6.09% Fuzzy and by 85.27% for M-. Table 5.3 Number of clusters formed Number of nodes Fuzzy M Fuzzy GA M 50 7 7 100 11 11 150 15 14 200 21 20 250 27 26 300 31 29 35 30 Number of Clusters formed 25 20 15 10 5 0 50 100 150 200 250 300 Number of nodes Fuzzy Fuzzy GA Figure 5.5 Number of cluster formed
109 Experimental results conducted for Energy Management using Fuzzy Genetic Approach in WSN showed in Table 5.3 and Figure 5.5 enlighten that the Number of clusters formed decreases when compared to M- and Fuzzy. When number of nodes is 50 and 100 the Number of clusters formed is same for Fuzzy and Fuzzy GA. When number of nodes is 50 the Number of clusters formed decreases by 12.50% for Fuzzy GA when compared to M-, when number of nodes is 100 by 21.42% for M-, when number of nodes is 150 by 6.66% for Fuzzy and by 22.22% for M-, when number of nodes is 200 by 4.76% for Fuzzy and by 23.07% for M-, when number of nodes is 250 by 3.70% for Fuzzy and by 18.75% for M-, and when number of nodes is 300 by 6.45% Fuzzy and by 19.44% for M-. Table 5.4 Average number of hops to sink Number of nodes Fuzzy M Fuzzy GA M Fuzzy Fuzzy GA 50 2.6 2.8 2.38 2.57 100 3.42 3.6 3.21 3.39 150 3.72 3.6 3.66 3.68 200 3.94 3.86 3.9 3.9 250 4.06 3.92 4.23 4.02 300 4.23 4.15 4.31 4.18
110 Average Number of Hops to Sink 5 4.5 4 3.5 3 2.5 2 1.5 1 0.5 0 50 100 150 200 250 300 Number of Nodes Fuzzy M Fuzzy GA M Fuzzy Fuzzy GA Figure 5.6 Average number of hops to sink Experimental results conducted for Energy Management using Fuzzy Genetic Approach in WSN showed in Table 5.4 and Figure 5.6 enlighten that the Average no of hops to sink decreases when compared to M- and Fuzzy for higher number of nodes. When number of nodes is 50 and 100, the no of hops to sink, increases for Fuzzy and Fuzzy GA when compared to M-Leach. When number of nodes is 50 the no of hops to sink increases by 7.14% for Fuzzy GA when compared to Fuzzy and by 14.28% to M-, when number of nodes is 100 by 5% for Fuzzy and by 10% for M-, when number of nodes is 150 the no of hops to sink decreases by 3.22% for Fuzzy and by 2.70% for M-, when number of nodes is 200 by 2.03% for Fuzzy and M-, when number of nodes is 250 by 3.44% for Fuzzy and by 8.41% for M-, and when number of nodes is 300 by 1.89% Fuzzy and by 4.81% for M-.
111 Table 5.5 Jitter Number of nodes Fuzzy M Fuzzy GA M Fuzzy Fuzzy GA 50 0.000295 0.000266 0.000331 0.000292 100 0.000679 0.000626 0.000762 0.000672 150 0.00092 0.000762 0.001032 0.00091 200 0.000924 0.000809 0.001036 0.000914 250 0.001247 0.000866 0.001398 0.001234 300 0.001324 0.001001 0.001485 0.00131 0.0016 0.0014 0.0012 Jitter 0.001 0.0008 0.0006 0.0004 0.0002 0 50 100 150 200 250 300 Number of Nodes Fuzzy M Fuzzy GA M Fuzzy Fuzzy GA Figure 5.7 Jitter Experimental results conducted for Energy Management using Fuzzy Genetic Approach in WSN showed in Table 5.5 and Figure 5.7 enlighten that the jitter decreases when compared to M- and Fuzzy. When number of nodes is 50 jitter decreases by 8.47% for Fuzzy GA when compared to Fuzzy and by 19.40% for M-, when number of nodes is 100 by 7.21% for Fuzzy and by 18.18% for M-, when number of nodes is 150 by 17.39% for Fuzzy and by 27.13% for M-, when
112 number of nodes is 200 by 12.33% for Fuzzy and by 22.70% for M-, when number of nodes is 250 by 30.23% for Fuzzy and by 38.47% for M-, and when number of nodes is 300 by 24.47% Fuzzy and by 33.42% for M-. Table 5.6 Energy in joule per packet Number of nodes Fuzzy M Fuzzy GA M Fuzzy Fuzzy GA 50 0.212 0.222 0.217 0.21 100 0.234 0.244 0.238 0.232 150 0.24 0.25 0.244 0.237 200 0.259 0.271 0.265 0.256 250 0.269 0.28 0.274 0.266 300 0.29 0.301 0.295 0.287 0.35 Energy (Joules/packet) 0.3 0.25 0.2 0.15 0.1 0.05 0 50 100 150 200 250 300 Number of Nodes Fuzzy M Fuzzy GA M Fuzzy Fuzzy GA Figure 5.8 Energy in joule per packet Experimental results conducted for Energy Management using Fuzzy Genetic Approach in WSN showed in Table 5.6 and Figure 5.8
113 enlighten that the Energy in joule per packet increases for Fuzzy GA when compared to M- and Fuzzy. When number of nodes is 50 Energy in joule per packet increases by 4.50% for Fuzzy GA when compared to Fuzzy and by 1.35% for M-, when number of nodes is 100 by 4.09% for Fuzzy and by 1.22% for M-, when number of nodes is 150 by 4% for Fuzzy and by 1.20% for M-, when number of nodes is 200 by 4.42% for Fuzzy and by 1.10% for M-, when number of nodes is 250 by 3.92% for Fuzzy and by 1.07% for M-, and when number of nodes is 300 by 3.65% Fuzzy and by 0.99% for M-. 5.5 CONCLUSIONS A fuzzy logic genetic approach is proposed for efficient energy management. Possible fuzzy rules are formed based on the number of packets to be transferred, available energy in the node and the number of hops to reach the destination. Best rule is selected by using genetic approach. Simulations were conducted using the m-leach algorithm and proposed fuzzy genetic approach. Results show that fuzzy genetic algorithm performs better than m-leach algorithm.