- Home
- Optimization
- How to Optimize Non-Sequential Optical Systems
- Home
- Non Sequential Ray Tracing
- How to Optimize Non-Sequential Optical Systems
How to Optimize Non-Sequential Optical Systems
- By Akash Arora
- Published 31 October 2008
- Optimization , Non Sequential Ray Tracing
-
Rating:




The Merit Function
A merit function defines the 'quality' of an optical design, in terms of how well the design meets its specified operating characteristics. In this case, we want to get the highest brightness (luminous intensity) at zero degrees angle. This is easily achieved with the NSDD and NSTR operands.
In this design, the detector is object number 3, and we want to obtain the luminous intensity at zero degrees. The detector viewer shows this:

This shows the angular range of the rays that are incident on the detector from the range -90° to +90° in both x and y. No rays land with angles beyond about 35° because the LED does not emit beyond this angle. Peak intensity occurs at around 27 degrees. We are interested in the power landing at angles close to zero. There are two criteria that will target such a distribution: RMS angular width and luminous intensity centroid. The RMS width targets rays to be collimated (i.e. the same angle of incidence), and the centroid targets this angle of incidence to be zero. The following merit function retrieves the luminous intensity seen at this angle:

The first NSDD operand reads out detector object 0, which does not exist; no object 0 can exist. This is a special usage of the operand: ZEMAX instead clears all detectors. Alternately, detectors may be cleared on an individual basis by defining a negative number (i.e. Det# = -3 clears only detector 3). This is useful in a system with multiple detectors defined.
Then, the NSTR operand tells ZEMAX to trace rays. The second and third NSDD operands read out detector object 3, centroid x & y (Pix# = -6, -7), data item 2, which is power/unit solid angle. Note that we are targeting the luminous intensity (angular) centroid, not the illuminance (spatial) centroid. The fourth NSDD operand reads out RMS angular width of all pixel data. In addition, the last NSDD operand reports the central pixel (5101) intensity for comparison purposes; note that no weighting is assigned so that it doesn’t contribute to the merit function. This value is approximately 22 Cd.
The last NSDD operand is combined with an OPGT operand to maintain a minimum amount of flux on the detector. We set this to 25 because this is the initial flux on the detector. If this operand didn’t exist, it would be possible to achieve a merit function of zero by removing the mirror altogether! If no energy falls on the detector, the intensity centroid and RMS radius are zero and these are our targets. This “solution” highlights the importance of a well-defined merit function. During optimization, ZEMAX will attempt to drive the merit function to zero, regardless of what this physically means in the system.
In this design, the detector is object number 3, and we want to obtain the luminous intensity at zero degrees. The detector viewer shows this:

This shows the angular range of the rays that are incident on the detector from the range -90° to +90° in both x and y. No rays land with angles beyond about 35° because the LED does not emit beyond this angle. Peak intensity occurs at around 27 degrees. We are interested in the power landing at angles close to zero. There are two criteria that will target such a distribution: RMS angular width and luminous intensity centroid. The RMS width targets rays to be collimated (i.e. the same angle of incidence), and the centroid targets this angle of incidence to be zero. The following merit function retrieves the luminous intensity seen at this angle:
The first NSDD operand reads out detector object 0, which does not exist; no object 0 can exist. This is a special usage of the operand: ZEMAX instead clears all detectors. Alternately, detectors may be cleared on an individual basis by defining a negative number (i.e. Det# = -3 clears only detector 3). This is useful in a system with multiple detectors defined.
Then, the NSTR operand tells ZEMAX to trace rays. The second and third NSDD operands read out detector object 3, centroid x & y (Pix# = -6, -7), data item 2, which is power/unit solid angle. Note that we are targeting the luminous intensity (angular) centroid, not the illuminance (spatial) centroid. The fourth NSDD operand reads out RMS angular width of all pixel data. In addition, the last NSDD operand reports the central pixel (5101) intensity for comparison purposes; note that no weighting is assigned so that it doesn’t contribute to the merit function. This value is approximately 22 Cd.
The last NSDD operand is combined with an OPGT operand to maintain a minimum amount of flux on the detector. We set this to 25 because this is the initial flux on the detector. If this operand didn’t exist, it would be possible to achieve a merit function of zero by removing the mirror altogether! If no energy falls on the detector, the intensity centroid and RMS radius are zero and these are our targets. This “solution” highlights the importance of a well-defined merit function. During optimization, ZEMAX will attempt to drive the merit function to zero, regardless of what this physically means in the system.