CODE V Introductory Tutorial Cheng-Fang Ho Lab.of RF-MW Photonics, Department of Physics, National Cheng-Kung University, Tainan, Taiwan 1-1
Tutorial Outline Introduction to CODE V Optical Design Process Code V Design Examples : Optical System Design on Lab. of RF-MW 1. Digital VGA Camera Objective 2. 10X Microscope Advanced Applications References 1-2
Introduction to CODE V 1-3
An Overview of CODE V Features 1-4
Structure of CODE V Optical System Design on Lab. of RF-MW 1-5
CODE V Version 9.00 Optical System Design on Lab. of RF-MW Menu bar Toolbar Lens Data Manager Command Window Window Navigation Bar Error Log Status Bar 1-6
Optical Design Process 1-7
Optical Design Flowchart Today s s tutorial will based on this process Design condition Specification Pre-design Initial analysis & Performance evaluation Optimization Final analysis & Performance evaluation Tolerance analysis Prepare for fabrication 1-8
Design Example 1 : : Fixed-focus VGA Digital Camera Objective 1-9
Outline Optical System Design on Lab. of RF-MW Fixed-focus VGA Digital Camera Objective specification Identification of a Starting Point First-order optics consideration Selecting a Suitable Starting Point Code V New Lens Wizard Perform a Basic Analysis Compare with the specifications: Spot Diagram, Aberration curves,, MTF output.. Guideline for Optimization Optimization Make things better, Performance re-evaluation evaluation Tolerance Analysis Prepare for fabrication Summary and References 1-10
Identification of a starting point 1-11
Lens Specifications Optical System Design on Lab. of RF-MW Fixed-focus VGA VGA Digital Camera Objective Specifications * * Small Small unmber unmber of of elements elements ( ( 1-3 1-3 ) ) made made from from common common glasses glasses or or plastics plastics * * Image Image sensor sensor (baseline (baseline is is Agilent Agilent FDCS-2020) FDCS-2020) Resolution Resolution 640 640 x x 480 480 effective effective pixels pixels Pixel Pixel size size 7.4 7.4 x x 7.4 7.4 microns microns Sensitive Sensitive area area 3.55 3.55 x x 4.74 4.74 mm mm (full (full diagonal diagonal 6 6 mm) mm) * * Objective Objective Lens Lens Focus Focus Fixed, Fixed, depth depth of of field field 750 750 mm mm to to infinity infinity Focal Focal length length Fixed, Fixed, 6.0mm 6.0mm Geometric Geometric Distortion Distortion < 4% 4% F/number F/number Fixed Fixed aperture, aperture, F/3.5 F/3.5 Sharpness Sharpness MTF MTF through through focus focus range range (central (central area area is is inner inner 3 3 mm mm of of CCD) CCD) Low Low freq. freq. 17 17 lp/mm lp/mm >90% >90% (central) (central) >85% >85% (outer) (outer) High High freq. freq. 51 51 lp/mm lp/mm >30% >30% (central) (central) >25% >25% (outer) (outer) Vignetting Vignetting Corner Corner relative relative illumination illumination >60% >60% Transmission Transmission Lens Lens alone, alone, >80% >80% 400-700 400-700 nm nm IR IR filter filter 1 1 mm mm thick thick Schott Schott IR638 IR638 or or Hoya Hoya CM500 CM500 1-12
Identification of a Starting Point From specification directly: 3-element system Effective focal length = 6 mm F/number = 3.5 3.5 Starting point scheme 3-element System Image HIght = 3 mm EFL = 6 mm First-order calculation: Field of of view FOV = 26.5 Semi-FOV = 26.5 degs Image height = EFL* tan(semi-fov) These are useful to be a filter (criterion) for searching exiting designs in Code V new lens wizard 1-13
Selecting a Suitable Starting Point 1-14
Selecting a suitable starting point The Code V New Lens Wizard Searching existing designs- Patent Database Filter A suitable starting lens 2. 3. Lens name : or022488 1. 1-15
Selecting a suitable starting point Defining system data Pupil specification, Wavelengths, Fields 1. Pupil 2. Wavelengths 3. Fields 1-16
Lens Data Manager Spreadsheet and Command Window 1. 1. LDM Spreadsheet 2. Command Window 1-17
Drawing Pictures and First order Data 2. First Order Data 1. Quick 2D plot The lens system is too small EFL, the result is not suitable for our specification 1-18
Scale the Lens The lens data has been changed 1.04 MM JAPAN PATENT 50_2807 750129 Scale: 24.00 ORA 18-Nov-01 Updated system layout The EFL value is now 6mm as desired. The paraxial image height is 2.99 mm 1-19
Analyze the Starting Point 1-20
Analyze the Starting Point Basic and Useful Analysis Ray aberration curves and Spot diagrams Compare with Lens Specifications Distortion ( Field Curve or Distortion Grid ) Sharpness ( Diffraction MTF ) Vignetting Vignetting Focal length Fixed, 6.0mm Geometric Distortion < 4% Sharpness MTF through focus range (central area is is inner 3 mm of of CCD) Low freq. 17 17 lp/mm >90% (central) >85% (outer) High freq. 51 51 lp/mm >30% (central) >25% (outer) Vignetting Corner relative illumination >60% Transmission Lens alone, >80% 400-700 nm 1-21
Ray Aberration Curves Analysis > Diagnostics > Ray Aberration Curve Optical System Design on Lab. of RF-MW Ray Aberration and Spot Diagram Purple Aberration scale Enlarge 1-22
Spot Diagram Analysis > Geometrical > Spot Diagram Scale by Pixel Size 7.4 um Field angle Scale bar 1-23
Useful Spot Macro Tool > Macro > Sample / Geometrical Analysis / sopt2d.seq 1-24
Geometric Distortion < 4% 4% Distortion Optical System Design on Lab. of RF-MW Analysis > Diagnostics > Field Curve Analysis > Diagnostics > Distortion Grid 1. Field Curve 2. Distortion Grid 1-25
MTF Output Analysis > Diffraction > MTF Optical System Design on Lab. of RF-MW Sharpness Sharpness MTF MTF through through focus focus range range (central (central area area is is inner inner 3 mm mm of of CCD) CCD) Low Low freq. freq. 17 17 lp/mm lp/mm >90% >90% (central) (central) >85% >85% (outer) (outer) High High freq. freq. 51 51 lp/mm lp/mm >30% >30% (central) (central) >25% >25% (outer) (outer) 1-26
Vignetting Corner relative illumination >60% Transmission Lens alone, >80% 400-700 nm nm Vignetting / Illumination and Transmission 1. Get from Text tab of MTF output 2. Analysis > system > Transmission Analysis 1. 2. Relative Illumination Illumination and Transmission for each wavelength 1-27
Picking on Glass Tool > Macro > glassfit.seq Sample Macro / Material Information Optical System Design on Lab. of RF-MW Result of glassfit.seq 1-28
Optimization: Making Things Better 1-29
Automatic Design Process Starting design Setup Choice of variables A B Designer Tasks Choice of constraints, error function controls, other controls Auto input C CODEV/AUTO tasks D Construct error function Process Evaluate error function * EXIT Develop finite differences for each constraint and aberration Print each cycle for user feedback Designer Tasks : Evaluate design No Not good enought re-enter process at A, B, C, or D Yes STOP (good enough) 1-30
The Game Plan Optical System Design on Lab. of RF-MW Define as variable: all radii of curvatures, thickness values, and a fictitious glasses Automatic Design Setting Make sure all glass elements are thick enough and glass index doesn t t get too high Constrain the effective focal length (EFL) to the current 6 mm Use the default spot size (transverse ray aberration ) error function,but trace mire rays in the grid optimizations Run AUTO Understanding the output and reevaluations Modify AUTO setting to refine the solution 1-31
Defining Variable Variables are defined in the LDM Optical System Design on Lab. of RF-MW To vary the constructs what you want, place the cursor on the it in the LDM window, right-click, and choose Vary from the shortcut menu. The red, small letter V means variable 1-32
Automatic Design Setting Optical System Design on Lab. of RF-MW The first boundary condition category is General Constraint General Thickness Constraint Glass Map Constraint The second boundary condition category is Specific Constraint Edit Constraint : Optical Definition / First Order or Third Order Aberration Defining Constraint Mode and Constraint Target Error Function Definitions and Controls Error Function Types Output Controls 1-33
General Constraint Min. center thickness 0.9 mm Min. edge thickness 0.8 mm Defining new corner point for the glass map Optical System Design on Lab. of RF-MW 1-34
Specific Constraint Constraint EFL Constraint category Constraints Constraints mode Optical System Design on Lab. of RF-MW 1-35
Error Function Definition and Controls CODE V Error Function Only Error Function type Transverse Ray Aberration 1-36
Run Automatic Design Optical System Design on Lab. of RF-MW 1.04 MM 1.04 MM Error function = 7.48458174 Scale: 24.00 ORA 21-Nov-01 Error function = 26.38829598 Scale: 24.00 ORA 21-Nov-01 1.04 MM Error function = 18.58429918 Scale: 24.00 ORA 21-Nov-01 Error function valve 1.04 MM Error function = 17.45815063 Scale: 24.00 ORA 21-Nov-01 1.04 MM Error function = 17.06470255 Scale: 24.00 ORA 21-Nov-01 1-37
Understanding AUTO Output Active constraints Error function contributions Error function contributions Error function change 1-38
Analyzing and Modifying Weights ORA 1.0 Digtial VGA Carmera DIFFRACTION MTF 22-Nov-01 DIFFRACTION LIMIT AXIS T R 0.4 FIELD ( 11.00 O ) T R 0.7 FIELD ( 19.00 O ) T R 1.0 FIELD ( 26.50 O ) WAVELENGTH WEIGHT 656.0 NM 1 589.0 NM 2 430.0 NM 1 DEFOCUSING 0.00000 0.9 0.8 0.7 M O D U L A T I O N 0.6 0.5 0.4 0.3 F 4 X F 3 X 0.2 0.1 7.0 14.0 21.0 28.0 35.0 42.0 49.0 56.0 63.0 70.0 SPATIAL FREQUENCY (CYCLES/MM) 1-39
Optimized MTF Results Optical System Design on Lab. of RF-MW Analyzing and Modifying Weights ORA 1.0 Digtial VGA Carmera DIFFRACTION MTF 22-Nov-01 DIFFRACTION LIMIT AXIS T R 0.4 FIELD ( 11.00 O ) T R 0.7 FIELD ( 19.00 O ) T R 1.0 FIELD ( 26.50 O ) WAVELENGTH WEIGHT 656.0 NM 1 589.0 NM 2 430.0 NM 1 DEFOCUSING 0.00000 0.9 0.8 0.7 M O D U L A T I O N 0.6 0.5 0.4 0.3 F 4 X F 3 X Aberration Direction 0.2 Field Angle 0.1 Error function Weight 7.0 14.0 21.0 28.0 35.0 42.0 49.0 56.0 63.0 70.0 SPATIAL FREQUENCY (CYCLES/MM) 1-40
Optimization and Re-evaluations evaluations (1) ORA 1.0 Digtial VGA Carmera DIFFRACTION MTF 22-Nov-01 DIFFRACTION LIMIT AXIS T R 0.4 FIELD ( 11.00 O ) T R 0.7 FIELD ( 19.00 O ) T R 1.0 FIELD ( 26.50 O ) WAVELENGTH WEIGHT 656.0 NM 1 589.0 NM 2 430.0 NM 1 DEFOCUSING 0.00000 0.9 0.8 0.7 M O D U L A T I O N 0.6 0.5 0.4 0.3 0.25 0.2 0.1 7.0 14.0 21.0 28.0 35.0 42.0 49.0 56.0 63.0 70.0 SPATIAL FREQUENCY (CYCLES/MM) The results are accepted for infinite objection distance 1-41
Optimization for objection distance =750 mm Consider the defocus effect (Through focus) The error functions are weighting by different focus Optimization and Re-evaluations evaluations (2) Defocus defining MTF (object distance 750 mm) Focus assigning 1-42
Final Evaluations Optical System Design on Sharpness Lab. of RF-MW MTF through Photonice. focus range. Phys. NCKU MTF at defocus 0 mm Sharpness MTF through focus range (central area is inner 3 mm of CCD) (central area is inner 3 mm of CCD) Low freq. 17 lp/mm >90% (central) >85% (outer) Low freq. 17 lp/mm >90% (central) >85% (outer) High freq. 51 lp/mm >30% (central) >25% (outer) High freq. 51 lp/mm >30% (central) >25% (outer) MTF at defocus 0.048 mm 1.04 MM Digtial VGA Carmera Scale: 24.00 ORA 26-Nov-01 Field curve and Distortion Through focus MTF at defocus 17 lp/mm and 51 lp/mm 1-43
Final Evaluations illumination Analysis > Illumination Using Bitmap images as illumination source The imaging process is base on Raytrace method 1-44