How to sweep over the MMI length in a 2x2 MMI splitter



Hi @bkhanaliloo,

I am designing a 2x2 MMI splitter and I am using the scripts to define the whole device structure, FDTD region and to obtain the transmission “T”. The whole device structure consists of a MMI core, with tapers on both sides followed by the waveguides.
Within the script, when I change the length of the MMI core, the whole device structure along with the defined FDTD region extends or reduces (based on increasing or decreasing the MMI core length) and thus the the out put transmission “T” values also changes. This verifies that the scripts are working fine.
But when I run the sweep script, and in that script when I sweep the parameter (length of MMI), then only the MMI core changes and NOT the whole device structure. This should NOT be the case.
Can you please help me with this ? I can also share my scripts if you want ?

Thanks a lot.
Saurabh Bedi.

Extracting s-parameteres for a Directional Coupler and import in Interconnect

Hi @sbedi

Are you using the script under the model or within analysis group? and how you sweep over the length of core region? If the simulation is parametrized, then changing a parameter can modify the core length and simulation span, however, if you are selecting only the core length in the sweep object then simulation span might not get updated.

Please upload your simulation file for a review if this did not solve the problem.


Hi @bkhanaliloo, Thanks for your comments. I have few things for you to assist me with.

  1. I am using the script in the “script editor section” and not in the model nor analysis group. I am attaching my simulation file. please look into it and help me out. MMI_Sweep_Test.lms (279.7 KB)
    Is it better to use the script under Model OR Analysis section rather than using it in “script file editor” section in terms of obtaining the results out of parameter sweeps? Please guide me how to use script in Model OR Analysis section?

  2. While using EME solver for designing MMI with different power splitting ratio, if we increase the length of one of the output waveguide as compared to the other one such that ‘port 2’ of EME solver is bisected by only one waveguide. Then does that mean, that abs(s21)^2 gives the normalized power intensity coming out of only one waveguide ? Since, in example at Lumerical website under the EME solver examples, the output intensity obtained is from both the output waveguides.
    In other words, will it be true to say that if one waveguide reaches the port of EME, then the power obtained is from that output waveguide only and the second output waveguide doesn’t contribute in anyway? For instance, I am designing MMI with power splitting ratio of 95/5 and I am getting 0.95 Transmission [abs(s21)^2] at output then that 0.95 is only from one waveguide?

  3. I can see in the Lumerical KX, there is an option to run frequency sweep in EME analysis window in MODE:
    but when I add an EME solver, I couldn’t find it. Please guide me how to add the Frequency sweep option in EME solver.

Thanks a lot.


Hi @sbedi

  1. The file that you attached only includes the geometry. Can you please check and make sure that you have attached the correct simulation file?
    If you are using script to set the simulation file and your geometry is not parametrized, then changing the length of the waveguide in the sweep object will not impact other simulation objects. Thus, I will recommend you to set the simulation from Model or analysis groups.

  2. I think that is correct. That’s being said, I will need to see the simulation file to check and make sure simulation settings are correct.

  3. This feature is added recently. Make sure that your software is up to date. Please visit the link below for more details:
    New fast broadband EME feature


Hi @bkhanaliloo,

I have formed the structure group by defining script in the script section of structure group and defining all the parameters in the parameters section of the structure group. Please guide me whether I need to use the same script in the “Model: Setup: Script” section ?
I am attaching a new file and the scripts along with it which I have used. materials script to define the all the materials, varFDTD_MMI to define the simulation region, varFDTD to call the already defined simulation region in structure group and sweep_script to run the script.
Please have a look.

MMI_StructureGroup_Script.lms (430.4 KB)
varFDTD.lsf (2.0 KB)
varFDTD_MMI.lsf (2.6 KB)
materials.lsf (2.7 KB)
sweep_script.lsf (982 Bytes)


Hello @sbedi

I think you are on the right track. The problem right now is that you try to set the length of MMI (Lmmi) from MMI structure group in the sweep object. A same parameter, however, is also defined in the “model” and overrides any changes in the MMI structure group. This means that you re not essentially doing any sweep over the MMI length. If you chose the Lmmi from “model” in the sweep, you will be able to sweep the MMI length but varFDTD simulation region will not get updated and you will face a problem like below:


To fix the problem, the best approach would be to set the entire simulation objects directly in “model” where the length of varFDTD simulation region also gets updated with MMI length.

We have used EME to simulate a 1\( \times \)2 MMI coupler. Since a sweep over MMI length can be done directly from EME analysis tab, we have parametrized only MMI. However, for varFDTD simulations you will need to parametrize the simulation region as well.

Hope this was helpful.

Error in FDTD: File could not be found

Thanks. It worked @bkhanaliloo !!
Also, please suggest me whether EME solver will be a good option to simulate a MMI with the core having different geometry (not rectangular) ? something like this:

For the tapers its conventional to use CVCS subcell method in EME (as there is a linear change in the propagation direction) but can we use it for this sort of structure ?



Hi @sbedi

I think you can still use one group span with CVCS option for the entire geometry. As a sanity check, you can then divide the core section to 4 cell groups and compare the results. If they were different please share the simulation files for a review.


Hi @bkhanaliloo,

I want to achieve the 92/8 splitting ratio in output arms. I first used the one group span with CVCS option for the MMI core and obtained the 92/4 splitting ratio at the length of 113.514um. Then for sanity check, I divided the MMI core section in 4 parts (each with CVCS option) but I was not able to get the same splitting ratio. I am attaching my files for review which include .lms file and scripts used to define the geometry. We can make changes in the EME script to define either 1 or 4 sections of the core.

Please check. Waiting for your response.
EME.lsf (1.1 KB)
materials.lsf (2.7 KB)
MMI_92_08_BF.lsf (7.1 KB)
MMI_taper.lms (366.4 KB)


Hi @bkhanaliloo,
Also please clear me one more thing that, when we use EME and in the results we look at the abs(s21)^2 value to know the exact power coming out of the output waveguide while designing MMI. Is that similar to varFDTD transmission (T) OR abs(T)^2 ?



Hi @bkhanaliloo,

I would really appreciate if you can help me with the issue at the earliest as possible. Waiting for your response.
I appreciate your help.



Hi @sbedi

abs(S21)^2 is equal to the transmission. Please visit the link below for more details:

Regarding your simulations there are a few things to note:

  1. Port 2 collects all the fields in both waveguides. How do you separate the fields in each waveguide to calculate the splitting ratio? In our MMI coupler example (, we can place two ports on each waveguide or use offset feature to place port only in one waveguide. Please visit the link below for more details:
    Evanescent waveguide couplers model issue

  2. You need to perform convergence testing:
    For example, in your case you use only one cell in each group span. As a results you are not capturing the wavy shape of the core section. Please follow the convergence testing steps and make sure that results are converging.

Hope this was helpful.


Hi @bkhanaliloo,

  1. I used one output taper waveguide at once and calculate all the fields and the output power coming out of it. Once this waveguide give me 0.92 transmission, then I enable the other output 2 and disable output 1. then obtain 0.08 transmission (s21^2). that’s how I calculated the 92/08 splitting ratio. Is it correct ?

  2. I increased the number of cells to 20 in a single cell group for the entire MMI section. Now I was able to achieve the wavy shape and results were also somewhat convincing. Also I performed the convergence test and check the number of minimum modes for each cell. Convergence test showed me 12 modes to be minimum.

  3. Now I am trying to design the 72/28 MMI with a rectangular MMI Core but not able to achieve the desired splitting ratio. Can you help me with that ? What could be the best possible approach to achieve the desired ratio ? I have attached the script files for you to to define the materials, design and setup EME solver. Also I have added the txt. files to define the material stack.
    Will appreciate your help !!


EME_28_72.lsf (1.4 KB)
MMI_29_71_taper.lsf (6.2 KB)
materials.lsf (2.7 KB)
SiN_C2MI.txt (507 Bytes)
SiO2_Bottom_C2MI.txt (512 Bytes)
SiO2_Upper_C2MI.txt (511 Bytes)


Hi @sbedi

  1. This technique will work if there is no coupling between the output waveguides. A more sustainable approach is to use separate monitors in each waveguides.

  2. Great!

  3. Can you please share any references that discusses how you can design a 2 \(\times\) 2 MMI coupler with arbitrary power splitting ratios? I found some references but they were for different geometries.


Hi @bkhanaliloo,

  1. Thanks for suggestion. I am using 4 separate monitors now.
  2. The references for N x N arbitrary splitting ratio MMIs are attached along.
  3. For 72/28 MMI, I am using the same approach as mentioned in these references and via EME (with 4 seperate ports) I am able to achieve 72/28 splitting ratio around 57um long taper. But total power transmission from both arms is 96% instead of 100%. This means there are some losses in the design which needs to be corrected. If you can help me with that ?
  4. When I define the EME solver region in the Model section using the script then I am not able to define all the ports. I get a following error: "Warning: prompt line 264: no objects matching that name were found.
    Error: prompt line 266: in set, no items are currently selected". I have attached my script along. Please correct me where I am wrong and what needs to be changed.

Thanks a lot.

EME setup script_SB.txt (8.4 KB)
Arbitrary coupling ratio multimode interference couplers in SOI.pdf (482.7 KB)
bachmann1995.pdf (894.4 KB)
New 2x2 and 1x3 MMI couplers with free selection of power splitting ratios.pdf (934.8 KB)


Hi @sbedi

Since you were missing the material, I had to use the materials available in material library:

material_Clad = "SiO2 (Glass) - Palik";
material_BOX = "SiO2 (Glass) - Palik";
material_SiN = "Si3N4 (Silicon Nitride) - Kischkat";

I am seeing very different results:

Please share the simulation file that contains the material data so that I can see the expected ratio.

Errors are because you have commented out the lines for adding the ports (line 263 and 276). Also make sure that port3 is located on the right by adding the line below:

set("port location", 2);


Hi @bkhanaliloo,

If you will look back in our conversation thread, I have attached the materials.lsf file along with 3 text files containing the refractive index data for Silicon nitride and oxide layer above an below. If all 4 are saved in same location, the script calls the material txt. files. There should not be a problem with that.
If you still have a problem, let me know. I will upload the file.

Regarding the EME setup script in MODEL, I still get the error. Please look at the snapshot below:

I did not exactly followed you, what do you mean by commenting out ? what needs to be done to evict this out ? An interesting thing is that even though the script shows an error, 4 separate ports are defined in the structure.

Waiting for your early response !!



Hi @sbedi

I have attached the script file that I used to setup the simulation file:

EME setup script_SB.lsf (8.1 KB)

I ran the simulation file and visualized the results. Currently, I am not seeing the 28/72 ratio that you mentioned. There are around ~20% transmission to each output port:

If you look at the plot in log scale, there are lots of scattering from interference region:

The error should not happen. This is probably a bug, but for the moment you can ignore it.