Birdbath architecture for augmented reality (AR) system - part 2 – Accurate polarizing element simulation

Author: Yuan Chen, Chih-Hao Chen


Article Attachments


As mentioned in the previous article Birdbath architecture for augmented reality (AR) system - part 1-System setup, optimization, and human vision simulation – Knowledgebase ( , there are two different ways to get this architecture see-through. One way is to use semi-reflective coating and another way is utilizing the polarizing elements. The polarizing elements are introduced to increase the light efficiency and improve the light leakage performance.

There are three different ways to model the polarizing elements in non-sequential mode: the Jones Matrix Object, DLL: Jones Matrix NSC and JSON file ( sub_wavelength model). 

The Jones matrix object in Zemax NSC mode has some disadvantages.

       1.This is only valid when the propagation direction is normal to the object.

       2.It is not possible to define multiple Jones matrices for varying wavelengths and incident angles.

 DLL (Diffractive): Jones Matrix NSC is able to handle oblique incidence correctly including the reflection mode. However, it can’t define for multi-wavelength and incident angles.

For some users, they may only have measurement results for each polarization state without access to the real material parameters required to define the polarization. Hence, the utilization of Jones matrices defined by varying wavelengths and incident angles becomes crucial. JSON file has (output S, output P, input S, input P) components for multiple incident angle and wavelengths, which is the same concept as Jones matrix. 

To summarize, the advantages of using this Lumerical_sub_wavelength model is that:

  1. Support anisotropic modeling.
  2. Store data for multiple incident angle and wavelengths
  3. Model reflection and transmission (and diffraction) at the same time
  4. Correct polarization behavior on curved surfaces
  5. Much faster compared with birefringent ray tracing 


In this part, the model with polarizing elements is created. We use Lumerical to construct the quarter waveplate (QWP) model and simulate with STACK. Second, we use Zemax OpticStudio to simulate the polarization behavior using the Json file exported from Lumerical. 


Step1: QWP simulation (Lumerical)

The PBS could also be simulated by Lumerical STACK. In our model, it’s simplified as a coating performance. We are still working on the improvements for this project, please contact for .lsf file and provide your insights. Your feedback is highly appreciated.

1.1 Specification of QWP

The phase difference is a function of incident angle and wavelength. When evaluating the performance of a QWP design, the wavelengths and working angle range shall both be considered.

The wavelengths and their weights are selected based on the display characteristics. In this example, 486nm,588nm and 656nm are selected.

The working angle could be calculated by using the MXAI merit function operand. This boundary operand traces the marginal and chief rays from defined Field and reports the maximum angle at the surface defined by Surf. This may vary among different lens designs, be careful when setting up the specifications.


1.2 QWP design

It’s well explained in this knowledge base article how to design such waveplate. How to model and design real waveplate in OpticStudio – Knowledgebase ( For engineers who are not that familiar with OpticStudio polarization setting, you may find this a good reference to study.

The achromatic waveplate design has a much better performance at normal incidence, but it could not offer a satisfying result at large incident angle. The performance can be quickly checked by adding the extreme field angle in Polarization pupil map.


The final parameters of this QWP are:

Material Thickness(um) Ne@588nm No@588nm
Quartz 15.865 1.5443 1.5534


1.3 QWP simulation

The information about Lumerical STACK could be found: STACK Product Reference Manual – Ansys Optics

The stackrt is the suitable script command to generate the result we want. It calculates the reflection and transmission of a plane wave through a multi-layer stack using the analytic transfer matrix method. This function returns the fraction of transmitted and reflected power (Ts, Tp, Rs, Rp), and the complex reflection and transmission coefficients (ts, tp, rs, rp), for both S and P polarizations.

The code used to simulate the QWP is like the one generated here: Antireflective circular polarizers in OLED display – Ansys Optics

1.3.1 System Definition

A stackrt simulation could be performed at provided refractive index, thickness, incident angle theta. It always assumes that the plane of incidence to be the xz plane (phi=0)).

To obtain the response of the anisotropic layers to an incident light with a certain polar angle (phi), we need to rotate the optic axis (equivalently, the permittivity tensor) of the corresponding materials by -phi.


To get results for multiple frequencies and incident angle, it’s recommended to set up the sampling in the beginning of the script so that we can adjust them easily later.

The system is made up of air-Quartz-air in STACK:

-The frequency is selected as f,d,c. Please be careful that the unit is used in meter instead of mm in OpticStudio.

-The thickness of air can be set to 0. For QWP, we use the optimized component thickness.

-As we mentioned, the maximum incident angle for QWP is 15.2 degrees. Here, we select 16 degrees as the maximum angle.

-As for phi, the ray could be incident from a certain polar angle, so here we need to cover the range from 0 to 360.


1.3.2 Material Data

Here we define the refractive index of each layer. Before typing the refractive index directly, we can check if this material is in the material database. If so, the data could be read directly by using getfdtdindex script command. See getfdtdindex - Script command – Ansys Optics for more information.

Currently, there is no data for Quartz. We must input the data by ourselves. This model is simplified to be non-dispersive. The refractive index information can be found in Material Catalog.


The ordinary refractive index is 1.5443 and the extra-ordinary refractive index is 1.5534.


The material index and permittivity matrix are generated.


1.3.3 Simulation for all frequencies and angles

As the built-in stackrt could not consider the polar angle phi, we must rotate the permittivity matrix for rays out of XZ plane. Assuming the rotation matrix is R, the new permittivity matrix is:

It’s written as function to calculate the rotated permittivity matrix in script used_function.lsf. Part of the code is hidden for better visibility. This function is designed to be compatible with dispersive materials. The angle we use are Euler angles.


Now let’s move to the most important function in the script. We will generate results for all frequencies at defined incident angles. Matrix is created to store the simulated results.


Finally, we run the simulation to get the result for ray incident at given phi. Remember that the ray is assumed to be in XZ plane, the Euler angle for simulation in X direction is (angle – phi).


For certain cases, the coefficients must be normalized. More information could be found in: Metamaterial S parameter extraction – Ansys Optics


The reflection of p-polarized light could come from the reflection of rpp and rsp. And it’s the same for the reflection of s-polarized light.


The data is re-organized to be exported in. Json.


It’s important to set the angle opposite as the QWP will be used in mirror space when light come back from the reflector and hit the QWP twice.


Finally, all data are stored in .Json file and imported to Zemax OpticStudio.


Step2: Simulation (OpticStudio)

The lens design process is explained in part 1.



By using the Convert to NSC group and a few modifications, we can quickly check the system performance with polarized elements. Since there is an imported .Json file in our system, we could start with a test system to check the functionality. For users who are not familiar with polarization settings, this system can help you quickly understand how it works in non-sequential mode.

2.1 Test System

As mentioned above, there are several critical polarizing elements to be considered. The absorptive polarizer is used to eliminate rays from the bottoms of the glasses to human eye. Multiple rays from the display can be generated to check performance at different incident angles.


Let’s trace the first polarized ray. It’s recommended to use the source ray object to quickly check the performance with a given direction. Here we set the Jx = 1 and the rest as 0 to simulate the linear polarized light. The reference axis defined in polarization tab may lead to different initial polarization status. In our case, we shall choose Y axis reference so that the Ey is eliminated. The plots generated in this forum post are quite intuitive: Visualize the polarization direction for different references | Zemax Community


As for the PBS, there are several different ways to model this. As mentioned, it could be done by .Json generated in Lumerical STACK, or a real PBS design edited in coating. In our model, it is simplified as PASS_P coating, which means that it will reflect S polarized light. More information about how we define the s and p polarization states is mentioned here: How does OpticStudio define the s- and p-polarization states? | Zemax Community

This is how light is reflected towards the quarter wave plate. If you are not familiar about adding another coating, please refer to this community post:  How can I add a perfectly transmit coating? | Zemax Community


The QWP could be compared first with the Birefringent -> Waveplate mode. More details about this mode can be found in this forum post: How to model a birefringent polarization rotator? | Zemax Community

Here we use the Object Properties…Diffraction tab to define the plugin DLL “lumerical-sub-wavelength-XXXXXX.dll”, where XXXXXX is the version, such like "2023R1". This DLL reads the waveplate data (.json) into OpticStudio. Note that the grating data (.json) should be saved in the \Document\Zemax\DLL\Diffractive\ folder.


For more information, please refer to: How to load grating data from Lumerical into OpticStudio – Knowledgebase (

Lastly, we want to model the linear polarizer on the front surface of the tilted plate so that rays from the bottom won’t be reflected to human eye. The linear polarizer is supposed to eliminate Ex. Here we use the Jones Matrix dll. More information can be found in: DLL (Diffractive): Jones Matrix NSC | Zemax Community Caution shall be paid that this dll could not work correctly if the refractive index is not 1.


The light is modeled as unpolarized.

2.2 Real system

The System designed in sequential mode can be converted to non-sequential mode using the built-in tool: Convert to NSC Group. A few modifications are added to model the polarized elements.


  1. The display is modelled by a Source DLL object with Lambertian_Overfill.DLL. This makes the simulation efficient because only rays that can hit the lens will launch.
  2. A Slide object can use a bitmap as a mask. Its position should be slightly offset from the source object. A Lambertian image source can be built.
  3. There are two different ways to model the human eye. One is to place a detector in eye box position and check the data in Angle Space. Another way is to add a paraxial lens and put the detector at the focal plane of the paraxial lens. The space we are interested in is the Position Space. In our model, the one with paraxial lens is activated.
  4. It’s important to block unrealistic light path. Here we add annulus to the eye box position and the field lens.
  5. The tilted plate is more like a rectangular instead of a circular plate. The rectangular volume is used with PASS_P coating applied to its rear surface.
  6. The linear polarizer is modeled as User Defined Object without material setting.
  7. The QWP is modeled as a film attached to the curved mirror. The desired shape could not be modeled directly with an object which can support diffractive surface. So, we need to use the Boolean native to combine an object which is compatible with diffraction dll and another object to generate the desired object shape. Please don’t forget to check "Rays Ignore This Object” and "Do Not Draw Object" for parent objects. For more information, please check:

How to use the Boolean CAD, Boolean Native and Compound Lens objects, and the Combine Objects tool – Knowledgebase (


Till now, we have finished all setups and could run the analysis to check the performance using a simple QWP.


Previous article: Birdbath architecture for augmented reality (AR) system - part 1-System setup, optimization, and human vision simulation – Knowledgebase (


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



Please sign in to leave a comment.