The parameterized S-parameter model data collection wizard allows you to automatically generate s-parameter compact models using Ansys Lumerical CML Compiler™ based on the sparsweep_pcell photonic model, using a parametrized s-parameter sweep text file.
Required licenses
- Ansys Lumerical CML Compiler license (For direct export of compiled INTERCONNECT models)
- Ansys Lumerical FDTD™ license (For running the input file generation script)
Preparing input file
Required format
The input must be a text file formatted according a sweep s-parameter file for an Optical N Port S-parameter as shown in the S-parameter file format Knowledge Base article. You can define the file with or without the port names and location header.
Input file generation script (optional)
A script is included with this article inside the /Sweep Files/ directory in the example zip file for automatic generation of the parameterized s-parameter input file. This script supports up to 9 different design variables for the parameter sweep, and automatically runs the sweep to generate the parameterized s-parameter file in the required format.
Configure the script using the instructions below.
- Create an Ansys Lumerical FDTD™ project with a s-parameter sweep and desired geometry.
- Open the project file and the generation script file, and configure the gd flag to enable or disable group delay calculations.
- Enter the name of the s-parameter sweep under the variable sparsweep_name.
- Define the sweep parameters to sweep by adding elements into the cell array. An example configuration from the attached script is shown below
# Define the parameters to sweep as a cell array of structs
parameters = cell(2); parameters{1} = struct; parameters{1}.name = "W_in"; # Parameter name parameters{1}.object = "::model"; # Object path in the model parameters{1}.property = "W_in"; # Property to sweep parameters{1}.values = linspace(0.45e-6,0.75e-6,3); # Example: [8e-6, 9e-6, 10e-6] parameters{2} = struct; parameters{2}.name = "W_out"; parameters{2}.object = "::model"; parameters{2}.property = "W_out"; parameters{2}.values = linspace(1e-6,2e-6,3); # Example: [1e-6, 1.5e-6,2e-6] s_parameter_filename = "taper_pcell_spar.txt"; # Output file for s-parameter data - Define the output text file name using the variable
s_parameter_filename.
Script configuration is now complete, and you can run the script to generate the input file for this wizard.
Starting the wizard
The S-parameter (parameterized) data collection wizard package files are attached to this article. The attached files include the main wizard package as well as packages containing examples. Important files are as follows:
- Configuration file: The JSON file in the wizard zip file
/wizard/spar_par_wizard/gui_config.jsoncontains default configuration for this wizard. Ensure that thelumapi_pathvariable points to thelumapi.pyfile included with Lumerical products. You can find the default paths here. - Wizard scripts: The folder
/wizard/within the wizard zip file contains all necessary files to run this tool. You can start the wizard by running the python script named main.py under/wizard/spar_par_wizard. - Examples: Several example input files are available in the example zip file.
- The
/Sweep files/folder in the examples folder contains a sample project and the input generation script. You can run the script with that project to generate the text file used as the input to this wizard.
- The
Wizard interface
Model settings
The first page of the wizard contains general settings for the generation of the parameterized s-parameter compact model.
Element Info: Enter the description, prefix, and any notes for the model in this section. You can add multiple notes using the “Add Note” and “Delete Note” buttons.
QA: Configure the wavelength range used for the parameterized s-parameter quality assurance test.
Simulation File: Choose the text file the wizard will use to build the compact model.
After configuring model data, press “Next” to extract s-parameter information from the input file and proceed on setting up the ports and output for the model.
Output settings
The second page of the wizard contains confirmation of model information and output settings for the model.
Element information: The scrollable top section of the window contains model information:
- The “General Info” subsection displays description and notes you inputted on the previous page.
- The “Port” subsection is automatically populated from the text file if you have defined them in the header. Otherwise, default values are used. You can adjust the names, locations, positions, and order using the interface in this subsection.
- The “Simulation Settings” subsection displays wavelength, mode, and group delay information. The wavelength range and mode information is automatically extracted from the exported s-parameter file. If group delay information is available as indicated by the header section of the s-parameter file, it is also included in the compact model. The group delay status indicates whether group delay is detected.
- The “Parameters” subsection displays the detected parameters of the s-parameter file. The minimum and maximum values are extracted using the value within, and you can set the default value for the compact model. You can also set the kind of each parameter, which determines its units. The “NonQuantity” kind allows units to be blank.
Element Name: Enter the desired element name in this field.
Icon: Choose an optional icon (.svg) for the element. This is optional.
Library Mode: Pick the execution mode of the wizard, the selections are as follows:
- Build INTERCONNECT Model: Generate compiled INTERCONNECT model in the
/wizard/folder of the script. You can import this model into INTERCONNECT by right clicking the “Custom” folder in the Element Library, and use “Redirect” to point to the location of the compiled models. - Add to Existing CML Database: Add extracted information into an existing CML database by selecting a master JSON file. When you select this option, an entry is added to the selected master JSON file, and model JSON files along with the icon (if specified) are added into the
/source/folder of the compact model library. You can then use CML Compiler to compile all models in that library.
Note: When you generate the compact model, numerous model parameters other than those extracted from the simulation file and those specified in the wizard are set to their default values. You can adjust the value of all model parameters prior to compilation by selecting “Add to Existing CML Database” and then modifying the model JSON file in the /source/ folder of the compact model library.
CML Compiler Path: Select the path to your cml-compiler executable file. After you select its path for the first time, the wizard uses the last entry for subsequent runs.
Once you have confirmed the model data, press “Execute” to complete generation of the compact model.
See Also
Automated model data collection overview
S-parameter (fixed) data collection wizard