GA Using Matlab
GA Using Matlab
presentation
By
Dr. Raghavendra Reddy Karasani
Associate Professor
Department of Electrical Engineering
Contents
▪ Introduction
▪ GA flowchart
▪ MATLAB CODE for GA
▪ GA MATLAB TOOL BOX
▪ Mathematical Examples
▪ Load frequency Control
Types of Optimization Methods
Introduction to GA
• Genetic algorithm (GA) is one of the most popular stochastic
optimization algorithm often used to solve complex large
scale optimization problems in various fields.
• Genetic Algorithm was first introduced by Holland in 1975,
and it is a powerful stochastic search algorithm based on the
mechanisms of natural genetics and selection
❑ Genetic algorithm starts with an initial set of random
solutions called population.
❑ + Each individual in the population is called a chromosome
representing a solution to the problem at hand.
❑ + The chromosomes evolve through successive iterations,
called generations.
❑ + During each generation, the chromosomes are evaluated
using some measures of fitness.
Genetic Algorithms
Genetic Algorithms
❑ To create the next generation, new chromosome, called
offspring, are formed by either (a) merging two
chromosomes from current generation using a crossover
operator or (b) modifying a chromosome using a mutation
operator.
❑ + A new generation is formed by (a) selecting, according to
the fitness values, some of the parents and offspring and (b)
rejecting others so as to keep the population size constant.
❑ + Fitter chromosomes have higher probabilities of being
selected.
❑ + After several generations, the algorithms converge to the
best chromosome, which hopefully represents the optimum
or suboptimal solution to the problem.
Genetic Algorithms
GA: TOOLBOX
Multi-objective Optimization: GA
Multi-Objective Optimization with Linear and
Nonlinear Constraints
AVR model design of Power Plant
AVR without PID
AVR with PID (trail&Error)
• The trial& error method is used for tuning PID controller ;
• Kp=1 Ki=0.25 Kd=0.28
AVR with PID(AutoTune)
• Simoutput block used to send input, output data @ PID controller to send data to
workspace for training ANN
AVR with GA Tuned PID
• optimtool
• Uniform(Population /creation)
• Tournament (selection)
• Adaptive feasible (Mutation)
• Arithmetic (Crossover)
• Best fitness (plot)
• Iterative (command window)
Comparison of results