The goal of this example is to showcase how to easily update mechanical geometry with the Geometry Update Tool during a stray light analysis in Ansys Speos and the impact this can have on the stray light prevention. For this we walk through a stray light analysis workflow of a single-lens-reflex camera. Starting with a Double Gauss Design in Ansys Zemax OpticStudio which is then transferred into Ansys Speos and a CAD Environment as a .odx and a .stp file respectively. In Ansys Speos the optical and mechanical components are married, and a stray light analysis is carried out. The geometry of selective mechanical components is then updated, and the stray light prevention is compared to the initial optomechanical design.
NOTES: Software Prerequisites
To be able to follow this example, the following tools need to be installed on your computer:
- Ansys Zemax OpticStudio 2024 R1 or newer (OpticStudio)
- Ansys Speos 2024 R1 or newer (Speos)
- CAD Environment (CAD) - See Additional Resources section for a detailed list of supported CAD software and format.
Overview
Understand the simulation workflow and key results
Nearly every optical imaging system is impacted by unwanted light, also known as stray light. This unwanted light can degrade image quality and affect the performance of an optical system. Stray Light Analysis involves identifying, measuring and reducing the sources of stray light such as reflections scattering and diffraction. This analysis is a crucial aspect of optical systems ranging from cameras to telescopes. Effective stray light management ensures functionality and enhances the reliability of an optical system in a real-life application.
The geometry of the mechanical components in an optomechanical system can play a vital part when it comes to stray light prevention. So, the ability to modify the geometry of specific mechanical components is a powerful tool, allowing users to enhance stray light prevention through iterative insights gained during stray light analysis.
Step 1: Lens system design with OpticStudio
The example starts from an optimized double gauss system in OpticStudio sequential mode. In order to check the performance, the Modulation Transfer Function (MTF) is used as a metric.
Step 2: Mechanical design with CAD
In the CAD Environment, in this example Creo Parametric is used, the .stp file of the optical geometry is important and servers as a base reference for the design of the mechanical components. The mechanical components are directly designed in CAD and then assembled on the base reference geometry of the optical components.
Step 3: Initial Stray Light Analysis with Speos
The first step in Speos, is the import of the optical geometry via the optical design exchange file, this way the optical properties and sensor are carried over from OpticStudio. After that the mechanical assembly is imported and aligned with the optical system to create a working optomechanical system. The mechanical assembly contains a sun shield component at the front of the housing, which will be the focus of the Geometry Update approach.
Step 4: Updated Stray Light Analysis with Speos
After the first stray light analysis is carried out the weakest geometry flaw of the sun shield is identified. The sun shield geometry is then modified in CAD and replaced with the Geometry Update tool in Speos. After that a second iteration of the stray light analysis is carried out and compared to the first one.
Run and Results
Instructions for running the model and discussion of key results
Step 1: Lens system desgin with OpticStudio
As an initial step the file “Advanced_SC_doubleGauss_final” can be opened in OpticStudio. This Double Gauss system was designed and optimized in sequential mode. In order to check the performance, the FFT MTF can be used as a metric. The Modulation Transfer function describes how good a camera system can represent the detail contrast of an object in the image. The response of a film is about 65% at 30 cycles/mm and 40% at 50 cycles/mm:
- Note that 20% is about the limit at which humans can distinguish contrast by eye.
- For a full training on how to design and optimize such a double gauss system, please see Ansys Zemax Optical System Design - Ansys Learning Hub
After the performance check the lens system is ready to be export into Speos and CAD respectively. For that a .odx and a .stp of the system is generated. The .odx (optical design exchange) can be generated in the File Tab…Export Optical Design to Speos, the .odx is automatically saved in the same location as the OpticStudio file and contains geometry, material and the position and size of the image plane for Speos.
- It is a good practice to set the image plane as the “Global Coordinate Reference” in OpticStudio. This can be done in the Surface Properties. This way the optical assembly will have the coordinate origin point always on the image sensor in Speos.
Parallel to the optical exchange, the geometry of the optical components can also be exported to CAD with *.stp file. Having the geometry of the optical components in the CAD Environment will help with the design of the mechanical components. Additionally, to the geometry the chief and marginal ray of each field point can also be exported. This step is done in the File Tab…CAD Files tool, which opens a dialog window. Several optical can be set there, in this example, the XY Fan Pattern with 3 Rays is chosen.
Step 2: Mechanical design with CAD
In this example, the CAD Software which has been used was Creo Parametric 9.0, but a vast range of data and software format are natively supported by Speos.
In CAD, the *.stp geometry file of the optical component, which was automatically generated in OpticStudio, is imported into an assembly file. The optics are then used as a base reference to design and assemble the mechanical components with them. The double gauss system is getting four lens spacers to ensure the lenses are positioned correctly in the housing. The housing itself contains a mechanical stop which represents the dimensions of the optical STOP defined in OpticStudio.
The housing itself is already a first defence to prevent stray light getting into the system and onto the sensor on the image plane position. Now as this camera is meant to be operating in outdoors, the sun will be the most impactful source of stray light. So, in a first iteration, a sun shield is designed and added to the front of the lens system.
Here it is important that the sun shield design is not interfering with the field of view. As the lenses in the optical system have been designed and optimized for a 43.2 degrees field of view, the sun shield must respect this angle. After the optomechanical system is design, it can be moved to Speos, see next chapter for that.
Step 3: Initial Stray Light Analysis with Speos
The first step in Speos is the import of the .odx file which includes the geometry, material and sensor position and size of the optical system defined prior in OpticStudio. For that a new file is opened in Speos and the Optical Design Exchange feature which is located in the Light Simulation Tool is used (Beta features might have to be enabled in Settings in 24R1). In the Simulation tree , the .odx file which previously has been generated with OpticStudio, can be loaded in the Optical Design Exchange definition.
After the Optical Design exchange feature has been executed the geometry will appear in the design window and the structure tree. To have accurate light simulation, the mesh of the optical components needs to be refined. This can be done in the Mesh Options of the Optical design Exchange entity.
- For a full step by step explanation on how to load a .odx file into Speos, please see Stray Light Analysis – Smartphone Camera – Ansys Optics
Now as the optical components are loaded, it is time to bring in the mechanical parts which have been designed in CAD (See Step 2). For that the File feature in the Assembly tab is used. By simply clicking on the feature and navigate to the file of the saved optomechanical assembly and load the whole optomechanical assembly in one. This can be done in nearly all major native CAD file formats. In optical imaging system, Ansys recommends using the image plane/sensor as the origin point of the assembly. This way it is easy to align the mechanical parts with the optics from the Optical Design exchange. As the Optical Design exchange has generated native geometry of the optical components, the geometry of the optics which came from the CAD, can used to align the native geometry and then be deleted.
Next, the optomechanical assembly is now ready for a first stray light analysis iteration. For this a source can be placed within proximity of the system. In this example a source to simulate the sun is placed above the camera system with an incident angle of 40 degrees, has a blackbody spectrum and flux of 0.44 lm. In order to avoid any unrealistic ray pattern, the sensor plane is enveloped by an absorbent solid. This solid can be easily done with the sketching tools of Speos.
After that, a Black Anodized material property is applied on all the mechanical parts. As the optical components were imported via the Optical Design Exchange, the material properties were carried over from OpticStudio. The Direct Simulation which has been run with the sun source in place gives the following results:
From the Direct Simulation Report, the absorbed power on the sensor is given as 0.0024389 Watt. However, it is visible that the bottom half of the sun shield is reflecting a lot of sun light directly into the camera system. So, an alternation of the geometry is potential a good way to reduce the power of the stray light. In Step 4, the geometry of the sun shield is adjusted and updated with the Geometry Update.
Step 4: Geometry Update with Speos
Firstly, the geometry of the sun shield is directly altered in the CAD environment. As stated in step 2 the CAD Software of choice for this article was Creo Parametric 9.0. However, it is important to note that most CAD Software file formats are supported.
The main issue was that the reflected stray light of the bottom section of the sun shield was directed into the optical system and subsequently onto the sensor. So the second iteration of the sun shield contains a shorter bottom section:
In order to update the geometry of the optomechanical assembly with the new sun shield, the steps below are followed:
-
- The part which needs to be updated can be right clicked, the Geometry Update feature is the second in the appearing list.
- Alternatively, the Geometry Update Tool can be found in the Assembly tab.
- Navigate to the file location which contains the new file and open it
- The new mechanical part will now be automatically replacing the old one.
- The new part will also inherit all the component placement and the optical properties. However, as with a new geometry the reference surfaces might have changed, the component placement should be double checked.
- The part which needs to be updated can be right clicked, the Geometry Update feature is the second in the appearing list.
After the sun shield geometry has been updated. The simulation can be re-computed, and the absorbed power can be compared:
From the newly generated Direct Simulation Report, the absorbed power on the sensor is now given at 0.00206268 Watt . Which is a reduction of the absorbed power of 20%. Looking at the Spectral Map of the sensor plane, which is here given as a colorimetric output (in order to see the true color aspect of the stray light), it is visible that most of the stray light is still detected into upper part of the sensor.
Given this and taking into consideration any other potential mechanical design enhancements to further reduce stray light. The next steps could be:
- Using the Speos Sequence Filtering to identify the most critical stray light paths.
- Identify and adjusting the most critical mechanical reflection surfaces inside the housing with a 3D Irradiance sensor.
- Adding baffle rings to block specific critical stray light paths.
Important Model Settings
Description of important objects and settings used in this model
Meshing
The optical components which are brought into Speos via the Optical Design Exchange need be checked in regards to the meshing. A finer mesh gives better results, but also requires a longer simulation time. So meshing is also a trade-off between accuracy and speed. It therefore makes sense to give the optical components a finer mesh than the mechanical ones. These are the meshing settings used for this example:
As the mechanical components are all black anodized, the default meshing can be applied there.
Source Parameters
In order to simulate the sun light, the following source parameters are chosen in this example:
Please note that Stray Light can also originate from other sources.
Taking the Model Further
Information and tips for users that want to further customize the model
There are three main takeaways which are applicable onto every optical design workflow beyond this example application
Optical Design Exchange
The optical design process on the OpticStudio side and the stray light analysis and optomechanical design process in Speos can be combined by using the Optical Design Exchange. By combining the analysis and design tools of both OpticStudio and Speos, the user can tap into a vaster range of tools, which ultimately leads to less physical prototyping and reduces time-to-market.
Optomechanical Assemblage
The connectivity of Speos with all the common CAD Environments and the possibilities to import native geometry directly via the interface allows the user to work with both optics and mechanics within one software and so a sophisticated optomechanical design process, in which the optical performance can constantly be verified, is guaranteed.
Geometry Update
At the heart of the optomechanical connection between Speos and the CAD Environment lays the Geometry Update tool. This allows the user to optimize the shape of the mechanical components and directly replace them. The new geometry inherits all the properties, so a optical analysis can re-run immediately.
Additional Resources
Additional documentation, examples and training material
Ansys Learning Hub Courses
- Ansys Speos Photometric Analysis Advanced (Materials ONLY) - Ansys Learning Hub
- Ansys Speos Getting Started (Materials ONLY) - Ansys Learning Hub
- Ansys Zemax Optical System Design - Ansys Learning Hub
Stray Light Analysis directly in OpticStudio
- Introduction to stray light analysis - Part 1 – Knowledgebase (zemax.com)
- Ansys Zemax Illumination and Stray Light - Ansys Learning Hub
It is important to note that, if a sophisticated Stray Light Analysis is needed which includes mechanical components Ansys recommends the optical design in OpticStudio and the Stray Light Analysis in Speos, connecting the two with the Optical Design Exchange
Data:
- Mechanics
- Speos
- Zemax
Support CAD software and format :
Native CAD Formats:
- SolidWorks (*.sldprt, *.sldasm)
- CATIA V5 (*.CATPart, *.CATProduct)
- NX (Unigraphics) (*.prt)
- Creo (Pro/ENGINEER) (*.prt, *.asm)
- Autodesk Inventor (*.ipt, *.iam)