top of page
Writer's pictureMatt Johantgen

Lens Design Process with Zemax: Optimization Part 1

In our last post “Selection of a Starting Point Part II” we showed how to take the starting point lens design and modify it to make it ready for optimization in Zemax. We also did a short optimization introducing the default merit function and optimization wizard. We briefly discussed some of the optimization operands used in the merit function as well as 2 different optimizers in Zemax (local and hammer). We also provided a download of the Zemax file we are using in this tutorial, so please follow the link above for a quick review or to get the file we will be starting from.


From where we left off in the 7mmF4_110deg_11ELT_01.zmx file we now see that some specifications are not controlled in the merit function. The size of the lens has not been controlled. We can add operands to control the size. For the total mass, we use the operand TMAS 2 22 0 to get the mass in grams of all components from the first lens to the image plane. We pair this with an OPLT operand that constrains the desired operand to be less than the desired value (in this case 30g). We put a weight of 0.1 on the OPLT because the customer has requested a mass < 150g and we can almost assuredly make it work with 120g of metal components.

Zemax Merit Function Operands TMAS and OPLT
Zemax Merit Function Operands TMAS and OPLT

We also want to control the overall diameter to less than 45mm including metal. To do this, we can use the MXSD operand which controls the maximum semi-diameter of the lens elements through the range specified in the Surf1 and Surf2 columns. We specify a maximum semi-diameter of 18mm which should leave plenty of room for the metal components to hold the elements.

Zemax Merit Function Operand MXSD
Zemax Merit Function Operand MXSD

Looking at the lens cross-section, we can see that the radii on surfaces 7 and 8 look like they could be combined, eliminating an air space by cementing them together. To do this we simply highlight row 7 in the lens data editor (LDE) and press DELETE.

Zemax OpticStudio Lens Layout and Lens Data Editor (LDE)
Zemax Lens Layout and Lens Data Editor (LDE)

We can now run a local optimization to check if the removal of the air space will still result in good performance. Below are the spot diagram and MTF plot before and after the doublet was combined. As can be seen, the spot size and MTF are very similar before and after. (If you are unfamiliar with MTF, we will be doing an introductory post about MTF in the coming weeks, but for now just think of it as a contrast vs. resolution plot. Where contrast is on the y-axis increasing from 0 to 1 and resolution increases from left to right on the x-axis.)

Lens Performance: Spot Diagram and MTF Before and After Cementing Doublet
Lens Performance: Spot Diagram and MTF Before and After

Now the lens is ready for more optimization. This time we want to use the Hammer optimizer because it will make larger changes to the system to allow it to escape local minima in solution space to possibly find better solutions. It is also capable of replacing glass types if desired. To do this, we need to set the glass solve to “Substitute” for each material we want Zemax to try to replace. We want Zemax to try substituting all glasses so we set the solve for each material to “Substitute”.

Using Glass Substitution Solves in Zemax OpticStudio Lens Data Editor (LDE)
Using Glass Substitution Solves in Zemax LDE

Once the materials have been set to “Substitute”, we can click the “Hammer Current” button under the Optimize tab. Select the number of cores (actually threads) and click “Start” to start the optimization.

Hammer Optimizer in Zemax OpticStudio
Hammer Optimizer in Zemax OpticStudio

The Hammer optimizer generally takes a while, so unless you have a supercomputer available, you may want to walk away for a few hours while the computer optimizes the lens.


Below is the result of an overnight Hammer optimization:

Zemax 2x2 Report Graphic of Lens Performance after Optimization
Zemax 2x2 Report Graphic of Lens Performance after Optimization

As can be seen from the spot diagram the lens resolution has increased significantly. The on-axis RMS spot radius started off at 3.5um and is now 1.43um. The spot radius for the corner field also improved from 9.2um to 4.47um. This is also reflected in the MTF increase in all fields. The MTF is nearing the diffraction limit (black line on MTF chart) out to the 31.75° field. It is also almost meeting the MTF >20% at 145 cyc/mm specification.


In our next post we will continue with the optimization process, showing additional merit function operands that can be utilized to improve the design and as-manufactured performance.

Zemax Shaded Model Showing Lens Cross-Section
Zemax Shaded Model



1,707 views1 comment

1 Comment


А А
А А
Nov 09, 2023

It would be great if you can describe how to make good Merit Function

Like
bottom of page