Doublet lenses are one of the most fundamental building blocks in optical engineering. In this post, we'll walk through the practical decisions and optical theory behind designing a simple doublet lens using Optiland.
Setting Up the Problem
When designing a doublet to correct chromatic aberration, the key is choosing two glasses with different dispersive properties—typically a crown and a flint glass. For this example, we'll use N-BK7 and N-SF5.
import optiland as op
# Initialize optical system
sys = op.LensSystem()
sys.add_surface(radius=50.0, thickness=6.0, material='N-BK7')
sys.add_surface(radius=-50.0, thickness=2.0, material='N-SF5')
sys.add_surface(radius=-200.0, thickness=4.0)
sys.add_stop(thickness=50.0)
Optimization
We'll use Optiland's optimization module to target minimum RMS spot size while maintaining a specific focal length. By defining the radii of curvature as our variables, we allow the optimizer to find the balance between spherical and chromatic aberration correction.
Optiland v2.0 makes this incredibly fast with the TorchAdamOptimizer, allowing us to trace thousands of rays and adjust the surfaces in milliseconds.