Ferroelectric modulator / BTO analysis group


Hi all,
i would like to use the analysis group named “BTO” in the ferroelectric_modulator.fsp file, which uses a setup script to add the BTO film with permittivity perturbation due to an applied electric field, for the design of structures with an arbitrary geometry.
Is there a way to access the geometrical features of this analysis group, e.g. for structures with cylindrical shape?
Best regards,


Hi @Sebastian,

The analysis group “BTO” in the ferroelectric modulator example takes the electric field data from a DEVICE Charge simulation. This data is collected at the Electric Field Monitor “E_field” in the DEVICE simulation and it is used to define an imported primitive with n-k data. This primitive can only be rectangular but we can etch parts of it using overlapping structures with a smaller mesh order so that they take precedence over the import primitive.

This is probably easier to understand with an example: ferroelectric_modulator_modFG.fsp (3.6 MB). I modified the original example and added a cylinder (with regular dielectric material) inside the BTO layer. In the BTO analysis group I had to modify line 151 of the setup script to increase the mesh order of the import primitive to 2; for the cylinder, on the other hand, I set the mesh order to 1; thus, the cylinder takes precedence over the import primitive, and so permittivity perturbation is applied there.

This would be one way of changing the shape of the region where the permittivity perturbation is applied. The other option would be to modify directly the n-k values in the setup script of the “BTO” analysis group. For example, you could apply the perturbation only to a particular region of the import primitive. In the setup script the perturbation is created by using the n-k values from the matrix n_diag_3D (line 148):


You can modify this matrix directly. If you prefer this method I can provide an example as well.


Hi @Sebastian,

I’m trying to use a rectangular shape for BTO similar to the attached file. However, the moment I try to change the thickness or position of BTO or make multiple rectangular shapes to get what is shown in the attached file, then the whole layer as well as its subgroups “matrix transform” and and “BTO_imported” disappear. Can you help me with that?




How are you changing the thickness of the BTO? Are you doing this inside the setup script of the analysis group “BTO”? Can you share your simulation file to get a better idea of the changes you made?


Dear @fgomez

Thanks for your reply. Attached is the device simulation file that I’m using and I’m trying to make the exact same thing in FDTD. I tried changing the size and position of BTO layer through the analysis group but it does not work. I need a clad layer of BTO on my structure and I tried making it by having 3 BTO analysis group and changing the direction and position/thickness of each.

Also, I wonder if I can use the same structure (BTO as a clad layer on my structure) but in a ring resonator structure?




The main problem was in the setup script for the BTO analysis group in the FDTD simulation. The original script was designed having in mind electrostatic field data for multiple bias points. However, in your case you have only one bias data point, so a slight change in the script is necessary. The cause of the issue is a script line were the pinch command in removing the dimension associated with the bias points. The solution is to treat the cases with single and multiple bias points in the imported data differently, as I did in lines 37-43:

# extract E field distribution
E = electrostatics.E; # E has dimensions [L,3,1,bb,1] where the second dimension corresponds to the component (Ex, Ey, Ez), and bb correspond to bias voltages
E = pinch(E); # remove singleton dimensions to get [L,3,bb]

if (length(size(E))>2){
E = pinch(E,3,bias_point); # choose data from bias point #!#

After this change the script is more general and can deal with imported data that has both single and multiple bias points.

Regarding the problem of getting the right shape for the BTO region, you can use the approach described above based on the mesh order of multiple objects. These were the steps I followed:

  1. I set the size of the BTO analysis group to be large enough to cover the BTO region (see lines 51-53 of the setup script).
  2. In the DEVICE CT simulation I made the electric field monitor “E_field” that collects the electrostatic data slightly larger than the dimensions from the previous step. This ensures that you have data in the region of interest and by making it larger you avoid interpolation issues with the interptri script function.
  3. I added a structure group “clad” just like you did in your DEVICE CT simulation to include the SiO2 cladding.
  4. I set the mesh order of the import object in “BTO” to be 3 (see line 165 of the setup script) and made sure the SiO2 rectangles in “clad” and the Si rectangles “crystalline_si” have mesh order 2. In this way the oxide cladding and the silicon waveguide have precedence over the BTO.

With these changes the index monitor results show the expected behavior: the cladding and the waveguide have their usual index, and the index perturbation is only applied to the physical region of the BTO. I wanted to point out that the index perturbation seems quite large in some “hot spots” of the electrostatic field. This is probably due to the large voltage you used in the DEVICE CT simulation (100 V). You should be careful with these hots spots as they will require a very fine mesh for the optical simulation.

Hope this helps!


Dear @fgomez

Thanks for your reply. I tried what you mentioned for BTO, however I can’t still get to have the BTO region right. I have attached both my FDTD and Device files, where I apply a voltage and through the electrostatic field, I’m trying to look at BTO index change and by the carrier charge density, I want to look at silicon’s index change. I have couple of problems doing so that I appreciate if you could help me with:

  1. The BTO region in FDTD and in Mode doesn’t look right. Somehow after running the file, the two sub-section (Matrix transform and BTO_imported) disappear.

  2. I need to look at the overlap integral of the electrostatic field (obtained using device) and my optical mode in the waveguide. I did not find any example in the Luemrical library. Could you advice me on how to do so?

  3. To calculate the impedance of this device (for RC time constant considerations), which module do you recommend to use? Device or the impedance in Mode?

Thanks in advance,



Sorry for the wait. We were quite busy the last couple of days.

After you ran DEVICE simulations, make sure that you are exporting E field profile and saving it in in the same directoryas FDTD simulation file. Then, in FDTD make sure that the name of the imported file on BTO analysis group matches the exported file :

Matrix transform attribute is not defined in MODE solver, thus you will not be able to use BTO analysis group in MODE. You can use FDTD to find the mode profile. You need to add mode source in FDTD ( I noticed that FDTD simulation file does not have any source) which will allow you to calculate the mode profile similar to MODE. Please refer to this link for more information.

Unfortunately, in my best knowledge, we don’t have such a capability. One workaround will be to export your results (from DEVICE and FDTD) into MATLAB file and then do post processing.

My colleague, @aalam, will provide response on your third question.

I hope this was useful.


Hi Behzad,

Thanks, I’m not sure if you checked my simulation files that were attached
but the file name is not a problem. I use the exact same names in both
DEVICE and FDTD. However, my BTO analysis group is still not working
correctly. As I said the two sub-section (Matrix transform and
BTO_imported) do not show up.

Please let me know how to fix it,



Dear @fgomez,

Can you please help me with this?




Sorry for the wait, we had a long weekend here!

Yes, I checked all the files. Here is how you can fix the problem for FDTD simulations. As you can see, BTO analysis group is missing BTO-imported and matrix transform:

Run the final-optimization.ldev file to create WG_Efield.mat file. Then from Edit tab of BTO analysis group in final-optimization.fsp, click on test button:

You should be able to seeBTO-imported and matrix transform objects now:

I hope this solves the problem.



Hi Behzad,

I did the same and it still does not show the BTO-imported and matrix
transform object. When I test the code in the BTO analysis group this is
what I get:

Error: prompt line 153: the matrices for addattribute do not have the
correct size to match the dataset

Could this be why I don’t see the BTO-imported and matrix transform object?
Could you please send me the files that you have in case you modified them
to fix the issue?




What version of the software are you using? Can you please upgrade it to the latest version?

I ran the simulation files that you have attached (no modification) and here is the .mat file that I imported into FDTD:
WG_Efield.mat (685.9 KB)

This file is saved using the latest version (sorry, I forgot to attach it earlier). I don’t think that there was an error with older versions, but it is a good idea that both of us are using the same version to avoid unreported bug(s).

Please keep me updated with your findings.


Hi Behzad,

I upgraded to the latest FDTD version and now the sub-groups are showing.

Could you please have someone answer my last question? “To calculate the
impedance of this device (for RC time constant considerations), which
module do you recommend to use? Device or the impedance in Mode?

Also, is it possible to run a FDTD file through my DEVICE script file? I
want to run an optimization, to define my figure of merit, I would need a
FDTD file to run and give me a matrix for my calculation of FOM.

Please let me know,



Hi @SHSHAHIN, You can use the CHARGE solver in DEVICE to calculate the capacitance of your structure. The capacitance calculation should be very similar to the capacitance measurement of this siscap example in KB (https://kb.lumerical.com/en/index.html?modulators_siscap_modulator.html).

Since your device is basically a simple capacitor I think the resistance value will depend on the source resistance and the contact resistance of the fabricated device.