In this example we’ll show how to design and analyze a Head-up display using the Ansys Optical solution. First, Ansys OpticStudio is used to design and optimize the system for high-quality optical performance. Once this stage is complete, detailed analysis and validation is performed with Ansys Speos where the HUD Optical Analysis (HOA) feature validates system performance against customized, real-world metrics. Finally, Speos is used to visualize what a driver would see when the designed HUD is integrated into a realistic environment.
Overview
Understand the simulation workflow and key results
Head-up displays are used in cars or aircraft to provide visual information to the drivers in their field of view. It consists of a display and an optical system that creates a virtual image for the driver. The optical system and display are placed under the dashboard.
Step 1: HUD definition in OpticStudio
The first step is to define the system in OpticStudio. The specifications include the virtual image distance, the field of view, the packaging space, the windshield definition, the eyebox and the Picture Generation Unit (PGU). Once the system is defined, we can optimize the mirrors using OpticStudio optimization tools and check the performances.
Step 2: Design export from OpticStudio to Speos
The final design can then be exported to Speos. Speos contains a useful HUD Design and Analysis add-on available for Premium or Enterprise license, which allows to quantify the quality of the virtual image of automotive head-up displays. This step explains how to prepare the file, export it to CAD and check the accuracy of the CAD export.
Step 3: Speos Simulation using HOA
The analysis step happens in Speos. Once the CAD model is imported into Speos, the HOA can be run. The set-up includes defining the eyebox, the target image, the windshield, the mirrors, the PGU. For each item, the user enters settings that can be read from OpticStudio and select the relevant objects.
Once the set-up is done, the HOA can be run, and a full report is provided.
Step 4: Visualization of the HUD System
Speos also allows to visualize the HUD system for different eyebox positions. This simulation shows the virtual image as seen from the driver. The visualization could include the cockpit geometry, the surrounding environment, and the weather. It shows the ghost image as in our example, the windshield has no wedge angle.
Run and Results
Instructions for running the model and discussion of key results
Step 1: HUD design in OpticStudio
As a first step, we design the HUD. In this example, the HUD is made of a freeform mirror (which is going to be optimized) and a flat mirror . The driver looks at the road through the windshield. Some information like the speed of the car is displayed on the PGU. The light from the PGU is reflected by the two mirrors and enters the driver’s eyes. The driver sees a virtual image of the speed on the road.
In OpticStudio, the design starts with a backward model, i.e. from the virtual image to the PGU (LCD display). Starting the simulation from the virtual image seen by the driver is convenient as the STOP surface is placed at the front of the system where the eye box is located. The STOP surface in OpticStudio is the object space entrance pupil diameter. It defines the bundle of rays that goes into an optical system. Since there is no optics in front of the STOP, the entrance pupil is the STOP itself. The eyebox specification can be directly set to the STOP surface.
A rectangular aperture is placed on the STOP surface to describe the eye box. The field points represent the virtual image. The distance between the STOP surface and the windshield gives the eye position. The windshield is defined here by an Extended Polynomial Surface. The mirrors are already set at their final location.
The windshield shape adds aberration to the light emitted by the PGU and optimizing the freeform mirror can partly correct this. A merit function is built to image all the field points (smallest RMS spot radius). It also contains additional constraints like the magnification and distortion.
The freeform mirror is modelled by a Zernike Standard sag surface.
- Open the Zemax model that contains the initial setup (HUD_Step1_MF_before_optim.zar).
- Optimize the freeform mirror by running the local optimizer (under Optimize…Optimize).
- Set the coefficients Z4, Z5 and Z6 of the freeform mirror as variables and run the local optimizer (under Optimize…Optimize).
- Set the coefficients Z7, Z8, Z9, Z10 and Z11 of the freeform mirror as variables and run the local optimizer (under Optimize…Optimize). Then run the global Hammer optimizer for one minute (under Optimize…Hammer Current).
Step 2: Design export from OpticStudio to Speos
The design can be exported as a CAD file and then imported into Speos. To simplify the import of the design in Speos, a rectangular aperture is added at the object to describe the virtual image. A rectangular aperture is also added at the PGU to describe the extent of the display.
As the CAD export may mean a loss of accuracy, it is recommended to check the results between the built-in model (the model that contains an analytical description of the surfaces) and the CAD model. If no difference is found, then it gives a good confidence in the CAD description. Two configurations can be used in OpticStudio for the evaluation.
- Open the Zemax model that contains the initial setup (HUD_Step1_MF_after_optim_apertures.zar).
- Export the design to a STEP file. To make all surfaces available in Speos, select “Export Dummy Surfaces” with a Dummy Thickness of 1.
Step 3: Speos Simulation using HOA (Head-up display analysis)
-
Import the STEP file into Speos. To display .stp files, select “All Supported Files (HUD_Step1_start.stp).
For easier navigation, sort geometries in structure tree by names from “A to Z”. - Save the new file as HUD_Step1_start.scdoc
Reference axis system
HOA needs a reference axis system for both the eyebox and the PGU.
- In the 3D view select the back face of the eyebox (surface 0).
- From the Design tab, create an axis system. Use the Move feature to align the axis system with the orientation of the global axis system (Tip: double click on the blue and green arrows will rotate the axis system by 90deg).
- Rename the axis system “EB center”
- In the 3D view select the front face of the PGU (surface 12).
- From the Design tab, create an axis system. Use the Move feature to align the axis system with the PGU orientation (Tip: click on the red arrow then on Orient to Object and then select the PGU horizontal axis)
- Rename the axis system “PGU”
Once this is done, the HOA can be run. The HOA is an intuitive tool where each item of the HOA must be defined to run the analysis.
Vehicle axes
The first step is to define the axes for the HOA. In the OpticStudio design, Z Axis is the Vehicle Direction and Y Axis is the Top Direction.
- In the Light Simulation tab, click System and click HUD Optical Analysis.
- In the Simulation tree, set Vehicle direction as Z Axis and Top direction as Y axis system (In Properties, check Visualization per eyebox Sample and Visualization of Optical are set to True).
Then the set-up includes the eyebox, the Target Image, the Windshield, the Mirrors, the PGU. For each item, the user selects the objects and then enters settings that can be read from OpticStudio.
Eyebox
- In the HOA panel, select eyebox.
- In the 3D view, click eyebox.
- Select the eyebox center axis system.
- Fill the properties in the HOA panel.
Target Image
- In the Simulation tree, select Target Image.
- Fill the properties in the HOA panel.
Windshield
- In the Simulation tree, select Windshield.
- In the 3D view, select the windshield inner surface (mirror 3) and then select the windshield outer surface (mirror 3). The outer surface is only needed to compute the ghost image.
- Fill the properties in the HOA panel.
Mirrors
In this HUD design, the Fold mirror has two ray interactions. Light goes from the PGU to the Fold mirror, to the Freeform mirror, then back to the Fold mirror, to the Windshield and then the eyebox.
- In the Simulation tree, select Mirrors.
-
In the 3D view, click
and select (while pressing ctrl. key) Fold mirror (mirror 6) Freeform mirror (mirror8) and the other Fold mirror (mirror10).
Tip: mirror 6 and mirror 10 have tangent surfaces (the mouse wheel can be used to select through geometries). - Fill the properties in the HOA panel. Select the mirrors from the Windshield to the Picture Generation Unit (PGU) in the List of mirrors.
PGU
- In the Simulation tree, select PGU.
-
Fill the properties in the HOA panel.
Note: For higher precision, increase the PGU sampling (9x5 or higher). This will affect the computation time.
Report settings
The HOA is set up. Let us select the outputs.
One interesting analysis that can be run is the warping of the PGU. It is how the image displayed by the PGU is distorted when viewed by the driver.
- In the Simulation tree, select Warping.
- Fill the properties in the HOA panel.
- In the Image box > File, load Zemax OpticStudio PGU.png.
The Build & Export warping mode will take as input a non-distorted image and generate a pre-distorted image that can be applied on the PGU to compensate the distortion introduced by the system.
Other reports can be run. Just select them in the Simulation tree under Report.
HOA Results
The HOA is now ready to be run.
- In the Simulation tree, select the HOA feature and rename it START.
- Click on Compute to run the simulation.
3D View and report
The virtual image as well as other metrics can be shown in the 3D view. The detailed results are available in the .html report.
- Observe the virtual image and other metrics in the 3D view.
- Open the .html report to see the detailed results.
Ghost Image
The ghost optical path and the ghost image have been calculated.
- Observe the Ghost in the 3D view.
- Open the report to see Ghost test results.
Warping and virtual image
The results can be found in the Speos output files folder or under the HOA feature. The PGU shows the warped image on the 3D view.
- Observe PGU. The warping has been applied.
- Observe the best focus image from the driver’s point of view (Click Plan view from EB center axis system). Increase the Zoom factor to check the best focus spot.
- Open the warped image and original image.
- Open the warping file.
Optical volume
The optical volume can be displayed on the 3D view.
- In the HOA panel, check Optical Volume.
- In the 3D view, check that the optical volume is within the mirror size and the PGU size.
Dynamic distortion
- In the HOA panel, in the Visualization group, set the eyebox sample to True. The Vision mode allows to switch between left right or both eyes.
- Change the Horizontal Sample and Vertical Sample to observe dynamic distortion in 3D view from different eyebox positions.
Step 4: Visualization of the HUD System
Speos can help visualize what different drivers (so different eyebox positions) would see through the HUD system. For that step, Speos requires the windshield and the two mirrors of the HUD to have a material.
Create Materials
To run a visualization, the windshield and mirrors need a material.
- Create a material named “Glas”.
- Set the Volume properties type to Optic.
- Set the Surface properties type to Optical Polished.
- Apply that material to the windshield.
- Create a material named “Mirror”.
- Set the Volume properties type to Opaque.
- Set the Surface properties type to Mirror.
- Apply that material to the mirrors.
Adding Presets
A Preset is an XML file *.preset that defines the configuration of a given Speos object type (or only for a subset of its attributes). Presets allow to speed up the creation of Speos objects and maintain the coherence and continuity along different projects.
-
From the attachments, copy and paste the following preset files in this folder : “C:\ProgramData\Ansys\v221\Optical Products\Presets”
- Display_HUD.preset
- Radiance_HUD.preset
- Observer_HUD_stereo.preset
- Visualization HUD.preset
Create Display Source
- Under the Light Simulation tab, in the “Sources” section, click Display. Press shift while clicking on Display to show Display HUD. Click Display HUD.
- Position the Display_HUD source. Make sure the blue arrow (z-Axis) is targeting the fold mirror)
Create a Radiance Sensor
- Under the Light Simulation tab, in the “Sensors” section, click Radiance. Press shift while clicking on Radiance to show Radiance_HUD. Click Radiance_HUD.
- Position the Radiance_HUD sensor.
Create an Observer Sensor
- Under the Light Simulation tab, in the “Sensors” section, click VR and click Observer. Press shift while clicking on Observer to show Observer_HUD_stereo. Click Observer_HUD_stereo.
- Position the Observer_HUD_stereo sensor.
Run Simulation
- Under the Light Simulation tab, in the “Simulation” section, click Inverse. Press shift while clicking on Inverse to show Visualization HUD. Click Visualization HUD.
- Add geometries, source and sensors to the simulation.
- Fill the properties as shown in the images.
- Run the simulation.
Analyze Results
To view the virtual image seen from the EB center position:
- Open “Visualization HUD.1.Radiance_HUD.1.xmp”.
The result shows a ghost image as the windshield has no wedge angle.
To review the virtual image from different eyebox positions:
- Open “Visualization HUD.1.Observer_HUD_stereo.1.speos360”.
- Use the arrows keys on your keyboard to change the position. As stereo is enabled you can change between left and right eye.
Important Model Settings
Description of important objects and settings used in this model
Windshield
In OpticStudio, the windshield is described as an Extended Polynomial Surface.
HUD optimization
The optimization in OpticStudio is done with the full eyebox. Only the freeform mirror shape is optimized. All the elements are already positioned and the positions of the elements are not set as variables during the optimization.
Meshing
In Speos, for the visualization of the HUD in Step 4, the objects are meshed. The screenshot below gives the meshing settings:
Meshing settings are critical for getting correct simulation results. They define the quality of geometries that will be simulated. A finer mesh gives better results but also requires longer simulation time. Rough mesh can lead to poor results, especially for precise optical components.
Importing CAD
In this example, the design from OpticStudio is exported as a STEP and then imported into SPEOS. As the HUD is an imaging system, the geometries were converted to Heavyweight. It means that the geometries are loaded with a high level of details.
Simulation time
For reference, here are the simulation times we had when running these simulations. The simulation times very much depend on the computer used. The optimization in OpticStudio took less than a couple of minutes. Running the HOA in Speos took 12mins. Running the visualization in Speos using GPU took 1 min and 30 s.
HOA Plugin
This example uses the default Ansys plugin to compute the HOA metrics.
Taking the Model Further
Information and tips for users that want to further customize the model
Different HUD designs
This example models a HUD made of a fold plane mirror and a freeform mirror. Other designs include different number of mirrors that can be all be freeform. The freeform mirror here uses a Zernike Standard Sag surface, but freeform mirrors can be described by other polynomials like the Extended Polynomial surface, Biconic Zernike surfaces, Q-Type Freeform surfaces, ….
HUD can also be made with holographic optical elements. OpticStudio provides different methods to simulate holograms like hologram lenses, Binary 2 lenses or diffraction grating objects.
Plugin customization
The HOA plugin can be customized using the API to compute metrics based on other specifications.
Additional Resources
Additional documentation, examples, and training material
Zemax Resources
- Which tools to use when working on a Head-up-Display?
- Head-up Display: from OpticStudio to Speos
- Free tutorial: Imaging System Fundamentals
- Optimization Sequential
Speos Resources
- Ansys Learning Hub HOA Plugin Customization
- HOA Plugin API and Template
- Ansys Speos HUD Optical Analysis