100% found this document useful (4 votes)
26 views

Genetic Algorithms in Electromagnetics 1st Edition Randy L. Haupt instant download

The document is about the book 'Genetic Algorithms in Electromagnetics' by Randy L. Haupt and Douglas H. Werner, which focuses on the application of genetic algorithms (GAs) for optimizing electromagnetic systems. It covers various topics including optimization techniques, the anatomy of GAs, and specific applications in antenna design and scattering. The book serves as an introduction to using GAs in electromagnetics, providing step-by-step examples and MATLAB code for practical implementation.

Uploaded by

pincopinola
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (4 votes)
26 views

Genetic Algorithms in Electromagnetics 1st Edition Randy L. Haupt instant download

The document is about the book 'Genetic Algorithms in Electromagnetics' by Randy L. Haupt and Douglas H. Werner, which focuses on the application of genetic algorithms (GAs) for optimizing electromagnetic systems. It covers various topics including optimization techniques, the anatomy of GAs, and specific applications in antenna design and scattering. The book serves as an introduction to using GAs in electromagnetics, providing step-by-step examples and MATLAB code for practical implementation.

Uploaded by

pincopinola
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 85

Genetic Algorithms in Electromagnetics 1st

Edition Randy L. Haupt pdf download

https://ebookgate.com/product/genetic-algorithms-in-
electromagnetics-1st-edition-randy-l-haupt/

Get Instant Ebook Downloads – Browse at https://ebookgate.com


Instant digital products (PDF, ePub, MOBI) available
Download now and explore formats that suit you...

Genetic Algorithms and Genetic Programming Modern Concepts


and Practical Applications 1st Edition Michael Affenzeller

https://ebookgate.com/product/genetic-algorithms-and-genetic-
programming-modern-concepts-and-practical-applications-1st-edition-
michael-affenzeller/
ebookgate.com

Ecclesiastes Analecta Gorgiana 1st Edition Paul Haupt

https://ebookgate.com/product/ecclesiastes-analecta-gorgiana-1st-
edition-paul-haupt/

ebookgate.com

Numerical Analysis in Electromagnetics The TLM Method 1st


Edition Pierre Saguet

https://ebookgate.com/product/numerical-analysis-in-electromagnetics-
the-tlm-method-1st-edition-pierre-saguet/

ebookgate.com

The Wiener Hopf Method in Electromagnetics Vito G. Daniele

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

Multifunctional Cosmetics 1st Edition Randy Schueller

https://ebookgate.com/product/multifunctional-cosmetics-1st-edition-
randy-schueller/

ebookgate.com

Advanced Engineering Electromagnetics Second Edition C A


Balanis

https://ebookgate.com/product/advanced-engineering-electromagnetics-
second-edition-c-a-balanis/

ebookgate.com

Genetic Recombination in Cancer 1st Edition Gajanan V.


Sherbet (Author)

https://ebookgate.com/product/genetic-recombination-in-cancer-1st-
edition-gajanan-v-sherbet-author/

ebookgate.com

Biology of Aggression 1st Edition Randy J. Nelson

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.

Published by John Wiley & Sons, Inc., Hoboken, New Jersey.


Published simultaneously in Canada.

No part of this publication may be reproduced, stored in a retrieval system, or transmitted in


any form or by any means, electronic, mechanical, photocopying, recording, scanning, or
otherwise, except as permitted under Section 107 or 108 of the 1976 United States Copyright
Act, without either the prior written permission of the Publisher, or authorization through
payment of the appropriate per-copy fee to the Copyright Clearance Center, Inc., 222
Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 750-4470, or on the web at
www.copyright.com. Requests to the Publisher for permission should be addressed to the
Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030,
(201) 748-6011, fax (201) 748-6008, or online at http://www.wiley.com/go/permission.

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.

Wiley Bicentennial Logo: Richard J. Pacifico

Library of Congress Cataloging-in-Publication Data:

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

Printed in the United States of America.

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

1. Introduction to Optimization in Electromagnetics 1


1.1 Optimizing a Function of One Variable / 2
1.1.1 Exhaustive Search / 5
1.1.2 Random Search / 5
1.1.3 Golden Search / 6
1.1.4 Newton’s Method / 7
1.1.5 Quadratic Interpolation / 9
1.2 Optimizing a Function of Multiple Variables / 10
1.2.1 Random Search / 11
1.2.2 Line Search / 13
1.2.3 Nelder–Mead Downhill Simplex Algorithm / 18
1.3 Comparing Local Numerical Optimization Algorithms / 21
1.4 Simulated Annealing / 24
1.5 Genetic Algorithm / 25

2. Anatomy of a Genetic Algorithm 29


2.1 Creating an Initial Population / 31
2.2 Evaluating Fitness / 32
2.3 Natural Selection / 34
2.4 Mate Selection / 35
vii
viii CONTENTS

2.4.1 Roulette Wheel Selection / 35


2.4.2 Tournament Selection / 37
2.5 Generating Offspring / 37
2.6 Mutation / 42
2.7 Terminating the Run / 42

3. Step-by-Step Examples 45
3.1 Placing Nulls / 45
3.2 Thinned Arrays / 54

4. Optimizing Antenna Arrays 63


4.1 Optimizing Array Amplitude Tapers / 64
4.2 Optimizing Array Phase Tapers / 66
4.2.1 Optimum Quantized Low-Sidelobe Phase Tapers / 66
4.2.2 Phase-Only Array Synthesis Using Adaptive GAs / 69
4.3 Optimizing Arrays with Complex Weighting / 75
4.3.1 Shaped-Beam Synthesis / 75
4.3.2 Creating a Plane Wave in the Near Field / 78
4.4 Optimizing Array Element Spacing / 85
4.4.1 Thinned Arrays / 86
4.4.2 Interleaved Thinned Linear Arrays / 88
4.4.3 Array Element Perturbation / 92
4.4.4 Aperiodic Fractile Arrays / 98
4.4.5 Fractal–Random and Polyfractal Arrays / 101
4.4.6 Aperiodic Reflectarrays / 105
4.5 Optimizing Conformal Arrays / 105
4.6 Optimizing Reconfigurable Apertures / 112
4.6.1 Planar Reconfigurable Cylindrical Wire Antenna
Design / 114
4.6.2 Planar Reconfigurable Ribbon Antenna Design / 114
4.6.3 Design of Volumetric Reconfigurable Antennas / 115
4.6.4 Simulation Results—Planar Reconfigurable Cylindrical
Wire Antenna / 116
4.6.5 Simulation Results—Volumetric Reconfigurable
Cylindrical Wire Antenna / 119
4.6.6 Simulation Results—Planar Reconfigurable Ribbon
Antenna / 122

5. Smart Antennas Using a GA 133


5.1 Amplitude and Phase Adaptive Nulling / 136
5.2 Phase-Only Adaptive Nulling / 145
CONTENTS ix

5.3 Adaptive Reflector / 148


5.4 Adaptive Crossed Dipoles / 160

6. Genetic Algorithm Optimization of Wire Antennas 169


6.1 Introduction / 169
6.2 GA Design of Electrically Loaded Wire Antennas / 169
6.3 GA Design of Three-Dimensional Crooked-Wire
Antennas / 179
6.4 GA Design of Planar Crooked-Wire and Meander-Line
Antennas / 184
6.5 GA Design of Yagi–Uda Antennas / 189

7. Optimization of Aperture Antennas 199


7.1 Reflector Antennas / 199
7.2 Horn Antennas / 202
7.3 Microstrip Antennas / 205

8. Optimization of Scattering 217


8.1 Scattering from an Array of Strips / 218
8.2 Scattering from Frequency-Selective Surfaces / 223
8.2.1 Optimization of FSS Filters / 225
8.2.2 Optimization of Reconfigurable FSSs / 233
8.2.3 Optimization of EBGs / 236
8.3 Scattering from Absorbers / 238
8.3.1 Conical or Wedge Absorber Optimization / 238
8.3.2 Multilayer Dielectric Broadband Absorber
Optimization / 241
8.3.3 Ultrathin Narrowband Absorber Optimization / 241

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

Appendix: MATLAB® Code 269


Bibliography 277
Index 299
Preface

Most books on electromagnetics describe how to solve particular problems


using classical analysis techniques and/or numerical methods. These books
help in formulating the objective function that is used in this book. The objec-
tive function is the computer algorithm, analytical model, or experimental
result that describes the performance of an electromagnetic system. This book
focuses primarily on the optimization of these objective functions. Genetic
algorithms (GAs) have proved to be tenacious in finding optimal results where
traditional techniques fail. This book is an introduction to the use of GAs to
optimizing electromagnetic systems.
This book begins with an introduction to optimization and some of the com-
monly used numerical optimization routines. Chapter 1 provides the motiva-
tion for the need for a more powerful “global” optimization algorithm in
contrast to the many “local” optimizers that are prevalent. The next chapter
introduces the GA to the reader in both binary and continuous variable forms.
MATLAB® commands are given as examples. Chapter 3 provides two step-
by-step examples of optimizing antenna arrays. This chapter serves as an excel-
lent introduction to the following chapter, on optimizing antenna arrays. GAs
have been applied to the optimization of antenna arrays more than has any
other electromagnetics topic. Chapter 5 somewhat follows Chapter 4, because
it reports the use of a GA as an adaptive algorithm. Adaptive and smart arrays
are the primary focal points, but adaptive reflectors and crossed dipoles are
also presented. Chapter 6 explains the optimization of several different wire
antennas, starting with the famous “crooked monopole.” Chapter 7 is a review
of the results for horn, reflector, and microstip patch antennas. Optimization
of these antennas entails computing power significantly greater than that
xi
xii PREFACE

required for wire antennas. Chapter 8 diverges from antennas to present


results on GA optimization of scattering. Results include scattering from
frequency-selective surfaces and electromagnetic bandgap materials. Finally,
chapter 9 presents ideas on operator and parameter selection for a GA. In
addition, particle swarm optimization and multiple objective optimization are
explained in detail. The Appendix contains some MATLAB® code for those
who want to try it, followed by a chronological list of publications grouped by
topic.

State College, Pennsylvania Randy L. Haupt


Douglas H. Werner
Acknowledgments

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

Genetic Algorithms in Electromagnetics, by Randy L. Haupt and Douglas H. Werner


Copyright © 2007 by John Wiley & Sons, Inc.

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].

1.1 OPTIMIZING A FUNCTION OF ONE VARIABLE

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

single variable optimization routines are introduced. Many of the multidimen-


sional optimization routines rely on some version of the one-dimensional
optimization algorithms described here.
Optimization implies finding either the minimum or maximum of an objec-
tive function, the mathematical function that is to be optimized. A variable is
passed to the objective function and a value returned. The goal of optimization
is to find the combination of variables that causes the objective function to
return the highest or lowest possible value.
Consider the example of minimizing the output of a four-element array
when the signal is incident at an angle φ. The array has equally spaced ele-
ments (d = λ/2) along the x axis (Fig. 1.1). If the end elements have the same
variable amplitude (a), then the objective function is written as

AF1 (a) = 0.25 a + e j Ψ + e j 2 Ψ + ae j 3 Ψ (1.1)

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

AF2 (δ) = 0.25 e jδ + e j Ψ + e j 2 Ψ + e − jδ e j 3 Ψ (1.2)

Figure 1.1. Four-element array with two weights.


4 INTRODUCTION TO OPTIMIZATION IN ELECTROMAGNETICS

Figure 1.2. Array factor of a four-element array.

Figure 1.3. Objective function with input a and output the field amplitude at u = 0.8.

where the phase range is given by 0 ≤ δ ≤ π. If u = 0.8 is the point to be


minimized, then the plot of the objective function as a function of δ is as shown
in Figure 1.4. This function is more complex in that it has two minima. The
global or lowest minimum is at δ = 1.88 radians while a local minimum is at
δ = 0.
Finding the minimum of (1.1) [Eq. (1.1), above] is straightforward—head
downhill from any starting point on the surface. Finding the minimum of (1.2)
is a little more tricky. Heading downhill from any point where δ < 0.63 radian
(rad) leads to the local minimum or the wrong answer. A different strategy is
needed for the successful minimization of (1.2).
OPTIMIZING A FUNCTION OF ONE VARIABLE 5

Figure 1.4. Objective function with input d and output the field amplitude at u = 0.8.

1.1.1 Exhaustive Search


One way to feel comfortable about finding a minimum is to check all possible
combinations of input variables. This approach is possible for a small finite
number of points. Probably the best example of an exhaustive search is graph-
ing a function and finding the minimum on the graph. When the graph is
smooth enough and contains all the important features of the function in
sufficient detail, then the exhaustive search is done. Figures 1.3 and 1.4 are
good examples of exhaustive search.

1.1.2 Random Search


Checking every possible point for a minimum is time-consuming. Randomly
picking points over the interval of interest may find the minimum or at least
come reasonably close. Figure 1.5 is a plot of AF1 with 10 randomly selected
points. Two of the points ended up close to the minimum. Figure 1.6 is a plot
of AF2 with 10 randomly selected points. In this case, six of the points have
lower values than the local minimum at δ = 0. The random search process can
be refined by narrowing the region of guessing around the best few function
evaluations found so far and guessing again in the new region. The odds of all
10 points appearing at δ < 0.63 for AF2 is (0.63/π)10 = 1.02 × 10−7, so it is unlikely
that the random search would get stuck in this local minimum with 10 guesses.
A quick random search could also prove worthwhile before starting a downhill
search algorithm.
6 INTRODUCTION TO OPTIMIZATION IN ELECTROMAGNETICS

Figure 1.5. Ten random guesses (circles) superimposed on a plot of AF1.

Figure 1.6. Ten random guesses (circles) superimposed on a plot of AF2.

1.1.3 Golden Search


Assume that a minimum lies between two points a and b. Three points are
needed to detect a minimum in the interval: two to bound the interval and
one in between that is lower than the bounds. The goal is to shrink the interval
by picking a point (c) in between the two endpoints (a and b) at a distance Δ1
from a (see Fig. 1.7). Now, the interval is divided into one large interval and
one small interval. Next, another point (d) is selected in the larger of the two
subintervals. This new point is placed at a distance Δ2 from c. If the new point
OPTIMIZING A FUNCTION OF ONE VARIABLE 7

Figure 1.7. Golden search interval.

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

If the interval is normalized, the length of the interval is

Δ1 + Δ 2 + Δ1 = 1 (1.4)

Combining (1.3) and (1.4) yields the equation

Δ 21 − 3Δ 1 + 1 = 0 (1.5)

which has the root

5 −1
Δ1 = = 0.38197. . . (1.6)
2

This value is known as the “golden mean” [18].


The procedure above described is easy to put into an algorithm to find the
minimum of AF2. As stated, the algorithm begins with four points (labeled
1–4 in Fig. 1.8). Each iteration adds another point. After six iterations, point
8 is reached, which is getting very close to the minimum. In this case the golden
search did not get stuck in the local minimum. If the algorithm started with
points 1 and 4 as the bound, then the algorithm would have converged on the
local minimum rather than the global minimum.

1.1.4 Newton’s Method


Newton’s method is a downhill sliding technique that is derived from the
Taylor’s series expansion for the derivative of a function of one variable.
The derivative of a function evaluated at a point xn+1 can be written in terms
of the function derivatives at a point xn

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)

Solving for xn+1 yields

f ′( x n )
xn + 1 = xn − (1.9)
f ′′( xn )

If no analytical derivatives are available, then the derivatives in (1.9) are


approximated by a finite-difference formula

Δ [ 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.

1.1.5 Quadratic Interpolation


The techniques derived from Taylor’s series assumed that the function is
quadratic near the minimum. If this assumption is valid, then we should be
able to approximate the function by a quadratic polynomial near the minimum
and find the minimum of that quadratic polynomial interpolation [19]. Given
three points on an interval (x0, x1, x2), the extremum of the quadratic interpo-
lating polynomial appears at

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.

MATLAB uses a combination of golden search and quadratic interpolation


in its function fminbnd.m. Figure 1.10 shows the convergence curves for the
field value on the left-hand vertical axis and the phase in radians on the right-
hand vertical axis. This approach converged in just 10 iterations.

1.2 OPTIMIZING A FUNCTION OF MULTIPLE VARIABLES

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)

Figure 1.11 is a diagram of the six-element array with two independent


adjustable weights. The objective function returns the sum of the magnitude
of the array factor at three angles: φm = 120°, 69.5°, and 31.8°. The array
factor for a uniform six-element array is shown in Figure 1.12. Plots of the
objective function for all possible combinations of the amplitude and phase
weights appear in Figures 1.13 and 1.14. The amplitude weight objective func-
OPTIMIZING A FUNCTION OF MULTIPLE VARIABLES 11

Figure 1.11. A six-element array with two independent, adjustable weights.

Figure 1.12. The array factor for a six-element uniform array.

tion has a single minimum, while the phase weight objective function has
several minima.

1.2.1 Random Search


Humans are intrigued by guessing. Most people love to gamble, at least occa-
sionally. Beating the odds is fun. Guessing at the location of the minimum
sometimes works. It’s at least a very easy-to-understand method for minimiza-
tion—no Hessians, gradients, simplexes, and so on. It takes only a couple of
lines of MATLAB code to get a working program. It’s not very elegant,
though, and many people have ignored the power of random search in the
12 INTRODUCTION TO OPTIMIZATION IN ELECTROMAGNETICS

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

Figure 1.13. Plot of the objective function for AF3.

1.5
field at desired nulls

0.5

global
0 minimum
5
local minima
δ1 6
4
2
0 0 δ2

Figure 1.14. Plot of the objective function for AF4.

development of sophisticated minimization algorithms. We often model pro-


cesses in nature as random events, because we don’t understand all the com-
plexities involved. A complex cost function more closely approximates nature’s
ways, so the more complex the cost function, the more likely that random
OPTIMIZING A FUNCTION OF MULTIPLE VARIABLES 13

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

Figure 1.15. Ten random guesses for AF4.

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.2 Line Search


A line search begins with an arbitrary starting point on the cost surface. A
vector or line is chosen that cuts across the cost surface. Steps are taken along
this line until a minimum is reached. Next, another vector is found and the
process repeated. A flowchart of the algorithm appears in Figure 1.17. Select-
ing the vector and the step size has been an area of avid research in numerical
optimization. Line search methods work well for finding a minimum of a
quadratic function. They tend to fail miserably when searching a cost surface
with many minima, because the vectors can totally miss the area where the
global minimum exists.
14 INTRODUCTION TO OPTIMIZATION IN ELECTROMAGNETICS

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

Figure 1.16. Thirty random guesses for AF4.

Figure 1.17. Flowchart of a line search minimization algorithm.

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

variable. This process repeats until an acceptable minimum is found. Mathe-


matically, a two-dimensional cost function follows the path given by

f ( v01 , v20 ) → f ( v11 , v02 ) → f ( v11 , v 12) → f ( v12 , v 12) → . . . (1.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

6 0.4 1.2 0.6 0.4


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) + ∇f ( vm )(vm + 1 − vm )T + 0.5(vm + 1 − vm )H(vm + 1 − vm )T + . . .


(1.17)

where vm = point about which Taylor series is expanded


vm+1 = point near vm
T
= transpose of vector (in this case row vector becomes column
vector)
H = Hessian matrix with elements given by hij = ∂2f/∂vi∂vj

Taking the gradient of (1.17) and setting it equal to zero yields

∇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)

This formula is known as Newton’s method. Although Newton’s method prom-


ises fast convergence, calculating the Hessian matrix and then inverting it is
difficult or impossible. Newton’s method reduces to steepest descent when the
Hessian matrix is the identity matrix. Several iterative methods have been
developed to estimate the Hessian matrix with the estimate getting closer after
every iteration. The first approach is known as the Davidon–Fletcher–Powell
(DFP) update formula [21]. It is written here in terms of the mth approxima-
tion to the inverse of the Hessian matrix, Q = H−1:

( 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]:

(∇f ( vm + 1) − ∇f (vm ))(∇f ( vm + 1) − ∇f (vm ))T


H m+1 = H m +
(∇f ( vm + 1) − ∇f (vm ))T (vm + 1S − vm )
H (v − vm )( vm + 1 − vm )T H m
m m+1
− (1.21)
( vm + 1 − vm )T H m( vm + 1 − vm )
OPTIMIZING A FUNCTION OF MULTIPLE VARIABLES 17

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)

This result is equivalent to

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)

where the step size is given by

 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)

The Fletcher–Reeves version of βm is used for linear problems [18]:

∇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 ) ⎭

The nonlinear conjugate gradient algorithm is guaranteed to converge for


linear functions but not for nonlinear functions.
The problem with conjugate gradient is that it must be “restarted” every N
iterations. Thus, for a nonquadratic problem (most problems of interest),
conjugate gradient starts over after N iterations without finding the
minimum. Since the BFGS algorithm does not need to be restarted and
approaches superlinear convergence close to the solution, it is usually pre-
ferred over conjugate gradient. If the Hessian matrix gets too large to be
conveniently stored, however, conjugate gradient shines with its minimal
storage requirements.

1.2.3 Nelder–Mead Downhill Simplex Algorithm


Derivatives and guessing are not the only way to do a downhill search. The
Nelder–Mead downhill simplex algorithm moves a simplex down the slope
until it surrounds the minimum [27]. A simplex is the most basic geometric
object that can be formed in an N-dimensional space. The simplex has N + 1
sides, such as a triangle in two-dimensional space. The downhill simplex
method is given a single starting point (v0). It generates an additional N points
to form the initial simplex using the formula

vn0 = v01 + μ n (1.29)

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

find verticies, v = v1, v2, …, vNpar


calculate f(v)

sort f from fmax,…, fmin-1, fmin


vavg = average of v, excluding vmax

reflect vmax through vavg: vref = 2vavg – vmax

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 = vref vmax = vexp vmax = vref

vcon = 0.5vmax – 0.5vavg vi = 0.5(vi + vmin)


except for i = min

f(vcon) < f(vmax)?

vmax = vcon

Figure 1.19. Flowchart for the Nelder–Mead downhill simplex algorithm.

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

1.3 COMPARING LOCAL NUMERICAL OPTIMIZATION ALGORITHMS

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 Nel = number of elements in the array


wn = an exp(jδn) = complex element weight
xn = distance of element n from the origin

Some of these variables may be constants. For instance, if all except u


are constant, then AF returns an antenna pattern that is a function of
angle.
The optimization example here minimizes the maximum relative sidelobe
level of a uniformly spaced array using amplitude weighting. Assume that the
array weights are symmetric about the center of the array; thus the exponential
terms of the symmetric element locations can be combined using Euler’s
identity. Also assume that the array has an even number of elements. With
these assumptions, the objective function is written as a function of the ampli-
tude weights
N
AF5 (a) = 2 max ∑a n cos [ ( n − 0.5) Ψ m ] , u > ub (1.31)
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-

TABLE 1.1. Comparison of Optimized Median Sidelobes for Three Different


Array Sizesa
22 Elements 42 Elements 62 Elements
Median Median Median Median Median Median
Sidelobe Function Sidelobe Function Sidelobe Function
Level (dB) Calls Level (dB) Calls Level (dB) Calls
BFGS −30.3 1007 −25.3 2008 −26.6 3016
DFP −27.9 1006 −25.2 2011 −26.6 3015
Nelder Mead −18.7 956 −17.3 2575 −17.2 3551
Steepest descent −24.6 1005 −21.6 2009 −21.8 3013
a
Performance characteristics of four algorithms are averaged over 25 runs with random starting values for
the amplitude weights. The isotropic elements were spaced 0.5λ apart.

TABLE 1.2. Algorithm Performance in Terms of Median Maximum Sidelobe Level


versus Maximum Number of Function Callsa
1000 3000 10000
Algorithm Function Calls (dB) Function Calls (dB) Function Calls (dB)
BFGS −24.3 −26.6 −28.2
DFP −24.0 −26.6 −28.3
Nelder–Mead −17.6 −17.2 −17.5
Steepest descent −23.3 −21.8 −23.4
a
Performance characteristics of four algorithms are averaged over 25 runs with random starting values for
the amplitude weights. The 42 isotropic elements were spaced 0.5λ apart.
COMPARING LOCAL NUMERICAL OPTIMIZATION ALGORITHMS 23

TABLE 1.3. Algorithm Performance in Terms of Median


Maximum Sidelobe When the Algorithm Is Restarted Every
2000 Function Calls (5 Times)a
Algorithm 10,000 Function Calls (dB)
BFGS −34.9
DFP −36.9
Nelder–Mead −29.1
Steepest descent −26.1
a
Performance characteristics of four algorithms are averaged over 25 runs
with random starting values for the amplitude weights. The 42 isotropic
elements were spaced 0.5λ apart.

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

TABLE 1.4. Algorithm Performance in Terms of Median Maximum Sidelobe after


2000 Function Calls When the Algorithm Seeded with a Uniform or Triangular
Amplitude Tapera
Algorithm Uniform Taper Seed (dB) Triangular Taper Seed (dB)
BFGS −23.6 −35.9
DFP −26.0 −35.7
Nelder–Mead −23.9 −39.1
Steepest descent −21.2 −39.3
a
The 42 isotropic elements were spaced 0.5λ apart.

1.4 SIMULATED ANNEALING

Annealing heats a substance above its melting temperature, then gradually


cools it to produce a crystalline lattice that has a minimum energy probability
distribution. The resulting crystal is an example of nature finding an optimal
solution. If the liquid cools too rapidly, then the crystals do not form and the
substance becomes an amorphous mass with an energy state above optimal.
Nature is seldom in a hurry to find the optimal state.
A numerical optimization algorithm that models the annealing process is
known as simulated annealing [28,29]. The initial state of the algorithm is a
single random guess of the objective function input variables. In order to
model the heating process, the values of the variables are randomly modified.
Higher heat creates greater random fluctuations. The objective function
returns a measure of the energy state or value of the present minimum. The
new variable set replaces the old variable set if the output decreases. Other-
wise the output is still accepted if

r ≤ e[ f ( p old ) − f ( pnew )] / T
(1.32)

where r is a uniform random number and T is a temperature value. If r is too


large, then the variable values are rejected. A new variable set to replace a
rejected variable set is found by adding a random step to the old vari-
able set

pnew = dpold (1.33)

where d is a random number with either a uniform or normal distribution with


a mean of pold. When the minimization process stalls, the value of T and
the range of d decrease by a certain percent and the algorithm starts over.
The algorithm is finished when T gets close to zero. Some common cooling
schedules include (1) linearly decreasing, Tn = T0 − n(T0 − Tn)/N;
(2) geometrically decreasing, Tn = 0.99Tn−1; and (3) Hayjek optimal, Tn =
c/log(1 + n), where c = smallest variation required to get out of any local
minimum, 0 < n ≤ N; T0 = initial temperature, and TN = ending temperature.
GENETIC ALGORITHM 25

Figure 1.22. Convergence of the simulated annealing algorithm for AF4.

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.

1.5 GENETIC ALGORITHM

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

1. Optimizes with continuous or discrete parameters.


2. Doesn’t require derivative information.
3. Simultaneously searches from a wide sampling of the cost surface.
4. Works with a large number of variables.
5. Is well suited for parallel computers.
6. Optimizes variables with extremely complex cost surfaces.
7. Provides a list of optimum parameters, not just a single solution.
8. May encode the parameters, and the optimization is done with the
encoded parameters.
9. Works with numerically generated data, experimental data, or analytical
functions.

These advantages will become clear as the power of the GA is demonstrated


in the following chapters. Chapter 2 explains the GA in detail. Chapter 3 gives
a step-by-step analysis of finding the minimum of AF4. Many other more
complex examples are presented in Chapters 3–8. For further enlightenment
on GAs, please turn to the next chapter.

REFERENCES

1. J. S. Stone, US Patents 1,643,323 and 1,715,433 C.L.


2. C. L. Dolph, A current distribution for broadside arrays which optimizes the rela-
tionship between beam width and side-lobe level, Proc. IRE 34:335–348 (June
1946).
3. T. T. Taylor, Design of line source antennas for narrow beamwidth and low side
lobes, IRE AP Trans. 4:16–28 (Jan. 1955).
4. R. S. Elliott, Antenna Theory and Design, Prentice-Hall, New York, 1981.
5. A. T. Villeneuve, Taylor patterns for discrete arrays, IEEE AP-S Trans. 32(10):
1089–1094 (Oct. 1984).
6. E. T. Bayliss, Design of monopulse antenna difference patterns with low sidelobes,
Bell Syst. Tech. J. 47:623–650 (May–June 1968).
7. W. W. Hansen and J. R. Woodyard, A new principle in directional antenna design,
Proc. IRE 26:333–345 (March 1938).
8. W. L. Stutzman and E. L. Coffey, Radiation pattern synthesis of planar antennas
using the iterative sampling method, IEEE Trans. AP-23(6):764–769 (Nov. 1975).
9. H. J. Orchard, R. S. Elliot, and G. J. Stern, Optimizing the synthesis of shaped
beam antenna patterns, IEE Proc. 132(1):63–68 (Feb. 1985).
10. R. S. Elliot and G. J. Stearn, Shaped patterns from a continuous planar aperture
distribution, IEEE Proc. 135(6):366–370 (Dec. 1988).
11. F. Ares, R. S. Elliott, and E. Moreno, Design of planar arrays to obtain efficient
footprint patterns with an arbitrary footprint boundary, IEEE AP-S Trans.
42(11):1509–1514 (Nov. 1994).
REFERENCES 27

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

A genetic algorithm (GA) offers an alternative to traditional local search


algorithms. It is an optimization algorithm inspired by the well-known biologi-
cal processes of genetics and evolution. Genetics is the study of the inheritance
and variation of biological traits. Manipulation of the forces behind genetics
is found in breeding animals and genetic engineering. Evolution is closely
intertwined with genetics. It results in genetic changes through natural selec-
tion, genetic drift, mutation, and migration. Genetics and evolution result in
a population that is adapted to succeed in its environment. In other words,
the population is optimized for its environment.
A combination of genetics and evolution is analogous to numerical optimi-
zation in that they both seek to find a good result within constraints on the
variables. Input to an objective function is a chromosome. The output of the
objective function is known as the cost when minimizing. Each chromosome
consists of genes or individual variables. The genes take on certain alleles
much as the variable have certain values. A group of chromosomes is known
as a population. For our purposes, the population is a matrix with each row
corresponding to a chromosome:

Genetic Algorithms in Electromagnetics, by Randy L. Haupt and Douglas H. Werner


Copyright © 2007 by John Wiley & Sons, Inc.

29
30 ANATOMY OF A GENETIC ALGORITHM

⎡ chrom1 ⎤ ⎡ g11 g12  g1M ⎤


⎢ chrom ⎥ ⎢g g22 ⎥
population = ⎢ ⎥ = ⎢ 21 ⎥
2

⎢  ⎥ ⎢    ⎥
⎢ ⎥ ⎢ ⎥
⎣chromN ⎦ ⎣ gN 1  g NM ⎦
chromosomes genes
⎡ red 1  19.132 ⎤
⎢ blue 4 −12.954 ⎥
=⎢ ⎥ (2.1)
⎢    ⎥
⎢ ⎥
⎣ green 2  0.125⎦
values or alleles

Each chromosome is the input to an objective function f. The cost associated


with each chromosome is calculated by the objective function one at a time
or in parallel:

⎧ ⎡ chrom1 ⎤ ⎫ ⎡ cost1 ⎤
⎪ ⎢ chrom ⎥ ⎪ ⎢ cost ⎥
⎪ 2 ⎪
f ⎨⎢ ⎥⎬ = ⎢ ⎥
2
(2.2)
⎪ ⎢  ⎥ ⎪ ⎢  ⎥
⎢ ⎥ ⎢ ⎥
⎩⎪ ⎣chromN ⎦ ⎭⎪ ⎣costN ⎦

It is the cost that determines the fitness of an individual in the population. A


low cost implies a high fitness.
As you will see, GA operations work only with numbers. Thus, nonnumeri-
cal values, such as a color or an opinion, must be assigned a number. Often,
the numerical values assigned to genes are in binary format. Continuous
values have an infinite number of possible combinations of input values,
whereas binary values have a very large but finite number of possible combi-
nations of input values. Binary representation is also common when there are
a finite number of values for a variable, such as four values of permittivity for
a dielectric substrate.
A basic, “no thrills” GA is quite simple and powerful. The algorithm has
the following steps:

1. Create an initial population.


2. Evaluate the fitness of each population member.
3. Invoke natural selection.
4. Select population members for mating.
5. Generate offspring.
6. Mutate selected members of the population.
7. Terminate run or go to step 2.
CREATING AN INITIAL POPULATION 31

Figure 2.1. Genetic algorithm flowchart.

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.

2.1 CREATING AN INITIAL POPULATION

The initial population is the starting matrix of chromosomes. Each row is a


random “guess” at the optimum solution. If nvar variables are used to calcu-
late the output of the cost function, then a chromosome in the initial popula-
tion consists of nvar random values assigned to these variables. As an example,
a MATLAB command that yields a random population matrix of npop chro-
mosomes is given by

pop=rand(npop,nvar)

A population of eight chromosomes each having four variables was generated


from the MATLAB command:

⎡0.44510 0.83812 0.30462 0.37837 ⎤


⎢0.93181 0.01964 0.18965 0.860001 ⎥
⎢ ⎥
⎢0.46599 0.68128 0.19343 0.85366 ⎥
⎢ ⎥
0.41865 0.37948 0.68222 0.593566 ⎥
pop = ⎢ (2.3)
⎢0.84622 0.83180 0.30276 0.49655 ⎥
⎢ ⎥
⎢0.52515 0.50281 0.54167 0.89977 ⎥
⎢0.20265 0.70947 0.15087 0.82163 ⎥
⎢ ⎥
⎢⎣0.67214 0.42889 0.69790 0.64491 ⎥⎦
Another Random Scribd Document
with Unrelated Content
upper edge in some of the tumblers than in others, all the six being
different in this respect; so that if they are all lifted equally, the slots
do not coincide, and the bolt and its stud will not pass. The tumblers
must then be raised unequally, those to be most raised which have
the slot nearest to the lower edge. To effect this, the bit of the key is
cut into six steps or inequalities, each to act upon one particular
tumbler, and each cut or stepped to the exact depth which will
suffice for the proper raising of the tumbler. The key is inserted in
the keyhole, and is turned; the six steps raise the six tumblers all to
the proper height, to leave a clear passage along the slots; and the
extreme end of the key then acts upon the bolt itself, and shoots it.
To unlock it again, the same or a duplicate key must be used; for if
another key be employed, differing by ever so little from the proper
one, some one or more of the tumblers will be lifted either a little
too much or not quite enough; and in either case the stud of the
bolt will catch above or below the slot, instead of having a clear line
of movement along the slot itself. After both locking and unlocking,
the springs force the tumblers down as far as they can go, burying
the stud in the recesses above the slot; so that the tumblers must be
raised by the key both for locking and unlocking.
The doctrine of chances has wide play in determining the relative
position of the six tumblers. In Mr. Chubb’s essay this part of the
subject is treated in the following way: “The number of changes
which may be effected on the keys of a three-inch drawer-lock is 1 ×
2 × 3 × 4 × 5 × 6 = 720, the number of different combinations
which may be made on the six steps of unequal lengths (on a six-
tumbler lock), without altering the length of either step. The height
of the shortest step is, however, capable of being reduced 20 times;
and each time of being reduced, the 720 combinations may be
repeated; therefore 720 × 20 = 14,400 changes. The same process,
after reducing the shortest step as much as possible, may be gone
through with each of the other five steps; therefore 14,400 × 6 =
86,400, which is the number of changes that can be produced on
the six steps. If, however, the seventh step, which throws the bolt,
be taken into account, the reduction of it only ten times would give
86,400 × 10 = 864,000, as the number of changes on locks with the
keys all of one size (that is, with one key of definite size in all save
the lengths of the steps). Moreover, the drill pins of the locks and
the pipes of the keys may be easily made of three different sizes;
and the number of changes will then be 864,000 × 3 = 2,592,000,
as the whole series of changes which may be gone through with this
key. In smaller keys, the steps of which are capable of being
reduced only ten times, and the bolt-step only five times, the
number of combinations will be 720 × 10 × 6 × 5 × 3 = 648,000.
On the other hand, in larger keys, the steps of which can be reduced
thirty times, and the bolt-step twenty times, the total number of
combinations will be 720 × 30 × 6 × 20 × 3 = 7,776,000.”
These enormous numbers have been the cause of much of the
wonderment which the six-tumbler locks have excited; and, as we
shall see further on, the Bramah lock presents still more of the
marvellous in respect to this ringing of the changes.

fig. 31. Chubb lock, with detector and six tumblers.


The construction and action of the Chubb lock may be further
illustrated by means of an engraving, fig. 31, in which b is the bolt of
the lock, with a stump riveted to it marked s. The six tumblers are
shewn perspectively, the front or anterior one being marked t; they
all move on the centre-pin a, but are nevertheless perfectly distinct
and separate, to allow of being elevated to different heights. At d is
shewn one end of a divided spring, the divisions being equal to the
number of tumblers, one to each, and so bent that each spring may
press upon its particular tumbler. At e is the detector-spring, so
placed that a projecting piece in the hindmost tumbler shall be near
it; this tumbler having also fixed into it a stud or pin p. This being
the arrangement, especially in relation to the stump s and the
tumblers, it follows that all the tumblers must be lifted to exact and
regulated heights in order that the stump may pass through the
longitudinal slits of the tumblers; unless it can do so, the bolt cannot
be withdrawn. As there are gaps or notches in each tumbler both
above and below the proper line of passage, and as there are no
ordinary means of ascertaining when any one tumbler is lifted too
high or not high enough, the safety of the lock is greatly increased
by this uncertainty; especially when it is considered that this
uncertainty is multiplied sixfold by the different modes in which the
six tumblers are slotted. If, through the insertion of a false key, or by
any other cause, any one of the tumblers be raised above its proper
position, the detector spring e will catch the hindmost tumbler, and
retain it so as to prevent the bolt from passing; and thus, upon the
next application of the true key, it will be instantly felt that some one
of the tumblers has been overlifted, because the true key will not
unlock it. To relieve the bolt from this temporary imprisonment, the
key must be turned the reverse way, as for locking; all the tumblers
will thus be brought to their proper position, and allow the stump to
enter the notches n n´; the bevelled part of the bolt will then lift up
the detector-spring, and allow the hindmost tumbler to fall down
into its proper place; and all this being effected, the lock may be
opened and shut in the ordinary way. The pin p is so adjusted that if
any one of the tumblers—front, back, or intermediate—be lifted too
high, the pin will be lifted with it, and will catch into the detector-
spring, thus producing the result just described.
The key is represented in fig. 32. It has six steps,
besides a terminal step to act upon the bolt. The height
of each step, or the distance to which it extends from
the pipe of the key, depends of course on the height to
which its corresponding tumbler is to be lifted; and it
matters not whether the steps of the key are adjusted
to the slots of the tumblers, or the slots to the steps,
provided the agreement be brought about. It is simply
a matter of manufacturing convenience that the key-
steps are cut first and the tumbler-slots afterwards. We
may here remark that bit, or bitt, is the name given, fig. 32.
somewhat indefinitely, either to the whole flat part of a Key to
key, or to the small stepped portions of it. The flat part Chubb’s lock.
was formerly termed the web of the key, probably from
the webbed appearance of the keys to complex warded locks.
After the reading of Mr. Chubb’s paper before the Institution of
Civil Engineers, Mr. Owen narrated one or two circumstances
connected with the early history of Chubb’s lock. A convict on board
one of the prison-ships at Portsmouth dockyard, who was by
profession a lock-maker, and who had been employed in London in
making and repairing locks for several years, and subsequently had
been notorious for picking locks, asserted that he had picked with
ease one of the best of Bramah’s locks, and that he could pick
Chubb’s locks with equal facility. One of the latter was secured by
the seals of the late Sir George Grey, the Commissioner, and some of
the principal officers of the dockyard, and given to the convict,
together with files and all the tools which he stated were necessary
for preparing false instruments for the purpose, as also blank keys to
fit the pin of the lock. A lock exactly the same in principle was placed
in his hands, that he might examine it and make himself master of
its construction. If he succeeded in opening the lock, he was to
receive a free pardon from the Government, and a reward of 100l.
from Messrs. Chubb. After trying for two or three months to pick the
sealed lock—during which time, by his repeated efforts, he
frequently over-lifted the detector, which was as often re-adjusted
for his subsequent trials—he gave up the attempt. He stated that
Chubb’s were the most secure locks he had ever met with, and that
it was impossible for any man to pick or to open them with false
instruments.
Mr. Owen further stated, that in order to compare the merits of
Bramah’s and Chubb’s locks, he had suggested a mechanical
contrivance, which was applied to one of Bramah’s six-spring
padlocks belonging to the Excise. It was hung upon a nail, in a
vertical position, secure from lateral oscillation. A self-acting
apparatus was then applied, consisting of a pipe with hexagonal
grooves, and a stud or bit corresponding with the division of the
lock, and secured to it by a spring. In the grooves of this pipe small
slides were inserted, which pressed against the spring keys of the
lock; to these slides were attached levers, acted upon by eccentrics,
moved by a combination of wheels, whose teeth differed in number
so as to perform the permutation required for the different depths of
the spring keys, corresponding with those of the proper key to the
lock. The automaton machine was set in motion by a line working
over a barrel, and acted upon by a weight; and was thus left acting
upon the mechanism for a considerable time. At right angles to the
pipe or false key was attached a rod and weight; and when the
notches in the spring keys were brought in a line with the plane of
the plate or diaphragm of the lock, the rod and weight turned the
false key, opened the lock, and stopped the further motion of the
automaton. In that state the slides indicated the exact depth of the
grooves in the proper key, and gave the form of a matrix by which to
make a key similar to the original one. The automaton worked
during a period varying from half an hour to three hours, according
to the state of permutation of the apparatus at the moment of being
applied, compared with that of the slides in the lock. We confess
that it is difficult to understand the action of this automaton from Mr.
Owen’s description. We imagine that the false notches would
effectually prevent the operation of the instrument, and openings
would be required on each slide to bring it back, so as to meet the
motions of the machine.
Mr. Owen did not state whether his apparatus had been successful
with one only of Bramah’s locks or with several; nor did he describe
any apparatus invented with the view to the picking of Chubb’s
locks. He stated, however, that in order to ascertain the effect of
friction on one of these last-named locks, it was subjected to the
alternate rectilinear motion of a steam-engine in Portsmouth
dockyard, and was locked and unlocked upwards of 460,000 times
consecutively, without any appreciable wear being indicated by a
gauge applied to the levers and the key, both before and after this
alternate action. Mr. Owen concluded by expressing his individual
opinion that Chubb’s lock had never been picked. “The detector was
the main feature of its excellence; and additional precaution,
therefore, was only departing from its simplicity, and adding to the
expense, without any commensurate advantage.”
In a subsequent chapter the degree of security afforded by
various descriptions of locks, and the obstacles which they present
of being picked, will come under notice; we therefore now proceed
to describe briefly a few other tumbler-locks, or application of the
tumbler-principle.
In Mr. Somerford’s lock, for which the Society of Arts gave a
premium in 1818, an attempt was made to improve upon the
ordinary action of tumblers. In most such locks, all the tumblers
must ascend, although to different heights, before the stud of the
bolt can pass through the slots; “which arrangement,” says Mr.
Somerford, “gives an opportunity of introducing a nail, or a piece of
stout wire, into the lock, and thus raising the tumblers without the
necessity of using the key.” In his new lock, however, he made one
lever to ascend while the other descended, by a somewhat
complicated arrangement of slotted plates above and below the bolt.
The key was so perforated as to be much endangered in respect to
strength.
In Davis’s lock there is a double chamber with wards on the side
of the key-hole. The key is inserted into the first chamber and
turned a quarter round; it is then pushed forward into the inner
chamber, where there is a rotating plate containing a series of small
pins or studs, which are laid hold of by the key. By turning the key,
the plate is moved round, the tumbler is raised, and the bolt is shot
backwards and forwards. This lock, which is somewhat expensive, is
used to some extent on Cabinet despatch-boxes.
The lock invented by Mr. Nettlefold is so constructed, that when
the bolt is shot out by the key, two teeth or quadrants are projected
from the sides of the bolt, which take a firm hold of the plate fixed
on the door-post or edge. This construction is said to answer well for
sliding-doors.
Mr. Alfred Ainger, in 1820, received a silver medal from the Society
of Arts for a draw-back spring latch, in which the objects proposed
were the two following—to render the lock more difficult of violation
by a pick than those ordinarily in use; and to apply to it a key of
which no ordinary person could take an impress, and which would
be difficult of access even in a workman’s hand. The key is very
peculiar; its pipe consists of three divisions, the section of the upper
and lower divisions being circular, and that of the middle division
triangular; the triangular portion is intended to give motion to some
part of the interior of the lock during the rotation of the key. There
are collars fixed on the extremity of the key, to act each on one
tumbler; and there are modes, by varying the arrangement of these
collars on an octagonal stem, to give something like a permutation
to the number of variations to which the action of the key may be
subject. The notches or slots are rather in the bolt than in the
tumblers; and there are many peculiarities in the general
arrangement.
In a lock invented and patented by Mr. Parsons, the tumblers are
of a particular form, being hinged on a pivot at their centres, and
working into and out of two notches cut in the under side of the
bolt. It must be obvious that many variations in the adjustment of
the tumblers of locks might be made, without vitiating the principle
on which the action depends.
Many inventors have tried the use of an expanding web to the key,
so planned that if the step of the web be long enough to reach the
tumbler, it would be too long to pass through the key-hole; and
therefore a principle of safety would operate by enabling the key to
adjust itself at one moment to the size of the key-hole, and at
another to the height of the tumbler. Mr. Machin of Wolverhampton
invented such a key in 1827. The web of the key is movable on a
countersunk pin, on which it can so far slide as to be drawn one-
eighth of an inch from the barrel. The key-hole is of such a size as to
admit the key only when the web is pressed close up to the barrel.
When the key in this state is introduced, and is begun to be turned
round, one of the notches in the web works into a raised circular
edge of steel, placed eccentrically with regard to the lock-pin; so
that as the key is turned, the web becomes drawn out, and is at its
greatest elongation when it arrives at the tumblers: in the second
half of its circular movement, the key becomes contracted to its
original dimensions, and can then be removed from the lock.
Another mode of modifying the key has been introduced by Mr.
Mackinnon, the object being to enable any person to change at will
the pattern or arrangement of the movable parts of a lock and key;
or to keep the key, when not actually in use, in such a state as to
render it unavailing to any one but himself. It was a complex
arrangement, which does not seem to have come much into use.
The lock invented by Mr. Williams, in 1839, may be designated a
pin-lock, involving a principle analogous in many points to that of the
Egyptian lock. This lock has a series of pins which reach through the
cap, and are pressed to their places with a key like a comb or a
rake-head. On the inner end of each pin is a flat piece of steel, in
which is cut a notch for the passage of the bolt; but this passage is
not clear until the notches in all the pieces of steel are in a right line.
The pins are movable, and can be pushed either too far or not far
enough to bring about the coincidence of position in the notches;
and on this ground they are “double-acting.” Now the teeth of the
key are of irregular lengths, each having a length just suited for
pushing the pin to the proper depth: any other lengths of teeth
would fail to open the lock. There is a mechanism of springs and
levers to shoot the bolt when the pins in the plate are rightly
adjusted. The arrangements in respect to the key are singular and
somewhat awkward. The teeth which lock the bolt are not the same
as those which unlock it, the user having to change ends and adjust
the bit to a socket-handle. This is one among many examples in
which a lock embodies several principles, the inventor having set
himself the task of combining the excellences of many diverse locks.
In respect to the tumbler-locks generally, the simplicity of action,
the strength of construction, and the non-liability of disarrangement,
have given them a high place among safety-locks. The only danger
seemed to be, that any person once obtaining possession of the key
could take an impression from it, and thence form a key which
would command the lock. Attempts have been occasionally made to
obviate this danger, by supplying the key with movable bits which
could be changed at pleasure, so as to constitute any number of
effectively different bits in succession. But the locks being so
constructed that the bolt could only be moved when the tumblers
were in a certain position, the owner was placed in this predicament:
that it was useless to alter the arrangement of the bits in the key,
unless the tumblers were altered in a corresponding manner; and
this would entail the removal of the lock from the door, and the re-
arrangement of the interior mechanism.
One of the great defects of tumbler-locks made previously to the
last ten years was, that the tumblers, when lying at rest in the lock,
presented at their bellies or lower edges precisely the same
arrangement as the steps of the key. Indeed, in many locks of the
present day, a good idea of the form of the key may be gained by
feeling the bellies of the tumblers. The bellies are in fact cut out so
as to compensate for the circular motion of the key, to allow them to
remain at rest while the stump is passing through the gating. Even
in tumbler-locks of the best construction the tumblers will vibrate
more or less during the motion of the key; a defect which must be
provided against in adjusting the lock, or the stump will be caught in
its passage through the gating. Mr. Hobbs provides a simple remedy
by enlarging the back part of the gating, the effect of which is as
follows: when, in shooting back the bolt, as in unlocking, the key has
got to its highest point, the stump enters the narrow end of the
gating; but in shooting the bolt forward, as in locking, the stump
enters the gating before the key has got to its highest point, and to
allow for the slight vibratory motion of the tumblers during the
passage of the stump, the gating is widened. The usual method of
adjustment is to alter the forms of the bellies of the tumblers, thus
greatly risking the security of the lock, a defect which was clearly
perceived by Bramah [see pp. 67-70], and was one of the reasons
which induced him to construct locks with slides instead of tumblers.
American locks on the tumbler-principle, and the relation which all
such locks bear to the Bramah lock, will be better understood after
the details of the following chapter.
CHAPTER VI.
THE BRAMAH LOCK.

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 lock is supposed to be lying flat, with the bolt b half-shot.


Ranged somewhat diagonally are six levers, turning on a horizontal
joint or pivot at a, each lever having a slight extent of vertical motion
independent of the others. Each lever rests on a separate spring of
sufficient strength to sustain its weight, or, if depressed by a
superior force, to restore it to its proper position when the force is
withdrawn. f is a curved piece of metal, pierced with six grooves or
passages; these grooves are exactly equal in width to the thickness
of the levers, but are of sufficient depth to allow the levers a free
motion in a perpendicular direction. The ends of the levers are
inserted in these grooves, and have this freedom of motion, whether
lifted by the elastic power of the springs or depressed by a weight
from above. In the bolt b is a notch to receive a peculiarly-shaped
lever, which shoots or withdraws the bolt according as it traverses to
the right or the left. This lever, the six long levers, the springs
beneath them, the bent piece f, and the pivot, all alike are fixed to a
circular platform p, which turns on a centre; so that if any force can
make this platform turn partially round, the bolt must be shot or
unshot by the lever which works in the notch. The six long levers are
the contrivances whereby the platform shall not be allowed to turn
until the proper moving agent (the key) shall have been applied, the
plate p being one of the assistants in this obstruction. This plate,
which is hollow underneath, has six notches in one of its edges; the
points of the levers catch into these notches; and while so caught,
the levers cannot move horizontally, and all the machinery is at a
stand-still. To enable the key to set the mechanism in action, other
contrivances are necessary. Each lever has a notch at its extreme
end, and the six are notched very irregularly in respect one to
another. These notches must be brought all into one plane, to
enable the levers to pass horizontally out of the notches in the plate,
in the same way as the two prongs of a fork might traverse one
above and the other below the blade of a knife; and when the lever-
notches are in this position, all in one plane and in the plane of the
plate, the levers can be moved, and with it the stump which shoots
the bolt. To ensure this due pressing down of the levers, a key is
used such as is shewn in the cut, having six steps or bits to
correspond with the six levers; this key, put upon the pin k, presses
down all the levers to the exact distance necessary for bringing their
notches into one plane, viz. the plane of the plate; the key then
being turned round turns the movable platform p, and shoots the
bolt. It is evident at a glance, that unless the various steps of the
key are so cut, that each shall press down its own lever to the
proper extent, the ends of the levers cannot pass the notches in the
plate, and the bolt can neither be locked nor unlocked.
It may be well to give Bramah’s own words in relation to this lock:
“I may safely assert that it is not in art to produce a key or other
instrument by which a lock constructed on this principle can be
opened. It will be a task, indeed, of great difficulty, even to a skilful
workman, to fit a key to this species of lock, though its interior face
were open to his inspection; for the levers being raised by the
subjacent springs to an equal height present a plane surface, and
consequently convey no direction that can be of any use in forming
a tally to the irregular surface which they present when acting in
subjection to the proper key. Unless, therefore, a method be
contrived to bring the notches on the ends of the levers in a direct
line with each other, and to retain them in that position till an exact
impression of the irregular surface which the levers will then exhibit
can be taken, the workman will in vain attempt to fit a key to the
lock, or by any effort of art to move the bolt. And when it is
considered that this process will be greatly impeded, and may
perhaps be entirely frustrated, by the action of the springs, it must
appear that great patience and perseverance, as well as great
ingenuity, will be required to give any chance of succeeding in the
attempt. I do not state this circumstance as a point essential or of
any importance to the purpose of the lock, but to prove more clearly
what I have before observed upon its principle and properties; for if
such difficulties occur to a skilled workman, as to render it almost, if
not altogether impracticable to form a key when the lock is open to
his inspection and its parts accessible to his hand, it pretty clearly
demonstrates the impossibility of accomplishing it when no part of
the movement can be touched or seen.”
It is evident that Mr. Bramah had his thoughts directed to that
mode of picking locks which depends on taking impressions of the
moving parts, rather than to the mechanical or pressure method
which has been developed in later times. There can be little doubt
that a lock was, to his mind, a beautiful and admirable machine, far
elevated above the level of mere blacksmith’s work; and his name
will ever be associated with what may be termed the philosophy of
lock-making.
After the model-lock, which has just been described, was
constructed, and found to corroborate the idea which was working in
Mr. Bramah’s mind, he proceeded to the construction of his barrel or
cylinder-lock, embracing similar elements placed in more convenient
juxta-position. In his Essay he gives an engraving to illustrate the
principle on which his lock acts, rather in the manner of a diagram
than as depicting any lock actually made; his main object being to
impart a clear notion of the action of the slides which form such a
distinguishing feature in his lock.

fig. 34. Diagram to illustrate the Bramah lock.

Viewed in this sense, therefore, simply as an illustrative diagram,


the annexed cut may represent the action of the safety slides. b is a
sliding bar or bolt, having a power of longitudinal motion in the
frame f. This frame has six notches cut on each of its long sides, the
two series being exactly opposite each other; and there are six
similar notches cut in the bolt b. The concurrent effect of all these
eighteen notches is, that the six slides a b c d e f can move freely up
and down across the bolt. When the slides are thus placed, the bolt
cannot move, and may in this case be considered to be locked.
There are six clefts or notches in the six slides, one to each (1, 2, 3,
4, 5, 6); and until all these are brought in a right line, the bolt
cannot move through them. If a tally or key be prepared, as shewn
at t in the lower part of the cut, with six projections, and if these
projections thrust up the six slides till their clefts rise to the plane of
the bolt, then can the bolt be withdrawn or the lock opened. This
serves to illustrate the relation between the slides and the key, as
carried out in the way now to be described.
One peculiarity of the Bramah lock is, that from the essential part
of the apparatus being a barrel or cylinder, much of the working can
be conducted in the lathe; and this has given a beauty to the details
generally and deservedly admired. Mr. Bramah, when he worked out
the theory of his lock, resolved to discard altogether the use of fixed
wards, and also the use of tumblers working on a pivot at one end;
substituting in their stead a system of slides, working in a very novel
way. The body of a Bramah lock may be considered as formed of
two concentric brass barrels, the outer one fixed, and the inner
rotating within it. The inner barrel has a projecting stud, which,
while the barrel is rotating, comes in contact with the bolt in such a
way as to shoot or lock it; and thus the stud serves the same
purpose as the bit of an ordinary key, rendering the construction of a
bit to the Bramah key unnecessary. If the barrel can be made to
rotate to the right or left, the bolt can be locked or unlocked; and
the problem is, therefore, how to ensure the rotation of the barrel.
The key, which has a pipe or hollow shaft, is inserted in the keyhole
upon the pin, and is then turned round; but there must be a very
nice adjustment of the mechanism of the barrel before this turning
round of the key and the barrel can be ensured. The barrel has an
external circular groove at right angles to the axis, penetrating to a
certain depth; and it has also several internal longitudinal grooves,
from end to end. In these internal grooves thin pieces of steel are
able to slide, in a direction parallel with the axis of the barrel. A thin
plate of steel, called the locking-plate, is screwed in two portions to
the outer barrel, concentric with the inner barrel; and at the same
time occupying the external circular groove of the inner barrel; this
plate has notches, fitted in number and size to receive the edges of
the slides which work in the internal longitudinal grooves of the
barrel. If this were all, the barrel could not revolve, because the
slides are catching in the grooves of the locking-plate; but each slide
has also a groove, corresponding in depth to the extent of this
entanglement; and if this groove be brought to the plane of the
locking-plate, the barrel can be turned, so far as respects that
individual slide. All the slides must, however, be so adjusted that
their grooves shall come to the same plane; but as the notch is cut
at different points in the lengths of the several slides, the slides have
to be pushed in to different distances in the barrel, in order that this
juxta-position of notches may be ensured. This is effected by the
key, which has notches or clefts at the end of the pipe equal in
number to the slides, and made to fit the ends of the slides when
the key is inserted; the key presses each slide, and pushes it so far
as the depth of its cleft will permit; and all these depths are such
that all the slides are pushed to the exact position where their
notches all lie in the same plane; this is the plane of the locking-
plate, and the barrel can be then turned.
fig. 35. Exterior of a Bramah lock.

This is the principle which Mr. Bramah


adopted; and we have now to trace it,
step by step, by means of illustrative
details. Fig. 35 represents the exterior of
a box or desk lock, one among many
varieties which the Bramah lock
presents. a a shews the bolt, formed
something like two hooks rising out of a
bar of metal, which bar has a backward
and forward motion upon the plate b b.
The upper edge of this plate is turned
over at right angles, forming a small
horizontal surface through which two
openings are cut to receive the two
hooked portions of the bolt. The
movements of the bolt are otherwise
guided by the edges of square holes
through which it works; the holes being
made in the edge-pieces of the lock,
riveted to the main plate. The bolt is
further prevented from rising out of its
place by means of a plate of metal c,
which is secured to the edge-pieces by
two screws 1, 1, and by two steadying
pieces. This plate has on its surface a
cylindrical projection d, which contains in
effect all the working mechanism of the
lock. The pins 4 4 are employed for
securing a plate, which we shall have to
fig. 36. Details of the Bramah describe presently. When such a lock is
lock. fixed upon a desk or box, the portion D
projects to a small distance through a
hole in the wood-work, forming in itself a very neat escutcheon, with
a key-hole in the centre.
So much for the exterior. We must now
proceed to examine the interior of the lock,
especially the part contained within the cylinder.
In fig. 36, for convenience of arrangement, the
several parts are exhibited separately, and as if
the plane of the lock were horizontal, with the
key acting vertically. The essential part of the
mechanism is a barrel or cylinder E, pierced or
bored with a cylindrical hole down its centre. The
inside of the bore has six narrow grooves, cut
parallel with the axis, and in the direction of
radii; the grooves are not cut through the
fig. 37. The slides.
thickness of the cylinder, but leave sufficient
substance of metal for strength. In every groove
is fitted a steel slide of peculiar form, such as is shewn at a´ a´ in
fig. 37. Each slide is split in its thickness (seen in section), so that it
may move up and down in its groove with a slight friction, and
thereby not fall simply by its own weight. Each slide has three small
notches (3, 2, 3´), the use of which will presently appear. Reverting
to fig. 36, the lower part of the opening through the cylinder E is
closed by a circular plate of metal, fixed to it by two screws; this
plate is represented at F, in the lower part of the figure. This plate
has a vertical pin rising from its centre (also seen at b, fig. 39), and
serving as a key-pin on which the pipe of the key may work or slide;
and it has also a short circular stud c projecting from its under side,
and fitted to enter into a curved opening in the bolt presently to be
described.
The point to be now borne in mind is this, that if the cylinder E
turns round, the plate F will also turn round, and with it the stud c;
and as this stud works into the peculiarly formed cavity d in a
portion of the bolt (fig. 38), it causes the bolt to be shot backwards
or forwards. Now, in order to prevent this rotating of the cylinder
unless the proper key be employed, the following mechanism is
introduced: the cylinder has a groove cut round its circumference at
e e, extending sufficiently near to the internal bore to produce the
desired effect without too much weakening the metal. Into this
notch is introduced the thin circular plate of metal f f, it being
divided into two halves for this purpose; and when so placed, it
occupies the position shewn by the dotted portion e e. When this
plate is screwed to the case of the lock by the screws 4, 4, it cannot
of course turn round; but the cylinder itself will or will not turn round
according to the position of the slides. The plate f f has six notches,
5, 5, 5, &c. in the inner edge or circle; so adjusted that, when the
plate is in its place, the slides a a can move up and down. The
cylinder cannot move round in a circle without carrying the slides
with it; and these cannot so move unless they are all depressed to
such exact distances in their respective grooves, that the deep notch
of each slider (shewn at 2 in fig. 37) shall come into the plane of the
circular plate: when all are so brought, the cylinder can be turned. If
any one of the slides be pressed down either too low or not low
enough, this turning of the cylinder cannot be effected, because the
slides will be intersected by the edges of the notches 5, 5; and it is
the office of the key, therefore, to press all the six slides down to the
exact distances required. When the slides are not pressed upon by
the key, they are forced upwards to the top of the cylinder by a
spiral spring 6, coiled loosely round the pin b; this pressure forces up
a small collet, 7, on which the upper part of the slides rest by a sort
of step.
fig. 38. The bolt.

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.

To facilitate the comprehension of this very curious and beautiful


mechanism, the cylinder is shewn in section in the annexed fig. 39,
the same letters and figures of reference being used as before. In
the whole of this description we have spoken of six slides, and six
only; but Bramah locks may be, and have been, constructed with a
much larger number.
There have been several attempts made to modify the action of
Bramah’s lock, or to combine this action with that of some other
inventor. It will suffice to describe one of these. The lock invented by
Mr. Kemp of Cork, and for which a patent was obtained in 1816, is
called by him the Union lock, as combining the principles of Barron’s
and Bramah’s locks. It contains two, three, or more sliders or
tumblers, operated upon by two, three, or more concentric tubes.
These concentric tubes are of different lengths, and are placed
inside the barrel of the key; so that the barrel may, in fact, be
conceived to consist of a series of concentric tubes. These tubes are
made of such respective lengths as to push back the tumblers,
sliders, or pins which detain the bolt; and this to the precise extent
that will bring certain notches in all the sliders to the position which
will allow the bolt to pass. The inventor gives this lock its distinctive
appellation because it combines something of the pushing motion
which Bramah gives to his key, with something of the tumbler-
motion observable in Barron’s locks. The principle of safety is
considered here to rest chiefly on the extreme difficulty of imitating
the key.
Mr. Bramah calculates the number of changes of position which
the slides of his lock are capable of assuming before the right one
would be attained. “Let us suppose the number of levers, slides, or
other movables by which the lock is kept shut, to consist of twelve,
all of which must receive a different and distinct change in their
position or situation by the application of the key, and each of them
likewise capable of receiving more or less than its due, either of
which would be sufficient to prevent the intended effect. It remains,
therefore, to estimate the number producible, which maybe thus
attempted. Let the denomination of these slides be represented by
twelve arithmetical progressionals; we find that the ultimate number
of changes that may be made in their place or situation is
479,001,600; and by adding one more to that number of slides, they
would then be capable of receiving a number of changes equal to
6,227,020,800; and so on progressively, by the addition of others in
like manner to infinity. From this it appears that one lock, consisting
of thirteen of the above-mentioned sliders, may (by changing their
places only, without any difference in motion or size,) be made to
require the said immense number of keys, by which the lock could
only be opened under all its variations.”
CHAPTER VII.
AMERICAN LOCKS.

The lock-manufacture in America has undergone some such changes


as in England. The insufficiency of wards to the attainment of
security has been for many years known; and the unfitness of even
tumblers to attain this end, without auxiliary contrivances, has been
fully recognised for a dozen years back. In this, and in other
mechanical arts, the American machinists depended primarily on the
invention of the artisans in the mother country, rather than on those
of any continental European state. But the development of the art in
the United States has not been wanting in originality; the varieties of
locks have been very numerous, and many of them exceedingly
ingenious. It is not necessary, however, to describe or depict any of
those of simple form. The warded locks of different countries very
much resemble each other; the intricate warded locks made in
France in the last century have long fallen into disuse, in
consequence of the general conviction that no arrangement of
wards, however intricate, can afford the degree of security required
in a good lock. It will be more to the purpose, therefore, to proceed
at once to a notice of those American locks which, during the last
few years, have acquired some celebrity; first, however, noticing one
of older date.
Stansbury’s lock, invented in the United States about forty years
ago, may be regarded as a modification of the Egyptian lock. It had
a bolt, case, and key-hole somewhat similar to those of modern
locks; but there were peculiarities of construction in other respects.
There was a revolving plate, pierced with a series of holes, and
having a bit or pin which moved the bolt. On the lock-case were a
series of springs, each having a pin at one end; and the
arrangement was such that, when the bolt was locked or unlocked,
each pin would be pressed into some one of the holes. Like as in the
Egyptian lock (figs. 1 to 4), each pin had to be pushed out, and all of
them simultaneously, to allow the plate to turn and move the bolt.
The key was made with a barrel and bit; and on the front end of the
bit was a series of pins corresponding in position with the holes in
the plate. The mode of locking or unlocking was as follows: the key
was inserted in the key-hole, and turned to a certain position; it was
then pressed in with some force, until the pins on the key met those
in the plate; when the latter, yielding to the pressure, left the plate
free to turn and move the bolt. Modifications of the Egyptian lock,
more or less resembling this, have been brought out in some variety
on both sides of the Atlantic; but scarcely any have equalled in
simplicity the curious wooden relic of by-gone ingenuity in the art of
lock-making.
A lock made a few years ago by Mr. Yale, in the United States,
somewhat resembles the Bramah lock in having a cylinder or barrel,
or rather two concentric cylinders, one working within the other.
These cylinders are held together by pins which pass through them
both into the key-hole. On the back of the inner cylinder is a pin that
fits into a slot in the bolt, and moves it whenever the cylinder is
turned. The pins that hold the cylinders together are each cut in
two; the pieces of the various pins differing in lengths as irregularly
as possible. The key is so peculiarly formed, that, on inserting it in
the key-hole, it thrusts the pins radially outwards; each pin being
pushed just so far that the joint of the pin shall coincide with the
joint between the two cylinders. The inner cylinder can then be
turned, by which the bolt is locked or unlocked. If, by the use of a
false key, any pin be pushed in too far, it will be as ineffectual in
opening the lock as if it were not thrust in far enough; and some of
these locks having been made with as many as forty pins, the
chances are very numerous against the right combination being hit
upon. There is a combination of something like the Egyptian with
something like the Bramah lock, here attempted.
One of the principal constructions adopted in America a few years
back for bank-locks is that of Dr. Andrews of Perth Amboy, in New
Jersey. It was up to that time (1841) believed that the best locks,
both of England and America, were proof against any attempts at
picking derived from knowledge obtained by inspection through the
key-hole; but there still remained the danger that the sight of the
true key, or the possession thereof, for only a few minutes, would
enable a dishonest person to produce a duplicate. It was to contend
against this difficulty that Dr. Andrews directed his attention; and he
sought to obtain the desired object by constructing a lock, the
interior mechanism of which could be changed at pleasure. The lock
of his invention is furnished with a series of tumblers and a detector.
The tumblers are susceptible of being arranged in any desired order;
and the key has movable bits which can be arranged so as to
correspond with the tumblers. When the lock is fixed in its place, no
change can be made in the tumblers, and consequently only one
arrangement of the bits of the key will suit for the shooting and
withdrawing of the bolt. The owner can, however, before the fixing
of the bolt, adopt any arrangement of tumblers and bits which he
may choose. But though the tumblers cannot be actually re-arranged
in any new order within the lock while the latter is fixed, yet by an
ingenious contrivance the tumblers can be so acted upon as to
render the lock practically different from its former self. The
purchaser receives with his lock a series of small steel rings, each
ring corresponds in thickness with the thickness of some one of the
bits of the key; so that, by suitable adjustment, any one of the bits
may be removed from the key, and a ring be substituted in its place.
The effect of this substitution is, that the particular tumbler which
corresponds with the ring is not raised by it; it is drawn out with the
bolt, as if it were part of the bolt itself. Supposing the lock to be
locked by this means, the original key would not now unlock it; for
one of the tumblers has now been displaced, and can only be re-
adjusted by the same ring which displaced it. If an attempt be made
to open the lock by the original key, or by the key in its original
adjustment, a detector is set in action, which indicates that a false
key or other instrument has been put into the lock. One, or more
than one, of the bits may be removed from the key, and rings be
substituted, and consequently one or more of the tumblers may be
disturbed in this peculiar way; so that the lock may change its
character in all those permutating varieties which are so observable
in most “safety-locks.” The shape of the tumblers is, of course, such
as to facilitate this action; they have each an elongated slot, and
also two notches; when a tumbler is raised by one of the bits of the
key, one of the notches closes around a stump fitted into the case of
the lock, and prevents the tumbler from being moved onward with
the bolt; but when a ring has been substituted for a bit on the key,
the tumbler cannot be raised at all; it is carried onward by a stump
on the bolt.
Dr. Andrews is also the inventor of a lock which he terms the snail-
wheel lock. In this lock a series of revolving discs, or wheels, taking
the place of the tumblers, are mounted on a central pin, on which
the pipe of the key is inserted. Each disc has a piece cut out of it,
into which the bit of the key enters, and in turning round moves the
discs according to the various lengths of the steps on the key. On
the outer edge of each disc is a notch, and by the turning of the key
all these notches are brought into a line, so that a moveable tongue,
or toggle, attached to the bolt, falls into the notches; the key is then
turned the reverse way, by which means the bolt is projected.
About the time when Dr. Andrews invented his first lock, Mr.
Newell, of the firm of Day and Newell of New York, constructed a
lock which possessed the same distinctive peculiarity as that of
Andrews, viz. that the key might be altered any number of times
without rendering it necessary to remove the lock or change its
internal mechanism. This was brought about, however, in a different
manner. Instead of having, as in the Andrews lock, a two-fold
movement to every tumbler, Mr. Newell employed two sets of
tumblers, the one set to receive motion from the other, and having
different offices to fill, to be acted upon by the key in respect to the
first series, and to act upon the bolt in respect to the second. Calling
these two sets primary and secondary, the action of the lock may be
briefly described as follows. A primary tumbler being raised to the
proper height by the proper bit in the key, raises the corresponding
secondary tumbler; the secondary tumbler is held up in a given
position during the locking, while the primary becomes pressed by a
Welcome to Our Bookstore - The Ultimate Destination for Book Lovers
Are you passionate about books and eager to explore new worlds of
knowledge? At our website, we offer a vast collection of books that
cater to every interest and age group. From classic literature to
specialized publications, self-help books, and children’s stories, we
have it all! Each book is a gateway to new adventures, helping you
expand your knowledge and nourish your soul
Experience Convenient and Enjoyable Book Shopping Our website is more
than just an online bookstore—it’s a bridge connecting readers to the
timeless values of culture and wisdom. With a sleek and user-friendly
interface and a smart search system, you can find your favorite books
quickly and easily. Enjoy special promotions, fast home delivery, and
a seamless shopping experience that saves you time and enhances your
love for reading.
Let us accompany you on the journey of exploring knowledge and
personal growth!

ebookgate.com

You might also like