design optimization of electrical machines using genetic algorithms

4
2008 IEEE TRANSACTIONS ON MAGNETICS, VOL. 31, NO. 3, MAY 1995 Design Optimization of Electrical Machines using Genetic Algorithms G. Fuat Uler Osama A. Mohammed Chang-Seop Koh Department of Electrical and Computer Engineering, Florida International University Miami. Florida 33199, USA Abstract-The application of genetic algorithms (GAS) to the design optimization of electromagnetic devices is presented in detail. The method is demonstrated on a magnetizer by optimizing its pole face to obtained the desired magnetic flux density ditribution. The shape of the pole face is constructed from the control points by means of uniform nonrational b- splines. I. INTRODUCTION In our recent publication we introduced the use of GAS into the field of design optimization of electromagnetic devices [l]. In this paper, a more rigorous description of the entire procedure is presented. A magnetizer is chosen as the device to be optimized as an application example. 11. OVERVIEW OF GAS John Holland invented the GAS with the goal to create a computer algorithm that would mimic some functions of natural evolution. The idea was that, if nature’s power to produce from a randomly created population a population with individuals that are better fit to the environment could be reflected upon an algorithm, that algorithm could be used to solve complex problems. The wide range of applications that have appeared since the arrival of the technique proves that GAS, indeed, are powerful in solving complicated problems the way nature does. In nature, the evolution works on the chromosomes. In a population, the chromosomes that decode into more successful individuals reproduce more often. The processes of evolution are actually carried out during reproduction. By means of mutation and recombination, new chromosomes are formed from the genes of the parents’ chromosomes. Throughout the process, evolution does not keep track of the success rate of the generations. It has no memory. Neither does the evolution process know with what kind of environment it is dealing. The only information that is available to biological evolution is contained in the chromosomes of the current generation. Yet, its success is well recognized. GAS simulate the mechanics of biological evolution. In the algorithm, chromosomes are represented by finite length character strings usually made up of ‘0’s and ‘1’s. The simulated evolution works on a population of strings by means of its operators. The algorithm does not have any information about the problem it is trying to solve. The only Manuscript received July 6, 1994. information that is provided to it is how the chromosomes are decoded into functional individuals of the population and how successful each individual is in adapting to the environment. 111. GAS IN DESIGN OPTIMIZATION In computational design optimization of electromagnetic devices, there are two tools that cooperate to yield the optimum result. The fundamental tool of the scheme is the search tool. Here the GAS play this role. As every point in the search space represents a different design, for every chromosome that decodes into a point in the search space, the GA submits that particular design to the other tool of the optimization, the analysis tool, to obtain a performance measure. The analysis tool’s task is to solve the field equations for the submitted design and to return the relevant parameters back to the search tool. This paper’s scope only covers the functional importance of the analysis tool. The technique used to implement it is chosen from the wide arsenal of numerical methods of computational electromagnetics. Only for purposes of verifying the results, it is necessary to indicate that, here the analysis is performed in magnetostatics using the two dimensional finite elements method (EXM) with first order triangular elements. There are four primary steps in preparation to solve a problem using GAS [ 31 : 1. determine the representation scheme 2. determine the fitness measure 3. determine the stopping rule 4. determine the parameters of GA’s operation The representation scheme is the way the design variables are coded into the finite-length character strings. An alphabet of cardinality K is used. Although some researchers choose to use higher cardinality alphabets, usually, at least in Holland’s sense, the alphabet of the representation scheme is binary; K = 2, and its elements are ‘0’ and ‘1’. The coding of the chromosomes is a very important concept directly effecting the performance of the GA. It is user and problem dependent. A quite simple coding, such as binary coding, or a highly complicated one that requires the expertise and the creativity of the user can be implemented. In either case, the representation scheme is responsible of mapping every point in the search space into a unique chromosome [3]. The fitness measure is an indication of how successful an individual is. As an individual is nothing but the decoded 0018-9464/95$04.00 0 1995 IEEE

Upload: oa

Post on 22-Sep-2016

216 views

Category:

Documents


2 download

TRANSCRIPT

2008 IEEE TRANSACTIONS ON MAGNETICS, VOL. 31, NO. 3, MAY 1995

Design Optimization of Electrical Machines using Genetic Algorithms

G. Fuat Uler Osama A. Mohammed Chang-Seop Koh Department of Electrical and Computer Engineering, Florida International University

Miami. Florida 33199, USA

Abstract-The application of genetic algorithms (GAS) to the design optimization of electromagnetic devices is presented in detail. The method is demonstrated on a magnetizer by optimizing its pole face to obtained the desired magnetic flux density ditribution. The shape of the pole face is constructed from the control points by means of uniform nonrational b- splines.

I. INTRODUCTION

In our recent publication we introduced the use of GAS into the field of design optimization of electromagnetic devices [l]. In this paper, a more rigorous description of the entire procedure is presented. A magnetizer is chosen as the device to be optimized as an application example.

11. OVERVIEW OF GAS

John Holland invented the GAS with the goal to create a computer algorithm that would mimic some functions of natural evolution. The idea was that, if nature’s power to produce from a randomly created population a population with individuals that are better fit to the environment could be reflected upon an algorithm, that algorithm could be used to solve complex problems. The wide range of applications that have appeared since the arrival of the technique proves that GAS, indeed, are powerful in solving complicated problems the way nature does.

In nature, the evolution works on the chromosomes. In a population, the chromosomes that decode into more successful individuals reproduce more often. The processes of evolution are actually carried out during reproduction. By means of mutation and recombination, new chromosomes are formed from the genes of the parents’ chromosomes. Throughout the process, evolution does not keep track of the success rate of the generations. It has no memory. Neither does the evolution process know with what kind of environment it is dealing. The only information that is available to biological evolution is contained in the chromosomes of the current generation. Yet, its success is well recognized.

GAS simulate the mechanics of biological evolution. In the algorithm, chromosomes are represented by finite length character strings usually made up of ‘0’s and ‘1’s. The simulated evolution works on a population of strings by means of its operators. The algorithm does not have any information about the problem it is trying to solve. The only

Manuscript received July 6, 1994.

information that is provided to it is how the chromosomes are decoded into functional individuals of the population and how successful each individual is in adapting to the environment.

111. GAS IN DESIGN OPTIMIZATION

In computational design optimization of electromagnetic devices, there are two tools that cooperate to yield the optimum result. The fundamental tool of the scheme is the search tool. Here the GAS play this role. As every point in the search space represents a different design, for every chromosome that decodes into a point in the search space, the GA submits that particular design to the other tool of the optimization, the analysis tool, to obtain a performance measure. The analysis tool’s task is to solve the field equations for the submitted design and to return the relevant parameters back to the search tool.

This paper’s scope only covers the functional importance of the analysis tool. The technique used to implement it is chosen from the wide arsenal of numerical methods of computational electromagnetics. Only for purposes of verifying the results, it is necessary to indicate that, here the analysis is performed in magnetostatics using the two dimensional finite elements method (EXM) with first order triangular elements.

There are four primary steps in preparation to solve a problem using GAS [ 31 :

1. determine the representation scheme 2. determine the fitness measure 3. determine the stopping rule 4. determine the parameters of GA’s operation

The representation scheme is the way the design variables are coded into the finite-length character strings. An alphabet of cardinality K is used. Although some researchers choose to use higher cardinality alphabets, usually, at least in Holland’s sense, the alphabet of the representation scheme is binary; K = 2, and its elements are ‘0’ and ‘1’. The coding of the chromosomes is a very important concept directly effecting the performance of the GA. It is user and problem dependent. A quite simple coding, such as binary coding, or a highly complicated one that requires the expertise and the creativity of the user can be implemented. In either case, the representation scheme is responsible of mapping every point in the search space into a unique chromosome [3].

The fitness measure is an indication of how successful an individual is. As an individual is nothing but the decoded

0018-9464/95$04.00 0 1995 IEEE

2009

chromosomes, the fitness measure is assigned to the chromosomes. Every chromosome that happens to exist during the evolution is evaluated and its fitness measure is calculated. After all, the fitness measure is the only information the GA has relating the population it is working on to the environment. In design optimization, the environment is the objective function. The value the objective function returns can be either directly used, or it can be passed through some kind of a function to determine the fitness measure. The definition of the fitness measure is again user and problem dependent.

The search can continue indefinitely. Even if the population reaches the global optimum of the objective function, mutations accounts for a genetically dynamic population. Therefore, a stopping rule is necessary to tell the algorithm when it is time to stop. This is achieved in many different ways and is also user and problem dependent. Some of the possible methods are to fix the number of generations and to use the best individual of all generations as the optimum result; to fix the time elapsed and to select the optimum similarly; or to let the entire population converge to an average fitness with some error margin.

The parameters of the GA shape the way the algorithm runs. There are two primary parameters:

M

L

the population size which is the number of chromosomes in the population the chromosome length which is the number of characters (genes) used to form one chromosome

Two secondary parameters define the Occurrence probabilities of the GA operators:

pc crossover probability, pm mutation probability

IV. A GENETIC ALGORITHM

After the parameters of the GA are defined, the algorithm runs following the six steps outlined below [4].

1.

2. 3. 4.

5. 6.

Randomly create an initial population of M chromosomes as defined in the previous section. Evaluate each chromosome and assign fitness measures. With the reproduction operator, create a new population. Randomly pair the chromosomes to form parents. By means of the crossover operator, mate them to form offsprings. Apply mutation to preserve the genetic diversity. If the stopping point is reached, stop the algorithm, else go to step 2.

This procedure is used for obtaining the results presented

here. Naturally, there are many variations of implementing a GA. Different versions of algorithms with different performances can be synthesized by manipulating either the algorithm itself or its functions, or both.

In the above procedure, the three fundamental operators of the GAS are introduced, reproduction, crossover, and mutation.

Based on the fitness measure of a chromosome and the average fitness of the population, the reproduction operator determines, rather randomly, the number of copies, if any, that particular chromosome will have in the next generation. There are many ways of designing this operator; however, the underlying idea is to give the chromosomes with higher fitnesses more chance to be represented in the next generation but leave the decision to a random variable.

Once the reproduction is complete, the chromosomes exchange information through the crossover operator. The crossover operator simulates the recombination process of natural evolution. It mates two parents to create two offsprings.

Crossover occurs at a rate determined by p,, crossover probability. This GA parameter is defined prior to running the algorithm. The information exchange between the chromosomes is performed by swapping the bits of two parents’ chromosomes following some rules. These rules determine the type of the crossover operator. In this application uniform one-point crossover is implemented. For each pair all bits from a randomly selected position on the chromosome to the end of the string are swapped. In uniform crossover, there is no positional bias in swapping the bits. This implies that there are crossover methods where the crossover probability of a bit depends on the position of that bit in the chromosome. Another variation is to use multiple point crossover where bits positioned between randomly selected sites on the chromosomes are swapped [SI.

The third fundamental operator of GAS is the mutation operator. It occasionally changes the value of a gene acting as a protector against the complete loss of some important genetic information by providing genetic diversity [3]. Associated with the mutation operator, there is a occurrence probability pm determined along with the other CA parameters.

V. APPLICATION EXAMPLE

The application of the GAS to design optimization is demonstrated on a magnetizer as shown in Figure 1. The shape of the pole face is to be optimized. In the finite element model the object to be magnetized is treated as if it were made of nonmagnetic material. A permeability value very close to that of air is assigned to that region. A high current is applied to the coil. The linear magnetostatic field analysis is carried out in 2-D using E M .

2010

75 -

65 - 60 - 55 -

25 -

20 -

0 - I I

65 75 I

40

Fig. 1 . Magnetizer to be optimized

I 0 20

The goal of the optimization is to achieve a sinusoidal magnetic flux density distribution along chord A-B positioned halfway through the width of the magnetized piece and subtending an angle of 60". At point B, the flux density is maximum and it is expected to follow a cosine function along

The shape of the pole face is determined by four control points PI through P4. PI and P4 can move in the y and x directions, respectively. P2 and P3 can move in both x and y directions. This yields a total number of 6 design parameters. Once the location of the control points are set, the curve that shapes the pole face is fitted to these points using uniform nonrational cubic b-splines. B-splines provide local control of the curve. When a control point is moved, only a small portion of the curve is affected. A b-spline curve is confined to the convex hull formed by the control points, and it does not touch the control points, unless a control point is multiply (at least 3 times) defined.

In our application, the pole face curve touches the control points PI and P4, each of which is represented with three coinciding b-spline control points. With P2 and P3 the number of points in the the control point set becomes 8. For m + 1 b- spline control points, Ro ... R,, m - 2 curve segments, Q3...Q,,, are formed using

A-B .

(I- t13 3t3-6t2+4 4-2 6 4 - 3 + Qi(t) = -

6

where 0 I t I 1. In ( l ) , the coefficients are called the b-spline blending functions. For the 8 control points of the pole face shape, 5 curve segments are generated. The nodes on the pole

face are then placed on this b-spline approximation. In preparation for running the GA, we first determine the

parameters discussed in Section 111. As the alphabet used for the coding has cardinality K = 2, the simplest representation scheme is to use binary coding. Another coding system which also uses the binary alphabet is the Gray code. Its better performance observed by some researchers is attributed to the inherent unit distance characteristic. Here, we do not give a comparison between the two coding methods. The intention is to emphasize the flexibility of using different approaches in different parts of the GA.

Using the Gray code, the 6 design parameters are coded into 6, 15 character long string. These string are then concatanated to form one chromosome of length 80. When encoding each of the six segments, the value of the Gray code (between 0 and 2I5-l) is mapped to the domain of the corresponding design variable. For example, the y coordinate of PI is allowed to change between 50.0 and 54.0 mm. Then, all 215 possible integers are mapped to real numbers in that range. With this setting, the resolution achieved for adjusting they coordinate of PI is about tenthousandth of a millimeter.

The fitness measure for the chromosomes is calculated using the objective function value F given by

= z( desired, k - calculated, k ) 2. k=l

This function returns the total squared error for n = 99 points positioned along chord A-B. As the goal is to minimize this error, the fitness measure is defined as 1 / F, and the GA is run as a maximizing algorithm.

The algorithm is stopped after 50 generations are processed. The best individual throughout all generations is selected to be the optimal solution.

The population size is set to M = 40, and the chromosome length is determined as L = 80 genes with 15 genes for each of six design variables.

Finally, the two occurrance probabilities for the crossover and mutation are chosen as pc = 0.9 and pm = 0.005, respectively. Note that crossover occurs much more often. Then again, crossover is chromosome-pair based. Mutation, however, is gene based. Such a small frequency is still enough to maintain the genetic diversity due to the large number of genes involved in the process.

The initial population is generated by randomly filling the 80 bit positions of the 40 chromosomes with Os and 1s. For the evaluation of each chromosome, the FEM creates the magnetizer model from the design specifications, the values of the six design variables, of that particular chromosome. The field solution is obtained and F of (2) returned to the GA. Some CPU time can be saved at this stage by keeping record of at least the previous generation's chromosomes and their fitness measures. If some chromosome also happens to exist in the new generation, then its fitness measure can be taken from the previous generations records.

201 1

VI. RESULTS

The results obtained when the GA described above is run for the magnetizer are given in Figs. 2, 3, and 4. Figure 2 shows the optimal pole shape found by the algorithm and the related field solution. In Fig. 3, the desired flux density distribution along chord A-B is compared against the distribution of the optimal solution of GA. Finally, Fig. 4 reveals the change of the best fitness in the population and the population’s average fitness over the 50 generations.

Fig. 2. Optimized magnetizer pole face and isopotential lines

0.35

E 0.3 3 .I

i n 3 0.25

’Z E 0

8 0.2

0.15

desired - optimized *

d

0.4 0.6 0.8 1 1.2 1.4 1.6 A-B Path [rad]

Fig. 3. Comparison of desired and optimal solutions

18

16

14

5 12

3 10 9

rA

.e $ 8 L L

6

4

2

0 5 10 15 20 25 30 35 40 45 50 Generation

Fig. 4. Change of best and average fitness values

VII. DISCUSSION AND CONCLUSION

The results obtained once again indicates that GAS constitute an efficient optimization environment for the design of electromagnetic devices. The method is succesfully applied to the shape optimization of a magnetizer. The 6 dimensional space of design variables is searched and an optimal solution to the problem is found in 50 generations.

They start their search from several points in the search space and approach the global optimum without being attracted to local optima. As they use only the fitness values, GAS do not require derivatives or any other additional information about the objective function. These characteristics render them robust as they can adapt to the environment the way their biological counterpart does.

Finally GAS are fully parallelizable. The evaluation of each chromosome can be performed independently from the other. This trait make the use of Connection Machine type computers or workstations farms where CPUs are shared very profitable for GA applications.

REFERENCES

[I] G. F. Uler, 0. A. Mohammed, and C. S. Koh, “Design optimization of electromagnetic devices using genetic algorithms.” IEEE Trans. on Mag., November 1994.

[2] L. Davis, Handbook of Genetic Algorithms, New York, New York Van Nostrand Reinhold, 1991.

[3] J. R. Koza, Genetic Programming, Cambridge, Massachusetts: The MIT Press, 1993.

[4] D. E. Goldberg, Genetic Algorithms in Search, Optimization & Machine Learning, Reading, Massachusetts: Addison-Wesley Publishing Company, Inc., 1989.

[5] L. J. Eshelman, R. A. Caruana, and J. D. Schaffer, “Biases in the crossover landscape,” Proceedings of the Third International Conference on Genetic Algorithms, San Mateo, California: Morgan Kaufmann Publishers, Inc., 1989, pp. 10-19.