This example shows the simulations of defects on wafers in optical inspection systems in FDTD. Images generated by a UV scanning spot microscope are simulated to detect the presence of defects. The system performance is optimized by representing the illumination and collection paths as optical transfer functions and combining them with S-matrix in post-processing.

## Overview

Understand the simulation workflow and key results

Optical inspection allows a fast detection of defects on semiconductor wafers. As structural feature size shrinks, detecting smaller defects becomes more important. Therefore, many optical inspection tools utilize advanced illumination and collection modes to optimize system performance in keeping with this trend. The optimization process typically involves running a large number of direct simulations of the light-structure interaction under various illumination/collection conditions, making it very time-consuming and inefficient.

Here in this example, we utilize a two-step approach, where the simulation of the light-structure interaction and the calculation of the optical system response are done separately. This two-step approach allows a much more efficient optimization of the system for the specific structure in consideration.

### Step 1: Build S-matrix

Obtain the response of the structure for plane waves with a set of injection angles. The results (again, a set of planewaves) together with input planewaves forms an S-matrix relating the input and output states. Since arbitrary beams can be decomposed into planewaves, the S-matrix provides a means to calculate the response of the structure to an arbitrary input beam, without directly running the simulation.

### Step 2: Calculate and optimize optical system response

Calculate the optical transfer functions (OTFs) of the illumination and collection optics. The OTFs together with the S-matrix allows the calculation of the images expected for the imaging system under consideration. Unless the wavelength or the structure (including the defects) are modified, the same S-matrix can be used to calculate the responses for different illumination/collection configurations.

The simulated SRAM (static random-access memory) structure is composed of interleaved rectangles arranged periodically on top of a substrate; the material for both is silicon (n=3.6). We include one oxide (n=1.5) defect modeled by a cube of 20nm. The size of the defects is well below the source wavelength of 266nm. This structure is essentially the same as the one considered in the publication referenced.

## Run and results

Instructions for running the model and discussion of key results

Note: The FDTD simulations in step 1 take relatively long time to run. The data file can be downloaded directly when you want to skip FDTD simulations.

### Step 1: Build S-matrix

- Open sram_test.fsp
- Create a folder named “rundir” for saving jobs in your working directory
- Run run_simulations_sram.lsf
- Run build_S_matrix_sram.lsf

At the start of the two script files (run_simulation.lsf and build_S_matrix.lsf), there are some settings that should be the same in both files: the maximum numerical aperture of the input beam (NA_max0) and the names of the base file and of the folder where jobs are saved. Source angles that are not within NA_max0 will not be included in the simulations; this can be useful when the maximum numerical aperture of the illumination system is known in advance.

Multiple jobs are created from the base file, where we loop over all injection angles and polarizations of the source. The process to create and save the jobs is automated in the script. The injection angles are defined according to the supercell grating orders (see Important model settings: supercell approach).

Data are collected from the saved files to construct the S-matrix, as explained in Appendix: S parameter extraction. The calculated S-matrix, ux0, uy0 and the frequency are stored in the data file (SRAM_sim_S_matrix.ldf) at the end of this script.

### Step 2: Simulate and optimize optical system response

- Run calc_scanspot_image.lsf
- Run DF_NAoptimization.lsf

The script reads the S-matrix data stored in the data file (SRAM_sim_S_matrix.ldf). We compare the results for illumination with x-polarized light focused at the surface of the SRAM structure (z0_illumination=0.025e-6).

First we consider a bright field setup where we illuminate and collect light within a numerical aperture of 0.9 (NA_in=0.9). Note that in the background we can identify a periodic signal associated with the m=±1 grating order of the periodicity of the SRAM structure along the y direction. We see this behavior along the y direction only because the period lx for the x-direction is smaller than the period ly for the y direction so only the n=0 grating order of the SRAM structure along the x direction is allowed.

In the dark-field setup, we illuminate light within a numerical aperture of 0.7 (NA_in = 0.7) and collect light between numerical aperture of 0.7 and 0.9, the background signal can be removed to identify the defects more clearly.

For the optimization we also illuminate with x-polarized light focused at the surface of the SRAM structure (z0_illumination=0.025e-6). The integration window for the FOM calculation is centered at the defect. We can identify a maximum near W =0.7 in the FOM plot. In order to make the calculation faster, a small resolution of 5x5 points is used for the integration; results do not change significantly as we increase the resolution.

## Important model settings

Description of important objects and settings used in this model

### Supercell approach

Typical structures of interest are formed by many unit cells of a periodic structure. The presence of defects in these structures breaks the periodicity, and so it is not possible to simulate only one unit cell with periodic boundary conditions. Instead, we consider a supercell formed by many unit cells of the underlying periodic structure and the defects. This supercell is assumed to be repeated periodically; therefore, we use Bloch periodic boundary conditions, which are also consistent with plane wave illumination at oblique incidence.

### Choosing a plane wave basis

The main assumption behind the simulation workflow is that the interaction between light and structure can be correctly described by decomposing the incoming and outgoing light using a discrete set of plane waves at different angles. Therefore, this approach is valid for linear interactions only.

Wavevectors associated with the supercell grating orders are a convenient choice. They describe the possible directions for plane waves scattered by the periodic structure, depending on the incident wavevector of the incoming plane wave. Grating orders for normal incidence have a very useful property: light incident at one of these directions is scattered to the same set of wavevectors. Therefore, the same set of wavevectors can be used for input and output plane waves. Although it is not the only possible choice, we will use this basis for convenience.

The S-matrix provides the connection between the input and ouput plane waves, as explained in Appendix: S parameter extraction. Once we have calculated the S-matrix we can store it in a Lumerical data file (.ldf), which can be included in the optical system simulation to construct the images of the structure.

### Scanning-spot microscopy

In this example we use a scanning-spot microscope system, where each pixel of the image is generated from the incoherent sum of output plane waves scattered from a given illumination spot in the structure. Therefore, we need to collect the scattered fields for a sweep over the position of the illumination spot given by x0_illumination and y0_illumination, which are arrays covering the entire object plane, instead of single numbers as in Defect on a metal surface example. All these steps are implemented in the script file (calc_scanspot_image.lsf), which only requires the previously calculated S-matrix stored in a ldf file.

### NA Optimization

Separating the optical system simulation from the light-structure interaction simulation leads to faster routines for optimization of the optical system. The script DF_NAoptimization.lsf contains a simple example of a dark-field configuration optimization. Here we sweep over W=NA_in=NA_min and keep NA_max fixed to be the maximum numerical aperture of the input beam NA_max0 (set in run_sram_simulations.lsf and build_S_matrix.lsf). As figure of merit (FOM) we use the image intensity Ispot integrated over a window around a defect position; the goal is to find the value of W that maximizes the overall strength of the signal associated with a defect.

The script works in a similar way to calc_scanspot_image.lsf, but it will only calculate the scattered fields for the illuminating spots inside the integration window to speed up the sweep over W.

### Monitor

The frequency monitor used to collect the reflected fields is placed in between the source and the structure to minimize the effect of source injection errors, inside an analysis group that extracts the grating order information. See Appendix: S parameter extraction for further information.

### Extending structure through boundary

Extend the structure through the boundary condition region (the one mesh cell thick boundary region drawn in a light blue color). This ensures that the material properties are correctly set at the boundary regions, avoiding any artificial periodicity breaking there.

### Mesh uniformity

Each unit cell need to be meshed in the same way. This can be achieved by including a mesh override region covering the entire area of the supercell. Avoid using a mesh override for the defect region only since this will cause an additional periodicity breaking and result in an artificial contribution to the scattering.

## Updating the model with your parameters

Instructions for updating the model based on your device parameters

### Illumination and collection optics

In the script file (calc_scanspot_image.lsf ), the optics for forming the image can be customized by setting

- Illumination polarization (Ein and angle_in) and collection polarizer (output_polarizer and angle_out)
- Illumination filter (NA_in) and collection filter (NA_out_min and NA_out_max)
- Position of illumination spot (x0_illuminatioin, y0_illuminatioin, and z0_illuminatioin) where z position of the focus spot provides an additional defocusing
- Position of spot for k-space plots (x_cent and y_cent)

### Defect structure and underlying structure

When customizing defect structure and the underlying structure in the template file, it is important to check Convergence and make sure

- Defect structure and underlying structure are meshed properly
- Supercell contains an integer number of unit cells of the underlying periodic structure
- Each unit cell is meshed in the same way.

## Taking the model further

Information and tips for users that want to further customize the model

### Custom filters

Custom filters can be created to replace the simple Illumination filter (input_filter) and collection filers (filter_BF and filter_DF) used in the example script file (calculate_standard_image.lsf).

### Additional plane wave basis

In this example, the supercell grating orders for normal incidence are chosen as the plane wave basis. However, there could be other choices. For example, if the supercell size becomes large, it is also possible to select a set of wave vectors based on the diffracted orders for non-normal incidence.

## Convergence

Tips for ensuring that your model is giving accurate results

### Supercell

The supercell must be large enough to provide the required resolution in k-space and avoid near-field coupling between defects. Increasing the supercell size gives a higher

angular resolution of the defect scattering, but also increases the time of the FDTD simulation. Convergence test on supercell size may be performed. For periodic structures it is also important to make sure the supercell contains an integer number of unit cells of the underlying periodic structure.

### Mesh size

Consider refining mesh when the defect or underlying structure is of smaller feature size. However, since we are typically not interested in resolving the exact form of the defect (we just want to know it is present), a particularly fine mesh is not required for the defect. Conformal mesh technology provides additional subcell accuracy as well. Mesh refinement overkill will increase the already long time required to complete simulations in this example.

### Computational resources

Since the S-matrix approach requires a large number of simulations, it is important to use your computational resources as efficiently as possible. Fortunately, in this approach simulations are independent of each other so it is possible to use concurrent computing by setting up your Resource configuration as explained here. Additionally, utilizing High Performance Computing can also further reduce your "time-to-results".

## Additional resources

Additional documentation, examples and training material

### Related publications

- O. Golani, I. Dolev, J. Pond, and J. Niegemann, "Simulating semiconductor structures for next-generation optical inspection technologies", Optical Engineering 55 (2), 025102 (2016)

### See Also

## Appendix

Additional background information and theory

### Optical system simulation

Given a set of input plane waves with amplitudes Ei,jin, the amplitude of the output plane waves that will be collected to construct the image can be found from

where Hin and Hout are the illumination and collection OTFs, and Si,j;n,m is the S-matrix calculated from the FDTD simulations. In the amplitude Ei,jin we can include the phase factor associated with focusing at a spot position rspot in the object plane and also a vector describing the polarization of incident light:

The amplitudes Ei,jout can be used to generate the image according to the particular imaging technique; for example, a standard imaging system used in microscopy is described here. A different technique used in scanning-spot microscope imaging is described in the SRAM structure example.

Using this approach we can simulate the optical system without including it explicitly in the FDTD simulations. Therefore, any changes in the optical system (for example, the numerical aperture) do not require rerunning any FDTD simulation; we can reuse the calculated S-matrix and adjust the OTFs accordingly. As long as the wavelength and structure (including any defects) do not change, the same S-matrix can be used in the optical system simulation

### S parameter extraction

This section describes how to calculate the S-parameters (also called S-matrix) that characterizes the interaction between plane waves and a particular structure.

**Plane wave scattering**

The scattering of plane waves by a 3D structure can be described by a four-dimensional S-matrix, S_{i,j;n,m}, where the two pairs of indices (i,j) and (n,m) describe the in-plane components of the wavevectors for the input and output plane waves, respectively:

$$ \widetilde{\mathbf{E}}_{n, m}^{\text {out }}=S_{i, j ; n, m} \widetilde{\mathbf{E}}_{i, j}^{\mathrm{in}} $$

In the following discussion we consider a situation where a certain structure is placed between two homogeneous media. We also assume the plane of the structure to be the XY plane and the propagation direction to be the z axis. Input plane waves can be incident from above or below, and depending on the configuration we might be interested in the output planes waves transmitted or reflected by the structure. The figure below shows a typical configuration in optical inspection schemes for defect detection: the structure is illuminated from above and the reflected light is collected.

In the S-matrix formalism the structure is effectively replaced by a black-box. This approach is quite useful when we are only interested in the information carried to the far-field by the scattered waves.

In principle, there is a continuum of wavevectors that describes all the possible input and output angles. For numerical calculations we need to choose a finite set of discrete angles. The appropriate choice depends on the system. As explained Important model settings: Supercell approach, a convenient choice of wavevectors for a structure described by a supercell is given by the set of grating orders at normal incidence.

$$\left(\mathrm{k}_{i, j}^{\mathrm{in}}\right)_{\|}=i \frac{2 \pi}{L_{x}} \hat{\mathrm{x}}+j \frac{2 \pi}{L_{y}} \hat{\mathrm{y}}, \quad\left(k_{i, j}^{\mathrm{in}}\right)_{\|} < k_{o}$$

$$\left(\mathrm{k}_{i, j}^{\mathrm{out}}\right)_{\|}=n \frac{2 \pi}{L_{x}} \hat{\mathrm{x}}+m \frac{2 \pi}{L_{y}} \hat{y}, \quad\left(k_{n m}^{\mathrm{out}}\right)_{\|} < k_{o}$$

where L_{x} and L_{y} are the periods of the supercell, and k_{o}=2π/λ_{o} is the norm of the wavevector in the homogenous medium (assuming both input and output waves propagate in the same medium). Note that the number of wavevectors increases with the size of the supercell.

**S parameter extraction in FDTD**

Using the script function gratingpolar we can find the relative strength of the supercell grating orders from the fields collected by a monitor (which can be in the near-field region). For the situation described in the figure above, where we are interested in the reflection, the monitor should be placed above the structure, ideally below the source to minimize the effect of source injection errors. For convenience this monitor can be placed inside an analysis group, and the grating projection can be done using the analysis script. If the monitor is placed between the source and the structure it is important to use the option to set the direction of power flow. For an example of the required script lines, please check the analysis group "analysis" in the simulation file (sram_test.fsp) in this example.

The main results required from the grating analysis are the s and p polarization components of the grating orders. Two additional post-processing steps are required:

- Normalize the results according to the source power by including a factor of √R, where R is the reflected power from the transmission script function.
- Correct the phase so that it is set at a common reference point, the global position (0,0,0) for convenience. This requires undoing the phase from the far-field hemisphere back to the reference point 1m away; a similar phase correction is required for the fields from the plane wave source. Both corrections are illustrated below.

- Plane waves coming from the source are scattered by the structure and we collect the reflection in the far-field.

- The reference for the phase in the far-field is the origin (0,0,0). The structure is not necessarily centered at this position.

- The origin (0,0,0) will be the reference for the S-matrix. We remove the phase accumulated between the source position and the origin and between the far-field hemisphere and the origin.

- The phase correction is included to find the fields of the input and output plane waves as their corresponding wavefronts cross the origin.

These steps have been included in the script (build_S_matrix.lsf), where we also save the final results for the S-matrix in a ldf file for future use, for example when constructing the image expected from a given imaging system.