Genetic Algorithms in Electromagnetics 1st Edition Randy L. Haupt instant download
Genetic Algorithms in Electromagnetics 1st Edition Randy L. Haupt instant download
https://ebookgate.com/product/genetic-algorithms-in-
electromagnetics-1st-edition-randy-l-haupt/
https://ebookgate.com/product/genetic-algorithms-and-genetic-
programming-modern-concepts-and-practical-applications-1st-edition-
michael-affenzeller/
ebookgate.com
https://ebookgate.com/product/ecclesiastes-analecta-gorgiana-1st-
edition-paul-haupt/
ebookgate.com
https://ebookgate.com/product/numerical-analysis-in-electromagnetics-
the-tlm-method-1st-edition-pierre-saguet/
ebookgate.com
https://ebookgate.com/product/the-wiener-hopf-method-in-
electromagnetics-vito-g-daniele/
ebookgate.com
Engineering electromagnetics applications 1st Edition
Rajeev Bansal
https://ebookgate.com/product/engineering-electromagnetics-
applications-1st-edition-rajeev-bansal/
ebookgate.com
https://ebookgate.com/product/multifunctional-cosmetics-1st-edition-
randy-schueller/
ebookgate.com
https://ebookgate.com/product/advanced-engineering-electromagnetics-
second-edition-c-a-balanis/
ebookgate.com
https://ebookgate.com/product/genetic-recombination-in-cancer-1st-
edition-gajanan-v-sherbet-author/
ebookgate.com
https://ebookgate.com/product/biology-of-aggression-1st-edition-randy-
j-nelson/
ebookgate.com
Genetic Algorithms in
Electromagnetics
Genetic Algorithms in
Electromagnetics
Randy L. Haupt
Applied Research Laboratory
Pennsylvania State University
Douglas H. Werner
Department of Electrical Engineering
Applied Research Laboratory
Materials Research Institute
Pennsylvania State University
WILEY-INTERSCIENCE
A John Wiley & Sons, Inc., Publication
Copyright © 2007 by John Wiley & Sons, Inc. All rights reserved.
Limit of Liability/Disclaimer of Warranty: While the publisher and author have used their best
efforts in preparing this book, they make no representations or warranties with respect to the
accuracy or completeness of the contents of this book and specifically disclaim any implied
warranties of merchantability or fitness for a particular purpose. No warranty may be created
or extended by sales representatives or written sales materials. The advice and strategies
contained herein may not be suitable for your situation. You should consult with a professional
where appropriate. Neither the publisher nor author shall be liable for any loss of profit or any
other commercial damages, including but not limited to special, incidental, consequential, or
other damages.
For general information on our other products and services or for technical support, please
contact our Customer Care Department within the United States at (800) 762-2974, outside the
United States at (317) 572-3993 or fax (317) 572-4002.
Wiley also publishes its books in a variety of electronic formats. Some content that appears in
print may not be available in electronic formats. For more information about Wiley products,
visit our web site at www.wiley.com.
Haupt, Randy L.
Genetic algorithms in electromagnetics / by Randy L. Haupt and Douglas H. Werner.
p. cm.
A Wiley-Interscience publication.
Includes bibliographical references and index.
ISBN: 978-0-471-48889-7
1. Antenna arrays—Design. 2. Electromagnetism—Mathematical models. 3. Genetic
algorithms. I. Werner, Douglas H., 1960– II. Title.
TK7871.6.H37 2007
621.30285'631—dc22
2006046738
10 9 8 7 6 5 4 3 2 1
We dedicate this book to our wives,
Sue Ellen Haupt and Pingjuan L. Werner.
Contents
Preface xi
Acknowledgments xiii
3. Step-by-Step Examples 45
3.1 Placing Nulls / 45
3.2 Thinned Arrays / 54
9. GA Extensions 251
9.1 Selecting Population Size and Mutation Rate / 251
9.2 Particle Swarm Optimization (PSO) / 255
9.3 Multiple-Objective Optimization / 257
9.3.1 Introduction / 257
9.3.2 Strength Pareto Evolutionary Algorithm—Strength
Value Calculation / 258
9.3.3 Strength Pareto Evolutionary Algorithm—Pareto Set
Clustering / 259
9.3.4 Strength Pareto Evolutionary Algorithm—
Implementation / 260
9.3.5 SPEA-Optimized Planar Arrays / 261
9.3.6 SPEA-Optimized Planar Polyfractal Arrays / 264
x CONTENTS
A special thanks goes to Lana Yezhova for assisting in the preparation and
editing of the manuscript for this book, and to Rodney A. Martin for the cover
art. The authors would also like to express their sincere appreciation to the
following individuals, each of whom provided a valuable contribution to the
material presented in this book:
Zikri Bayraktar
Daniel W. Boeringer
Jeremy A. Bossard
Matthew G. Bray
Jennifer Carvajal
James W. Culver
Steven D. Eason
K. Prakash Hari
Douglas J. Kern
Ling Li
Derek S. Linden
Kenneth A. O’Connor
Joshua S. Petko
Shawn Rogers
Thomas G. Spence
Pingjuan L. Werner
Michael J. Wilhelm
xiii
1
Introduction to
Optimization in
Electromagnetics
As in other areas of engineering and science, research efforts in electromag-
netics have concentrated on finding a solution to an integral or differential
equation with boundary conditions. An example is calculating the radar cross
section (RCS) of an airplane. First, the problem is formulated for the size,
shape, and material properties associated with the airplane. Next, an appropri-
ate mathematical description that exactly or approximately models the air-
plane and electromagnetic waves is applied. Finally, numerical methods are
used for the solution. One problem has one solution. Finding such a solution
has proved quite difficult, even with powerful computers.
Designing the aircraft with the lowest RCS over a given frequency range is
an example of an optimization problem. Rather than finding a single solution,
optimization implies finding many solutions then selecting the best one.
Optimization is an inherently slow, difficult procedure, but it is extremely
useful when well done. The difficult problem of optimizing an electromagnet-
ics design has only recently received extensive attention.
This book concentrates on the genetic algorithm (GA) approach to opti-
mization that has proved very successful in applications in electromagnetics.
We do not think that the GA is the best optimization algorithm for all prob-
lems. It has proved quite successful, though, when many other algorithms have
failed. In order to appreciate the power of the GA, a background on the most
common numerical optimization algorithms is given in this chapter to familiar-
ize the reader with several optimization algorithms that can be applied to
1
2 INTRODUCTION TO OPTIMIZATION IN ELECTROMAGNETICS
electromagnetics problems. The antenna array has historically been one of the
most popular optimization targets in electromagnetics, so we continue that
tradition as well.
The first optimum antenna array distribution is the binomial distribution
proposed by Stone [1]. As is now well known, the amplitude weights of the
elements in the array correspond to the binomial coefficients, and the resulting
array factor has no sidelobes. In a later paper, Dolph mapped the Chebyshev
polynomial onto the array factor polynomial to get all the sidelobes at an equal
level [2]. The resulting array factor polynomial coefficients represent the
Dolph–Chebyshev amplitude distribution. This amplitude taper is optimum in
that specifying the maximum sidelobe level results in the smallest beamwidth,
or specifying the beamwidth results in the lowest possible maximum sidelobe
level. Taylor developed a method to optimize the sidelobe levels and beam-
width of a line source [3]. Elliot extended Taylor’s work to new horizons,
including Taylor-based tapers with asymmetric sidelobe levels, arbitrary side-
lobe level designs, and null-free patterns [4]. It should be noted that Elliot’s
methods result in complex array weights, requiring both an amplitude and
phase variation across the array aperture. Since the Taylor taper optimized
continuous line sources, Villeneuve extended the technique to discrete arrays
[5]. Bayliss used a method similar to Taylor’s amplitude taper but applied to
a monopulse difference pattern [6]. The first optimized phase taper was devel-
oped for the endfire array. Hansen and Woodyard showed that the array
directivity is increased through a simple formula for phase shifts [7].
Iterative numerical methods became popular for finding optimum array
tapers beginning in the 1970s. Analytical methods for linear array synthesis
were well developed. Numerical methods were used to iteratively shape the
mainbeam while constraining sidelobe levels for planar arrays [8–10]. The
Fletcher–Powell method [11] was applied to optimizing the footprint pattern
of a satellite planar array antenna. An iterative method has been proposed to
optimize the directivity of an array via phase tapering [12] and a steepest-
descent algorithm used to optimize array sidelobe levels [13]. Considerable
interest in the design of nonuniformly spaced arrays began in the late 1950s
and early 1960s. Numerical optimization attracted attention because analytical
synthesis methods could not be found. A spotty sampling of some of the tech-
niques employed include linear programming [14], dynamic programming
[15], and steepest descent [16]. Many statistical methods have been used as
well [17].
Most practical optimization problems have many variables. It’s usually best
to learn to walk before learning to run, so this section starts with optimizing
one variable; then the next section covers multiple variable optimization.
After describing a couple of single-variable functions to be optimized, several
OPTIMIZING A FUNCTION OF ONE VARIABLE 3
where Ψ = k du
k = 2π/λ
λ = wavelength
u = cos φ
A graph of AF1 for all values of u when a = 1 is shown in Figure 1.2. If u = 0.8
is the point to be minimized, then the plot of the objective function as a func-
tion of a is shown in Figure 1.3. There is only one minimum at a = 0.382.
Another objective function is a similar four-element array with uniform
amplitude but conjugate phases at the end elements
Figure 1.3. Objective function with input a and output the field amplitude at u = 0.8.
Figure 1.4. Objective function with input d and output the field amplitude at u = 0.8.
on the reduced interval (Δ1 + Δ2) is always placed at the same proportional
distance from the left endpoint, then
Δ1 Δ2
= (1.3)
Δ1 + Δ 2 + Δ1 Δ1 + Δ 2
Δ1 + Δ 2 + Δ1 = 1 (1.4)
Δ 21 − 3Δ 1 + 1 = 0 (1.5)
5 −1
Δ1 = = 0.38197. . . (1.6)
2
f ′′′( xn )
f ′( xn + 1) = f ′( xn) + f ′′( xn)( xn + 1 − xn ) + ( xn + 1 − xn )2 + . . . (1.7)
2!
8 INTRODUCTION TO OPTIMIZATION IN ELECTROMAGNETICS
Figure 1.8. The first eight function evaluations (circles) of the golden search algorithm when
minimizing AF2.
Keeping only the first and second derivatives and assuming that the next step
reaches the minimum or maximum, then (1.7) equals zero, so
f ′( xn ) + f ′′( xn )( xn + 1 − xn ) = 0 (1.8)
f ′( x n )
xn + 1 = xn − (1.9)
f ′′( xn )
Δ [ f ( xn + 1 ) − f ( xn − 1 )]
xn + 1 = xn − (1.10)
2[ f ( xn + 1 ) − 2 f ( xn ) + f ( xn − 1 )]
where
Δ = xn + 1 − xn = xn − xn − 1 (1.11)
This approximation slows the method down but is often the only practical
implementation.
Let’s try finding the minimum of the two test functions. Since it’s not easy
to take the derivatives of AF1 and AF2, finite-difference approximations will
be used instead. Newton’s method converges on the minimum of AF1 for
every starting point in the interval. The second function is more interesting,
OPTIMIZING A FUNCTION OF ONE VARIABLE 9
Figure 1.9. The convergence of Newton’s algorithm when starting at two different points.
though. Figure 1.9 shows the first five points calculated by the algorithm from
two different starting points. A starting point at δ = 0.6 radians results in the
series of points that heads toward the local minimum on the left. When the
starting point is δ = 0.7 rad, then the algorithm converges toward the global
minimum. Thus, Newton’s method is known as a local search algorithm,
because it heads toward the bottom of the closest minimum. It is also a non-
linear algorithm, because the outcome can be very sensitive to the initial
starting point.
f ( x0 ) ( x 21 − x 22 ) + f ( x1 )( x 22 − x 02 ) + f ( x2 )( x 02 − x12 )
x3 = (1.12)
2 f ( x0 )( x1 − x2 ) + 2 f ( x1)( x2 − x0 ) + 2 f ( x2 )( x0 − x1 )
When the three points are along the same line, the denominator is zero and
the interpolation fails. Also, this formula can’t differentiate between a
minimum and a maximum, so some caution is necessary to insure that it
pursues a minimum.
10 INTRODUCTION TO OPTIMIZATION IN ELECTROMAGNETICS
Figure 1.10. Convergence of the MATLAB quadratic interpolation routine when minimizing
AF2.
Usually, arrays have many elements; hence many variables need to be adjusted
in order to optimize some aspect of the antenna pattern. To demonstrate the
complexity of dealing with multiple dimensions, the objective functions in
(1.1) and (1.2) are extended to two variables and three angle evaluations of
the array factor.
1 3
AF3 (a1 , a2 ) = ∑ a2 + a1e jΨ + e j 2 Ψ + e j 3Ψ + a1e j 4 Ψ + a2 e j 5Ψ
6 m=1
m m m m m
(1.13)
1 3 jδ
AF4 (δ 1 , δ 2 ) = ∑ e + e jδ e j Ψ + e j 2 Ψ + e j 3 Ψ + e jδ e j 4 Ψ + e jδ e j 5 Ψ
6 m=1
2 1 m m m 1 m 2 m
(1.14)
tion has a single minimum, while the phase weight objective function has
several minima.
0.8
field at desired nulls
0.6
0.4
0.2
global
0 minimum
1
1
0.5
a1 0.5
a2
0 0
1.5
field at desired nulls
0.5
global
0 minimum
5
local minima
δ1 6
4
2
0 0 δ2
1.2
0 .8 1
6 0.4 0.6 0.4
1
0.
6 0.6
0.2
0.8 1
5
1 0.4 1
1.2 1.2 8
0.
6
4 0.
1.
1.2
4 1.6
0.8
1
1.4
1
0.
δ1
3 0. 8
0.6
6
1.2
1.
1. 4
0.4
1
0.
2
8
1.6
2 0.6
1 0.8
1.4
1.
6
1
1.4 1.2
2
1.
0.6
0.8
6
1
0.
0.4 1
0
0 2 4 6
δ2
guessing plays an important part in finding the minimum. Even a local opti-
mizer makes use of random starting points. Local optimizers are made more
“global” by making repeated starts from several different, usually random,
points on the cost surface.
Figure 1.15 shows 10 random guesses on a contour plot of AF4. This first
attempt clearly misses some of the regions with minima. The plot in Figure 1.16
results from adding 20 more guesses. Even after 30 guesses, the lowest
value found is not in the basin of the global minimum. Granted, a new set of
random guesses could easily land a value near the global minimum. The
problem, though, is that the odds decrease as the number of variables
increases.
1.2
0 .8 1
6 0.4 0.6 0.4
1
0.
6 0.6
0.2
0.8 1
5
1 0.4 1
1.2 1.2 8
0.
6
4 0.
1.
1.2
4 1.6
0.8
1
1.4
1
0.8
δ1
3 0.
0.6
6
1.2
1.
1. 4
0.4
1
0.
2
8
1.6
2 0.6
1 0.8
1.4
1.
6
1
1.4 1.2
2
1.
0.6
0.8
6
1
0.
0.4 1
0
0 2 4 6
δ2
The easiest line search imaginable is the coordinate search method. If the
function has two variables, then the algorithm begins at a random point, holds
one variable constant, and searches along the other variable. Once it reaches
a minimum, it holds the second variable constant and searches along the first
OPTIMIZING A FUNCTION OF MULTIPLE VARIABLES 15
where vnm+1 = vnm + nm+1 and mn+1 is the step length calculated using a formula.
This approach doesn’t work well, because it does not exploit any information
about the cost function. Most of the time, the coordinate axes are not the best
search directions [20]. Figure 1.18 shows the paths taken by a coordinate
search algorithm from three different starting points on AF4. A different
minimum was found from each starting point.
The coordinate search does a lot of unnecessary wiggling to get to a
minimum. Following the gradient seems to be a more intuitive natural choice
for the direction of search. When water flows down a hillside, it follows the
gradient of the surface. Since the gradient points in the direction of maximum
increase, the negative of the gradient must be followed to find the minimum.
This observation leads to the method of steepest descent given by [19]
vm + 1 = vm − α m ∇ f ( vm ) (1.16)
where αm is the step size. This formula requires only first-derivative informa-
tion. Steepest descent is very popular because of its simple form and often
excellent results. Problems with slow convergence arise when the cost function
1
0.8
0.6
0.8
0.2
1
5
1 0.4 8 1
1.2 1.2 0.
1.4 0 .6
1.2
4
0.8
1
1.
2 0.8 1
1.4
1.6
δ1
3 1.4 0.
0.6
6
1.2
0.4
1
0.
1.6
8
2 0 0.6
1 .8
1.2
1.4
1.6
1 0.6 2
1.
4
1.
0.6
0.8
1
0.4 1 0.8
0
0 2 4 6
δ2
Figure 1.18. A coordinate search algorithm finds three different minima of AF4 when starting
at three different points.
16 INTRODUCTION TO OPTIMIZATION IN ELECTROMAGNETICS
has narrow valleys, since the new gradient is always perpendicular to the old
gradient at the minimum point on the old gradient.
Even more powerful methods are possible if second-derivative information
is used. Starting with the Taylor series expansion of the function
∇f ( vm + 1) = ∇f ( vm ) + (vm + 1 − vm )H = 0 (1.18)
which leads to
vm + 1 = vm − α m H −1∇ f ( vm ) (1.19)
( vm + 1 − vm )( vm + 1 − vm )T
Qm + 1 = Qm +
( vm + 1 − vm )T (∇f (vm + 1 ) − ∇f (vm ))
m
∇f (vm + 1 ) − ∇f (vm ))(∇f ( vm + 1) −∇f ( vm ))T Qm
Q (∇
− (1.20)
(∇f ( vm + 1) −∇f ( vm ))T Qm(∇f ( vm + 1) −∇f ( vm ))
A similar formula was developed later and became known as the Broyden–
Fletcher–Goldfarb–Shanno (BFGS) update [22–25]:
As with the DFP update, the BFGS update can be written for the inverse of
the Hessian matrix.
A totally different approach to the line search is possible. If a problem has
N dimensions, then it might be possible to pick N orthogonal search directions
that could result in finding the minimum in N iterations. Two consecutive
search directions, u and v, are orthogonal if their dot product is zero or
u ⋅ v = uvT = 0 (1.22)
uHvT = 0 (1.23)
where H is the identity matrix. If (1.23) is true and H is not the identity matrix,
then u and v are known as conjugate vectors or H-orthogonal vectors. A set of
N vectors that have this property is known as a conjugate set. It is these vectors
that will lead to the minimum in N steps.
Powell developed a method of following these conjugate directions to the
minimum of a quadratic function. Start at an arbitrary point and pick a search
direction. Next, Gram–Schmidt orthogonalization is used to find the remain-
ing search directions. This process is not very efficient and can result in some
search directions that are nearly linearly dependent. Some modifications to
Powell’s method make it more attractive.
The best implementation of the conjugate directions algorithm is the con-
jugate gradient algorithm [26]. This approach uses the steepest descent as its
first step. At each additional step, the new gradient vector is calculated and
added to a combination of previous search vectors to find a new conjugate
direction vector
vm + 1 = vm + α m m (1.24)
mT ∇f ( vm )
αm = − (1.25)
mT H m
Since (1.25) requires calculation of the Hessian, αm is usually found by mini-
mizing f(vm + αmm). The new search direction is found using
m + 1 = −∇f m + 1 + β m + 1 m (1.26)
∇f T ( vm + 1)∇f ( vm + 1)
βm = (1.27)
∇f T ( vm )∇f (vm )
18 INTRODUCTION TO OPTIMIZATION IN ELECTROMAGNETICS
This formulation converges when the starting point is sufficiently close to the
minimum. A nonlinear conjugate gradient algorithm that uses the Polak–
Ribiere version of βm also exists [18]:
⎧[∇f ( vm + 1) − ∇f ( vm )]T ∇f ( vm + 1) ⎫
β m = max ⎨ , 0⎬ (1.28)
⎩ ∇f T ( vm )∇f ( vm ) ⎭
where the n are unit vectors and μ is a constant. If the simplex surrounds the
minimum, then the simplex shrinks in all directions. Otherwise, the point cor-
responding to the highest objective function is replaced with a new point that
has a lower objective function value. The diameter of the simplex eventually
gets small enough that it is less than the specified tolerance and the solution
is the vertex with the lowest objective function value. A flowchart outlining
the steps to this algorithm is shown in Figure 1.19.
Figure 1.20 shows the path taken by the Nelder–Mead algorithm starting
with the first triangle and working its way down to the minimum of AF3.
Sometimes the algorithm flips the triangle and at other times it shrinks or
expands the triangle in an effort to surround the minimum. Although it can
successfully find the minimum of AF3, it has great difficulty finding the global
OPTIMIZING A FUNCTION OF MULTIPLE VARIABLES 19
no yes
f(vref) < f(vmin)? vexp = 2vavg – vmax
no
f(vmax-1) < f(vref) < f(vmax)? f(vexp) < f(vmin)?
yes yes no
vmax = vcon
minimum of AF4. Its success with AF4 depends on the starting point. Figure
1.21 shows a plot of the starting points for the Nelder–Mead algorithm that
converge to the global minimum. Any other point on the plot converges
to one of the local minima. There were 10,201 starting points tried and 2290
or 22.45% converged to the global minimum. That’s just slightly better
than a one-in-five chance of finding the true minimum. Not very encouraging,
especially when the number of dimensions increases. The line search
algorithms exhibit the same behavior as the Nelder–Mead algorithm in
Figure 1.21.
20 INTRODUCTION TO OPTIMIZATION IN ELECTROMAGNETICS
0.8
9
8 2
7 3
0.6
6 4
5
a1
0.4 1
0.2
0
0 0.2 0.4 0.6 0.8 1 1
a2
Figure 1.20. Movements of the simplex in the Nelder–Mead downhill simplex algorithm when
finding the minimum of AF3.
6
global
minimum
5
4
δ1
starting
2 points
0
0 2 4 6
δ2
Figure 1.21. Starting points for the Nelder–Mead algorithm denoted by small squares converge
to the global minimum. All other starting points converge to a local minimum.
COMPARING LOCAL NUMERICAL OPTIMIZATION ALGORITHMS 21
This section compares four local optimization approaches against a more for-
midable problem. Consider a linear array along the x axis with an array factor
given by
N el
AF( u, λ, w, x, N el ) = ∑ wn e jkx u n
(1.30)
n=1
where ub defines the extent of the main beam. This function is relatively
simple, except for finding the appropriate value for ub. For a uniform aperture,
the first null next to the mainlobe occurs at an angle of about λ/(size of the
aperture) ≅ λ/[d(N + 1)]. Amplitude tapers decrease the efficiency of the
aperture, thus increasing the width of the mainbeam. As a result, ub depends
on the amplitude, making the function difficult to characterize for a given set
of input values. In addition, shoulders on the mainbeam may be overlooked
by the function that finds the maximum sidelobe level.
The four methods used to optimize AF5 are
1. Broyden–Fletcher–Goldfarb–Shanno (BFGS)
2. Davidon–Fletcher–Powell (DFP)
3. Nelder–Mead downhill simplex (NMDS)
4. Steepest descent
All of these are available using the MATLAB functions fminsearch.m and
fminunc.m. The analytical solution is simple: −∞ dB. Let’s see how the differ-
ent methods fare.
22 INTRODUCTION TO OPTIMIZATION IN ELECTROMAGNETICS
The four algorithms are quite sensitive to the starting values of the am-
plitude weights. These algorithms quickly fall into a local minimum, be-
cause their theoretical development is based on finding the minimum of
a bowl-shaped objective function. The first optimization run randomly
generated a starting vector of amplitude weights between 0 and 1. Each
algorithm was given 25 different starting values and the results were averaged.
Table 1.1 shows the results for a linear array of isotropic point sources
spaced 0.5λ apart. A −∞ sidelobe level would ruin a calculation of the mean
of the best sidelobe level found over the 25 runs, so the median is as reported
in Table 1.1. The mean and median are very close except when a −∞ sidelobe
level occurs.
These results are somewhat disappointing, since the known answer is −∞
dB. The local nature of the algorithms limits their ability to find the best or the
global solution. In general, a starting point is selected, then the algorithm pro-
ceeds downhill from there. When the algorithm encounters too many hills and
valleys in the output of the objective function, it can’t find the global optimum.
Even selecting 25 random starting points for four different algorithms didn’t
result in finding an output with less than −50 dB sidelobe levels.
In general, as the number of variables increases, the number of function
calls needed to find the minimum also increases. Thus, Table 1.1 has a larger
median number of function calls for larger arrays. Table 1.2 shows how increas-
ing the maximum number of function calls improves the results found using
BFGS and DFP whereas the Nelder–Mead and steepest-descent algorithms
show no improvement.
Another idea is warranted. Perhaps taking the set of parameters that pro-
duces the lowest objective function output and using them as the initial start-
ing point for the algorithm will produce better results. The step size gets
smaller as the algorithm progresses. Starting over may allow the algorithm to
take large enough steps to get out of the valley of the local minimum. Thus,
the algorithm begins with a random set of amplitude weights, the algorithm
optimizes with these weights to produce an “optimal” set of parameters, these
new “optimal” set of parameters are used as a new initial starting point for
the algorithm, and the process repeats several times. Table 1.3 displays some
interesting results when the cycle is repeated 5 times. Again, the algorithms
were averaged over 25 different runs. In all cases, the results improved by
running the optimization algorithm for 2000 function calls on five separate
starts rather than running the optimization algorithm for a total of 10,000
function calls with one start (Table 1.2). The lesson learned here is to use this
iterative procedure when attempting an optimization with multiple local
minima. The size of the search space collapses as the algorithm converges on
the minimum. Thus, restarting the algorithm at the local minimum just expands
the search space about the minimum.
An alternative approach known as “seeding” starts the algorithm with a
good first guess based on experience, a hunch, or other similar solutions. In
general, we know that low-sidelobe amplitude tapers have a maximum ampli-
tude at the center of the array, while decreasing in amplitude toward the
edges. The initial first guess is a uniform amplitude taper with a maximum
sidelobe level of −13 dB. Table 1.4 shows the results of using this good first
guess after 2000 function calls. The Nelder–Mead algorithm capitalized on this
good first guess, while the others didn’t. Trying a triangle amplitude taper,
however, significantly improved the performance of all the algorithms. In fact,
the Nelder–Mead and steepest-descent algorithms did better than the BFGS
and DFP algorithms. Combining the good first guess with the restarting idea
in Figure 1.11 may produce the best results of all.
24 INTRODUCTION TO OPTIMIZATION IN ELECTROMAGNETICS
r ≤ e[ f ( p old ) − f ( pnew )] / T
(1.32)
The temperature is lowered slowly, so that the algorithm does not converge
too quickly.
Simulated annealing (SA) begins as a random search and ends with little
variations about the minimum. Figure 1.22 shows the convergence of the
simulated annealing algorithm when minimizing AF4. The final value was
0.1228 or −33.8 dB. Simulated annealing was first applied to the optimization
of antenna arrays in 1988 [30].
SA has proven superior to the local optimizers discussed in this chapter.
The random perturbations allow this algorithm to jump out of a local minimum
in search of the global minimum. SA is very similar to the GA. It is a random
search that has tuning parameters that have tremendous effect on the success
and speed of the algorithm. SA starts with a single guess at the solution and
works in a serial manner to find the solution. A genetic algorithm starts with
many initial guesses and works in a parallel manner to find a list of solutions.
The SA algorithm slowly becomes less random as it converges, while the GA
may or may not become less random with time. Finally, the GA is more adept
at working with continuous, discrete, and integer variables, or a mix of those
variables.
The rest of this book is devoted to the relatively new optimization technique
called the genetic algorithm (GA). GAs were introduced by Holland [31] and
were applied to many practical problems by Goldberg [32]. A GA has several
advantages over the traditional numerical optimization approaches presented
in this chapter, including the facts that it
26 INTRODUCTION TO OPTIMIZATION IN ELECTROMAGNETICS
REFERENCES
12. D. K. Cheng, Optimization techniques for antenna arrays, Proc. IEEE 59(12):1664–
1674 (Dec. 1971).
13. J. F. DeFord and O. P. Gandhi, Phase-only synthesis of minimum peak sidelobe pat-
terns for linear and planar arrays, IEEE AP-S Trans. 36(2):191–201 (Feb. 1988).
14. J. E. Richie and H. N. Kritikos, Linear program synthesis for direct broadcast satel-
lite phased arrays, IEEE AP-S Trans. 36(3):345–348 (March 1988).
15. M. I. Skolnik, G. Nemhauser, and J. W. Sherman, III, Dynamic programming
applied to unequally spaced arrays, IEEE AP-S Trans. 12:35–43 (Jan. 1964).
16. J. Perini, Note on antenna pattern synthesis using numerical iterative methods,
IEEE AP-S Trans. 12:791–792 (July 1976).
17. Y. T. Lo, A mathematical theory of antenna arrays with randomly spaced elements,
IEEE AP-S Trans. 12(3):257–268 (May 1964).
18. W. H. Press et al., Numerical Recipes, Cambridge Univ. Press, New York, 1992.
19. G. Luenberger, Linear and Nonlinear Programming, Addison-Wesley, Reading,
MA, 1984.
20. H. H. Rosenbrock, An automatic method for finding the greatest or least value of
a function, Comput. J. 3:175–184 (1960).
21. M. J. D. Powell, An efficient way for finding the minimum of a function of several
variables without calculating derivatives, Comput. J. 155–162 (1964).
22. G. C. Broyden, A class of methods for solving nonlinear simultaneous equations,
Math. Comput. 577–593 (Oct. 1965).
23. R. Fletcher, Generalized inverses for nonlinear equations and optimization, in
Numerical Methods for Non-linear Algebraic Equations, R. Rabinowitz, ed.,
Gordon & Breach, London, 1963.
24. D. Goldfarb and B. Lapidus, Conjugate gradient method for nonlinear program-
ming problems with linear constraints, I&EC Fund. 142–151 (Feb. 1968).
25. D. F. Shanno, An accelerated gradient projection method for linearly constrained
nonlinear estimation, SIAM J. Appl. Math. 322–334 (March 1970).
26. J. R. Shewchuk, An Introduction to the Conjugate Gradient Method without the
Agonizing Pain, Technical Report CMU-CS-94-125, Carnegie Mellon Univ.
1994.
27. J. A. Nelder and R. Mead, Comput. J. 7:308–313 (1965).
28. S. Kirkpatrick, C. D. Gelatt, Jr., and M. P. Vecchi, Optimization by simulated
annealing, Science 220:671–680 (May 13, 1983).
29. N. Metropolis et al., Equation of state calculations by fast computing machines,
J. Chem. Phys. 21:1087–1092 (1953).
30. T. J. Cornwell, A novel principle for optimization of the instantaneous Fourier
plane coverage of correction arrays, IEEE AP-S Trans. 36(8):1165–1167 (Aug.
1988).
31. J. H. Holland, Adaptation in Natural and Artificial Systems, Univ. Michigan Press,
Ann Arbor, 1975.
32. D. E. Goldberg, Genetic Algorithms in Search, Optimization, and Machine Learn-
ing, Addison-Wesley, New York, 1989.
33. R. L. Haupt and Sue Ellen Haupt, Practical Genetic Algorithms, 2nd ed., Wiley,
New York, 2004.
2
Anatomy of a
Genetic Algorithm
29
30 ANATOMY OF A GENETIC ALGORITHM
⎢ ⎥ ⎢ ⎥
⎢ ⎥ ⎢ ⎥
⎣chromN ⎦ ⎣ gN 1 g NM ⎦
chromosomes genes
⎡ red 1 19.132 ⎤
⎢ blue 4 −12.954 ⎥
=⎢ ⎥ (2.1)
⎢ ⎥
⎢ ⎥
⎣ green 2 0.125⎦
values or alleles
⎧ ⎡ chrom1 ⎤ ⎫ ⎡ cost1 ⎤
⎪ ⎢ chrom ⎥ ⎪ ⎢ cost ⎥
⎪ 2 ⎪
f ⎨⎢ ⎥⎬ = ⎢ ⎥
2
(2.2)
⎪ ⎢ ⎥ ⎪ ⎢ ⎥
⎢ ⎥ ⎢ ⎥
⎩⎪ ⎣chromN ⎦ ⎭⎪ ⎣costN ⎦
These steps are shown in the flowchart in Figure 2.1. Each of these steps is
discussed in detail in the following sections. MATLAB commands are used
to demonstrate the basic concepts.
pop=rand(npop,nvar)
The lock which was invented by the late Mr. Bramah deservedly
occupies a high place among this class of contrivances. It differs
very materially from all which has gone before it; its mechanical
construction is accurate and beautiful; its key is remarkable for
smallness of size; and the invention was introduced by the
publication of an essay containing much sensible observation on
locks generally. The full title of this essay runs thus: “A dissertation
on the Construction of Locks. Containing, first, reasons and
observations, demonstrating all locks which depend upon fixed
wards to be erroneous in principle, and defective in point of security.
Secondly, a specification of a lock, constructed on a new and
infallible principle, which, possessing all the properties essential to
security, will prevent the most ruinous consequences of house-
robberies, and be a certain protection against thieves of all
descriptions.” A second edition of this Dissertation was published in
1815; but the work is now extremely scarce, and hardly attainable.
It is remarkable to observe the boldness and self-relying
confidence with which Mr. Bramah, some sixty years ago, declared
that all locks were, up to that time, violable; he felt that this was
strictly true, and he hesitated not to give expression to his
conviction. The following is from his Dissertation:—
“It is observable that those who are taken in the desperate
occupation of house-breaking are always furnished with a number
and variety of keys or other instruments adapted to the purpose of
picking or opening locks; and it needs no argument to prove that
these implements must be essential to the execution of their
intentions. For unless they can secure access to the portable and
most valuable part of the effects, which in most families are
deposited under the imaginary security of locks, the plunder would
seldom recompense the difficulty and hazard of the enterprise; and
till some method of security be adopted by which such keys and
instruments may be rendered useless, no effectual check or
opposition can be given to the excessive and alarming practice of
house-breaking.
“Being confident that I have contrived a security which no
instrument but its proper key can reach; and which may be so
applied as not only to defy the art and ingenuity of the most skilful
workman, but to render the utmost force ineffectual, and thereby to
secure what is most valued as well from dishonest servants as from
the midnight ruffian, I think myself at liberty to declare (what
nothing but the discovery of an infallible remedy would justify my
disclosing), that all dependence on the inviolable security of locks,
even of those which are constructed on the best principle of any in
general use, is fallacious. To demonstrate this bold and alarming
proposition, I shall first state the common principles which are
applied in the art of lock-making; and by describing their operation
in instruments differently constructed, prove to my intelligent
readers that the best-constructed locks are liable to be secretly
opened with great facility; and that the locks in common use are
calculated only to induce a false confidence in their effect, and to
throw temptation to dishonesty in the way of those who are
acquainted with their imperfections, and know their inefficacy to the
purpose of security” (p. 5).
Tumblers had been so little thought of and used at the time
Bramah wrote, that his attention was almost exclusively directed to
warded locks. The mysterious clefts in a key, connected with some
kind of secret mechanism in the lock, had given the warded locks a
great hold on the public mind, as models of puzzlement and
security; and it was to shew that this confidence rested on a false
basis, that he to a great extent laboured. The following is his
exposition of the principle and the defects of the warded lock.
“Locks have been constructed, and are at present much used and
held in great esteem, from which the picklock is effectually excluded;
but the admission of false keys is an imperfection for which no
locksmith has ever found a corrective; nor can this imperfection be
remedied whilst the protection of the bolt is wholly confided to fixed
wards. For if a lock of any given size be furnished with wards in as
curious and complete a manner as it can be, those wards being
necessarily expressed on what is termed by locksmiths the bit or
web of the key, do not admit of a greater number of variations than
can be expressed on that bit or web; when, therefore, as many locks
have been completed of the given size as will include all the
variations which the surface of the bit will contain, every future lock
must be the counterpart of some former one, and the same key
which opens the one will of course unlock the other. It hence follows
that every lock which shall be fabricated on this given scale, beyond
the number at which the capability of variation ends, must be as
subject to the key of some other lock as to its own; and both
become less secure as their counterparts become more numerous.
This objection is confirmed by a reference to the locks commonly
fixed on drawers and bureaus, in which the variations are few, and
these so frequently repeated, from the infinite demand for such
locks, that, even if it were formed to resist the picklock, they would
be liable to be opened by ten thousand correspondent keys. And the
same observation applies in a greater or less degree to every lock in
which the variations are not endless.
“But if the variation of locks in which the bolt is guarded only by
fixed wards could be multiplied to infinity, they would afford no
security against the efforts of an ingenious locksmith; for though an
artful and judicious arrangement of the wards, or other
impediments, may render the passage to the bolt so intricate and
perplexed as to exclude every instrument but its proper key, a skilful
workman having access to the entrance will be at no loss to
fabricate a key which shall tally as perfectly with the wards as if the
lock had been open to his inspection. And this operation may not
only be performed to the highest degree of certainty and exactness,
but is conducted likewise with the utmost ease. For the block or bit,
which is intended to receive the impression of the wards, being fitted
to the keyhole, and the shank of the key bored to a sufficient depth
to receive the pipe, nothing remains but to cover the bit with a
preparation which, by a gentle pressure against the introductory
ward, may receive its impression, and thus furnish a certain direction
for the application of the file. The block or bit being thus prepared
with a tally to the first ward, gains admission to the second; and a
repetition of the means by which the first impression was obtained,
enables the workman to proceed, till by the dexterous use of his file
he has effected a free passage to the bolt. And in this operation he
is directed by an infallible guide; for, the pipe being a fixed centre on
which the key revolves without any variation, and the wards being
fixed likewise, their position must be accurately described on the
surface of the bit which is prepared to receive their impression. The
key therefore may be formed and perfectly fitted to the lock without
any extraordinary degree of genius or mechanical skill. It is from
hence evident that endless variations in the disposition of fixed
wards are not alone sufficient to the purpose of perfect security. I do
not mean to subtract from the merit of such inventions, nor to
dispute their utility or importance. Every approach towards
perfection in the art of lock-making may be productive of much
good, and is at least deserving of commendation; for if no higher
benefit were to result from it, than the rendering difficult or
impossible to many that which is still practicable and easy to a few,
it furnishes a material security against those from whom the greatest
mischiefs and dangers are to be apprehended.”
There can be little doubt, in the present day, that Bramah did not
over-rate the fallacies embodied in the system of wards for locks. He
was sufficiently a machinist to detect the weak points in the ordinary
locks; and, whatever may have been his over-estimate of his own
lock (presently to be described), he was certainly guilty of no
injustice to those who had preceded him; for their locks were
substantially as he has described them. To understand the true
bearings of his Dissertation too, we must remember that
housebreaking had risen to a most daring height in London at the
time he wrote (about the middle of the reign of George III.); and
men’s minds were more than usually absorbed by considerations
relating to their doors and locks.
Mr. Bramah, after doing due justice to the ingenuity of Barron’s
lock, in which, if the tumbler be either over lifted or under lifted the
lock cannot be opened, pointed out very clearly the defective
principle which still governed the lock. “Greatly as the art is indebted
to the ingenuity of Mr. Barron, he has not yet attained that point of
excellence in the construction of his lock which is essential to perfect
security. His improvement has greatly increased the difficulty but not
precluded the possibility of opening his lock by a key made and
obtained as above described (by a wax impression on a blank key);
for an impression of the tumblers may be taken by the same
method, and the key be made to act upon them as accurately as it
may be made to tally with the wards. Nor will the practicability of
obtaining such a key be prevented, however complicated the
principle or construction of the lock may be, whilst the disposition of
its parts may be ascertained and their impression correctly taken
from without. I apprehend the use of additional tumblers to have
been applied by Mr. Barron as a remedy for this imperfection.” Mr.
Bramah thought that Barron had a perception of a higher degree of
security, but had failed to realise it; because, by giving a uniform
motion to the tumblers, and presenting them with a face which
tallies exactly with the key, they still partake in a very great degree
of the nature of fixed wards, and the security of the lock is thereby
rendered in a proportionate degree defective and liable to doubt.
To shew how this insecurity arises, Mr. Bramah illustrates the
matter in the following way: “Suppose the key with which the
workman is making his way to the bolt to have passed the wards,
and to be in contact with the most prominent of the tumblers. The
impression, which the slightest touch will leave on the key, will direct
the application of the file till sufficient space is prepared to give it a
free passage. This being accomplished, the key will of course bear
upon the tumbler which is most remote; and being formed by this
process to tally with the face which the tumblers present, will
acquire as perfect a command of the lock as if it had been originally
made for the purpose. And the key, being thus brought to a bearing
on all the tumblers at once, the benefit arising from the increase of
their number, if multiplied by fifty, must inevitably be lost; for, having
but one motion, they act only with the effect of one instrument.”
It is worthy of notice, that even while thus shewing the weak
points of the Barron lock, Mr. Bramah seems to have had in his mind
some conception of infallibility or inviolability attainable by the lock
in question. After speaking of the defect arising from the bad
arrangement of the tumblers, he says: “But nothing is more easy
than to remove this objection, and to obtain perfect security from
the application of Mr. Barron’s principle. If the tumblers, which
project unequally and form a fixed tally to the key, were made to
present a plane surface, it would require a separate and unequal
motion to disengage them from the bolt; and consequently no
impression could be obtained from without that would give any idea
of their positions with respect to each other, or be of any use even
to the most skilful and experienced workman in the formation of a
false key. The correction of this defect would rescue the principle of
Mr. Barron’s lock, as far as I am capable of judging, from every
imputation of error or imperfection; and, as long as it could be kept
unimpaired, would be a perfect security. But the tumblers, on which
its security depends, being of slight substance, exposed to perpetual
friction—as well from the application of the key as from their own
proper motion—and their office being such as to render the most
trifling loss of metal fatal to their operation, they would need a
further exertion of Mr. Barron’s ingenuity to make them durable.”
It may perhaps be doubted whether the principle of Bramah’s lock
is not more clearly shewn in the original constructed by him than in
that of later date. In appearance it is totally different, but the same
pervading principle is observable in both; and the cylinder lock can
certainly be better understood when this original flat lock has been
studied. The annexed woodcut is taken from the first and very
scarce edition of Mr. Bramah’s Dissertation; the description is
somewhat more condensed, but perhaps sufficient for the purpose.
fig. 33. Bramah’s first model.
The first locks were made with a separate and independent spring
to each slide; but it is a very great improvement, the introduction of
one common spring to raise up the whole number; because if a
person attempts to pick the lock by depressing the slides separately
by means of any small pointed instruments, and by chance brings
two or more of them to the proper depth for turning round, should
he press any one too low, it is difficult to raise it again without
relieving the spring 6, which immediately throws the whole number
of slides up to the top, and destroys all that had been done towards
picking the lock. Another improvement of this lock, and one which
very much increased the difficulty of picking, and its consequent
security, was the introduction of false and deceptive notches cut in
the sliders, as seen at 3, 3. It was found that in the attempt to pick
this lock, an instrument was introduced by the keyhole to force the
cylinder round. At the same time that the slides were depressed by
separate instruments, those slides which were not at the proper level
for moving round were held fast by the notches 5, 5 in the plate f f
bearing against their sides; but when pressed down to the proper
level, or till the notch 2 came opposite f f, they were not held fast,
but were relieved. This furnished the depredator with the means of
ascertaining which slides were pressed low enough, or to the point
for unlocking. The notches 3, 3 in the slides are sometimes cut
above the true notch 2, sometimes below, and at other times one on
each side (one above and one below); they are not of sufficient
depth to allow the cylinder to turn round, but are intended to
mislead any one who attempts to pick, by his not knowing whether it
is the true notch or otherwise, or even whether the slider be higher
or lower than the true notch.
We have not yet sufficiently described the key of the Bramah lock.
One merit of the lock is the remarkable smallness of the key, which
renders it so conveniently portable. The key, as shewn in the upper
part of the figure, has six notches or clefts at the end of its pipe or
barrel; these clefts are cut to different depths, to accord with the
proper extent of movement in the slides. There is a small projection,
10, near the end of the pipe, fitted to enter the notch d in the
cylinder; this forces the cylinder round when the parts are all
properly adjusted. The bolt of the lock, when properly shot or
locked, is prevented from being forced back by the stud c on the
bottom, f, of the cylinder coming into a direct line with its centre of
motion, as shewn in fig. 39; in this position no force, applied to drive
the bolt back, would have any tendency to turn the cylinder round.
fig. 39. Section of the Bramah cylinder.
ebookgate.com