Lens Design I - uni-jena.de · Necessary for gradient-based methods G k Numerical calculation by...
Transcript of Lens Design I - uni-jena.de · Necessary for gradient-based methods G k Numerical calculation by...
![Page 1: Lens Design I - uni-jena.de · Necessary for gradient-based methods G k Numerical calculation by finite differences jk Possibilities and accuracy Calculation of Derivatives ( ) (](https://reader034.fdocuments.us/reader034/viewer/2022043002/5f7f96669681cc6c053f86c8/html5/thumbnails/1.jpg)
www.iap.uni-jena.de
Lens Design I
Lecture 9: Optimization I
2017-06-08
Herbert Gross
Summer term 2017
![Page 2: Lens Design I - uni-jena.de · Necessary for gradient-based methods G k Numerical calculation by finite differences jk Possibilities and accuracy Calculation of Derivatives ( ) (](https://reader034.fdocuments.us/reader034/viewer/2022043002/5f7f96669681cc6c053f86c8/html5/thumbnails/2.jpg)
2
Preliminary Schedule - Lens Design I 2017
1 06.04. Basics Introduction, Zemax interface, menues, file handling, preferences, Editors, updates,
windows, coordinates, System description, 3D geometry, aperture, field, wavelength
2 13.04. Properties of optical systems I Diameters, stop and pupil, vignetting, Layouts, Materials, Glass catalogs, Raytrace,
Ray fans and sampling, Footprints
3 20.04. Properties of optical systems II
Types of surfaces, cardinal elements, lens properties, Imaging, magnification,
paraxial approximation and modelling, telecentricity, infinity object distance and
afocal image, local/global coordinates
4 27.04. Properties of optical systems III
Component reversal, system insertion, scaling of systems, aspheres, gratings and
diffractive surfaces, gradient media, solves
5 04.05. Advanced handling I Miscellaneous, fold mirror, universal plot, slider, multiconfiguration, lens catalogs
6 11.05. Aberrations I Representation of geometrical aberrations, Spot diagram, Transverse aberration
diagrams, Aberration expansions, Primary aberrations
7 18.05. Aberrations II Wave aberrations, Zernike polynomials, measurement of quality
8 01.06. Aberrations III Point spread function, Optical transfer function
9 08.06. Optimization I Principles of nonlinear optimization, Optimization in optical design, general process,
optimization in Zemax
10 15.06. Optimization II Initial systems, special issues, sensitivity of variables in optical systems, global
optimization methods
11 22.06. Advanced handling II System merging, ray aiming, moving stop, double pass, IO of data, stock lens
matching
12 29.06. Correction I Symmetry principle, lens bending, correcting spherical aberration, coma,
astigmatism, field curvature, chromatical correction
13 06.07. Correction II Field lenses, stop position influence, retrofocus and telephoto setup, aspheres and
higher orders, freeform systems, miscellaneous
![Page 3: Lens Design I - uni-jena.de · Necessary for gradient-based methods G k Numerical calculation by finite differences jk Possibilities and accuracy Calculation of Derivatives ( ) (](https://reader034.fdocuments.us/reader034/viewer/2022043002/5f7f96669681cc6c053f86c8/html5/thumbnails/3.jpg)
1. Principles of nonlinear optimization
2. Optimization in optical design
3. General process
4. Optimization in Zemax
3
Contents
![Page 4: Lens Design I - uni-jena.de · Necessary for gradient-based methods G k Numerical calculation by finite differences jk Possibilities and accuracy Calculation of Derivatives ( ) (](https://reader034.fdocuments.us/reader034/viewer/2022043002/5f7f96669681cc6c053f86c8/html5/thumbnails/4.jpg)
Basic Idea of Optimization
iteration
path
topology of
meritfunction F
x1
x2
start
Topology of the merit function in 2 dimensions
Iterative down climbing in the topology
4
![Page 5: Lens Design I - uni-jena.de · Necessary for gradient-based methods G k Numerical calculation by finite differences jk Possibilities and accuracy Calculation of Derivatives ( ) (](https://reader034.fdocuments.us/reader034/viewer/2022043002/5f7f96669681cc6c053f86c8/html5/thumbnails/5.jpg)
Mathematical description of the problem:
n variable parameters
m target values
Jacobi system matrix of derivatives,
Influence of a parameter change on the
various target values,
sensitivity function
Scalar merit function
Gradient vector of topology
Hesse matrix of 2nd derivatives
Nonlinear Optimization
x
)(xf
j
iji
x
fJ
21
)()(
m
i
ii xfywxF
j
jx
Fg
kj
kjxx
FH
2
5
![Page 6: Lens Design I - uni-jena.de · Necessary for gradient-based methods G k Numerical calculation by finite differences jk Possibilities and accuracy Calculation of Derivatives ( ) (](https://reader034.fdocuments.us/reader034/viewer/2022043002/5f7f96669681cc6c053f86c8/html5/thumbnails/6.jpg)
Optimization Principle for 2 Degrees of Freedom
Aberration depends on two parameters
Linearization of sensitivity, Jacobian matrix
Independent variation of parameters
Vectorial nature of changes:
Size and direction of change
Vectorial decomposition of an ideal
step of improvement,
linear interpolation
Due to non-linearity:
change of Jacobian matrix,
next iteration gives better result
f2
0
0
C
B
A
f2
initial
point
x1
=0.1
x1
=0.035
x2
=0.07
x2
=0.1
target point
6
![Page 7: Lens Design I - uni-jena.de · Necessary for gradient-based methods G k Numerical calculation by finite differences jk Possibilities and accuracy Calculation of Derivatives ( ) (](https://reader034.fdocuments.us/reader034/viewer/2022043002/5f7f96669681cc6c053f86c8/html5/thumbnails/7.jpg)
Linearized environment around working point
Taylor expansion of the target function
Quadratical approximation of the merit
function
Solution by lineare Algebra
system matrix A
cases depending on the numbers
of n / m
Iterative numerical solution:
Strategy: optimization of
- direction of improvement step
- size of improvement step
Nonlinear Optimization
xJff 0
xHxxJxFxF
2
1)()( 0
)determinedover(
)determinedunder(1
1
1
nmifAAA
nmifAAA
nmifA
ATT
TT
7
![Page 8: Lens Design I - uni-jena.de · Necessary for gradient-based methods G k Numerical calculation by finite differences jk Possibilities and accuracy Calculation of Derivatives ( ) (](https://reader034.fdocuments.us/reader034/viewer/2022043002/5f7f96669681cc6c053f86c8/html5/thumbnails/8.jpg)
Derivative vector in merit function topology:
Necessary for gradient-based methods
Numerical calculation by finite differences
Possibilities and accuracy
Calculation of Derivatives
)()(
xfx
xfg jx
k
j
jk k
k
j
right
j
jkx
ffg
fj(x
k)
xk
exact
forward
backward
central
xk
xk x
k
xk-x
k xk+x
k
fj-1
fj
fj+1
fj(x
k)
right
left
8
![Page 9: Lens Design I - uni-jena.de · Necessary for gradient-based methods G k Numerical calculation by finite differences jk Possibilities and accuracy Calculation of Derivatives ( ) (](https://reader034.fdocuments.us/reader034/viewer/2022043002/5f7f96669681cc6c053f86c8/html5/thumbnails/9.jpg)
Effect of constraints
Effect of Constraints on Optimization
initial
point
global
minimum
local
minimum
x2
x1
constraint
x1
< 0
0
path without
constraint
path with
constraint
9
![Page 10: Lens Design I - uni-jena.de · Necessary for gradient-based methods G k Numerical calculation by finite differences jk Possibilities and accuracy Calculation of Derivatives ( ) (](https://reader034.fdocuments.us/reader034/viewer/2022043002/5f7f96669681cc6c053f86c8/html5/thumbnails/10.jpg)
Types of constraints
1. Equation, rigid coupling, pick up
2. One-sided limitation, inequality
3. Double-sided limitation, interval
Numerical realizations :
1. Lagrange multiplier
2. Penalty function
3. Barriere function
4. Regular variable, soft-constraint
Boundary Conditions and Constraints
x
F(x)
permitted domain
F0(x) p
small
penalty
function
P(x)
p large
xmaxx
min
x
F(x)
permitted domain
F0(x)
barrier
function
B(x)
p large
p small
10
![Page 11: Lens Design I - uni-jena.de · Necessary for gradient-based methods G k Numerical calculation by finite differences jk Possibilities and accuracy Calculation of Derivatives ( ) (](https://reader034.fdocuments.us/reader034/viewer/2022043002/5f7f96669681cc6c053f86c8/html5/thumbnails/11.jpg)
Local working optimization algorithms
Optimization Algorithms in Optical Design
methods without
derivatives
simplexconjugate
directions
derivative based
methods
nonlinear optimization methods
single merit
function
steepest
descents
descent
methods
variable
metric
Davidon
Fletcher
conjugate
gradient
no single merit
function
adaptive
optimization
nonlinear
inequalities
least squares
undamped
line searchadditive
damping
damped
multiplicative
damping
orthonorm
alization
second
derivative
11
![Page 12: Lens Design I - uni-jena.de · Necessary for gradient-based methods G k Numerical calculation by finite differences jk Possibilities and accuracy Calculation of Derivatives ( ) (](https://reader034.fdocuments.us/reader034/viewer/2022043002/5f7f96669681cc6c053f86c8/html5/thumbnails/12.jpg)
Principle of searching the local minimum
Optimization Minimum Search
x2
x1
topology of the
merit function
Gauss-Newton
method
method with
compromise
steepest
descent
nearly ideal iteration path
quadratic
approximation
around the starting
point
starting
point
12
![Page 13: Lens Design I - uni-jena.de · Necessary for gradient-based methods G k Numerical calculation by finite differences jk Possibilities and accuracy Calculation of Derivatives ( ) (](https://reader034.fdocuments.us/reader034/viewer/2022043002/5f7f96669681cc6c053f86c8/html5/thumbnails/13.jpg)
Goal of optimization:
Find the system layout which meets the required performance targets according of the
specification
Formulation of performance criteria must be done for:
- Apertur rays
- Field points
- Wavelengths
- Optional several zoom or scan positions
Selection of performance criteria depends on the application:
- Ray aberrations
- Spot diameter
- Wavefornt description by Zernike coefficients, rms value
- Strehl ratio, Point spread function
- Contrast values for selected spatial frequencies
- Uniformity of illumination
Usual scenario:
Number of requirements and targets quite larger than degrees od freedom,
Therefore only solution with compromize possible
Optimization Merit Function in Optical Design
13
![Page 14: Lens Design I - uni-jena.de · Necessary for gradient-based methods G k Numerical calculation by finite differences jk Possibilities and accuracy Calculation of Derivatives ( ) (](https://reader034.fdocuments.us/reader034/viewer/2022043002/5f7f96669681cc6c053f86c8/html5/thumbnails/14.jpg)
Merit function:
Weighted sum of deviations from target values
Formulation of target values:
1. fixed numbers
2. one-sided interval (e.g. maximum value)
3. interval
Problems:
1. linear dependence of variables
2. internal contradiction of requirements
3. initail value far off from final solution
Types of constraints:
1. exact condition (hard requirements)
2. soft constraints: weighted target
Finding initial system setup:
1. modification of similar known solution
2. Literature and patents
3. Intuition and experience
Optimization in Optical Design
g f fj j
ist
j
soll
j m
2
1,
14
![Page 15: Lens Design I - uni-jena.de · Necessary for gradient-based methods G k Numerical calculation by finite differences jk Possibilities and accuracy Calculation of Derivatives ( ) (](https://reader034.fdocuments.us/reader034/viewer/2022043002/5f7f96669681cc6c053f86c8/html5/thumbnails/15.jpg)
Characterization and description of the system delivers free variable parameters
of the system:
- Radii
- Thickness of lenses, air distances
- Tilt and decenter
- Free diameter of components
- Material parameter, refractive indices and dispersion
- Aspherical coefficients
- Parameter of diffractive components
- Coefficients of gradient media
General experience:
- Radii as parameter very effective
- Benefit of thickness and distances only weak
- Material parameter can only be changes discrete
Parameter of Optical Systems
15
![Page 16: Lens Design I - uni-jena.de · Necessary for gradient-based methods G k Numerical calculation by finite differences jk Possibilities and accuracy Calculation of Derivatives ( ) (](https://reader034.fdocuments.us/reader034/viewer/2022043002/5f7f96669681cc6c053f86c8/html5/thumbnails/16.jpg)
Constraints in the optimization of optical systems:
1. Discrete standardized radii (tools, metrology)
2. Total track
3. Discrete choice of glasses
4. Edge thickness of lenses (handling)
5. Center thickness of lenses(stability)
6. Coupling of distances (zoom systems, forced symmetry,...)
7. Focal length, magnification, workling distance
8. Image location, pupil location
9. Avoiding ghost images (no concentric surfaces)
10. Use of given components (vendor catalog, availability, costs)
Constraints in Optical Systems
16
![Page 17: Lens Design I - uni-jena.de · Necessary for gradient-based methods G k Numerical calculation by finite differences jk Possibilities and accuracy Calculation of Derivatives ( ) (](https://reader034.fdocuments.us/reader034/viewer/2022043002/5f7f96669681cc6c053f86c8/html5/thumbnails/17.jpg)
Illustration of not usefull results due to
non-sufficient constraints
Lack of Constraints in Optimization
negative edge
thickness
negative air
distance
lens thickness to largelens stability
to small
air space
to small
17
![Page 18: Lens Design I - uni-jena.de · Necessary for gradient-based methods G k Numerical calculation by finite differences jk Possibilities and accuracy Calculation of Derivatives ( ) (](https://reader034.fdocuments.us/reader034/viewer/2022043002/5f7f96669681cc6c053f86c8/html5/thumbnails/18.jpg)
Typical in optics:
Twisted valleys in the topology
Selection of local minima
Optimization in Optics
LM1 LM2
LM3
LM4
LM5
18
![Page 19: Lens Design I - uni-jena.de · Necessary for gradient-based methods G k Numerical calculation by finite differences jk Possibilities and accuracy Calculation of Derivatives ( ) (](https://reader034.fdocuments.us/reader034/viewer/2022043002/5f7f96669681cc6c053f86c8/html5/thumbnails/19.jpg)
Typical merit function of an achromate
Three solutions, only two are useful
Optimization Landscape of an Achromate
aperture
reduced
good
solution
1
2
3
r1
r2
19
![Page 20: Lens Design I - uni-jena.de · Necessary for gradient-based methods G k Numerical calculation by finite differences jk Possibilities and accuracy Calculation of Derivatives ( ) (](https://reader034.fdocuments.us/reader034/viewer/2022043002/5f7f96669681cc6c053f86c8/html5/thumbnails/20.jpg)
System Design Phases
1. Paraxial layout:
- specification data, magnification, aperture, pupil position, image location
- distribution of refractive powers
- locations of components
- system size diameter / length
- mechanical constraints
- choice of materials for correcting color and field curvature
2. Correction/consideration of Seidel primary aberrations of 3rd order for ideal thin lenses,
fixation of number of lenses
3. Insertion of finite thickness of components with remaining ray directions
4. Check of higher order aberrations
5. Final correction, fine tuning of compromise
6. Tolerancing, manufactability, cost, sensitivity, adjustment concepts
20
![Page 21: Lens Design I - uni-jena.de · Necessary for gradient-based methods G k Numerical calculation by finite differences jk Possibilities and accuracy Calculation of Derivatives ( ) (](https://reader034.fdocuments.us/reader034/viewer/2022043002/5f7f96669681cc6c053f86c8/html5/thumbnails/21.jpg)
Strategy of Correction and Optimization
Usefull options for accelerating a stagnated optimization:
split a lens
increase refractive index of positive lenses
lower refractive index of negative lenses
make surface with large spherical surface contribution aspherical
break cemented components
use glasses with anomalous partial dispersion
21
![Page 22: Lens Design I - uni-jena.de · Necessary for gradient-based methods G k Numerical calculation by finite differences jk Possibilities and accuracy Calculation of Derivatives ( ) (](https://reader034.fdocuments.us/reader034/viewer/2022043002/5f7f96669681cc6c053f86c8/html5/thumbnails/22.jpg)
Default merit function
1. Criterion
2. Ray sampling (high NA, aspheres,...)
3. Boundary values on thickness of center
and edge for glass / air
4. Special options
Add individual operands
Editor: settings, weight, target actual value
relative contribution to sum of squares
Several wavelengths, field points, aperture
points, configurations:
many requirements
Sorted result: merit function listing
Merit Function in Zemax
22
![Page 23: Lens Design I - uni-jena.de · Necessary for gradient-based methods G k Numerical calculation by finite differences jk Possibilities and accuracy Calculation of Derivatives ( ) (](https://reader034.fdocuments.us/reader034/viewer/2022043002/5f7f96669681cc6c053f86c8/html5/thumbnails/23.jpg)
Default merit function
Merit Function in Zemax
23
![Page 24: Lens Design I - uni-jena.de · Necessary for gradient-based methods G k Numerical calculation by finite differences jk Possibilities and accuracy Calculation of Derivatives ( ) (](https://reader034.fdocuments.us/reader034/viewer/2022043002/5f7f96669681cc6c053f86c8/html5/thumbnails/24.jpg)
If the number of field points, wavelengths or configurations is changed:
the merit function must be updated explicitly
Help function in Zemax: many operands
24
Merit function in Zemax
![Page 25: Lens Design I - uni-jena.de · Necessary for gradient-based methods G k Numerical calculation by finite differences jk Possibilities and accuracy Calculation of Derivatives ( ) (](https://reader034.fdocuments.us/reader034/viewer/2022043002/5f7f96669681cc6c053f86c8/html5/thumbnails/25.jpg)
Classical definition of the merit function in Zemax:
Special merit function options: individual operands can be composed:
- sum, diff, prod, divi,... of lines, which have a zero weight itself
- mathematical functions sin, sqrt, max ....
- less than, larger than (one-sided intervals as targets)
Negative weights:
requirement is considered as a Lagrange multiplier and is fulfilled exact
Optimization operands with derivatives:
building a system insensitive for small changes (wide tolerances)
Further possibilities for user-defined operands:
construction with macro language (ZPLM)
General outline:
- use sinple operands in a rough optimization phase
- use more complex, application-related operands in the final fine-tuning phase
Merit Function in Zemax
25
![Page 26: Lens Design I - uni-jena.de · Necessary for gradient-based methods G k Numerical calculation by finite differences jk Possibilities and accuracy Calculation of Derivatives ( ) (](https://reader034.fdocuments.us/reader034/viewer/2022043002/5f7f96669681cc6c053f86c8/html5/thumbnails/26.jpg)
Defining variables: indicated by V in lens data editor
toggle: CNTR z or right mouse click
Auxiliary command: remove all variables, all radii variable, all distances variable
If the initial value of a variable is quite bad and a ray failure occurs, the optimization can not
run and the merit function not be computed
Variables in Zemax
26
![Page 27: Lens Design I - uni-jena.de · Necessary for gradient-based methods G k Numerical calculation by finite differences jk Possibilities and accuracy Calculation of Derivatives ( ) (](https://reader034.fdocuments.us/reader034/viewer/2022043002/5f7f96669681cc6c053f86c8/html5/thumbnails/27.jpg)
Modell glass:
characterized by index, Abbe number and relative
dispersion
Individual choice of variables
Glass moves in Glass map
Restriction of useful area in glass map is desirable
(RGLA = regular glass area)
Re-substitution of real glass:
next neighbor in n-n-diagram
Choice of allowed glass catalogs can
be controlled in General-menu
Other possibility to reset real glasses:
direct substitution
Variable Glass in Zemax
27
![Page 28: Lens Design I - uni-jena.de · Necessary for gradient-based methods G k Numerical calculation by finite differences jk Possibilities and accuracy Calculation of Derivatives ( ) (](https://reader034.fdocuments.us/reader034/viewer/2022043002/5f7f96669681cc6c053f86c8/html5/thumbnails/28.jpg)
General optimization methods
- local
- global
Easy-one-dimensional optimizations
- focus
- adjustment
- slider, for visual control
Special aspects:
- solves
- aspheres
- glass substitutes
Optimization Methods Available in Zemax
28
![Page 29: Lens Design I - uni-jena.de · Necessary for gradient-based methods G k Numerical calculation by finite differences jk Possibilities and accuracy Calculation of Derivatives ( ) (](https://reader034.fdocuments.us/reader034/viewer/2022043002/5f7f96669681cc6c053f86c8/html5/thumbnails/29.jpg)
Classical local derivative:
- DLS optimization (Marquardt)
- orthogonal descent
Hammer:
- Algorithm not known
- Useful after convergence
- needs long time
- must be explicitely stopped
Global:
- global search, followed by local optimization
- Save of best systems
- must be explicitely stopped
Methods Available in Zemax
29
![Page 30: Lens Design I - uni-jena.de · Necessary for gradient-based methods G k Numerical calculation by finite differences jk Possibilities and accuracy Calculation of Derivatives ( ) (](https://reader034.fdocuments.us/reader034/viewer/2022043002/5f7f96669681cc6c053f86c8/html5/thumbnails/30.jpg)
Optimization window:
Choice of number of steps / cycles
Automatic update of all windows possible
for every cycle (run time slows down)
After run: change of merit function is seen
Changes only in higher decimals: stagnation
Window must be closed (exit) explictly
Conventional DLS-Optimization in Zemax
30