Designing Cell phone Camera Lenses Part 3: STOP analysis by using STAR module and ZOS-API

This article is part of a 3-part series that will discuss the challenge of smartphone lens modules, from the conception and design to the manufacturing and analysis of structural deformation. This article is part three of the three-part series. It covers the automated structural, thermal, optical performance (STOP) analysis for the smartphone lens with the use of the STAR technology, available in Ansys Zemax OpticStudio Enterprise. The process of FEA data importing, and fitting are automated by using ZOS-API (user extension and user analysis are provided in this article). Optical performance analysis of thermally-induced structural deformation of the cellphone lens under different thermal conditions with not only the built-in analyses feature but also extend simulation by using ZOS-API user analysis.

Designing Cell phone Camera Lenses Part 1: Optics

Designing Cell phone Camera Lenses Part 2: Optomechanical Packaging

Authored By Julia Zhang, Esteban Carbajal


Article attachments

Tools needed

  • Ansys Zemax OpticStudio Enterprise
    - Or -
    Legacy Zemax OpticStudio Professional or Premium AND STAR Module license
  • FEA simulation tool (Ansys Mechanical used in this example but you can use any FEA simulation software)
  • Ansys Data Export Extension for Ansys Mechanical Optional


Manufacturing delays and increase in production costs has led to companies searching for ways to maintain their delivery of new products against aggressive timelines. The “build it and break it” design model drives up the cost as prototypes need to be built and tested over several iterations. Accurate multi-physics simulations can help engineering and design teams to predict the performance of their system under various usage situations and simulate the possible conditions to understand the impact on the performance of the system during the design stage. The comprehensive simulation is one of the ways to avoid wasting time and to save costs in the production cycle from the very beginning. Due to the changes of the properties of the material under different temperatures, the physical impact is not only structural but also optical. These effects can be critical and seriously affect the use of the product after mass production.

One of the factors to consider in the design stage of the camera module is whether it performs as per specifications if the cellphone is used in an environment where the temperature differs from room temperature. As the temperature varies the lens material expands and contracts causing the surface shape of the lens to change as well as the refractive index material. This will deviate light rays in a way that the surface shape can no longer be described by the known parametric polynomial and by using the isotropic refractive index across the lens geometry. These variations will affect the final image and can degrade the image quality. MTF values might be lower than the design requirement causing the final image to suffer from loss of contrast and blur.

Optical products include more than just optical lenses, they also have mechanical housing parts, which can significantly affect the performance by changing the position of the lenses and by applying pressure to the lens which is another way that the lens surface can become deformed. Ansys Zemax OpticStudio Enterprise can be used to perform structural and thermal analysis for the cellphone lens optical system. The thermal conditions and mechanical loads can be simulated and the output used to quantify their influence on the cellphone lens system. Interoperability is established by loading simulation results from Ansys Mechanical to Ansys Zemax OpticStudio Enterprise for both static and transient simulations to comprehensively understand the optical performance.

STAR User Extension

To analyze the effect of thermally induced structural deformation, there are 14 structural datasets to assign to the lens surfaces in the system. The OpticStudio user interface can be used to assign each dataset individually.


Figure 1. Load FEA Data tool used to assign FEA datasets to optical surfaces.

With 14 surfaces and 7 time points there are a total of 98 different FEA datasets that need to be assigned to the correct optical surfaces to fully analyze the system. To reduce repetitive clicks and avoid mistakes during the data assignment a user extension through ZOS-API was made to load the data to the current lens system. The user extension can:

  • Recognize the surface number and FEA data type from the name of the dataset text file
  • Apply the dataset to the correct surface automatically
  • Apply datasets from all timepoints automatically

How to use the user extension

  1. Select the appropriate coordinate system that the FEA datasets were saved in.
    • This extension assumes that all the FEA datasets are saved in the same coordinate system
      Figure 2. Coordinate System control in STAR User Extension.
  2. To load FEA dataset text files, click on the Load FEA
  3. In the File Explorer window that appears, select the folder that contains the datasets for the system.
    • The default directory is the same as the location of the current lens file
    • Be sure to verify that the internal text files are in the correct format to avoid loading errors
      Figure 3. Organized FEA datasets saved from Ansys Mechanical using the Export to STAR extension
  4. Optional In the OpticStudio UI, open the STAR Fit Assessment tool to check (and if needed, modify) the fit settings options then click OK.
    • This user extension applies the same fit settings for all adjusted surfaces and for this FEA datatype.
    • The fit parameters and fit results are reported for verification and saved as txt.
    Figure 4. Adjusted fit settings in the Fit Assessment tool.
    image009.png image011.png
    Figure 5. LEFT - Log report for loading and fitting FEA dataset. RMS and PV fit errors area reported for each FEA dataset. RIGHT - Text file output.

Automated transient workflow (multiple timepoints)

Applications that require analysis at different stages or operation modes such as different phases (ground, launch, and orbit), different times (laser off, laser on 0sec, laser on 5sec, laser on 5min, etc.), or different temperatures (0C, 25C, 50C) require teams to work with multiple groups of FEA datasets. Assigning the FEA datasets to the optical surfaces at each stage can be time consuming and error prone. The attached user extension handles the data assignment and adds STAR systems for the current cellphone lens in the background.

To load FEA datasets from multiple timepoints:

  1. Select the appropriate coordinate system that the FEA datasets were saved in.
  2. Next select the types of FEA data to load. In this example, we will use the Structural Only
    • With the user extension, we can load structural data only, thermal data only, or both data easily by one click.
    • When data are assigned for surfaces, they are applied according to the name of that text file, for example, Surface_05_Temperature.txt will be applied for surface5. It is possible to offset the assignment when dummy surfaces or other lens surfaces are added to the Lens Data Editor in the nominal lens file, e.g. if two surfaces added before the all the lens elements, and assignment offset being set as 2, Surface_05_Temperature.txt now will be applied for surface 7.
  3. Click on the Load Multi FEA

    Figure 6. Load Multi FEA button in the STAR User Extension.
  4. In the File Explorer window that appears, select multiple folders of FEA datasets from the various timepoints and click OK.
    • In the background, copies of the original lens system are created and saved with the following naming schema: {original_lens_filename} + ‘sys’{n}.zos (e.g. 710_reoptimized_MTF_materials_QType_sys6.zos)
    • The different OpticStudio systems with FEA datasets will be listed in a table where each row represents a system that was created.
      Figure 7. FEA datasets organized by timesteps.
    • The user extension saves the fit settings for each surface and fit results for FEA datasets to MultiFEAfitResults.txt located in the same directory as the lens design file.
    • The user extension follows the naming schema used in this article. The extension only recognizes the FEA data file with the names:
      • Surface_XX_Temperature
      • Surface_XX_Deformation
      • Surface_XX_Temperature_deformed
    • If the FEA dataset is not in the correct format or inappropriately named, then an error message will be displayed in OpticStudio during the data loading process. Additionally, the PV and RMS fit results will be 0.
      Figure 8. In this example, unsupported surface types have FEA datasets assigned. The reported fit error is 0 whenever there is a problem during the loading or fitting processes.
  5. With the FEA datasets loaded, you can the checkbox in the ActiveFEA column to verify the STAR data or other performance for that specific system quickly.
    Figure 9. ActiveFEA column in STAR User Extension. Double-click the checkbox to quickly change to a different system.
  6. To save progress and return to the process without needing to re-import the FEA datasets, you can click the Save button.
    • The mygrid.bin file will be saved in the C:\Users\...\Documents\Zemax\Configs
    • The Load button will load all data and relevant settings in the extension from the bin file.

System layout image export

Generating system views from the various time points can be useful to understand the changes that a system undergoes throughout the time range. When doing Multi FEA data loading with the ZOS-API extension, an ZPL is automatically generated for the purpose of saving the analysis graphic window as image files for different STAR systems. The ZPL macro is saved to C:\Users\...\Documents\Zemax\Macros\ZPL Image Export.zpl. In this example, we’ll focus on the STAR System Viewer to search for any obvious errors that could stem from problematic FEA datasets.

  1. Open any STAR system in current file path, the system viewer feature only applies for lens file that have FEA loaded.  
  2. In the OpticStudio UI, close all graphic and analysis windows (i.e. layout plots, WFE maps, etc.)
  3. In the Command Ribbon, click STAR tab > System Viewer
  4. In the Command Ribbon, click Programming tab > Macro List >ZPL Image Export.zpl
  5. After the running of the macro, image files are saved in output directory.
    • The macro will export images for all systems listed in the table to C:\TEMP
      image025.png image027.png
    • The output directory and other information might be modified according to personal preference. image029.gif

This method will be used to generate a comparison report of other analyses results for the STAR simulation. 

By using the above ZOS-API features, we can have a quick understanding on the quality of the FEA data set and give the feedback to Mechanical engineer for practical setting items check or parameter adjustments when doing FEA analysis.

STAR User Analysis

Check fit results for all surface in one system

Once the FEA datasets are assigned with the user extension, a separate user analysis can load and display a summary of results for all the systems. This provides a more efficient workflow when dealing multiple groups of datasets from different timepoints.

  1. To analyze the results from the multiple timepoints, in the Programming tab of the OpticStudio UI click User Analyses > STARUSER_ANALYSIS
  2. In the STAR User Analysis, click the Settings dropdown button.
    Figure 10. STAR User Analysis window appears. Click the Settings dropdown menu to bring up the settings window.
  3. To check the fit results for all of the optical surfaces in one system, click Check Fit Error / User Plot
    • The right-side panel will change
  4. Change the following settings, then click OK:
    • Data: Structural
    • STAR system: 1
    • Fit error: RMS + PV
      Figure 11. Fit assessment panel enables you to display the fit errors on all optical surfaces in the system at one time.
      Figure 12. RMS & PV Fit error for each optical surface at timepoint 1. The fit settings for each surface are displayed in the lefthand corner.

Display RMS fit error for all surfaces and all timepoints

  1. To display the fit error all optical surfaces in all timepoints, click Check Fit Error / User Plot
    • The right-side panel will change
  2. Change the following settings, then click OK:
    • Data: Structural
    • STAR system: All
    • Fit error: RMS
      Figure 13. Fit assessment for all surfaces in all systems.
  3. Click Update in the STAR User Analysis window and the plot will appear:
    Figure 14. RMS fit error for each optical surface. Each line represents a separate timepoint.
    The effect from the current fit settings on the fit error results can be visualized in a plot for all the STAR systems. For example, we can change the fit settings manually in OpticStudio UI and redo the data loading for fit error comparison.
  4. In the STAR tab of the OpticStudio UI, Fit Assessment
  5. Change the fit settings of surfaces 13 and 14 to:
    • Grid 1: 3
    • Grid 2: 3
    • Max Level: 9
  6. Click OK
    Figure 15. Updated RMS fit error for all optical surfaces in each system. Note the Y-axis has change from figure 14.

Assess transient performance with STAR User Analysis

With the FEA datasets loaded and their respective fits have been performed. We can now use the same techniques to continue the analysis of the optical performance. The seven STAR systems represent different temperatures:  -40℃, 60℃, 65℃, 70℃, 75℃, 80℃, 85℃, respectively. The following results indicate the quick performance degradation in different temperatures. 

image042.png image044.gif

Figure 16. Comparison of spot diagram analysis between original and STAR systems. Left image is the original system performance. Right images show the performance for each temperature point. image045.gif
Figure 17. RMS radius for maximum field. Note that the RMS is 9.998 μm for the nominal system, however, the radius for that field has increased almost 8 times larger than the original size.

The contrast of the lens system at various thermal condition can be quantified by monitoring the results from the FFT MTF analysis. The performance of the nominal system quickly degrades as the temperature changes from room temperature. At temperatures below and above room temperature the performance is below specification.

image046.png image048.gif

Figure 18. Comparison of FFT MTF analysis. Left is the original system performance. Right displays the FFT MTF for the different subsystems at each temperature point.

The FFT Through Focus MTF can also be used to gain more insight into the system performance. For the nominal system, MTF value is roughly above 0.2 at a shift value of +/-0.015mm relative to the image plane for a frequency of 200cycles/mm. However, the performance peak shifts as the temperature changes. This can lead to blurry photos under the various thermal conditions.

image049.png image051.gif

Figure 19. Comparison of FFT Through Focus MTF. Left is the original system performance. Right demonstrates subsystems with FEA datasets applied.

Another MTF drop can be observed in the MTF vs. Field analysis. While the original system’s performance was designed to operate with a field of view of ~45°, as the temperature increases, the MTF falls below 0.2 around 38°.

image052.png image054.gif

Figure 20. MTF vs. Field analysis. Original system was designed to have a FOV of ~45°. Left image is original system performance. Right image is the system performance at various temperature points. 

STOP analysis for all systems

So far, the ZOS-API has been used to assess fitting errors and to deliver images of different analyses. In this next section, the STAR User Analysis will be used to generate 1D and 2D plots to evaluate different performance metrics and design changes to improve system performance.  

To analyze the performance of the optical system through the temperature range, a user analysis is utilized to plot various performance metrics with merit function operands against temperature. The user analysis can plot:

  1. 1D plot
    • Independent variable:
      • System number (e.g. temperature condition or timestep)
      • Input parameter of a merit operand defined in the MFE
      • or use multi configuration and choose a MCE operand line, the idea here is to make the plot being controlled more generally by an operand

    • There are following combinations for X and Z and they are able to show results under the test.
      Independent X Dependent Z

      Input parameter for the selected operand

      MFE operand line value 

      MCE operand line

      MF value/ MFE operand line value 

      Different lens file with different FEA loaded (different thermal condition) 

      One curve situation

      MF value/ MFE operand line value 

      Different lens file with different FEA loaded (different thermal condition) 

      Multi series

      MFE operand line value 

  2. 2D plot
    • Response/ dependent Z could be
      • Merit function value in MFE
      • Evaluated results for a specific operand defined in the MFE

Use 1D plot to calculate average MTF value for the different STAR systems:

  1. In the Merit function Editor of OpticStudio, insert an operand in a new row.
  2. Change the operand type to MTFA and enter the following values:
    • Samp: 3 (sampling)
    • Wave: 0 (polychromatic)
    • Field: 1 (on-axis field)
    • Freq: 50 (spatial frequency of 50 cycles/mm)
    • Grid: 0 (fast sampling integration method to calculate MTF)
    • Data Type: 0 (return modulation amplitude)
    • Target: 0
    • Weight: 0
  3. In the STAR User Analysis, click the Settings dropdown menu
  4. Change the X Scope setting to STAR system
  5. Select MTFA in the Merit Operand line
  6. Enable the Multi Series checkbox
  7. Enter the following settings
    • Select Par3 in the parameter dropdown
      • For the MTFA operand, Par3 represents the field number
      • Starting value: 1
      • Stop value: 5
      • # steps: 5
      • For the MTFA operand, Par3 represents the field number. These settings culminate into the user analysis changing the field number from 1 to 5 and collecting the average MTF.
  8. After entering the appropriate settings, click OK and then refresh the window.

The graph below is the output of the user analysis. The X-axis shows the STAR subsystems which represent the different temperature environments. The vertical axis is the average MTF from the MTFA operand defined in Step 2. The different colored lines represent the different field points that were defined in Step 7. Additional labels were added to the graph for clarity.

Figure 21. Analysis of MTFA at 50 cycles/mm. X-axis represents the different timepoints. Each color entry represents a different field point defined in the System Explorer. Field 4 shows the poorest performance..

A second graph was generated from the user analysis extension with the spatial frequency set to 100 cycles/mm. From both plots, it is clear that the performance for the 4th field in all STAR subsystems is the worst.
Figure 22. Analysis of MTFA at 100 cycles/mm. X-axis represents the different timepoints. Each color entry represents a different field point defined in the System Explorer. Field 4 shows the poorest performance.

Use 2D plot to simulate design change and improve system performance

In order to gain design insight about changes that could improve the system performance, the User Analysis can create a 2D plot to visualize performance for multiple system configurations. In this user analysis, the X-axis represents the STAR systems and the Y-axis represents the configuration. The analysis will be used to assess the performance of the systems when the distance between the last lens and the image sensor is adjusted.

To create a 2D User Analysis plot:

  1. In the Multi-Configuration Editor (MCE), add a new operand row.
  2. Click the Operand properties dropdown and change the operand type to THIC (thickness)
  3. Select 16 in the Surface dropdown menu
    Figure 23. MCE with THIC operand defined for surface 16. This enables the STAR User Analysis to change the distance between the last optical surface and the image plane thereby simulating the distance between the optics and the sensor.
  4. In the User Analysis window, change the X scope to STAR system
  5. In the Y Category dropdown, select Configuration
  6. Change the following settings:
    1. Select THIC
    2. Start Value: 0.285 (mm)
    3. Stop Value: 0.365 (mm)
    4. # Steps: 10
  7. Merit Operand Line: MTFA
  8. Click OK and refresh the analysis window.
    Figure 24. STAR User Analysis settings to produce 2D plot with MTFA.

Two plots were generated to show the average MTF at 50 cycles/mm and 100 cycles/mm.

image069.png image071.png

Figure 25. 2D plots generated with STAR User Analysis. MTFA is plotted with respect to system number and THIC operand defined in the MCE. Left image is MTFA at 50 cycles/mm. Right image is MTFA at 100 cycles/mm.

From these images, we can predict that better average MTF performance can be achieved by adjusting the distance between the last lens and the sensor to around 0.309mm will yield the best overall performance throughout the entire temperature range.


This article has shown the use of ZOS-API feature to automate the operations in STAR module to help the importing of FEA data sets and generating analysis plots. 

Was this article helpful?
5 out of 6 found this helpful



Please sign in to leave a comment.