S-parameter sweep
In this example, we will introduce the S-parameter sweep approach for multi-port parameterized compact models in INTERCONNECT. We assume that the modeled element can be described by a set of S-parameters that are continuous functions of one or more model properties, within a given range of numerical values. For example, consider the compact model of a taper with variable length. The S-parameters (\(S_{11}\), \(S_{12}\), \(S_{21}\), \(S_{22}\)) describing the taper’s optical response are functions of the taper length, which is the model property the user will specify for a simulation.
The basic components of the model are:
- A S-parameter file with the data tabulated for different values of the model properties.
- A parent compound element with the model properties and a setup script with the commands required for loading and interpolating the S-parameter data.
- An optical N port S-parameter primitive inside the compound. The S-parameters for the given model property values are loaded in this primitive as part of the parent’s setup script.
In the following sections we will describe these components in more details and illustrate them with an example of a compact model for a linear taper with variable length and output width.
NOTE: In situations where the model property is a discrete variable (for example, a flag to enable or disable some model feature), the S-parameter sweep approach should not be used. The reason is that this approach uses linear interpolation over the parameter space described by the model properties. For implementing properties with discrete values use the look-up table approach instead. |
S-parameter file:
The format of the S-parameter sweep data file is described in the S-parameter file formats page. It is a text file with tables for each S-parameter (for a given combination of ports) labeled by two header lines that describe the data:
- The tables must include the model property values, light frequencies and the corresponding absolute value, phase and (optionally) group delay of the S-parameter.
- The first line of the header file must include strings with the names of the output and input ports, the mode label and the list of names of the model properties (separated by semicolon). It should also include a string that identifies the S-parameter type (which here can only be “transmission”) and integers for the input mode IDs.
- The second line of the header file specifies the number of rows and columns of the table.
- The number of rows is given by \(M_1 \times M_2 \times \dots M_N \times P\), where \(M_i\) is the number of values that the \(i_{th}\) model property can take and \(P\) is the number of the frequency points.
- For \(N\) model properties, the number of columns is \(N+3\) or \(N+4\), depending on group delay being included or not.
- The group delay is frequency independent and so its values must be the same for all frequencies in a block of fixed values of the model properties.
- For further reference, see the attached example of the S-parameter file used to model a linear taper with variable length and output width.
Create parent Compound Element and Optical N Port S-Parameter primitive:
In the parent Compound Element the model properties can be added to the Property Editor list as shown below:
In the Setup Script define an array with the values of the model properties. This array and the name of the S-parameter file (with the appropriate path) are passed to the script function readnportsparameterat. This function uses linear interpolation to calculate the S-parameters for the values of the model properties. The desired S-parameters are returned as a cell array that can be loaded in the optical N port S-parameter primitive using the setvalue script function. In our example of the parameterized linear taper, this is the setup script used:
sweeppar = matrix(2);
sweeppar(1) = output_width; # output_width is the name of a model property
sweeppar(2) = taper_length; # taper_length is the name of a model property
Scell = readnportsparameterat(%local path% + “/Sparam_taper.txt”, sweeppar);
setvalue(“SPAR_1”, “s parameters”, Scell); # SPAR_1 is the name of the Optical N-port S-parameter primitive
Inside the Compound Element add an Optical N Port S-Parameter primitive and connect it to the Relay ports: