The goal of this example is to design a diffractive metalens consisting of cylindrical nanorods. The radius and the arrangement of the nanorods are tailored to create a desired phase profile on the metalens surface. The design is verified in Ansys RCWA (Rigorous Coupled-Wave Analysis) and OpticStudio through near- and far-field analyses.
Overview
Understand the simulation workflow and key results
Metalenses consist of carefully arranged "unit cells" or "meta-atoms" with sub-wavelength structures. By adjusting the geometry of these unit cell elements, one can modify the phase changes experienced by the propagating field. With the knowledge of the phase in terms of the geometry parameters, it is possible to create a metalens with an arbitrary phase profile by placing the meta-atoms at the necessary positions.
Step 1: Target phase definition
The first step is to define the target phase profile for the metalens. For the most common lens types, such as spherical or cylindrical elements, we can use the known analytical solutions. However, we can design the ideal phase mask in OpticStudio using ray tracing and optimization capabilities for more complex systems where analytical solutions don't exist or would be hard to calculate.
Step 2: Unit cell simulations with RCWA – Height and radius sweep
In this step, we sweep the height and radius of the nanorod and obtain the transmission, phase, and near-field. The height that gives the desired transmission and phase properties is chosen. The phase and field vs. radius results are then saved for the next steps.
Step 3: Full lens design with FDTD
Once the library of phase/field vs. radius is built from step 2, there are two approaches available for the design and analysis of the full metalens:
Direct simulations: Construct and simulate the full metalens in FDTD based on the target phase profile and the phase vs. radius data from the previous step. While this approach is more straightforward, it can pose challenges in terms of memory and simulation time, especially for larger metalens. The nearfield from the simulation can be used for far-field analysis and exported to a .ZBF file for further propagation in the Ansys OpticStudio.
Reconstruction of full fields:
The near-field/far-field of the full metalens can be reconstructed with a script using the nearfield library from Step 2. This avoids the time-consuming simulation of the full lens and hence can be much more efficient than the direct simulation approach. A detailed description of these approaches will be provided in the corresponding step in the “Run and Results” section.
We will use a spherical metalens with a small radius to verify the accuracy of the “indirect” approach. Then, the approach will be applied to a much larger metalens based on the optimized target phase in OpticStudio.
Step 4: Propagation of imported beam in OpticStudio
Once the near-field for the metalens is exported to a .ZBF file from the previous step, we can use the Physical Optics Propagation (POP) tool in OpticStudio to propagate the beam through the entire system, including any bulk optical elements as well. Using POP, the phase and irradiance profile can be analyzed at every surface, and the system performance can be evaluated. If necessary, the optical setup can be re-optimized in OpticStudio based on the propagation results. Finally, the actual beam can be compared with an ideal beam propagated through the target phase mask in OpticStudio to verify the metalens model.
Step 5: GDS export
Once the design of the physical shapes and the positions of the meta elements over the whole lens is finished, the pattern is typically exported to a GDS format for fabrication. However, due to the large number of elements involved, the GDS export can generally take a long time. In this step, we show a very fast and versatile GDS export approach using the polystencil command, which can work well with large metalens composed of a large number of meta-elements.
Run and Results
Instructions for running the model and discussion of key results
Step 1: Target phase design in OpticStudio
As a first step, we design the target phase profile for the metalens in mind. In the case of a lens with known shapes such as below, we can use an analytical formula to define the phase profile.
In a more general case where the exact shape (phase) cannot be described with a formula, it would be useful to represent the spatial phase data on a rectilinear grid. In this example, we are designing a metalens to best focus collimated incoming beam together with a cylindrical lens, which only has power in the Y direction. The cylindrical lens without the meta-element would create a line focus along the X-axis, and our goal is to achieve the smallest RMS spot radius by optimizing the phase mask of the metasurface.
Once the target phase profile is optimized, we will export the phase map from OpticStudio, and use it as an input in Lumerical for modelling the physical structure of the sub-wavelength unit cells.
- Open the Zemax model that contains the initial setup ( phaseDesign_start.zar ). A constant zero phase profile is used as a starting point.
- Optimize the target phase profile by running the local optimizer (under Optimize…Optimize!).
Target phase profile
In this step, we design the required phase profile for the metalens using raytracing. In OpticStudio, the metasurface can be described by the diffractive surface type, which applies an additional phase on top of the base refractive or reflective surface. The phase profile causes extra bending to the ray.
For this sample case, according to theoretical expectations, we use the Binary 1 surface type, which describes the phase as extended X, Y polynomials:
$$\varphi(x,y)=M\sum_{i=1}^{N}{A_iE_i(x,y)}$$
where
\(\varphi\): phase on the metalens surface
\(M\): diffraction order
\(N\): number of polynomial coefficients in the series
\(x, y\): normalized spatial coordinates with respect to the radius of the metalens
Due to symmetry considerations, and to avoid overcomplicated phase profiles that don’t improve the solution significantly, we only set the coefficient of the x2 term to be variable during the optimization process. We quantify the optimization target using the RMS Spot Size default Merit Function.
Based on the optimization, the ideal phase profile is described by the following equation:
$$\varphi\left(x,y\right)=\ -11.703648x^2$$
As expected, with this cylindrical phase profile in the orthogonal X direction the collimated input is focused to a diffraction-limited spot.
Step 2: Unit cell simulations – Height and radius sweep
In this step, we are building a library of phases as a function of the nanorod radius, with the target of a phase change of \(2\pi\) over the range of radius in consideration. This library will later be used as a mapping tool to place a nanorod with the desired phase at each grid point of the metalens.
We also sweep the height of the nanorod to find out the value that gives transmission as high as possible. Once the desired height of the nanorod is found, we will run a separate sweep to build a library of near-field as a function of radius. This will then be used to reconstruct the near-/far-field of the full lens in Step 3.
We are using the RCWA due to its efficiency in simulating periodic structures. If you want to use the FDTD, which is known for its generality and versatility in terms of material, geometry, and wavelength ranges that it can handle, please refer to the Appendix. What could be the better choice might depend on the shape of the structure, material, and source as well as the number of frequency points required. Please see the
RCWA Solver Instruction page
for further information.
- Open the [[unit_cell.fsp]], set the 'radius' of the 'model' object to '50' nm, and run the simulation.
- Visualize the '\(E_p\)' from the "xz_field" monitor results. Repeat the same for the radius value of '100' nm.
One of the key results that we are interested in is the phase of the field above the nanorod in response to a plane wave. In this example, we are changing the radius of the cylinder to introduce the necessary phase changes. We can easily check this behavior by looking at the electric field on the xz plane. Below are the real(\(E_x)\) results for cylinders with radii of 50 and 100 nm, respectively. Since the refractive index of the cylinder is larger than its surrounding, the propagating field for the larger radius case will experience a higher effective index than the shorter radius one. This modification of the effective path length of the incident light by changing the nanorod radius is one of the key properties utilized in this example.
- Run the script, [[unit_cell.lsf]] to retrieve the results from the “height” sweep object and plot the phase and transmission as a function of the nanorod radius.
Below are 2D maps of the phase and transmission in terms of the height and radius of the rod. The transmission remains very high over the whole radius and height ranges. The phase changes over the given radius range (0.05 – 0.15 um) become larger than \(2\pi\) for height values of 1.1 um or over.
The following is the line plots of the above image at the height of 1.3 um.
The following plot shows the required radius to produce a certain phase, which is a transposed plot of the above phase vs. radius plot. We then interpolate the data with finer data points in “phase”, consequently finer data points in “radius.” This will allow a better matching of the target phase and the actual phase the chosen radius will produce.
For a similar reason, the field data from the sweep is also interpolated over denser “phase” data points and saved together with the radius data. We also sample the field data to make the data size smaller and make it much faster to calculate the nearfield and far-field from the whole lens in the next step. The following images show the nearfield for a 50 nm radius with different sampling values.
Step 3: Full lens design
With the target phase from Step 1 and the radius/field vs. phase library from Step 2, we are now ready to design the full metalens.
Phase-to-radius mapping for metalens
Whatever the target phase might be, a full lens design involves translating the spatial phase profile into a spatial radius (of nanorod) distribution. An example of a spherical phase profile is shown below, but the principle applies to arbitrary phase profiles.
Direct simulation (Spherical lens with small radius)
Once the radius distribution is known, we can create the whole lens and run the simulation in FDTD. This might be the most straightforward approach, but not the most efficient one, especially for a metalens with a large radius (> 100 um). As with any large simulation, it can require very large memory and a long simulation time. Additionally, the large number of meta-elements can slow down their construction in FDTD and the visualization in the GUI.
- Open and run the simulation file, [[full_lens.fsp]].
- Visualize the amplitude and angle of the Ex from the “field” monitor.
The “metalens” structure group loads the phase vs. radius data from Step 2, does the phase-to-radius mapping, and places the nanorods at the required positions with correct radii.
The simulation injects a plane wave. A circular aperture made of PEC (Perfect Electrical Conductor) is placed between the source and the metalens to limit the area of injection. The near-field results from the “field” monitor are shown below:
The incident field is mostly blocked by the PEC (Perfect Electrical Conductor) aperture. But some of it is diffracted by the aperture edge, which can be seen as small ripples in the amplitude and phase plots. Unlike an ideal hyperbolic lens where there is perfect rotational symmetry, the simulation results do not show such a symmetry effect due to the discretization of the lens with an array of nanorods on a rectilinear grid.
- Run part 1 of the script file, [[full_lens.lsf]], to plot the phase along the x-axis (dotted line in the above phase image).
The measured phase is overall in good agreement with the target phase.
The evolution of the incident field through the metalens can be visualized using a movie monitor or a time monitor. As a movie monitor can increase the simulation time significantly, it might be a good idea to use a 2D time monitor instead and get snapshots of the fields in time. The gif animation of the field is shown below.
The wavefront of the propagating field clearly shows inward bending, indicating the focusing of the light as is expected from a lens with a spherical phase profile.
- Run the “Part 2” of the script, [[full_lens.lsf]].
The far-field projection along the propagation axis (z) shows that the focal distance of the metalens is about 79.4 um. The FWHM (Full Width Half Maximum) of the beam at the focal plane is about 2.4 um. The calculated focal distance is off the target value of 100 um. This can be primarily attributed to the small lens size, hence the small number of nanorods to map the 2*pi change over the lens radius. Increasing the lens size might help improve the results together with optimizing other parameters such as the period.
Field reconstruction (Spherical lens with small radius)
As an alternative to the time-consuming direct full lens simulation, it is possible to reconstruct the nearfield and far-field of the whole lens by using the nearfield library from Step 2. We will again use a spherical lens with a relatively small radius (11 um) and compare the results with those from direct simulation for verification of this approach.
1. Nearfield stitching and far-field projection
In this approach, the nearfield of the whole lens is constructed by stitching the nearfield from unit cell simulation corresponding to the phase at each grid point of the target phase distribution. Since the lens in consideration has a radius of 11 um, only the region within the 11 um radius is filled with the matching fields, with the field outside set to zero.
- Run the “Part 1” of the script, [[stitch_nearfield_R11um.lsf]].
- Visualize the amplitude and angle of the “Ex” component in the Visualizer.
The amplitude of the stitched nearfield looks quite different from that of the direct FDTD simulation. This can be attributed to the slightly different settings used in the two approaches:
- Use of PEC aperture in FDTD
- Assumption of local periodicity in the reconstruction approach, while neighboring cells in FDTD can have abrupt changes in the radii of the neighboring rods.
That said, both amplitudes are in the same ballpark and the overall phase results show a good match.
- Run the “Part 2” of the script, [[stitch_nearfield_R11um.lsf]], to plot the farfield results.
Overall, the farield results from the stitched nearfield match direct simulation results very well in terms of the focal distance, spot size and intensity.
2. Summing the farfields of unit cells
This is equivalent to the nearfield stitching approach but in reverse order. Here, we first construct the farfield library from the nearfield library built in Step 2. Then, we sum the contribution of the farfield of every nanorod by taking into account the phase shift resulting from its position shift from the origin. The approach can be described in mathematical form as follows:
- Run the script, [[sum_farfield_R11um.lsf]].
The farfield results (on a 1m radius hemisphere) from the direct simulation and the reconstruction by summation show a good match.
Field reconstruction (Lens with a phase profile optimized in OpticStudio, radius = 100 um)
Now that we have verified the validity of the “field reconstruction” approach on a small lens by comparing its results with that of the direct simulation, we can now extend it to a larger metalens design - the one whose 2D phase profile was optimized in OpticStudio (Step 1). We will be using the nearfield stitching approach here.
- Run the script, [[stitch_nearfield_ZOS_R100um.lsf]].
The image below shows the phase of the stitched nearfield, which is similar to the ideal phase profile obtained in Step 1. The script exports the reconstructed nearfield into a .ZBF file for further propagation and validation in OpticStudio in the next step.
Step 4: Propagation in Zemax OpticStudio
The Enear_lens_extended.zbf file exported from step 3 can be directly imported into OpticStudio for propagation through the rest of the system, further analysis, and evaluation. To confirm the physical model of the metalens provides a realistic representation of the required phase mask, we compare the actual beam defined by the .ZBF file to an ideal top hat beam propagated through the target phase mask.
- Open the final simulation file that contains the beam propagations ( phaseDesign_ZBF.zar ).
- Compare the propagation results for the ideal and actual beams.
Beam Propagation Results
In this step, we use the POP tool in OpticStudio to analyze the propagation of the imported beam from the previous step results. First, to analyze the real beam, we use the ZBF file-based beam definition that relies on the near-filed distribution, and we propagate the beam from a dummy surface after the metalens through the entire system to the focus. Next, to provide a reference for the comparison, we also propagate a top-hat beam through the ideal phase profile, and then down through the full system as well.
Below are the irradiance distributions after the two propagations at the focus.
The results are in good agreement, which validates the nanoscale model of the metalens.
Step 5: GDS export
Once the design of the physical shapes and the positions of the meta elements over the whole lens is finished, the final step is to export the design into a GDS format for fabrication. However, due to the large number of elements involved, the GDS export can generally take a long time unless care is taken. Here, we use the polystencil command to extract the vertices of polygons at a specific z-plane cross-section. This approach works for an arbitrary shape of meta-element and can account for multiple elements in a unit cell.
- Run the script, [[gds_export.lsf]].
The script loads the unit cell simulation file and first builds a library of the vertices as a function of the radius. Using again the radius vs. phase data and the 2d target phase distribution, it then adds polygons to the GDS file.
The image below shows the exported GDS images for the two target phase maps used above. The one on the left is for the spherical metalens with an 11 um radius, which translates into nearly 19 hundred elements. This one takes only a tiny fraction of a second to export. On the right, we have a GDS for the cylindrical phase mask with a radius of 100 um. This one has about 155k elements but took only 5 seconds to export to GDS.
This GDS export approach can easily handle elements over millions and would work for larger lenses with slight modifications in the script.
Important Model Settings
Description of important objects and settings used in this model
Unit cell simulations
Variables in “model”
The object has height, radius, and period as its variables. The position and span of the RCWA simulation region are automatically set up using these parameters.
Full lens simulations
PEC aperture
To block the injection of the field beyond the lens, an aperture made of PEC material was placed right before the metalens. Its radius is automatically set by the script in the "model."
"metalens" structure group
To visualize the target phase vs. position and the radius vs. position, set the "make plot" to "1" in the "metalens" structure group and click on the “Test” button in the “Script” tab. Phase_vs_radius.ldf also saves the material data and other geometry data to make the setting up of the full lens simulation easier.
Rendering detail
When there are many structures to draw, the display can be slow. This is especially the case for a large metalens. To prevent such a problem, you can set the rendering detail of the structures to a low value in the “metalens” structure group.
farfieldsettings script command
When projecting a nearfield from a large frequency monitor, the far-field calculation can take very long. To accelerate the calculation time without sacrificing accuracy, you can use the farfieldsettings script command and downsample the nearfield data points.
Propagation in OpticStudio
Array size for the ZBF file
To ensure a good sampling of the beam both near and far from focus during propagation in the POP tool in OpticStudio, set the array size to X=\(\omega\sqrt{\pi n}\), where w is the waist size and n is the number of points.
Pilot beam radius
To make sure the correct propagation method is used in POP for the ZBF file, change the Output Pilot Radius to User-defined X-Radius=-4.0671 and Y-Radius=0 under Surface Properties > Physical Optics.
Updating the Model With Your Parameters
Instructions for updating the model based on your device parameters
Geometry
If you want to modify the shapes for the metalens, make sure you update the unit cell as well as the full lens simulation files. The "model" and the "sweep" objects need to be updated with the correct parameters.
Period and wavelength
When changing the wavelength or the period of the unit cell, it is generally a good idea to avoid multiple grating orders, which can make the design of the metalens more complicated.
Focal length
A metalens with a larger focal length will generally require a larger lens radius, meaning a larger memory and simulation time. It might be a good idea to do some preliminary tests with a smaller device to validate the concept before moving on to the larger device.
Other design considerations
As shown above, it is common for the measured phase to deviate from the target phase. There can be many reasons for this kind of discrepancy:
- Diffraction due to the PEC aperture.
- Broken local periodicity of the neighboring nanorods: The phase we obtained in step 2 assumed infinitely periodic nanorods with an identical diameter. When there are very small changes in the radii of the neighboring nanorods, we can assume that structures are locally periodic, hence the phase vs. radius relation obtained from step 2 is still valid. This example uses a relatively small radius and the changes in the phase (hence the radius) of the neighboring nanorods can be a bit abrupt.
- Deviation from subwavelength operation: When the radius of the nanorod becomes larger, there can be strong interaction of field between neighboring nanorods.
- Mesh refinement: A coarse mesh can also contribute to poor representation of the fine features.
To improve the results, you might want to try:
- Modify the period of the unit cell to make sure that you are working in the subwavelength regime throughout.
- Increase the metalens radius.
- Refine the mesh.
Taking the Model Further
Information and tips for users that want to further customize the model
Broadband Simulations
The current example is based on single-frequency simulations. However, it can be extended to broadband simulations with some modification of the simulation settings and the associated script. These are mostly to do with the additional dimension (frequency) to be added to the data.
Different Lens Shapes
This example can be easily adapted to lenses with different shapes (phase profiles). For example, if you want to design a flat metalens counterpart of the bulk spherical, cylindrical, or axicon lenses, you just need to use the correct phase formula corresponding to the lens of your interest and generate a 2D target phase map. Once you build a library of phase/field vs. radius, you can re-use the library and quickly test the near-/far-field properties of lenses of arbitrary shape.
Arrangement of "Meta-atoms"
A rectangular lattice is used in this example to construct the entire metalens using the square unit cell as a building block. The radius of the nanorod on each grid point is calculated and a structure is added to each grid. This approach is fine with a small number of elements. However, this can be very time-consuming for a larger metalens, where the number of elements can grow. In such cases, you can utilize the symmetry of the design to accelerate the pattern generation rather than generating the pattern element by element. You can also consider using a non-periodic arrangement of unit cells to better represent the phase profile.
Circularly Polarized Light
Simulations of metalenses with chiral properties can require using a circularly polarized light. Visit here for further information.
Additional Resources
Additional documentation, examples, and training material
Related Publications
- P. Yeh, "Optical Waves in Layered Media", Wiley-InterScience, chap. 3, 2005.
- M. Khorasaninejad et al, "Visible Wavelength Planar Metalenses Based on Titanium Dioxide", IEEE Journal of Selected Topics in Quantum Electronics, 4700216 (2017)
- "Designing large, high-efficiency, high-numerical-aperture, transmissive meta-lenses for visible light," Optics Express, Vol. 24, Issue 5, pp. 5110-5124 (2016)
See Also
Zemax Resources
- How to design DOE lens or metalens in OpticStudio – Knowledgebase (zemax.com)
- Exploring Physical Optics Propagation (POP) in OpticStudio – Knowledgebase (zemax.com)
- Using Physical Optics Propagation (POP), Part 1: Inspecting the beams – Knowledgebase (zemax.com)
- How to manually create a ZBF file | Zemax Community
Related Ansys Innovation Courses
Appendix: Unit cell simulations with FDTD
Additional background information and theory
- Open the [[unit_cell_fdtd.fsp]], set the 'radius' of the 'model' object to '50' nm, and run the simulation.
- Visualize the '\(E_x\)' from the "field" monitor results. Repeat the same for the radius value of '100' nm.
One of the key results that we are interested in is the phase of the field above the nanorod in response to a plane wave. In this example, we are changing the radius of the cylinder to introduce the necessary phase changes. We can easily check this behavior by looking at the electric field on the xz plane. Below are the real(\(E_x)\) results for cylinders with radii of 50 and 100 nm, respectively. Since the refractive index of the cylinder is larger than its surrounding, the propagating field for the larger radius case will experience a higher effective index than the shorter radius one. This modification of the effective path length of the incident light by changing the nanorod radius is one of the key properties utilized in this example.
- Run Part 1 of the script, [[unit_cell_fdtd.lsf]], to retrieve the results from the “height” sweep object and plot the phase and transmission as a function of the nanorod radius.
Below are 2D maps of the phase and transmission in terms of the height and radius of the rod. It was found that the phase changes over the given radius range (0.05 – 0.15 um) become larger than \(2\pi\) for height values of 1.3 um or over. The transmission at this height is high (over 0.9) and even over the whole radius range, hence meeting the two requirements set above.
The following are the plots of the above images at the height of 1.3 um. They are similar to the RCWA results. convergence tests, it would be possible to further reduce the differences between them.
- Run Part 2 of the script, [[unit_cell_fdtd.lsf]], to retrieve the results from the “radius” sweep object and plot the phase and field as a function of the nanorod radius.
“S-parameter” analysis group
The metamaterial span and center are automatically set by the script in the “model” to match the height of the “pillar.”