4. Can a very good lens
designer beat a very
good program?
This competition
aims
to find out.
Who will
win?
4
5. Part 1: The Human Designer
David Shafer
(Human)
5
6. We now wanted a lens design contest to pit man against
machine on a particular problem – one based on human
developed design principles and theories, to give our team
(that’s you, people) an edge.
7. I came up with a
design contest
problem from the
early days of optical
lithography that uses
for its (human)
solution a distinction
between intrinsic
and induced optical
aberrations
Early computer chip
9. • Intrinsic aberrations of a surface depend on pupil
position and conjugates. Are independent of incoming
aberrations from previous surfaces.
• Induced aberrations are due to aberrations from previous
surfaces coming into a surface and then interacting with
the surface
• Induced aberrations are often more important than
intrinsic ones, in a highly corrected design
12. • Correcting axial and lateral color in the right
place reduces induced aberrations on strong
power lenses elsewhere.
• Chromatic variation of spherical
aberration, coma, and astigmatism can be
corrected, almost without effort, by this method.
• Result is broad spectral band correction
13. Contest problem specs
100 mm focal length
.35 NA
10X10 mm square field
Back focus >10 mm
Length<250 mm, including stop (if external)
Telecentric image
No vignetting
No cemented lenses
Only BK7 and LF5 glasses
Distortion to be zero at edge of field
Diffraction-limited over field at both .351u and .4461u laser lines
at same focus position (= the hard part)
14. 11 lens design that is
diffraction-limited
over the field for both
wavelengths.
15. It is interesting that the 2nd lens is a negative BK7 lens. This design
depends on a certain placement of the LF5 power in the design in order
to get the chromatic variation of aberrations well corrected.
11 lens design
22. Part 2: The Steam Drill
Don Dilworth
Steam Drill
22
23. • Get a hard problem…
– Break the program
• … from a human expert (Dave Shafer).
• See what a very fast idiot can do (the PC).
• Compare results.
23
24. • Requirements set by customer
• Designer adjusts them
– Must be possible; customer beware.
• Designer – or computer – selects
configuration
• Designer optimizes that configuration.
This contest involves
only the portion in
RED
24
25. • Can any algorithm find the absolute best lens
design?
– Yes, if you try an infinite number of designs.
– But …”I want to still be young when we get there.”
• So we have to cut corners.
– Need a way to generate trial designs.
– Must be fast, thorough.
• Inevitable tradeoff.
– Have to find a trick; need some insight.
25
26. A complex lens has many minima
Imagine this
in 30 dimensions!
Like a mountain range. You want the lowest valley
26
27. Instead of trying 200,000 designs,
Insight
•
•
•
•
•
•
Start at the top of a hill.
You can see many valleys.
Slide downhill until you reach a minimum.
Different directions will go to different minima.
Does it work?
What is an “optical hill”?
27
28. • Curves can go either direction.
• Any design might be reached (we hope).
• How to implement?
– Generate a binary number, each bit is an element.
– Each value of that number creates a unique lens
prescription.
– Try them all, optimize.
• Feature is called DSEARCH, part of the
SYNOPSYS™ program.
28
29. DSEARCH is a fast idiot
• It knows nothing about aberration theory
– A human expert uses that knowledge
– Knowledge is tailored to each lens
– A commercial program has to work for every lens
you throw at it
• DSEARCH has to be completely general
– No specialized knowledge
– Everything (almost) is based on raytracing
29
30. Many Fast-Slow tradeoffs
• Random selection of curvatures, thicknesses, spacings
(Very slow if number is large)
– or
R/B
• Binary search (2n cases to analyze)
– 11-elements needs 2048 cases (tiny subspace)
• Full optimization of each case
– or
F/Q
• Quick screening pass, pick winners and optimize only
those
• Simulated annealing pass afterwards, optional
– or
A/O
• Pure optimization only
30
31. DSEARCH™ input specifies the goals
DSEARCH 1 QUIET
SYSTEM
ID DSEARCH SAMPLE
OBB 0 4 35
WA1 .446 .351
WT1 1 1
CORD 2 1
UNITS MM
END
GOALS
ELEMENTS 8
FNUM 1.43
BACK 0 0
TOTL 0 0
RSTAR 300
THSTART 5
ASTART 5
STOP FIRST
STOP FREE
GLASS POSITIVE
S UBK7
GLASS NEG
S LF5
RT 0.75
FOV 0.0 .5 .75 1
FWT 1 1 1 1
NPASS 60
ANNEAL 10 10
RANDOM 5000
END
System specs
SPECIAL
LLL 10 1 1 A BACK
LUL 240 1 1 A TOTL
LUL 240 1 1 A TOTL
S ENP
M 0 2 A P HH 1
M 0 5 A P YA 1
S GIHT
END
GO
Special requirements:
Back focus more than 10
Total length more than 240
Total length plus pupil
distance more than 240
Telecentric at image
Distortion corrected at
edge of field.
Design goals
The best results are then further optimized
by a human, first with transverse ray
targets, then OPDs, then MTF.
Options selected
(fast/slow)
DSEARCH finds the construction, not the
final design.
31
32. DSEARCH works well for easy jobs
What about
hard ones?
Dave suggested an
11-element lens
So I gave that
a try
32
33. Specifications:
•
•
•
•
•
•
•
•
0.35 NA (F/1.428)
That’s
10x10 mm square field.
hard to
do!
100 mm focal length.
System length less than 250 mm.
Back focus at least 10 mm.
…And…
No vignetting.
Two separated
wavelengths, only
Telecentric at image.
two glass types
permitted.
Distortion near zero.
33
38. How do you solve a hard problem?
• Pull out all the stops
– Random search
• 5000 cases
– Full optimization of each case
• 60 passes
– Simulated annealing on every lens
• … And it is slow
– But of course it works!
38
40. 8-elements, slowest options
The slow, bruteforce approach
works.
R 5000, F, A = 8 hours!
That’s not
surprising.
Try enough cases
and the computer
always wins
40
41. Okay, it works. But it was slow.
To be
practical, the
process has to
run in just a
few minutes.
Otherwise nobody
will use it.
If we stopped here, I would declare Shafer the
winner. (I am not willing to spend 8 hours!)
How to
make it
practical?
41
42. How can we speed things up?
Reduce the number
of cases to try.
Systematic
search, not
random (BINARY)
Quick screening
pass
Make each case
run faster.
Bypass cases that
are obviously no
good
Multicore!
Fewer
cycles
Annealing?
(All of the
timings are for a
single-core PC)
42
43. Quick mode for faster results
Screening pass, merit
function has only 3rd and
5th order aberrations (plus
3 real rays)
Maybe the best quick
design is not best when
higher orders are
considered
43
44. Randomness plays a role
Our mountain metaphor
may not be accurate
Binary search
might miss good
solutions
44
45. Can we go faster? What did we learn?
Local minima
Many
local
minima!
A good
one
45
46. Let’s use our heads, not
our hammer.
• Try the binary search method (faster).
– Results not as good as Dave’s lens! Why?
• Binary number determines the direction you
head down from the top of the hill.
– Initial radii set by user input.
– All radii equal +/- that value. (Bending = 0).
• How far from the top should you start?
– Does it matter?
46
48. Lesson
learned:
Start near top
Start downslope
Sweet spot!
This is a plot of the merit function
when Dave’s geometry was
selected (P N N P P P N P) and only
the initial radius was varied.
A longer radius starts closer to the
top of the mountain.
Too short or too long, results are
not as good. (Ray failure correction
alters the construction.)
Sweet spot at about 600 mm.
Looks like a rule: about 6 x FOCL
(applies to binary mode).
48
50. Let’s try some combinations
Random mode makes
random jump
downhill
Can quick mode find
any good lenses?
R 1000, Q, A = 11 minutes
Very nice results!
Let’s see what else
we can find.
Can Binary mode
get there?
50
52. Here’s more:
Fewer cycles =
faster.
B, F, A = 16 minutes
Only 10 cycles of
optimization + 5 cycles of
annealing.
One can trade off
several fast/slow
options.
52
53. …and here’s a surprise:
20 quick cycles, 20 cycles
of optimization, 5 cycles
of annealing…
B, Q, A = 4.8 minutes
… but most of the very fast
runs were not this good.
Why?
53
54. Predicting optimization results is not easy.
Well-behaved
optimization
Erratic
optimization
Acceleration methods do not always work!
54
55. Acceleration techniques:
• Binary search
– Might miss good configurations.
• Quick mode = screening pass
– No guarantee that best 3rd and 5th order design is really
best. Some are not.
• Fewer optimization cycles
– Can be misleading.
• Filter out obvious lemons
– All flints, for example: not likely to correct color.
– Can use optics knowledge:
• Best 8-element lenses will probably have 2 or 3 flint elements.
• Try only those cases.
55
56. This is a good combination
Binary
Full optimization (not quick)
Anneal
3 flint
4.8 minutes
Is this cheating? (Using
optics knowledge)
Well, we assume
the user has
some knowledge!
56
57. The most varied results:
• Used either random search
– or -• simulated annealing.
• Neither one is purely deterministic.
What does that tell us?
If not a
mountain, wh
at is it?
Perhaps our
metaphor is not
quite right!
57
58. Here’s a new metaphor: a WWI battlefield.
Trench
Crater
58
59. That would explain our results
• Sliding down from a mountain cannot always get
you into a deep crater.
• Random search can do it.
• Simulated annealing can do it.
• So what’s the most efficient way to search?
–
–
–
–
Binary search
Quick mode is worth a try
Filter out lemons
Annealing at the end.
• Random search as last resort.
• Multicore, of course, if you can.
59
63. … and two more.
A human would probably stop when he
found the first design that met specs.
DSEARCH gives you many possibilities.
Each of these 23 designs is as good or
better than the human-designed lens
63
64. 7 elements!
The goal was to break the
algorithm.
Success!
It broke.
Many attempts failed...
… but then we got smart.
64
65. Adjusting the aperture weight works!
2.9 minutes.
Construction identical to
Shafer’s version!
Binary
Quick
Anneal
65
66. So here’s a lesson:
Some knowledge
of optics comes
in handy!
But if we didn’t know Shafer’s
solution exists, we probably would
have given up.
Score this
round for the
human.
66
67. And here’s the score:
Steam Drill wins, 23 to 1
Human wins, 1 to 0
67
68. • Well, it seems to be a draw.
– David Shafer is impressed that a mere PC can
sometimes do as well or better than a human
expert.
– The steam drill is impressed that a mere human
(Shafer) can come up with a design that is a
challenge for even the best algorithms
(SYNOPSYS™).
• But one thing seems certain …
68
69. If John Henry had used his head
instead of his hammer …
He would have
applied for a job
running the steam
drill…
… and would have
enjoyed a comfortable
retirement.
69
70. Thank you
David Shafer Optical Design
shaferlens@sbcglobal.net
Don Dilworth
Optical Systems Design, Inc.
dilworth@osdoptics.com
70