The John Henry lens design challenge

2,315 views

Published on

A contest between the world's best automatic lens design program and a human designer on a specific design problem

Published in: Technology, Business
3 Comments
8 Likes
Statistics
Notes
  • A very interesting comparison, but I think when David Shafer is designing he is not only thinking about raw performance, but also about manufacturability. In my first job after getting my PhD, I was working for a company that had won a contract to manufacture a prime focus corrector for a large telescope. I got involved because they needed someone with an understanding of interferometry to measure the test plates which had to be made specially for the job. Anyway, the corrector, which was designed by a very well-thought of academic, proved to be a real pig to manufacture because of the diameter to thickness ratio of one of the elements. We also had working for us an experienced lens designer who had once been the Chief lens designer at Wray's. He looked at the design and very quickly came up with one that was only fractionall inferior but would have been much easier to manufacture (it would also have met the original specification).
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • fascinating. I do think that with only small improvements in AI and quantum annealers (that exist now), it'll be less than a generation for optical design to be always done by the machine.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • It's a pleasure to see my paper from three years ago getting some air. My paper on the 31st in San Diego will show how an automatic search can find great zoom lenses too.
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total views
2,315
On SlideShare
0
From Embeds
0
Number of Embeds
7
Actions
Shares
0
Downloads
150
Comments
3
Likes
8
Embeds 0
No embeds

No notes for slide

The John Henry lens design challenge

  1. 1. Man vs. Machine: a Lens Design Challenge A friendly competition David Shafer vs. Don Dilworth
  2. 2. The John Henry Lens Design Challenge A friendly competition David Shafer vs. Don Dilworth 2
  3. 3. Man vs. Machine John Henry (MAN) Steam Drill (MACHINE) 3
  4. 4. Can a very good lens designer beat a very good program? This competition aims to find out. Who will win? 4
  5. 5. Part 1: The Human Designer David Shafer (Human) 5
  6. 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. 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
  8. 8. Intrinsic and induced optical aberrations – how can you tell the difference?
  9. 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
  10. 10. Mirror has Spherochromatism Intrinsic spherochromatism of mirror = 0 There is induced spherochromatism due to color coming into mirror Incoming ray angle and conjugate change with wavelength, due to color from lens.
  11. 11. unachromatized achromatized My US patent #4,770,477
  12. 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. 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. 14. 11 lens design that is diffraction-limited over the field for both wavelengths.
  15. 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
  16. 16. 10 lens design
  17. 17. 9 lens design
  18. 18. 8 lens design
  19. 19. Designs can be stuck in a local minimum of the merit function. Hard to escape from. Various optimization “tricks” can be useful.
  20. 20. 7 lens design = end of the road
  21. 21. 11 lenses 10 lenses 8 lenses 7 lenses Design progression to simpler form 9 lenses
  22. 22. Part 2: The Steam Drill Don Dilworth Steam Drill 22
  23. 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. 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. 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. 26. A complex lens has many minima Imagine this in 30 dimensions! Like a mountain range. You want the lowest valley 26
  27. 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. 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. 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. 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. 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. 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. 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
  34. 34. DSEARCH results for 11-element lens: (Drum roll, please) 34
  35. 35. DSEARCH results for 11-element lens: Settings:: Binary search method Quick screening pass Anneal best 10 Time: 25 minutes. B+Q+A = 25 35
  36. 36. DSEARCH returns the best 10 configurations. The top three here are all pretty good. 11 elements gives 2048 binary possibilities. Too easy! 36
  37. 37. • 10-elements? – Too easy • 9-elements? – Too easy 37
  38. 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
  39. 39. First try, 8-element design: 8 hours! 39
  40. 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. 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. 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. 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. 44. Randomness plays a role Our mountain metaphor may not be accurate Binary search might miss good solutions 44
  45. 45. Can we go faster? What did we learn? Local minima Many local minima! A good one 45
  46. 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
  47. 47. Plane-parallel plates Start here… and you go here Start here… and you go here 47
  48. 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
  49. 49. Okay, we have several options: FAST Thorough 49
  50. 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
  51. 51. Binary, full optimization: 60 optimization passes B, F, A = 50 minutes Slower, but slightly better. 51
  52. 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. 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. 54. Predicting optimization results is not easy. Well-behaved optimization Erratic optimization Acceleration methods do not always work! 54
  55. 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. 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. 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. 58. Here’s a new metaphor: a WWI battlefield. Trench Crater 58
  59. 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
  60. 60. Human Contest summary R5000, F, A, 8 hours B, F, A, 50 minutes B, F, A, 16 minutes R1000, Q, A, 11 minutes 60
  61. 61. Faster runs sometimes work too, but not always B, Q, A, 4.8 minutes B, Q, A, 2.9 minutes B, Q, A, 1.75 mins. 61
  62. 62. 62
  63. 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. 64. 7 elements! The goal was to break the algorithm. Success! It broke. Many attempts failed... … but then we got smart. 64
  65. 65. Adjusting the aperture weight works! 2.9 minutes. Construction identical to Shafer’s version! Binary Quick Anneal 65
  66. 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. 67. And here’s the score: Steam Drill wins, 23 to 1 Human wins, 1 to 0 67
  68. 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. 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. 70. Thank you David Shafer Optical Design shaferlens@sbcglobal.net Don Dilworth Optical Systems Design, Inc. dilworth@osdoptics.com 70

×