Go to www.awrcorp.com
Back to search page Click to download printable version of this guide.

3.2. Data File Formats

The NI AWR Design Environment suite supports the following data file formats. Information specific to each format is presented.

3.2.1. DC-IV Data File Format

The DC-IV data file format is a Microwave Office-specific format used for reading DC-IV curves. You can use this format to display measured or simulated IV curves. You can also use it in conjunction with simulated IV curves and the IVDELTA measurement to help optimize a model to match measured IV curves.

The following rules apply to DC-IV data files:

  • Files must have a *.ivd extension.

  • The "!" character is used for comments, and comments may be inserted only before the data. Comments persist until the end of the line.

  • The IV data must be complete; any empty items in the data matrix produce an error.

  • The units for DC-IV files are always amps.

The following is the IVD data format.

m
n
   C1  ... Cn 
X1 Y11 ... Y1n
.	.		.
.	.		.
.	.		.
Xm Ym1	   Ymn

where:

  • m = The total number of swept values (typically the x-axis and IV plot)

  • n = The total number of stepped values (typically the family of curve value)

  • C1 to Cn = The values for the steps; these are the identifiers for the IV curve steps

  • X1 to Xm = The x-values for the graph

  • Y11 to Ym1 = The y-values for the graph for the first stepped value

  • Y1n to Ymn = the y-values for the graph for the nth stepped value

The following example shows the format of the data file.

   8
   4
   0.0025   0.005   0.0075   0.01  
   1   8.5180e-02  9.2429e-02  9.4740e-02  9.5573e-02  
   2   1.5191e-01  2.1142e-01  2.1916e-01  2.2175e-01  
   3   1.5228e-01  2.6085e-01  3.3270e-01  3.4631e-01  
   4   1.5243e-01  2.6114e-01  3.5031e-01  4.2712e-01  
   5   1.5258e-01  2.6141e-01  3.5066e-01  4.2814e-01  
   6   1.5273e-01  2.6167e-01  3.5102e-01  4.2857e-01  
   7   1.5289e-01  2.6193e-01  3.5137e-01  4.2900e-01  
   8   1.5304e-01  2.6219e-01  3.5172e-01  4.2943e-01 
    

3.2.2. DSCR Data File Format

In the DSCR data file format the data is in rows and columns. The values available for each parameter are arranged in columns. The BEGIN DSCR DATA line is followed by the % format line that specifies the names of dependent variables. The first column is always treated as a string; other columns are real, integer, or string, depending on the first row of data.

The first column, under the Index heading in the following example, contains entries used to identify each row in the file. These entries can be an integer or an alphanumeric identifier, and can be considered a list of specification numbers (or part numbers). For example, the data file data/stdvalues15.dscr is arranged as follows:

    REM stdvalues15.dscr 
    BEGIN DSCRDATA 
    % INDEX A12 A13 
    1 1000 1000 
    2 1000 1200 
    3 1000 2200 
    4 1200 1000 
    5 1200 1200 
    6 1200 2200 
    END DSCRDATA

After the data file is imported, you can access the rows/columns of the data file the same way you access the text data files. You can plot directly to a graph using the PlotRow and PlotCol measurements, and using them in an equation with the DataFile and DataFileCol built-in functions.

3.2.3. Generalized MDIF Data File Format

The NI AWR Design Environment suite supports the Generalized Measurement Data Interchange Format (GMDIF) for arbitrary blocks of data, as well as Load Pull specific subsets. Arbitrary data blocks allow for graphical visualization of any data in the GMDIF formatted file, and can be used with measurements in the Data category. The following is a syntax example of an arbitrary data block and rules for the formatting.

The following rules apply to GMDIF data files:

  • Files must have an *.mdf or *.mdif extension.

  • The "!" character is used for comments, which you can insert anywhere in the data file. Comments persist until the end of the line.

  • GMDIF files cannot have more than 7 parameters, or an error is issued.

  • GMDIF supports any number of ports.

  • The NI AWR Design Environment software can interpolate between GMDIF variables if they are defined as numeric type.

  • The format line in GMDIF specifies the order of the data columns.

VAR var1 = 0                          ! First parameter value               
VAR var2 = 0                          ! Second parameter value
Begin ARB1                            ! Arbitrary data block name (can be user defined)
%INDEX   DataName1 DataName2          ! Data format line, must provide Index and data column names
1 0.5 0.75                            ! Data values
2 0.25 0.35
End

VAR var1 = 0
VAR var2 = 1
Begin ARB1
%INDEX   DataName1 DataName2
1 1.5 1.75
2 1.25 1.35
End

For a description of the Load Pull subset formats of GMDIF, see “Load Pull Specific GMDIF Formats”

3.2.4. Load Pull Specific GMDIF Formats

To use this load pull functionality, the load pull data must be written as a generalized MDIF data file that conforms to relatively strict conventions (this restriction enables a much simpler use model for end users). Until load pull vendors can write this format natively, conversion scripts are provided to convert the various load pull files into this format. Two types of load pull files are supported. The first type specifies the measured a and b waves taken from the measurements. This format is preferable because it provides the most flexibility in use. The second type of file writes final measured quantities directly (such as output power, or PAE).

3.2.4.1. A/B Wave Format

The following are design decisions to consider for A/B wave format:

  • Any number of swept dimensions can be supported, but there is a fixed set of 'inner' sweeps that must conform to a standard convention to allow the software to intelligently manipulate the data. These sweeps are:

    • Swept Impedances, over source or load and at one or more harmonics

    • Sweeping over more than one variation adds a dimension to the data set produced

    • Swept input power

    • Swept fundamental frequency

  • The VAR variables that are repeated for each MDIF data block should only represent variables that are swept in an outer sweep.

    • Any fixed quantities will be written in a header block

Impedance Sweeps

Since the actual measured quantities of interest are computed from the A\B waves, the sweeps over values that are computed from the A\B waves are represented by integer indexes. Sweeps over impedance values are represented by a single index dimension into all the impedance values (so 1d sweep for the 2d impedance data). The variable names used to represent the swept quantities must conform to guidelines for correct interpretation. The following shows all of the valid swept variable names that you can use to represent an impedance sweep in the MDIF file. To make the indexes consistent with the UI, the range should start from 1.

  • iGammaL1 (index into gamma load values at the fundamental frequency)

    • iGammaL1 is required as a listed variable in the header even if the quantity is not swept

  • iGammaL2 (index into gamma load values at the 2nd harmonic frequency)

  • iGammaL3 (index into gamma load values at the 3rd harmonic frequency)

  • iGammaS1 (index into gamma source values at the fundamental frequency)

  • iGammaS2 (index into gamma source values at the 2nd harmonic frequency)

  • iGammaS3 (index into gamma source values at the 3rd harmonic frequency)

Power Sweeps

Since the input available power is computed from the A/B waves, you use an index to represent the power sweep (to avoid the ambiguity of potentially mismatched data, and to also keep the data regular if input power varies over the impedance points).

  • iPower (index into the swept input powers)

    • iPower is required as a listed variable in the header even if the quantity is not swept

Frequency Sweeps

The fundamental frequency can be swept. If it is swept, a real valued sweep is used for the frequency. The value should always be written in Hz.

  • F1 (fundamental frequency - if the fundamental frequency is not swept, then this value should be included in the HEADER block)

Arbitrary Sweeps.

Any variable can be swept but there are some naming requirements. If the quantity being swept can be derived from the A/B waves (e.g. power) or DC voltages/currents then the variable name must be prefixed with an “i”. If the quantity being swept cannot be derived from the A/B waves then the variable name must be prefixed with an “r”.

MDIF Data Blocks

The following data blocks must be used within the data file.

  • HEADER - Use to write properties that are global to the entire file. Certain values in this block are required. The data is written as columns of values, with no VAR values for the block.

    • index - This is a dummy independent variable value, but you can use it to store multiple values in the header versus an index. Typically, there is only one row of values in the HEADER though, with an index value of zero.

    • F1(1) - Fundamental frequency, this should only be included if the data is not swept over the fundamental frequency (if it is swept, the values are in swept VAR value for the ABWAVES block)

    • GammaS1(3) - Source gamma at the fundamental harmonic. If not specified, 0.0 (matched to Z0SOURCE) is assumed. The values in the file are in two columns (real and imaginary). If a source pull is done the data is in the ABWAVES block, so this value should be omitted for that case.

    • GammaS2(3) - Source gamma at the 2nd harmonic. If not specified, 0.0 is used.

    • GammaS3(3) - Source gamma at the 3rd harmonic. If not specified, 0.0 is used.

    • Z0(3),Z0SOURCE(3),Z0LOAD(3) - Defines the characteristic impedance for the source and load. If Z0 is defined, then it is used for both Z0SOURCE and Z0LOAD. Any impedance that is not defined is assumed to be 50 ohms.

    • VERSION(2) - Optional string

    • DATE(2) - Optional string

    • TC(1) - Optional temperature in Celsius

  • ABWAVES (represents the A/B waves swept over harmonics, if there are any. The DC data and source impedance data may also be included in this block). The column names for the data must be one of the following. Note that all complex values have a "(3)" as part of the name, and are represented as two columns of data each.

    • harm(1) - real value used to indicate the harmonic frequencies (real needed for multi-tone mixing products). The harmonic frequency is harm*F1

    • Vn(1) - DC voltage, where n is an integer, so V1, V2, and so on...

    • In(1) - DC current, where n is an integer, so I1, I2, and so on...

    • an(3) - complex a wave, where n is an integer, so a1 or a2

    • bn(3) - complex b wave, where n is an integer, so b1 or b2

    • GammaS(3) - complex source gamma for swept input impedance, this column is optional

You can use the following optional blocks within the data file:

  • Data Information - This optional block is a departure from the standard MDIF format and is used to remove redundant information and reduce file size.

    • Contains independent variable names.

    • Contains ABWAVES block data column names and order.

    • Contains indicators of which data locations have data and which do not ("V" for "valid data" and "M" for "missing data").

    • Wrapping of data on rows is not supported, so a single row of data must be on a single line.

The following is a compact file format example of swept source impedance, swept power, and swept fundamental at 3 harmonics. It shows 80 gamma points and 10 power sweep points at 2 fundamental frequencies (most data omitted).

!Header block contains any globals
       BEGIN HEADER
       % index(0) NHARM(0) Z0(3)
       1 3 50 0 
       END
       
       
       !Data information section provides the order of the independent variables, the data column names, and indicators of which
       !data locations have data and which do not. 
       !The "V" and "M" markers in the data locations indicate whether the data for that row / column exists in the file
       !For example, in this format the DC data is missing from any non fundamental harmonic row
       VAR<> F1(1)
       VAR<> iGammaS1(0)
       VAR<> iPower(0)
       BEGIN<> ABWAVES
       % harm(1) a1(3) b1(3) a2(3) b2(3) V1(1) I1(1) V2(1) I2(1) GammaS(3)
       V V V V V V V V V V
       V V V V V M M M M V
       V V V V V M M M M V
       END<>
       
       
       !Each ABWAVES block is at a single power, single load gamma, and value of any other independent variable
       2200000000
       1
       1
       1 0.016071 -0.044884 0.016069 -0.04488 -2.5955E-9 -9.2932E-10 -0.00054637 0.001526 -0.3 -2.9985E-7 3 0.00031172 -0.7882 0.11756
       2 -5.1706E-16 5.6353E-16 7.0943E-10 6.5099E-10 -8.1252E-11 9.8919E-11 0.00012418 0.000102 0 0
       3 4.5067E-17 6.5676E-17 1.3167E-10 -9.0948E-11 -2.0453E-17 -3.4216E-17 -6.9098E-11 4.1305E-11 0 0
       
       2400000000
       1
       1
       1 0.016071 -0.044884 0.016069 -0.04488 -2.3655E-9 -8.4697E-10 -0.00054637 0.001526 -0.3 -2.9985E-7 3 0.00031172 -0.7882 0.11756
       2 -4.6804E-16 5.0985E-16 7.0943E-10 6.5099E-10 -7.3566E-11 8.9561E-11 0.00012418 0.000102 0 0
       3 4.0258E-17 5.8263E-17 1.3167E-10 -9.0948E-11 -2.633E-17 -4.3811E-17 -9.8466E-11 5.9177E-11 0 0
       
       :
       :
       2400000000
       80
       10
       1 0.0068691 -0.030403 0.0068685 -0.0304 -1.7581E-9 -3.9723E-10 -0.00023354 0.0010336 -0.3 -2.9992E-7 3 0.00029871 -0.8882 0.19021
       2 -2.7557E-16 5.4537E-16 6.8674E-10 3.4703E-10 -2.3525E-11 4.9402E-11 6.2016E-5 2.9531E-5 0 0
       3 1.4528E-16 1.2253E-16 2.4974E-10 -2.967E-10 -2.026E-17 -2.2086E-17 -4.4603E-11 4.0916E-11 0 0

3.2.4.2. Derived Quantity Format

The format used for this type of load pull data attempts to conform to the A/B wave format. The following are design decisions to consider for derived quantity format:

  • Since the derived quantities never make sense measured at the harmonics, the freq dimension is not part of this format.

  • The input power can be the independent variable for each data block.

  • To avoid the issue with the input power changing over different impedance values, a similar iPower index is used for the power sweep, and the actual input power is represented as dependent data value.

  • It is important to use the same independent sweep names (for example, iGammaL1, iPower, or F1), but not all the dependent column values need to conform to a standard (the standardized derived names and values listed in the table that follows should be used for the recognized quantities).

  • You should set the value for harm to allow for recovery of the harmonic/intermod frequency as described for the A/B wave file format.

Standard Derived Values

When possible, you should use the standard derived value names and unit conventions (as shown in the following table). Conforming to these conventions allows these values to be recognized and displayed with correct units, and also makes it possible to use the values in other automated calculations. It is important that any recognized quantity in the table is written in base units. If the values are not written as base units, the automatic assignment of unit types on read-in causes the values to be scaled incorrectly.

This optional block is a departure from the standard MDIF format and is used to remove redundant information and reduce file size. It contains independent variable names, LPDATA block data column names and order, and indicators of which data locations have data and which do not ("V" for "valid data" and "M" for "missing data").

The following is a compact file format example of swept load impedance, swept power, and swept fundamental at 3 harmonics. It shows 80 gamma points and 10 power sweep points at 2 fundamental frequencies (most data omitted).

!Header block contains any globals
BEGIN HEADER
% index(0) NHARM(0) GammaS1(3)
1 3 50.0 0.0
END

!Data information section provides the order of the independent variables, the data column names, and indicators of which
!data locations have data and which do not. 
!The "V" and "M" markers in the data locations indicate whether the data for that row / column exists in the file
!For example, in this format the DC data is missing from any non fundamental harmonic row
VAR<> F1(1)
VAR<> iGammaL1(0)
VAR<> iPower(0)
BEGIN<> LPDATA
% harm(1)  GammaL(3) PSrc_Ava(1)  PLoad(1)  G_Power(1)  PAE(1)
V          V         V            V         V           V
V          V         M            V         V           V
V          V         M            V         V           V
END<>

!Each LPDATA block is at a single power, single load gamma, and value of any other independent variable
1.5e9
1
1
1.  .555     .555   -10.0   12.676037   0.132988    12.203945
2.  .655     .755           13.626342   0.240446    13.067126
3.  .755     .755           14.254252   0.316895    14.516464
 
1.5e9
2
1
1.  .155     .155   -9.0    15.676037   0.432988    15.203945
2.  .255     .255           16.626342   0.540446    16.067126
3.  .355     .355           17.254252   0.616895    17.516464

 
:
:
2e9
80
10
1.  .555	 .555   5.0	    12.676037	 0.832988	12.203945
2.  .555	 .555   0	      12.626342	 0.840446	13.067126
3.  .555	 .555   0	      12.254252	 0.816895	16.516464

Calculated Values

This table shows the calculated values that are automatically computed from the A/B wave format. For the derived value format, the values in the file should match the conventions (names and units) of the values in the table. The De-embed Support column shows which values can be de-embedded from a derived value load pull file. All de-embed operations require GammaL and PLoad. Additional values needed for other quantities are shown in the table.

Name SPL Mapped Name LPC Mapped Name Derived Value File Support Type Unit De-embed Support Description
GammaL<harm> gamma_ld<harm> Gamma/Phase[deg]   complex none Yes Reflection coefficient of the load
GammaS<harm> gamma_src<harm>     complex none No (not applicable) Reflection coefficient at the input of the device
PLoad Pout_dBm Pout[dBm]   real dBW Yes Power delivered to the load
PLoadT N/A N/A   real dBW Yes Total power delivered to the load, including harmonics
PDC       real Watts No DC power dissipated in the device
PAE Eff_% PAEff[%]   real % Yes (requires PDC or PSrc_Del) Value for 100% would be 100
Drain_Eff Drain_eff OutEff[%]   real % Yes (requires PDC or PSrc_Del) Value for 100% would be 100
G_Trans Gt_dB Gain[dB]   real dB Yes Transducer power gain
G_Power Gp_dB     real dB Yes Operating power gain
G_Compress     Yes real dB No (not applicable) Gain compression measured as the ratio of G_Trans over swept power relative to the initial G_Trans value (linear, or lowest power gain).
G_CompressMG     Yes real dB No (not applicable) Gain compression measured as the ratio of G_Trans over swept power relative to the highest G_Trans value (max gain).
PSrc_Ava Pin_avail_dBm Psource[dBm]   real dBW No (not applicable) Power available from the source
PSrc_Del Pin_deliv_dBm Pin[dBm]   real dBW No (not applicable) Power delivered to the device from the source.
AMPM       real Radians No Angle of b2/a1 (typically plotted over swept power)
AMPM_Offset       real Radians No Angle of b2/a1 - Angle of b2/a1 at the lowest power sweep point
Compress_1db     Yes real dBW Yes Pload value at the 1db compression point (this measurement gives the same value at all power sweep points)
Compress_2db     Yes real dBW Yes Pload value at the 2db compression point (this measurement gives the same value at all power sweep points)
IMD C_up_dBm, C_lo_dBm, I3_up_dBm, I3_lo_dBm   Yes real dB No Intermodulation distortion measured as the ratio of Pload at the nearest fundamental to Pload of the selected harm value. Choosing the low side fundamental for the harm value gives the worst case third-order IMD of all possible tone combinations, and choosing the high-side fundamental for the harm value gives the best case third-order IMD of all possible tone combinations.
IPN     Yes real dBw No Output intercept point measured as a function of Pload at the nearest fundamental to Pload of the selected harm value. The tone order (for example, 3rd order or 5th order) used in the intercept point calculation is automatically determined based on the selected harm value. Choosing the low-side fundamental for the harm value gives the worst case third-order IPN of all possible tone combinations, and choosing the high-side fundamental for the harm value gives the best case third-order IPN of all possible tone combinations. Note that the selected iPower value determines which power level is used for the intercept point calculation. Since intercept point is an extrapolation based on an amplifier operating in a linear range (where the fundamental output power increases 1 dB with a 1 dB increase in input power and the 3rd order intermod product output power increases 3 dB with a 1 dB increase in input power) selecting an iPower value higher than 1 is risky. This functionality is included so that IPN can be calculated correctly with measured data that is dynamic range limited on the intermod products (and, thus, for lower power levels the assumptions about a 1 dB increase in fundamental input power do not lead to a 3 dB increase in third-order intermod power).
IIPN     Yes real dBw No Input intercept point measured as a function of Pload at the nearest fundamental to Pload of the selected harm value. Calculated as IPN - Transducer Gain of the fundamental. The tone order (for example, third-order or fifth-order) used in the intercept point calculation is automatically determined based on the selected harm value. Choosing the low-side fundamental for the harm value gives the worst case third-order IIPN of all possible tone combinations, and choosing the high-side fundamental for the harm value gives the best case third-order IIPN of all possible tone combinations. Note that the selected iPower value determines which power level is used for the intercept point calculation. Since intercept point is an extrapolation based on an amplifier operating in a linear range (where the fundamental output power increases 1 dB with a 1 dB increase in input power and the third order intermod product output power increases 3 dB with a 1 dB increase in input power) selecting an iPower value higher than 1 is risky. This functionality is included so that IIPN can be calculated correctly with measured data that is dynamic range limited on the intermod products (and, thus, for lower power levels the assumptions about a 1 dB increase in fundamental input power do not lead to a 3 dB increase in third-order intermod power).

3.2.5. Generalized MDIF N-Port File Format

The NI AWR Design Environment suite supports a second subset of the MDIF (Measurement Data Interchange Format) file format call the Generalized MDIF format (GMDIF). The NI AWR Design Environment GMDIF files, which have a .mdf extension, allow importing S-parameters which vary with frequency and with one or more named parameters. They are used in conjunction with parameterized subcircuits, in which the subcircuit's parameter names and values are automatically assigned to match those contained within the GMDIF file when the subcircuit is associated with the file. You can create these text files manually using any text editor, or with automated tools capable of producing GMDIF files as output.

The following rules apply to GMDIF data files:

  • Files must have a *.mdf extension.

  • The "!" character is used for comments, which you can insert anywhere in the data file. Comments persist until the end of the line.

  • GMDIF files cannot have more than 7 parameters or an error is issued.

MDIF and GMDIF formats differ as follows:

  • GMDIF supports any number of ports. MDIF only supports 2 ports.

  • The NI AWR Design Environment software can interpolate between GMDIF variables if they are defined as numeric type. MDIF format cannot be interpolated.

  • The format line in GMDIF specifies the order of the data columns. (In MDIF the order is fixed, independent of the format line.)

For GMDIF files, the VAR definitions have different types-- integer, double, and string. For the VAR settings in the files, you can specify types several ways:

  • (0) is integer

  • (1) is double

  • (2) is string

  • If not set and no quotes, then number

  • If not set and quotes, then string

The following are examples of the different types. The first two are double type and the last two are string type.

  • VAR Vc_mA(1) = 30

  • VAR Vc_mA = 30

  • VAR VC(2) = 30mA

  • VAR VC = "30mA"

The type only matters if you want to interpolate between the values. To interpolate, the values must be double or integer type.

3.2.5.1. Using GMDIF in a Schematic

When using a GMDIF file in a schematic, by default, the values are all the discrete values in the file. If a combination of values does not have data, a simulation error results. The following simple MDIF file is an example.

 VAR mag=0.25
VAR Phase=0
Begin ACDATA
# GHz S MA R 50
% F   N11X  N11Y
1	0.25	0
End

VAR mag=0.25
VAR Phase=180
Begin ACDATA
# GHz S MA R 50
% F   N11X  N11Y
1	0.25	180
End
VAR mag=0.5
VAR Phase=0
Begin ACDATA
# GHz S MA R 50
% F   N11X  N11Y
1	0.5	0
End

When used in a schematic, the values available for the "mag" parameter are 0.25 and 0.5 and the "Phase" parameter is 0 and 180. Notice that there is not a block defined for mag=0.5 and Phase=180. If you set the parameters to these values, a simulation error results.

By default, you select the discrete values set in the MDIF file as shown in the following figure.

You can enable interpolation such that you can enter any numeric value or assign to a variable and the results are interpolated between the actual data points. You can change the interpolation settings globally by choosing Options > Project Options to display the Project Options dialog box, clicking the Interpolation/Passivity tab, and then selecting Enable parameter interpolation. You can make the same setting local to each data file by right-clicking the data file and choosing Options to display the Project Options dialog box, clicking the Interpolation/Passivity tab, and then ensuring that the Use project defaults check box is cleared to allow you to select Enable parameter interpolation.

3.2.6. MDIF File Format

The NI AWR Design Environment suite supports a subset of the MDIF (Measurement Data Interchange Format) file format. The NI AWR Design Environment MDIF files, which have a .mdf extension, allow importing S-parameter and noise figure data which varies with frequency and with one or more named parameters. They are used in conjunction with parameterized subcircuits, in which the subcircuit's parameter names and values are automatically assigned to match those contained within the MDIF file when the subcircuit is associated with the file. You can create these text files manually using any text editor, or with automated tools capable of producing MDIF files as output.

The following rules apply to MDIF data files:

  • Files must have a *.mdf extension.

  • The "!" character is used for comments, and comments may be inserted anywhere in the data file. Comments persist until the end of the line.

  • MDIF files only support two-port files.

When MDIF files are used in schematics, the blocks of data are sorted by various rules. You can change the order by right-clicking the file in the Project Browser under the Data Files node, choosing Options, and then clicking the MDIF Files tab to change the sorting rules. For more information on this dialog box, see “Data File Options Dialog Box: MDIF Files Tab ”.

3.2.6.1.  MDIF File Structure and Syntax

An MDIF file consists of one or more data blocks. Each data block is associated with one or more named parameters (independent variables). Data blocks can refer to S-parameter data or optional noise figure data. Basic MDIF syntax contains four reserved words:

  • VAR begins an independent variable definition line, in the form VAR<name>=<value>. You can use VAR statements to specify data that varies with one independent variable, or to specify multidimensional data, (data that varies with two or more independent variables). A VAR statement must have a name on the left side; the value on the right side can be a number or an alphanumeric string.

  • BEGIN <blockname> signals the beginning of a data block.

  • END signals the conclusion of a data block.

  • REM or the "!" character at the beginning of a line signifies a comment.

You can create the MDIF file by manually combining separate S-parameter (.s2p) files, provided the required MDIF format elements are inserted appropriately. Multiple sets of data (ACDATA and NDATA) are used with VAR statements before each data block. The file data set is made up of one or more such data blocks, each separated by a BEGIN and END statement. For .mdf files, only ACDATA and NDATA are allowed.

The MDIF file format follows:

REM MDIF Basic Syntax Example
    VAR TEMP = value1			/! first parameter, first value
    VAR AGC = value_a			/! second parameter, first value
    BEGIN ACDATA					/! required AC data block
    ....
    ....ACDATA block data lines
    ....
    END
    BEGIN NDATA					   /!optional noise data block
    ....					         /!same parameter values as above
    ....ACDATA block data lines
    ....
    END
    VAR TEMP = value2					/!first parameter, second value
    VAR AGC = value_b					/! second parameter, second value
    BEGIN ACDATA				
    ....
    ....  block data lines ....
    ....
    END

The following is the ACDATA block and NDATA block for various data points (2-port with 50-ohm S-parameters):

	
	BEGIN ACDATA
	# AC ( GHZ  S  DB  R  50  FC 1  0  )
		%F  n11x   n11y  n21x  n21y  n12x  n12y n22x  n22y
	!	 RF-freq S11-db S11-deg S21-db S21-deg S12-db S12-deg S22-db S22-deg
		1.0000		-15	45	-8	25	-20	-12	-15	10
		2.0000		-16	25	-9	30	-20	-12	-15	20
		3.0000		-17	-10	-10	35	-20	-12	-11	30
	END 
	BEGIN NDATA
	# GHz           S          MA           R         50
		%F 	nfmin	n11x	n11y	rn
		1 	2.50 	0.7 	-5 		190
		2 	2.60 	0.75 	-8		180
		3 	2.70 	0.8 	-12 	170
	END

The option line syntax "# AC ( GHZ S DB R 50 FC 1 0 )" sets frequency units to GHz, 2-port parameters to S, 2-port parameter format to dB, reference impedance to 50 ohms, and output frequency equal to the input frequency (Fout = 1* Fin + 0). You can also use option line syntax identical to .SnP files. This is demonstrated in the following example. The format line "% F n11x n11y n21x n21y n12x n12y n22x n22y" specifies how the column ordering of the file is associated with the elements of the S-parameter matrix. Ordering must be identical to the .S2P file format regardless of the contents of the format line. Reference impedance in the option line must be 50 ohms. For 10-port and more the column names should display as "% F n11x n11y n21x n21y n12x n12y n22x n22y ..........n9_10x n9_10y n9_11x n9_11y.....n10_1x n10_1y n10_2x n10_2y..."

3.2.6.2.  Complete MDIF File Example

The following shows an example of a complete MDIF file:

	!Single parameter MDIF Datafile
	!Shows .S2P-style option line syntax
	VAR Vg = -1
	BEGIN ACDATA
	# GHz           S          DB          R         50
		%F 	n11x 	n11y 	n21x 	n21y 	n12x 	n12y 	n22x 	n22y
		10  -0.091484   60.432  24.417   -117.09   -77.086  66.176   -2.9307    73.43      
		15  -0.10407   -91.037  24.933     63.704  -76.552 -111.41   -3.749    -155.06     
		20  -0.096309   49.786  23.801   -118.37   -77.66   68.134   -3.9473    88.734 
	END
	BEGIN NDATA
	# GHz           S          MA           R         50
		%F 	nfmin	n11x	n11y	rn
		10 	1.2		0.6 	50 		30
		15 	1.3 	0.65 	45		40
		20 	1.4 	0.67 	40	 	50
	END
	VAR Vg = 0
	BEGIN ACDATA
	# GHz           S          DB          R         50
		%F 	n11x 	n11y 	n21x 	n21y 	n12x 	n12y 	n22x 	n22y
		10    -0.096681   60.419  27.417   -119.16   -78.057  64.121  -5.3158   76.657     
		15    -0.11014   -91.038  27.684    66.848   -77.772 -108.24  -6.7222  -162.43     
		20    -0.10081    49.771  26.501   -121.75   -78.93   64.792  -7.0243   97.234   
	END
	BEGIN NDATA
	# GHz           S          MA           R         50
		%F 	nfmin	n11x	n11y	rn
		10 	2.2		0.8 	70 		110
		15 	2.3 	0.81 	71		122
		20 	2.4 	0.82 	72	 	135
	END
	VAR Vg = 1
	BEGIN ACDATA
	# GHz           S          DB          R         50
		%F 	n11x 	n11y 	n21x 	n21y 	n12x 	n12y 	n22x 	n22y
		10     -0.63853  -146.02  -1.0349   -134.35   -76.251  45.718   -9.0561  86.985     
		15     -0.52831   26.267  -1.7256     40.229  -76.941  -139.66  -10.646   174.8      
		20     -0.97244  -130.81  0.68099   -125.8     -74.535  54.346 -10.764  123.07   
	END
	BEGIN NDATA
	# GHz           S          MA           R         50
		%F 	nfmin	n11x	n11y	rn
		10 	1.8		0.5 	-180 		220
		15 	1.9 	0.55 	-171		133
		20 	1.7 	0.64 	-166	 	43
	END

3.2.7. Raw Data File Format

The raw data format is used to read N-port network data files written as rows and columns of data in a text file. The raw data format provides an easy method for importing data from spreadsheets, math programs, or test equipment. It is also useful for importing files that are close to, but not true Touchstone format files.

The format of the data in the rows and columns is specified by right-clicking the Data Files node in the Project Browser and choosing Options to display the Data File Options dialog box. Click the Raw Data Format tab to specify the format of the data, then click OK . For more information about this dialog box, see “Data File Options Dialog Box: Raw Data Format Tab ”.

The following rules apply to raw data files:

  • Files must have a *.prn extension.

  • A "!" character is used for comments, and comments are only allowed before the data if you are specifying one matrix per line. Otherwise, you cannot include any comments in the file.

  • The numbers in a row of data must be separated by spaces or tabs.

  • All raw data files in a single project must use the same raw data file format.

  • The raw data format does not support noise parameters.

The following example demonstrates a sample 2-port data file read using one matrix per line, row major data, and a real imaginary format:

f1 ReS11 ImS11  ReS12 ImS12  ReS21 ImS21  ReS22 ImS22
f2 ReS11 ImS11  ReS12 ImS12  ReS21 ImS21  ReS22 ImS22
f3 ReS11 ImS11  ReS12 ImS12  ReS21 ImS21  ReS22 ImS22

The same example using column major data order displays as:

f1 ReS11 ImS11  ReS21 ImS21  ReS12 ImS12  ReS22 ImS22
f2 ReS11 ImS11  ReS21 ImS21  ReS12 ImS12  ReS22 ImS22
f3 ReS11 ImS11  ReS21 ImS21  ReS12 ImS12  ReS22 ImS22

If the size of the matrix is specified (instead of using the one matrix per row option) then the first example could be written as:

f1    ReS11 ImS11 ReS12 ImS12 ReS21 ImS21  
ReS22 ImS22 f2	  ReS11 ImS11 ReS12 ImS12
ReS21 ImS21 ReS22 ImS22 f3 ReS11 ImS11  
ReS12 ImS12 ReS21 ImS21 ReS22 ImS22

Because of the limitations of this file format, NI AWR recommends using the NI AWR Design Environment suite to convert to a true Touchstone file format using the following procedure:

  1. Import the raw data file.

  2. Plot some or all of the data to make sure the data displays correctly on a graph. If it doesn't, you may need to adjust your raw data settings.

  3. Once the data displays correctly, add an output file to the project by right-clicking the Output Files node in the Project Browser, choosing Add Output File, and then selecting Port Parameter with the new raw data file specified as the data source name.

  4. Simulate, and the NI AWR Design Environment software outputs a Touchstone formatted file on your computer that you can import as a Touchstone file.

3.2.8. Text Data File Format

The text data file format is used by various system simulator models and supported by the vfile() equation function. You can plot data from text files on graphs using the PlotCol and PlotRow measurements. You can use this method to compare simulated versus measured data, like a power sweep, for example. Finally, you can use data from text files for model parameters using the Data and Row or Col functions. A typical application is to set your PORT_ARBS bit sequence in a text file.

The data file is an ASCII text file comprised of three sections that must display in the following order:

  1. Tags (optional)

  2. Column Headings (optional)

  3. Column Data

3.2.8.1.  Comments

Sections of the file may be 'commented out'. Comments are ignored when the data file is interpreted.

There are two types of comments: line comments and block comments. Line comments ignore the remaining text on the line on which they appear. Block comments ignore text until an end marker is detected.

Line comments begin with a "!" character:

 ! This is a line comment
SMPFRQ=10 G     Sampling frequency of 10 GHz

All text from the "!" character to the end of the line are ignored.

Block comments begin with "/*" characters and end with "*/" characters:

/* This starts the comment block.
SMPRATE=16
The above line is ignored. This ends the comment block. */

Comment characters that are in quotations are not treated as comments, for example:

TITLE="Don't use this file"

3.2.8.2.  Tags

The first section of the file, if present, is the Tags section. Tags are 'name' 'value' pairs that provide additional information about the file. Each tag consists of a name followed by an "=" followed by a value. Numeric values can also be followed by an optional units scale.

SMPFRQ = 10.0 G   Indicates sampling frequency of 10 GHz
SMPRATE = 8
TITLE = "Sample Data"

The name consists of an alphabetic character followed by one or more alphabetic characters, digits, or the "_" character. The alphabetic characters can be either upper or lower case; case is not considered when interpreting tags.

Values are either numeric, in which case they use standard numeric form such as 1.0, 1e9 or 5.2e-10, or text. Text values must be enclosed in quotation marks '"'. A quotation mark may be included as part of the text by preceding it with a "\" character.

TITLE = "From \"The Big Book\""

Numeric values can be followed by one of the following units scales:

Unit Abbreviation Unit name Description
f femto 10-15
p pico 10-12
n nano 10-9
u micro 10-6
m milli 10-3
c centi 10-2
k kilo 103
M mega 106
G giga 109
T tera 1012
mil 0.001 inches  
in inch  
ft feet  
mile miles  
C Celsius  
K Kelvin  
F Fahrenheit  
rad radians  
deg degrees  
dbm dBm  
dbw dBW  

Numeric values may also be entered in hexadecimal (base 16) format by preceding the value with 0x. For example, 0x12 represents the decimal value 18.

The following is the set of predefined tags:

Tag Name Tag Description Tag Type
SMPFRQ Sampling frequency Numeric
TSTEP Time step Numeric
SMPRATE Sample rate Numeric
CTRFRQ Center frequency Numeric
MEASFRQ Measurement frequency Numeric
Z0 Impedance Numeric
T0 Start time Numeric
NROWS Number of rows Numeric
NCOLS Number of columns Numeric

You can specify only one SMPFRQ or TSTEP, since they are related by TSTEP = 1/SMPFRQ.

If NROWS is specified, no more than NROWS of data are read from the file. This is useful when testing data sets.

If NCOLS is specified, no column headings should be specified. NCOLS is normally used to indicate how many columns are represented by interleaved data that appears in a single column or row.

You can also specify tags not in the predefined list. These tags are available to the individual models. Tags not used by a model are ignored.

3.2.8.3.  Column Headings

The column headings section, if present, provides additional information about the data columns of the file. If this section is present, you must specify a column heading for each data column. A column heading has the following format:

[name]([type][,units])

where [name] is the name of the column, [type] is the type of data and [units] is the units for the data. Each of the parts is optional, although the "(,)" and "," punctuation are required.

Each column heading is separated from the others by one or more spaces or a tab character.

The column name has the same restrictions as a tag; it must start with an alphabetic character followed by zero or more alphabetic characters, digits or underscores "_". It cannot contain spaces.

The column type indicates how complex values are to be generated, and can be one of the following:

Column Name Column Type
Re Real component
Im Imaginary component
I Inphase component
Q Quadrature component
Mag Magnitude component
Phs Phase component
Scalar Non-complex data.

The column types are not case-sensitive.

If the column type is not Scalar, the column must be followed by a corresponding matching column containing the other component of the complex value. The following are the pairs:

  • Re, Im or Im, Re

  • I, Q or Q, I

  • Mag, Phs or Phs, Mag

The units for the data are SI units and several common units such as the following:

Unit Abbreviation Unit Name
GHz gigahertz
ns nanoseconds
mW milliwatts
dBm DBm
dBW dB Watts
Deg angle in degrees
Rad angle in radians

The following is an example of a frequency response file, with a column of frequency values in GHz followed by a column of magnitude values in dBm, followed by a column of phase values in degrees:

Freq(,GHz) (Mag,dBm)  (Phs,deg)
1          10         20
2          11         23

Note that in this example the frequency column does not use a column type, while the magnitude and phase columns do not use column names.

The following illustrates how you can use the Scalar column type:

(Scalar) (Mag,dBm)    (Phs,deg)
1        10           20
2        11           23

The following is illegal, since an Re column must be followed by an Im column. Use the Scalar column type as in the previous example instead to specify complex values with only a real component and 0 for the imaginary:

(Re)    (Mag,dBm)    (Phs,deg)
1       10           20
2       11           23

3.2.8.4.  Column Data

The last section is the column data. The column data consists of numeric data values separated by spaces, tabs, or commas. If neither an NCOLS tag nor column headings are used in the data file, the number of columns is determined by the number of values on the first line of data.

If an NCOLS tag or column headings are specified, the columns are defined by the NCOLS tag or by the column headings, and the data values do not have to appear in the specified columns. For example, if you have three sets of data values interleaved into a single column, you could simply add the following to treat the data as three columns of data:

NCOLS=3
1
11
.01
2
12
.02
3
13
.03
This is the equivalent of:
NCOLS=3
1    11    .01
2    12    .02
3    13    .03

If an NROWS tag is specified, only the equivalent of that many rows of data is processed. This is useful when you have a large set of data, but only want to use a small portion of it for testing purposes.

3.2.8.5. Use with Microwave Office

You can use text data files to plot data from measurements or other computer programs versus simulation results. A common problem is not using column headers correctly to line up the data. This problem is demonstrated in the following example of a plot of output power versus input power. The following graph shows the simulation result.

The following data file shows the original plotted data for the first few points:

! AM to PM characteristics
-20	-1.70501
-19	-0.705099	
-18	0.293446	
-17	1.29193	
-16	2.2832	
-15	3.27812	
-14	4.27169	
-13	5.26358
-12	6.25331
-11	7.2403	
-10	8.22375

When this data is plotted versus the simulated data using the PLOTCOL measurement, the data displays as follows.

As you can see, the data is shifted by 30 dB. The solution is to add the proper column headers. After changing the data file to the following,

! AM to PM characteristics
Pin(,dBm)	Pout(,dBm)
-20	-1.70501
-19	-0.705099	
-18	0.293446	
-17	1.29193	
-16	2.2832	
-15	3.27812	
-14	4.27169	
-13	5.26358
-12	6.25331
-11	7.2403	
-10	8.22375

the data lines up with the simulated data, as shown in the following graph.

There are several items to note when plotting data in this mode:

  • The text before the "( )" is not used. You can add text for identification purposes or omit it.

  • Complex data is not used in this mode. You can omit the type (no text after the first "(" and before the ","). For example, Pin(,dBm).

  • The unit modifier for the y-axis does not currently change how the data is plotted. However, once you use headers, you must add them for each column, so NI AWR recommends that you define the units for each column of data.

The following examples show other common data types:

Current in mA

Pin(,dBm) ID(,mA)
-20	33.0683
-19	33.0857
-18	33.1075
-17	33.135
-16	33.1696
-15	33.2132
-14	33.2679
-13	33.3369
-12	33.4236
-11	33.5327
-10	33.6697

Frequency in GHz versus impedance in ohms

(,GHz) (,ohms)
1	166.824
2	93.9818
3	72.9005
4	63.8995
5	59.2724
6	56.6005
7	54.9267
8	53.8125
9	53.0351
10	52.4719

Voltage in volts and time in seconds

Voltage(,V)	Time(,s)
1.9870509463574	0
-1.8883353991916	250.40064102564e-12
1.7804170729503	500.80128205128e-12
-1.6639524028713	751.20192307692e-12
1.5396674521328	1.0016025641026e-9
-1.408352913535	1.2520032051282e-9
1.2708585477709	1.5024038461538e-9
-1.1280871015799	1.7528044871795e-9
0.98098775371646	2.0032051282051e-9

3.2.9. Text Data File Load Pull and Source Pull Formats

The NI AWR Design Environment suite can also import load pull and source pull data as text files. Maury Microwave and Focus Microwaves file formats are supported, as is the format exported by the Load Pull script (see “Load Pull Script”).

Imported load pull files are used in the program in two ways. First, you can plot the data from the load pull files using the measured Load Pull measurements. When adding a Load Pull measurement you can plot:

  • LPCM: Measured load pull contours

  • LPGPM: Measured load pull impedance points

  • LPCMMax: Maximum of measured load pull contours

  • LPCMMin: Minimum of measured load pull contours

  • LPINT: This measurement determines the impedance of a linear network and then finds the right point within the load pull data to return the Load Pull measurement data. For example, if based on the impedance of your matching network, it can show the expected output power or PAE based on the load pull data.

You can also use the load pull points in the files as the impedances used during simulated load pull so your simulated load pull uses the same impedances as your measured load pull.

3.2.9.1. Maury File Formats

The NI AWR Design Environment suite supports version3, version4, and version5 of the Maury load pull file format.

3.2.9.2. Swept Power Files

Load Pull systems also produce files where the tuner impedances are fixed and the input power is swept. You can perform the following:

  1. Import the file as a text file.

  2. Comment out any lines in the file, except the column headers.

  3. Put the column headers in the right units format. See Column Headings. This step is important or the data might not line up properly versus simulation. For example, for power, the typical unit is dBm. If you do not change the column header to specify the proper units, the program uses base units (dBw in this example) and there is a 30 dB shift in the data.

3.2.10. Touchstone File Format

The Touchstone file format allows data to be read in as G-, H-, S-, Y-, or Z-parameters.

Touchstone-compatible data files are comprised of a header that describes the format of the network parameter matrices.

The header syntax is:

>#   HZ|KHZ|MHZ|GHZ|THZ  G|H|S|Y|Z  MA|DB|RI   [R x]

Where the "|" character separates different choices, and the "[ ]" brackets indicate an optional entry. The following table lists each item in the header:

Header Portion Description
# Signifies the beginning of the header.
HZ | KHZ | MHZ | GHZ | THZ Specifies the frequency units of the data file (choose one).
G | H | S | Y | Z Specifies the parameter type of the data file (choose one).
MA | DB | RI Specifies how the complex data are presented (choose one).
[R x] x is a real number that specifies the reference impedance (optional).

The following are example headers:

# GHZ S MA R 50
# MHZ S DB
# HZ Z RI  

The following is network data syntax, where m specifies the number of frequency points, and n specifies the matrix size:

<freq point 1>	<row 1>
[<row 1 cont.>]
<row 2>
[<row 2 cont.>]
......
<row n>
<row n cont.>]
<freq point 2>	<row 1>
[<row 1 cont.>]
<row 2>
[<row 2 cont.>]
......
<row n>
[<row n cont.>]
...
<freq point m> <row 1>
[<row 1 cont.>]
<row 2>
[<row 2 cont.>]
......
<row n>
[<row n cont.>]

Noise data can be added to two-port data files and must follow port parameter data. The first frequency point in the noise data must be less than or equal to the highest frequency point in the port parameter data. The following is the noise data format:

Freq NFmindB MagOpt AngOpt Rn

where

  • Freq is the frequency of noise data in frequency units.

  • NFmindB is the minimum noise figure in dB.

  • MagOpt is the magnitude of the normalized source gamma to achieve NFmin.

  • AngOpt is the angle (in degrees) of the normalized source gamma to achieve NFmin.

  • Rn is the normalized noise resistance. To have a physical meaning, Rn must be greater than or equal to

    where NFmin is the minimum noise factor (not in dB) and Yopt is the optimum source admittance. If Rn is less than this minimum it is reset to the minimum.

  • GammaOpt and Rn are normalized to the reference impedance specified in the header for the port parameter data (usually 50 ohms).

The following rules apply to Touchstone format files:

  • Files must have a *.g??,*.h??,*.s??,*.y??,*.z?? extension. The file name extensions, by convention, are s1p, s2p, ..., s9p, s10p, s11p - s99p. The same convention is used for y- and z- file extensions. These extensions correspond to 1- through 99-port data files; however, the extension is not used to determine the size of the network parameter matrices. Instead, the first network parameter matrix is read from the file and its size is computed and used for the remaining network parameter matrices, so the maximum size of a readable network parameter matrix is only limited by your hardware.

  • The "!" character is used for comments, which may be inserted anywhere in the data file. Comments persist until the end of the line.

  • The reference impedance is used as the normalizing impedance for all network parameters. For S-parameters, it is Z0. For Y-parameters, the y-matrix is divided by R. For Z-parameters, the z-matrix is multiplied by R. For G-parameters g(1,1) is divided by R and g(2,2) is multiplied by R. For H-parameters, h(1,1) is multiplied by R and h(2,2) is divided by R. If no reference impedance is specified, then 50 ohms is assumed.

  • G- and H-parameters are supported for two-port files only.

  • T-parameters are not supported for import, but you can plot T-parameters from networks.

  • MA and DB indicate that the complex data is in polar form (magnitude, angle), the angle of which is always in units of degrees; DB further specifies that the magnitude has been transformed via 20*Log(mag). RI indicates that the data is in rectangular form (real, imag).

  • The network parameter matrices are in row major order, except for two-port matrices, which are in column major order.

  • Each network parameter is a complex number that is read as two sequential real numbers.

  • Each line may contain a maximum of four network parameters (8 real numbers). If the matrix contains more than four network parameters per row (it is larger than a four-port), the remaining network parameters are continued on the following line.

  • Each row of the network parameter matrices begins on a new line.

  • The first row of a network parameter matrix is preceded by the frequency at which the data was generated.

The following is an example file for a one-port:

	# GHZ S RI R 50    
f1 ReS11 ImS11  
f2 ReS11 ImS11  
f3 ReS11 ImS11  

The following is an example file for a two-port:

	# GHZ S RI R 50
f1 ReS11 ImS11  ReS21 ImS21  ReS12 ImS12  ReS22 ImS22
f2 ReS11 ImS11  ReS21 ImS21  ReS12 ImS12  ReS22 ImS22
f3 ReS11 ImS11  ReS21 ImS21  ReS12 ImS12  ReS22 ImS22

Note that two-port files use column major format and allow more than one row of the matrix on one line.

The following is an example file for a three-port:

	# GHZ S RI R 50
f1 ReS11 ImS11  ReS12 ImS12  ReS13 ImS13
   ReS21 ImS21  ReS22 ImS22  ReS23 ImS23
   ReS31 ImS31  ReS32 ImS32  ReS33 ImS33
f2 ReS11 ImS11  ReS12 ImS12  ReS13 ImS13
   ReS21 ImS21  ReS22 ImS22  ReS23 ImS23
   ReS31 ImS31  ReS32 ImS32  ReS33 ImS33
f3 ReS11 ImS11  ReS12 ImS12  ReS13 ImS13
   ReS21 ImS21  ReS22 ImS22  ReS23 ImS23
   ReS31 ImS31  ReS32 ImS32  ReS33 ImS33

The following is an example file for a four-port:

	# GHZ S RI R 50
f1 ReS11 ImS11  ReS12 ImS12  ReS13 ImS13 ReS14 ImS14
   ReS21 ImS21  ReS22 ImS22  ReS23 ImS23 ReS24 ImS24
   ReS31 ImS31  ReS32 ImS32  ReS33 ImS33 ReS34 ImS34
   ReS41 ImS41  ReS42 ImS42  ReS43 ImS43 ReS44 ImS44
f2 ReS11 ImS11  ReS12 ImS12  ReS13 ImS13 ReS14 ImS14
   ReS21 ImS21  ReS22 ImS22  ReS23 ImS23 ReS24 ImS24
   ReS31 ImS31  ReS32 ImS32  ReS33 ImS33 ReS34 ImS34
   ReS41 ImS41  ReS42 ImS42  ReS43 ImS43 ReS44 ImS44
f3 ReS11 ImS11  ReS12 ImS12  ReS13 ImS13 ReS14 ImS14
   ReS21 ImS21  ReS22 ImS22  ReS23 ImS23 ReS24 ImS24
   ReS31 ImS31  ReS32 ImS32  ReS33 ImS33 ReS34 ImS34
   ReS41 ImS41  ReS42 ImS42  ReS43 ImS43 ReS44 ImS44

The following is an example file for a five-port:

	# GHZ S RI R 50
f1 ReS11 ImS11  ReS12 ImS12  ReS13 ImS13 ReS14 ImS14
   ReS15 ImS15
   ReS21 ImS21  ReS22 ImS22  ReS23 ImS23 ReS24 ImS24
   ReS25 ImS25
   ReS31 ImS31  ReS32 ImS32  ReS33 ImS33 ReS34 ImS34
   ReS35 ImS35
   ReS41 ImS41  ReS42 ImS42  ReS43 ImS43 ReS44 ImS44
   ReS45 ImS45
   ReS51 ImS51  ReS52 ImS52  ReS53 ImS53 ReS54 ImS54
   ReS55 ImS55
f2 ReS11 ImS11  ReS12 ImS12  ReS13 ImS13 ReS14 ImS14
   ReS15 ImS15
   ReS21 ImS21  ReS22 ImS22  ReS23 ImS23 ReS24 ImS24
   ReS25 ImS25
   ReS31 ImS31  ReS32 ImS32  ReS33 ImS33 ReS34 ImS34
   ReS35 ImS35
   ReS41 ImS41  ReS42 ImS42  ReS43 ImS43 ReS44 ImS44
   ReS45 ImS45
   ReS51 ImS51  ReS52 ImS52  ReS53 ImS53 ReS54 ImS54
   ReS55 ImS55
f3 ReS11 ImS11  ReS12 ImS12  ReS13 ImS13 ReS14 ImS14
   ReS15 ImS15
   ReS21 ImS21  ReS22 ImS22  ReS23 ImS23 ReS24 ImS24
   ReS25 ImS25
   ReS31 ImS31  ReS32 ImS32  ReS33 ImS33 ReS34 ImS34
   ReS35 ImS35
   ReS41 ImS41  ReS42 ImS42  ReS43 ImS43 ReS44 ImS44
   ReS45 ImS45
   ReS51 ImS51  ReS52 ImS52  ReS53 ImS53 ReS54 ImS54
   ReS55 ImS55

See Touchstone® File Format Specification for Touchstone v2.0 file format information.

3.2.10.1. Specifying Port Names in Touchstone Data Files

You can specify port names in comment lines (which begin with an exclamation point character) in the data files:

     ! Port[1]=In
     ! Port[2]=Out     
          
     # HZ S MA R 50
     ! Freq MagS11 AngS11 MagS21 AngS21 MagS12 AngS12 MagS22 AngS22 
     0 0.047460043 -0 0.777978 0 0.77797801 -0 0.1831028 180 
     1e+009 0.076247202 48.161048 0.77658837 -3.4250583 0.77658838 -3.4250583 0.18476243 168.16514 

The port index is specified inside the brackets, and the name is provided after the equal sign, without quotes.

3.2.10.2. Port Names On SUBCKT Schematic Symbols

Port names automatically display next to the terminals of the SUBCKT element unless disabled for a specific Touchstone file on the Symbol tab of the Options dialog box.

3.2.10.3. NPORT_F Output File Measurement

When you use an NPORT_F Output File measurement to create a Touchstone data file, if the referenced data source is a schematic that contains ports with PIN_IDs, those names are written into the data file using the syntax previously described.

Please send email to awr.support@ni.com if you would like to provide feedback on this article. Please make sure to include the article link in the email.

Legal and Trademark Notice