Vous êtes sur la page 1sur 4

Comparison of Particle Swarm Optimization and

Genetic Algorithm in the Design of Permanent Magnet


Motors
Y. Duan, R.G. Harley and T.G. Habetler
Georgia Institute of Technology, Atlanta, GA, 30332, USA

Abstract- The complexity of the electric machine structure


makes an optimal design a difficult and challenging task. Particle
II. ELECTROMAGNETIC TOOLS TO SUPPORT MACHINE
DESIGN
Swarm Optimization (PSO) and Genetic Algorithm (GA) are two
popular methods for their advantages such as gradient-free and There are currently three broad classes of modeling
ability to find global optima. Due to the fact that the machine approaches used in machine design: the analytical method, the
design models are sometimes computationally intense, it is FEA [2] and the magnetic equivalent circuits (MEC) method
important for the optimization algorithms used in the design [3]. The FEA and MEC are able to consider the nonlinearities in
practice to have high computational efficiency. This paper uses the the material and generally have higher accuracy, but are
design of a Surface Mount Permanent Magnet (SMPM) machine computationally intense [2]. Moreover, a machine prototype
with an analytical model as a benchmark and compares the must be designed before FEA or MEC can analyze it. On the
performance of PSO and GA in terms of their accuracy, the other hand, the analytical design method, which is based on the
robustness to population size and algorithm coefficients. The physical and mathematical relationships in the machine, is able
results show that PSO has advantages over GA on those aspects to compute machine design parameters according to certain
and is preferred over GA when time is a limiting factor. specifications, thus can generate a design. The analytical design
Similarities in the machine design problems make the comparison method is also computationally fast, which provides a good
result also applicable to the design of other types of machines and starting point for finer FEA or MEC based analysis.
with other modeling methods For the above reasons, this work uses the SMPM machine
analytical model improved from [1] to design a 15 KW, 1800
I. INTRODUCTION rpm, 480 V (line-line), 60 Hz SMPM motor as a benchmark.
Fig. 1 shows the flowchart of this analytical design model.
The complexity of the electric machine structure makes an DiaSGap
optimal design a difficult and challenging task. The Length
Inductance
ThichMag
nonlinearities in materials and the complex relationships
between many of the geometrical parameters truly make optimal
machine design a multi-objective optimization. Moreover, the Tooth Width
AirGap Flux
Stator and Rotor
modeling of an electric machine is also challenging [2]. All of Yoke Thickness
Density

these render most classic optimization algorithms ineffective [2] Number of


turns per
because the optimization problem needs to be formulated as a phase
nonlinear, non-gradient, constrained minimization problem, Back EMF
which requires a computational intelligence based method, such
as the GA and the more popular PSO. Output
Power
The electrical machine design model has to relate the
geometric and materials’ data to the performance, and such a Current
model usually contains a large number of input variables. The
Current
computation of the model itself is therefore time-consuming, Desnity
especially when a Finite Element Method (FEA) is used. This Slot Fill Factor

underlines the importance of investigating and comparing the


Design
PSO and GA in terms of their computational efficiency. This Parameters
paper considers the design of a SMPM motor with an analytical
design model based on [1], as an example, and does a
comprehensive comparison against using a GA or PSO Loss Weigth Volume
technique. The result is also informative for other types of motor
Figure 1: Flowchart of the SMPM analytical design model
and other modeling techniques.

嘋,((( 822 ,3(0&


There are only three free design variables in this analytical o Update the particles’ velocity according to the
design model: the stator inner diameter at the airgap relative values of pbest and gbest, using the following
side(DiaSGap), the machine axial length (Length), and the expression:
magnet thickness (MagThck). The stator slot fill factor, the
stator current density, the output power and the excitation vn = ω * vn + c1rand () * ( pbest ,n − xn ) + c2 rand () * ( gbest ,n − xn )
voltage are set as constraints. Given the values of the three
design variables and constraints, other design parameters can be o Move the particle: The velocity is applied for a
solved, such as the stator turns per phase, the slot width, etc. normalized time-step Δt, which is usually chosen to
This analytical design model is nonlinear and contains both be 1, and the position is updated to
continuous and discrete variables, which makes the traditional xn = xn + Δt * vn
gradient based optimization method, such as Newton’s method
[8], ineffective. However, the computational based method, • Repeat process starting at step 4. In this way the particle
such as PSO and GA, are good candidates in solving such moves for discrete time intervals until the termination
optimization problems with complicated system model. PSO criteria are met. The maximum number of iteration is taken
and GA are both applied for this machine design optimization as the terminating criteria here.
problem and their performances are compared.
III. IMPLEMENTATION OF PSO AND GA C. Genetic Algorithm [5]
Genetic Algorithm (GA) is a search procedure which
A. Objective Function emulates the mechanics of natural selection and genetics. The
To account for various requirements in the PM motor design,
algorithms explore the motor parameter space using
the objective functions used here have five performance
mechanisms of reproduction, crossover and mutation, with the
indexes, namely: volume (m3), weight (kg), efficiency, weight
aim of optimizing the machine design. Steps of solving the
of the magnets (kg) and the torque per ampere at the rated
condition (Nm/Arms). Weighting factors have two purposes: the machine design optimization problem using the analytical
first purpose is normalizing each term to be in approximately the design model with GA can be summarized as follows:
1) Encode any potential solution of the optimization problem into a
same magnitude range, the second is putting emphasis on each
binary string, called a chromosome.
index to represent how much importance is attached to each In this paper, the three design variables DiaSGap, Length and
index. One example of such an objective function that pays MagThck are first converted into binary strings and a typical
roughly equal attention to each of the performance indexes is chromosome is shown in Fig. 2. As the airgap diameter and axial
defined as follows: length for the motor being designed typically lies between 50
output = Volume *10000 + Weight + (1 − Efficiency) *200 mm to 250 mm from previous experiences, an offset of 50 and a
(1)
+ WtMagnet *12 − TperA *10 scaling coefficient of 500 is used to scale the values of DiaSGap
and Length contained in the binary string to fall into the range of
B. Particle Swarm Optimization[4] 50 mm to (217-1)/500+50 = 312 mm. Similarly, a scaling
PSO is an evolutionary computation technique based on the coefficient of 100 is used to scale the binary value of the magnet
behavioral patterns of swarms of bees in a field trying to locate thickness to the range of 0 mm to (211-1)/100 = 20.1 mm. Here
the area with the highest density of flowers. The algorithm can NdFe35 with a residual flux density of 1.23 T and relatively
be as summarized as follows: permeability of 1.099 is used and 0 to 20.1 mm is just enough to
• Define the solution space: select the parameters to be cover the magnet thickness range for the machine under
optimized. Here, the parameters are DiaSGap, Length and consideration.
MagThck.
• Define a fitness function, which is the objective function
defined above in (1)
• Initialize Random Swarm Location and Velocities: 6
particles are used. The initial values for DiaSGap and
Length are random numbers between 50 mm to 300 mm and Figure 2 Illustration of chromosome
the initial value for MagThck is a random number between
0 and 20 mm. This initial value range comes from the 2) Create an initial population of chromosomes
typical values according to previous experience for 15 kW, For comparison purposes, the same population size of 6 is
60 Hz and 1800 rpm SMPM machines. The particle is able chosen for the GA. The initial chromosomes are randomly
to travel out of this range if a better solution is found. generated.
• Travel the particles through the solution space with the 3) Evaluate the chromosomes by the objective function and assign a
following steps performed on each particle individually: fitness score accordingly.
o Evaluate particle fitness: compare to global best Since the problem is trying to minimize the objective
and personal best function, the fitness score for each chromosome is 1 over its
objective function value, and then the chromosomes with less

823
objective function value will have a larger probability of being observations can be summarized by running the program many
selected to produce offspring. Sigma scaling as described in [5] times. Statistical based performance comparisons are necessary
is applied to avoid premature convergence. for such methods with probability and random initialization
4) Select members from the current population to produce offspring. involved. As a result, the optimization process is repeated for
Stochastic universal sampling [6] is used here, which exhibits both PSO and GA 18 times and the results are summarized in
no bias and minimal spread and ensures a selection of offspring. Table I, where the coefficients of PSO and GA are carefully
As the population size is 6, 6 pointers will be used in the tuned to improve the performance.
universal sampling and 6 chromosomes will be selected.
5) Perform crossover TABLE I
COMPARISON OF OPTIMAL OBJECTIVE FUNCTION VALUE (OFV) FOR 18 RUNS BY
6 pairs of parents are randomly picked from the 6
PSO AND GA
chromosomes selected in step 4). Uniform crossover is used,
where each gene in the offspring is created by copying the Best Worst Average Standard Times to find correct
corresponding gene from one or the other parent chosen OFV OFV of OFV deviation optimal objective
according to a random generated binary crossover mask [7]. of OFV
6) Perform mutation PSO 53.4 58.3 55.2 1.8 7
Each bit in the chromosome is subject to mutation with a GA 53.6 59.7 56.0 2.1 3
probability.
7) Repeat 3) to 6) until terminating criterion is met If we use the criterion that a value of fewer than 54 for the
The terminating criterion in this paper is chosen to be that the objective function is considered to be an optimal solution, then
number of generations has reached a prespecified maximum Table 1 shows that PSO and GA are both able to find the optimal
value. solution with the 18 runs. However, PSO have a lower average
optimal OFV (55.2) than GA (56.0). The PSO also have less
standard deviations of the optimal OFV in 18 runs than the GA.
IV. RESULTS AND COMPARISONS Moreover, PSO also has a higher probability to find the correct
PSO and GA are implemented with the analytical model optimal than GA (7 in 18 versus 3 in 18). All the above
described in section II and the objective function (1). PSO and comparison results indicate that the PSO have better
GA will be compared in terms their ability to find the correct performance in finding the correct optimal solution than GA
optimal solution and the computational efficiency in solving the from a stochastic point of view.
optimization problem. For comparison purposes, the PSO uses 6
particles and 100 iterations, while the GA uses a population size B. Computational efficiency
of 6 and 100 generations. This results in an evaluation of 600 In this machine design problems, running the machine design
designs for both GA and PSO in a single run. A typical result of model to evaluate design candidates is the dominate part of the
running the PSO and GA for this machine design problem is overall computational burden. As a result, high computational
shown in Fig.4, where the best objective means the lowest value efficiency here means to find the correct optimal design solution
of the objective function found by the GA or the PSO from the with less number of design candidates evaluated. In the actual
beginning to the current iteration or generation. The result implementation of the computational intelligence algorithm in
shows that as the number of iterations or generations increases, optimization problems, the best optimal solution is found by
the PSO and GA are finding better solutions and finally reaches running the algorithm sufficient times with different running
the correct optima. coefficients. The overall computational efficiency is the product
of the population size, the number of iterations or generations,
and the times needed to run the algorithm in order to ensure a
 sufficiently good optimal solution.
1) Number of iterations or generations and population size
362 *$ The number of iterations or generations needed depends on the

convergence rate of the problem, which is determined primarily
%HVW2EMHFWLYH
)XQFWLRQ9DOXH

 by the running coefficients. For example, a higher value of the


 social acceleration constant in PSO or a lower sigma scaling
coefficient will increase the convergence rate. In fact,

convergence actually means reduced population size. As a
 result, PSO and GA are compared by running both algorithms
       with reduced population size.
,WHUDWLRQVRU*HQHUDWLRQV Results in Table II show that the performance of GA degrades
much faster than PSO as the population size goes down. With a
Figure 3 Typical results of PSO and GA population size even as low as 2, the PSO still maintains
acceptable performance while GA is much worse.
A. Ability in finding the optimal solution
3) Number of times needed to run the algorithm
Although both the PSO and GA are actually stochastic
The previous running experience in Table I shows that, once
process where the performance may vary case by case, useful

824
the running coefficients is properly tuned, a correct optimal V. CONCLUSIONS
solution can be found with certain probability by running the PSO and GA are applied to optimize the design of an SMPM
algorithm within 20 times. The problem of how many times motor according to user defined multi-objective functions with a
needed to run the algorithm is then effectively converted to how previous developed analytical model. The results are compared
many times needed to tune the running coefficients. The and show that PSO and GA both have the ability to find the
algorithm whose performance is more robust to the values of the correct optimal solution, and PSO has a slightly better
running coefficients needs less tuning, thus less number of times performance in terms of average and standard deviation from
will be needed to run the algorithm in total. The robustness of multiple runs of the algorithm. However, in terms of the
GA and PSO to their running coefficients is compared by computational efficiency, which is a key requirement for the
running the algorithms with randomly chosen running algorithms in the machine design, PSO outperforms GA
coefficients. The result is shown below in Table III. significantly. PSO has a lower performance degrading with a
smaller population size, and higher robustness to algorithm
TABLE II coefficients, which indicates that the fewer design candidate
PERFORMANCES COMPARISON OF PSO AND GA FOR REDUCED POPULATION SIZE evaluations is necessary for PSO. The comparison results
WITH 5 TIMES OF RUNNING EACH indicate that PSO can be preferred over GA when time is a
limiting factor. Although this work is carried out for a SMPM
Population size = 3 machine with and analytical design model, similarities in
Best Worst Average Standard Deviation machine design problem make it also applicable to the design of
other types of machines and with other modeling methods.
OFV OFV of OFV of OFV
PSO 55.2 59.7 57.5 2.1
GA 56.4 64.7 61.8 3.4 ACKNOWLEDGMENT
Population size = 2 Financial support for this work from the Office of Naval
Best Worst Average Standard Deviation Research is gratefully acknowledged.
OFV OFV of OFV of OFV
PSO 56.4 60.5 58.8 1.7 REFERENCES
GA 59.8 83.1 67.4 9.5 [1] Y. Duan, R. G. Harley and T. G. Habetler, "Multi-objective Design
Optimization of Surface Mount Permanent Magnet Machine with Particle
Swarm Intelligence", Swarm Intelligence Symposium 2008, St. Louis, pp.
1-5, September 2008.
TABLE III
[2] W. Ouyang, D. Zarko and T.A. Lipo, “Permanent Magent Machine Design
PERFORMANCE COMPARISON OF PSO AND GA FOR RANDOMLY CHOSEN
Practice and Optimization”, IEEE conference on Industrial Applications,
COEFFICIENTS WITH 15 TIMES OF RUNS EACH
pp. 1905 – 1911, 2006
[3] V. Ostovic, “Magnetic equivalent circuit presentation of electric macines”,
Best Worst Average Standard deviation of OFV Electric Machines and Power Systems. Vol. 12, No. 6, pp. 407-432, Jun.
1984
OFV OFV of OFV
[4] J. Robinson and Y. Rahmat-Samii, “Particle Swarm Optimization in
PSO 53.9 61.8 56.7 2.7 Electromagnetics”, IEEE Transactions on Antennas and Propagation,
Vol. 52, No. 2, pp. 397 – 407, February 2004
GA 55.8 72.0 61.2 5.3 [5] Melanie Mitchell, An Introduction to Genetic Algorithms, 3rd ed., MIT
Press, 1998, pp. 167-168
[6] James E. Baker. “Reducing Bias and Inefficiency in the Selection
In Table III, the coefficients in the PSO and GA are chosen to be Algorithm”, Proceedings of the Second International Conference on
uniformly distributed random variables between values of 0 to 1. Genetic Algorithms and their Application, pp. 14-21, 1987
For PSO, they are the inertia, self and social acceleration [7] S.N. Sivanandam and S.N. Deepa, Introduction to Genetic Algorithms,
Springer, 2008, pp.50 and pp. 53
constant and for GA are the probability of crossover and [8] Bazaraa, Mokhtar S. and Shetty, C. M., “Nonlinear programming : Theory
mutation, the sigma scaling coefficient and linkage coefficients. and algorithms”, John Wiley & Sons, 1979
Because the maximum speed in the PSO can be chosen
according to the range of the variable and it does not need
carefully tuning, they will not be randomized. The results show
clearly that PSO has a lower average and standard deviation and
GA’s worst solution of 72, is significantly higher than the 61.8
of the PSO. The comparison shows that tuning of the parameters
is important for GA while can be neglected or not carefully
treated for PSO and the time saving in the tuning is pronounced
as the modeling techniques become more intensive.

825