In this example, we demonstrate the design and optimization of an eye-tracking optical system. Eye-tracking systems in AR/VR and HMD applications provide a dynamic and immersive experience by adapting the graphics to the user’s center of view by calculating their interpupillary distance. Their potential value makes it critical that eye-tracking systems can be analyzed accurately and optimized efficiently. We will demonstrate the simulation of such an eye-tracking system that utilizes the latest optical technologies of a system with two pancake lenses and a lens with two meta-surfaces. Both these optical components reduce the total mass of the systems compared to previous technologies. As this system contains a combination of nano and macro-scale optical components, both Ansys Zemax OpticStudio and Ansys Lumerical software are used for the simulation.
[[NOTE:]] This application gallery example requires Ansys Zemax Optic Studio versions 2024 R1.00 or newer and Ansys Lumerical FDTD package versions 2023 R2.3 or newer.
Overview
Understand the simulation workflow and key results
Step 1: Phase design in OpticStudio
After optimizing the pancake lens, in the first step OpticStudio is used to design the ideal phase profiles on the two surfaces of the metalens. These are optimized to deliver the best image quality.
Step 2: Meta-atom optimization in Lumerical
Lumerical is used to optimize the meta-atom profiles so the metalens produces a close match to the phase profiles produced in OpticStudio. This is achieved by varying the radii of the individual nano-rods while keeping their height fixed.
Step 3: Import meta-atom map (.h5) back to OpticStudio
In the final step, the meta-atom phase map is imported into OpticStudio where a comparison of the results, using the full metalens simulation, is made with the results from the first step. A range of analyses are used for the comparison including: spot diagram, geometric MTF, image simulation and the optics layout plots. We consider the results fall in with expected error variations.
Run and results
Instructions for running the model and discussion of key results
Step 1: Phase design in OpticStudio
- Open “Pancake_Target_phase.zprj” ZOS project file.
- Observe the optics layout and merit function editor.
- Observe the phase, phase slope tan and phase slope sag diagrams
- Note the coefficients of the binary elements (surface 8 & 9) obtained with the optimization. These coefficients are going to be used to define the phase target when generating the metalenses.
In this initial step the optical system is set with binary phase elements at the position where the metalenses are going to be. The optimization is performed to generate the target phase that will be used for the design of the 2 metalenses.
The optical system is restricted based on the most common specifications of the technological applications it is intended to be used. More specifically, the optimization is targeted for central wavelength of 0.85μm, the eye-box is expected to be of 16 x 32mm dimensions, while the metalens should not be of higher than 2mm diameter and 4 mm length. The two metalens surfaces were built using a user defined DLL file, where the phase of the two meta-surfaces is described based on the following equation:
$$\phi = Order\times\frac{2\pi}{\lambda}\left(\sum_{i=1}^N A_i\ r^i+\sum_{i=1}^N\sum_{j=1}^M\ B_(i,j)\ x^i\ y^j\ \right)$$
The merit function is built using the standard Image quality Spot operands with the addition of the phase slope operands. The rate of phase change for the first meta-surface is restricted only to the tangential orientation and its absolute value should not be higher than 250 mm-1 . While for the second meta-surface the quadratic sum for both tangential and sagittal phase slopes should not exceed the 250 mm-1. This limitation in the slope is important because the phase response that can be obtained with the meta-atom have a limitation due to the finite size of the pillar, and the local periodic approximation that is assumed when computing the RCWA results. In this case, the phase limitation is set to maintain a single phase jump across 10 meta-atoms.
Considering the distortion can be digitally corrected on these systems, it is not studied during the optical design and optimization. Below are the optics layout built in ZOS and the resulting phase and phase slope (Tangential and Sagittal) graphs after optimization.
Step 2: Meta-atom optimization in Lumerical
- Open [[1_analyze_unit_cell.lsf]] with the [[unit_cell.fsp]] file. Note that this sweep is very long because we perform a sweep over height and radius of the meta-atom. It is not necessary to run this part to keep going with this example, the results are displayed in this section and the methodology is explained below.
- Run the first part of the script [[1_analyze_unit_cell.lsf]]. Observe the result to determine the optimal height for the meta-atom.
- Run the second part of the script [[1_analyze_unit_cell.lsf]]. Visualize the results showing the relations between the pillar’s radii and the phase and amplitude response of the meta-atoms.
- Open and run the script [[2_generate_unit_cell_database.lsf]]. This script generates the database of the meta-atoms responses.
The meta-surfaces for the metalens are simulated using Rigorous Coupled-Wave Analysis (RCWA) Lumerical’s solver. The simulated geometry is a nano-rod (with n=2.04) and a substrate (with n=1.45), while the height of the nano-rod is determined by scanning over a range of 0-3 μm. The period of the nano-rods is 0.4 μm for avoiding second order diffractions. Below is an image of the nano-rod built in RCWA:
The height of the meta-atoms should be picked wisely. If the height it too low, the range of meta-atoms radii available will not allow to cover up to \(2\pi\) radian. On the other hand, if the height is picked too high, the slope of phase is steeper and instead of exploiting the full range of radii available the \(2\pi\) phase range will be squeezed within a smaller range, which induce tigher requirement in terms of tolerance for the control of the pillars'radii.
By analyzing the results of the height scan it is determined that the height should be fixed at 1.7357μm. The criterion is for the height to cover a full phase cycle (0-2π) for angle of incidence up to 40°, since it is considered that the angle of incidence for the first and the second meta-surfaces are 36° and 30° respectively.
After fixing the height of the nano-rod a scanning on the radius is performed for both meta-surfaces. The Phase vs. Radius and the Transmission vs. Radius for the meta-surfaces are represented after the simulation on RCWA. Additionally, two .h5 files are exported as meta-atom maps to be used on the next step in ZOS.
The meta-atom sweep is performed for a certain range of incidence angles (set in the RCWA solver properties), and a certain number of possible values for the radii (set in the sweep properties). Interpolation is also performed over theta, phi, and radii to create a database with the desired sampling. In practice, a very high sampling will bring the simulation results to become closer to the perfect result. However, for more realistic results it is recommended to choose a sampling that reflect the manufacturing capabilities. For instance, if the manufacturing tolerance provide the capability to control the pillar’s radii with an accuracy of 1nm, providing a phase sampling higher than that would increase artificially the ray-tracing accuracy. In this example, we provide a sampling of 1 degree in phase, corresponding approximately to 1nm in radius variation.
Note that we use the same meta-atom geometry for both metalenses, but light is coming from the substrate in one case (“forward direction”) and from the air for the other (“backward direction”), hence the 2 separate set of responses.
Step 3: Import meta-atom map (.h5) back to OpticStudio
- Open and run the script [[3_generate_metalens.lsf]]. Toogle the parameter “lens_index” to 1 and 2 to generate the 2 .h5 files that correspond to the metalens data. For each case, we generate 2 files: 1 representing the perfect case, and 1 generated from the target phase and the meta-atom database.
- Copy the .h5 files “metalens_1st” and “metalens_2nd.h5” into the folder Zemax\DLL\Surfaces.
- Open “Pancake_with_metalenses.zprj” file
- Observe and compare the results obtained for the MTF and the spot diagram.
- The simulation of the eye is generated in low quality to avoid long computation. To generate an image of high quality, change the setting of Ray/pixel to 1000. It may take a couple of hours to compute the image.
The optical design of the system is completed when the two .h5 files produced from RCWA for the meta-surfaces are imported into ZOS:
To determine whether the final optical design is successfully concluded, a comparison of the initial “ideal” optical design with this latter one is performed. Below are images of the optics design layout, the spot diagrams, the geometric MTF and an Image simulation:
In the two figures above, we see that the spread of the spot diagram is larger than the ideal case, but still follow the intended design. The ray direction is determined based on the local phase gradient, and it is quite sensitive to noise. In the regions where the phase variation is fast (typically the edges) some of the rays may have more difficulties to be focused, especially if the sampling of the database it sparse.
The MTF is often used to specify the performance of an optical system. In the final image, we see that the image of the eye through the metalenses compare well to the ideal case and that the image quality seems sufficient for an eye-tracking algorithm to detect the pupil.
Updating the Model with Your Parameters
Instructions for updating the model based on your device parameters
- The optimization of the optical system as well as the phase function on Step 1 may be customized to on users’ requirements/preferences
- Different unit cells and parameters may be defined to generate the .h5 files at the final step
Additional Resources
Additional documentation, examples, and training material
- Jens Niegemann, Dan-Nha Huynh, Adam Reid, Han-Hsiang (Michael) Cheng, Erin Elliot, Federico Gomez, and James Pond, “Design and Simulation of Large-Scale Metalenses” in Frontiers in Optics + Laser Science 2023 (FiO, LS), Technical Digest Series (Optica Publishing Group, 2023), paper FTu6D.5. https://doi.org/10.1364/FIO.2023.FTu6D.5
See Also