In this example, we will use Speos and optiSLang to analyze the robustness of a prismatic light guide and quantify the failure rate due to production tolerances in an automated way.
We will understand which tolerances lead to regulation fails for the automotive Day-Time-Running Lights and which tolerances must be improved to increase the optical performance. Additionally, we will evaluate the scattering of the homogeneity (RMS-contrast) and the lit appearance (average luminance) to see what the worst design looks like due to tolerances.
Notes: Software Prerequisites:
To be able to use this example, the following tools and assets need to be installed on your computer:
- Ansys Speos 2022 R2 or later
- Ansys optiSLang 2022 R2 or later
- optiSLang Speos Integration 22 R2.1 (Installer “optiSLang_Speos_22R2.1.exe” located in “.\optiSLang_project_with_reference\”.
Overview
In the automotive lighting application, daytime running lights are used to create a unique lighting signature. These lightguides are nearly on all the time and need to comply with high homogeneity standards and the regulation posed by the government. To perform this robustness analysis, we use a design created with Ansys Speos Optical Part Design. Ansys optiSLang will be used to drive the scattering parameter change and subsequently check the robustness of the design against the production tolerances. Tolerances on the position of the LED, energy of the light source, as well as the deviation of the trimming ratios and milling are considered.
Step 1: Ansys Speos Model
Demonstrate Speos lightguide simulation containing a colorimetric radiance map and an Intensity map with a regulation check.
Step 2: optiSLang Robustness Analysis
Demonstrate the robustness evaluation capabilities by analyzing the initial (best) design regarding production tolerances and quantifying the failure rate (probability of failure) as a criterion for robustness.
Run and Results
Step 1: Run Speos best design model
-
Open the Ansys Speos model Headlamp_LightGuide_BestDesign.scdocx.
(located “.\optiSLang_project_with_reference\01_reference\”). - Perform a local compute of the direct simulation “Lightguide”.
The two results, intensity map and radiance map, are used to measure the optical performance in terms of regulation and homogeneity.
The grid view of the intensity map highlights the
regulation
compliance
Each of the boxes represents a measurement point of intensity specified by the regulation. The center value represents the simulation result, the bottom left represents the minimum limit to pass, the top left value is the maximum limit to pass the regulation, and the right side will represent personally set safety margins. If a regulation fails, it will be highlighted in red. If the safety margin is not met, it will be highlighted in yellow. If the regulation is passed, it is highlighted in green.
In the radiance map, the measurements for the homogeneity performance are defined. The measurements are based on an 18-point polyline. The radiance is evaluated along the line. This will be used to measure the average radiance and RMS contrast.
These are the outputs that will be used for the robustness analysis. The goal is to evaluate the scattering of the RMS contrast and the average of the polyline and the related compliance with the ECE regulation.
The best design (initial design) shows an RMS contrast of 0.116 and an average luminance of 171 kcd/m²:
|
|
Step 2: optiSLang Robustness Analysis
- Open LG_optimization_AnsysSPEOS.opf (located in “.\optiSLang_project_with_reference\”) and click “relocate files automatically” when optiSLang asks.
- Double-click on the “Robustness”-system to see the defined scattering parameter, sampling method, and criteria.
- To review the results of the robustness analysis, right-click on the “MOP” node, which is connected to the system, and select 'show Postprocessing'. The file already contains the results of the robustness analysis.
-
Optional: to regenerate the picture you can rerun the study. To do this, right-click on “Robustness”-system and select “Start from here”.
HINT: The step-by-step tutorial shows how to create the automated workflow (solver chain) and how to set up the sensitivity analysis. (The tutorial can be found in the download folder: “.\optiSLang_Prismatic_Light_Guide_2022R2_Robustness.pdf”).
The “Robustness”-system shows the necessary solver chain to perform the lightguide analysis and is used to run the robustness analysis in order to identify important tolerances and to evaluate the results statistically.
The robustness analysis is based on a previous lightguide optimization.
The system is defined to include pictures and to keep the result files of each simulation. Due to the size, these pictures and result files are not delivered with this example.
Postprocessing 1: Identify and understand important tolerance
The COP-Matrix in the optiSLang postprocessing shows us which of the considered tolerances have an impact on the optical performance and the single regulations. With this, we can answer the question
“Which tolerance must be improved to increase the robustness of the design?”
The shift of the LED in y-direction (“LED_delta_y”) and the energy of the LED (“Flux”) have the strongest influence on the average as well as on the regulations. The RMS contrast depends on the production-based deviation of the trimming ratios and the milling value.
The Metamodel of Optimal Prognosis (MOP) approximates the response as a function of all important input parameters. By clicking on one of the “Total” updates, the 3d Response surface is plotted. This plot is the representation of the metamodel based on the two main contributors and the remaining ones are set to a fixed value. By using the sliders (see picture below) you can see the influence of the other dimensions.
Based on the metamodels we can understand where (in which range of the tolerances) the regulations are not fulfilled, or where the optical performance is the worst.
|
|
|
Green
: Design is feasible
Magenta : Design is not feasible:
|
Hint: The colored points were not saved in the provided data. To color the different designs, please view the section "Taking the model further."
Postprocessing 2: Get the probability of failure
Furthermore, the robustness analysis shows the statistical distribution of the device response due to the manufacturing tolerances (scattering of the output parameters). With this, we answer questions like “How robust is the light guide?” What percentage of fabricated devices will not meet the required design goal or will not fulfill the regulations?”
-
In the optiSLang postprocessing, click on “Limits” under “Edit” in the menu bar.
- Add “Safety limit” for specifications
-
Add “Failure limits” for national regulations and optical performance (e.g. average luminance)
-
Add “Histogram”-Plot to the postprocessing scenery and choose one of the outputs (e.g. “Average”)
How to do this is shown in the step-by-step tutorial. (The tutorial can be found in the download folder: “.\optiSLang_Prismatic_Light_Guide_2022R2_Robustness.pdf”). -
Check distribution and statistical data in the histogram plot for the average:
- The probability that the average is smaller than 160kcd/m² is 2.0%. This represents a sigma level of 2.61.
-
In combination with the Metamodel for the average, we can see that we can
improve the robustness of the lightguide by tuning the tolerances of the LED energy and the LED y-position.
E.g. if it can be ensured that the maximal y-position of the LED is smaller than 0.5 mm, then we get a robust design regarding the average luminance
-
Check statistical data for all other output parameters
Summary robustness analysis
Based on the robustness analysis we understand how robust the design is and which possibilities we have to improve the robustness of the design:
probability of failure |
Possibility to get a more robust design |
|
national regulation |
0 % (robust) |
- |
specifications |
6,0 % |
Tune mainly the flux tolerances
|
Average luminance |
2,0 % |
Tune flux and LED y-position tolerances
|
RMS contrast |
17,2 % |
Tune Trimming ratio and milling value tolerances
|
Furthermore, we can see how the worst design looks like under consideration of the tolerances:
worst design regarding RMS contrast due to tolerances |
worst design regarding average luminance
|
Nominal Design
|
|
RMS contrast |
0.385 |
0.152 |
0.116 |
Average luminance [kcd/m²] |
247 > 165 (fulfilled) |
132 > 165 (not fulfilled) |
171 > 165 (fulfilled) |
Number of not fulfilled regulations |
0/42 (fulfilled) |
||
Result Picture |
|
|
|
Section View |
|
|
|
Important model settings
Speos model settings
Lightguide meshing
A precise meshing of the lightguide is extremely important. The prisms can get extremely small. If this is not accounted for in the meshing, no light will be extracted from the lightguide. Use Local Meshing on important optical geometries.
Maximum number of surface interaction
A lightguide relies on Total Internal Reflection to guide the light, resulting in a lot of surface interactions. The default value of 100 is often too low.
XML Template
The XML template in the sensor definition is used to export the measurements to make them usable in optiSLang
Batch automation
If you are facing issues with the script part, it might be helpful to either enable the user interface or manually execute the script to understand the error. There are several parameters for the automation:
Option |
|
/DefaultOpenDirectory |
Specifies a default file open directory. |
/DefaultSaveDirectory |
Specifies a default file save directory. |
/DefaultUserSettingsFile |
Specifies the full path of a default user settings file. |
/ExitAfterScript |
Specifies if the application should exit when the script (defined by the RunScript options) is finished. |
/Headless |
Boolean value indicating whether to run the application in batch mode, without UI. |
/p |
Override the Primary SpaceClaim license and Alternate license preferences and specify a different license on application startup. See License options for details on the License preference options available. Example: SpaceClaim.exe /p=ansys |
/RunScript |
Specifies the fully qualified pathname of the script file to run. |
/ScriptAPI |
Specifies the Script API when used with the RunScript option. |
/ScriptArgs |
Specifies the script arguments as a comma separated list (for example, ScriptArgs="arg1, arg2, arg3"). |
/ScriptAsync |
Boolean value indicating whether to run the script asynchronously. |
/ScriptOutput |
Specifies the fully qualified pathname of the script output file. |
/Splash |
Boolean value indicating whether to show the splash screen or not. The default value is True. |
/UseCurrentDirectory |
Use the current directory as the default file open / save directory. |
/Welcome |
Boolean value to indicate whether to open an Empty design or not. The default value is True |
/WindowLocation |
Sets the window location. For example, /WindowLocation=5,5 |
/WindowMaximized |
Sets the window to be maximized, if true. |
/WindowSize |
Sets the window size. For example, /WindowSize=1000,800 |
optiSLang
Solver settings
Double-click on the “SpeosCore” node to change the settings:
- Number of used cores
- Activate solve on GPU
Double-click on the “Geometry_creation” node to change the degree of parallel design creation (under additional options):
- Maximum in parallel
Robustness settings
Double-click on the “Robustness” – system:
- to change the scattering parameter properties in the “Parameter” tab
- to change values for the reference design in the “Parameter” tab
- to change the number of samples in the “Dynamic sampling” tab
-
to view the results in the “result designs” tab.
Updating the model with your parameter
Lightguide parameters:
By adjusting the script with other lightguide parameters, you can adjust any parameter of the lightguide. Add the necessary lines in the script. You can use lines 33- 45 as an example. You can also use the automation listing or Speos recording feature to understand the API better.
LG_Design.EndAngleType = "Control points"
#LG_Design.EndAngleConfigurations[0].Position = 0 # fixed
LG_Design.EndAngleConfigurations[0].Value = 10
LG_Design.EndAngleConfigurations[1].Position = 5
LG_Design.EndAngleConfigurations[1].Value = 10
LG_Design.EndAngleConfigurations[2].Position = 10
LG_Design.EndAngleConfigurations[2].Value = 12
LG_Design.EndAngleConfigurations[3].Position = 30
LG_Design.EndAngleConfigurations[3].Value = 14
LG_Design.EndAngleConfigurations[4].Position = 65
LG_Design.EndAngleConfigurations[4].Value = 16
#LG_Design.EndAngleConfigurations[5].Position = 100 # fixed
LG_Design.EndAngleConfigurations[5].Value = 18
Add additional parameters to the optiSLang model:
The text input node is an optiSLang node to adjust text files and place the adjusted version within the design directory for later use. You can find a detailed step-by-step guide in the Ansys Learning Hub or in the reference folder for this article's data.
Bring your own part
The script opens a specific file that you can replace by adjusting the name in line 81. Please note that you should adjust lines 66 and 71, which is the body name of the LED, to vary the position of the LED.
# Open File
Ansys_SPEOS_file=os.path.join(os.getcwd(),"Headlamp_LightGuide.scdocx")
importOptions = ImportOptions.Create()
DocumentOpen.Execute(Ansys_SPEOS_file, importOptions)
# Position LED
LED_delta_x = 0.0 # mm
LED_delta_y = 0.0 # mm
LED_delta_z = 0.0 # mm
LED_body = BodySelection.CreateByNames('LED1')
move_LED(LED_body,LED_delta_x,LED_delta_y,LED_delta_z) # Position LED
Add new outputs to the simulation report
To add new outputs, it is needed to add new measurements to the XML-Templates selected in the simulation setup. The easiest way to do this is by replacing the existing XML-Templates from the input files or reselecting it in the sensor definition. XML-Templates are created by creating a measurement on the XMP map and then exporting this measurement to an XML-Template.
By editing the Speos reader node the outputs will be added to the optiSLang project. You can find a detailed step-by-step guide in the Ansys Learning Hub or in the reference folder for this article's data.
Taking the model further
To increase the understanding on “how robust is the light guide design,” the activation of the result images in the optiSLang postprocessing, as well as the “Parallel Coordinates Plot” (PCP), can be used. With the PCP, it is possible to visualize the dependencies between the input and output parameters, as well as to identify the ranges of the scattering parameters in which the light guide is robust. Furthermore, a coloring of a design set helps to identify the regions where the robustness criteria (limits) are fulfilled.
How to do this is shown in the step-by-step tutorial of light guide optimization
(Exterior Lightguide Optimization – Ansys Optics)
.
Additional resources
Related KB pages:
Related Ansys Innovation Courses