This section describes the Eigenmode expansion solver (EME) propagation analysis in MODE, once the physical structure and the simulation region have been defined. Furthermore, it is possible to calculate the S-matrix as a function of wavelength using a perturbative method, which assumes the mode profile does not change significantly with wavelength. While this method is approximate, it captures accurately the phase changes with wavelength within a small wavelength range. Therefore, it is appropriate for applications where the wavelength dependence of the quantity of interest is mainly due to the phase change rather than the mode profile change. Examples of these applications are: waveguide Bragg gratings, fiber Bragg gratings and MMIs.

It also makes it possible to calculate the group delay of the device.

The EME analysis window can be opened by pressing the run button which will calculate the modes at each cell of the EME solver region, changing the simulation to Analysis mode. In Analysis mode, we can use the EME analysis window to propagate the fields and calculate scattering parameters (s-matrix) for the structure. The propagation distances and periodicity can be changed in analysis mode, and the fields can be propagated without having to recalculate the modes. In addition, it is possible to compare the s-matrix results for different number of modes (up to the number used in the simulation), without having to recalculate the modes.

### EME propagation

When you press the “eme propagate” button it calculates the S-matrix of the device using all the current settings shown in the EME Analysis Window. It also optionally calculates diagnostics (fast and slow), updates monitor data and calculates the group delay of each element of the S matrix. The calculation of monitor data, group delays and slow diagnostics can add substantial time to the calculation, so they should only be checked if desired. The results are attached to the EME solver object in the object tree and are available there (or in the Results window) for visualization. They can also be obtained in the script with the getresult command.

### Cell group definition

The cell group definition section shows the location of the cell groups and the span between each cell group in a tabular format. This information will be the same as in the EME setup tab of the EME solver object that was set up while in Layout mode. From here, the group spans and subcell method for any cell group can be modified, and the fields and s-matrix can be propagated using the new settings with the "eme propagate" button (without having to recalculate the modes at each cell).

After propagating, the results from any EME profile monitors and index monitors, as well as the s-matrix results from the EME solver object can be viewed in the Result View tab or by right-clicking on the object in the Objects Tree and visualizing the results. See the Result View page for more information.

### Select source

The select source section allows you to select the input source port and the mode to inject at the input port. The source amplitude can also be set here. These settings will be used to propagate the fields for the field profile monitor results, but they will not affect the S-matrix results.

The field data returned by EME profile monitors will be normalized as though the amplitude of the source mode is equal to the value set in the amplitude setting in units of V/m.

### Check neff for calculated modes

After the modes at each cell are calculated, users can visualize the effective index of the modes at any cell. To do this, just find the cell in the object tree and select it, then right-click andchoose visualize ==> neff, the visualizer window will pop up with real(neff) as the vertical axis and the number of modes in the cell as horizontal axis (in default it is labeled as "n", the natural number). To visualize imag(neff) in the same figure, users can click "duplicate", and then in the "scalar operation" column choose "Im", or simply choose “None” in the “scalar operation”. If the " CORRECT BACKWARD PROPAGATING MODES " is checked, one may find some modes that have negative real(neff) because otherwise they will have gain. The detection and correction of modes that have gain, which is related to the correct selection of forward or backward propagating modes is described at solver physics of FDE and advanced options.

The figure below shows real(neff) and imag(neff) of the modes in a cell, where the axes labels are modified:

The green line shows imaginary part of neff which corresponds to the loss, and the blue line shows the real part of neff, which corresponds the phase velocity. One can see that for some lossy modes, the wave has a negative phase velocity as real(neff) is smaller than 0, even though it is a forward propagating, evanescently decaying mode.

### Override periodicity

Selecting the override periodicity option allows the user to change the number of periods of any periodic regions that have been defined in the EME setup tab. The new monitor and s-matrix results can be obtained by clicking on the "eme propagate" button, without having to recalculate any modes.

When using this option, the periodic sequence that is defined in the tabular format in the override periodicity section will be shown in the cell group sequence box. For example the sequence shown in the image below indicates that there are three cell groups and the second cell group is repeated ten times.

This feature can be used for scanning the number of periods of a device such as a Fiber Bragg Grating.

Warning: Cell group periodicity and EME profile monitors EME field profile monitors should not be used with the Cell group periodicity feature. EME profile monitors will not correctly reconstruct the field profile when Cell group periodicity is used. |

### Override wavelength

You can override the wavelength at which the modes were calculated which is defined in the EME solver, and define a new wavelength at which to calculate the S-matrix. This calculation is done using a perturbative approach and is approximate but it can be highly accurate when the new wavelength is close to the original wavelength and the change of the mode profile with wavelength is not crucial (see description at the top of this page).

### Override max modes

This allows you to calculate the S matrix using a smaller number of modes than what was calculated. It will limit the number of modes used in each cell to the maximum number specified. This is useful for convergence calculations as this tool is very useful for convergence testing as shown in Convergence testing for the EME solver.

### Error diagnostics

Selecting "update monitors" will refresh the result for all monitors with the latest propagation settings. Users can also choose to include two types of error diagnostics, see EME error diagnostics for more details. Note that selecting these settings may increase the propagation time.

### Propagation sweep

The propagation sweep tool can be used to sweep the periodicity or span of a cell group in order to scan the length of different regions of the device. This tool allows the results for a range of spans to be calculated without having to recalculate the modes at each cell. To set up the sweep, select the cell group whose length will be varied, and set the start and stop lengths of the cell group, and either the length interval between each sweep point, or the number of points to sweep over in the range.

After running the sweep using the "eme sweep" button, the "visualize eme sweep" button will open up a visualizer showing all the elements from the user s-matrix over the cell group length.

See the Spot Size Converter getting started tutorial for an example of how this is used

### Wavelength sweep

The wavelength sweep allows you to sweep the S-matrix as a function of wavelength by specifying a start and stop wavelength and a number of points to calculate. After performing the calculation, use the “visualize wavelength sweep” button to view results, and use the "export to INTERCONNECT" button to export the S-matrix to a file that can be loaded into the Optical N Port S Parameter element in INTERCONNECT.

When doing the calculation, users can select the "calculate group delays" option to extract the group delay from the simulation. The group delay is calculated based on the EME settings. Then users can tick the "calculate group delays" box to include the group delay in the export file, the linear phase attributes by the group delay will be removed from the phase information in the export file in this case.

As mentioned above, this calculation is done using a perturbative approach that can be highly accurate under the circumstances described at the top of this page. This is useful for rapid optimization but the S-matrix should eventually be calculated using a full EME calculation at each wavelength to verify the accuracy of the approximation.

### Mode convergence sweep

The mode convergence sweep tool can be used to compare the s-matrix calculated with different number of modes in the EME cells. This tool is very useful for convergence testing as shown in Convergence testing for the EME solver. To set up the sweep, select the first number of modes used in the sweep (start mode) and the interval by which the number of modes will increase (mode interval). The sweep will go from start mode up to the number of modes currently selected when running the simulation (in steps given by mode interval). To run the sweep click on the "mode sweep" button; note that modes are not recalculated, so this operation will usually be fast. Finally, click on the "visualize mode sweep" button to open up a visualizer showing all the elements from the user s-matrix as a function of the number of modes used in the EME cells (see note below).

If the number of modes is not the same for all cell groups, the sweep will go up to the largest number of modes. The number of modes will be increased for all the cell groups simultaneously. When the maximum number of modes available for a cell group is reached, the results for higher number of modes will use the maximum number of modes for that cell group, while the number of modes for the other group cells will keep increasing up to their corresponding maxima. For example, if there are two cell groups with 10 and 20 modes, the mode convergence sweep will go up to 20 modes, but when increasing the number of modes between 10 and 20, 10 modes will be used for the first cell group (where the maximum number of available modes is 10).

Warning: Minimum value of start mode In order to visualize all the elements of the s-matrix (with the labeling shown in the S-matrix index mapping table) start mode must be equal to or larger than the maximum number of modes in all ports. For example, in the port configuration described by the screenshot above, start mode must be at least 3, so that the sweep results are shown for all 6x6 elements of the s-matrix. |

### S-matrix mapping

The values in the user s-matrix are related to the transmission and reflection coefficients between ports and modes that are selected in the ports. See the Ports section for more information about setting up ports in the EME solver region. The size of the user s-matrix will depend on both the number of ports and the number of modes selected at each port.

Since the size of the user s-matrix can be large depending on the number of ports and selected modes, the S-matrix index mapping will show a table which can be used to map the user s-matrix indices to the modes and ports of the structure. The left index of the S-parameter is the output mode, and the right index is the input mode.

**Example 1:** Two ports, and one mode per port, which results in a 2x2 user matrix.

- S11: Reflection coefficient for output Port1, Mode1 from input Port1, Mode1.
- S12: Transmission coefficient for output Port1, Mode1 from input Port2, Mode1.
- S21: Transmission coefficient for output Port2, Mode1 from input Port1, Mode1.
- S22: Reflection coefficient for output Port2, Mode1 from input Port2, Mode1.

Note: The mode1 at port 1 is a different physical mode from mode1 at port2. This is easy to understand when you remember that the waveguide at port 1 can have a different size from the waveguide at port 2. |

**Example 2:** Two ports. Two modes of interest have been selected for each port, resulting in a 4x4 user matrix.

- S11: Reflection coefficient for output Port1, Mode1 from input Port1, Mode1.
- S12: Reflection coefficient for output Port1, Mode1 from input Port1, Mode2.
- S21: Reflection coefficient for output Port1, Mode2 from input Port1, Mode1.
- S22: Reflection coefficient for output Port1, Mode2 from input Port1, Mode2.
- S31: Transmission coefficient for output Port 2, Mode1 from input Port 1, Mode1.
- S13: Transmission coefficient for output Port 1, Mode1 from input Port 2, Mode1.