ODZ14_Optical design with Zemax 6 Optimization I

Download Report

Transcript ODZ14_Optical design with Zemax 6 Optimization I

Optical Design with Zemax
Lecture 6: Optimization I
2014-05-23
Herbert Gross
Sommer term 2014
www.iap.uni-jena.de
2
Preliminary Schedule
1
11.04.
Introduction
Introduction, Zemax interface, menues, file handling, preferences, Editors, updates,
windows, coordinates, System description, Component reversal, system insertion,
scaling, 3D geometry, aperture, field, wavelength
2
25.04.
Properties of optical systems I
Diameters, stop and pupil, vignetting, Layouts, Materials, Glass catalogs, Raytrace,
Ray fans and sampling, Footprints
3
02.05.
Properties of optical systems II
Types of surfaces, Aspheres, Gratings and diffractive surfaces, Gradient media,
Cardinal elements, Lens properties, Imaging, magnification, paraxial approximation
and modelling
4
09.05.
Aberrations I
Representation of geometrical aberrations, Spot diagram, Transverse aberration
diagrams, Aberration expansions, Primary aberrations,
5
16.05.
Aberrations II
Wave aberrations, Zernike polynomials
6
23.05.
Aberrations III
Point spread function, Optical transfer function
7
30.05.
Optimization I
8
06.06.
Optimization II
9
13.06.
Advanced handling I
10
20.06.
Advanced handling II
11
27.06.
Imaging
12
04.07.
Correction I
13
11.07.
Correction II
Principles of nonlinear optimization, Optimization in optical design, Global
optimization methods, Solves and pickups, variables, Sensitivity of variables in
optical systems
Systematic methods and optimization process, Starting points, Optimization in Zemax
Telecentricity, infinity object distance and afocal image, Local/global coordinates, Add
fold mirror, Scale system, Make double pass, Vignetting, Diameter types, Ray aiming,
Material index fit
Report graphics, Universal plot, Slider, Visual optimization, IO of data,
Multiconfiguration, Fiber coupling, Macro language, Lens catalogs
Fundamentals of Fourier optics, Physical optical image formation, Imaging in Zemax
Symmetry principle, Lens bending, Correcting spherical aberration, Coma, stop
position, Astigmatism, Field flattening, Chromatical correction, Retrofocus and
telephoto setup, Design method
Field lenses, Stop position influence, Aspheres and higher orders, Principles of glass
selection, Sensitivity of a system correction
3
Contents
1. Principles of nonlinear optimization
2. Optimization in optical design
3. Global optimization methods
4. Optimization in Zemax
4
Basic Idea of Optimization

Topology of the merit function in 2 dimensions

Iterative down climbing in the topology
topology of
meritfunction F
start
iteration
path
x1
x2
5
Nonlinear Optimization
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

x
 
f (x )
 fi
Ji j 
 xj
m


F (x)   wi   yi  f (x)2
i 1
F
gj 
 xj
 2F
H jk 
 x j x k
6
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
f2
B
 Vectorial decomposition of an ideal
step of improvement,
linear interpolation
 x 1 =0.035
0
 Due to non-linearity:
change of Jacobian matrix,
next iteration gives better result
 x 2 =0.1
A
target point
 x 2 =0.07
initial
point
 x 1 =0.1
C
0
f2
7
Nonlinear Optimization
 

f  f0  J  x
 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


 1 

F ( x )  F ( x0 )  J  x   x  H  x
2
1

A
if
 T 1 T

A   A A  A if
 AT  A AT 1 if





mn
m  n (under determined )
m  n ( over determined )
8
Calculation of Derivatives
 Derivative vector in merit function topology:
Necessary for gradient-based methods
g jk 
 Numerical calculation by finite differences
g jk 

 f j (x)
 xk

  xk f j ( x )
f jright  f j
xk
 Possibilities and accuracy
fj(xk)
left
fj-1
fj(xk)
fj
right
fj+1
forward
central
exact
xk
xk-xk
xk
xk
backward
xk+xk
xk
9
Effect of Constraints on Optimization
x1
Effect of constraints
path without
constraint
local
minimum
0
path with
constraint
constraint
x1 < 0
global
minimum
initial
point
x2
10
Boundary Conditions and Constraints
 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
F(x)
F(x)
penalty
function
P(x)
p large
p large
barrier
function
B(x)
p small
F0(x)
F0(x)
p
small
x
x
xmin
permitted domain
xmax
permitted domain
11
Optimization Algorithms in Optical Design
Local working optimization algorithms
nonlinear optimization methods
methods without
derivatives
simplex
derivative based
methods
conjugate
directions
single merit
function
no single merit
function
descent
methods
least squares
undamped
line search
steepest
descents
damped
additive
damping
multiplicative
damping
orthonorm
alization
second
derivative
adaptive
optimization
variable
metric
conjugate
gradient
Davidon
Fletcher
nonlinear
inequalities
12
Local Optimization Algorithms
 Gauss-Newton method
Normal equations
System matrix


T
x   J  J

A J J
T

1


 J  f
J
T
1
T

 Damped least squares method (DLS)
Daming reduces step size, better convergence
without oscillations
x j  J ijT  J ij  2  I ij
 ACM method according to E.Glatzel
Special algorithm with reduced error vector
 x j J  J ij  J
 Conjugate gradient method
Reduction of oscillations
T
ij


T 1
ij

1
 J ijT f i
  fi
13
Optimization Minimum Search
Principle of searching the local minimum
x2
nearly ideal iteration path
steepest
descent
topology of the
merit function
starting
point
method with
compromise
quadratic
approximation
around the starting
point
Gauss-Newton
method
x1
14
Optimization: Convergence
 Adaptation of direction and length of
steps:
rate of convergence
Log F
2
0
 Gradient method:
slow due to zig-zag
steepest
descent
-2
-4
conjugate
gradient
-6
-8
DavidonFletcherPowell
-10
-12
0
10
20
30
40
50
60
iteration
15
Optimization and Starting Point
 The initial starting point
determines the final result
p
2
 Only the next located solution
without hill-climbing is found
D'
A'
C'
B'
A
B
p
1
16
Optimization Merit Function in Optical Design
 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
17
Optimization in Optical Design
 Merit function:
Weighted sum of deviations from target values

j 1, m
 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

ist
soll
g

f

f
 j j
j

2
18
Parameter of Optical Systems
 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
19
Constraints in Optical Systems
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)
20
Lack of Constraints in Optimization
Illustration of not usefull results due to
non-sufficient constraints
lens thickness to large
negative edge
thickness
lens stability
to small
negative air
distance
air space
to small
21
Optimization in Optics
 Typical in optics:
Twisted valleys in the topology
 Selection of local minima
LM1
LM2
LM5
LM4
LM3
22
Optimization Landscape of an Achromate
 Typical merit function of an achromate
 Three solutions, only two are useful
r2
aperture
reduced
2
3
1
good
solution
r1
23
Optimization: Discrete Materials
 Special problem in glass optimization:
finite area of definition with
discrete parameters n, n
n
 Restricted permitted area as
one possible contraint
2
area of available
glasses
1.9
 Model glass with continuous
values of n, n in a pre-phase
of glass selection,
freezing to the next adjacend
glass
1.8
area of permitted
glasses in
optimization
1.7
1.6
1.5
1.4
100
90
80
70
60
50
40
30
20
n
24
Global Optimization: Simulated Annealing
F
 Simulated Annealing:
temporarily added term to
overcome local minimum


   F ( x )  F0  2
Fesc ( x )  F0  e
merit
function with
additive term
F(x)+Fesc
conventional
path
Fesc
merit
function
F(x)
 Optimization and adaptation
of annealing parameters
local
minimum xloc
 = 1.0
 = 0.5
 = 0 . 01
x
global
minimum xglo
25
Global Optimization
 No unique solution
reference design : F = 0.00195
solution 5 : F = 0.000266
solution 11 : F = 0.000470
solution 6 : F = 0.000273
solution 12 : F = 0.000510
solution 1 : F = 0.000102
solution 7 : F = 0.000296
solution 13 : F = 0.000513
solution 2 : F = 0.000160
solution 8 : F = 0.000312
solution 14 : F = 0.000519
solution 3 : F = 0.000210
solution 9 : F = 0.000362
solution 15 : F = 0.000602
solution 4 : F = 0.000216
solution 10 : F = 0.000384
solution 16 : F = 0.000737
 Contraints not sufficient
fixed:
unwanted lens shapes
 Many local minima with
nearly the same
performance
Saddel Point Method
 Saddel points in the merit function topology
 Systematic search of adjacend local minima is possible
 Exploration of the complete network of local minima via saddelpoints
M2
S
M1
Fo
Saddel Point Method
 Example Double Gauss lens of system network with saddelpoints
Merit Function in Zemax
 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
28
Merit function in Zemax
 If the number of field points, wavelengths or configurations is changed:
the merit function must be updated explicitly
 Help function in Zemax: many operands
29
Merit Function in Zemax
 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
30
Variables in Zemax
 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
31
Variable Glass in Zemax
 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
32
Optimization Methods Available in Zemax
 General optimization methods
- local
- global
 Easy-one-dimensional optimizations
- focus
- adjustment
- slider, for visual control
 Special aspects:
- solves
- aspheres
- glass substitutes
33
Methods Available in Zemax
 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
34
Conventional DLS-Optimization in Zemax
 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
35