Professional Documents
Culture Documents
GA For Process Control
GA For Process Control
11
Presented
22
1/12/12
1/12/12
It is based on the study of Genetics. Genetics is the study of heredity, the process in which a parent passes certain genes onto their children and it continued. Genetic algorithms (GAs) are stochastic algorithms whose search methods inspired from phenomena found in living nature developed by John Holland(1970s):
To understand the adaptive processes of natural systems To design artificial systems software that retains the robustness of natural systems
33
Conceptual Algorithm
Initialize Population
1/12/12
Evaluate Fitness
Yes
Output Results
44
Algorithm
Suedo Code BEGIN Generate initial population; Compute fitness of each individual; REPEAT /* New generation /* FOR population_size / 2 DO Select two parents from old generation; /* biased to the fitter ones */ Recombine parents for two offspring; Compute fitness of offspring; Insert offspring in new generation END FOR UNTIL population has converged
55
1/12/12
Basic principles
1/12/12
Coding or Representation
String with all parameters Parent selection Crossover Mutation When to stop
Fitness function
Reproduction
Convergence
66
1/12/12
An individual is characterized by a set of parameters: Genes The genes are joined into a string: Chromosome The chromosome forms the genotype The genotype contains all information to construct an organism: the phenotype Reproduction is a dumb process on the chromosome of the genotype Fitness is measured in the real world (struggle for life) of the phenotype
77
Coding
1/12/12
Parameters of the solution (genes) are concatenated to form a string (chromosome) All kind of alphabets can be used for a chromosome (numbers, characters), but generally a binary alphabet is used Order of genes on chromosome can be important Generally many different codings for the parameters of a solution are possible Good coding is probably the most important factor for the performance of a GA In many cases many possible chromosomes do not code for feasible solutions
88
Fitness Function
Click to edit Master text styles Second level Third level Fourth level Fifth level
Roulette wheel Problem: Its selective pressure reduces as population converges upon a solution, which reduces the convergence rate and may not allow finding the better solutions.
Reproduction
1/12/12
Crossover
Two parents produce two offspring There is a chance that the chromosomes of the two parents are copied unmodified as offspring There is a chance that the chromosomes of the two parents are randomly recombined (crossover) to form offspring Generally the chance of crossover is between 0.6 and 1.0 Mutation There is a chance that a gene of a child
10 10
Reproduction (cont.)
Crossover
q
q
1/12/12
Mutation
q q
q
Generating new offspring from single parent Maintaining the diversity of the individuals
Crossover can only explore the combinations of the current gene pool Mutation can generate new genes
11 11
12 12
1/12/12
Example
Suppose we want to maximize the number of ones in a string of l binary digits An individual is encoded (naturally) as a string of l binary digits The fitness f of a candidate solution to the problem is the number of ones in its genetic code We start with a population of n random strings. Suppose that l = 10 and n = 6
13 13
1/12/12
Example( Initiliasation)
We toss a fair coin 60 times and get the following initial population: s1 = 1111010101 f (s1) = 7 s2 = 0111000101 f (s2) = 5 s3 = 1110110101 f (s3) = 7 s4 = 0100010011 f (s4) = 4 s5 = 1110111101 f (s5) = 8 s6 = 0100110000 f (s6) = 3
14 14
1/12/12
Example (selection)
1/12/12
Next we apply fitness proportionate selection with the roulette wheel method: Individual i will have a be chosen
i
f (i ) f (i)
probability to
We repeat the extraction as many times as the number of individuals we need to have the same parent population size(6 in our case)
15 15
1/12/12
Suppose that, after performing selection, we get the following population: s1` = 1111010101 s2` = 1110110101 s3` = 1110111101 (s1) (s3) (s5)
Example (crossover)
Next we mate strings for crossover. For each couple we decide according to crossover probability (for instance 0.6) whether to actually perform crossover or not Suppose that we decide to actually perform crossover only for couples (s1`, s2`) and (s5`, s6`). For each couple, we randomly extract a crossover point, for instance 2 for the first and 5 for the second
17 17
1/12/12
1/12/12
After crossover s1`` = 1110110101 s2`` = 1111010101 s5`` = 0100011101 s6`` = 1110110011
18 18
Example (mutation)
1/12/12
The final step is to apply random mutation: for each bit that we are to copy to the new population we allow a small probability of error (for instance 0.1) s1`` = 1110110101 s2`` = 1111010101 s3`` = 1110111101 s4`` = 0111000101 s5`` = 0100011101 s6`` = 1110110011
19 19
Example (mutation)(cont.)
1/12/12
After applying mutation: s1``` = 1110100101 f (s1``` ) = 6 s2``` = 1111110100 f (s2``` ) = 7 s3``` = 1110101111f (s3``` ) = 8 s4``` = 0111000101f (s4``` ) = 5 s5``` = 0100011101f (s5``` ) = 5 s6``` = 1110110001f (s6``` ) = 6
20 20
Example(End)
In one generation, the total population fitness changed from 34 to 37, thus improved by ~9% At this point, we go through the same process all over again, until a stopping criterion is met
21 21
1/12/12
The GA for the optimal capacitor banks location and size for Voltage Control Zones
1/12/12
Each capacitor is represented by a string C of a number of binary bits. The first bit represents the state of the capacitor (1 for on, 0 for off). The remaining bits represent the capacity level of the capacitor. As an example, the string C = [10000] represents a capacitor working at minimum MVAR; C = [00000] represents a capacitor which is not operating (or not existing); the string C= [11111] represents a capacitor working at full
22 22
The GA for the optimal capacitor banks location and size for Voltage Control Zones (cont.)
For example, at a given node the string T = [1111100000] represents the situation where only one capacitor should be placed on that node, and this capacitor should be a type A working at full capacity. It is assumed, based on this representation, that a maximum of one capacitor of each type can be placed on any given node. As each string T represents the capacitor (and size) to be 23 placed at a given node, the representation23 of the general location of the capacitor
1/12/12
1/12/12
Constraints
24 24
25 25
1/12/12
26 26
1/12/12
Capacitor Comparison
Click to edit Master text styles Second level Third level Fourth level Fifth level
27 27
1/12/12
1/12/12
28 28
Response
29 29
1/12/12
30 30
1/12/12
Response
31 31
1/12/12
1/12/12
Thank you
32 32