Learning Center Watch the latest QUADOA® Optical CAD Videos YouTube channel

Multiple Merit Functions in QUADOA® Optical CAD

Published by Quadoa Optical Systems GmbH · Last updated · Applies to QUADOA® Optical CAD v26.10 · Reading time: 3 minutes · Video: 5:32 min

A model in QUADOA® Optical CAD can contain any number of merit functions, each with its own sequences, goals and variables. This makes it possible to optimize assemblies of a large system separately, compare design alternatives, or define dedicated merit functions for tolerancing and compensators. In the video, a doublet is optimized to collimate the light with one merit function, and a singlet to focus it with another.

Key points

  • Add merit functions with a right-click on Optimization → Add Merit Function.
  • Each merit function has its own ray traces with their own sequences.
  • Variables are set per merit function: choose the merit function in the drop-down above the Optical Design Editor first.
  • Select the merit function to run in the optimizer dialog.
  • Uses: separate assemblies, comparing configurations, tolerancing and compensators.

Terms used in this article

Merit function
The function the optimizer minimizes, defined by goals, constraints and variables.
Merit function selector
The drop-down above the Optical Design Editor that selects for which merit function (or compensator) variables are edited.
Collimation
The state in which all rays leave parallel to the chief ray.

Why use several merit functions?

  • Separate assemblies or elements: in large systems with several assemblies and light paths, such as a Fizeau interferometer, you may optimize the wavefront error of the whole interferometer with one merit function and the image quality of the imaging optics with another.
  • Comparing alternatives: different merit functions can evaluate different system configurations to see which performs best.
  • Tolerancing: one merit function evaluates the optical performance, others drive the compensators that model alignment steps.

Example system

The system has two assemblies: the first contains a doublet, the second a singlet. Two sequences are defined:

  • Sequence 1 (red) ends at the first surface of the singlet; the doublet should collimate the light.
  • Sequence 2 passes the whole system; the singlet should focus the light to a point.

How to set up the merit functions

  1. In the System Setup Editor, right-click Optimization and choose Add Merit Function twice.
  2. In the ray trace of merit function 1, select sequence 1; in merit function 2, select sequence 2.
  3. Add the goals: merit function 1 a collimation goal (for example Collimation RMS), merit function 2 a focusing goal (for example Spot Radius RMS), plus any constraints.

Use the Comment field of each merit function to name it, which helps when there are many.

How to set variables for each merit function

  1. In the drop-down menu above the Optical Design Editor, select Merit Function 1.
  2. Expand the first assembly and activate the variables of the doublet.
  3. Select Merit Function 2 in the drop-down.
  4. Expand the singlet and activate its variables.

The variable state is stored separately for each merit function, so the same parameter can be variable in one and fixed in another.

How to optimize step by step

  1. Open Local Optimization in the Optimization tab, select Merit Function 1 and optimize. The doublet is optimized and the red rays are collimated.
  2. Open the optimizer again, select Merit Function 2 and optimize. The singlet focuses the rays to a point.

Tip: The Auto Apply option of a merit function runs a short local optimization (1 s timeout) automatically after every edit, for example to keep a surface in focus. Use it only for simple, fast merit functions.

Video tutorial: multiple merit functions

This 6-minute video optimizes a collimating doublet and a focusing singlet with two merit functions and two sequences.

Video length: 5:32 min · Also on YouTube: Multiple Merit Functions for Optimization and Tolerancing in QUADOA® Optical CAD

Frequently asked questions

Yes, any number. Each merit function has its own ray traces, sequences, goals, constraints and variables.

Select the merit function in the drop-down menu above the Optical Design Editor, then activate the variables for it. The variable state is stored per merit function.

In the optimizer dialog, select the merit function before clicking Optimize.

One merit function evaluates the performance, while others are assigned to compensators that model alignment steps such as refocusing.