Achieving uniform light output remains a key challenge in waveguide-based optical systems due to the inherent depletion of guided optical power along the propagation path. To address this challenge, a spatially varying out-coupler design was investigated using a simplified one-dimensional (1D) waveguide model in Zemax OpticStudio. Instead of dividing the out-coupler into multiple grating zones, the spatial variation is implemented within a single grating region, where the grating parameters are defined as functions of position. A dynamic link with Ansys Lumerical is used to compute the local RCWA response at each ray-interaction point, enabling continuous variation of the extraction efficiency along the waveguide.
Overview
Understand the simulation workflow and key results
In this article, we present the design of a waveguide and the optimization of the uniformity output. Both the in-coupler (IC) and out-coupler (OC) are 1D slant gratings. The IC does not present any spatial variation and its model is made using the static link DLL between Ansys Lumerical and Ansys Zemax OpticStudio (see: Lumerical Sub-Wavelength Model plugin: Usage in Zemax OpticStudio – Ansys Optics )
To enhance the uniformity of illumination at the output, the OC grating is designed with a Dynamic link with spatial variation, where variation of the slant angle of the grating is induced along the grating. For more information, see Dynamic workflow between Lumerical RCWA and Zemax OpticStudio – Ansys Optic ).
The waveguide is designed in 3 steps:
Step 1: Grating design in Lumerical
The model of the slant grating is made in Ansys Lumerical and characterized with the RCWA solver. A sweep is performed over the slant angle parameter to generate a database of grating response as a function of the slant parameter.
For more information on the process to export grating data into .lswm format, see: Lumerical Sub-Wavelength Model plugin: Introduction and Data Generation
Step 2: Setting up the waveguide in Zemax OpticStudio
The idea is to design a simple 1D waveguide in Zemax, incorporating both input and output couplers (IC/OC). The primary objective is to utilize the spatial variation feature to optimize the grating parameters in the output coupler to achieve a more uniform intensity distribution at the output.
Step 3: Optimization of Spatial Variation
The objective is to achieve a uniform illumination profile at the output coupler. To accomplish this, the merit function is defined to minimize the standard deviation of the intensity distribution measured on the detector. However, minimizing the standard deviation alone can result in a non-physical solution in which very little or no light reaches the detector, producing an artificially uniform intensity distribution. To avoid this, an additional merit function operand is introduced with a large weight to constrain the total optical power on the detector, ensuring that it remains above a specified threshold.
Run and Results
Instructions for running the model and discussion of key results
Step 1: Grating design in Lumerical
- Open the grating file [[green_coupler_sweep.fsp]]
- Run the sweep on the slant angle. The sweep is set to induce a variation in the slant angle within [10° 60°], and to save the corresponding grating_characterization results from the RCWA solver.
- Set the slant angle to 50° in the topcell and run the RCWA for this configuration.
- Right click on the RCWA result “grating_characterization” and select “Export to LSWM” to generate the in_coupler.lswm file
- Copy for the [[out_coupler.fsp]] and the in_coupler.lswm files in the folder “Zemax>DLL>Diffractive”
The grating used in this example is a slanted grating. To better understand its performance, a parametric sweep of the slant angle was conducted from 10° to 60°.
Based on our grating geometry, light is incoming on the IC at normal incidence, and propagate within the waveguide with a central propagation angle of approximately 51°. Both gratings are working in transmission.
By examining the results of the sweep we can observe the variation of transmission in the +1 order as a function of the slant angle.
For the IC, we use a fixed grating (static link, no spatial variation) with a slant angle of 50°. The .lswm file will be used to load the grating information in Zemax OpticStudio.
For the OC, we are going to use Dynamic Link with spatial variation. The variation will be defined as a linear variation of the slant angle over the x axis of the OC grating region. The spatial link grating has been created in Ansys Lumerical and linked using the DLL in Zemax by selecting directly the .fsp file. Details about the documentation and various parameters in Zemax and Lumerical can be found here: Dynamic workflow between Lumerical RCWA and Zemax OpticStudio – Ansys Optics
Step 2: Waveguide design in Zemax
- Open the attached Zemax file "1D_waveguide_dynamic_link.zprj" and verify that the grating files (IC and OC) are being used by the DLL through the User-Defined Surface object properties. The IC is linked via a static link and is referenced using the In Coupler.lswm file. The OC is linked via a dynamic link via a .fsp file.
- In the diffraction settings of the OC, set the variable #1 to 0.
- Run the Ray trace and check the performance at the detector.
The waveguide was designed and analyzed using Zemax OpticStudio in Non-Sequential Mode (NSC), which allows accurate modeling of complex light propagation, scattering, and multiple reflections within the system. The initial setup consists of five primary components:
- Source – Generates the input optical field.
- Input Coupler – Couples light from the source into the waveguide.
- Waveguide – Guides light through total internal reflection (TIR).
- Output Coupler – Extracts light from the waveguide toward the Detector.
- Detector – Captures the output intensity distribution for performance evaluation.
To model the grating structures used for light coupling, two User Defined Objects (UDOs) were implemented within Zemax. First UDO represents the input grating coupler, while the second UDO represents the output grating coupler.
The spatial variation in the OC is controlled by the file “spatial_vary_8.txt”, located in the folder “Zemax>DLL>Diffractive”. The variable #1 corresponds to the parameter v1 in the equation defining the slant angle as a function of the spatial position.
By setting v1 = 0, the spatial variation is effectively deactivated, and the slant angle is set at the value“p0”. (the parameter set for “p2_slant_angle” in the diffraction options)
In this configuration, we see that the uniformity in the detector output is poor as most of the light is extracted on the first interaction of the light with the OC.
Step 3: Optimization of the Spatial Variation
- Examine the Merit Function set in the Zemax file. The main operand is the standard deviation of the detector that represents the spatial uniformity of the eye box. Note another operand is set to prevent the total flux to fall to 0.
- Run the optimization
- Run again the Ray Trace and observe the impact on the distribution of light in the detector.
In previous articles, we demonstrated how to perform th eoptimization of a waveguide with Eye Pupil Expander with advanced method relying on Ansys OptiSlang. Although it is a powerful method recommanded when the number of parameters increases, we propose here an optimization method that can be performed within Zemax entirely.
In this example, the objective is to optimize the uniformity of the detector response. To achieve this, the merit function is defined to minimize the standard deviation of the intensity distribution on the detector. However, minimizing the standard deviation alone can lead to an impractical solution where little or no light reaches the detector—resulting in artificially perfect uniformity. To prevent this, an additional operand with a large weight is included to constrain the total power on the detector, ensuring it remains above a specified threshold.
Using the Universal plot tool, we can visualize what the optimization should do. First, by keeping p0 fixed at 35°, we can see the effect of varying the slope of the spatial variation.
If the slope is too low, most of the light is still extracted when the light interact first with the OC. If the slope is too high, we see most of the light is extracted around the center of the OC. Note that we did not add any operand to constraint the maximum slant value. In practice, a scenario with a very steep slope is likely not manufacturable.
Then, by varying both p0 and v1, we can also see how adjusting the central value of the slant angle can help to improve even further the uniformity.
The value observed with the Universal plot tool should be matching the result of the optimization. Note that generating such visualizations using the Universal Plot can be time-consuming, especially when multiple variables are involved. Therefore, for designs with a larger number of variables, it is generally more efficient to rely on optimization method.
Important Model Settings
Description of important objects and settings used in this model
- Dynamic Link simulations can become computationally intensive due to repeated RCWA evaluations during optimization. To improve efficiency, use Mode 1, minimize the sampling resolution to the lowest acceptable level, and restrict the number of optimization variables to those with the greatest impact on system performance. Improper simulation settings can significantly increase both system evaluation and optimization time.
- During optimization, a large positive weight was assigned to the total-flux operand to ensure that the optical power reaching the detector does not drop below an acceptable level. This prevents the optimizer from converging to trivial solutions that achieve good uniformity at the expense of significantly reduced throughput. Alternatively, the operand can be assigned a negative weight, causing it to be treated as a Lagrange multiplier. In this formulation, the optimization is constrained to satisfy the specified flux requirement exactly, ensuring that the desired power level is maintained while simultaneously optimizing the illumination uniformity.
- In this example, only two variables were optimized, allowing the merit function landscape to be easily visualized using tools such as the Universal Plot. However, for more complex applications, such as waveguide systems with eye-box expansion, the number of design parameters increases substantially, making direct visualization of the optimization space less practical.
Updating the Model With Your Parameters
Instructions for updating the model based on your device parameters
- The workflow demonstrated here can be used as a template for your application. Update the model parameters, grating files, and optimization settings as needed to match your design specifications and performance objectives.
Taking the Model Further
Information and tips for users that want to further customize the model
- After identifying the optimal parameter values, the system can be converted to a static link model. This reduces computational overhead and enables significantly faster ray-tracing and performance analysis while preserving the optimized behavior.
- In this article, the variation was induced with a simple linear equation. For more advanced optimization approaches, such as higher-order polynomial or nonlinear models, can be explored. These methods can better capture complex relationships between design variables and system performance, leading to more accurate, robust, and efficient waveguide designs.
- This example can be extended to different geometry, such as a 2D expansion with a fold grating in combination with an out-coupler, or a 2D grating.
Additional Resources
Additional documentation, examples and training material