Multi-Scale Optimization Using A Genetic Algorithm
Multi-Scale Optimization Using A Genetic Algorithm
ScholarWorks at WMU
1-2011
Part of the Computer Engineering Commons, and the Electrical and Computer Engineering Commons
Recommended Citation
Alshawawreh, Jumana Ali, "Multi-Scale Optimization Using a Genetic Algorithm" (2011). Dissertations.
337.
https://scholarworks.wmich.edu/dissertations/337
Date 02/11/2011
Jumana AN Alshawawreh
IfkjJU^L^
Dr. Melinda Koelling
Dissertation Review Committee Membet
APPROVED
Date J^lM
MULI-SCALE OPTIMIZATION USING A GENETIC ALGORITHM
optimization problem. The algorithm is called multi-scale since it has the ability to
use a large scale in the initial stages then to use a scale refinement near the optimal
mutation operation. Polar coordinate variables are used to perform the MSA for
objective function and the penalty function in order to locate a feasible optimal
solution.
were used to test the performance of the proposed penalty method. These problems
include the design of a welded beam, design of a pressure vessel, minimization of the
Finally, the Multi-Scale Algorithm was used to find the optimal power flow in a
power system network. The aim is to minimize the total cost of generation power
stability. The optimal power flow of the IEEE-26 bus power system network and
IEEE-30 bus power system network were successfully calculated using the Multi-
Scale Algorithm.
MULTI-SCALE OPTIMIZATION USING A GENETIC ALGORITHM
by
Dissertation
Submitted to the
Faculty of The Graduate College
in partial fulfillment of the
requirements for the
Degree of Doctor of Philosophy in
Electrical and Computer Engineering
Advisor: Frank Severance, Ph.D.
In the unlikely event that the author did not send a complete manuscript
and there are missing pages, these will be noted. Also, if material had to be removed,
a note will indicate the deletion.
UMI
Dissertation Publishing
UMI 3455090
Copyright 2011 by ProQuest LLC.
All rights reserved. This edition of the work is protected against
unauthorized copying under Title 17, United States Code.
uest A ®
ProQuest LLC
789 East Eisenhower Parkway
P.O. Box 1346
Ann Arbor, Ml 48106-1346
Copyright by
Jumana Ali Al-Shawawreh
2011
DEDICATION
To my father, the greatest person in my life, you have inspired me alive and dead, for
I would like to start with my advisor Dr. Severance for his directions and
support and, of course, for his patient, without his help this works will never
complete. I appreciate his understanding in the most of the difficult times through my
studying.
I would like to thank my committee members; Dr. Miller, Dr. Doung and Dr.
I would like to thank my family for their support, especially my mother when
I hear her voice this gives me the power to continue, and when I look to my daughters
Shadin and Areen faces this was enough to forget all the difficult times. Great thanks
to my husband, Hisham, and my brother, Ahmad, for their endless support and help.
who works in the ECE department in Western Michigan University, they really make
n
TABLE OF CONTENTS
ACKNOWLEDGMENTS ii
LIST OF FIGURES x
CHAPTER
1. INTRODUCTION 1
1.1 General 1
2. LITERATURE REVIEW 13
iii
Table of Contents—continued
CHAPTER
3. MULTI-SCALE ALGORITHM 30
iv
Table of Contents—continued
CHAPTER
4.1 Introduction 60
4.5.1 Method* 1 79
4.5.2 Method#2 80
4.5.3 Method* 3 81
4.5.4 Method#4 82
4.5.5 Method#5 82
v
Table of Contents—continued
CHAPTER
REFERENCES 138
vi
Table of Contents—continued
APPENDICES
VII
LIST OF TABLES
3-1 The group that has the highest probability of being selected
4-5 Solutions of tests functions using penalty methods [42] and MSA
with proposed penalty method 83
vin
List of Tables—continued
4-6 Solutions of the second test function using the MSA with the
modified penalty method 85
4-7 Pseudo code of the MSA with the modified penalty proposed
method 87
5-2 Fuel cost of the generation buses of the five-bus network [48] 118
5-5 Optimal power flow of the five-bus power system network 120
ix
LIST OF FIGURES
1.2 Crossover operations, (a) one point crossover point, (b) two-point
crossover, (c) cut and splice crossover and (d) uniform
crossover operations [4] 9
3.4 The convergence of the an arbitrary initial point to the global minimum
point of the function f(x) = -sin(— ) and (b) a zoomed
x +2x + 2
area around the global minimum point 39
3.5 The sequence of the search x-values of function / ( x ) = x2 + sin(lOOx)
starting from arbitrary initial point 44
3.7 Contour plot of the function f(x) = (x - 2)2 + (x - 2y)2 and the
sequence of the success points starting from (x 0 , yQ) to
minimum solution (x*,^*)using cyclic method 46
3.8 Contour plot of the function f{x) = (x - 2) 2 + (x - 2y)2 and the sequence
of the success points starting from (x 0 , y0) to the minimum solution
(x' ,y*) using the Hook and Jeeves method 47
3.10. Contour plot of the banana function for different initial points with
sequences of search points, (a) x0 = 0, y0 = 0 (b)x0=-l, 50
x
List of Figures—continued
3.12 Plot of the sequence of points of Goldstein and Price Function I for
different initial points, (a) (1.2,0.8) (b) (1.8,0.2) (c) (-0.6,-0.4) 53
3.13 Contour plot of Eason and Fenton's gear train inertia function 54
3.14 Solutions of Eason and Fenton's gear train inertia function found
using MSA for different initial points 54
5.6 One line diagram of IEEE-26-bus power system network [48] 124
5.7 One line diagram of IEEE-30-bus power system network [50] 127
xi
CHAPTER 1
INTRODUCTION
1.1 General
optimization problems. The main idea of the genetic algorithm is to produce and
optimization problem are presented as genes using a coding operation; then the genes
resolution accurately. If the resolution is not defined very well this may cause the
failure of the GA to locate the optimal solution due to the absence of the chromosome
that represents the optimal solution in the possible domain. To overcome this problem
a higher resolution will be necessary; however, increasing the resolution will cause a
coded (real) presentation of the variables can be used. In this dissertation a new
Multi-Scale Algorithm (MSA) based on the genetic algorithm is proposed. The Multi-
Scale Algorithm uses a real presentation of the variables and the mutation operation
in the Multi-Scale Algorithm allows investigating a large space at the beginning and a
1
feasible space. One of the methods to solve a constrained optimization problem is to
penalty methods the unconstrained objective function consists of two terms; one of
them is the objective function and the other term is called the penalty function. The
function evaluation equals zero within the feasible space and is proportional to the
constraint violations outside the feasible space to maintain the solution within. Near
the boundaries of the feasible space the constraint violations may be insufficient to
prevent the search from going outward from the feasible space. For that reason
penalty functions are usually multiplied by a factor called the penalty parameter.
Based on the penalty parameter, the penalty method can be classified as death, static,
dynamic and adaptive penalty functions. In this dissertation two adaptive penalty
The optimal power flow is one of the important optimization problems in power
systems, where it is required to minimize the fuel cost of the generation units and
maintain the stability of the power system network. Usually the power system
network has several generation plants with different fuel costs. The total generation
power must meet the demand power of the customers and the power losses in the
transmission lines. The power flow through the power system network is usually
2
voltage and the power losses in transmission lines. To solve the optimal power flow,
search, to determine the power losses and to investigate the power system stability.
The Multi-Scale Algorithm was used to solve the optimal power flow of the IEEE-30
operations, fitness function evaluation and production operations [1]. The first step in
binary string called genes. Then the genes are concatenated together to construct
sizeP . The size of the population depends on the nature of the optimization problem.
The next step is to evaluate the fitness function for each chromosome in the
generate offspring, where the chromosome that has the highest fitness function
evaluation will have the most useful information to locate the optimal solution. The
are met. The flow chart of the traditional GA is shown in Figure 1.1.
3
Select initial population of size
P randomly
+
Create the chromosomes using
coding operation
-t"
Evaluate the fitness function of
each chromosome
4
1.2.1 Coding/Decoding Operation
The numbers and the length of genes depend on the control variables' ranges and
their resolutions.
The length of the gene that represents the control variable x, depends on the
control variable range [a, ,b, ] and its resolution rl. The length of the gene Lt is
L. lOg2 ~ r ~ (1-1)
. I > )
The length of the gene is proportional to the control variable range and
inversely proportional to its resolution, where the length of the gene increases as the
control variable range is increased. If higher resolution is required then the length of
the gene is increased. For example, the lengths of the gene for the variable
x, e [-1,4] for different resolutions 0.1, 0.01, 0.001 and 0.0001 are 6, 9, 13 and 16
respectively.
The number of possible genes that represents the control variable x, is equal
b —a
to — '-. For example, if the control variable x, e [-1,4] and its resolution is 0.1,
then all the possible genes of the control variable will be as shown in Table 1-1.
5
Table 1-1 Gene's representation of the control variables
Control variable Gene of control variable
-1 000000
-0.9 000001
-0.8 000010
4 110010
x,e[-l,4], r, =0.1
x 2 e[2,5], r 2 =0.01
x3 e [-2,2], r3 =0.1
x 4 e[0,10], r 4 =0.01
Suppose that the values of the control variables at the /"" generation
are xy = 2, x2 = 2.2, x3 - -2, x4 = 3 and x4 = 3, then the genes that represent the
G4 = 0100101100. The chromosome that represents the genes at this generation will
that converts the genes in chromosomes to real values of the control variables. The
6
1.2.2 Fitness Function Evaluation
chromosome has the possibility to be chosen as a parent of the next generation. The
fi of the chromosome. The fitness function is a function that measures the usefulness
of the chromosome to direct the search toward the global optimal solution. For
that yields the least objective function evaluation will have the highest fitness
function evaluation. The fitness function is a positive function since it will be used to
offspring.
population is:
P , = ^ - d-2)
chromosome will be considered as a packet and the size of the packet is proportional
7
to the probability of the chromosome. In order to select TV chromosomes from the
The next offspring is usually generated based on the current population using
operations can be classified into primary and secondary operations. The primary
operation will be considered as the main operation in generating the offspring, where
most of offspring will be generated using this operation. On the other hand, the
secondary operation has a lower rate than the primary operation to generate offspring.
offspring in a simple GA, where most offspring are generated using the crossover
operation. In this operation two chromosomes are selected based on the fitness
function evaluation to be the parents of the next chromosomes. There are several
kinds of crossover operations: the one point, two-point, cut and splice and uniform
crossover operations [3]. The simple single point crossover operation is to choose two
chromosomes from the current population to be the parents of the offspring, then
divide them into two random segments. The offspring are generated by exchanging
the segments as shown in Figure 1.2-a. The single point crossover operation is
mostly used in the simple genetic algorithm. The two-point crossover operation
selects a random segment with same length of each chromosome. Then the segments
8
between the parents are exchanged to generate the offspring as shown in Figure 1.2-b.
In the cut and splice cross over operation each chromosome is divided into two
segments, but it is not necessary that both chromosomes are divided into equal
segment lengths; the population will have chromosomes with different lengths as
shown in Figure 1.2-c. The offspring in the cut and splice crossover operation will
have different lengths from their parents. Figure 1.2-d shows the uniform crossover
operation. In the uniform crossover operation the bits are chosen randomly from each
result is that two parents produce two offspring with a mixture of characteristics
Parent # 2 Parent * 2
Offspring # 1 I I I I Offspring fr 1
Offspring # 2 • • • • I I Offspring # 2
(a) O)
Parent £ 1 I T~ I I I I I I I I
Parent * 1 I I I I I I I I I I I I I I I I
Offspring rt 1 I I I Offsprmg * 1 I I Ml
Offspring U 2 • • • I I Offspring £ 2 I • I
(d>
(<0
Figure 1.2. Crossover operations, (a) one point crossover point, (b) two-point
crossover, (c) cut and splice crossover and (d) uniform crossover operations [4]
9
1.2.3.2 Mutation Operation
[5]. The main aim of the mutation operation is to decrease the probability of the GA
staying at local optimal solution. The mutation operation increases the randomness in
the GA to increase the probability of the GA to test a large feasible region for an
optimal solution. A simple mutation operation selects one chromosome from the
current population based on the fitness function evaluation to be the parent, and
selects the location of the mutated bit in the parent randomly. The next offspring will
be the same as its parent with a complemented bit value in the mutated bit location.
For example, if the current chromosome is 011 land the mutated bit location is 3, then
the bits of the next chromosome will be the same as the current chromosome except
the 3th bit will be changed from one to zero. The next chromosome will be 0101.
operation is used to generate the offspring, then the next offspring will be a copy of
its parent. The reproduction operation is used to increase the numbers of the
chromosomes that have a high fitness function evaluation in the current population.
This will increase the probability that the chromosomes with the highest fitness
10
1.2.4 Termination Criteria
converge and diverge criteria. The convergence criteria terminate a GA, and the
algorithm in this case finds a potential solution. The divergence criteria terminate the
single solution. The chromosomes converge to a single solution when the sum of the
value [3].
GA terminates the search when the number of the generation exceeds the
of iterations [3].
In chapter 2, a literature review of the binary coded and the real coded genetic
11
optimal solution. Several unconstrained optimization problem with different features
methods are proposed to solve constrained optimization problems. The first proposed
problems.
In Chapter 5, the power flow and optimal power flow of a power system
network are introduced. The Multi-Scale Algorithm was used to solve the optimal
power flow of the IEEE-26 bus and the IEEE-30 bus power system networks.
12
CHAPTER 2
LITERATURE REVIEW
The first optimization methods were related to Newton, Lagrange, and Cauchy
minxf(x),xeR" (2.1)
C,(JC)<0
C2(x)<0
(2.2)
C m (x)<0
mmXAL(X,A)
(2.3)
L(X,Z) = f(X) + A]Cl+A2C2+... + AmCm
13
problems were developed because of the existence of high-speed digital computers
[6]. The numerical optimization methods can be divided into linear, nonlinear,
with linear equality and inequality constraints. The simplex method by Danzig
in 1947 is the most efficient and most famous linear programming method [6].
important [6].
Minimize /„ (X) and subject to ft(X) <\,i = \,...,Iand gk(X) = \,k = l,...,K.
methods because of the large search space, large number of constraints, multiple local
14
optima and the difficulty of finding explicit formula for the objective function [6]. For
Kroese [8], random search by Zhigljavsky [9] , basin hopping technique (a.k.a. Monte
Carlo) with minimization [10,11], stochastic tunneling [12] and genetic algorithm
heuristic methods increase the probability for finding the global maxima/minima of
optimization problems.
The control variables of the optimization problem are usually called genes in
genetic algorithms (GA), where these genes are joined linearly together to create the
using a coding operation. Based on the coding operation the genetic algorithms can be
classified into two types; small alphabet cardinality genetic algorithms and higher
The binary representation of chromosomes was used in most of the early work
of the genetic algorithm based on the Schema Theorem. The Schema Theorem was
created by Holland [15] and it recommended the use of small alphabet cardinality.
The Schema theorem is "short schema with better than average costs occur
15
exponentially more frequently in the next generation. Schema with worse than
average costs occur less frequently in the next generation" [16, page 534].
The term schema is used to describe a subset of similar strings. For example,
for the binary string of length 4, the schema IddO is the set of binary strings with
length 4 that have Is at position 1 and Os at position 4. The drepresents a don't care
case, which means positions 2 and 3 can be either 0 or 1. The schema IddOis
{1000,1010,1100,1110}.
The defining length of the schema is the distance between the first and last
non d elements in the schema. The order of the schema is defined as the total number
of non d elements in the schema (i.e the total numbers of zeros and ones in the
schema). The length of the schema IddOldOd is 6 (i.e 7-1=6) and the order is 4 [14].
schemata available for the genetic procedure; based on that the small alphabet
cardinality will have the greatest information[14]. The information is used to decide
the direction of the search. The Schema theorem states that the schema above the
exponential rate [14]. Goldberg [14] used a simple example to show that a small
alphabet has the greatest information towards the optimal, suppose that the binary and
octal coding was used to minimize a function and the function evaluation of certain
16
Table 2-1 Octal vs binary codes
101 5 1
Oil 3 10
000 0 12
111 7 2
Based on Table 2.1, the binary numbers 101 and 111 have the least function
values, which yield that the schema \d\ will be a useful schema to locate the
minimum value. While in the octal code, it is difficult to determine the useful schema
to locate the minimum solution, since each number in the octal coding represents
itself [14].
Altenberg [17] illustrated that it is a mistake to conclude that the quality of the
(the "needle") has a high fitness, and all the other genotypes in the search space (the
"hay") have the same low fitness. Consider a population in which the "needle" has
already been found. The needle will tend to increase in frequency by selection, while
recombination will most likely generate more "hay". The Schema Theorem will still
be seen to operate, in that short schemata with above average fitness (those schemata
containing the needle) will increase in frequency, even though the fitness of new
17
instances of the schemata (more hay) will not be any more likely to have the high
Simple binary coding needs to define the length of the gene that represents the
control variable, where the length of the gene depends on the range of the control
variables and their resolution. The length of chromosomes increases as the number of
control variables increases or when a higher resolution is required, where the length
of the chromosome becomes tremendously large. One of the drawbacks of the simple
binary coding is the large lengths of chromosome, which slows the speed of the
algorithm [18]. The other drawback of the simple binary representation is the
Hamming cliff problem; it is a term that refers to the problem of representation of two
adjacent numbers in binary, where it is required to change all the bits to get the
adjacent number [18]. For example, if the binary code of the number 63 is 0111111
and the binary representation of 64 is 1000000 then the Hamming distance is 7 [18].
algorithms where in gray coding any two successive numbers are differing only by
one bit [19]. Several empirical comparisons between binary coding and gray coding
proved statistically the advantage of using the gray coding over the binary coding
[19]. The other advantage of using Gray coding is that the mutation operation in this
code allows for mostly incremental changes. A single bit-change using mutation
operation can cause a big change and lead to new properties [19].
18
2.2.1.1 Mutation Operation
the crossover operation to produce offspring. Even so there is a still strong argument
The mutation operation increases the capability of the genetic algorithm to locate the
operations decreases the probability of the genetic algorithm from getting stuck at a
local optimal solution [1]. It gives non-zero probability for all points in the search
space to be chosen. For binary genetic algorithms the rate of mutation operation is
very small because the mutation operation causes small changes in the chromosomes
and especially in the case of the Hamming cliff. In Gray coding, the mutation
operation is more effective, where changing one bit causes a change in the entire
cardinality genetic algorithms, where it usually has the highest rate to generate the
offspring. There are several kinds of crossover operations: the one point, two-point,
given by Goldberg [14], where he mentions that the first real coded genes in genetic
19
algorithms was suggested by Weinberg [20] in his dissertation, where Weinberg gave
brief details of the real coded genes but without any simulation results.
Goldberg [14] has a good explanation of the benefits and limitations of using
either the small alphabet or large alphabet coded genetic algorithms by listing the
One of the advantages of real code representation is that the population statistics
(such as the mean, standard deviation of the fitness function, etc.) can be used as
A critique of the schema theorem was offered by Lee Altenberg [17], where he
illustrated why the Schema Theorem cannot distinguish between a good genetic
algorithm and a bad genetic algorithm. He mentions three drawbacks of the Schema
Theorem: " 1 . The Schema Theorem holds even with random representations, which
cannot be expected to perform better than random search, whereas it has been used to
claim that GAs perform better than random search; 2. The Schema Theorem holds
20
even when the schemata defined by a representation may not capture the properties
that determine fitness; and 3. The Schema Theorem extends to arbitrary subsets of the
search space regardless of the kind of genetic operators, not merely the subsets
Collins and Eaton [21] devised an experimental basis of testing four types of
coding schemes: binary code, gray code, E-code and the real code. They concluded
that statistically the real code representation has the best performance.
Tsutsui, Ghosh, Corne and Fujimoto [22] developed two new slightly different
and exploitation at different stages of the search process. This solves so-called highly
epistemic multimodal problems and deceptive functions. They chose these problems
because they are considered as difficult problems for the previous real coded genetic
algorithms. The novel approach is to use separate populations for exploration to avoid
being trapped in local optima. It restarts mechanism and exploitation to focus on the
neighborhood of the so far best solution. They use an adaptive load balancing
mechanism which allocates time between the explorer and exploiter. The difference
between the two population methods is related to as the problem type. The second
method (exploiter) was developed for the problem that has a known optimal value,
Srikanth and Kamala [23] applied the real genetic algorithm to optimize "the
cutting parameters in turning problem" [23, page 189]. They compared their result
with another optimization method which was used to optimize the problem including
21
a binary genetic algorithm. They concluded that the real coded genetic algorithm is
necessary for fast solving the same constrained optimization problem of the cutting
using dynamic coding proposed by Arakawa and Hagiwara for binary-coded GAs
[24]. It is proposed to solve continuous design spaces [24]. The length of the
precision of the control variables is required. The adaptive range genetic algorithm is
used to overcome this disadvantage of the binary coded genetic algorithms. It allows
small length chromosomes and the ranges of the control variables do not have to be
predefined [24]. The ranges of the control variables will move adaptively in each
generation by using the mean value and the standard deviation of the previous
generation.
Oyama, Obayashi and Nakahashi [25] developed the adaptive range genetic
algorithm [ARGA] for floating point presentation. The floating point representation
of the genes was proposed to enhance the adaptive range of a genetic algorithm in
three ways: "The first one is how to select the system parameters and on which
robustness and efficiency of ARGAs largely depend. The second one is the use of
constant intervals even near the center of the normal distributions. The last one is that
since genes represent relative locations, the offsprings become constantly away from
the centers of the normal distributions when the distributions are updated" [25, page
714].
22
The developed scheme of the adaptive genetic algorithm was applied to a
aerodynamic airfoil shape optimization problem, and it was concluded that the real
coded adaptive range genetic algorithm have two advantage compared to the other
genetic algorithm; first it located a better solution and second it ensures the feasibility
close to natural evolution. Any good search algorithm must explore a large search
space in the beginning then narrows when it converges to a solution" [26, page 159].
adaptive behavior in the real coded genetic algorithm with specialized recombination
operators in which the children solutions is proportional to the parent solutions [26].
string genes and real coded genes. In the binary coded genes a mutation operation is a
bitwise complement operator. The mutation operator in real coded genes is used to
perturb the selected control variables to locate a best solution. The mutation operation
in real coded genetic algorithm can easily do hill climbing in the decision space (see
section 2.2.1); while this is difficult for mutation in the binary coded genetic
algorithm, this can cause the genetic algorithm to experience Hamming cliffs. The
cardinality representation genetic algorithms. For that reason the higher cardinality
23
genetic operation has a high mutation rate compared with the binary genetic
algorithm [27].
presented in matrix form. The number of columns is equal to the number of genes that
represent the control variables. The numbers of rows equal to the number of
given:
g 21 g
Population= . >2 [" g N
] .
can be summarized as follows [28]: first determine the number of offspring that will
equal to the mutation rate multiplied by the population size). Secondly, the location of
the mutated control variables is selected randomly. Finally, the selected control
variables will be changed to values selected randomly from the control variables
ranges.
the control variables range are 0 < xx < 3, 2 < x2 < 6 and the mutation rate is 0.2.
The size of the population matrix will be ( 7 x 2 ) . The number of offspring that will
24
0.2x14 « 3. If the selected locations of the mutated control variable are (2,1), (3,2)
and (5,2), this means that the first control variable for the mutation operation is
located at the second row and the first column. The second one is located in the third
row and the second column. The third mutated variable is located in the fifth row and
the second column in the population matrix, refer to equation (2.4). The selected
'gll gn'
gll gn
831 #32
population matrix £41 #42 (2.4)
£51 #52
#61 #62
.gll £72 _
gll gn
g'll gn
#31 g\i
population matrix = <?41 gn (2.5)
gsi g\i
gei gei
gn gn
where g'2x= random number e [0,3] and g'32,g'52 = random numbers e [2,6].
the binary and the floating point representations in genetic algorithms. From their
25
experimental results they concluded that the floating point representation is faster and
provides a higher precision. In this instance the high precision of the length of the
binary coded chromosome will be very long especially for a large number of control
variables. They also proposed a dynamic mutation operation for the floating point
representation. The digit location is selected uniform randomly while the value of the
selected digit is chosen in such a way that there will be a uniform search at the
beginning of the search and it will be close to zero at the last stage of the search to
individual parameters. He suggested a new way to deal with two problems in the real
representation mutation operation: the distribution size of the mutation operation and
how to keep the mutated variable within the specified range. The maximum mutation
rate is defined before starting the algorithm where he chose three maximum mutation
rates 0.1, 0.2 and 0.3 through his experiment. In order to prevent the mutated
parameter to go outside its range, the mutated parameters are chosen using a uniform
distribution between the parameter and the parameter plus or minus the maximum
mutation rate. If the parameter is closer to the edge of the range than the maximum
mutation size, then the new value of the parameter is chosen using a uniform
distribution over the interval between the parameter and the edge of the range.
J. Leite et al. used a real coded representation of the control variables with an
efficient scheme for crossover and mutation as proposed in [30]. The mutation and
crossover properties are dynamically adaptive through the optimal search based on
26
the population behavior. In this experiment the control variable ranges for the
optimization problem are specified by trial and error. The optimization procedure is
repeated several times to reduce the variable ranges which increase the results
precision and facilitates the search toward the global minimum. The final solution can
only be considered optimal after using the algorithm several times and obtaining the
Collins and Eaton [21] used two types of mutation operations: step and
x 2x 3x 5x 6x Ix 8x
step(x) = x' e and
4 4 4 4 4 4 4
\x'e{0X...,b} if x>0l
stochastic(x)= < >.
[x'e {a,...,0} if x<0J
They tested each mutation operation separately and they found that the stochastic
The single point random mutation was used by Srikanthand and Kamala [23]
gene gt € [at, bt ] is the selected genes to be mutated, then the mutated value of the
genes g\ is replaced by a random value from range [a,, bt ] and the new offspring will
beG(t + \) = [g],g2,...,g'l,...,gn].
27
2.3 Summary and Conclusion
Early genetic algorithms used small alphabet coding based on the Schema
Theorem. A small alphabet will have the largest number of schema. Recent
researches showed that large alphabet genetic algorithms have better performance in
randomness of the search in order to decrease the probability of the GA getting stuck
algorithms. The mutation operator in real coded genes is used to perturb the selected
control variables to locate a best solution. The mutation operation in real coded
genetic algorithm can easily do hill climbing in the decision space, while this is
difficult for mutation in the binary coded genetic algorithm, which can cause the
mention that there are existing algorithms called Multiscale Genetic Algorithms. The
principle of the Multiscale Genetic Algorithm is to use fine and coarse numerical
grids during the simulation [1,2]. The advantage of using both models is to improve
the solution quality and to provide a faster convergence rate than the simple Genetic
Algorithm [1,2]. The multi-scale here is applied in the population grid (size), where it
28
can be changed during the search, so instead of having a large population and taking
extra computing time, the size of the population can be changed through the search by
starting from a small population, then increasing the population size to find a good
29
CHAPTER 3
MULTI-SCALE ALGORITHM
genetic approach. It is a real coded genetic algorithm, where it is not required to use a
coding operation to represent the control variables in the population. Therefore, the
algorithm doesn't require defining the control variable limits or their resolutions. The
algorithm is called the Multi Scale Algorithm because it uses different scales during
the search. In the beginning of the search, it uses a large scale to cover a large feasible
region; then the scale is reduced to have a finally small scale around a potential
solution. Since the control variables in the MSA have a real representation, the multi-
scale search can be performed by changing the most significant digits of the control
variables randomly during the first iterations; then as the number of iterations is
increased the next digits will have more probability of being changed. Finally, at the
end of the search, the last digits of least significance will have the most probability to
be changed.
two parameters in the mutation operation; the first one is the digit location and the
second one is the value of the selected digit. For example, if the parameters of the
mutation operation are (5,7) this means to select the fifth digit on the current string
30
and modify it to 7. So, if the current string is "123.4567" then the next string will be
"123.4767".
The first parameter of the mutation operation (digit location) can be selected
using the random generator that is shown in Figure 3.1. The selection of the bit
location can be divided into several stages, where at the first stage the digits of the
control variable are equally divided into two groups and they are labeled as group 1
and group 2. Then the selected group from the previous stage is divided into two
groups and they also are labeled as group 1 and group 2. These stages will be
continued until each group has only one digit. Figure 3.1 shows the probability of
each group to be chosen versus the number of iterations for three stages, where the
number of iterations is chosen arbitrary to be 1000. Figure 3.2 shows the sequence of
Table 3-1 shows the group that has a higher probability of being selected for
several iteration intervals (the total number of iteration is set to be 1000). The first bit
location has a higher probability to be chosen at the first 125 iterations. The second
digit has a higher probability in the second 125 iterations, and the third digit on the
third 125 iterations; this is will continue until the last 125 iterations are finished.
Although there is a single digit that has the highest probability to be selected at each
iteration, the other digits still have a non-zero probability to be chosen through all the
iterations. This feature of the MSA increases the probability that this algorithm will
locate the global optimal solution and does not get stuck at a local optimum solution.
For example, if the first digit will be changed only during the first 125 iterations, then
31
it will be fixed. This may cause the algorithm to get stuck at a local optimum area and
The second output of the mutation operation is the bit value. The bit value is
1
group 1
o5
0 100 200 300 400 500 GOO 700 800 300 1000
number of iterat ton (k)
(a)
group 1 ~~—
05
_.''''" group!
0 100 200 300 400 500 600 700 800 900 1000
number of iteration (k)
\ ^ grdup 1
0.5
.-'group! **• \ 1 - L- i i "- ^ ' i
1 " ^ i
0 100 200 300 400 500 600 700 800 900 1000
number of iteration (k)
<c)
Figure 3.1. Random generator of the digit location of the mutation operation
Table 3-1 The group that has the highest probability of being selected for several
iteration intervals
32
Stage 1
Group 1 ^ = " 1 2 3 4 "
Group2 x^="5678"
Yes
Stage 2 Stage 2
Groupl JC^J ="12" Groupl jt^|="78"
Group2 JC^J = "34" Group2 3^2 = "56"
33
A population in the MSA can be created in two ways: the first one is to start
from a single chromosome, then the first population will be the possible outputs of
applying the MSA to the initial point. Thus the initial population will be multi-scaled
strings of the initial point. Based on the function evaluation of the candidates of the
population, the best string will be chosen. For example, if it is required to minimize a
function, then the best string will be the string that has the least function evaluation.
The next population will be generated by applying the Multi-Scale Algorithm on the
selected string from the previous population. The other way is to start from an initial
population, which is selected randomly, then perform a large scale of the current
population at the first iterations to create the next population. As the number of
iterations increases the small scales will be applied to the all strings in the population.
The pseudo code of the mutation operation as shown in Table 3-2. The required
Mutation Function
y =Mutation(x, k) % x is the selected string to be mutated
% k is the number of iteration.
[xl, dotloc]=Removedot(x) % Removedot is a function created to
% remove the dot from the selected string
% xl is the same as x but without the dot
% dotloc is the location of the ',' in the
% string x
Loc=Randgen(k) % Randgen is a created function to select
% the digit location based on the number
% of iteration (k).
xl(Loc) = integer(9*rand(l,l)); % the value of the selected location is
% selected randomly
y = Returndot(xl,dotloc) % Returndot is a created function to return
% the dot back into the string
34
Table 3-3 Pseudo code of the required functions of the mutation operation
Randgen Function
Loc =Randgen (k) % Randgen is a function created to
% select the digit location
% k is the number of iteration
% Loc is the digit location to be mutated
Rand = random(l,l) % Rand is a random value in [0,1]
Randv=Rand*[l;l;l] % Randv is a vector of length 3.
PG = [ 1- (k/kmax)
1 - (2k/kmax)
Minimum (|l - (4k/kmax)| 3-(4k/kmax)|];
% PG is a vector of length 3, it
% represents the equations of
% the random generator in the
% MSA.
V = 0.5* (sign( PG-Randv)+1) % V is vector of length 3to present the
% selected group of the three stages
xx = [ 6 5 7 8 3 4 2 1] % xx is the possible digital location
% the digits locations are arranged to be
% compatible with the group labeled.
Value = 4V(1) + 2V(2)+V(3) +1 % Value is used to determine the digit
location from the vector xx.
Loc= xx (Value);
Returndot Function
Y =Returndot(X,dotloc) % Returndot is a function created to
% return the dot to the selected
% string X in the location dotlocation.
For 1=1 To(dotloc-l)
Y( I) = X (I)
End
Y(I+1)=7
For I = locdot+1 To length(X) + 1
Y(I) = X(I-1)
END
Removedot Function
[Y, dotloc]=Removedot(X)
J=i;
For 1=1 tolength(X)
If(X(I)~=0)
Y(J) = X(I)
J = J+1
Else
dotloc = I
Endif
End
35
3.3 Unconstrained Optimization Problems
problems are problems that need to optimize a given objective function without
constraints, where the search space is the entire space. Constrained optimization
problems require optimizing the objective function within a feasible region, where the
optimization problems, the MSA will be used in this chapter to solve unconstrained
optimization problems for two reasons. First, we will be able to demonstrate the
capability of this algorithm to locate the optimal solution for optimization problems
with different features. Second, there are methods that handle constrained
as the Lagrange method and the Penalty method. Constrained optimization problems
In the case of a single variable function, there is only one direction used to
search for the optimal solution. The MSA will be used to locate the optimal solution
36
1
Problem #2 Maximize f(x) = sin 3
(3.2)
x +2x + 2
The first problem is an example of a polynomial problem that has one global
minimum point located at x = -2, and one local minimum point located at x = 1.
Figure 3.3 shows a sequence of the points that is founded by the MSA starting from
an initial point. The algorithm was tested in its ability to locate the global minimum
point starting from different initial points, where four starting points are chosen; one
near the local minimum point, one near the global minimum point, one between
global and local minimum points and one located at the local minimum point. These
starting points are shown in Figure 3.3-a, Figure 3.3-b, Figure 3.3-c and Figure 3.3-d
Figure 3.3. Convergence of x versus / ( x ) = 3x4 + 4x2 -12x 2 for different initial
points
37
The pseudo-code of the MSA for locating the optimal solution of Problem#l
pseudo-code of Problem #1
x='+00.000000' % Starting value of the string.
xi=x;
f=3x A 4+4x A 3-12x A 2 % The objective function
err= 100 % initial value of the error
k=l % initial value of the iteration number
j=l
kmax=1000 % maximum number of iterations
tolx=le-6; % desired tolerance of the variable
tolf=le-6; % desired tolerance of the function value
while ( err > 0 & k < kmax)
xtr=Mutation(x,k);
xl=x+xtr;
fl=3xl A 4+4xl A 3-12xl A 2
If (fl < f )
x=xtr
xminmum=xl
fminimum=fl
errx=absolute (xi-xl)-tolx
erry=absolute (f-fl)-toly
err=minimum(errx ,erry)
xi=xl
f=fl
End if
k=k+l
End
equivalent to minimizing the objective function - f{x). The objective function in this
problem has a time-varying frequency as shown in Figure 3.4, where this function has
multiple global minimum points. Most of the time the MSA locates the global
minimum value at x =-0.582744. Figure 3.4 shows the sequence of the search
points. Table 3-5 and Table 3-6 show the results of the MSA for locating the global
38
minimum solution of optimization problem #2 for different initial points. The global
minimum points of problem #2 are located in the interval [-1,1], so to focus in this
region the interval [-1,1] is divided into subintervals of a length of 0.2. The MSA was
run 10 times for a different initial point that is selected randomly from the
subinterval. After this, the value found by MSA is recorded in Table 3-5. Table 3-6
shows the result of running the MSA 10 independent times for the same initial point,
and it records the value that the MSA converges at each run
O)
Figure 3.4. (a) The convergence of the an arbitrary initial point to the global
minimum point of the function / ( x ) =-sin(— ) and (b) a zoomed area
x +2x + 2
around the global minimum point
39
Table 3-5 Ten independent runs of MSA for problem #2 for several subintervals
40
Table 3-6 Ten independent runs of the MSA for different initial points
-0.5827 -1.0 -0.5827 -1.0 -0.5827 -1.0 -0.5827 -1.000 -0.6015 -0.9880
-0.5827 -1.0 -0.5827 -1.0 -0.5828 -1.0 -0.5823 -1.000 -0.8252 -1.0000
-0.7366 -1.0 -0.5827 -1.0 -0.5814 -1.0 -0.5826 -1.000 -0.5827 -1.0000
-0.7629 -1.0 -0.5827 -1.0 -0.7642 -1.0 -0.5827 -1.000 -0.7946 -1.0000
-0.5827 -1.0 -0.7365 -1.0 -0.5827 -1.0 -0.8252 -1.000 -0.5827 -1.0000
-0.5826 -.58 -0.5827 -1.0 -0.7861 -1.0 -0.5827 -1.000 -0.5827 -1.0000
-0.1910 -1.0 -0.5827 -1.0 -0.7946 -1.0 -0.5827 -1.000 -0.5827 -1.0000
-0.5827 -1.0 -0.8252 -1.0 -0.7821 -1.0 -0.5827 -1.000 -0.5827 -1.0000
-0.5827 -1.0 -0.7946 -1.0 -0.5820 -1.0 -0.5827 -0.999 -0.5827 -1.0000
-0.5828 -1.0 -0.5827 -1.0 -0.5827 -1.0 -0.5827 -1.000 -0.5846 -0.9999
As it is shown in Figure 3.4 the global minimum points lie either on the
interval [-1 -0.7] or at the point -0.5827. The genetic algorithm in MATLAB® was
used to locate the minimum value of problem #2. The search interval of the genetic
function is [-2 2], then the genetic function is run 100 independent times to locate the
minimum value of this problem. The results can be classified in to three regions; the
first one, the global minimum points lie in the interval [-1 -0.7], in the second, the
minimum point is at -0.5827 and the third one, there is no correct solutions, where the
results are not optimal. In each run of the MATLAB® genetic algorithm, the optimal
solution is recorded if there are no warning messages for the divergence. Table 3-7
shows the results of genetic function to locate the minimum value of problem #2 in
the interval [-2 2]. It shows the number of times that the genetic function locates the
optimal solution in the interval [-1 -0.7], -0.5827 and a non-optimal solution.
41
Table 3-7 The optimal solution of problem #2 for 100 independent runs of genetic
function in MATLAB® and MSA
The function of problem #3 has multiple local minimum points and one global
minimum point located atx = 0.01571111. The function in this problem has two
features:
1. The function has two terms; one of them is considered as a high frequency
2. Function evaluations of many of local minimum points are close to the global
minimum value. Figure 3.5 shows the sequence of the search points toward
Table 3-8 shows the results of the global minimum points of problem #3 using
the MSA for different initial points. The MSA was run ten independent times for
different random points, which are selected randomly from each interval listed in
Table 3-8.
42
Table 3-8 Solutions of problem #3 for 10 independent runs of MSA for different
initial points
Interval Convergence points
Point Function Number of times the method
evaluation converged
[-110,-90] -0.0157 -0.9998 6
0.1099 -0.9879 1
0.0471 -0.9978 1
-0.016 -0.9993 2
[-90,-70] -0.0160 -0.9993 2
-0.0157 -0.9998 5
0.0471 -0.9978 2
0.1099 -0.9879 1
[-70,-50] -0.0160 -0.9993 1
-0.0157 -0.9998 7
0.1100 -0.9879 2
[-50,-30] -0.0157 -0.9998 6
0.1098 -0.9878 1
-0.0160 -0.9993 2
0.0470 -0.9978 1
[-30,-10] -0.0157 -0.9998 8
-0.0160 -0.9993 1
0.0478 -0.9954 1
[-10,10] -0.0157 -0.9998 10
[10,30] -0.0157 -0.9998 8
0.0471 -0.9978 1
-0.0160 -0.9993 1
[30,50] -0.0157 -0.9998 9
-0.0160 -0.9993 1
[50,70] -0.0157 -0.9998 10
[70,90] 0.1100 -0.9879 1
-0.0157 -0.9998 8
0.0471 -0.9978 1
[90,110] -0.0157 -0.9998 10
43
1.5
X 0.5
-0.5
Figure 3.5. The sequence of the search x-values of function f(x) = x2 + sin(lOOx)
starting from arbitrary initial point
The cyclic coordinate method [34] performs a sequential search along the
coordinate axes of the control variables, where the direction is parallel to one of the
coordinate axes, while the other variables are kept constant until a success point is
founded. Then the search direction is changed to the direction of the second control
variable axis. The cyclic method for minimizing unconstrained objective function of
44
1. Start from initial values of the control variable (XQ = [x10,x20,...,x„0])
2. The direction of the search will parallel to the ilh control variable axis.
6. Go to step 2.
The direction of the search in the cyclic coordinate method can be used in
MSA, where instead of using a step size in line search, the MSA will use multi-scale
search of the MSA to locate the minimum solution of the objective function.
45
Figure 3.6. Plot of the function f(x,y) = (x-2)2 +(x-2y)2, (x*,y*)is the location
of the minimum solution of the objective function
! \ i 1 • — _ 1 1 1
.
Figure 3.7. Contour plot of the function / ( x ) = ( x - 2 ) 2 +(x-2> , ) 2 and the sequence
of the success points starting from (x 0 , y0) to minimum solution (x*, y*) using cyclic
method
The drawback of the cyclic method is that it is very slow and inefficient to
locate the optimal solution within a flat area like the Rosenbrock function (as will be
discussed later).
46
In the method of Hooke and Jeeves [35], there are two types of searches,
exploratory and pattern search. The exploratory search is the same as the search in the
cyclic coordinate method and the pattern search is along the direction of the line that
passes through the last two successive points. Figure 3.8 shows the point sequence to
locate the minimum value of the function f{x,y) = ( x - 2 ) 2 + (x-2y)2 using the
search topology in the Hook and Jeeves method with MSA. The search method is still
-1
-2
3 -i i . -• ~ i.. J i
- 3 - 2 - 1 0 1 2 3
x
Figure 3.8. Contour plot of the function f(x) = (x - 2)2 + (x - 2y)2 and the sequence
of the success points starting from (x 0 , yQ) to the minimum solution (x*, y ) using the
Hook and Jeeves method
When these methods were used in MSA to locate the optimal solution of
functions of two variables, satisfactory results were obtained for some objective
functions, but unfortunately, not for all of them, especially those with a flat area near
47
the global optimum solution. In order to increase the capability of MSA to find a
suitable path toward the optimal solution, the search direction in the MSA will be
based on polar coordinate axes. The control variables in the polar coordinates are
radius (r) and angles (6>,), the multi-scale strategy will be applied to the radius while
the angles 0, will be randomly uniformly distributed in [0,2;r]. Using the polar
coordinate axes to specify search directions will allow the MSA to find the suitable
path from the current point to the optimal solution. Using (3.4), it becomes easy to
transform the polar coordinate control variables to x-y control variables as follows:
x = r cos(8)
(3.4)
y = r sin(#)
xN=rf[cos(0,) (3.5)
1=1
The search control variables r,6^,92,...,9N_x can be calculated in term of the original
48
tan(0„)= \-^— forn=l,2,...,N-l (3.7)
I i=n+\
Now the MSA will be used to locate the optimal solution for unconstrained
The MSA will be used to locate the optimal solution for several unconstrained
objective functions with different features: a flat area around the optimal point,
multiple local minima, high nonlinearities, and multiple local optimal points.
called the Banana function, it is one of the best test functions because of the way that
its curvature bends around the origin. The difficulty of locating the minimum solution
of this function is due to "the minimum point being located in a long narrow curved
valley [36 page 3915]. The plot of the Rosenbrock function is shown in Figure 3.9.
The minimum point of the Rosenbrock function is zero and it is located at (1,1).
Sequences of the search points toward the minimum value of this function are shown
49
4000 v - -
-2 -2
>. o >> o
> o > o
Figure 3.10. Contour plot of the banana function for different initial points with
sequences of search points, (a) x0 = 0,^ 0 = 0 (b) x0 = -l,yQ = - 1 ,
(c) x0=l,y0=3and (d) x0 = 3,y0 = 0
50
The pseudo code of the MSA for locating the minimum value of the
51
3.3.3.2 Goldstein and Price Function I
The Goldstein and Price Function I [36] has four local minimum points
located at (1.2,0.8), (1.8,0.2), (-0.6,-0.4) and (0,-1). The last point (0,-1) is the global
The contour plot of this function is shown in Figure 3.11. Figure 3.12. shows the
sequence of the search points starting from one of the other local minimum points.
52
1.2
Figure 3.12. Plot of the sequence of points of Goldstein and Price Function I for
different initial points, (a) (1.2,0.8) (b) (1.8,0.2) (c) (-0.6,-0.4)
1 + y2 x2y2+100
The function Jf(x,y) = — 12 + x2 + •+ [36] has four
" 10 x y
2.0297) and (1.7435, 2.0297), where f(X*) = 1.74 . Figure 3.13 shows a contour plot
of this function. Figure 3.14 shows the result of the solution using the MSA for
different initial points. The square area bounded by -3.25 < x < 3.25 and
-3.25 <y < 3.25 is divided into 169 sub-squares. In each sub-square, a point is
selected as an initial point for the MSA to locate the optimal solution, then the colors
are used to distinguish between the global minimum points that the MSA converges
53
for each sub-square. The blue color is related to the point (1.7435, 2.0297), the green
color for (1.7435, -2.0297) point, yellow color is for the (-1.7435, 2.0297) and the red
color is for (1.7435, 2.0297). As it is shown in Figure 3.14 even when the starting
point is near one of the global minimum points, the MSA still has the capability to
Figure 3.13. Contour plot of Eason and Fenton's gear train inertia function
», o
-1
-2 • * • ! ireer
-3
-1
Figure 3.14. Solutions of Eason and Fenton's gear train inertia function found
using MSA for different initial points
54
3.3.3.4. Multiple Local and Single Global Minimum Function
local minimum points as shown in Figure 3.15 and one global minimum point is
located at (0,0). Figure 3.16 shows a contour plot for this function and the sequence
of the points as found by MSA starting from different initial points. The MSA
(i '•> 7 I I
f(x,y) = 20 + e- 20exp(-0.2 - ( x 2 +y ))- exp(-cos(2nx) + -cos(2ny))
The function has multiple global minimum points and a single global minimum point
at (0,0) as shown in Figure 3.17. Figure 3.18 shows the contour plot of this function
includes the sequence of the success string toward the global minimum point.
55
(b)
2 -V^J s'O^'
-"' '^'
0> '«$> CQ> 'o> c^> . o
1 1^ '@j k€2> ; ' ^ ) c cc
><<^> KO> 'm .-a '0 CI Co;>
o> r
„ ' CO C-t } &1 -ro)
>, 0 >, 0 ^ ' C^5, 1
—^S^ c^
<CS ^o ciJ ^ Co; '(p). ,. CO c.-), CoC
-1 P> v<^> ^ ^ '^ -1 >/ '@> « C<g)> c;
0 > ' to) (o5 " ^
CQ) cO> fS.f 'Co) ct3>
-2 -7*>i-. rrs rrT^ -2 7T^ f^, ,r->,-
-1 0 1 -2 0
x x
(c) (d)
2 2 FT ^ 3 ^ •i~^LJ.- -S^U • ^
CO) "'Co>' Co) cc$>
1 1 ?:; ®- ^ -<§o :Q
v
o " <{_>, C»,> " CoV 'cod co „- co COD
> 0 ^>; ^ C C@>.x ' & '5 > 0
0> ^O-> v. » ' & <£
;co> ~' <.'-? T <c-t cot Co) C-C roC
1 &' v<gS$> ' ' W ' '*H>'~ <£ -1 ^ ^ ^ <^' £
COC ;o> £ ? f 'coc ^ 5 Xo> , Co> CQt
-rTv, £2i: £ ^ - -2Sij< ^ i , ,'r^,. -rix- ""
-2 -1 0 1 0
X x
A c k e l y function
8 -,
s; 4
x
-2 -2
56
Figure 3.18. Contour plot of Ackley function including a point sequence provided by
the MSA to locate the global minimum of this function starting from the point (1,1)
In this section the MSA will be used to locate the minimum solution of two
unconstrained objective functions; the Powell quartic function and the Wood
Chapter 4.
The function has a minimum point located at (0,0,0,0). The minimum point of
this function is difficult to locate since the function has a four dimensional flat area
57
around the optimal point [36]. The minimum point that was found by the MSA is
The Wood function is a four variable polynomial [36], where the function has
convergence criteria of optimization algorithms, since this function has a flat area that
causes the optimization algorithm to get stuck far away from the optimal solution
[36]. Results found using the MSA for 1000 iteration is shown in Table 3-10.
The main idea of the MSA algorithm was explained in this chapter. The
mutation operation in the MSA makes the MSA more likely to locate the global
58
unconstrained optimization problems to investigate the capability of the MSA
algorithm for locating the optimal solution. The MSA was used to solve three single
variable functions with different features such as multiple local optimum solutions
and time varying frequency. For two variable functions, search directions using the
polar coordinate axes allowed the MSA to search a large area in all directions to find
a suitable path to locate the optimal solution. Several two variable functions with
different features were solved successfully by the MSA. The idea of transforming the
control variables to the polar coordinates was generalized for N variables functions. It
can be concluded based on the results of optimal solution using MSA for the selected
optimization functions that the MSA has the capability to locate the global solution
59
CHAPTER 4
4.1 Introduction
search region is called the feasible region and it is usually defined by a set of
inequality and equality constraints involving the control variables. Thus, the
Subject to:
y{"+m+k space. These primarily include the Lagrange and Penalty methods.
60
Where A ; ,// 7 are called Lagrange multipliers, which are also referred to as adjacent
the Lagrange objective function L(x,A,ju) with respect to the control and adjacent
8L df A , dhj * dg
= ^-+>A— +\M,— = 0
> i = \,2,...,n
dxt dx, 7^ dx, ~( dx, (4.5)
—— = h(x) = 0, j = l,2,...,m
(4.6)
o r
- — = g,(x) = 0, j = l,2,...,k
(4.7)
The Lagrange function of this problem is L(x,y, A) = xy2 + A(x2 + y2 - 1 ) . The partial
— = y2+2Ax = 0
dx
— = 2xy + 2Ay = 0 (4.10)
dy
^ = x2+y2-l =0
dA
61
The solutions of the above equations are
(\ 2] 9
r i -2^ f - 1 2^
lV3 ' V3 J LV3 ' V3 J'
-1-2^
and . The minimum value of this problem is —1= and it is located at the
3V3
~\ f
•1 2 -1 - 2 ) 2
points and
V3 ' V3 J I V3 ' V3 . The maximum value of this problem is —j=
3V3 and it
f
1 l\ ,( 1 -2
is located at the points . A plot of this function is shown in
Figure 4.1.
Figure 4.1 shows the plots of the constraint h(x,y) (solid line) and function
f(x,y) = c (dashed lines) for different values of the constant c. The two functions
2 -2
h{x, y) and fix, y) = c are tangent when the value of the c is equal to —-= and —j= .
3V3 3v3
62
4.2 Penalty Method
The penalty method is one of the famous methods that replace a constrained
objective function of the unconstrained optimization problem will then have two
terms; one is the constrained objective function and the other term is called the
penalty function. The penalty functions are appropriate functions to measure the
The penalty function evaluation is nonzero when the constraints are violated
and is zero in the feasible region, where constraints are not violated. The constrained
m k
1=1 /=i
Here <f> and (p are continuous functions, where the main characteristics of them are as
follows [34]
<p<y)>0 ify*0
63
cp{y) = \y\P (4.15)
constraints h(X). The value of this function is zero when there is no violation in the
the feasible region. The function <f>(y) is used to present the inequality
constraint g(X), the value of this function equals zero when the solution is inside the
feasible region (i.e y < 0); otherwise, the (p{y) value is positive and proportional to
the solution is feasible (i.e y < 0), then the value of max{0, y) is zero, and if the
solution is unfeasible (i.e y > 0), then the value of max{0,y} is>>.
penalty multiplier. The purpose of the penalty multiplier is to increase the effective
weight of the constraint violation to prevent the search from going outside the
feasible region. The penalty multiplier represents the weight of the penalty functions
in the new unconstrained objective function. The importance of the penalty parameter
is to keep the search within the feasible region. Within the boundaries of the feasible
region, violations of the constraints are very small and will not be enough to keep the
solution within the feasible region. If the penalty function is multiplied by a large
number, then the small violation of the constraints will be more effective to prevent
the search from locating unfeasible solutions. The constraint h(x, y) is zero at feasible
64
optimal solution which means that the optimal solution of the objective function
f(x,y) is the same as the optimal solution of the penalty objective function U(x,y).
The optimal solution for several values of c is shown in Table 4-1. These results were
of a certain format. In this problem the MATLAB® genetic function will be used to
solve the unconstrained objective function as described in Equ.(4.16). For each value
of c, the MATLAB® genetic function was run 100 times and the average of the
Table 4-1 Minimum function values obtained using penalty function with different
values of c
65
The effect of the value of the penalty parameter is shown in Table 4-1, where
increased. At the same time the minimum function value is increased as the penalty
parameter is increased. In Table 4-1 the penalty parameter is kept constant through
Penalty parameter, the penalty functions can be classified as: Death Penalty,
Static Penalty, Dynamic penalty Function and Adaptive Penalty Function [38,39].
In the Death Penalty Function, the unfeasible solution is rejected through the
search, in order to maintain the search inside the feasible region. For some feasible
regions such as convex feasible regions the method is supposed to have good
find feasible solutions especially for the optimization problems that have a lot of
constraints [38]. In this case the Death Penalty Function will spend too much time to
locate feasible solutions by investigating all constraints [38]. Besides that, sometimes
unfeasible solutions may be more useful to locate the optimal solution more than
feasible solutions, especially when the unfeasible solution is closer to the optimal
constant penalty in the objective function. The penalized objective function would
66
then be the objective function plus a penalty function. The static penalty function of
m+k
Minimize U(X) = f(X) + YdC,al"(X) (4.17)
The value ofp is often 1 or 2, and C, is a constant penalty imposed for the violation
of constraint i.
The penalty parameter in a dynamic penalty function varies with the number
increased [38, 40, 41, 42]. The advantage of increasing the penalty parameter over the
search is that the violation of the constraints becomes very small most of the time
near the optimal solution. By increasing the penalty parameter, the weight of the
search from locating unfeasible optimal solutions. A typical example of the dynamic
m+k
U(X) = f(X) + r (0£ < (X) (4.19)
1=1
parameters, where there is only a single penalty parameter V(t)fox all constraints.
67
One of the difficulties of the dynamic penalty function is to choose these parameters.
The constraints are intersected in two points (3,6) and (5,2) as shown in Figure 4.2;
one of them is the minimum point (5,1) and the other is the maximum point (3,6)
68
O 2 4 O 8 lO 12 14
x
The minimum solution of the problem is 29 (/ min =29) and it is located at (5,2),
function method, where the new unconstrained objective function will be:
U(x,y) for several values of penalty parameter cis shown in Table 4-2. The genetic
algorithm in MATLAB® was used to calculate the optimal solution of U(x, y),
where for each value of c the program was run 10 independent times to calculate a
solution. Then the mean value of the referred values and the mean value of
69
Table 4-2 Mean value of 10 trials of the genetic function in MATLAB® for
solution of a constrained optimization problem
Table 4-2 shows that, when the value of c increases, the constraint violations
decreases, since the increasing of the value of the penalty parameter will increase the
for a small violation of constraints, the constraints will multiply by a large penalty
parameter to prevent the search from going outside the feasible region. For the mean
optimal solution of f{x,y), let us examine the location of solutions for c = 100 from
Table 4-3. The location of the minimum solution converges to the point (3,6) at the
first, fifth and eighth trial, while in the other trials it converges to (5,2). Recall that the
and the maximum solution is located at (3,6). Also refer to Figure 4.2. Both points
(4,2) and (3,6) satisfy the constraints. By examining these results it is possible to
conclude that when the value of the penalty parameter is increased, then the weight of
70
the penalty function in the unconstrained optimization objective function will
increase. This will cause the search to lead to points that do not violate the constraints
more than focusing on searching the optimal solution of the unconstrained objective
function U(x,y).
If the value of the penalty parameter is increased to a very large value, then
the location of the solution of the constrained objective function U(x,y) will
converge to points that satisfy both constraints. Notice that the values of constraints
near the feasible optimal solution are very small and go toward zero, for that reason
the value of C( in Equ.(4.17) must be increased to prevent the search from going out
Clearly, the penalty method is affected strongly by the value of C,. If the value
of C, is too small, final infeasible solutions may result, and if C, is too large, it may
71
Most of the penalty function methods change the value of C, based on the
to make sure that the changed value of the factor C, is sufficient to prevent the search
from going outside the feasible region without evaluation of the objective function/.
For example, let the objective function be the total cost of a factory, which is
measured by millions of dollars, and one of the constraints is related to the number of
workers, which can be measured by hundreds. In this case the initial value and the
increased rate of C, related to this constraint must be large. Otherwise the opposite
case where the constraints have higher measuring units than the objective function
will lead to choosing a low initial value and low increasing rate of C,.
In summary, the initial value and the changing rate of the coefficient C, is
In the proposed method, adding another factor with the constrained objective
objective function and the constraints to locate optimal solutions. The penalty
m k
function U(X).
72
2. To determine suitable values of the factors C, and C2 that lead the search to
optimal solutions.
The values of C, and C2will be updated in every iteration based on the relative
change of the constrained objective function and the relative change of the
constraints. The relative change of the objective function and the relative change on
A/„ = ^ / ^ (4.25)
Ji-\
h
A A-K-1 l,-h2m,,-x max(g 1 ,,0) 2 -max(g 1 ,_ 1 ,0) 2
Aa n = m a x [ ^ ,...,
h i,,-i h m,i-\ max(g, ,_,,0)
(4.26)
max(gk, ,0)2 - max(gyt,_, ,0)2
™ax(g iM ,0) 2
If the relative change in the constrained objective function Afn is greater than the
relative change in the constraints Aa„, then the value of C 2 will be increased;
The value of s represents the proportion of the initial weight that will be
given to the constraints. The changed rate of the penalty parameters is given by:
73
A C (4 28)
>.<=T^ -
In many constrained optimization problems the control variables have upper and
lower limits as given in Equ.(4.30). In this method, if the control variable exceeds its
limits then value of the control variable will be adjusted to the nearest limit value as
given in Equ.(4.31).
The pseudo-code of the MSA with the proposed penalty method starting from
74
Table 4-4 Pseudo code of MSA with the proposed penalty method
75
4.4 Test Functions
In order to investigate the capability of the MSA with the proposed penalty
provided [42]. The five optimization problems are called benchmark and it are
Problem#l
4 13
Subject to:
0<x,<l, i = l,...,9
0<x,<100, i = 10,11,12
0<xn <1
76
The global minimum is X* = (1,1,1,1,1,1,1,1,1,3,3,3,1). The minimum is
/ ( * ' ) =-15
Problem#2
Minimize f{X) = x, + x2 + x3
Subject to:
l-0.0025(x4+x6)>0
1 -0.0025(x 5 + x7 - x 4 ) > 0
l-0.01(x8-x5)>0
x,x 6 -833.33252x 4 -100x, + 83333.333 > 0
x2x7 -1250x 5 - x 2 x 4 +1250x4 > 0
x3x8 -1250.000 - x3x5 + 2500x5 > 0
Problem#3
Minimize:
/ ( * ) = (*, -10) 2 +5(x 2 -12) 2 +x34 +3(x 4 - l l ) 2 +10x56 +7x62 +x74 -4x 6 x 7 -10x 6 -8x 7
Subject to:
77
127 - 2xj - 3x42 -x3- 4x] -5x5>0
282 - 7xj - 3x2 - 10x] - x4 + xs > 0
196- 23x, - x\ - 6x26 +8x7>0
- 4x] - x] + 3x,x2 - 2x\ - 5x6 + llx7 > 0
Problem#4
Minimize:
f(X) = ex,XlX*x,Xs
Subject to:
x] + x] + x\ + x] + x] =10
x) +x32 = -1
ProbIem#5
Minimize:
Subject to:
78
105 - 4 x , - 5 x 2 + 3x7 - 9 x 8 > 0
-10x, + 8x2 +17x7 - 2 x 8 > 0
8x, - 2x2 - 5x9 + 2x10 +12 > 0
- 3(xl - 2) 2 - 4(x2 - 3)2 - 2x32 + 7x4 +120 > 0
-5x2-8x2-(x3-6)2+2x4+40>0
- x2 - 2(x2 - 2)2 + 2x,x2 - 14x5 + 6x6 > 0
- 0.5(x, - 8)2 - 2(x2 - 4)2 - 3x2 + x6 + 30 > 0
3x, - 6x2 - 12(x9 - 8)2 + 7x10 > 0
-10.0 < x, < 10.0, / = 1,...,10
The results of the optimal solution using the Multi-Scale Algorithm with the
proposed penalty method will be compared to the optimal results of five constraint
handling methods. The constrained methods used the penalty function to handle the
f hAX) if \<i<m
a,(X) = < (4.32)
|max(g,(X),0) if m + l<i<m + k
4.5.1 Method #1
function. They divide the constraint violations into / levels, for each violation level
they defined penalty coefficients. The value of penalty coefficient is increased as the
79
For example, if there are 3 constraints and it is decided to have 5 levels of
violation of each constraint, this means that there will be 3x5= 15 values of the
penalty parameter R.
The weakness of this method is the large number of parameters. The total
violation of the constraints must also be determined, which means that it needs
(m + k)(2l +1) parameters [41]. It is also difficult to define the set of parameters that
4.5.2 Method #2
The method was proposed by Joines and Houk [41,42,43], they proposed a
single dynamic penalty function. The value of the penalty coefficient is increased as
the number of iteration increases. The penalty function of this method is defined as
follows [41]
The advantage of this method is that the number of parameters in this method is
2 and 2 respectively [41]. One of the drawbacks [41] of this method is that for a large
number of iterations the value of the penalty coefficient becomes very large. Also it is
80
4.5.3 Method #3
3. Evaluate the value a ^X) for the initial population to determine the feasible
4. Set ; = ; + l
compute the value of a} (X) until the percentage of the feasible population
In summary the method can be divided into two stages. The first stage is to
the second stage the objective function f(X) is optimized without need of penalty
functions [43]. The drawback of this method is that the effect of constraint orders is
unclear. Zbigniew [39,40] found experimentally that for different constraint orders
this method will yield different results based on the running time and the precision.
The method depends on the size of the feasible search space, where it has a low
81
4.5.4 Method #4
The method proposed by Michalewicz and Attia [44] starts with a single point
that satisfies the linear quality and linear inequality constraints. The initial population
is just copied from the starting point. The penalty function of this method is [41]
I m+k
U(X) = f(X) + — Xaf(X) (4.35)
then the temperature is decreased until it reaches the freezing point. This method
maintain feasibility of the linear constraints a set of closed operators is used [43]. The
closed operators are "operators that convert the feasible solution to another feasible
4.5.5 Method #5
m+k
U(X) = f(X) + r['£a,(X)] + W,X) (4.36)
where r is constant and t is the iteration number. The term A(t,X) is used to
maintain easible solution. The value of A(t,X) is higher for an unfeasible solution
which a guarantees that any feasible solution is better than any unfeasible solution
[41].
Michalewicz [41] had an experiment which tested the five penalty methods
for locating the optimal solution of the five test functions. The comparison between
82
methods is done based on the best value (b), the mean value (m), the worst value (w)
of the solutions and the number of violated constraints (c) at the median value of the
discovered solutions that are found from 10 independent runs of each method. Here c
is sequence of three numbers, they indicate how many constraints are violated with
value more than 1, more than 0.1 and more than 0.001 respectively [41]. The symbol
'*' means that method can not be applied to this test problem and the symbol ' - '
means that the result is meaningless. The results of his experiment are listed in Table
4-5 [41].
Table 4-5 Solutions of tests functions using penalty methods [41] and MSA with
proposed penalty method
83
For the first test function, the MSA with the proposed penalty method
successfully located the feasible optimal solution, while for the second test function
the method located an unfeasible solution of small constraint violations. In this test
function, for a small violation of constraints, the method gives a large decrease in the
objective function. The feasible optimal solution is 7049, while the mean value of the
solutions found by the proposed method is 4869.5 with two violated constraints, one
of them is violated with 0.1 and the other is violated with 0.01.
allow any violation of constraints. The proposed method can be modified to reject any
which lies on the border of the violated constraints. This will be the same as the way
that this method deals with the control variables limits, where at any iteration, if the
control variable x, is less than the minimum point, then x, = x, min , and if the control
variable x, is greater, than x (max thenx, = x,max by using Equ.(4.31). In this case, the
ability to rewrite the constraints in a way that each control variable in the constraint is
constraints, so Equation (4.31) will now be modified to include the linear inequality
violations of the linear inequality constrains the location of the solution is modified to
84
be located on the border of these constraints. For example, if
g, (X) = x, + x2 - 3x3 +12 < 0, then the feasible solution of this constraints will be:
x2 < - 1 2 - x , + 3x3
These equations will then be combined with the limits range of the control variables
as follows:
unconstrained objective function U(X). Returning to the second test function and
applying the modified method to find the optimal solution, the result is listed in Table
4-6.
Table 4-6 Solutions of the second test function using the MSA with the modified
penalty method
85
The MSA with modified penalty method converges in all the ten independent
runs to a feasible solution. The modified method converges quickly at the first
iterations to the optimal solution, while it is very slow near the optimal solution. The
modified penalty function will now be applied to find the optimal solution of
given in Equations (4.20 - 4.22), the pseudo code of the MSA with the modified
86
Table 4-7 Pseudo code of the MSA with the modified penalty proposed method
Pseudo code of the MSA with the modified penalty proposed method
r='00.000000' % Starting value of the radius.
thl = '0.0000000' % Starting value of the angle theta.
th2 = '0.0000000' % Starting value of the angle theta.
xi=0
yi=0 >
^1=1 • % strating from any initial value of x and y.
ci-i,
% initial value of the penalty parameter
c2=l
f=xA 2+yA2 % The objective function
h=(x- 8)A2+(y-6)A2-25 % The equality constraint
viol = absolute(h) % the maximum violation of constarints
fcon= cl*f+c2*(hA2) % The constraint objective function
err= 100 % initial value of the error
k=l % initial value of the iteration number
kmax =1000 % maximum number of iteration
tolx= le-6
tolf=l e-6 % desired tolerances
while ( err > 0 & k < kmax)
rtr=Mutation(r,k);
thtr=2*pi*rand(l,l)
xl=xi+rtr*cos(thtr);
yl=max(yi+rtr*sin(thtr), 2-2x1) % the inequality constraint
fl =xlA2+yA2 ; hl=(xl-8) A 2+(yl-6) A 2-25;
fconl=cl*fl+c2*(hl A 2)
If ( fconl < fcon )
r=rtr;
th=thtr
xminmum=xl;
yminimum=yl;
fminimum=fconl
errx=maximum(absolute (xi-xl)-tolx, absolute ( yi-yl)-tolx)
errf=absolute (fcon -fconl)-tolf
err=minimum(errx,errf)
xi=xl;
yi=yl;
violl=absolute(hl)
violrel=(viol 1 -viol)/viol
frel=(fcon 1 -fcon)/fcon
If violl> le-6
If frel > violrel
c2=c2+frel/violrel
Else
cl=cl+violrel/frel
Endif
Endif
fcon=fconl
viol=violl
Endif
k=k+l
End
87
4.7 Engineering Optimization Problems
The problem is minimizing the cost of the welded beam, subject to several
constraints of shear stress (T), bending stress in the beam (<r), buckling load on the
g 2 (X) = a ( X ) - 3 0 0 0 0 < 0
g 3 (X) = x , - x 4 < 0
g6(X) = S(X)-0.25<0
gl(X) = 6-Pc(X)<0
r W = 3^/2
88
M(X)R(X)
r\X)
J(X)
M{X) = 6000(14 + ^ - )
R(X) = yx22+(x]+x2)2
X
2 \X\ ~*~ X3 )
J{X) = v2x,x 2
\ J
504000
a{X) = —
X^ X^
X3V5
PC(X) = 20.065x\06 yfxjx, 1 -
28V8
It has been found [42] that the optimal solution is f(X*) = 1.724852 located at
This problem needs to minimize the total cost of design of cylindrical vessels.
The cylindrical vessel is capped at both ends by hemispherical heads where the
control variables of this problem are: thickness of shell (x,) , thickness of the head (
x 2 ), the inner radius ( x3) and the length of the cylindrical section of the vessel (x 4 )
[46,47].
89
Minimize f(X) = 0.6224x,x3x4 + 1.7781x2x2 + 3.1661x2x4 + 19.84x,2x3
g 4 (X) = x 4 - 2 4 0 < 0
10<x 3 <200,
10<x 4 <200
f(X') = 6059.7143.
[46,47]. The control variables are the wire diameter (x,), the mean coil diameter,
Subjectto ,(D = l - ^ . 0
4
g2(X)= *2-*.*2 + _J_._ 1 < 0
12566(x 2 x, 3 -x ] 4 ) 5108x,2
90
x2x3
2 < x , <15
f{X') = 0.012665.
of the gear teeth, surface stress, transverse deflections of the shafts and stresses in the
shaft. The control variables are the face width (x,), module of teeth (x 2 ), number of
teeth in the pinion (x 3 ), length of the first shaft between bearings (x 4 ), length of the
second shaft between bearings (x 5 ), diameter of the first shaft (x 6 ) and the diameter
21
Subject to gx(X)= 2 -1<0
397 5
g2(X) = ^ T - \ < 0
x, x 2 x3
91
1 93x3
XjXjXfr
1.93x 5 3
g*{X) = 4
1<0
9 "^ 7
( v ^
745' + 16.9xl0 e
x x
v 2 3y
& ( * ) = •
-1<0
l i Ox;
745' + 157.5xl0 6
X X
V 2 3 J
g6W = - -1<0
85x 7 3
61
40
gs(X) = ^-l<0
g9W 1<0
12x,
ftoW = l^±i?-l,0
l.lx 7 +1.9
6iW = •1<0
92
4.7.5 Himmelblau's Nonlinear Optimization Problem [47]
Subject to:
The optimal solution of this problem is not available and the best solution is found by
f(X') = -31025.560242.
The MSA was used to solve engineering optimization problems. For each
problem the MSA was run 10 independent times. The result of the best, mean and
standard deviation of the minimum values of the optimization problems are listed
from Table 4-8 to Table 4-12. Based on the results that were found, it can be noted
that the MSA located the optimal solution of these problems successfully. The result
93
of the 10 independent runs of the MSA gives approximately the same result with a
standard deviation of less than 0.2, except in the Minimization of the Weight of a
Speed Reducer problem, where the standard deviation of the 10 independent runs is
1.007707619.
&(**)
0.0
g^x') 0.0
*4co -3.432984059
gsiX*) -0.8072968337e-l
get*') -0.2355403211
gA**) -0.3395178484e-2
1.724852516
Best solution f(X )
1.724855838
Mean value of *' '
Standard deviation 0.6252637283e-5
f{X')
94
Table 4-9 Design of a pressure vessel result using MSA
* 0.81250000
X l
X*2 0.43750000
* 42.098446
X 3
X*4 176.63660
g,(0 0.0
-0.03588082902
s 2 (0
S3(0 -0.4724413157e-4
6059.714335
Best solution f(x )
6059.721589
Mean value of •> *• *
Standard deviation 0.008085231609
* 0.05175624976
X l
X 2 0.3583353678
*
X 3 11.19487409
-0.3954639453e-5
s,(0
g 2 (0 -0.2039575076e-5
-5.831696027
s 3 (0
-1.089908382
s 4 (0
0.01266544711
Best solution f(X )
0.01266802395
Mean value of J ' '
Standard deviation 0.4553433447e-5
/(O
95
Table 4-11 Minimization of the weight of a speed reducer using MSA
* 3.5000000
X l
X*2 0.70000000
X*3 17
* 7.3000000
X 4
* 7.8000000
X 5
* 3.3502147
X 6
5.2866832
V
s,(0 -0.07391528040
s2(0 -0.4991722481
s3(0 -0.9014716976
s4(0 -.0666133815e-15
g 5 (0 -.02290371226e-9,
g 6 (0 -0.7025000000
s 7 (0 0
£ 8 (0 -.5833333333
s 9 (0 -0.05132575354
S,o(0 -0.01085236498
-0.1979985271
Sn(0
2996.348165
Best solution - ^ ^ )
2996.737817
Mean value of J ' '
* 78.0000
X l
* 33.0000
X 2
* 27.0736
X 3
* 45.0000
X 4
* 44.9612
X 5
*.(**) -0.00132
g2(X') -91.9998
g>{X') -9.5968
g*{X*) -10.4032
gs(X') -5
g6(X*) 0.0
-31025.56700
Best solution f(X )
-31025.42400
Mean value of *' '
Standard deviation 0.1654058981
optimization problems, where the search region is restricted by a set of equality and
inequality constraints. The penalty method is one of the methods that attempt to solve
function by adding terms to represent the violation of the constraints for unfeasible
solutions. The minimum value of the new objective function is still the same as the
97
the constraints at the feasible optimal solution. The penalty terms of the constraint are
usually multiplied by a factor called the penalty parameter. Penalty methods are
classified as static, dynamic and adaptive based on the penalty parameter. In this
chapter two proposed adaptive penalty methods were developed. The main idea of the
new proposed methods is balanced between the objective function and the constraints.
Most of the penalty methods increase the penalty parameters especially near the
optimal solution. The constraints violations are very small near the optimal solution,
but increasing the penalty parameters made the weight of the constraints higher than
the weight of the objective function, which increased the chance to locate nonoptimal
feasible solutions. On the other hand, if the penalty parameter was not increased in a
sufficient way, this might cause the optimization method to locate an unfeasible
optimal solution. The advantage of the new proposed methods is to have a balanced
change of the penalty parameter. The first proposed method was tested by solving a
proposed method, it can be noted that the first proposed method allows small
violations of some constraints, especially if this results a large change in the objective
function. The second proposed method was the modification of the first proposed
method to avoid constraint violations, where the modified proposed method returns
unfeasible solutions through the iteration to the boundaries of the feasible region.
This can be done if the violated constraints are separable functions. The modified
problems. The algorithm was located the feasible optimal solution of the engineering
98
optimization problems, but it is noted that when the MSA used the modified penalty
method, the search at the beginning of the iteration is very fast to locate the area near
the optimal solution, where all the searching points located by MSA through the
remaining iteration were feasible, though the algorithm becomes very slow near the
optimal solution.
99
CHAPTER 5
5.1 Introduction
constraints and to maintain network stability. In the power system network, there are
several generation units; each generation unit has its capital and running cost. The
total cost of the generation unit C can be approximated by a quadratic equation of the
generated real power P . For the optimal power flow we need to minimize the total
fuel cost of the real powers that are delivered to the power system network based on
the cost of the generation units. The other constraints are related to the power system
network stability such as the voltage magnitude and the voltage angle. Figure 5.1
shows a simple graph of the optimal power flow problem in power system network,
100
The main differences of the optimal power flow problem from the previous
constrained problems are: (i) there is no explicit formula for power losses in the
transmission lines and (ii) there are no explicit formulas that relate control variables
First let us start by illustrating the power flow on the power system network,
where the main parts of the power system network are [48]:
electrical power from generation units to the loads. There are two types of
[48].
voltage from one level to another level with high efficiency. Step up
transformers are used at the sending end of transmission line to increase the
voltage and decrease the current in the transmission line which will
connected to the receiving end of the transmission line to return the voltage
101
- Load: there are several types of loads such as industrial factories and
residential houses.
Buses: the bus is a thick and long piece of copper or aluminum that
• Slack bus: or swing bus, which could be used as a reference bus. The
magnitude of the voltage |F| and the voltage angle 5 are known, and
it is required to calculate the bus active (real) power ( P ) and the bus
specified while the reactive power (Q) and the angle of the voltage
• Load buses: the active power (P) and reactive power (Q) are given at
The main aim is to find the magnitude and the angle of the voltage at each bus
in the network. After determining the bus voltages of all buses, it is then simple to
102
calculate the power flow on transmission lines, the apparent power on the buses and
The main difficulty in calculating the power flow in a power system is that the
given information at each bus depends on the bus type as mentioned in the previous
section. Mainly, the active and reactive power are the given data in most buses. Based
on the power buses equations this will yield to nonlinear algebraic equations as it will
Figure 5.2 shows a typical bus in a power system network [48]. Each bus has an
associated voltage v,, along with incoming and outgoing currents. For instance the ilh
bus is shows in Figure 5.2 has voltage v, and incoming current /,. The outgoing
currents are ix,i2,...,/„. After applying the Kirchoff current low (KCL) [48] on the
/ , = / 0 + z , + z 2 + . . . + /„ (5.1)
n n
7=0 7=1
Where y : is the admittance of the transmission line connected between bus / and bus
P,+jQ,=vX (5.4)
103
where, /* is the complex conjugate of the injected current at the i'h bus.
(5.5)
In the JV-bus power system network there will be one slack bus, NL load buses and
iVG generation buses (i.e N = NL + NG +1). The voltages of the load buses are
unknown. To solve for the magnitude of the bus voltage and its angle there will be
two nonlinear algebraic equations for each load bus, and one equation for the
y Vj
'A u
3-
»v-»
b^h
•Jo
iQ
To illustrate the power equations, let us start illustrating a simple three-bus power
system network [48] as shown in Figure 5.3. Figure 5.3 shows one line diagram of
three-bus power system network. Bus 1 is a slack bus, bus 2 is a load bus and bus 3 is
a generation bus.
104
v ^10-120
J V
2=|V2^
"12
-* EJ=400MW
y =10-i30 -» 0,= 250 Mvar
13
V =16 - j32
"23
Slack Bus
Vpl.05/10
v3 = 1.04ZA
/'"^WOOMW
the voltage magnitude and voltage angle at bus 2 (|v2|Zc>2), and the voltage angle at
bus 3 (S 3 ).
The equation of the injected current at bus 2 (I2) and the power equations are equal
to:
h = y\l (V2 - Vl ) + ^23 (V2 - V3 ) = ~yUV\ + Ol2 + ^23 )V2 ~ ^23V3 (5.6)
105
The voltage and the transmission lines admittances at each bus can be represented in
v,=lvM (5-10)
Let N (5.11)
Pi-jQi =h||v 2 ||r I 2 |z(^ -s2 +en)+\v2\2\Y22\ze22 +|v2||v3||r23|^(^3 -s2 +e23) (5.12)
For the load bus 2 Equation (5.12) can be divided to two equations as follows:
p
i =h|v2|ft2|cos(($i -S2 + 6>12) + |v2|2|F22|cos(6>22) + |v2||v3||F23|cos(^3 -82 +923) (5.14)
Qi =+i|v 2 |y; 2 |sin(<5 I -82 +^ 2 )-|v 2 | 2 |7 22 |sin(^ 22 )-|v 2 ||v3|F 23 |sin(^3 -82 +023) (5.15)
For the generation bus 3 the magnitude of the voltage is given. The active (real)
Returning back to the three- bus power system network in Figure 5.2, the numerical
106
Y
\2 =~y\2 = - 1 0 + 7"20 = 22.36Z2.034
Y22 = yl2+y23 = 26-y52 = 58.137Z-1.107
Y
2i = -y-a = ~ 1 6 + J32 = 35.78Z2.034
Yu =-yu = - 1 0 + y30 = 31.62Z1.89
(5 17)
^33 =^13+^23 = 2 6 - ; 6 2 = 67.23Z-1.17 '
|v,| = 1.05
Sx = 0
|v2| = 1.04
The values of the active and reactive power are usually represented in per unit. The
per unit value is calculated by dividing the real value of the power by the base power
value. The power is usually represented as a signed value to distinguish between the
generation power and the demand power, where the minus sign represent the demand
power and the positive sign represent the generation power. The values of the active
and reactive power of the three- bus power system network based on based power
=100 are:
P2 = -400MW = ^ ^ = -4 pu
2 y
100
-250
Q2 = -250Mvar = — — = -2.5 pu (5.18)
^2 1Q0 F v ;
P3 = 200MW = — = 2 pu
3
100
Substituting the numerical values into the equations (5.14),(5.15) and (5.16) yields:
107
Equations (5.19), (5.20) and (5.21) are called the power flow equations, and are
nonlinear algebraic equations of three unknown variables |v21, S2 and S3. Numerical
technique such as Newton Raphson method can be used to solve the power equations
[48].
solve nonlinear algebraic equations [49]. To solve the single variable equation that is
given by:
/(*) = 0 (5.22)
let x0 be the initial estimation of the root of f{x). Then the function at x0 can be
The root of the tangent line will be the next estimation of the function root as follows
*,=*o-~4- (5-24)
x
/ \ o)
^^-.-TTH- (5-25)
/Cvi)
The method converges to a solution when the relative error in the root is less than a
certain tolerance ( sx) and the relative error on the function evaluation is less than a
function tolerance ( s f)
108
<er
(5.26)
f{xn)-f{xn_x)
<£,
/(*„)
Consider a set of N equations as follows:
7iW
F(X) (5.27)
fN(X)
The solution of the equations using Newton Raphson method will be as follows
(
xw =x "-l) +AX("-]) =X(n-X} -J-^iX^FiX1"^) (5.28)
dfN V* ¥N
dx, dx. dx,
The power flow equations for N-bus power system can be formulated in order
109
Y Y 1
l
\N
-Ml \2
Y = Y2\ Y l
2N
1 i
22
Y Y 1
NN
V.1 NX l
N2 (5.30)
Where:
Y =Y =-v
N
i=j
1=0
i =YYV (5.31)
/=i
(5.32)
S,=P,+jQ,=VX (5.33)
(5.34)
(5.36)
J=\
110
The partial derivatives of the active power Pt and the reactive power Q, respect to the
N
dP i ii i
^ =ZWKW s i n (^-^+^)>
L
(5-37)
N
dP I I
^-r2\V, \V, cos(0„) + £ r , r, cos(£, -5, +0V), (5.39)
BO " i M i
w
dO II i II i
^ = -2\Vl\\Vl\sm(eil)-Y,\Vl\\YIJ\sm(SJ -5, +0„),and (5.43)
For a load bus, the active power P and the reactive power Q are given and
they will be used to determine the voltage at the load bus, so equations (5.35) and
(5.36) will be used to evaluate the bus voltags. For the generation bus, the magnitude
111
of the voltage is known and we need only the active power equation (5.35) to
The active power equation (3.35) will be applied for all the buses except the slack bus
yields to (NG + NL = N -1) nonlinear equations. The reactive equation (5.36) will be
applied for the load buses only, so there will be NL equations. The total power flow
Jx J2 Ad(k)
(5.45)
AQik) J3 J4 A\v\{k)
where
APXW
psch
psch
p(k)
p(k)
\m(k)] 'Qch-$k)~
k) AR (*) r
2 r
2 AQ2(k) Qlch-$]
M* = , A ^ = = (5.46)
AP{k) N0+NL
jsch
Na+NL r
p(k)
NG+NL _ J&\_ <-C
(*) (k)
dQSk)
(k)
8P 8PX ' 8Q
85, d5
NG + NL 85, 85 N + N,
G
•A = ,Jl = (5.47)
(k) {k) (k) (k)
8PNg + N, dp '
Ur
dQ, dQ„,
Nc,+N,
85, 8S
NC + NL 85 N + N
G L
85„
8\V,\
K 8\V,\ 8\VK,_
112
\(k)
AS[k) AVt
AS (*) _ and A\V\ik) = (5.49)
\(k)
AS(k)
(*)
;(*+!) _ W
= J£(.k) +A£ (5.50)
(k+X) (k) (k)
\V\ =\v\ + A\v\
Where:
£w = 1 2|
•\(k)
(5.51)
(K)
S(k)
U
NG + NL . ^
Where: P'ch ,Q"h: the schedule active power and reactive power at each bus
respectively.
1. Start from initial estimation of the magnitude of bus voltage for load
2. Start from initial estimation of the bus voltage angles and it are usually
113
APik)\<£
5. If ! W
', , then terminate the iteration method otherwise go to
|A0 |<^'i
step 6.
and (5.48).
8. Increase the number of iteration (k +1) and the new estimation of the
9. Go to step 3.
Return back to the three-bus power system network example and use Newton
Raphson method to solve the power flow equations that described by the equations
(5.17), (5.18) and (5.19). The numerical values of the |v 2 |,£ 2 and S3at each iteration
are listed in Table 5-1. The Newton Raphson method converges to a solution of
Table 5-1 Power flow of the three-bus power system network using Newton Rraphson
method [48]
114
5.5. Optimal Power Flow
The objectives of the optimal power flow on the power network are to
minimize the fuel cost of generation units and to insure that the generation power
meets the demand power and the total power losses through the transmission lines to
The power system network has several types of generation plants with
different fuel costs for each one. The cost is usually given by quadratic empirical
where: a, ,bl and c, are constants depending on the type of the generation plant. It is
further assumed that a physical power constraint exists for each plan and it is given
by
ng
Objective : Minimize C, =^alPl2 +blPl + c, ng : number of generator units.
115
ng nd
P =
Z > Z PL> + P
"»ses n
d • Number of load buses, (5.58)
1=1 i=\
The first and the last constraints are called direct constraints because they are
functions of the real power (Pt ) so they are affecting directly the objective function.
The other constraints are called indirect constraints, because they affect the objective
function indirectly [50], through transmission line power losses and power system
network stability. The indirect constraints can be checked using the power flow on
power system network. If the optimal power flow solution does not satisfy the
reactive constraints, then it will be ignored. The total losses on transmission lines is a
non deterministic function of the voltage and the apparent power of the buses (i.e
p^ftp.&ns,)).
The power flow in a power system network changes based on any change on
the generation power distributions. For example, there may be three generation units
the demand power and the losses through the transmission lines. The power flow in
the transmission lines will be changed if the power from the generation units is
transmission line losses will also be changed. For some power distribution sequences,
the power system may lose its stability, and this can be checked from the indirect
116
constraints. If there are some violations in the indirect constraints, then the system
will be unstable (i.e. the magnitude of the voltages exceed their limits).
The optimal power flow problem can be divided into two stages. The first
stage is to minimize the fuel cost based on the objective function and the direct
constraints, where the power losses through transmission lines are treated as constant.
The second stage is to calculate the power flow in the transmission lines in order to
check the power system stability and the power losses through transmission lines.
Figure 5.4 shows the input and the output of each stage.
Po%ver losses
Indirect constraints Objective ftmction
Power flow equations
•violation
Direct constramts
p
G- Pgi V- y
Figure 5.5 shows a five- bus power system network [48], where there are three
generation buses; bus 1, bus 2 and bus 3. Bus 1 is considered a slack bus in this
network. There are two load buses in this network; bus 4 and bus 5. Even though
there is load connected to bus 2 and bus 3, they are considered a generation buses.
The costs of the generation units are shown in Table 5-2. The given data of the five-
bus power system network is listed in Table 5-3. The blanked boxes in Table 5-3 can
117
V 3 | = 1.03
^50MW
30Mvar
0.08+JG.24
60MW
4-OMvar
f^—^\ 20MW
IV2 |=1.045
Table 5-2 Fuel cost of the generation buses of the five-bus network
118
The power flow of the five-bus system network with the given generation
power in Figure 5.4 (i.e Pg2 = 40MW,P g3 = 30MW) is listed in Table 5-4. The total
cost of the generation units is 1633.24 $/h and the total transmission lines losses is
3.05248MW .
The optimal power flow of the five- bus power system network using MSA is
shown in Table 5-5. Starting from the initial values of the generation power
Pg] =32.6254MW, Pg2 = 66.9891MW, Pg3 = 50.3856MW and the total fuel cost is
1579.70$/h. The output from the optimization method is now considered input to the
power flow method to calculate the voltages and the current at the buses. The
generation power from the slack bus is modified in the power flow calculation to
achieve the desired generation voltage, then the output of the power flow method is
PgX =34.8688MW, Pg2 = 66.9891MW, Pg3 = 50.3856MW with total generation cost
1596.62 $/h and total losses of the transmission lines losses is 2.2434MW. The output
119
from the power flow calculation will be input to the optimization calculation, and the
total loss through the transmission lines is kept constant. The procedure will continue
as listed in Table 5-5 until the optimal solution satisfies the five-bus requirements.
Table 5-5 Optimal power flow of the five-bus power system network
Initial values for the optimization function Output from the optimization
calculation
P P p Fuel P P Fuel
,2 # losses .2 #
[MW] [MW] [MW] Cost [MW] [MW] [MW] Cost
[MW]
[$/h] [$/h]
80 40 30 0 1607.9 32.625 66.989 50.3856 1579.7
34.86 66.989 50.3856 2.243 1596.62 32.720 67.782 51.6417 1595.81
32.80 67.782 51.6417 2.2245 1596.42 32.686 67.854 51.685 1596.42
To use the Lagrange multiplier method for solving the optimal power flow
equations, an explicit formula of the power losses through the transmission lines is
needed [48]. Based on the reasonable assumptions and simplifications the power
losses through the transmission lines can be represented by a quadratic function of the
generation power
ng ng ng
pL= BU + XWKPMZLWW ( 5 - 59 )
The coefficients B are called loss coefficient and they are defined as follows [48]:
120
B
12 \ng BJ2'
5, B 22 B 2ng B02/2
H +H
= *[//] = (5.60)
B
5„Vigl 5„ngl B,ngng onJ2
2
B
0\l2 B
0l/2 W B00
where;
H= ¥'C'RhmC¥
(5.61)
. f i ?i
1-7
^>
.Q g2
1-7
g2
¥ = (5.62)
r;
• xfgng
1-7
g»g
0 0
V'
ng
0 0 0
~11 ~12
z z v
2n
(5.63)
*A,=9^,J = * ^21 ^22
z z ••• z„
121
1 0 0 0
0 1 0 0
1 0
PXZU P\£>22 P\Z\ng P\Zn
c= (5.64)
PlZ\\ PlZ 22 PlZ\ng PZu
PlZ\\ P^Z22 P3Z\ng P\Z\\
Pk (5.65)
T
nd
(5.67)
k=\
where, nd is the total number of the load buses and 7 0 is the total demand current.
The Lagrange multiplier method converts the optimal power flow problem to
ng ng ng ng ng
ng ng
Z(^(^-^max)) + E(^(^-^m,„)) (5.68)
i=l (=1
ng
8L_
= 2a,Pt +b, + A[2BuPt + 2 £ ( 5 , / P / ) + 5 0 , -l] +Mu + Mll = 0, i = 1,2,...,;
dP (5.69)
122
ar "g ng ng ng
— = YJ(Pt)-PD-(ZId(PA!Pl) + Z(PA,) + BOQ) = o
VA i=l i=l /=! i=l (5.70)
dL
= P,--Cax=0
(5.71)
8L
- P, - ^ m ,mn
= =P,-r, „ ==o
o
°V* (5.72)
The value of /uu and /J2I are zeros whenP(min < Pt < PimaJi, so there is no need
Initially, it is assumed thatP;min < Pt <P, max so to find the optimal power flow,
equations (5.69) and (5.70) are needed to be solved. Equ.(5.69) can be rewritten as
follows:
»g
Ml-BJ-b, -2A£(V,)
P
'- 2a,+2B„Jr ' '"U"-"' (5 73>
'
Substituting the values of Pt from equ.(5.69) into equ.(5.70) yields
ng
A(\-BJ-b, -2A£(5„/»,)
7=1.
ng >*J ng ng ng
+
Z T~^~7 = PD+CZZ(PAP,) 11(PA,) + BW) (5.74)
i=l ^<3, + lDnA , =1 /=I (=]
The Newton-Raphson method can be used to solve equ. (5.74) with respect to A . The
123
Ak =Ak-' + (5.75)
/'(A*' 1 )
where :
ng ng "g ng
(5.76)
(=i (=i
"g ng
(a,+5^)0-^,-2 X^^)-A,Wl-^o,)-^ -2/1 X(V,))
/ W = (5
K ±*rt • -7?)
2(a, + BltA)
Figure 5.6 [45]. The parameters of the transmission lines, the tap transformers, the
^
f© ^ = ^ E 3 ^
26 •
is Itr 6
e -13
T
12-
T
14 JL r
li—!1 25- 19
T7
2-1 23 15.
J IT TT
.X
J~L
- 0 -r—i—
1 4^
17
Figure 5.6. One line diagram of IEEE-26-bus power system network [48]
124
The result of the optimal power flow using Lagarange method by Sadaat [48] is
Table 5-6 Result of optimal power flow of IEEE-26-bus power system network using
Lagrange multiplier method [48]
125
The result of the power flow of IEEE-26-bus network using the Multi-Scale
Table 5-7 Result of optimal power flow of IEEE-26-bus power system network using
MSA
Bus Bus Voltage Load Generation Injected
No.
Mag. Angle Active Reactive Active Reactive Reactive
[Pu] [degree] Power Power Power Power Power
[MW] [Mvar] [MW] [Mvar] [Mvar]
1 1.0250 0. 51.00 41.00 446.1 245.2 4.00
2 1.0200 -.2070 22.00 15.00 167.9 37.10 0.00
3 1.0450 -.6370 64.00 50.00 263.1 68.04 0.00
4 1.0600 -2.204 25.00 10.00 134.9 75.42 2.00
5 1.0450 -1.240 50.00 30.00 173.6 136.2 5.00
6 1.0020 -2.809 76.00 29.00 0.00 0.00 2.00
7 0.9990 -2.435 0.00 0.00 0.00 0.00 0.00
8 1.0030 -2.331 0.00 0.00 0.00 0.00 0.00
9 1.0150 -4.407 89.00 50.00 0.00 0.00 3.00
10 0.9950 -4.340 0.00 0.00 0.00 0.00 0.00
11 0.9990 -2.719 25.00 15.00 0.00 0.00 1.500
12 1.0000 -3.337 89.00 48.00 0.00 0.00 2.00
13 1.0230 -1.261 31.00 15.00 0.00 0.00 0.00
14 1.0100 -2.450 24.00 12.00 0.00 0.00 0.00
15 1.0010 -3.238 70.00 31.00 0.00 0.00 .500
16 0.9930 -3.992 55.00 27.00 0.00 0.00 0.00
17 0.9840 -4.323 78.00 38.00 0.00 0.00 0.00
18 1.0080 -1.860 153.00 67.00 0.00 0.00 0.00
19 1.0070 -6.021 75.00 15.00 0.00 0.00 5.00
20 0.9870 -4.772 48.00 27.00 0.00 0.00 0.00
21 0.9800 -5.361 46.00 23.00 0.00 0.00 0.00
22 0.9840 -5.331 45.00 22.00 0.00 0.00 0.00
23 0.9810 -6.355 25.00 12.00 0.00 0.00 0.00
24 0.9720 -6.637 54.00 27.00 0.00 0.00 0.00
25 0.9780 -6.189 28.00 13.00 0.00 0.00 0.00
26 1.0150 -.1030 40.00 20.00 89.82 26.29 0.00
Total 1263.00 637.00 1275.5 588.256 25
Total g eneration cost = 15442..9064$/h
Tota power los ses on transmission Hiies= 12.500 MW
126
The total generation cost using the Lagrange multiplier method is 15447.72$/h
and the real power losses on transmission lines are 12.8003 MW [48]. While the total
generation cost using the multi-scale algorithm is 15442.9064 and the real power
losses on transmission lines are 12.5 MW. The multi scale algorithm has 4.8136$/h
generation cost less than the Lagrange multiplier method, which means that the
Figure 5.7 [50,51,52]. The IEEE -30-bus data of the transmission lines, the tap
transformers, the buses and the generation units are given in appendix B. The optimal
power flow of the IEEE-30-bus power system network using MSA is listed in Table
5-8.
Figure 5.7. One line diagram of IEEE-30-bus power system network [50]
127
Table 5-8 Results of optimal power flow of IEEE-30-bus using MSA
128
There are several methods were used to find the optimal power flow of the
[52], Genetic Algorithm by L. Lai [53] and Simple Genetic Algorithm by Bouktir
[50].
The results of optimal power flow of the IEEE-30-bus power system network
using Genetic algorithms, Evolutionary method and Multi-scale method are shown in
Table 5-9. The Multi scale method has the least generation cost compare to the other
Table 5-9 Results of optimal power flow of IEEE-30-bus using different optimization
methods [50] and MSA
Method Total generation cost Real power losses
($/h) [MW]
Genetic Algorithm L. Lai 802.4484 9.6372
Evolutionary Method 802.5557 9.3683
Yuryevich
Genetic Algorithm T. Bouktir 803.699 9.5177
Multi-Scale Algorithm 801.9993 9.3467
optimization algorithm. The improved algorithm (IPSO) was proposed to solve the
optimal power flow of IEEE 30-bus power system network. They compared the result
of the optimal power flow using IPSO with two other optimization methods; the
Genetic Algorithm (GA) and the Practical Swarm Optimization (PSO). The result of
the optimal power flow using these optimization methods were listed in Table 5-10.
129
I. Oumarou, D. Jiang and C. Yijia [55] were solved the optimal power flow of
IEEE 30-bus using a simple swarm optimization method PSOOPF. They compared
their results with the Matpower method (see Table 5-10). "The Matpower was created
by Ray Zimmerman and Deqiang Gan of PSERC at Cornell University under the
direction of Robert Thomas. Its main aim was to provide a simulation tool within
Matlab that was easy to use and modify" [55 page 287].
Swarm Optimization (WIPSO) method to solve the optimal power flow problem of
the IEEE 30-bus power system network. In this paper, the voltage of the slack bus is
modified, where the algorithm located the best solution of the optimal power flow
IEEE 30-bus was calculated by MSA subject to a fixed slack bus voltage, which
means that the optimal power flow in this paper is a different problem compared to
the optimal power flow that was solved by the MSA. By investigating the results that
were shown in this paper, the best result for the same slack bus voltage (1.06 pu) was
found by differential evolution algorithm (DE), where the total generation cost of the
S. Sayah and K. Zehar [57] solved the optimal power flow problem using
buses were not fixed in this paper, and they were modified to locate the optimal
power flow of IEEE-30 bus. Case 2.1 in this paper has the similar voltage buses as it
was used in the MSA. The result of case2.1 was shown in Table 5-10.
130
H. Hoseinabadi, S. Hosseini and M. Hajian [58] proposed the Modified
Practical Swarm Optimization Algorithm (MPSO) to solve the optimal power flow
problem of IEEE 30-bus power system network. The modification in this algorithm is
that each individual in the swarm group learns from the best and the worst experience
of all the swarm individuals. The result of the optimal power flow of IEEE 30-bus
power system network using the MPSO was compared to the optimal power flow
optimal power flow of these optimization methods are listed in Table 5-10.
A. Basak, S. Pal, V. Pandi, B. Panigrahi and S. Das [59] solved the optimal
power flow of IEEE 30-bus power system network using several optimization
methods such as: Hybrid of Invasive Weed Optimization (IWO), Simple Bacterial
(HBFDE) and Adaptive Bacterial Foraging with Nelder Mead (ABFNM). The results
131
Table 5-10 The optimal power flow of IEEE-30-bus using several optimization
methods
The blank cells in Table 5-10 mean that there is no available data. The MSA
has the least total generation cost compared to the other optimization problems that
were listed in Table 5-10. For the total power losses the IPSO [51] has the least total
power loss (9.12 MW), while the total generation cost is 827.13 $/h which is higher
than the generation cost was found by the MSA. The CPU time for the MSA is
The optimal load (power) flow in the power system network is a constrained
optimization problem. Here it is required to minimize the cost of the generation units
132
subject to a set of equality and inequality constraints to maintain the power system
network stablity. The constraints in this problem can be divided into two groups;
direct and indirect constraints. The direct constraints are function of the real power
control variables Pt which are the same as the control variables of the objective
function. The indirect constraints are functions of the other control variables that
affect the objective function indirectly such as Vl,Ql and S,. The difficulty of the
optimal power flow problem is that there is no explicit formula to calculate the power
losses in transmission lines and there is also no explicit formula to calculate the
violation of the indirect constraints. The power losses through transmission lines and
algabric equation numerically. The MSA was used to calculate the optimal power
flow of IEEE-26-bus and IEEE-30- bus power system networks. The optimal power
flow solution that was found using the MSA was better than other optimization
methods.
133
CHAPTER 6
6.1 Conclusions
the genetic approach. It uses a real coded representation to decrease the disadvantage
at the beginning of the search and then to a small scale in the immediate
neighborhood of the optimal solution. The adaption is done by selecting the most
significant digits to be changed in the first steps of the search then selecting the least
significant digits in the final iterations, where the probability to choose any digits
multiple local optimum points, variable frequency components and flat regions
around the optimum points. In each case the MSA successfully converged to the
The violation of the constraints near the optimal solution is very small and it
may be not sufficient to maintain the search inside the feasible space, for that reason
the penalty parameter must be modified to increase the weight of the penalty function
when constraints are violated. Increasing the penalty parameter above a certain limit
134
may slow down the optimization method and decrease the effect of the objective
function, which means that it increases the probability of locating a feasible solution
more than locating the optimal feasible solution. For constrained problems, two new
methods based on the penalty function were proposed to deal with the constraints.
The penalty parameter was modified adaptively through the search toward the
optimal solution. The penalty parameters in the proposed methods are changed based
on the variations of both of objective function and penalty function. The main aim of
between the objective and the penalty functions to obtain an optimal feasible solution.
The first proposed method with the MSA was used to locate the optimal solution of
solution of most of them while it allowed small constraints violation of the other test
functions, especially when small violation of constraints allow a large change in the
objective function.
that when the MSA locates unfeasible point, this point is replaced immediately by a
point located in the border of the feasible space near to the current unfeasible point.
The second proposed method with the MSA was used to locate the optimal solution
optimal feasible solutions. The drawback of the second proposed penalty method that
135
it is very fast at the beginning of the optimal solution search then it becomes very
Finally, MSA was used to solve the optimal power flow for a power system
network. The optimal power flow is one of the important optimization problems in
power system networks, the objective function of the optimal power flow is to
minimize the fuel cost of the generation units and maintain the power system network
in secure limits. The main features of the optimal power flow problem are; (i) there is
no explicit formula for the power losses in transmission lines, where the power losses
can estimated numerically after solving the power flow equations a set of nonlinear
algebraic equations (ii) some of constraints affect the objective function indirectly
and the constraints violation can only be determined after power flow calculations.
The optimal power flow of IEE-26-bus power system network was calculated using
MSA and the Lagrange multiplier method, in the Lagrange multiplier method the
power losses was represented by an approximation formula. The results show that
MSA achieved better result in sense of the total cost and the power losses in
transmission lines.
MSA was also used to determine the optimal power flow of IEEE-30-bus power
methods shows that the MSA locates better results compared to these methods.
136
6.2 Future Work
There are other possibilities of the membership functions that may be used such as
trapezoidal, Gaussian,...etc.
The mutation operation is the only operation used in the MSA to generate
offspring. The crossover operation is another possible operation that can be used to
generate them.
Even though the two proposed penalty methods located the optimal solution of
most of the test function successfully, they still have some drawbacks. The first
proposed penalty method allows small constraint violations while the second one is
very slow near the optimal solution, so enhancing the two proposed methods will be
The MSA may be used to solve another kind of optimization such as multiple
Since the MSA is a heuristic algorithm additional stastical studies are needed to fully
137
REFERENCES
138
10 A. Nayeem, J. Vila and A. Harold, A Comparative Study of The Simulated-
Annealing and Monte Carlo-with-Minimization Approaches to the Minimum-
Energy Structures of Polypeptides, J. Comp. Chem. 12 (no. 5), 1991, pp. 594-
605.
16 M. Wu, J. Horng and H. Guang, Schema Genetic Algorithm for Fractal Image
Compression, Engineering Applications of Artificial Intelligence, Vol. 20, Issue
4, June 2007, pp. 531-538.
19 T. Back, Optimal Mutation Rates in Genetic Search, In: Forrest, 1993, pp.2-8.
139
20 R. Weinberg, Computer Simulation of a Living Cell (Doctoral dissertation,
University of Michigan). Dissertations Abstracts International, 31(9), 5312B.
(University Microlms No. 71-4766), 1970.
27 D. Tate and A. Smith, Expected Allele Coverage and the Role of Mutation in
Genetic Algorithms. In Proceedings of the Fifth International Conference on
Genetic Algorithms, edited by S. Forrest. Morgan Kaufmann, 1993, pp.31-37.
28 R. Haupt and S. Haupt, Practical Genetic Algorithms, John Willey & Sons Inc.,
second edition, 2004.
140
29 C. Janikow and Z. Michalewicz, An Experimental Comparison of Binary and
Floating Point Representations in Genetic Algorithms, in Proc. 4th Int. Conf. on
Genetic Algorithms, San Mateo, CA, Morgan Kaufmann, 1991, pp. 31-36.
141
37 A. E. Smith and D. W. Coit, Penalty functions, in Handbook of Evolutionary
Computation, T. Baeck, D. Foge'l, and Z. Michalewicz, Eds:A Joint Publication
of Oxford University Press and Institute of Physics, 1995.
142
45 D. Kalyanmoy, A. Pratap, S. Agarwal, and T. Meyarivan. A Fast and Elitist
Multi Objective Genetic Algorithm NSGA-II, IEEE Transactions on
Evolutionary Computation, 2002, pp. 182-197.
50 T. Bouktir, and L. Slimani, A Genetic Algorithm for Solving the Optimal Power
Flow Problem, Leonardo J. Sci., 2004, pp. 44-58.
53 L. Lai and J. Ma, Improved Genetic Algorithms for Optimal Power Flow Under
Both Normal and Contingent Operation States, Electrical Power & Energy
System, Vol. 19, No. 5, 1997, pp. 287-292.
143
54 W. Liu, M. Li and X.Wang, An Improved Particle Swarm Optimization
Algorithm for Optimal Power Flow, Power Electronics and Motion Control
Conference IPEMC, 2009, pp.2448-2450.
144
Appendix A
Load data
Bus number Active load [MW] Reactive load [Mvar]
1 51 41
2 22 15
3 64 50
4 25 10
5 50 30
6 76 29
7 0 0
8 0 0
9 89 50
10 0 0
11 25 15
12 89 48
13 31 15
14 24 12
15 70 31
16 55 27
17 78 38
18 153 67
19 75 15
20 48 27
21 46 23
22 45 22
23 25 12
24 54 27
25 28 13
26 40 20
145
Table A-3 Transmission lines data of IEEE-26-bus [48]
Transmission line data
Bus Bus Resistance Reactance Susbitance Tap setting
Number Number rpui fpul [pul value
1 2 0.00055 0.00480 0.0300 1
1 18 0.00130 0.01150 0.0600 1
2 3 0.00146 0.05130 0.0500 0.96
2 7 0.01030 0.05860 0.01800 1
2 8 0.00740 0.03210 0.03900 1
2 13 0.00357 0.09670 0.02500 0.96
2 26 0.03230 0.19670 0.00000 1
3 13 0.00070 0.00548 0.00050 1.017
4 8 0.00080 0.02400 0.00010 1.050
4 12 0.00160 0.02070 0.01500 1.050
5 6 0.00690 0.03000 0.09900 1
6 7 0.00535 0.03060 0.00105 1
6 11 0.00970 0.05700 0.00010 1
6 18 0.00374 0.02220 0.00120 1
6 19 0.00350 0.06600 0.04500 0.95
6 21 0.00500 0.09000 0.02260 1
7 8 0.00120 0.00693 0.00010 1
7 9 0.00095 0.04290 0.02500 0.95
8 12 0.00200 0.01800 0.02000 1
9 10 0.00104 0.04930 0.00100 1
10 12 0.00247 0.01320 0.01000 1
10 19 0.05470 0.23600 0.00000 1
10 20 0.00660 0.01600 0.00100 1
10 22 0.00690 0.02980 0.00500 1
11 25 0.09600 0.27000 0.01000 1
11 26 0.01650 0.09700 0.00400 1
12 14 0.03270 0.08020 0.00000 1
12 15 0.01800 0.05980 0.00000 1
13 14 0.00460 0.02710 0.00100 1
13 15 0.01160 0.06100 0.00000 1
13 16 0.01793 0.08880 0.00100 1
14 15 0.00690 0.03820 0.00000 1
15 16 0.02090 0.05120 0.00000 1
16 17 0.09900 0.06000 0.00000 1
16 20 0.02390 0.05850 0.00000 1
17 18 0.00320 0.06000 0.03800 1
17 21 0.22900 0.44500 0.00000 1
19 23 0.03000 0.13100 0.00000 1
19 24 0.03000 0.12500 0.00200 1
19 25 0.11900 0.22490 0.00400 1
20 21 0.06570 0.15700 0.00000 1
20 22 0.01500 0.03660 0.00000 1
21 24 0.04760 0.15100 0.00000 1
22 23 0.02900 0.09900 0.00000 1
22 24 0.03100 0.08800 0.00000 1
23 25 0.09870 0.11680 0.00000 1
146
Table A-4 Shunt capacitance data of IEEE-26-bus [48]
1 4.0
4 2.0
5 5.0
6 2.0
9 3.0
11 1.5
12 2.0
15 0.5
19 5.0
147
Appendix B
oad data
Bus number Active load [MW] Reactive load [Mvar]
1 0 0
2 21.7000 12.7000
3 2.4000 1.2000
4 7.6000 1.6000
5 94.2000 19.0000
6 0 0
7 22.8000 10.9000
8 30.0000 30.0000
9 0 0
10 5.8000 2.0000
11 0 0
12 11.2000 7.5000
13 0 0
14 6.2000 1.6000
15 8.2000 2.5000
16 3.5000 1.8000
17 9.0000 5.8000
18 3.2000 0.9000
19 9.5000 3.4000
20 2.2000 0.7000
21 17.5000 11.2000
22 0 0
23 3.2000 1.6000
24 8.7000 6.7000
25 0 0
26 3.5000 2.3000
27 0 0
28 0 0
29 2.4000 0.9000
30 10.6000 1.9000
148
Table B-2 Transmission lines data of IEEE-30-bus [48]
149
Table B-3 Generation buses data of IEEE-30-bus [50]
Bus Voltage P P V V
c-min zimvn min max
[pu] min
[MW]
max
[Mvar] [Mvar] min max
[MW] [pu] [pu] [deg] [deg]
1 1.0600 50 200 -20 200 0.95 1.10 -14 0
2 1.0450 20 80 -20 100 0.95 1.10 -14 0
5 1.0100 15 50 -15 80 0.95 1.10 -14 0
8 1.0250 10 35 -15 60 0.95 1.10 -14 0
11 1.0820 10 30 -10 50 0.95 1.10 -14 0
13 1.0710 12 40 -15 60 0.95 1.10 -14 0
150
Appendix C
Pseudo-Code for the Optimal Power Flow of the IEEE-30-Bus Power System
Network Using MSA with the Proposed Penalty Method
% start from random values of the generation power within their limits
Pgli =Mwlimits(l,l) +random(l,l)*(MWlimits(l,2)-MWlimits(l,l))
151
Power mismatch=100 % mismatch power of the slack bus between the
plosses =0; % initial value of the total losses in the transmission lines
iter=l % iteration counter connects the power flow with optimal power flow
While ( power mismatch > le-6 & inequality violation > le-6 & iter <itermax)
cl=l
c2=l
% The Generation cost function is created to calculate the fuel costs of the
% generation plants
% constraint
fcon=cl*f+c2*hA2
152
while ( err > 0 & k < kmax)
thltr=2*pi*rand(l,l)
th2tr=2*pi*rand(l,l)
th3tr=2*pi*rand(l,l)
th4tr=2 *pi*rand(l,l)
th5tr=2*pi*rand(l,l)
% calculate the next strin gs based on the new mutated radius rtr and new angles
pgl=pgli+rtr*cos(thltr)*cos(th2tr)...
*cos(th3tr)*cos(th4tr)*cos(th5tr)
pg2=pg2i+rtr*cos(thltr)*cos(th2tr)...
pg5=pg5i+rtr*cos(thltr)*cos(th2tr)*cos(th3tr)*sin(th4tr)
pg8=pg8i+rtr*cos(thltr)*cos(th2tr) *sin(th3tr)
pgl3=pgl3i+rtr*sin(thltr)
pg2=min(MWlimits(2,2),max(pg2,MWlimits(2,l))
pg5=min(MWlimits(3,2),max(pg5,MWlimits(3,l))
pg8=min(MWlimits(4,2),max(pg8,MWlimits(4,1))
153
pgl l=min(MWlimits(5,2),max(pgl l,MWlimits(5,l))
pg 13=min(MWlimits(6,2),max(pg 13 ,M Wlimits(6,1))
fconl=cl*fl+c2*hl A 2
If ( fconl < fcon) % is the next string better than the previous one
r=rtr;
thl=thltr
th2=th2tr
th3=th3tr
th4=th4tr
th5=th5tr
lfabsolute(hl)>le-6
violrel=abs(hl-h)/h;
frel=(fl-f)/f
If frel >absolute(hl)
c2=c2+frel/violrel
Else
cl=cl+violrel/frel
Endif
Endif
154
f=fl
fcon=fconl
h=hl
End if
k=k+l
End
% Newton raphson method is a function created to calculate the power flow equations.
Iter=iter+1
Pgl=pglm
End
% the Generation cost is a function created to calculate the total generation cost of the
% plgeneration plants the inputs of this function are the generation real power pgl, pg2, pg5,
% pg8, pgll and pgl3
Pm=[pgl,pg2, pg8, pg8, pgl 1, pgl3] % pm is a vector contains the generation power
End
155