Introduction
Many of the building blocks of a photonic integrated circuit are passive in nature and their input output behavior can be described by a series of scattering parameters (s-parameters). Examples include Y-splitters, MMIs, waveguide crossings, directional couplers etc. Therefore, in order to develop a compact model for such elements, extraction of their s-parameter characteristics is an essential need. Here, we will walk you through our fully automated and convenient s-parameter data extraction flow. The workflow is designed to create data that can be readily used in CML Compiler to create compact models.
Overview
Workflow package
The workflow package consists of the following (see "s-parameter_package_BETA.zip" in "Associated Files" in the upper right corner):
- src: Folder that contains all the necessary encrypted files to run the workflow.
- templates: Folder that contains a template for a y-branch element.
- y_branch_strip_te_c
- input_data: Folder that contains template input data to be updated
- output_data: Folder that contains final data files for CML Compiler.
- working_dir: Folder that contains simulation project files and results.
- run_s_parameter_collection.lsf: Configuration script to launch workflow.
- y_branch_strip_te_c
Requirements
- Required license: INTERCONNECT
- Optional (highly recommended) licenses: FDTD, CML Compiler
- Required version: 2020 R2.4 or higher.
Run and Results
Step 1: Update template files with your data and run workflow
- This workflow performs read/write actions on multiple files during the execution. As such, before running the flow, it is required that the “safe mode” being disabled for all the Lumerical products used by the flow. This includes FDTD, INTERCONNECT and any product you launch the flow from. For information about how to disable “safe mode”, please see the Safe Mode.
- To update the flow with your own input data, please see “Updating the model with your parameters” section below for more detail. You may also proceed with the workflow, using the default/generic data for now.
- Navigate to your desired template folder located under the “templates” directory. (The default template is “y_branch_strip_te_c”).
- Open run_s_parameter_collection.lsf in any Lumerical product (FDTD is recommended) and run the script.
- Depending on which product you run the flow from and your collection settings, you might notice new sessions of FDTD and INTERCONNECT started by the flow. Updates about the current job being run by the flow will be displayed in the “script prompt” window.
- Once the flow is finished running, the s-parameter data will be saved in .txt format in the “output_data” folder inside the template directory. In the default template, the file is named “y_branch_strip_te_c_sparams.txt”. This is the file needed by CML Compiler in order to generate a fixed s-parameter compact model, along with the data file y_branch_strip_te_c.json, which is also generated. Any intermediate files generated by the flow will be located inside the “working_dir” folder of the template.
Step 2: Verify data with diagnostics and visualization
If you have the visualization of output data and diagnostics enabled (see “updating the model with your parameters” for how to), the flow will plot the requested data at the end of the run. Below are a few examples of the visualizations given by the default template for the Y-branch splitter:
Spectral norm of s-parameters for passivity diagnostics
Here you can see that the spectral norm is below 1 across the entire wavelength range before passivity enforcement meaning that the s-parameters all passive and no enforcement is necessary.
Reciprocity diagnostics
In this example, some of the s-parameter pairs are not reciprocal (their difference is non-zero) and thus reciprocity enforcement may be necessary.
Amplitude of s-parameters for each mode
Here you can observe how the raw experimental data for S13 amplitude which is noisy gets smoothed by the workflow through fitting
Phase of s-parameters for each mode
While the amplitude of S13 is taken from measurement in this example, its phase is driven from the simulation run by the workflow as shown in the plot above.
Step 3: Run CML Compiler to generate compact model
After the data required for the compact model is successfully collected by the s-parameter collection flow, you can use CML Compiler to easily generate the compact model needed for your design. Here we briefly describe the steps involved for compact model generation using CML Compiler. For more details about each step, please visit Creating a Custom CML with CML Compiler.
- Prepare the foundry directory. You can use the lumfoundry template if you don’t have an existing directory structure for your library.
- Use the “mmi_1x2_strip_te_c” element from lumfoundry template directory as a guide for inputs that are needed for CML Compiler in order to generate a fixed s-parameter compact model
- Update the source files of the template to include your own data. You can use the generated files: output_data/y_branch_strip_te_c.json and output_data/y_branch_strip_te_c_sparams.txt. Note: The “.json” file replaces the .lsf file. The source of this data is primarily gathered by the workflow from input_data/y_branch_strip_te_c_sparam.lsf.
- Update the XML data file ensuring your element is listed properly according to the required format. Remember to use the “json” file extension in the “parameter_filename”.
- Open the Lumerical launcher and Launch a new project with CML Compiler
- Follow steps in Building a Compact Model Library to have CML Compiler build your library.
- Once CML Compiler is done running, open INTERCONNECT and check the newly created and installed compact model library. It should contain the element you created in the previous steps.
Updating the template with your parameters
As a PDK designer, calibrating the compact model to your process is critical. The template we provide contains generic data. You’d need to update the template with your own input data and collection settings before using the flow. It is recommended to make a separate copy of the template directory (“y_branch_strip_te_c”) and its content for each use case within the “templates” directory of the workflow package rather than editing the template files. Below we describe the steps involved in updating the template with your own data and settings.
Note: For a detailed description of the data input options please explore S-parameter/passive workflow guide. |
Step 1: Navigate to folder with input data.
- Navigate to templates/y_branch_strip_te_c/input_data. Here you will find the following files:
Type | Template file | Description |
---|---|---|
Measurement data | Exp_data.csv | Comma separated file containing experimentally measure data for some of s-parameters |
Configuration file | y_branch_strip_te_c_sparam.lsf | Lumerical script file with configuration settings for spar_fixed photonic model |
Process file | lumerical_foundry_process_file.lbr | Lumerical generic process file containing layer information to build 3D design geometry |
Design layout | y_500.gds | The layout of the design for which data collection is required |
Step 2: Update the measurement data
- Open templates/y_branch_strip_te_c/input_data /exp_data.csv in Excel or a spreadsheet or text editor of your choice. This is the template measurement data. Data is provided for the amplitude of two of the s-parameters (S12 and S13) as a function of wavelength in the units of nm.
- To update the data with your own, simply include any of the s-parameters that you have measured in a separate column and label accordingly. (Alternatively, if you have your own file with the same data format, simply update the name of the input file in the workflow driver script (see step 6) with your own file's name). The label doesn’t have to have a specific format. You can either provide the amplitude, the power (amplitude ^ 2), or the power in dB (10log10(power)) of the s-parameters. They could be as a function of wavelength or frequency. Wavelength/frequency could be with any desired unit. Note that the settings inside the workflow driver file need to be updates as well based on the data format you provide (see step 6).
Step 3: Update the element configuration file
- Open templates/y_branch_strip_te_c/input_data / y_branch_strip_te_c_sparam.lsf in Lumerical script editor. This is very similar to the element config file required by CML Compiler as source in order to generate a fixed s-parameter compact model
- It is important to make sure that the port and mode information are correct here as this data will be used by the flow to setup the simulation and configure the output data.
- For more information about all the parameters included in the config file, please visit spar_fixed - CML Compiler Model.
Step 4: Update the design layout
- Include your design’s layout file (.gds) inside the “input_data” folder.
- Ensure that a layer specific to ports has been added to your layout file
- Make sure that the ports’ location is properly specified in the layout file.
For more information about how to specify ports in the layout, please see S-parameter/passive workflow guide.
Step 5: Update the process file
- Include the process file for your design inside the “input_data” folder. If you don’t have a process file, you can use the provided template process file making sure that layer number/data type for the pattern layers match the corresponding layers in the GDS file.
- Make sure a layer named “Ports” with a matching layer number/data type to the corresponding layer in your layout is added to the process file.
For more information about how to work with and edit a process file, see Layer Builder Simulation.
For more details about the required specifications of the Ports layer in the process file, please see S-parameter/passive workflow guide.
Step 6: Update the workflow driver file
- Open templates/< template name >/run_s_parameter_collection.lsf in Lumerical script editor. This is where the settings for data collection are located and you can change the settings according to your needs. Comments in from for each setting provide useful info about the options and formats.
- Start by defining the file names for output s-parameters and input element config files
- Then if you have experimental data as input, specify details about the format of your data so that it could be properly interpreted. Make sure you indicate what type of data is contained in each column and if it’s s-parameter, to what in/out ports and modes it belongs to.
- config.external_spreadsheet.use determines whether or not external data should be loaded from a spreadsheet.
- config.external_spreadsheet.input_file is a string specifying the name of the input data spreadsheet to load from the input directory.
- config.external_spreadsheet.smooth_data determines whether or not the external data should be smoothed using a polynomial fit.
- config.external_spreadsheet.smoothing_fit_order determines the polynomial order to use for smoothing the external data.
- config.external_spreadsheet.columns is a cell array defining the contents of the spreadsheet columns, so it can be parsed by the flow. Each cell array should be a struct which contains the type field, and some other fields which depend on the type used.
- The type field can be set to “wavelength”, “frequency”, “power”, or “transmission”.
- If the type field is set to “wavelength” or “frequency”, then the cell entry should also contain the field unit, which contains the value of the provided unit in SI units. (1e-9 for nm, 1e12 for THz)
- If the type field is set to “power” or “transmission”, then the cell entry should also contain the fields input_port, output_port, mode_id_in, and mode_id_out, which each correspond to the input and output port and mode IDs.
- Next, decide if you want to use simulated data in your model. If you want to include simulated data in the output, set config.simulation.use to “True”. If you want to run a fresh FDTD simulation from your design layout, choose config.simulation.type to be “FDTD”. If you have a custom simulation file that you want to use instead of the simulation setup generated by the flow, set this to “fsp”. The file has to be located in the working directory and the simulation file name has to be provided by config.simulation.sim_filename. The simulation configuration in this file such as the number of ports, modes, and the s-parameter sweep should match the settings provided in the flow configuration. If you already have simulation results from a previous run, set this to “external”. This will load the already simulated s-parameter data from the working directory or from the “input_data” folder depending on their availability. The latter is useful if you want to bring the data from another external simulation but in the format that is compatible with the flow (Lumerical optical N port s-parameter format). Alternatively, you can set config.simulation.run to “False” to avoid running a new simulation. Finally, in case you need to check the simulation setup generated by the flow to ensure accurate simulation results, you can set config.simulation.output_simulation_setup to “True”. This will generate a simulation file (.fsp) in the working directory with the name specified in config.simulation.sim_filename.
- If you need to run FDTD simulation, the following settings are important to set:
- config.simulation.gds_filename: specify the input gds file name located in “input_data” folder
- config.simulation.gds_cellname : specify the cell name used in the GDS for the design
- config.simulation.gds_ports_layer_number: Layer number:data type used for the ports layer in the GDS.
- config.simulation.gds_wg_layer_number: Device layer number in the GDS (usually waveguide layer). This is the layer that best represents the geometry of your design so that the flow could interpret its properties such as dimensions
- config.simulation.process_filename: specify the input process file name located in “input_data” folder
- config.simulation.modes: Mode numbers to be selected for simulation. If not provided (commented out), fundamental TE and TM modes will be selected. For single mode collection, in most cases this should be set to 1 for TE and 2 for TM.
- config.simulation.lambda_min: Minimum wavelength for simulation in the units of nm
- config.simulation.lambda_max: Maximum wavelength for simulation in the units of nm
- config.simulation.lambda_points: Number of simulated s-parameter wavelength points within the simulation range
- config.simulation.autosymmetry: Enable/disable the auto symmetry feature for s-parameter sweep in FDTD to reduce number of simulations. This is especially useful for layouts with symmetry in port location. For more information about this feature see S-parameter matrix sweep utility.
- config.simulation.bc_<x,y,z>_offset: Boundary condition offset from the edge of the design in each direction in the units of nm. If not provided (commented out), will be set automatically to recommended setting. It is recommended to set the offset to 0 along the direction in which the light is getting injected by the ports. This will avoid any back reflection from close-ended waveguides where the ports might be located. For example, if the ports are oriented such that the light will travel along the X axis (say left to right), the X offset is recommended to be 0 and Y,Z offsets to be non-zero).
- config.simulation.ports_span: The width of the ports in the units of nm. If not provided, will be set automatically to recommended setting. This will be applied to all the ports identically.
- config.simulation.source_ports: List of the ports from which light should be injected (source ports). If not provided, all the ports will be excited. Useful if you don’t need to obtain s-parameters for all the combinations of ports.
- config.simulation.mesh_accuracy: Mesh accuracy level of the FDTD solver. The template has this set to minimum (1) which is not recommended for accurate simulation. The higher the number, the more accurate the simulation at the expense of longer runtime
- config.simulation.z_mesh_points: Number of mesh points in z direction across the thickness of structure. If not provided, will be set automatically to recommended setting. This is to ensure that the waveguide thickness is properly resolved by the mesh.
- config.simulation.mode_samples: Number of mode samples over the wavelength range. If not provided, will be set automatically to recommended setting. More than 1 sample is required for the cases where the mode profiles are expected to vary significantly across the simulation wavelength.
- config.simulation.group_delay: Set to true for including the group delay in the output s-parameter.
- config.simulation.reinterpolate_data: Set to ‘true’ for reinterpolating the data for the number of frequency points specified by target_samples below. Useful in case you want to downsample the output data to reduce the size
- config.simulation.target_samples: Target number of samples for reinterpolation of s-parameters over the wavelength range
- config.simulation.create_plots: Set to ‘true’ for showing plots of the s-parameters after the addition of group delay for verification.
- If you want to test and/or enforce physicality on your s-parameter data, the following settings are available. For more information about these options, please see the Appendix section.
- config.enforcement.use determines whether or not the enforcement module should be used.
- config.enforcement.passivity is a string which specifies whether or not passivity enforcement should be applied, and which type to use. Options are “ignore”, “test”, “enforce”, “enforce-sep”, “optimal”, “optimal-sep”.
- config.enforcement.reciprocity is a string which specifies the whether or not reciprocity should be enforced or checked. Options are “ignore”, “test”, and “enforce”.
- config.enforcement.passivity_tolerance is a value which sets how far below one the spectral norm of the final data should be at all frequency points…
- config.enforcement.reciprocity_tolerance is a value which sets how much reciprocity can be violated in the final model.
- The workflow is equipped with a visualization module which is intended to visualize how model data changes throughout the processing steps in the flow.
- config.visualization.use determines whether or not the visualization module should be used. Set this to false if you don’t want visualizations to pop-up when the workflow is run.
- config.visualization.plot_s_parameters determines whether or not single s-parameters should be plotted, depicting how each parameter changes from the various processing steps in the flow.
- config.visualization.s_parameters is a cell array containing the IDs of the s-parameters to display when plot_s_parameters is set to true. Each element of the cell array should be a vector with 2 elements which contain the output port followed by the input port of the parameter of interest.
- config.visualization.mode_id is a number containing the output mode of the s-parameter visualizations
- config.visualization.plot_phase determines whether or not the s-parameter phases should be plotted in addition to the s-parameter amplitudes. Set to false if the s-parameter phase is less important to visualize.
- config.visualization.plot_cross_mode_parameters determines whether or not cross-mode s-parameters should be plotted.
- config.visualization.plot_norms determines whether or not the spectral norm of the device should be plotted during the [passivity enforcement processing](#Passivity Enforcement) step.
- config.visualization.plot_reciprocity determines whether or not the reciprocity of the device should be visualized during the [reciprocity enforcement](#Reciprocity Enforcement) step.
Note: The S-parameter collection workflow currently doesn’t support simulation of elements that require light injection into different planes for the ports such as Si-SiN transitions and grating couplers. |
More background information
What data do I need for my compact model?
- S-parameters as a function of wavelength/frequency for TE and/or TM modes
- Group delay (optional)
How do I get this data?
- To ensure the accuracy of the compact model, the data should be from experimental measurements as much as possible
- The amplitude of s-parameters for all or some combinations of ports is the easiest to measure experimentally and are recommended to be supplied through measurements
- Phase and group delay could be challenging to measure in some cases and thus could be provided from simulation if required
How can the workflow help me with this?
-
Combines simulated and experimental data in order to generate a complete dataset for your compact model
-
Generates all the files you need for an spar_fixed compact model in CML Compiler
-
Not enough data? The workflow can automatically run simulations for your design to supplement your data where it’s missing
-
Not sure how to setup the simulations? The workflow can setup and run the simulations for you with recommended settings
-
Is my s-parameter data physical? The workflow offers passivity and reciprocity enforcement on the s-parameter data to ensure its physicality
-
Noisy experimental data? The workflow will smooth your data using fitting
-
Want accurate simulation based on foundry process? The workflow can take in foundry process file in order to generate the design geometry according to foundry process