Download presentation
Presentation is loading. Please wait.
Published byNorah Townsend Modified over 6 years ago
1
Cluster formation based comparison of Genetic algorithm and Particle Swarm Optimization in Wireless Sensor Network Ms.Amita Yadav Arnav Garg Mr. Suresh Kumar Ishita Taneja Niharika Batra Ayush Bhatnagar
2
I Introduction A sensor network is a collection of sensors which are nodes that sense the environment and compute the values which are then sent to a specific base station for administration and observation of that particular area. Some of the applications of sensor network are data collection, surveillance and monitoring.
3
Limitations in WSNs Objectives
1) Limited Energy: Unlike wired designs, wireless sensor nodes are ”off-grid”, meaning that they have limited energy storage 2) Network Lifetime: Proper clustering should attempt to reduce the energy usage, and hereby increase network lifetime. 3) Limited Abilities: A good clustering algorithm should make use of shared resources within an organizational structure, while taking into account the limitation on individual node abilities 4) Application Dependency: When designing a clustering algorithm, application robustness must be considered as a good clustering algorithm. Objectives Comparison of Genetic Algorithm and Particle Swarm Optimization Algorithm in Wireless sensor networks on the basis of following parameters: Fitness function Computation speed Scalability
4
Clustered Wireless sensor network
WSNs nodes (WNs) can sense the environment, can communicate with neighbouring nodes, and can, in many cases, perform basic computations on the data being collected The wireless sensor that is remotely deployed is usually battery operated. Thus, the lifetime of the sensor node is highly dependent on the battery life time. Alternatively there are times when it is possible to use a power source close by to power the node; but this is not always possible.
5
PSO (Particle Swarm Optimization)
In PSO, a set of randomly generated solutions (initial swarm) propagates in the design space towards the optimal solution over a number of iterations(moves) based on large amount of information about the design space that is assimilated and shared by all members of the swarm. PSO is inspired by the ability of flocks of birds, schools of fish, and herds of animals to adapt to their environment, find rich sources of food, and avoid predators by implementing an “information sharing” approach, hence, developing an evolutionary advantage. The basic PSO algorithm consists of three steps, namely, generating particles positions and velocities, velocity update, and finally, position update. Here, a particle refers to a point in the design space that changes its position from one position to another. The second step is to update the velocities of all particles at time k +1 using the particles objective or fitness values which are functions of the particles current positions in the design space at time k . The fitness function value of a particle determines which particle has the best global value in the current swarm
6
The Pseudo code for PSO algorithm is as follows:
PSO Algorithm flowchart The Pseudo code for PSO algorithm is as follows: Begin t=0; initialize particles P(t); evaluate particles P(t); while(termination conditions are unsatisfied) begin t=t+1; Update weight Select pBest for each particle Select gBest from P(t-1); Calculate particle velocity P(t); Update particle position P(t) Evaluate particles P(t)l end
7
Genetic Algorithm The GA is inspired by the principles of genetics and evolution, and mimics the reproduction behavior observed in biological populations. The GA employs the principal of “survival of the fittest” in its search process to select and generate individuals (design solutions) that are adapted to their environment (design objectives/constraints). Therefore, over a number of generations (iterations), desirable traits (design characteristics) will evolve and remain in the genome composition of the population (set of design solutions generated each iteration) over traits with weaker undesirable characteristics. The GA begins its search from a randomly generated population of designs that evolve over successive generations (iterations), eliminating the need for a user-supplied starting point. To perform its optimization-like process, the GA employs three operators to propagate its population from one generation to another. The first operator is the “Selection” operator that mimics the principal of “Survival of the Fittest”. The second operator is the “Crossover” operator, which mimics mating in biological populations. The last operator is “Mutation”, which promotes diversity in population characteristics.
8
The Pseudo code for the Genetic Algorithm is as follows:
GA Algorithm Flowchart The Pseudo code for the Genetic Algorithm is as follows: Begin u=0; initialize population [P(u)]; evaluate population [P(u)]; while(termination conditions are unsatisfied),do begin Create new solution P’(u)=Variation[P(u)]; Evaluate the new solution with variants ,P’(u) Apply genetic operators to generate next generation population, P(u+1) u=u+1; end
9
Implementation Results of Genetic Algorithm based clustering in MATLAB
Cluster formation(k=3) Best Cost vs. Iterations Plot
10
Analysis of the results obtained
Fitness function f=1/u Where u= sum of Euclidean distances Iteration 1: Best Cost = Iteration 200: Best Cost = Best cost is the sum of Euclidean distances. Initially the best cost is maximum and after the iterations best cost is optimized i.e. minimum. Since the fitness function is 1/u lesser is the cost(sum of Euclidean distance) i.e. u better is the fitness value. The decreasing trend of the cost can be seen from the plot of cost VS iterations.
11
Implementation Results of PSO based clustering in MATLAB Cluster formation(k=3)
Best cost vs iterations plot
12
Analysis of the results obtained
Fitness function f=1/u Where u= sum of Euclidean distances Iteration 1: Best Cost = Iteration 200: Best Cost = Best cost is the sum of Euclidean distances. Initially the best cost is maximum and after the iterations best cost is optimized i.e. minimum. Since the fitness function is 1/u lesser is the cost(sum of Euclidean distance) i.e. u better is the fitness value. The decreasing trend of the cost can be seen from the plot of cost VS iterations.
13
Evaluating Fitness 1)Best Cost
Fitness is determined by the following parameters: 1) Best Cost 2) Processing speed 3)Scalability 4)Implementation complexity 5)Convergence 6) Reduction in energy consumption 1)Best Cost Best cost is one of the most important parameter that evaluates the effectiveness of the two algorithms. Both the algorithms begin with a group of randomly generated population and utilize a fitness function to evaluate the population, and since the fitness function depends upon the best cost the objective was to decrease the best cost as much as possible. It is clearly concluded that when the requirement for the number of clusters is less particle swarm optimization based cluster formation algorithm proved to be more effective than genetic algorithm based cluster formation since the value of best cost in the former had a lesser value than the latter i.e.
14
Comparison graph (Best Cost vs. clusters)
Comparison table: Comparison graph (Best Cost vs. clusters) No of clusters i.e. K No of iterations Population size Best cost for PSO based cluster formation Best cost for genetic algorithm based cluster formation 3 200 100 0.5288 0.5284 7 11
15
. However, when the requirement for the number of clusters is more genetic algorithm based cluster formation proved to be more effective than particle swarm optimization based cluster formation algorithm since in this case the value of best cost in the former had a lesser value than the latter i.e. No of clusters i.e. K No of iterations Population size Best cost for PSO based cluster formation Best cost for genetic algorithm based cluster formation 15 200 100 0.7299
16
2)Processing speed Another important factor which evaluates the effectiveness of the two cluster formation algorithms is their processing speed. From the research work done it has been concluded that the processing speed of genetic algorithm based cluster formation is slow as compared to the processing speed of PSO based cluster formation. And the major reason for this lies in the implementation complexity of the two algorithms. Since the genetic algorithm based cluster formation makes use of complex operators like selection, crossover and mutation its execution time is generally greater than the execution speed of PSO based cluster formation which does not involve the use of such complex operators. From the graph it is evident that the execution time of PSO is linear throughout whereas the execution time for the genetic algorithm based clustering takes a steep turn for the iterations greater than 150 indicating that it takes more time to execute as compared to PSO based cluster formation algorithm
17
4)Implementation complexity
3)Scalability Scalability is a characteristic of a system, model or function that describes its capability to cope and perform under an increased or expanding workload. A system that scales well will be able to maintain or even increase its level of performance or efficiency when tested by larger operational demands. From the research work it has been concluded that when the requirement for the number of clusters is more Genetic algorithm based cluster formation technique has given better value of fitness function as compared to PSO based clustering technique. The requirement for more number of clusters would be there only when new nodes have to be inserted i.e. when the network has to be scaled , thus we can conclude that whenever the network has to be scaled Genetic algorithm based clustering technique would be more effective as compared to PSO based clustering technique as the former would help the system maintain its level of performance. 4)Implementation complexity The implementation complexity is another important factor which evaluates the effectiveness of the two cluster formation algorithms, as an algorithm which is easier to implement is generally preferable over the other which is not. Among the two cluster formation algorithms , since genetic algorithm makes use of operators like selection, crossover and mutation its implementation is a bit difficult as compared to the PSO based clustering whose implementation is easier as it does not involve such complex operators.
18
5)Convergence An algorithm which has a higher degree of convergence to the optimal solution is definitely more efficient than the other who doesn’t have that degree of convergence. From the research it work it has been concluded that genetic algorithm based clustering showed more convergence to the optimal solution than the PSO based clustering for greater number of clusters. And the reason for this is the use of genetic operators in genetic algorithm based clustering. In general crossover is the principal genetic operator that is responsible for the higher degree of convergence. The crossover operator provides the parallel nature in the searching process and attempts to benefit the off springs by cross breeding the parent chromosomes. This helps in restricting the reproduction of weak off springs. Thus genetic algorithm based clustering technique eliminates not only that poor solution but also all its descendants and thus this makes the algorithm converge towards high quality solutions more.
19
. Higher degree of convergence towards optimal solution in Genetic Algorithm based clustering. Lower degree of convergence towards optimal solution in PSO based clustering
20
The comparison of Best Cost between GA and PSO in which the value of Best Cost for GA decreases more than that of PSO.
21
6)Reduction in energy consumption
We have calculated the reduction in energy consumption with the number of clusters. Energy consumption is the energy consumed by the nodes while forming the clusters. Therefore, reduction in energy consumption to find the optimum solution with increasing number of iterations is a must. Reduction in energy consumption is calculated by the formula: = ((best cost)-(worst cost))/(worst cost) More the reduction in energy consumption, better is the performance of the algorithm. In this case, we got the results as follows: Reduction in energy consumption vs number of clusters
22
Table showing reduction in energy:
Number of clusters i.e k No of iterations Population size Reduction in energy consumption for PSO Reduction in energy consumption for GA 3 200 100 8% 23% 7 42% 44% 11 46% 48%
23
Conclusion we compared two algorithms- Particle Swarm optimization and Genetic algorithm on the basis of their fitness functions calculated by the Euclidean distances. Performance evaluation is done in MATLAB and simulation graphs were recorded and discussed to find the better algorithm for cluster head selection and cluster formation. The discussion proves that GA is better than PSO in maximizing fitness value and reduction in energy consumption by the nodes of the network. However , execution time of GA is more than PSO with increase in number of iterations but that can be managed to get the optimized results of the problems. In WSN, cluster head selection is an important task to connect the rest of the nodes because nodes have limited energy and short battery life. GA does it better though taking more time than PSO. THANKYOU
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.